diff --git a/custom_components/rbac/__init__.py b/custom_components/rbac/__init__.py index 293e8ca..d71d7d1 100644 --- a/custom_components/rbac/__init__.py +++ b/custom_components/rbac/__init__.py @@ -53,26 +53,13 @@ def _load_file(): "allow_chained_actions": False, "last_rejection": "Never", "last_user_rejected": "None", - "default_restrictions": { - "domains": { - "homeassistant": { - "hide": False, - "services": ["restart", "stop", "reload_config_entry", "check_config"] - }, - "system_log": { - "hide": True, - "services": ["write", "clear"] - }, - "hassio": { - "hide": True, - "services": ["host_reboot", "host_shutdown", "supervisor_update", "supervisor_restart"] - } - }, - "entities": {} - }, + "default_role": "", "users": {}, "roles": { - "admin": {"description": "Administrator with most permissions"}, + "admin": { + "description": "Administrator with most permissions", + "admin": True + }, "user": {"description": "Standard user with limited permissions"}, "guest": {"description": "Guest with minimal permissions"} } @@ -517,16 +504,22 @@ def _is_service_restricted_for_user(domain: str, service: str, user_id: str, has user_config = users.get(user_id) if not user_config: - default_restrictions = access_config.get("default_restrictions", {}) - if default_restrictions: - default_domains = default_restrictions.get("domains", {}) - if domain in default_domains: - domain_config = default_domains[domain] - if domain_config.get("hide", False): - return True - default_services = domain_config.get("services", []) - if service in default_services: - return True + # Check if there's a default role configured + default_role = access_config.get("default_role", "") + if default_role: + # Use the default role to check restrictions + roles = access_config.get("roles", {}) + role_config = roles.get(default_role, {}) + if role_config: + permissions = role_config.get("permissions", {}) + domains = permissions.get("domains", {}) + if domain in domains: + domain_config = domains[domain] + if domain_config.get("hide", False): + return True + services = domain_config.get("services", []) + if service in services: + return True return False restrictions = user_config.get("restrictions", {}) @@ -580,47 +573,26 @@ def _check_service_access_with_reason( user_config = users.get(user_id) if not user_config: - _LOGGER.warning(f"User {user_id} not in config, checking default restrictions") - default_restrictions = access_config.get("default_restrictions", {}) - _LOGGER.warning(f"Default restrictions: {default_restrictions}") - if default_restrictions: - default_domains = default_restrictions.get("domains", {}) - _LOGGER.warning(f"Checking domain {domain} against default domains: {default_domains}") - if domain in default_domains: - domain_config = default_domains[domain] - _LOGGER.warning(f"Found domain {domain} config: {domain_config}") - default_services = domain_config.get("services", []) - if not default_services: - _LOGGER.warning(f"Domain {domain} blocks all services") - return False, f"domain {domain} blocked by default" - elif service in default_services: - return False, f"service {domain}.{service} blocked by default" - - if service_data and "entity_id" in service_data: - entity_id = service_data["entity_id"] - if isinstance(entity_id, list): - for eid in entity_id: - default_entities = default_restrictions.get("entities", {}) - if eid in default_entities: - entity_config = default_entities[eid] - default_entity_services = entity_config.get("services", []) - if not default_entity_services: - return False, f"entity {eid} blocked by default" - elif service in default_entity_services: - return False, f"entity {eid} service {service} blocked by default" - else: - default_entities = default_restrictions.get("entities", {}) - if entity_id in default_entities: - entity_config = default_entities[entity_id] - default_entity_services = entity_config.get("services", []) - if not default_entity_services: - return False, f"entity {entity_id} blocked by default" - elif service in default_entity_services: - return False, f"entity {entity_id} service {service} blocked by default" - - return True, f"no default restrictions" - - user_role = user_config.get("role", "unknown") + _LOGGER.warning(f"User {user_id} not in config, checking default role") + default_role = access_config.get("default_role", "") + if default_role: + _LOGGER.warning(f"Using default role: {default_role}") + # Use the default role as if it was assigned to the user + user_role = default_role + else: + _LOGGER.warning(f"No default role configured, allowing access") + return True, f"no default role configured" + else: + user_role = user_config.get("role", "unknown") + # Check if user has "default" role assigned + if user_role == "default": + default_role = access_config.get("default_role", "") + if default_role: + _LOGGER.warning(f"User has 'default' role, using configured default role: {default_role}") + user_role = default_role + else: + _LOGGER.warning(f"User has 'default' role but no default role configured, allowing access") + return True, f"no default role configured" roles = access_config.get("roles", {}) role_config = roles.get(user_role, {}) @@ -683,69 +655,14 @@ def _check_service_access_with_reason( deny_all = role_config.get("deny_all", False) - default_restrictions = access_config.get("default_restrictions", {}) permissions = role_config.get("permissions", {}) + if not permissions: + permissions = role_config if service_data and "entity_id" in service_data: entity_id = service_data["entity_id"] if isinstance(entity_id, list): for eid in entity_id: - # Check default entity restrictions - default_entities = default_restrictions.get("entities", {}) - if eid in default_entities: - default_entity_config = default_entities[eid] - default_entity_services = default_entity_config.get("services", []) - default_entity_allow = default_entity_config.get("allow", False) - - if default_entity_allow: - # Default allow rule: check if service is in allowed services - if not default_entity_services or service in default_entity_services: - return True, f"entity {eid} service {service} allowed by default" - else: - return False, f"entity {eid} service {service} not in default allow list" - else: - # Default block rule - if not default_entity_services: # Default blocks all services - # Check if role allows this entity - role_entities = permissions.get("entities", {}) - if eid not in role_entities: - return False, f"entity {eid} blocked by default restrictions" - role_entity_config = role_entities[eid] - role_entity_services = role_entity_config.get("services", []) - role_entity_allow = role_entity_config.get("allow", False) - - if role_entity_allow: - # Role allow rule: check if service is in allowed services - if not role_entity_services or service in role_entity_services: - return True, f"entity {eid} service {service} allowed by role {user_role}" - else: - return False, f"entity {eid} service {service} not in role allow list" - else: - # Role block rule - if not role_entity_services: # Role also blocks all services - return False, f"entity {eid} blocked by role {user_role}" - elif service not in role_entity_services: # Service not in role's allowed list - return False, f"entity {eid} service {service} not allowed by role {user_role}" - elif service in default_entity_services: # Default blocks specific service - # Check if role allows this service - role_entities = permissions.get("entities", {}) - if eid not in role_entities: - return False, f"entity {eid} service {service} blocked by default restrictions" - role_entity_config = role_entities[eid] - role_entity_services = role_entity_config.get("services", []) - role_entity_allow = role_entity_config.get("allow", False) - - if role_entity_allow: - # Role allow rule: check if service is in allowed services - if not role_entity_services or service in role_entity_services: - return True, f"entity {eid} service {service} allowed by role {user_role}" - else: - return False, f"entity {eid} service {service} not in role allow list" - else: - # Role block rule - if service in role_entity_services: # Role also blocks this service - return False, f"entity {eid} service {service} blocked by role {user_role}" - - # Check role-specific entity restrictions (always check, even if no default restrictions) + # Check role-specific entity restrictions role_entities = permissions.get("entities", {}) if eid in role_entities: role_entity_config = role_entities[eid] @@ -767,61 +684,7 @@ def _check_service_access_with_reason( elif service in role_entity_services: # Role blocks specific service return False, f"entity {eid} service {service} blocked by role {user_role}" else: - # Same logic for single entity - default_entities = default_restrictions.get("entities", {}) - if entity_id in default_entities: - default_entity_config = default_entities[entity_id] - default_entity_services = default_entity_config.get("services", []) - default_entity_allow = default_entity_config.get("allow", False) - - if default_entity_allow: - # Default allow rule: check if service is in allowed services - if not default_entity_services or service in default_entity_services: - return True, f"entity {entity_id} service {service} allowed by default" - else: - return False, f"entity {entity_id} service {service} not in default allow list" - else: - # Default block rule - if not default_entity_services: # Default blocks all services - role_entities = permissions.get("entities", {}) - if entity_id not in role_entities: - return False, f"entity {entity_id} blocked by default restrictions" - role_entity_config = role_entities[entity_id] - role_entity_services = role_entity_config.get("services", []) - role_entity_allow = role_entity_config.get("allow", False) - - if role_entity_allow: - # Role allow rule: check if service is in allowed services - if not role_entity_services or service in role_entity_services: - return True, f"entity {entity_id} service {service} allowed by role {user_role}" - else: - return False, f"entity {entity_id} service {service} not in role allow list" - else: - # Role block rule - if not role_entity_services: # Role also blocks all services - return False, f"entity {entity_id} blocked by role {user_role}" - elif service not in role_entity_services: # Service not in role's allowed list - return False, f"entity {entity_id} service {service} not allowed by role {user_role}" - elif service in default_entity_services: # Default blocks specific service - role_entities = permissions.get("entities", {}) - if entity_id not in role_entities: - return False, f"entity {entity_id} service {service} blocked by default restrictions" - role_entity_config = role_entities[entity_id] - role_entity_services = role_entity_config.get("services", []) - role_entity_allow = role_entity_config.get("allow", False) - - if role_entity_allow: - # Role allow rule: check if service is in allowed services - if not role_entity_services or service in role_entity_services: - return True, f"entity {entity_id} service {service} allowed by role {user_role}" - else: - return False, f"entity {entity_id} service {service} not in role allow list" - else: - # Role block rule - if service in role_entity_services: # Role also blocks this service - return False, f"entity {entity_id} service {service} blocked by role {user_role}" - - # Check role-specific entity restrictions (always check, even if no default restrictions) + # Check role-specific entity restrictions for single entity role_entities = permissions.get("entities", {}) if entity_id in role_entities: role_entity_config = role_entities[entity_id] @@ -843,60 +706,13 @@ def _check_service_access_with_reason( elif service in role_entity_services: # Role blocks specific service return False, f"entity {entity_id} service {service} blocked by role {user_role}" - default_domains = default_restrictions.get("domains", {}) role_domains = permissions.get("domains", {}) - if domain in default_domains: - default_config = default_domains[domain] - default_services = default_config.get("services", []) - default_allow = default_config.get("allow", False) - - if default_allow: - if not default_services or service in default_services: - return True, f"domain {domain} service {service} allowed by default" - else: - return False, f"domain {domain} service {service} not in default allow list" - else: - if not default_services: - if domain not in role_domains: - return False, f"domain {domain} blocked by default restrictions" - role_config = role_domains[domain] - role_services = role_config.get("services", []) - role_allow = role_config.get("allow", False) - - if role_allow: - if not role_services or service in role_services: - return True, f"domain {domain} service {service} allowed by role {user_role}" - else: - return False, f"domain {domain} service {service} not in role allow list" - else: - if not role_services: - return False, f"domain {domain} blocked by role {user_role}" - elif service not in role_services: - return False, f"service {domain}.{service} not allowed by role {user_role}" - elif service in default_services: - if domain not in role_domains: - return False, f"service {domain}.{service} blocked by default restrictions" - role_config = role_domains[domain] - role_services = role_config.get("services", []) - role_allow = role_config.get("allow", False) - - if role_allow: - if not role_services or service in role_services: - return True, f"domain {domain} service {service} allowed by role {user_role}" - else: - return False, f"domain {domain} service {service} not in role allow list" - else: - if service in role_services: - return False, f"service {domain}.{service} blocked by role {user_role}" - if domain in role_domains: role_config = role_domains[domain] role_services = role_config.get("services", []) role_allow = role_config.get("allow", False) - _LOGGER.warning(f"Found domain {domain} in role permissions: allow={role_allow}, services={role_services}") - if role_allow: if not role_services or service in role_services: return True, f"domain {domain} service {service} allowed by role {user_role}" @@ -909,6 +725,25 @@ def _check_service_access_with_reason( return False, f"service {domain}.{service} blocked by role {user_role}" if deny_all and not ((domain == "system_log" and service == "write") or (domain == "browser_mod" and service == "notification")): + if domain in role_domains: + role_config = role_domains[domain] + role_allow = role_config.get("allow", False) + if role_allow: + role_services = role_config.get("services", []) + if not role_services or service in role_services: + return True, f"domain {domain} service {service} allowed by role domain permissions (overrides deny_all)" + + if domain == "homeassistant" and service_data and "entity_id" in service_data: + entity_id = service_data["entity_id"] + if isinstance(entity_id, str): + entity_domain = entity_id.split('.')[0] + if entity_domain in role_domains: + entity_domain_config = role_domains[entity_domain] + if entity_domain_config.get("allow", False): + entity_domain_services = entity_domain_config.get("services", []) + if not entity_domain_services or service in entity_domain_services: + return True, f"homeassistant service {service} allowed by entity domain {entity_domain} permissions" + entity_ids = [] if service_data and "entity_id" in service_data: diff --git a/custom_components/rbac/access_control.yaml b/custom_components/rbac/access_control.yaml deleted file mode 100644 index 615fc51..0000000 --- a/custom_components/rbac/access_control.yaml +++ /dev/null @@ -1,40 +0,0 @@ -version: '2.0' -description: RBAC Access Control Configuration -enabled: true -show_notifications: true -send_event: false -frontend_blocking_enabled: false -log_deny_list: false -allow_chained_actions: false -last_rejection: Never -last_user_rejected: None -default_restrictions: - domains: - homeassistant: - hide: false - services: - - restart - - stop - - reload_config_entry - - check_config - system_log: - hide: true - services: - - write - - clear - hassio: - hide: true - services: - - host_reboot - - host_shutdown - - supervisor_update - - supervisor_restart - entities: {} -users: {} -roles: - admin: - description: Administrator with most permissions - user: - description: Standard user with limited permissions - guest: - description: Guest with minimal permissions \ No newline at end of file diff --git a/custom_components/rbac/services.py b/custom_components/rbac/services.py index 6d4c733..9bfcf8d 100644 --- a/custom_components/rbac/services.py +++ b/custom_components/rbac/services.py @@ -32,12 +32,11 @@ def _get_available_roles(hass: HomeAssistant) -> list: """Get available roles from access control configuration.""" if DOMAIN not in hass.data: - return ["guest", "user", "admin", "super_admin"] # Default roles + return ["guest", "user", "admin", "super_admin"] access_config = hass.data[DOMAIN].get("access_config", {}) roles = list(access_config.get("roles", {}).keys()) - # If no roles defined, use default roles if not roles: roles = ["guest", "user", "admin", "super_admin"] @@ -57,7 +56,6 @@ def _validate_role(hass: HomeAssistant, role: str) -> bool: LIST_USERS_SCHEMA = vol.Schema({}) -# User management schemas (restricted to top-level users) ADD_USER_SCHEMA = vol.Schema({ vol.Required("person"): cv.string, vol.Required("role"): cv.string, @@ -73,7 +71,6 @@ async def handle_get_user_config(call: ServiceCall) -> ServiceResponse: """Handle the get_user_config service call.""" person_entity_id = call.data.get("person", "") - # Extract user_id from person entity try: person_state = hass.states.get(person_entity_id) if not person_state: @@ -105,7 +102,6 @@ async def handle_get_user_config(call: ServiceCall) -> ServiceResponse: "message": f"User '{user_id}' not found in configuration (has full access)" } - # Fire event with the data hass.bus.async_fire("rbac_service_response", { "service": "get_user_config", "data": response_data @@ -115,7 +111,6 @@ async def handle_get_user_config(call: ServiceCall) -> ServiceResponse: async def handle_reload_config(call: ServiceCall) -> Dict[str, Any]: """Handle the reload_config service call.""" - # Check if caller has top-level access caller_id = call.context.user_id if call.context else None if not caller_id or not _is_top_level_user(hass, caller_id): _LOGGER.warning(f"Access denied: User {caller_id} attempted to reload config") @@ -181,7 +176,6 @@ async def handle_add_user(call: ServiceCall) -> Dict[str, Any]: person_entity_id = call.data.get("person", "") role = call.data.get("role", "") - # Validate role if not role: raise HomeAssistantError("Role is required") @@ -189,7 +183,6 @@ async def handle_add_user(call: ServiceCall) -> Dict[str, Any]: available_roles = _get_available_roles(hass) raise HomeAssistantError(f"Invalid role '{role}'. Available roles: {', '.join(available_roles)}") - # Extract user_id from person entity try: person_state = hass.states.get(person_entity_id) if not person_state: @@ -213,7 +206,6 @@ async def handle_add_user(call: ServiceCall) -> Dict[str, Any]: "message": f"Error extracting user_id from person {person_entity_id}: {e}" } - # Check if caller has top-level access caller_id = call.context.user_id if call.context else None if not caller_id or not _is_top_level_user(hass, caller_id): _LOGGER.warning(f"Access denied: User {caller_id} attempted to add user {user_id}") @@ -222,7 +214,6 @@ async def handle_add_user(call: ServiceCall) -> Dict[str, Any]: "message": "Access denied: Only admin users can add users" } - # Check if user is a built-in HA user if _is_builtin_ha_user(user_id): _LOGGER.warning(f"Cannot add built-in Home Assistant user: {user_id}") return { @@ -547,14 +538,22 @@ async def post(self, request): access_config["users"][user_id] = {} access_config["users"][user_id]["role"] = role_name - elif action == "update_default_restrictions": - restrictions = data.get("restrictions") + elif action == "update_default_role": + default_role = data.get("default_role") + + if default_role is None: + return self.json({"error": "Missing default_role"}, status_code=400) - if not restrictions: - return self.json({"error": "Missing restrictions"}, status_code=400) + if default_role == "none": + default_role = "" - # Update default restrictions - access_config["default_restrictions"] = restrictions + # Validate the default role + if default_role and not _validate_role(hass, default_role): + available_roles = _get_available_roles(hass) + return self.json({"error": f"Invalid default role '{default_role}'. Available roles: {', '.join(available_roles)}"}, status_code=400) + + # Update default role + access_config["default_role"] = default_role elif action == "update_settings": # Update enabled, show_notifications, send_event, frontend_blocking_enabled, log_deny_list settings @@ -1007,10 +1006,19 @@ class RBACFrontendBlockingView(HomeAssistantView): requires_auth = True async def get(self, request): - """Get frontend blocking configuration for current user.""" + """Get frontend blocking configuration for current user or specified user.""" try: hass = request.app["hass"] - user = request["hass_user"] + current_user = request["hass_user"] + + # Get optional user_id parameter from query string + target_user_id = request.query.get("user_id") + + # Determine which user to get configuration for + if target_user_id: + target_user_id = target_user_id + else: + target_user_id = current_user.id # Get access control configuration access_config = hass.data.get(DOMAIN, {}).get("access_config", {}) @@ -1028,7 +1036,7 @@ async def get(self, request): # Get user configuration users = access_config.get("users", {}) - user_config = users.get(user.id) + user_config = users.get(target_user_id) if not user_config: # User not in config, return empty blocking (full access) @@ -1053,285 +1061,57 @@ async def get(self, request): "services": [] }) - # Check if role has deny_all enabled - deny_all = role_config.get("deny_all", False) - if deny_all: - # In deny_all mode, we need to get all available domains/entities - # and only allow those explicitly marked with allow: true - hass = request.app["hass"] - - # Get all available domains and entities - all_available_domains = set() - all_available_entities = set() - - # Get domains from all states - for state in hass.states.async_all(): - domain = state.entity_id.split('.')[0] - all_available_domains.add(domain) - all_available_entities.add(state.entity_id) - - # Get domains from services - for domain in hass.services.async_services(): - all_available_domains.add(domain) - - # Get role permissions to find allowed items - role_permissions = role_config.get("permissions", {}) - role_domains = role_permissions.get("domains", {}) - role_entities = role_permissions.get("entities", {}) - - # Get user-specific restrictions - user_restrictions = user_config.get("restrictions", {}) - user_domains = user_restrictions.get("domains", {}) - user_entities = user_restrictions.get("entities", {}) - - # Build blocked and allowed lists - block everything except explicitly allowed - blocked_domains = [] - blocked_entities = [] - blocked_services = [] - allowed_domains = [] - allowed_entities = [] - - # Process domains - block all except those with allow: true - for domain in all_available_domains: - domain_allowed = False - - # Check user-specific restrictions first - if domain in user_domains: - user_domain_config = user_domains[domain] - if isinstance(user_domain_config, dict): - domain_allowed = user_domain_config.get("allow", False) - - # Check role-specific permissions - if not domain_allowed and domain in role_domains: - role_domain_config = role_domains[domain] - if isinstance(role_domain_config, dict): - domain_allowed = role_domain_config.get("allow", False) - - if domain_allowed: - allowed_domains.append(domain) - else: - blocked_domains.append(domain) - - # Process entities - block all except those with allow: true - for entity in all_available_entities: - entity_allowed = False - - # Check user-specific restrictions first - if entity in user_entities: - user_entity_config = user_entities[entity] - if isinstance(user_entity_config, dict): - entity_allowed = user_entity_config.get("allow", False) - - # Check role-specific permissions - if not entity_allowed and entity in role_entities: - role_entity_config = role_entities[entity] - if isinstance(role_entity_config, dict): - entity_allowed = role_entity_config.get("allow", False) - - if entity_allowed: - allowed_entities.append(entity) - else: - blocked_entities.append(entity) - - return self.json({ - "enabled": True, - "domains": blocked_domains, - "entities": blocked_entities, - "services": blocked_services, - "allowed_domains": allowed_domains, - "allowed_entities": allowed_entities - }) - - # Get default restrictions - default_restrictions = access_config.get("default_restrictions", {}) - default_domains = default_restrictions.get("domains", {}) - default_entities = default_restrictions.get("entities", {}) - - # Get role-specific permissions + # Get role permissions (handle both old and new structure) role_permissions = role_config.get("permissions", {}) + if not role_permissions: + role_permissions = role_config + role_domains = role_permissions.get("domains", {}) role_entities = role_permissions.get("entities", {}) - # Get user-specific restrictions - user_restrictions = user_config.get("restrictions", {}) - user_domains = user_restrictions.get("domains", {}) - user_entities = user_restrictions.get("entities", {}) - - # Check if role allows by default (opposite of deny_all) - role_allows_by_default = not role_config.get("deny_all", False) + # Check if role has deny_all enabled + deny_all = role_config.get("deny_all", False) - # Get all available domains and entities from Home Assistant - all_available_domains = set() - all_available_entities = set() + from . import _check_service_access_with_reason - # Get domains from all states + # Get all available entities from Home Assistant + all_entities = [] for state in hass.states.async_all(): - domain = state.entity_id.split('.')[0] - all_available_domains.add(domain) - all_available_entities.add(state.entity_id) - - # Get domains from services - for domain in hass.services.async_services(): - all_available_domains.add(domain) - - # Build blocked and allowed lists - blocked_domains = [] - blocked_entities = [] - blocked_services = [] - allowed_domains = [] - allowed_entities = [] - - # Process domains - for domain in all_available_domains: - domain_blocked = False - domain_services = [] - domain_allowed = False - - # Check user-specific restrictions first (highest priority) - if domain in user_domains: - user_domain_config = user_domains[domain] - if isinstance(user_domain_config, dict): - user_services = user_domain_config.get("services", []) - domain_allowed = user_domain_config.get("allow", False) - if domain_allowed: - # User explicitly allows this domain - allowed_domains.append(domain) - continue - if not user_services: # Empty list means block all - domain_blocked = True - else: - domain_services = user_services - else: - domain_blocked = True # Non-dict means block all - - # Check role-specific permissions (medium priority) - elif domain in role_domains: - role_domain_config = role_domains[domain] - if isinstance(role_domain_config, dict): - role_services = role_domain_config.get("services", []) - domain_allowed = role_domain_config.get("allow", False) - if domain_allowed: - # Role explicitly allows this domain - allowed_domains.append(domain) - continue - if not role_services: # Empty list means block all - domain_blocked = True - else: - domain_services = role_services - else: - domain_blocked = True # Non-dict means block all - - # Check default restrictions (lowest priority) - elif domain in default_domains: - default_domain_config = default_domains[domain] - if isinstance(default_domain_config, dict): - default_services = default_domain_config.get("services", []) - domain_allowed = default_domain_config.get("allow", False) - if domain_allowed: - # Default explicitly allows this domain - allowed_domains.append(domain) - continue - if not default_services: # Empty list means block all - domain_blocked = True - else: - domain_services = default_services - else: - domain_blocked = True # Non-dict means block all - - # If no explicit configuration found, apply role's default behavior - else: - if not role_allows_by_default: - # Role denies by default, so block this domain - domain_blocked = True - # If role allows by default, don't block (domain_allowed remains False) - - if domain_blocked: - blocked_domains.append(domain) - elif domain_services: - # Add specific services to blocked services list - for service in domain_services: - blocked_services.append(f"{domain}.{service}") - - # Process entities - for entity in all_available_entities: - entity_blocked = False - entity_services = [] - entity_allowed = False - - # Check user-specific restrictions first (highest priority) - if entity in user_entities: - user_entity_config = user_entities[entity] - if isinstance(user_entity_config, dict): - user_services = user_entity_config.get("services", []) - entity_allowed = user_entity_config.get("allow", False) - if entity_allowed: - # User explicitly allows this entity - allowed_entities.append(entity) - continue - if not user_services: # Empty list means block all - entity_blocked = True - else: - entity_services = user_services - else: - entity_blocked = True # Non-dict means block all - - # Check role-specific permissions (medium priority) - elif entity in role_entities: - role_entity_config = role_entities[entity] - if isinstance(role_entity_config, dict): - role_services = role_entity_config.get("services", []) - entity_allowed = role_entity_config.get("allow", False) - if entity_allowed: - # Role explicitly allows this entity - allowed_entities.append(entity) - continue - if not role_services: # Empty list means block all - entity_blocked = True - else: - entity_services = role_services - else: - entity_blocked = True # Non-dict means block all - - # Check default restrictions (lowest priority) - elif entity in default_entities: - default_entity_config = default_entities[entity] - if isinstance(default_entity_config, dict): - default_services = default_entity_config.get("services", []) - entity_allowed = default_entity_config.get("allow", False) - if entity_allowed: - # Default explicitly allows this entity - allowed_entities.append(entity) - continue - if not default_services: # Empty list means block all - entity_blocked = True - else: - entity_services = default_services - else: - entity_blocked = True # Non-dict means block all + all_entities.append(state.entity_id) + + # Filter entities using the same logic as service calls + accessible_entities = [] + + for entity_id in all_entities: + domain = entity_id.split('.')[0] - # If no explicit configuration found, apply role's default behavior - else: - if not role_allows_by_default: - # Role denies by default, so block this entity - entity_blocked = True - # If role allows by default, don't block (entity_allowed remains False) + # Test access using the same function that checks service calls + has_access, reason = _check_service_access_with_reason( + domain=domain, + service="turn_on", + service_data={"entity_id": entity_id}, + user_id=target_user_id, + access_config=access_config, + hass=hass + ) - if entity_blocked: - blocked_entities.append(entity) - elif entity_services: - # Add specific services to blocked services list - for service in entity_services: - blocked_services.append(f"{entity}.{service}") + if has_access: + accessible_entities.append(entity_id) + + # Convert accessible entities to blocked/allowed format for frontend + blocked_entities = [e for e in all_entities if e not in accessible_entities] + allowed_entities = accessible_entities + blocked_domains = list(set([e.split('.')[0] for e in blocked_entities])) + allowed_domains = list(set([e.split('.')[0] for e in allowed_entities])) return self.json({ "enabled": True, "domains": blocked_domains, "entities": blocked_entities, - "services": blocked_services, + "services": [], "allowed_domains": allowed_domains, "allowed_entities": allowed_entities }) - except Exception as e: _LOGGER.error(f"Error getting frontend blocking config: {e}") return self.json({"error": str(e)}, status_code=500) diff --git a/custom_components/rbac/www/config.js b/custom_components/rbac/www/config.js index 6d5fb06..b70c5ed 100644 --- a/custom_components/rbac/www/config.js +++ b/custom_components/rbac/www/config.js @@ -1,8 +1,8 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var pc,St,Zx,Uo,CO,qx,Gx,Yx,iv,Dp,Bp,Ux,Al={},Kx=[],gR=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,mc=Array.isArray;function Di(t,e){for(var n in e)t[n]=e[n];return t}function ov(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function y(t,e,n){var r,i,o,a={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?pc.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]===void 0&&(a[o]=t.defaultProps[o]);return Ol(t,a,r,i,null)}function Ol(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Zx,__i:-1,__u:0};return i==null&&St.vnode!=null&&St.vnode(o),o}function av(){return{current:null}}function At(t){return t.children}function er(t,e){this.props=t,this.context=e}function fs(t,e){if(e==null)return t.__?fs(t.__,t.__i+1):null;for(var n;es&&Uo.sort(Gx),t=Uo.shift(),s=Uo.length,t.__d&&(n=void 0,r=void 0,i=(r=(e=t).__v).__e,o=[],a=[],e.__P&&((n=Di({},r)).__v=r.__v+1,St.vnode&&St.vnode(n),sv(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i??fs(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,nC(o,n,a),r.__e=r.__=null,n.__e!=i&&Jx(n)));cd.__r=0}function eC(t,e,n,r,i,o,a,s,l,c,u){var d,f,h,p,m,g,v,O=r&&r.__k||Kx,S=e.length;for(l=vR(n,e,O,l,S),d=0;d0?Ol(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,s=null,(c=a.__i=OR(a,n,l,d))!=-1&&(d--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(i>u?f--:il?f--:f++,a.__u|=4))):t.__k[o]=null;if(d)for(o=0;o(u?1:0)){for(i=n-1,o=n+1;i>=0||o=0?i--:o++])!=null&&!(2&c.__u)&&s==c.key&&l==c.type)return a}return-1}function $O(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||gR.test(e)?n:n+"px"}function Zc(t,e,n,r,i){var o,a;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||$O(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||$O(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Yx,"$1")),a=e.toLowerCase(),e=a in t||e=="onFocusOut"||e=="onFocusIn"?a.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=iv,t.addEventListener(e,o?Bp:Dp,o)):t.removeEventListener(e,o?Bp:Dp,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function wO(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=iv++;else if(e.t0?t:mc(t)?t.map(rC):Di({},t)}function bR(t,e,n,r,i,o,a,s,l){var c,u,d,f,h,p,m,g=n.props,v=e.props,O=e.type;if(O=="svg"?i="http://www.w3.org/2000/svg":O=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(c=0;c2&&(s.children=arguments.length>3?pc.call(arguments,2):n),Ol(t.type,s,r||t.key,i||t.ref,null)}function bt(t){function e(n){var r,i;return this.getChildContext||(r=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(a){a.__e=!0,Wp(a)})},this.sub=function(o){r.add(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),a&&a.call(o)}}),n.children}return e.__c="__cC"+Ux++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}pc=Kx.slice,St={__e:function(t,e,n,r){for(var i,o,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),a=i.__d),a)return i.__E=i}catch(s){t=s}throw t}},Zx=0,er.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Di({},this.state),typeof t=="function"&&(t=t(Di({},n),this.props)),t&&Di(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Wp(this))},er.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Wp(this))},er.prototype.render=At,Uo=[],qx=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gx=function(t,e){return t.__v.__b-e.__v.__b},cd.__r=0,Yx=/(PointerCapture)$|Capture$/i,iv=0,Dp=wO(!1),Bp=wO(!0),Ux=0;var xR=0;function A(t,e,n,r,i,o){e||(e={});var a,s,l=e;if("ref"in l)for(s in l={},e)s=="ref"?a=e[s]:l[s]=e[s];var c={type:t,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--xR,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(a=t.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return St.vnode&&St.vnode(c),c}var co,sn,mh,PO,ps=0,aC=[],$n=St,_O=$n.__b,TO=$n.__r,kO=$n.diffed,RO=$n.__c,IO=$n.unmount,MO=$n.__;function _a(t,e){$n.__h&&$n.__h(sn,t,ps||e),ps=0;var n=sn.__H||(sn.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function J(t){return ps=1,Ms(sC,t)}function Ms(t,e,n){var r=_a(co++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):sC(void 0,e),function(s){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,s);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=sn,!sn.__f)){var i=function(s,l,c){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(f){return!!f.__c});if(u.every(function(f){return!f.__N}))return!o||o.call(this,s,l,c);var d=r.__c.props!==s;return u.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(d=!0)}}),o&&o.call(this,s,l,c)||d};sn.__f=!0;var o=sn.shouldComponentUpdate,a=sn.componentWillUpdate;sn.componentWillUpdate=function(s,l,c){if(this.__e){var u=o;o=void 0,i(s,l,c),o=u}a&&a.call(this,s,l,c)},sn.shouldComponentUpdate=i}return r.__N||r.__}function be(t,e){var n=_a(co++,3);!$n.__s&&dv(n.__H,e)&&(n.__=t,n.u=e,sn.__H.__h.push(n))}function Ti(t,e){var n=_a(co++,4);!$n.__s&&dv(n.__H,e)&&(n.__=t,n.u=e,sn.__h.push(n))}function U(t){return ps=5,ge(function(){return{current:t}},[])}function Yt(t,e,n){ps=6,Ti(function(){if(typeof t=="function"){var r=t(e());return function(){t(null),r&&typeof r=="function"&&r()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function ge(t,e){var n=_a(co++,7);return dv(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ht(t,e){return ps=8,ge(function(){return t},e)}function fe(t){var e=sn.context[t.__c],n=_a(co++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(sn)),e.props.value):t.__}function cv(t,e){$n.useDebugValue&&$n.useDebugValue(e?e(t):t)}function CR(t){var e=_a(co++,10),n=J();return e.__=t,sn.componentDidCatch||(sn.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function uv(){var t=_a(co++,11);if(!t.__){for(var e=sn.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function $R(){for(var t;t=aC.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Au),t.__H.__h.forEach(Vp),t.__H.__h=[]}catch(e){t.__H.__h=[],$n.__e(e,t.__v)}}$n.__b=function(t){sn=null,_O&&_O(t)},$n.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),MO&&MO(t,e)},$n.__r=function(t){TO&&TO(t),co=0;var e=(sn=t.__c).__H;e&&(mh===sn?(e.__h=[],sn.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(Au),e.__h.forEach(Vp),e.__h=[],co=0)),mh=sn},$n.diffed=function(t){kO&&kO(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(aC.push(e)!==1&&PO===$n.requestAnimationFrame||((PO=$n.requestAnimationFrame)||wR)($R)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),mh=sn=null},$n.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Au),n.__h=n.__h.filter(function(r){return!r.__||Vp(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],$n.__e(r,n.__v)}}),RO&&RO(t,e)},$n.unmount=function(t){IO&&IO(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Au(r)}catch(i){e=i}}),n.__H=void 0,e&&$n.__e(e,n.__v))};var EO=typeof requestAnimationFrame=="function";function wR(t){var e,n=function(){clearTimeout(r),EO&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);EO&&(e=requestAnimationFrame(n))}function Au(t){var e=sn,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),sn=e}function Vp(t){var e=sn;t.__c=t.__(),sn=e}function dv(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function sC(t,e){return typeof e=="function"?e(t):e}function lC(t,e){for(var n in e)t[n]=e[n];return t}function Hp(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function fv(t,e){var n=e(),r=J({t:{__:n,u:e}}),i=r[0].t,o=r[1];return Ti(function(){i.__=n,i.u=e,gh(i)&&o({t:i})},[t,n,e]),be(function(){return gh(i)&&o({t:i}),t(function(){gh(i)&&o({t:i})})},[t]),n}function gh(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}function hv(t){t()}function pv(t){return t}function mv(){return[!1,hv]}var gv=Ti;function ud(t,e){this.props=t,this.context=e}function Ta(t,e){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!a:Hp(this.props,i)}function r(i){return this.shouldComponentUpdate=n,y(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}(ud.prototype=new er).isPureReactComponent=!0,ud.prototype.shouldComponentUpdate=function(t,e){return Hp(this.props,t)||Hp(this.state,e)};var AO=St.__b;St.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),AO&&AO(t)};var PR=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Se(t){function e(n){var r=lC({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=PR,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var QO=function(t,e){return t==null?null:ao(ao(t).map(e))},Ao={map:QO,forEach:QO,count:function(t){return t?ao(t).length:0},only:function(t){var e=ao(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:ao},_R=St.__e;St.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}_R(t,e,n,r)};var NO=St.unmount;function cC(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=lC({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return cC(r,e,n)})),t}function uC(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return uC(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function bl(){this.__u=0,this.o=null,this.__b=null}function dC(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function fC(t){var e,n,r;function i(o){if(e||(e=t()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw e;return y(n,o)}return i.displayName="Lazy",i.__f=!0,i}function qa(){this.i=null,this.l=null}St.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),NO&&NO(t)},(bl.prototype=new er).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=dC(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=uC(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},bl.prototype.componentWillUnmount=function(){this.o=[]},bl.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=cC(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&y(At,null,t.fallback);return i&&(i.__u&=-33),[y(At,null,e.__a?null:t.children),i]};var zO=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),e.h.removeChild(i)}}}hs(y(TR,{context:e.context},t.__v),e.v)}function lf(t,e){var n=y(kR,{__v:t,h:e});return n.containerInfo=e,n}(qa.prototype=new er).__a=function(t){var e=this,n=dC(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),zO(e,t,r)):i()};n?n(o):o()}},qa.prototype.render=function(t){this.i=null,this.l=new Map;var e=ao(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},qa.prototype.componentDidUpdate=qa.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){zO(t,n,e)})};var hC=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,RR=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,IR=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,MR=/[A-Z0-9]/g,ER=typeof document<"u",AR=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function pC(t,e,n){return e.__k==null&&(e.textContent=""),hs(t,e),typeof n=="function"&&n(),t?t.__c:null}function mC(t,e,n){return oC(t,e),typeof n=="function"&&n(),t?t.__c:null}er.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(er.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var LO=St.event;function QR(){}function NR(){return this.cancelBubble}function zR(){return this.defaultPrevented}St.event=function(t){return LO&&(t=LO(t)),t.persist=QR,t.isPropagationStopped=NR,t.isDefaultPrevented=zR,t.nativeEvent=t};var vv,LR={enumerable:!1,configurable:!0,get:function(){return this.class}},jO=St.vnode;St.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||ER&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||AR(n.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":IR.test(a)&&(a=l):l=a="oninput":o&&RR.test(a)?a=a.replace(MR,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[a=l]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=ao(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=ao(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",LR)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=hC,jO&&jO(t)};var DO=St.__r;St.__r=function(t){DO&&DO(t),vv=t.__c};var BO=St.diffed;St.diffed=function(t){BO&&BO(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),vv=null};var gC={ReactCurrentDispatcher:{current:{readContext:function(t){return vv.__n[t.__c].props.value},useCallback:Ht,useContext:fe,useDebugValue:cv,useDeferredValue:pv,useEffect:be,useId:uv,useImperativeHandle:Yt,useInsertionEffect:gv,useLayoutEffect:Ti,useMemo:ge,useReducer:Ms,useRef:U,useState:J,useSyncExternalStore:fv,useTransition:mv}}},vC="18.3.1";function OC(t){return y.bind(null,t)}function Kt(t){return!!t&&t.$$typeof===hC}function bC(t){return Kt(t)&&t.type===At}function yC(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Xn(t){return Kt(t)?SR.apply(null,arguments):t}function SC(t){return!!t.__k&&(hs(null,t),!0)}function xC(t){return t&&(t.base||t.nodeType===1&&t)||null}var Ov=function(t,e){return t(e)},Ql=function(t,e){return t(e)},CC=At,$C=Kt,oe={useState:J,useId:uv,useReducer:Ms,useEffect:be,useLayoutEffect:Ti,useInsertionEffect:gv,useTransition:mv,useDeferredValue:pv,useSyncExternalStore:fv,startTransition:hv,useRef:U,useImperativeHandle:Yt,useMemo:ge,useCallback:Ht,useContext:fe,useDebugValue:cv,version:"18.3.1",Children:Ao,render:pC,hydrate:mC,unmountComponentAtNode:SC,createPortal:lf,createElement:y,createContext:bt,createFactory:OC,cloneElement:Xn,createRef:av,Fragment:At,isValidElement:Kt,isElement:$C,isFragment:bC,isMemo:yC,findDOMNode:xC,Component:er,PureComponent:ud,memo:Ta,forwardRef:Se,flushSync:Ql,unstable_batchedUpdates:Ov,StrictMode:CC,Suspense:bl,SuspenseList:qa,lazy:fC,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:gC};const gc=Object.freeze(Object.defineProperty({__proto__:null,Children:Ao,Component:er,Fragment:At,PureComponent:ud,StrictMode:CC,Suspense:bl,SuspenseList:qa,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:gC,cloneElement:Xn,createContext:bt,createElement:y,createFactory:OC,createPortal:lf,createRef:av,default:oe,findDOMNode:xC,flushSync:Ql,forwardRef:Se,hydrate:mC,isElement:$C,isFragment:bC,isMemo:yC,isValidElement:Kt,lazy:fC,memo:Ta,render:pC,startTransition:hv,unmountComponentAtNode:SC,unstable_batchedUpdates:Ov,useCallback:Ht,useContext:fe,useDebugValue:cv,useDeferredValue:pv,useEffect:be,useErrorBoundary:CR,useId:uv,useImperativeHandle:Yt,useInsertionEffect:gv,useLayoutEffect:Ti,useMemo:ge,useReducer:Ms,useRef:U,useState:J,useSyncExternalStore:fv,useTransition:mv,version:vC},Symbol.toStringTag,{value:"Module"}));function wC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var PC={exports:{}};/*! +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var bc,Rt,l$,Jo,QO,c$,u$,d$,hv,Um,Ym,f$,jl={},h$=[],EI=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,yc=Array.isArray;function Wi(t,e){for(var n in e)t[n]=e[n];return t}function mv(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function b(t,e,n){var r,i,o,a={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?bc.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]===void 0&&(a[o]=t.defaultProps[o]);return xl(t,a,r,i,null)}function xl(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++l$,__i:-1,__u:0};return i==null&&Rt.vnode!=null&&Rt.vnode(o),o}function pv(){return{current:null}}function Qt(t){return t.children}function ir(t,e){this.props=t,this.context=e}function ps(t,e){if(e==null)return t.__?ps(t.__,t.__i+1):null;for(var n;es&&Jo.sort(u$),t=Jo.shift(),s=Jo.length,t.__d&&(n=void 0,r=void 0,i=(r=(e=t).__v).__e,o=[],a=[],e.__P&&((n=Wi({},r)).__v=r.__v+1,Rt.vnode&&Rt.vnode(n),gv(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i??ps(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,v$(o,n,a),r.__e=r.__=null,n.__e!=i&&m$(n)));vd.__r=0}function p$(t,e,n,r,i,o,a,s,l,c,u){var d,f,h,m,p,g,O,v=r&&r.__k||h$,y=e.length;for(l=kI(n,e,v,l,y),d=0;d0?xl(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,s=null,(c=a.__i=AI(a,n,l,d))!=-1&&(d--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(i>u?f--:il?f--:f++,a.__u|=4))):t.__k[o]=null;if(d)for(o=0;o(u?1:0)){for(i=n-1,o=n+1;i>=0||o=0?i--:o++])!=null&&!(2&c.__u)&&s==c.key&&l==c.type)return a}return-1}function NO(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||EI.test(e)?n:n+"px"}function eu(t,e,n,r,i){var o,a;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||NO(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||NO(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(d$,"$1")),a=e.toLowerCase(),e=a in t||e=="onFocusOut"||e=="onFocusIn"?a.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=hv,t.addEventListener(e,o?Ym:Um,o)):t.removeEventListener(e,o?Ym:Um,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function zO(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=hv++;else if(e.t0?t:yc(t)?t.map(O$):Wi({},t)}function QI(t,e,n,r,i,o,a,s,l){var c,u,d,f,h,m,p,g=n.props,O=e.props,v=e.type;if(v=="svg"?i="http://www.w3.org/2000/svg":v=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(c=0;c2&&(s.children=arguments.length>3?bc.call(arguments,2):n),xl(t.type,s,r||t.key,i||t.ref,null)}function Tt(t){function e(n){var r,i;return this.getChildContext||(r=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(a){a.__e=!0,Km(a)})},this.sub=function(o){r.add(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),a&&a.call(o)}}),n.children}return e.__c="__cC"+f$++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}bc=h$.slice,Rt={__e:function(t,e,n,r){for(var i,o,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),a=i.__d),a)return i.__E=i}catch(s){t=s}throw t}},l$=0,ir.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Wi({},this.state),typeof t=="function"&&(t=t(Wi({},n),this.props)),t&&Wi(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Km(this))},ir.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Km(this))},ir.prototype.render=Qt,Jo=[],c$=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u$=function(t,e){return t.__v.__b-e.__v.__b},vd.__r=0,d$=/(PointerCapture)$|Capture$/i,hv=0,Um=zO(!1),Ym=zO(!0),f$=0;var jI=0;function A(t,e,n,r,i,o){e||(e={});var a,s,l=e;if("ref"in l)for(s in l={},e)s=="ref"?a=e[s]:l[s]=e[s];var c={type:t,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--jI,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(a=t.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return Rt.vnode&&Rt.vnode(c),c}var fo,un,wh,jO,vs=0,S$=[],_n=Rt,LO=_n.__b,DO=_n.__r,BO=_n.diffed,WO=_n.__c,HO=_n.unmount,VO=_n.__;function Ia(t,e){_n.__h&&_n.__h(un,t,vs||e),vs=0;var n=un.__H||(un.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function te(t){return vs=1,Qs(x$,t)}function Qs(t,e,n){var r=Ia(fo++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):x$(void 0,e),function(s){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,s);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=un,!un.__f)){var i=function(s,l,c){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(f){return!!f.__c});if(u.every(function(f){return!f.__N}))return!o||o.call(this,s,l,c);var d=r.__c.props!==s;return u.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(d=!0)}}),o&&o.call(this,s,l,c)||d};un.__f=!0;var o=un.shouldComponentUpdate,a=un.componentWillUpdate;un.componentWillUpdate=function(s,l,c){if(this.__e){var u=o;o=void 0,i(s,l,c),o=u}a&&a.call(this,s,l,c)},un.shouldComponentUpdate=i}return r.__N||r.__}function ye(t,e){var n=Ia(fo++,3);!_n.__s&&yv(n.__H,e)&&(n.__=t,n.u=e,un.__H.__h.push(n))}function Ri(t,e){var n=Ia(fo++,4);!_n.__s&&yv(n.__H,e)&&(n.__=t,n.u=e,un.__h.push(n))}function ne(t){return vs=5,ve(function(){return{current:t}},[])}function Jt(t,e,n){vs=6,Ri(function(){if(typeof t=="function"){var r=t(e());return function(){t(null),r&&typeof r=="function"&&r()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function ve(t,e){var n=Ia(fo++,7);return yv(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ut(t,e){return vs=8,ve(function(){return t},e)}function he(t){var e=un.context[t.__c],n=Ia(fo++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(un)),e.props.value):t.__}function Ov(t,e){_n.useDebugValue&&_n.useDebugValue(e?e(t):t)}function LI(t){var e=Ia(fo++,10),n=te();return e.__=t,un.componentDidCatch||(un.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function bv(){var t=Ia(fo++,11);if(!t.__){for(var e=un.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function DI(){for(var t;t=S$.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Bu),t.__H.__h.forEach(ep),t.__H.__h=[]}catch(e){t.__H.__h=[],_n.__e(e,t.__v)}}_n.__b=function(t){un=null,LO&&LO(t)},_n.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),VO&&VO(t,e)},_n.__r=function(t){DO&&DO(t),fo=0;var e=(un=t.__c).__H;e&&(wh===un?(e.__h=[],un.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(Bu),e.__h.forEach(ep),e.__h=[],fo=0)),wh=un},_n.diffed=function(t){BO&&BO(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(S$.push(e)!==1&&jO===_n.requestAnimationFrame||((jO=_n.requestAnimationFrame)||BI)(DI)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),wh=un=null},_n.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Bu),n.__h=n.__h.filter(function(r){return!r.__||ep(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],_n.__e(r,n.__v)}}),WO&&WO(t,e)},_n.unmount=function(t){HO&&HO(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Bu(r)}catch(i){e=i}}),n.__H=void 0,e&&_n.__e(e,n.__v))};var FO=typeof requestAnimationFrame=="function";function BI(t){var e,n=function(){clearTimeout(r),FO&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);FO&&(e=requestAnimationFrame(n))}function Bu(t){var e=un,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),un=e}function ep(t){var e=un;t.__c=t.__(),un=e}function yv(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function x$(t,e){return typeof e=="function"?e(t):e}function $$(t,e){for(var n in e)t[n]=e[n];return t}function tp(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function Sv(t,e){var n=e(),r=te({t:{__:n,u:e}}),i=r[0].t,o=r[1];return Ri(function(){i.__=n,i.u=e,Ph(i)&&o({t:i})},[t,n,e]),ye(function(){return Ph(i)&&o({t:i}),t(function(){Ph(i)&&o({t:i})})},[t]),n}function Ph(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}function xv(t){t()}function $v(t){return t}function Cv(){return[!1,xv]}var wv=Ri;function Od(t,e){this.props=t,this.context=e}function Ma(t,e){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!a:tp(this.props,i)}function r(i){return this.shouldComponentUpdate=n,b(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}(Od.prototype=new ir).isPureReactComponent=!0,Od.prototype.shouldComponentUpdate=function(t,e){return tp(this.props,t)||tp(this.state,e)};var XO=Rt.__b;Rt.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),XO&&XO(t)};var WI=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Se(t){function e(n){var r=$$({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=WI,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var ZO=function(t,e){return t==null?null:so(so(t).map(e))},wi={map:ZO,forEach:ZO,count:function(t){return t?so(t).length:0},only:function(t){var e=so(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:so},HI=Rt.__e;Rt.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}HI(t,e,n,r)};var qO=Rt.unmount;function C$(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=$$({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return C$(r,e,n)})),t}function w$(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return w$(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function $l(){this.__u=0,this.o=null,this.__b=null}function P$(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function _$(t){var e,n,r;function i(o){if(e||(e=t()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw e;return b(n,o)}return i.displayName="Lazy",i.__f=!0,i}function Ka(){this.i=null,this.l=null}Rt.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),qO&&qO(t)},($l.prototype=new ir).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=P$(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=w$(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},$l.prototype.componentWillUnmount=function(){this.o=[]},$l.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=C$(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&b(Qt,null,t.fallback);return i&&(i.__u&=-33),[b(Qt,null,e.__a?null:t.children),i]};var GO=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),e.h.removeChild(i)}}}gs(b(VI,{context:e.context},t.__v),e.v)}function Of(t,e){var n=b(FI,{__v:t,h:e});return n.containerInfo=e,n}(Ka.prototype=new ir).__a=function(t){var e=this,n=P$(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),GO(e,t,r)):i()};n?n(o):o()}},Ka.prototype.render=function(t){this.i=null,this.l=new Map;var e=so(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Ka.prototype.componentDidUpdate=Ka.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){GO(t,n,e)})};var T$=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,XI=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ZI=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,qI=/[A-Z0-9]/g,GI=typeof document<"u",UI=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function R$(t,e,n){return e.__k==null&&(e.textContent=""),gs(t,e),typeof n=="function"&&n(),t?t.__c:null}function I$(t,e,n){return y$(t,e),typeof n=="function"&&n(),t?t.__c:null}ir.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(ir.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var UO=Rt.event;function YI(){}function KI(){return this.cancelBubble}function JI(){return this.defaultPrevented}Rt.event=function(t){return UO&&(t=UO(t)),t.persist=YI,t.isPropagationStopped=KI,t.isDefaultPrevented=JI,t.nativeEvent=t};var Pv,eM={enumerable:!1,configurable:!0,get:function(){return this.class}},YO=Rt.vnode;Rt.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||GI&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||UI(n.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":ZI.test(a)&&(a=l):l=a="oninput":o&&XI.test(a)?a=a.replace(qI,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[a=l]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=so(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=so(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",eM)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=T$,YO&&YO(t)};var KO=Rt.__r;Rt.__r=function(t){KO&&KO(t),Pv=t.__c};var JO=Rt.diffed;Rt.diffed=function(t){JO&&JO(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Pv=null};var M$={ReactCurrentDispatcher:{current:{readContext:function(t){return Pv.__n[t.__c].props.value},useCallback:Ut,useContext:he,useDebugValue:Ov,useDeferredValue:$v,useEffect:ye,useId:bv,useImperativeHandle:Jt,useInsertionEffect:wv,useLayoutEffect:Ri,useMemo:ve,useReducer:Qs,useRef:ne,useState:te,useSyncExternalStore:Sv,useTransition:Cv}}},E$="18.3.1";function k$(t){return b.bind(null,t)}function en(t){return!!t&&t.$$typeof===T$}function A$(t){return en(t)&&t.type===Qt}function Q$(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Un(t){return en(t)?zI.apply(null,arguments):t}function N$(t){return!!t.__k&&(gs(null,t),!0)}function z$(t){return t&&(t.base||t.nodeType===1&&t)||null}var _v=function(t,e){return t(e)},Ll=function(t,e){return t(e)},j$=Qt,L$=en,K={useState:te,useId:bv,useReducer:Qs,useEffect:ye,useLayoutEffect:Ri,useInsertionEffect:wv,useTransition:Cv,useDeferredValue:$v,useSyncExternalStore:Sv,startTransition:xv,useRef:ne,useImperativeHandle:Jt,useMemo:ve,useCallback:Ut,useContext:he,useDebugValue:Ov,version:"18.3.1",Children:wi,render:R$,hydrate:I$,unmountComponentAtNode:N$,createPortal:Of,createElement:b,createContext:Tt,createFactory:k$,cloneElement:Un,createRef:pv,Fragment:Qt,isValidElement:en,isElement:L$,isFragment:A$,isMemo:Q$,findDOMNode:z$,Component:ir,PureComponent:Od,memo:Ma,forwardRef:Se,flushSync:Ll,unstable_batchedUpdates:_v,StrictMode:j$,Suspense:$l,SuspenseList:Ka,lazy:_$,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:M$};const Sc=Object.freeze(Object.defineProperty({__proto__:null,Children:wi,Component:ir,Fragment:Qt,PureComponent:Od,StrictMode:j$,Suspense:$l,SuspenseList:Ka,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:M$,cloneElement:Un,createContext:Tt,createElement:b,createFactory:k$,createPortal:Of,createRef:pv,default:K,findDOMNode:z$,flushSync:Ll,forwardRef:Se,hydrate:I$,isElement:L$,isFragment:A$,isMemo:Q$,isValidElement:en,lazy:_$,memo:Ma,render:R$,startTransition:xv,unmountComponentAtNode:N$,unstable_batchedUpdates:_v,useCallback:Ut,useContext:he,useDebugValue:Ov,useDeferredValue:$v,useEffect:ye,useErrorBoundary:LI,useId:bv,useImperativeHandle:Jt,useInsertionEffect:wv,useLayoutEffect:Ri,useMemo:ve,useReducer:Qs,useRef:ne,useState:te,useSyncExternalStore:Sv,useTransition:Cv,version:E$},Symbol.toStringTag,{value:"Module"}));function D$(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var B$={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",a=0;a1&&arguments[1]!==void 0?arguments[1]:{},n=[];return oe.Children.forEach(t,function(r){r==null&&!e.keepEmpty||(Array.isArray(r)?n=n.concat(nr(r)):_C(r)&&r.props?n=n.concat(nr(r.props.children,e)):n.push(r))}),n}var Xp={},FR=function(e){};function VR(t,e){}function HR(t,e){}function XR(){Xp={}}function TC(t,e,n){!e&&!Xp[n]&&(t(!1,n),Xp[n]=!0)}function tr(t,e){TC(VR,t,e)}function ZR(t,e){TC(HR,t,e)}tr.preMessage=FR;tr.resetWarned=XR;tr.noteOnce=ZR;function qR(t,e){if(Je(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Je(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kC(t){var e=qR(t,"string");return Je(e)=="symbol"?e:e+""}function D(t,e,n){return(e=kC(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function WO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function W(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{},n=[];return K.Children.forEach(t,function(r){r==null&&!e.keepEmpty||(Array.isArray(r)?n=n.concat(sr(r)):W$(r)&&r.props?n=n.concat(sr(r.props.children,e)):n.push(r))}),n}var np={},oM=function(e){};function aM(t,e){}function sM(t,e){}function lM(){np={}}function H$(t,e,n){!e&&!np[n]&&(t(!1,n),np[n]=!0)}function or(t,e){H$(aM,t,e)}function cM(t,e){H$(sM,t,e)}or.preMessage=oM;or.resetWarned=lM;or.noteOnce=cM;function uM(t,e){if(nt(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(nt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function V$(t){var e=uM(t,"string");return nt(e)=="symbol"?e:e+""}function W(t,e,n){return(e=V$(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function eb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Z(t){for(var e=1;e=19)return!0;var i=vh.isMemo(e)?e.type.type:e.type;return!(typeof i=="function"&&!((n=i.prototype)!==null&&n!==void 0&&n.render)&&i.$$typeof!==vh.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==vh.ForwardRef)};function xv(t){return Kt(t)&&!_C(t)}var KR=function(e){return xv(e)&&vo(e)},Ho=function(e){if(e&&xv(e)){var n=e;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},Zp=bt(null);function JR(t){var e=t.children,n=t.onBatchResize,r=U(0),i=U([]),o=fe(Zp),a=Ht(function(s,l,c){r.current+=1;var u=r.current;i.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(s,l,c)},[n,o]);return y(Zp.Provider,{value:a},e)}var EC=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i0},t.prototype.connect_=function(){!qp||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),oI?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!qp||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=iI.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),AC=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof ms(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new pI(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ms(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new mI(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),NC=typeof WeakMap<"u"?new WeakMap:new EC,zC=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=aI.getInstance(),r=new gI(e,n,this);NC.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){zC.prototype[t]=function(){var e;return(e=NC.get(this))[t].apply(e,arguments)}});var vI=function(){return typeof dd.ResizeObserver<"u"?dd.ResizeObserver:zC}(),_o=new Map;function OI(t){t.forEach(function(e){var n,r=e.target;(n=_o.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var LC=new vI(OI);function bI(t,e){_o.has(t)||(_o.set(t,new Set),LC.observe(t)),_o.get(t).add(e)}function yI(t,e){_o.has(t)&&(_o.get(t).delete(e),_o.get(t).size||(LC.unobserve(t),_o.delete(t)))}function Mn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function VO(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&arguments[1]!==void 0?arguments[1]:1;HO+=1;var r=HO;function i(o){if(o===0)FC(r),e();else{var a=BC(function(){i(o-1)});$v.set(r,a)}}return i(n),r};Xt.cancel=function(t){var e=$v.get(t);return FC(t),WC(e)};function VC(t){if(Array.isArray(t))return t}function TI(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function HC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ae(t,e){return VC(t)||TI(t,e)||Cv(t,e)||HC()}function Ll(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}function dr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Yp(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1}var XO="data-rc-order",ZO="data-rc-priority",kI="rc-util-key",Up=new Map;function XC(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):kI}function Sf(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function RI(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function wv(t){return Array.from((Up.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function ZC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!dr())return null;var n=e.csp,r=e.prepend,i=e.priority,o=i===void 0?0:i,a=RI(r),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(XO,a),s&&o&&l.setAttribute(ZO,"".concat(o)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=t;var c=Sf(e),u=c.firstChild;if(r){if(s){var d=(e.styles||wv(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(XO)))return!1;var h=Number(f.getAttribute(ZO)||0);return o>=h});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function qC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Sf(e);return(e.styles||wv(n)).find(function(r){return r.getAttribute(XC(e))===t})}function jl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=qC(t,e);if(n){var r=Sf(e);r.removeChild(n)}}function II(t,e){var n=Up.get(t);if(!n||!Yp(document,n)){var r=ZC("",e),i=r.parentNode;Up.set(t,i),t.removeChild(r)}}function so(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Sf(n),i=wv(r),o=W(W({},n),{},{styles:i});II(r,o);var a=qC(e,o);if(a){var s,l;if((s=o.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((l=o.csp)===null||l===void 0?void 0:l.nonce)){var c;a.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return a.innerHTML!==t&&(a.innerHTML=t),a}var u=ZC(t,o);return u.setAttribute(XC(o),e),u}function GC(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function ut(t,e){if(t==null)return{};var n,r,i=GC(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(o,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(o);if(tr(!l,"Warning: There may be circular references"),l)return!1;if(o===a)return!0;if(n&&s>1)return!1;r.add(o);var c=s+1;if(Array.isArray(o)){if(!Array.isArray(a)||o.length!==a.length)return!1;for(var u=0;u1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return n.forEach(function(s){if(!a)a=void 0;else{var l;a=(l=a)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(s)}}),(r=a)!==null&&r!==void 0&&r.value&&o&&(a.value[1]=this.cacheCallTimes++),(i=a)===null||i===void 0?void 0:i.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var i=this;if(!this.has(n)){if(this.size()+1>t.MAX_CACHE_SIZE+t.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(c,u){var d=ae(c,2),f=d[1];return i.internalGet(u)[1]0,void 0),qO+=1}return En(t,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,i){return i(n,r)},void 0)}}]),t}(),Oh=new Pv;function Jp(t){var e=Array.isArray(t)?t:[t];return Oh.has(e)||Oh.set(e,new YC(e)),Oh.get(e)}var NI=new WeakMap,bh={};function zI(t,e){for(var n=NI,r=0;r3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return t;var o=W(W({},r),{},D(D({},gs,e),Si,n)),a=Object.keys(o).map(function(s){var l=o[s];return l?"".concat(s,'="').concat(l,'"'):null}).filter(function(s){return s}).join(" ");return"")}var Nu=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},LI=function(e,n,r){return Object.keys(e).length?".".concat(n).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(e).map(function(i){var o=ae(i,2),a=o[0],s=o[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},UC=function(e,n,r){var i={},o={};return Object.entries(e).forEach(function(a){var s,l,c=ae(a,2),u=c[0],d=c[1];if(r!=null&&(s=r.preserve)!==null&&s!==void 0&&s[u])o[u]=d;else if((typeof d=="string"||typeof d=="number")&&!(r!=null&&(l=r.ignore)!==null&&l!==void 0&&l[u])){var f,h=Nu(u,r==null?void 0:r.prefix);i[h]=typeof d=="number"&&!(r!=null&&(f=r.unitless)!==null&&f!==void 0&&f[u])?"".concat(d,"px"):String(d),o[u]="var(".concat(h,")")}}),[o,LI(i,n,{scope:r==null?void 0:r.scope})]},UO=dr()?Ti:be,Nt=function(e,n){var r=U(!0);UO(function(){return e(r.current)},n),UO(function(){return r.current=!1,function(){r.current=!0}},[])},tm=function(e,n){Nt(function(r){if(!r)return e()},n)},jI=W({},gc),KO=jI.useInsertionEffect,DI=function(e,n,r){ge(e,r),Nt(function(){return n(!0)},r)},BI=KO?function(t,e,n){return KO(function(){return t(),e()},n)}:DI,WI=W({},gc),FI=WI.useInsertionEffect,VI=function(e){var n=[],r=!1;function i(o){r||n.push(o)}return be(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(o){return o()})}},e),i},HI=function(){return function(e){e()}},XI=typeof FI<"u"?VI:HI;function _v(t,e,n,r,i){var o=fe(Oc),a=o.cache,s=[t].concat($e(e)),l=Kp(s),c=XI([l]),u=function(p){a.opUpdate(l,function(m){var g=m||[void 0,void 0],v=ae(g,2),O=v[0],S=O===void 0?0:O,x=v[1],b=x,C=b||n(),$=[S,C];return p?p($):$})};ge(function(){u()},[l]);var d=a.opGet(l),f=d[1];return BI(function(){i==null||i(f)},function(h){return u(function(p){var m=ae(p,2),g=m[0],v=m[1];return h&&g===0&&(i==null||i(f)),[g+1,v]}),function(){a.opUpdate(l,function(p){var m=p||[],g=ae(m,2),v=g[0],O=v===void 0?0:v,S=g[1],x=O-1;return x===0?(c(function(){(h||!a.opGet(l))&&(r==null||r(S,!1))}),null):[O-1,S]})}},[l]),f}var ZI={},qI="css",Ko=new Map;function GI(t){Ko.set(t,(Ko.get(t)||0)+1)}function YI(t,e){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(gs,'="').concat(t,'"]'));n.forEach(function(r){if(r[To]===e){var i;(i=r.parentNode)===null||i===void 0||i.removeChild(r)}})}}var UI=0;function KI(t,e){Ko.set(t,(Ko.get(t)||0)-1);var n=new Set;Ko.forEach(function(r,i){r<=0&&n.add(i)}),Ko.size-n.size>UI&&n.forEach(function(r){YI(r,e),Ko.delete(r)})}var JI=function(e,n,r,i){var o=r.getDerivativeToken(e),a=W(W({},o),n);return i&&(a=i(a)),a},KC="token";function eM(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=fe(Oc),i=r.cache.instanceId,o=r.container,a=n.salt,s=a===void 0?"":a,l=n.override,c=l===void 0?ZI:l,u=n.formatToken,d=n.getComputedToken,f=n.cssVar,h=zI(function(){return Object.assign.apply(Object,[{}].concat($e(e)))},e),p=yl(h),m=yl(c),g=f?yl(f):"",v=_v(KC,[s,t.id,p,m,g],function(){var O,S=d?d(h,c,t):JI(h,c,t,u),x=W({},S),b="";if(f){var C=UC(S,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),$=ae(C,2);S=$[0],b=$[1]}var w=YO(S,s);S._tokenKey=w,x._tokenKey=YO(x,s);var P=(O=f==null?void 0:f.key)!==null&&O!==void 0?O:w;S._themeKey=P,GI(P);var _="".concat(qI,"-").concat(Ll(w));return S._hashId=_,[S,_,x,b,(f==null?void 0:f.key)||""]},function(O){KI(O[0]._themeKey,i)},function(O){var S=ae(O,4),x=S[0],b=S[3];if(f&&b){var C=so(b,Ll("css-variables-".concat(x._themeKey)),{mark:Si,prepend:"queue",attachTo:o,priority:-999});C[To]=i,C.setAttribute(gs,x._themeKey)}});return v}var tM=function(e,n,r){var i=ae(e,5),o=i[2],a=i[3],s=i[4],l=r||{},c=l.plain;if(!a)return null;var u=o._tokenKey,d=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(d)},h=hd(a,s,u,f,c);return[d,u,h]},nM={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},JC="comm",e$="rule",t$="decl",rM="@import",iM="@namespace",oM="@keyframes",aM="@layer",n$=Math.abs,Tv=String.fromCharCode;function r$(t){return t.trim()}function zu(t,e,n){return t.replace(e,n)}function sM(t,e,n){return t.indexOf(e,n)}function rs(t,e){return t.charCodeAt(e)|0}function vs(t,e,n){return t.slice(e,n)}function Ni(t){return t.length}function lM(t){return t.length}function qc(t,e){return e.push(t),t}var xf=1,Os=1,i$=0,di=0,Qn=0,Es="";function kv(t,e,n,r,i,o,a,s){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:xf,column:Os,length:a,return:"",siblings:s}}function cM(){return Qn}function uM(){return Qn=di>0?rs(Es,--di):0,Os--,Qn===10&&(Os=1,xf--),Qn}function xi(){return Qn=di2||Bl(Qn)>3?"":" "}function pM(t,e){for(;--e&&xi()&&!(Qn<48||Qn>102||Qn>57&&Qn<65||Qn>70&&Qn<97););return Cf(t,Lu()+(e<6&&ko()==32&&xi()==32))}function nm(t){for(;xi();)switch(Qn){case t:return di;case 34:case 39:t!==34&&t!==39&&nm(Qn);break;case 40:t===41&&nm(t);break;case 92:xi();break}return di}function mM(t,e){for(;xi()&&t+Qn!==57;)if(t+Qn===84&&ko()===47)break;return"/*"+Cf(e,di-1)+"*"+Tv(t===47?t:xi())}function gM(t){for(;!Bl(ko());)xi();return Cf(t,di)}function vM(t){return fM(ju("",null,null,null,[""],t=dM(t),0,[0],t))}function ju(t,e,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,m=1,g=1,v=1,O=0,S="",x=i,b=o,C=r,$=S;g;)switch(p=O,O=xi()){case 40:if(p!=108&&rs($,d-1)==58){sM($+=zu(yh(O),"&","&\f"),"&\f",n$(c?s[c-1]:0))!=-1&&(v=-1);break}case 34:case 39:case 91:$+=yh(O);break;case 9:case 10:case 13:case 32:$+=hM(p);break;case 92:$+=pM(Lu()-1,7);continue;case 47:switch(ko()){case 42:case 47:qc(OM(mM(xi(),Lu()),e,n,l),l),(Bl(p||1)==5||Bl(ko()||1)==5)&&Ni($)&&vs($,-1,void 0)!==" "&&($+=" ");break;default:$+="/"}break;case 123*m:s[c++]=Ni($)*v;case 125*m:case 59:case 0:switch(O){case 0:case 125:g=0;case 59+u:v==-1&&($=zu($,/\f/g,"")),h>0&&(Ni($)-d||m===0&&p===47)&&qc(h>32?eb($+";",r,n,d-1,l):eb(zu($," ","")+";",r,n,d-2,l),l);break;case 59:$+=";";default:if(qc(C=JO($,e,n,c,u,i,s,S,x=[],b=[],d,o),o),O===123)if(u===0)ju($,e,C,C,x,o,d,s,b);else{switch(f){case 99:if(rs($,3)===110)break;case 108:if(rs($,2)===97)break;default:u=0;case 100:case 109:case 115:}u?ju(t,C,C,r&&qc(JO(t,C,C,0,0,i,s,S,i,x=[],d,b),b),i,b,d,s,r?x:b):ju($,C,C,C,[""],b,0,s,b)}}c=u=h=0,m=v=1,S=$="",d=a;break;case 58:d=1+Ni($),h=p;default:if(m<1){if(O==123)--m;else if(O==125&&m++==0&&uM()==125)continue}switch($+=Tv(O),O*m){case 38:v=u>0?1:($+="\f",-1);break;case 44:s[c++]=(Ni($)-1)*v,v=1;break;case 64:ko()===45&&($+=yh(xi())),f=ko(),u=d=Ni(S=$+=gM(Lu())),O++;break;case 45:p===45&&Ni($)==2&&(m=0)}}return o}function JO(t,e,n,r,i,o,a,s,l,c,u,d){for(var f=i-1,h=i===0?o:[""],p=lM(h),m=0,g=0,v=0;m0?h[O]+" "+S:zu(S,/&\f/g,h[O])))&&(l[v++]=x);return kv(t,e,n,i===0?e$:s,l,c,u,d)}function OM(t,e,n,r){return kv(t,e,n,JC,Tv(cM()),vs(t,2,-2),0,r)}function eb(t,e,n,r,i){return kv(t,e,n,t$,vs(t,0,r),vs(t,r+1,-1),r,i)}function rm(t,e){for(var n="",r=0;r1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=r.root,o=r.injectHash,a=r.parentSelectors,s=n.hashId,l=n.layer;n.path;var c=n.hashPriority,u=n.transformers,d=u===void 0?[]:u;n.linters;var f="",h={};function p(v){var O=v.getName(s);if(!h[O]){var S=t(v.style,n,{root:!1,parentSelectors:a}),x=ae(S,1),b=x[0];h[O]="@keyframes ".concat(v.getName(s)).concat(b)}}function m(v){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return v.forEach(function(S){Array.isArray(S)?m(S,O):S&&O.push(S)}),O}var g=m(Array.isArray(e)?e:[e]);return g.forEach(function(v){var O=typeof v=="string"&&!i?{}:v;if(typeof O=="string")f+="".concat(O,` -`);else if(O._keyframe)p(O);else{var S=d.reduce(function(x,b){var C;return(b==null||(C=b.visit)===null||C===void 0?void 0:C.call(b,x))||x},O);Object.keys(S).forEach(function(x){var b=S[x];if(Je(b)==="object"&&b&&(x!=="animationName"||!b._keyframe)&&!$M(b)){var C=!1,$=x.trim(),w=!1;(i||o)&&s?$.startsWith("@")?C=!0:$==="&"?$=nb("",s,c):$=nb(x,s,c):i&&!s&&($==="&"||$==="")&&($="",w=!0);var P=t(b,n,{root:w,injectHash:C,parentSelectors:[].concat($e(a),[$])}),_=ae(P,2),T=_[0],R=_[1];h=W(W({},h),R),f+="".concat($).concat(T)}else{let Q=function(M,E){var N=M.replace(/[A-Z]/g,function(L){return"-".concat(L.toLowerCase())}),z=E;!nM[M]&&typeof z=="number"&&z!==0&&(z="".concat(z,"px")),M==="animationName"&&E!==null&&E!==void 0&&E._keyframe&&(p(E),z=E.getName(s)),f+="".concat(N,":").concat(z,";")};var k,I=(k=b==null?void 0:b.value)!==null&&k!==void 0?k:b;Je(b)==="object"&&b!==null&&b!==void 0&&b[s$]&&Array.isArray(I)?I.forEach(function(M){Q(x,M)}):Q(x,I)}})}}),i?l&&(f&&(f="@layer ".concat(l.name," {").concat(f,"}")),l.dependencies&&(h["@layer ".concat(l.name)]=l.dependencies.map(function(v){return"@layer ".concat(v,", ").concat(l.name,";")}).join(` -`))):f="{".concat(f,"}"),[f,h]};function l$(t,e){return Ll("".concat(t.join("%")).concat(e))}function PM(){return null}var c$="style";function im(t,e){var n=t.token,r=t.path,i=t.hashId,o=t.layer,a=t.nonce,s=t.clientOnly,l=t.order,c=l===void 0?0:l,u=fe(Oc),d=u.autoClear;u.mock;var f=u.defaultCache,h=u.hashPriority,p=u.container,m=u.ssrInline,g=u.transformers,v=u.linters,O=u.cache,S=u.layer,x=n._tokenKey,b=[x];S&&b.push("layer"),b.push.apply(b,$e(r));var C=em,$=_v(c$,b,function(){var R=b.join("|");if(SM(R)){var k=xM(R),I=ae(k,2),Q=I[0],M=I[1];if(Q)return[Q,x,M,{},s,c]}var E=e(),N=wM(E,{hashId:i,hashPriority:h,layer:S?o:void 0,path:r.join("-"),transformers:g,linters:v}),z=ae(N,2),L=z[0],F=z[1],H=Du(L),V=l$(b,H);return[H,x,V,F,s,c]},function(R,k){var I=ae(R,3),Q=I[2];(k||d)&&em&&jl(Q,{mark:Si,attachTo:p})},function(R){var k=ae(R,4),I=k[0];k[1];var Q=k[2],M=k[3];if(C&&I!==o$){var E={mark:Si,prepend:S?!1:"queue",attachTo:p,priority:c},N=typeof a=="function"?a():a;N&&(E.csp={nonce:N});var z=[],L=[];Object.keys(M).forEach(function(H){H.startsWith("@layer")?z.push(H):L.push(H)}),z.forEach(function(H){so(Du(M[H]),"_layer-".concat(H),W(W({},E),{},{prepend:!0}))});var F=so(I,Q,E);F[To]=O.instanceId,F.setAttribute(gs,x),L.forEach(function(H){so(Du(M[H]),"_effect-".concat(H),E)})}}),w=ae($,3),P=w[0],_=w[1],T=w[2];return function(R){var k;return!m||C||!f?k=y(PM,null):k=y("style",Ce({},D(D({},gs,_),Si,T),{dangerouslySetInnerHTML:{__html:P}})),y(At,null,k,R)}}var _M=function(e,n,r){var i=ae(e,6),o=i[0],a=i[1],s=i[2],l=i[3],c=i[4],u=i[5],d=r||{},f=d.plain;if(c)return null;var h=o,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return h=hd(o,a,s,p,f),l&&Object.keys(l).forEach(function(m){if(!n[m]){n[m]=!0;var g=Du(l[m]),v=hd(g,a,"_effect-".concat(m),p,f);m.startsWith("@layer")?h=v+h:h+=v}}),[u,s,h]},u$="cssVar",TM=function(e,n){var r=e.key,i=e.prefix,o=e.unitless,a=e.ignore,s=e.token,l=e.scope,c=l===void 0?"":l,u=fe(Oc),d=u.cache.instanceId,f=u.container,h=s._tokenKey,p=[].concat($e(e.path),[r,c,h]),m=_v(u$,p,function(){var g=n(),v=UC(g,r,{prefix:i,unitless:o,ignore:a,scope:c}),O=ae(v,2),S=O[0],x=O[1],b=l$(p,x);return[S,x,b,r]},function(g){var v=ae(g,3),O=v[2];em&&jl(O,{mark:Si,attachTo:f})},function(g){var v=ae(g,3),O=v[1],S=v[2];if(O){var x=so(O,S,{mark:Si,prepend:"queue",attachTo:f,priority:-999});x[To]=d,x.setAttribute(gs,r)}});return m},kM=function(e,n,r){var i=ae(e,4),o=i[1],a=i[2],s=i[3],l=r||{},c=l.plain;if(!o)return null;var u=-999,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},f=hd(o,s,a,d,c);return[u,a,f]};D(D(D({},c$,_M),KC,tM),u$,kM);var _t=function(){function t(e,n){Mn(this,t),D(this,"name",void 0),D(this,"style",void 0),D(this,"_keyframe",!0),this.name=e,this.style=n}return En(t,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),t}();function Ea(t){return t.notSplit=!0,t}Ea(["borderTop","borderBottom"]),Ea(["borderTop"]),Ea(["borderBottom"]),Ea(["borderLeft","borderRight"]),Ea(["borderLeft"]),Ea(["borderRight"]);var Rv=bt({});function d$(t){return VC(t)||DC(t)||Cv(t)||HC()}function si(t,e){for(var n=t,r=0;r3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&r&&n===void 0&&!si(t,e.slice(0,-1))?t:f$(t,e,n,r)}function RM(t){return Je(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function rb(t){return Array.isArray(t)?[]:{}}var IM=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Ga(){for(var t=arguments.length,e=new Array(t),n=0;n{const t=()=>{};return t.deprecated=MM,t},h$=bt(void 0);var AM={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},QM={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},NM=W(W({},QM),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const p$={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},ib={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},NM),timePickerLocale:Object.assign({},p$)},Wr="${label} is not a valid ${type}",Zi={locale:"en",Pagination:AM,DatePicker:ib,TimePicker:p$,Calendar:ib,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Wr,method:Wr,array:Wr,object:Wr,number:Wr,date:Wr,boolean:Wr,integer:Wr,float:Wr,regexp:Wr,email:Wr,url:Wr,hex:Wr},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let Bu=Object.assign({},Zi.Modal),Wu=[];const ob=()=>Wu.reduce((t,e)=>Object.assign(Object.assign({},t),e),Zi.Modal);function zM(t){if(t){const e=Object.assign({},t);return Wu.push(e),Bu=ob(),()=>{Wu=Wu.filter(n=>n!==e),Bu=ob()}}Bu=Object.assign({},Zi.Modal)}function m$(){return Bu}const Iv=bt(void 0),Ki=(t,e)=>{const n=fe(Iv),r=ge(()=>{var o;const a=e||Zi[t],s=(o=n==null?void 0:n[t])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[t,e,n]),i=ge(()=>{const o=n==null?void 0:n.locale;return n!=null&&n.exist&&!o?Zi.locale:o},[n]);return[r,i]},LM="internalMark",jM=t=>{const{locale:e={},children:n,_ANT_MARK__:r}=t;be(()=>zM(e==null?void 0:e.Modal),[e]);const i=ge(()=>Object.assign(Object.assign({},e),{exist:!0}),[e]);return y(Iv.Provider,{value:i},n)},Mv={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Wl=Object.assign(Object.assign({},Mv),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, + */var Tv=Symbol.for("react.element"),Rv=Symbol.for("react.portal"),bf=Symbol.for("react.fragment"),yf=Symbol.for("react.strict_mode"),Sf=Symbol.for("react.profiler"),xf=Symbol.for("react.provider"),$f=Symbol.for("react.context"),dM=Symbol.for("react.server_context"),Cf=Symbol.for("react.forward_ref"),wf=Symbol.for("react.suspense"),Pf=Symbol.for("react.suspense_list"),_f=Symbol.for("react.memo"),Tf=Symbol.for("react.lazy"),fM=Symbol.for("react.offscreen"),Z$;Z$=Symbol.for("react.module.reference");function gi(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case Tv:switch(t=t.type,t){case bf:case Sf:case yf:case wf:case Pf:return t;default:switch(t=t&&t.$$typeof,t){case dM:case $f:case Cf:case Tf:case _f:case xf:return t;default:return e}}case Rv:return e}}}tn.ContextConsumer=$f;tn.ContextProvider=xf;tn.Element=Tv;tn.ForwardRef=Cf;tn.Fragment=bf;tn.Lazy=Tf;tn.Memo=_f;tn.Portal=Rv;tn.Profiler=Sf;tn.StrictMode=yf;tn.Suspense=wf;tn.SuspenseList=Pf;tn.isAsyncMode=function(){return!1};tn.isConcurrentMode=function(){return!1};tn.isContextConsumer=function(t){return gi(t)===$f};tn.isContextProvider=function(t){return gi(t)===xf};tn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===Tv};tn.isForwardRef=function(t){return gi(t)===Cf};tn.isFragment=function(t){return gi(t)===bf};tn.isLazy=function(t){return gi(t)===Tf};tn.isMemo=function(t){return gi(t)===_f};tn.isPortal=function(t){return gi(t)===Rv};tn.isProfiler=function(t){return gi(t)===Sf};tn.isStrictMode=function(t){return gi(t)===yf};tn.isSuspense=function(t){return gi(t)===wf};tn.isSuspenseList=function(t){return gi(t)===Pf};tn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===bf||t===Sf||t===yf||t===wf||t===Pf||t===fM||typeof t=="object"&&t!==null&&(t.$$typeof===Tf||t.$$typeof===_f||t.$$typeof===xf||t.$$typeof===$f||t.$$typeof===Cf||t.$$typeof===Z$||t.getModuleId!==void 0)};tn.typeOf=gi;X$.exports=tn;var _h=X$.exports;function xc(t,e,n){var r=ne({});return(!("value"in r.current)||n(r.current.condition,e))&&(r.current.value=t(),r.current.condition=e),r.current.value}var hM=Number(E$.split(".")[0]),Iv=function(e,n){typeof e=="function"?e(n):nt(e)==="object"&&e&&"current"in e&&(e.current=n)},vr=function(){for(var e=arguments.length,n=new Array(e),r=0;r=19)return!0;var i=_h.isMemo(e)?e.type.type:e.type;return!(typeof i=="function"&&!((n=i.prototype)!==null&&n!==void 0&&n.render)&&i.$$typeof!==_h.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==_h.ForwardRef)};function Mv(t){return en(t)&&!W$(t)}var mM=function(e){return Mv(e)&&bo(e)},Xo=function(e){if(e&&Mv(e)){var n=e;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},rp=Tt(null);function pM(t){var e=t.children,n=t.onBatchResize,r=ne(0),i=ne([]),o=he(rp),a=Ut(function(s,l,c){r.current+=1;var u=r.current;i.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(s,l,c)},[n,o]);return b(rp.Provider,{value:a},e)}var q$=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i0},t.prototype.connect_=function(){!ip||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),SM?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!ip||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=yM.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),G$=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof Os(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new IM(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Os(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new MM(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Y$=typeof WeakMap<"u"?new WeakMap:new q$,K$=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=xM.getInstance(),r=new EM(e,n,this);Y$.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){K$.prototype[t]=function(){var e;return(e=Y$.get(this))[t].apply(e,arguments)}});var kM=function(){return typeof bd.ResizeObserver<"u"?bd.ResizeObserver:K$}(),Ro=new Map;function AM(t){t.forEach(function(e){var n,r=e.target;(n=Ro.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var J$=new kM(AM);function QM(t,e){Ro.has(t)||(Ro.set(t,new Set),J$.observe(t)),Ro.get(t).add(e)}function NM(t,e){Ro.has(t)&&(Ro.get(t).delete(e),Ro.get(t).size||(J$.unobserve(t),Ro.delete(t)))}function An(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nb(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&arguments[1]!==void 0?arguments[1]:1;rb+=1;var r=rb;function i(o){if(o===0)iC(r),e();else{var a=nC(function(){i(o-1)});kv.set(r,a)}}return i(n),r};Yt.cancel=function(t){var e=kv.get(t);return iC(t),rC(e)};function oC(t){if(Array.isArray(t))return t}function VM(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function aC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function le(t,e){return oC(t)||VM(t,e)||Ev(t,e)||aC()}function Wl(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}function pr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ap(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1}var ib="data-rc-order",ob="data-rc-priority",FM="rc-util-key",sp=new Map;function sC(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):FM}function Mf(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function XM(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function Av(t){return Array.from((sp.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function lC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!pr())return null;var n=e.csp,r=e.prepend,i=e.priority,o=i===void 0?0:i,a=XM(r),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(ib,a),s&&o&&l.setAttribute(ob,"".concat(o)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=t;var c=Mf(e),u=c.firstChild;if(r){if(s){var d=(e.styles||Av(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(ib)))return!1;var h=Number(f.getAttribute(ob)||0);return o>=h});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function cC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Mf(e);return(e.styles||Av(n)).find(function(r){return r.getAttribute(sC(e))===t})}function Hl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=cC(t,e);if(n){var r=Mf(e);r.removeChild(n)}}function ZM(t,e){var n=sp.get(t);if(!n||!ap(document,n)){var r=lC("",e),i=r.parentNode;sp.set(t,i),t.removeChild(r)}}function lo(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Mf(n),i=Av(r),o=Z(Z({},n),{},{styles:i});ZM(r,o);var a=cC(e,o);if(a){var s,l;if((s=o.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((l=o.csp)===null||l===void 0?void 0:l.nonce)){var c;a.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return a.innerHTML!==t&&(a.innerHTML=t),a}var u=lC(t,o);return u.setAttribute(sC(o),e),u}function uC(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function gt(t,e){if(t==null)return{};var n,r,i=uC(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(o,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(o);if(or(!l,"Warning: There may be circular references"),l)return!1;if(o===a)return!0;if(n&&s>1)return!1;r.add(o);var c=s+1;if(Array.isArray(o)){if(!Array.isArray(a)||o.length!==a.length)return!1;for(var u=0;u1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return n.forEach(function(s){if(!a)a=void 0;else{var l;a=(l=a)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(s)}}),(r=a)!==null&&r!==void 0&&r.value&&o&&(a.value[1]=this.cacheCallTimes++),(i=a)===null||i===void 0?void 0:i.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var i=this;if(!this.has(n)){if(this.size()+1>t.MAX_CACHE_SIZE+t.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(c,u){var d=le(c,2),f=d[1];return i.internalGet(u)[1]0,void 0),ab+=1}return Qn(t,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,i){return i(n,r)},void 0)}}]),t}(),Th=new Qv;function cp(t){var e=Array.isArray(t)?t:[t];return Th.has(e)||Th.set(e,new dC(e)),Th.get(e)}var KM=new WeakMap,Rh={};function JM(t,e){for(var n=KM,r=0;r3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return t;var o=Z(Z({},r),{},W(W({},bs,e),$i,n)),a=Object.keys(o).map(function(s){var l=o[s];return l?"".concat(s,'="').concat(l,'"'):null}).filter(function(s){return s}).join(" ");return"")}var Hu=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},eE=function(e,n,r){return Object.keys(e).length?".".concat(n).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(e).map(function(i){var o=le(i,2),a=o[0],s=o[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},fC=function(e,n,r){var i={},o={};return Object.entries(e).forEach(function(a){var s,l,c=le(a,2),u=c[0],d=c[1];if(r!=null&&(s=r.preserve)!==null&&s!==void 0&&s[u])o[u]=d;else if((typeof d=="string"||typeof d=="number")&&!(r!=null&&(l=r.ignore)!==null&&l!==void 0&&l[u])){var f,h=Hu(u,r==null?void 0:r.prefix);i[h]=typeof d=="number"&&!(r!=null&&(f=r.unitless)!==null&&f!==void 0&&f[u])?"".concat(d,"px"):String(d),o[u]="var(".concat(h,")")}}),[o,eE(i,n,{scope:r==null?void 0:r.scope})]},cb=pr()?Ri:ye,Lt=function(e,n){var r=ne(!0);cb(function(){return e(r.current)},n),cb(function(){return r.current=!1,function(){r.current=!0}},[])},dp=function(e,n){Lt(function(r){if(!r)return e()},n)},tE=Z({},Sc),ub=tE.useInsertionEffect,nE=function(e,n,r){ve(e,r),Lt(function(){return n(!0)},r)},rE=ub?function(t,e,n){return ub(function(){return t(),e()},n)}:nE,iE=Z({},Sc),oE=iE.useInsertionEffect,aE=function(e){var n=[],r=!1;function i(o){r||n.push(o)}return ye(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(o){return o()})}},e),i},sE=function(){return function(e){e()}},lE=typeof oE<"u"?aE:sE;function Nv(t,e,n,r,i){var o=he($c),a=o.cache,s=[t].concat(Ce(e)),l=lp(s),c=lE([l]),u=function(m){a.opUpdate(l,function(p){var g=p||[void 0,void 0],O=le(g,2),v=O[0],y=v===void 0?0:v,S=O[1],x=S,$=x||n(),C=[y,$];return m?m(C):C})};ve(function(){u()},[l]);var d=a.opGet(l),f=d[1];return rE(function(){i==null||i(f)},function(h){return u(function(m){var p=le(m,2),g=p[0],O=p[1];return h&&g===0&&(i==null||i(f)),[g+1,O]}),function(){a.opUpdate(l,function(m){var p=m||[],g=le(p,2),O=g[0],v=O===void 0?0:O,y=g[1],S=v-1;return S===0?(c(function(){(h||!a.opGet(l))&&(r==null||r(y,!1))}),null):[v-1,y]})}},[l]),f}var cE={},uE="css",ea=new Map;function dE(t){ea.set(t,(ea.get(t)||0)+1)}function fE(t,e){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(bs,'="').concat(t,'"]'));n.forEach(function(r){if(r[Io]===e){var i;(i=r.parentNode)===null||i===void 0||i.removeChild(r)}})}}var hE=0;function mE(t,e){ea.set(t,(ea.get(t)||0)-1);var n=new Set;ea.forEach(function(r,i){r<=0&&n.add(i)}),ea.size-n.size>hE&&n.forEach(function(r){fE(r,e),ea.delete(r)})}var pE=function(e,n,r,i){var o=r.getDerivativeToken(e),a=Z(Z({},o),n);return i&&(a=i(a)),a},hC="token";function gE(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=he($c),i=r.cache.instanceId,o=r.container,a=n.salt,s=a===void 0?"":a,l=n.override,c=l===void 0?cE:l,u=n.formatToken,d=n.getComputedToken,f=n.cssVar,h=JM(function(){return Object.assign.apply(Object,[{}].concat(Ce(e)))},e),m=Cl(h),p=Cl(c),g=f?Cl(f):"",O=Nv(hC,[s,t.id,m,p,g],function(){var v,y=d?d(h,c,t):pE(h,c,t,u),S=Z({},y),x="";if(f){var $=fC(y,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),C=le($,2);y=C[0],x=C[1]}var P=lb(y,s);y._tokenKey=P,S._tokenKey=lb(S,s);var w=(v=f==null?void 0:f.key)!==null&&v!==void 0?v:P;y._themeKey=w,dE(w);var _="".concat(uE,"-").concat(Wl(P));return y._hashId=_,[y,_,S,x,(f==null?void 0:f.key)||""]},function(v){mE(v[0]._themeKey,i)},function(v){var y=le(v,4),S=y[0],x=y[3];if(f&&x){var $=lo(x,Wl("css-variables-".concat(S._themeKey)),{mark:$i,prepend:"queue",attachTo:o,priority:-999});$[Io]=i,$.setAttribute(bs,S._themeKey)}});return O}var vE=function(e,n,r){var i=le(e,5),o=i[2],a=i[3],s=i[4],l=r||{},c=l.plain;if(!a)return null;var u=o._tokenKey,d=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(d)},h=Sd(a,s,u,f,c);return[d,u,h]},OE={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},mC="comm",pC="rule",gC="decl",bE="@import",yE="@namespace",SE="@keyframes",xE="@layer",vC=Math.abs,zv=String.fromCharCode;function OC(t){return t.trim()}function Vu(t,e,n){return t.replace(e,n)}function $E(t,e,n){return t.indexOf(e,n)}function as(t,e){return t.charCodeAt(e)|0}function ys(t,e,n){return t.slice(e,n)}function ji(t){return t.length}function CE(t){return t.length}function tu(t,e){return e.push(t),t}var Ef=1,Ss=1,bC=0,fi=0,jn=0,Ns="";function jv(t,e,n,r,i,o,a,s){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:Ef,column:Ss,length:a,return:"",siblings:s}}function wE(){return jn}function PE(){return jn=fi>0?as(Ns,--fi):0,Ss--,jn===10&&(Ss=1,Ef--),jn}function Ci(){return jn=fi2||Fl(jn)>3?"":" "}function IE(t,e){for(;--e&&Ci()&&!(jn<48||jn>102||jn>57&&jn<65||jn>70&&jn<97););return kf(t,Fu()+(e<6&&Mo()==32&&Ci()==32))}function fp(t){for(;Ci();)switch(jn){case t:return fi;case 34:case 39:t!==34&&t!==39&&fp(jn);break;case 40:t===41&&fp(t);break;case 92:Ci();break}return fi}function ME(t,e){for(;Ci()&&t+jn!==57;)if(t+jn===84&&Mo()===47)break;return"/*"+kf(e,fi-1)+"*"+zv(t===47?t:Ci())}function EE(t){for(;!Fl(Mo());)Ci();return kf(t,fi)}function kE(t){return TE(Xu("",null,null,null,[""],t=_E(t),0,[0],t))}function Xu(t,e,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,m=0,p=1,g=1,O=1,v=0,y="",S=i,x=o,$=r,C=y;g;)switch(m=v,v=Ci()){case 40:if(m!=108&&as(C,d-1)==58){$E(C+=Vu(Ih(v),"&","&\f"),"&\f",vC(c?s[c-1]:0))!=-1&&(O=-1);break}case 34:case 39:case 91:C+=Ih(v);break;case 9:case 10:case 13:case 32:C+=RE(m);break;case 92:C+=IE(Fu()-1,7);continue;case 47:switch(Mo()){case 42:case 47:tu(AE(ME(Ci(),Fu()),e,n,l),l),(Fl(m||1)==5||Fl(Mo()||1)==5)&&ji(C)&&ys(C,-1,void 0)!==" "&&(C+=" ");break;default:C+="/"}break;case 123*p:s[c++]=ji(C)*O;case 125*p:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:O==-1&&(C=Vu(C,/\f/g,"")),h>0&&(ji(C)-d||p===0&&m===47)&&tu(h>32?fb(C+";",r,n,d-1,l):fb(Vu(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(tu($=db(C,e,n,c,u,i,s,y,S=[],x=[],d,o),o),v===123)if(u===0)Xu(C,e,$,$,S,o,d,s,x);else{switch(f){case 99:if(as(C,3)===110)break;case 108:if(as(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Xu(t,$,$,r&&tu(db(t,$,$,0,0,i,s,y,i,S=[],d,x),x),i,x,d,s,r?S:x):Xu(C,$,$,$,[""],x,0,s,x)}}c=u=h=0,p=O=1,y=C="",d=a;break;case 58:d=1+ji(C),h=m;default:if(p<1){if(v==123)--p;else if(v==125&&p++==0&&PE()==125)continue}switch(C+=zv(v),v*p){case 38:O=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(ji(C)-1)*O,O=1;break;case 64:Mo()===45&&(C+=Ih(Ci())),f=Mo(),u=d=ji(y=C+=EE(Fu())),v++;break;case 45:m===45&&ji(C)==2&&(p=0)}}return o}function db(t,e,n,r,i,o,a,s,l,c,u,d){for(var f=i-1,h=i===0?o:[""],m=CE(h),p=0,g=0,O=0;p0?h[v]+" "+y:Vu(y,/&\f/g,h[v])))&&(l[O++]=S);return jv(t,e,n,i===0?pC:s,l,c,u,d)}function AE(t,e,n,r){return jv(t,e,n,mC,zv(wE()),ys(t,2,-2),0,r)}function fb(t,e,n,r,i){return jv(t,e,n,gC,ys(t,0,r),ys(t,r+1,-1),r,i)}function hp(t,e){for(var n="",r=0;r1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=r.root,o=r.injectHash,a=r.parentSelectors,s=n.hashId,l=n.layer;n.path;var c=n.hashPriority,u=n.transformers,d=u===void 0?[]:u;n.linters;var f="",h={};function m(O){var v=O.getName(s);if(!h[v]){var y=t(O.style,n,{root:!1,parentSelectors:a}),S=le(y,1),x=S[0];h[v]="@keyframes ".concat(O.getName(s)).concat(x)}}function p(O){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return O.forEach(function(y){Array.isArray(y)?p(y,v):y&&v.push(y)}),v}var g=p(Array.isArray(e)?e:[e]);return g.forEach(function(O){var v=typeof O=="string"&&!i?{}:O;if(typeof v=="string")f+="".concat(v,` +`);else if(v._keyframe)m(v);else{var y=d.reduce(function(S,x){var $;return(x==null||($=x.visit)===null||$===void 0?void 0:$.call(x,S))||S},v);Object.keys(y).forEach(function(S){var x=y[S];if(nt(x)==="object"&&x&&(S!=="animationName"||!x._keyframe)&&!DE(x)){var $=!1,C=S.trim(),P=!1;(i||o)&&s?C.startsWith("@")?$=!0:C==="&"?C=mb("",s,c):C=mb(S,s,c):i&&!s&&(C==="&"||C==="")&&(C="",P=!0);var w=t(x,n,{root:P,injectHash:$,parentSelectors:[].concat(Ce(a),[C])}),_=le(w,2),R=_[0],I=_[1];h=Z(Z({},h),I),f+="".concat(C).concat(R)}else{let Q=function(E,k){var z=E.replace(/[A-Z]/g,function(B){return"-".concat(B.toLowerCase())}),L=k;!OE[E]&&typeof L=="number"&&L!==0&&(L="".concat(L,"px")),E==="animationName"&&k!==null&&k!==void 0&&k._keyframe&&(m(k),L=k.getName(s)),f+="".concat(z,":").concat(L,";")};var T,M=(T=x==null?void 0:x.value)!==null&&T!==void 0?T:x;nt(x)==="object"&&x!==null&&x!==void 0&&x[xC]&&Array.isArray(M)?M.forEach(function(E){Q(S,E)}):Q(S,M)}})}}),i?l&&(f&&(f="@layer ".concat(l.name," {").concat(f,"}")),l.dependencies&&(h["@layer ".concat(l.name)]=l.dependencies.map(function(O){return"@layer ".concat(O,", ").concat(l.name,";")}).join(` +`))):f="{".concat(f,"}"),[f,h]};function $C(t,e){return Wl("".concat(t.join("%")).concat(e))}function WE(){return null}var CC="style";function mp(t,e){var n=t.token,r=t.path,i=t.hashId,o=t.layer,a=t.nonce,s=t.clientOnly,l=t.order,c=l===void 0?0:l,u=he($c),d=u.autoClear;u.mock;var f=u.defaultCache,h=u.hashPriority,m=u.container,p=u.ssrInline,g=u.transformers,O=u.linters,v=u.cache,y=u.layer,S=n._tokenKey,x=[S];y&&x.push("layer"),x.push.apply(x,Ce(r));var $=up,C=Nv(CC,x,function(){var I=x.join("|");if(zE(I)){var T=jE(I),M=le(T,2),Q=M[0],E=M[1];if(Q)return[Q,S,E,{},s,c]}var k=e(),z=BE(k,{hashId:i,hashPriority:h,layer:y?o:void 0,path:r.join("-"),transformers:g,linters:O}),L=le(z,2),B=L[0],F=L[1],H=Zu(B),X=$C(x,H);return[H,S,X,F,s,c]},function(I,T){var M=le(I,3),Q=M[2];(T||d)&&up&&Hl(Q,{mark:$i,attachTo:m})},function(I){var T=le(I,4),M=T[0];T[1];var Q=T[2],E=T[3];if($&&M!==yC){var k={mark:$i,prepend:y?!1:"queue",attachTo:m,priority:c},z=typeof a=="function"?a():a;z&&(k.csp={nonce:z});var L=[],B=[];Object.keys(E).forEach(function(H){H.startsWith("@layer")?L.push(H):B.push(H)}),L.forEach(function(H){lo(Zu(E[H]),"_layer-".concat(H),Z(Z({},k),{},{prepend:!0}))});var F=lo(M,Q,k);F[Io]=v.instanceId,F.setAttribute(bs,S),B.forEach(function(H){lo(Zu(E[H]),"_effect-".concat(H),k)})}}),P=le(C,3),w=P[0],_=P[1],R=P[2];return function(I){var T;return!p||$||!f?T=b(WE,null):T=b("style",xe({},W(W({},bs,_),$i,R),{dangerouslySetInnerHTML:{__html:w}})),b(Qt,null,T,I)}}var HE=function(e,n,r){var i=le(e,6),o=i[0],a=i[1],s=i[2],l=i[3],c=i[4],u=i[5],d=r||{},f=d.plain;if(c)return null;var h=o,m={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return h=Sd(o,a,s,m,f),l&&Object.keys(l).forEach(function(p){if(!n[p]){n[p]=!0;var g=Zu(l[p]),O=Sd(g,a,"_effect-".concat(p),m,f);p.startsWith("@layer")?h=O+h:h+=O}}),[u,s,h]},wC="cssVar",VE=function(e,n){var r=e.key,i=e.prefix,o=e.unitless,a=e.ignore,s=e.token,l=e.scope,c=l===void 0?"":l,u=he($c),d=u.cache.instanceId,f=u.container,h=s._tokenKey,m=[].concat(Ce(e.path),[r,c,h]),p=Nv(wC,m,function(){var g=n(),O=fC(g,r,{prefix:i,unitless:o,ignore:a,scope:c}),v=le(O,2),y=v[0],S=v[1],x=$C(m,S);return[y,S,x,r]},function(g){var O=le(g,3),v=O[2];up&&Hl(v,{mark:$i,attachTo:f})},function(g){var O=le(g,3),v=O[1],y=O[2];if(v){var S=lo(v,y,{mark:$i,prepend:"queue",attachTo:f,priority:-999});S[Io]=d,S.setAttribute(bs,r)}});return p},FE=function(e,n,r){var i=le(e,4),o=i[1],a=i[2],s=i[3],l=r||{},c=l.plain;if(!o)return null;var u=-999,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},f=Sd(o,s,a,d,c);return[u,a,f]};W(W(W({},CC,HE),hC,vE),wC,FE);var At=function(){function t(e,n){An(this,t),W(this,"name",void 0),W(this,"style",void 0),W(this,"_keyframe",!0),this.name=e,this.style=n}return Qn(t,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),t}();function za(t){return t.notSplit=!0,t}za(["borderTop","borderBottom"]),za(["borderTop"]),za(["borderBottom"]),za(["borderLeft","borderRight"]),za(["borderLeft"]),za(["borderRight"]);var Lv=Tt({});function PC(t){return oC(t)||tC(t)||Ev(t)||aC()}function si(t,e){for(var n=t,r=0;r3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&r&&n===void 0&&!si(t,e.slice(0,-1))?t:_C(t,e,n,r)}function XE(t){return nt(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function pb(t){return Array.isArray(t)?[]:{}}var ZE=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Ja(){for(var t=arguments.length,e=new Array(t),n=0;n{const t=()=>{};return t.deprecated=qE,t},TC=Tt(void 0);var RC={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},UE={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},YE=Z(Z({},UE),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const IC={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},gb={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},YE),timePickerLocale:Object.assign({},IC)},Hr="${label} is not a valid ${type}",Gi={locale:"en",Pagination:RC,DatePicker:gb,TimePicker:IC,Calendar:gb,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Hr,method:Hr,array:Hr,object:Hr,number:Hr,date:Hr,boolean:Hr,integer:Hr,float:Hr,regexp:Hr,email:Hr,url:Hr,hex:Hr},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let qu=Object.assign({},Gi.Modal),Gu=[];const vb=()=>Gu.reduce((t,e)=>Object.assign(Object.assign({},t),e),Gi.Modal);function KE(t){if(t){const e=Object.assign({},t);return Gu.push(e),qu=vb(),()=>{Gu=Gu.filter(n=>n!==e),qu=vb()}}qu=Object.assign({},Gi.Modal)}function MC(){return qu}const Dv=Tt(void 0),Ii=(t,e)=>{const n=he(Dv),r=ve(()=>{var o;const a=e||Gi[t],s=(o=n==null?void 0:n[t])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[t,e,n]),i=ve(()=>{const o=n==null?void 0:n.locale;return n!=null&&n.exist&&!o?Gi.locale:o},[n]);return[r,i]},JE="internalMark",ek=t=>{const{locale:e={},children:n,_ANT_MARK__:r}=t;ye(()=>KE(e==null?void 0:e.Modal),[e]);const i=ve(()=>Object.assign(Object.assign({},e),{exist:!0}),[e]);return b(Dv.Provider,{value:i},n)},Bv={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Xl=Object.assign(Object.assign({},Bv),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', -'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),Vn=Math.round;function Sh(t,e){const n=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)r[i]=e(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const ab=(t,e,n)=>n===0?t:t/100;function Gs(t,e){const n=e||255;return t>n?n:t<0?0:t}class Dt{constructor(e){D(this,"isValid",!0),D(this,"r",0),D(this,"g",0),D(this,"b",0),D(this,"a",1),D(this,"_h",void 0),D(this,"_s",void 0),D(this,"_l",void 0),D(this,"_v",void 0),D(this,"_max",void 0),D(this,"_min",void 0),D(this,"_brightness",void 0);function n(i){return i[0]in e&&i[1]in e&&i[2]in e}if(e)if(typeof e=="string"){let o=function(a){return i.startsWith(a)};var r=o;const i=e.trim();/^#?[A-F\d]{3,8}$/i.test(i)?this.fromHexString(i):o("rgb")?this.fromRgbString(i):o("hsl")?this.fromHslString(i):(o("hsv")||o("hsb"))&&this.fromHsvString(i)}else if(e instanceof Dt)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(n("rgb"))this.r=Gs(e.r),this.g=Gs(e.g),this.b=Gs(e.b),this.a=typeof e.a=="number"?Gs(e.a,1):1;else if(n("hsl"))this.fromHsl(e);else if(n("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const n=this.toHsv();return n.h=e,this._c(n)}getLuminance(){function e(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=e(this.r),r=e(this.g),i=e(this.b);return .2126*n+.7152*r+.0722*i}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=Vn(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()-e/100;return i<0&&(i=0),this._c({h:n,s:r,l:i,a:this.a})}lighten(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()+e/100;return i>1&&(i=1),this._c({h:n,s:r,l:i,a:this.a})}mix(e,n=50){const r=this._c(e),i=n/100,o=s=>(r[s]-this[s])*i+this[s],a={r:Vn(o("r")),g:Vn(o("g")),b:Vn(o("b")),a:Vn(o("a")*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const n=this._c(e),r=this.a+n.a*(1-this.a),i=o=>Vn((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:i("r"),g:i("g"),b:i("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const n=(this.r||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);e+=r.length===2?r:"0"+r;const i=(this.b||0).toString(16);if(e+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=Vn(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),n=Vn(this.getSaturation()*100),r=Vn(this.getLightness()*100);return this.a!==1?`hsla(${e},${n}%,${r}%,${this.a})`:`hsl(${e},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,n,r){const i=this.clone();return i[e]=Gs(n,r),i}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const n=e.replace("#","");function r(i,o){return parseInt(n[i]+n[o||i],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:e,s:n,l:r,a:i}){if(this._h=e%360,this._s=n,this._l=r,this.a=typeof i=="number"?i:1,n<=0){const f=Vn(r*255);this.r=f,this.g=f,this.b=f}let o=0,a=0,s=0;const l=e/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(o=c,a=u):l>=1&&l<2?(o=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(o=u,s=c):l>=5&&l<6&&(o=c,s=u);const d=r-c/2;this.r=Vn((o+d)*255),this.g=Vn((a+d)*255),this.b=Vn((s+d)*255)}fromHsv({h:e,s:n,v:r,a:i}){this._h=e%360,this._s=n,this._v=r,this.a=typeof i=="number"?i:1;const o=Vn(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const a=e/60,s=Math.floor(a),l=a-s,c=Vn(r*(1-n)*255),u=Vn(r*(1-n*l)*255),d=Vn(r*(1-n*(1-l))*255);switch(s){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(e){const n=Sh(e,ab);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(e){const n=Sh(e,ab);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(e){const n=Sh(e,(r,i)=>i.includes("%")?Vn(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var Gc=2,sb=.16,DM=.05,BM=.05,WM=.15,g$=5,v$=4,FM=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function lb(t,e,n){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=n?Math.round(t.h)-Gc*e:Math.round(t.h)+Gc*e:r=n?Math.round(t.h)+Gc*e:Math.round(t.h)-Gc*e,r<0?r+=360:r>=360&&(r-=360),r}function cb(t,e,n){if(t.h===0&&t.s===0)return t.s;var r;return n?r=t.s-sb*e:e===v$?r=t.s+sb:r=t.s+DM*e,r>1&&(r=1),n&&e===g$&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function ub(t,e,n){var r;return n?r=t.v+BM*e:r=t.v-WM*e,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function ga(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Dt(t),i=r.toHsv(),o=g$;o>0;o-=1){var a=new Dt({h:lb(i,o,!0),s:cb(i,o,!0),v:ub(i,o,!0)});n.push(a)}n.push(r);for(var s=1;s<=v$;s+=1){var l=new Dt({h:lb(i,s),s:cb(i,s),v:ub(i,s)});n.push(l)}return e.theme==="dark"?FM.map(function(c){var u=c.index,d=c.amount;return new Dt(e.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(c){return c.toHexString()})}var xh={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},om=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];om.primary=om[5];var am=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];am.primary=am[5];var sm=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];sm.primary=sm[5];var pd=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];pd.primary=pd[5];var lm=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];lm.primary=lm[5];var cm=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];cm.primary=cm[5];var um=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];um.primary=um[5];var dm=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];dm.primary=dm[5];var md=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];md.primary=md[5];var fm=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];fm.primary=fm[5];var hm=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];hm.primary=hm[5];var pm=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];pm.primary=pm[5];var mm=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];mm.primary=mm[5];var Ch={red:om,volcano:am,orange:sm,gold:pd,yellow:lm,lime:cm,green:um,cyan:dm,blue:md,geekblue:fm,purple:hm,magenta:pm,grey:mm};function O$(t,{generateColorPalettes:e,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:i,colorError:o,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:c}=t,u=e(s),d=e(r),f=e(i),h=e(o),p=e(a),m=n(l,c),g=t.colorLink||t.colorInfo,v=e(g),O=new Dt(h[1]).mix(new Dt(h[3]),50).toHexString();return Object.assign(Object.assign({},m),{colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:h[1],colorErrorBgHover:h[2],colorErrorBgFilledHover:O,colorErrorBgActive:h[3],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:p[1],colorInfoBgHover:p[2],colorInfoBorder:p[3],colorInfoBorderHover:p[4],colorInfoHover:p[4],colorInfo:p[6],colorInfoActive:p[7],colorInfoTextHover:p[8],colorInfoText:p[9],colorInfoTextActive:p[10],colorLinkHover:v[4],colorLink:v[6],colorLinkActive:v[7],colorBgMask:new Dt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const VM=t=>{let e=t,n=t,r=t,i=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?n=4:t<8&&t>=7?n=5:t<14&&t>=8?n=6:t<16&&t>=14?n=7:t>=16&&(n=8),t<6&&t>=2?r=1:t>=6&&(r=2),t>4&&t<8?i=4:t>=8&&(i=6),{borderRadius:t,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:e,borderRadiusOuter:i}};function HM(t){const{motionUnit:e,motionBase:n,borderRadius:r,lineWidth:i}=t;return Object.assign({motionDurationFast:`${(n+e).toFixed(1)}s`,motionDurationMid:`${(n+e*2).toFixed(1)}s`,motionDurationSlow:`${(n+e*3).toFixed(1)}s`,lineWidthBold:i+1},VM(r))}const XM=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function Fu(t){return(t+8)/t}function ZM(t){const e=Array.from({length:10}).map((n,r)=>{const i=r-1,o=t*Math.pow(Math.E,i/5),a=r>1?Math.floor(o):Math.ceil(o);return Math.floor(a/2)*2});return e[1]=t,e.map(n=>({size:n,lineHeight:Fu(n)}))}const qM=t=>{const e=ZM(t),n=e.map(u=>u.size),r=e.map(u=>u.lineHeight),i=n[1],o=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*i),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function GM(t){const{sizeUnit:e,sizeStep:n}=t;return{sizeXXL:e*(n+8),sizeXL:e*(n+4),sizeLG:e*(n+2),sizeMD:e*(n+1),sizeMS:e*n,size:e*n,sizeSM:e*(n-1),sizeXS:e*(n-2),sizeXXS:e*(n-3)}}const ti=(t,e)=>new Dt(t).setA(e).toRgbString(),Ys=(t,e)=>new Dt(t).darken(e).toHexString(),YM=t=>{const e=ga(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},UM=(t,e)=>{const n=t||"#fff",r=e||"#000";return{colorBgBase:n,colorTextBase:r,colorText:ti(r,.88),colorTextSecondary:ti(r,.65),colorTextTertiary:ti(r,.45),colorTextQuaternary:ti(r,.25),colorFill:ti(r,.15),colorFillSecondary:ti(r,.06),colorFillTertiary:ti(r,.04),colorFillQuaternary:ti(r,.02),colorBgSolid:ti(r,1),colorBgSolidHover:ti(r,.75),colorBgSolidActive:ti(r,.95),colorBgLayout:Ys(n,4),colorBgContainer:Ys(n,0),colorBgElevated:Ys(n,0),colorBgSpotlight:ti(r,.85),colorBgBlur:"transparent",colorBorder:Ys(n,15),colorBorderSecondary:Ys(n,6)}};function Ev(t){xh.pink=xh.magenta,Ch.pink=Ch.magenta;const e=Object.keys(Mv).map(n=>{const r=t[n]===xh[n]?Ch[n]:ga(t[n]);return Array.from({length:10},()=>1).reduce((i,o,a)=>(i[`${n}-${a+1}`]=r[a],i[`${n}${a+1}`]=r[a],i),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),e),O$(t,{generateColorPalettes:YM,generateNeutralColorPalettes:UM})),qM(t.fontSize)),GM(t)),XM(t)),HM(t))}const b$=Jp(Ev),gd={token:Wl,override:{override:Wl},hashed:!0},y$=oe.createContext(gd),Fl="ant",$f="anticon",KM=["outlined","borderless","filled","underlined"],JM=(t,e)=>e||(t?`${Fl}-${t}`:Fl),it=bt({getPrefixCls:JM,iconPrefixCls:$f}),{Consumer:LU}=it,db={};function rr(t){const e=fe(it),{getPrefixCls:n,direction:r,getPopupContainer:i}=e,o=e[t];return Object.assign(Object.assign({classNames:db,styles:db},o),{getPrefixCls:n,direction:r,getPopupContainer:i})}const eE=`-ant-${Date.now()}-${Math.random()}`;function tE(t,e){const n={},r=(a,s)=>{let l=a.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},i=(a,s)=>{const l=new Dt(a),c=ga(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setA(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(e.primaryColor){i(e.primaryColor,"primary");const a=new Dt(e.primaryColor),s=ga(a.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(a,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(a,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(a,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(a,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(a,c=>c.setA(c.a*.12));const l=new Dt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setA(c.a*.3)),n["primary-color-active-deprecated-d-02"]=r(l,c=>c.darken(2))}return e.successColor&&i(e.successColor,"success"),e.warningColor&&i(e.warningColor,"warning"),e.errorColor&&i(e.errorColor,"error"),e.infoColor&&i(e.infoColor,"info"),` +'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),qn=Math.round;function Mh(t,e){const n=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)r[i]=e(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const Ob=(t,e,n)=>n===0?t:t/100;function Ys(t,e){const n=e||255;return t>n?n:t<0?0:t}class Vt{constructor(e){W(this,"isValid",!0),W(this,"r",0),W(this,"g",0),W(this,"b",0),W(this,"a",1),W(this,"_h",void 0),W(this,"_s",void 0),W(this,"_l",void 0),W(this,"_v",void 0),W(this,"_max",void 0),W(this,"_min",void 0),W(this,"_brightness",void 0);function n(i){return i[0]in e&&i[1]in e&&i[2]in e}if(e)if(typeof e=="string"){let o=function(a){return i.startsWith(a)};var r=o;const i=e.trim();/^#?[A-F\d]{3,8}$/i.test(i)?this.fromHexString(i):o("rgb")?this.fromRgbString(i):o("hsl")?this.fromHslString(i):(o("hsv")||o("hsb"))&&this.fromHsvString(i)}else if(e instanceof Vt)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(n("rgb"))this.r=Ys(e.r),this.g=Ys(e.g),this.b=Ys(e.b),this.a=typeof e.a=="number"?Ys(e.a,1):1;else if(n("hsl"))this.fromHsl(e);else if(n("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const n=this.toHsv();return n.h=e,this._c(n)}getLuminance(){function e(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=e(this.r),r=e(this.g),i=e(this.b);return .2126*n+.7152*r+.0722*i}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=qn(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()-e/100;return i<0&&(i=0),this._c({h:n,s:r,l:i,a:this.a})}lighten(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()+e/100;return i>1&&(i=1),this._c({h:n,s:r,l:i,a:this.a})}mix(e,n=50){const r=this._c(e),i=n/100,o=s=>(r[s]-this[s])*i+this[s],a={r:qn(o("r")),g:qn(o("g")),b:qn(o("b")),a:qn(o("a")*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const n=this._c(e),r=this.a+n.a*(1-this.a),i=o=>qn((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:i("r"),g:i("g"),b:i("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const n=(this.r||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);e+=r.length===2?r:"0"+r;const i=(this.b||0).toString(16);if(e+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=qn(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),n=qn(this.getSaturation()*100),r=qn(this.getLightness()*100);return this.a!==1?`hsla(${e},${n}%,${r}%,${this.a})`:`hsl(${e},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,n,r){const i=this.clone();return i[e]=Ys(n,r),i}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const n=e.replace("#","");function r(i,o){return parseInt(n[i]+n[o||i],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:e,s:n,l:r,a:i}){if(this._h=e%360,this._s=n,this._l=r,this.a=typeof i=="number"?i:1,n<=0){const f=qn(r*255);this.r=f,this.g=f,this.b=f}let o=0,a=0,s=0;const l=e/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(o=c,a=u):l>=1&&l<2?(o=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(o=u,s=c):l>=5&&l<6&&(o=c,s=u);const d=r-c/2;this.r=qn((o+d)*255),this.g=qn((a+d)*255),this.b=qn((s+d)*255)}fromHsv({h:e,s:n,v:r,a:i}){this._h=e%360,this._s=n,this._v=r,this.a=typeof i=="number"?i:1;const o=qn(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const a=e/60,s=Math.floor(a),l=a-s,c=qn(r*(1-n)*255),u=qn(r*(1-n*l)*255),d=qn(r*(1-n*(1-l))*255);switch(s){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(e){const n=Mh(e,Ob);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(e){const n=Mh(e,Ob);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(e){const n=Mh(e,(r,i)=>i.includes("%")?qn(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var nu=2,bb=.16,tk=.05,nk=.05,rk=.15,EC=5,kC=4,ik=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function yb(t,e,n){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=n?Math.round(t.h)-nu*e:Math.round(t.h)+nu*e:r=n?Math.round(t.h)+nu*e:Math.round(t.h)-nu*e,r<0?r+=360:r>=360&&(r-=360),r}function Sb(t,e,n){if(t.h===0&&t.s===0)return t.s;var r;return n?r=t.s-bb*e:e===kC?r=t.s+bb:r=t.s+tk*e,r>1&&(r=1),n&&e===EC&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function xb(t,e,n){var r;return n?r=t.v+nk*e:r=t.v-rk*e,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Oa(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Vt(t),i=r.toHsv(),o=EC;o>0;o-=1){var a=new Vt({h:yb(i,o,!0),s:Sb(i,o,!0),v:xb(i,o,!0)});n.push(a)}n.push(r);for(var s=1;s<=kC;s+=1){var l=new Vt({h:yb(i,s),s:Sb(i,s),v:xb(i,s)});n.push(l)}return e.theme==="dark"?ik.map(function(c){var u=c.index,d=c.amount;return new Vt(e.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(c){return c.toHexString()})}var Eh={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},pp=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];pp.primary=pp[5];var gp=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];gp.primary=gp[5];var vp=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];vp.primary=vp[5];var xd=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];xd.primary=xd[5];var Op=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Op.primary=Op[5];var bp=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];bp.primary=bp[5];var yp=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];yp.primary=yp[5];var Sp=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Sp.primary=Sp[5];var $d=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];$d.primary=$d[5];var xp=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];xp.primary=xp[5];var $p=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];$p.primary=$p[5];var Cp=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];Cp.primary=Cp[5];var wp=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];wp.primary=wp[5];var kh={red:pp,volcano:gp,orange:vp,gold:xd,yellow:Op,lime:bp,green:yp,cyan:Sp,blue:$d,geekblue:xp,purple:$p,magenta:Cp,grey:wp};function AC(t,{generateColorPalettes:e,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:i,colorError:o,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:c}=t,u=e(s),d=e(r),f=e(i),h=e(o),m=e(a),p=n(l,c),g=t.colorLink||t.colorInfo,O=e(g),v=new Vt(h[1]).mix(new Vt(h[3]),50).toHexString();return Object.assign(Object.assign({},p),{colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:h[1],colorErrorBgHover:h[2],colorErrorBgFilledHover:v,colorErrorBgActive:h[3],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorLinkHover:O[4],colorLink:O[6],colorLinkActive:O[7],colorBgMask:new Vt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const ok=t=>{let e=t,n=t,r=t,i=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?n=4:t<8&&t>=7?n=5:t<14&&t>=8?n=6:t<16&&t>=14?n=7:t>=16&&(n=8),t<6&&t>=2?r=1:t>=6&&(r=2),t>4&&t<8?i=4:t>=8&&(i=6),{borderRadius:t,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:e,borderRadiusOuter:i}};function ak(t){const{motionUnit:e,motionBase:n,borderRadius:r,lineWidth:i}=t;return Object.assign({motionDurationFast:`${(n+e).toFixed(1)}s`,motionDurationMid:`${(n+e*2).toFixed(1)}s`,motionDurationSlow:`${(n+e*3).toFixed(1)}s`,lineWidthBold:i+1},ok(r))}const sk=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function Uu(t){return(t+8)/t}function lk(t){const e=Array.from({length:10}).map((n,r)=>{const i=r-1,o=t*Math.pow(Math.E,i/5),a=r>1?Math.floor(o):Math.ceil(o);return Math.floor(a/2)*2});return e[1]=t,e.map(n=>({size:n,lineHeight:Uu(n)}))}const ck=t=>{const e=lk(t),n=e.map(u=>u.size),r=e.map(u=>u.lineHeight),i=n[1],o=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*i),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function uk(t){const{sizeUnit:e,sizeStep:n}=t;return{sizeXXL:e*(n+8),sizeXL:e*(n+4),sizeLG:e*(n+2),sizeMD:e*(n+1),sizeMS:e*n,size:e*n,sizeSM:e*(n-1),sizeXS:e*(n-2),sizeXXS:e*(n-3)}}const ni=(t,e)=>new Vt(t).setA(e).toRgbString(),Ks=(t,e)=>new Vt(t).darken(e).toHexString(),dk=t=>{const e=Oa(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},fk=(t,e)=>{const n=t||"#fff",r=e||"#000";return{colorBgBase:n,colorTextBase:r,colorText:ni(r,.88),colorTextSecondary:ni(r,.65),colorTextTertiary:ni(r,.45),colorTextQuaternary:ni(r,.25),colorFill:ni(r,.15),colorFillSecondary:ni(r,.06),colorFillTertiary:ni(r,.04),colorFillQuaternary:ni(r,.02),colorBgSolid:ni(r,1),colorBgSolidHover:ni(r,.75),colorBgSolidActive:ni(r,.95),colorBgLayout:Ks(n,4),colorBgContainer:Ks(n,0),colorBgElevated:Ks(n,0),colorBgSpotlight:ni(r,.85),colorBgBlur:"transparent",colorBorder:Ks(n,15),colorBorderSecondary:Ks(n,6)}};function Wv(t){Eh.pink=Eh.magenta,kh.pink=kh.magenta;const e=Object.keys(Bv).map(n=>{const r=t[n]===Eh[n]?kh[n]:Oa(t[n]);return Array.from({length:10},()=>1).reduce((i,o,a)=>(i[`${n}-${a+1}`]=r[a],i[`${n}${a+1}`]=r[a],i),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),e),AC(t,{generateColorPalettes:dk,generateNeutralColorPalettes:fk})),ck(t.fontSize)),uk(t)),sk(t)),ak(t))}const QC=cp(Wv),Cd={token:Xl,override:{override:Xl},hashed:!0},NC=K.createContext(Cd),Zl="ant",Af="anticon",hk=["outlined","borderless","filled","underlined"],mk=(t,e)=>e||(t?`${Zl}-${t}`:Zl),lt=Tt({getPrefixCls:mk,iconPrefixCls:Af}),{Consumer:PK}=lt,$b={};function Zn(t){const e=he(lt),{getPrefixCls:n,direction:r,getPopupContainer:i}=e,o=e[t];return Object.assign(Object.assign({classNames:$b,styles:$b},o),{getPrefixCls:n,direction:r,getPopupContainer:i})}const pk=`-ant-${Date.now()}-${Math.random()}`;function gk(t,e){const n={},r=(a,s)=>{let l=a.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},i=(a,s)=>{const l=new Vt(a),c=Oa(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setA(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(e.primaryColor){i(e.primaryColor,"primary");const a=new Vt(e.primaryColor),s=Oa(a.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(a,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(a,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(a,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(a,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(a,c=>c.setA(c.a*.12));const l=new Vt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setA(c.a*.3)),n["primary-color-active-deprecated-d-02"]=r(l,c=>c.darken(2))}return e.successColor&&i(e.successColor,"success"),e.warningColor&&i(e.warningColor,"warning"),e.errorColor&&i(e.errorColor,"error"),e.infoColor&&i(e.infoColor,"info"),` :root { ${Object.keys(n).map(a=>`--${t}-${a}: ${n[a]};`).join(` `)} } - `.trim()}function nE(t,e){const n=tE(t,e);dr()&&so(n,`${eE}-dynamic-theme`)}const qi=bt(!1),Av=({children:t,disabled:e})=>{const n=fe(qi);return y(qi.Provider,{value:e??n},t)},va=bt(void 0),rE=({children:t,size:e})=>{const n=fe(va);return y(va.Provider,{value:e||n},t)};function iE(){const t=fe(qi),e=fe(va);return{componentDisabled:t,componentSize:e}}var S$=En(function t(){Mn(this,t)}),x$="CALC_UNIT",oE=new RegExp(x$,"g");function $h(t){return typeof t=="number"?"".concat(t).concat(x$):t}var aE=function(t){Ui(n,t);var e=Oo(n);function n(r,i){var o;Mn(this,n),o=e.call(this),D(Pt(o),"result",""),D(Pt(o),"unitlessCssVar",void 0),D(Pt(o),"lowPriority",void 0);var a=Je(r);return o.unitlessCssVar=i,r instanceof n?o.result="(".concat(r.result,")"):a==="number"?o.result=$h(r):a==="string"&&(o.result=r),o}return En(n,[{key:"add",value:function(i){return i instanceof n?this.result="".concat(this.result," + ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," + ").concat($h(i))),this.lowPriority=!0,this}},{key:"sub",value:function(i){return i instanceof n?this.result="".concat(this.result," - ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," - ").concat($h(i))),this.lowPriority=!0,this}},{key:"mul",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," * ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," * ").concat(i)),this.lowPriority=!1,this}},{key:"div",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," / ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," / ").concat(i)),this.lowPriority=!1,this}},{key:"getResult",value:function(i){return this.lowPriority||i?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(i){var o=this,a=i||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return o.result.includes(c)})&&(l=!1),this.result=this.result.replace(oE,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(S$),sE=function(t){Ui(n,t);var e=Oo(n);function n(r){var i;return Mn(this,n),i=e.call(this),D(Pt(i),"result",0),r instanceof n?i.result=r.result:typeof r=="number"&&(i.result=r),i}return En(n,[{key:"add",value:function(i){return i instanceof n?this.result+=i.result:typeof i=="number"&&(this.result+=i),this}},{key:"sub",value:function(i){return i instanceof n?this.result-=i.result:typeof i=="number"&&(this.result-=i),this}},{key:"mul",value:function(i){return i instanceof n?this.result*=i.result:typeof i=="number"&&(this.result*=i),this}},{key:"div",value:function(i){return i instanceof n?this.result/=i.result:typeof i=="number"&&(this.result/=i),this}},{key:"equal",value:function(){return this.result}}]),n}(S$),lE=function(e,n){var r=e==="css"?aE:sE;return function(i){return new r(i,n)}},fb=function(e,n){return"".concat([n,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function pn(t){var e=U();e.current=t;var n=Ht(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a1e4){var r=Date.now();this.lastAccessBeat.forEach(function(i,o){r-i>fE&&(n.map.delete(o),n.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),t}(),gb=new hE;function pE(t,e){return oe.useMemo(function(){var n=gb.get(e);if(n)return n;var r=t();return gb.set(e,r),r},e)}var mE=function(){return{}};function gE(t){var e=t.useCSP,n=e===void 0?mE:e,r=t.useToken,i=t.usePrefix,o=t.getResetStyles,a=t.getCommonStyle,s=t.getCompUnitless;function l(f,h,p,m){var g=Array.isArray(f)?f[0]:f;function v(w){return"".concat(String(g)).concat(w.slice(0,1).toUpperCase()).concat(w.slice(1))}var O=(m==null?void 0:m.unitless)||{},S=typeof s=="function"?s(f):{},x=W(W({},S),{},D({},v("zIndexPopup"),!0));Object.keys(O).forEach(function(w){x[v(w)]=O[w]});var b=W(W({},m),{},{unitless:x,prefixToken:v}),C=u(f,h,p,b),$=c(g,p,b);return function(w){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w,_=C(w,P),T=ae(_,2),R=T[1],k=$(P),I=ae(k,2),Q=I[0],M=I[1];return[Q,R,M]}}function c(f,h,p){var m=p.unitless,g=p.injectStyle,v=g===void 0?!0:g,O=p.prefixToken,S=p.ignore,x=function($){var w=$.rootCls,P=$.cssVar,_=P===void 0?{}:P,T=r(),R=T.realToken;return TM({path:[f],prefix:_.prefix,key:_.key,unitless:m,ignore:S,token:R,scope:w},function(){var k=mb(f,R,h),I=hb(f,R,k,{deprecatedTokens:p==null?void 0:p.deprecatedTokens});return Object.keys(k).forEach(function(Q){I[O(Q)]=I[Q],delete I[Q]}),I}),null},b=function($){var w=r(),P=w.cssVar;return[function(_){return v&&P?oe.createElement(oe.Fragment,null,oe.createElement(x,{rootCls:$,cssVar:P,component:f}),_):_},P==null?void 0:P.key]};return b}function u(f,h,p){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=Array.isArray(f)?f:[f,f],v=ae(g,1),O=v[0],S=g.join("-"),x=t.layer||{name:"antd"};return function(b){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:b,$=r(),w=$.theme,P=$.realToken,_=$.hashId,T=$.token,R=$.cssVar,k=i(),I=k.rootPrefixCls,Q=k.iconPrefixCls,M=n(),E=R?"css":"js",N=pE(function(){var X=new Set;return R&&Object.keys(m.unitless||{}).forEach(function(B){X.add(Nu(B,R.prefix)),X.add(Nu(B,fb(O,R.prefix)))}),lE(E,X)},[E,O,R==null?void 0:R.prefix]),z=dE(E),L=z.max,F=z.min,H={theme:w,token:T,hashId:_,nonce:function(){return M.nonce},clientOnly:m.clientOnly,layer:x,order:m.order||-999};typeof o=="function"&&im(W(W({},H),{},{clientOnly:!1,path:["Shared",I]}),function(){return o(T,{prefix:{rootPrefixCls:I,iconPrefixCls:Q},csp:M})});var V=im(W(W({},H),{},{path:[S,b,Q]}),function(){if(m.injectStyle===!1)return[];var X=uE(T),B=X.token,G=X.flush,se=mb(O,P,p),re=".".concat(b),le=hb(O,P,se,{deprecatedTokens:m.deprecatedTokens});R&&se&&Je(se)==="object"&&Object.keys(se).forEach(function(ue){se[ue]="var(".concat(Nu(ue,fb(O,R.prefix)),")")});var me=kt(B,{componentCls:re,prefixCls:b,iconCls:".".concat(Q),antCls:".".concat(I),calc:N,max:L,min:F},R?se:le),ie=h(me,{hashId:_,prefixCls:b,rootPrefixCls:I,iconPrefixCls:Q});G(O,le);var ne=typeof a=="function"?a(me,b,C,m.resetFont):null;return[m.resetStyle===!1?null:ne,ie]});return[V,_]}}function d(f,h,p){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=u(f,h,p,W({resetStyle:!1,order:-998},m)),v=function(S){var x=S.prefixCls,b=S.rootCls,C=b===void 0?x:b;return g(x,C),null};return v}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const Qo=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],vE="5.27.4";function Ph(t){return t>=0&&t<=255}function ul(t,e){const{r:n,g:r,b:i,a:o}=new Dt(t).toRgb();if(o<1)return t;const{r:a,g:s,b:l}=new Dt(e).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((i-l*(1-c))/c);if(Ph(u)&&Ph(d)&&Ph(f))return new Dt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Dt({r:n,g:r,b:i,a:1}).toRgbString()}var OE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{delete r[f]});const i=Object.assign(Object.assign({},n),r),o=480,a=576,s=768,l=992,c=1200,u=1600;if(i.motion===!1){const f="0s";i.motionDurationFast=f,i.motionDurationMid=f,i.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:ul(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:ul(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:ul(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:ul(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:` + `.trim()}function vk(t,e){const n=gk(t,e);pr()&&lo(n,`${pk}-dynamic-theme`)}const Ui=Tt(!1),Hv=({children:t,disabled:e})=>{const n=he(Ui);return b(Ui.Provider,{value:e??n},t)},ba=Tt(void 0),Ok=({children:t,size:e})=>{const n=he(ba);return b(ba.Provider,{value:e||n},t)};function bk(){const t=he(Ui),e=he(ba);return{componentDisabled:t,componentSize:e}}var zC=Qn(function t(){An(this,t)}),jC="CALC_UNIT",yk=new RegExp(jC,"g");function Ah(t){return typeof t=="number"?"".concat(t).concat(jC):t}var Sk=function(t){Ji(n,t);var e=yo(n);function n(r,i){var o;An(this,n),o=e.call(this),W(kt(o),"result",""),W(kt(o),"unitlessCssVar",void 0),W(kt(o),"lowPriority",void 0);var a=nt(r);return o.unitlessCssVar=i,r instanceof n?o.result="(".concat(r.result,")"):a==="number"?o.result=Ah(r):a==="string"&&(o.result=r),o}return Qn(n,[{key:"add",value:function(i){return i instanceof n?this.result="".concat(this.result," + ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," + ").concat(Ah(i))),this.lowPriority=!0,this}},{key:"sub",value:function(i){return i instanceof n?this.result="".concat(this.result," - ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," - ").concat(Ah(i))),this.lowPriority=!0,this}},{key:"mul",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," * ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," * ").concat(i)),this.lowPriority=!1,this}},{key:"div",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," / ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," / ").concat(i)),this.lowPriority=!1,this}},{key:"getResult",value:function(i){return this.lowPriority||i?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(i){var o=this,a=i||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return o.result.includes(c)})&&(l=!1),this.result=this.result.replace(yk,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(zC),xk=function(t){Ji(n,t);var e=yo(n);function n(r){var i;return An(this,n),i=e.call(this),W(kt(i),"result",0),r instanceof n?i.result=r.result:typeof r=="number"&&(i.result=r),i}return Qn(n,[{key:"add",value:function(i){return i instanceof n?this.result+=i.result:typeof i=="number"&&(this.result+=i),this}},{key:"sub",value:function(i){return i instanceof n?this.result-=i.result:typeof i=="number"&&(this.result-=i),this}},{key:"mul",value:function(i){return i instanceof n?this.result*=i.result:typeof i=="number"&&(this.result*=i),this}},{key:"div",value:function(i){return i instanceof n?this.result/=i.result:typeof i=="number"&&(this.result/=i),this}},{key:"equal",value:function(){return this.result}}]),n}(zC),$k=function(e,n){var r=e==="css"?Sk:xk;return function(i){return new r(i,n)}},Cb=function(e,n){return"".concat([n,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function bn(t){var e=ne();e.current=t;var n=Ut(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a1e4){var r=Date.now();this.lastAccessBeat.forEach(function(i,o){r-i>_k&&(n.map.delete(o),n.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),t}(),Tb=new Tk;function Rk(t,e){return K.useMemo(function(){var n=Tb.get(e);if(n)return n;var r=t();return Tb.set(e,r),r},e)}var Ik=function(){return{}};function Mk(t){var e=t.useCSP,n=e===void 0?Ik:e,r=t.useToken,i=t.usePrefix,o=t.getResetStyles,a=t.getCommonStyle,s=t.getCompUnitless;function l(f,h,m,p){var g=Array.isArray(f)?f[0]:f;function O(P){return"".concat(String(g)).concat(P.slice(0,1).toUpperCase()).concat(P.slice(1))}var v=(p==null?void 0:p.unitless)||{},y=typeof s=="function"?s(f):{},S=Z(Z({},y),{},W({},O("zIndexPopup"),!0));Object.keys(v).forEach(function(P){S[O(P)]=v[P]});var x=Z(Z({},p),{},{unitless:S,prefixToken:O}),$=u(f,h,m,x),C=c(g,m,x);return function(P){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P,_=$(P,w),R=le(_,2),I=R[1],T=C(w),M=le(T,2),Q=M[0],E=M[1];return[Q,I,E]}}function c(f,h,m){var p=m.unitless,g=m.injectStyle,O=g===void 0?!0:g,v=m.prefixToken,y=m.ignore,S=function(C){var P=C.rootCls,w=C.cssVar,_=w===void 0?{}:w,R=r(),I=R.realToken;return VE({path:[f],prefix:_.prefix,key:_.key,unitless:p,ignore:y,token:I,scope:P},function(){var T=_b(f,I,h),M=wb(f,I,T,{deprecatedTokens:m==null?void 0:m.deprecatedTokens});return Object.keys(T).forEach(function(Q){M[v(Q)]=M[Q],delete M[Q]}),M}),null},x=function(C){var P=r(),w=P.cssVar;return[function(_){return O&&w?K.createElement(K.Fragment,null,K.createElement(S,{rootCls:C,cssVar:w,component:f}),_):_},w==null?void 0:w.key]};return x}function u(f,h,m){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=Array.isArray(f)?f:[f,f],O=le(g,1),v=O[0],y=g.join("-"),S=t.layer||{name:"antd"};return function(x){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x,C=r(),P=C.theme,w=C.realToken,_=C.hashId,R=C.token,I=C.cssVar,T=i(),M=T.rootPrefixCls,Q=T.iconPrefixCls,E=n(),k=I?"css":"js",z=Rk(function(){var q=new Set;return I&&Object.keys(p.unitless||{}).forEach(function(N){q.add(Hu(N,I.prefix)),q.add(Hu(N,Cb(v,I.prefix)))}),$k(k,q)},[k,v,I==null?void 0:I.prefix]),L=Pk(k),B=L.max,F=L.min,H={theme:P,token:R,hashId:_,nonce:function(){return E.nonce},clientOnly:p.clientOnly,layer:S,order:p.order||-999};typeof o=="function"&&mp(Z(Z({},H),{},{clientOnly:!1,path:["Shared",M]}),function(){return o(R,{prefix:{rootPrefixCls:M,iconPrefixCls:Q},csp:E})});var X=mp(Z(Z({},H),{},{path:[y,x,Q]}),function(){if(p.injectStyle===!1)return[];var q=wk(R),N=q.token,j=q.flush,oe=_b(v,w,m),ee=".".concat(x),se=wb(v,w,oe,{deprecatedTokens:p.deprecatedTokens});I&&oe&&nt(oe)==="object"&&Object.keys(oe).forEach(function(ue){oe[ue]="var(".concat(Hu(ue,Cb(v,I.prefix)),")")});var fe=It(N,{componentCls:ee,prefixCls:x,iconCls:".".concat(Q),antCls:".".concat(M),calc:z,max:B,min:F},I?oe:se),re=h(fe,{hashId:_,prefixCls:x,rootPrefixCls:M,iconPrefixCls:Q});j(v,se);var J=typeof a=="function"?a(fe,x,$,p.resetFont):null;return[p.resetStyle===!1?null:J,re]});return[X,_]}}function d(f,h,m){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=u(f,h,m,Z({resetStyle:!1,order:-998},p)),O=function(y){var S=y.prefixCls,x=y.rootCls,$=x===void 0?S:x;return g(S,$),null};return O}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const No=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],Ek="5.27.4";function Nh(t){return t>=0&&t<=255}function hl(t,e){const{r:n,g:r,b:i,a:o}=new Vt(t).toRgb();if(o<1)return t;const{r:a,g:s,b:l}=new Vt(e).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((i-l*(1-c))/c);if(Nh(u)&&Nh(d)&&Nh(f))return new Vt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Vt({r:n,g:r,b:i,a:1}).toRgbString()}var kk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{delete r[f]});const i=Object.assign(Object.assign({},n),r),o=480,a=576,s=768,l=992,c=1200,u=1600;if(i.motion===!1){const f="0s";i.motionDurationFast=f,i.motionDurationMid=f,i.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:hl(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:hl(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:hl(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:hl(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) @@ -34,9 +34,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02) `,screenXS:o,screenXSMin:o,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:` - 0 1px 2px -2px ${new Dt("rgba(0, 0, 0, 0.16)").toRgbString()}, - 0 3px 6px 0 ${new Dt("rgba(0, 0, 0, 0.12)").toRgbString()}, - 0 5px 12px 4px ${new Dt("rgba(0, 0, 0, 0.09)").toRgbString()} + 0 1px 2px -2px ${new Vt("rgba(0, 0, 0, 0.16)").toRgbString()}, + 0 3px 6px 0 ${new Vt("rgba(0, 0, 0, 0.12)").toRgbString()}, + 0 5px 12px 4px ${new Vt("rgba(0, 0, 0, 0.09)").toRgbString()} `,boxShadowDrawerRight:` -6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), @@ -53,7 +53,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho 0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var vb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const r=n.getDerivativeToken(t),{override:i}=e,o=vb(e,["override"]);let a=Object.assign(Object.assign({},r),{override:i});return a=$$(a),o&&Object.entries(o).forEach(([s,l])=>{const{theme:c}=l,u=vb(l,["theme"]);let d=u;c&&(d=P$(Object.assign(Object.assign({},a),u),{override:u},c)),a[s]=d}),a};function Cr(){const{token:t,hashed:e,theme:n,override:r,cssVar:i}=oe.useContext(y$),o=`${vE}-${e||""}`,a=n||b$,[s,l,c]=eM(a,[Wl,t],{salt:o,override:r,getComputedToken:P$,formatToken:$$,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:w$,ignore:bE,preserve:yE}});return[a,c,e?l:"",s,i]}const ba={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},wn=(t,e=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:e?"inherit":t.fontFamily}),As=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),No=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),SE=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active, &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),xE=(t,e,n,r)=>{const i=`[class^="${e}"], [class*=" ${e}"]`,o=n?`.${n}`:i,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:t.fontFamily,fontSize:t.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},s),a),{[i]:a})}},wf=(t,e)=>({outline:`${q(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`,outlineOffset:e??1,transition:"outline-offset 0s, outline 0s"}),Ci=(t,e)=>({"&:focus-visible":wf(t,e)}),_$=t=>({[`.${t}`]:Object.assign(Object.assign({},As()),{[`.${t} .${t}-icon`]:{display:"block"}})}),T$=t=>Object.assign(Object.assign({color:t.colorLink,textDecoration:t.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},Ci(t)),{"&:hover":{color:t.colorLinkHover,textDecoration:t.linkHoverDecoration},"&:focus":{color:t.colorLinkHover,textDecoration:t.linkFocusDecoration},"&:active":{color:t.colorLinkActive,textDecoration:t.linkHoverDecoration}}),{genStyleHooks:Zt,genComponentStyleHook:CE,genSubStyleComponent:Qs}=gE({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:e}=fe(it);return{rootPrefixCls:t(),iconPrefixCls:e}},useToken:()=>{const[t,e,n,r,i]=Cr();return{theme:t,realToken:e,hashId:n,token:r,cssVar:i}},useCSP:()=>{const{csp:t}=fe(it);return t??{}},getResetStyles:(t,e)=>{var n;const r=SE(t);return[r,{"&":r},_$((n=e==null?void 0:e.prefix.iconPrefixCls)!==null&&n!==void 0?n:$f)]},getCommonStyle:xE,getCompUnitless:()=>w$});function k$(t,e){return Qo.reduce((n,r)=>{const i=t[`${r}1`],o=t[`${r}3`],a=t[`${r}6`],s=t[`${r}7`];return Object.assign(Object.assign({},n),e(r,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))},{})}const $E=(t,e)=>{const[n,r]=Cr();return im({token:r,hashId:"",path:["ant-design-icons",t],nonce:()=>e==null?void 0:e.nonce,layer:{name:"antd"}},()=>_$(t))},wE=Object.assign({},gc),{useId:Ob}=wE,PE=()=>"",_E=typeof Ob>"u"?PE:Ob;function TE(t,e,n){var r;bc();const i=t||{},o=i.inherit===!1||!e?Object.assign(Object.assign({},gd),{hashed:(r=e==null?void 0:e.hashed)!==null&&r!==void 0?r:gd.hashed,cssVar:e==null?void 0:e.cssVar}):e,a=_E();return vc(()=>{var s,l;if(!t)return e;const c=Object.assign({},o.components);Object.keys(t.components||{}).forEach(f=>{c[f]=Object.assign(Object.assign({},c[f]),t.components[f])});const u=`css-var-${a.replace(/:/g,"")}`,d=((s=i.cssVar)!==null&&s!==void 0?s:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof o.cssVar=="object"?o.cssVar:{}),typeof i.cssVar=="object"?i.cssVar:{}),{key:typeof i.cssVar=="object"&&((l=i.cssVar)===null||l===void 0?void 0:l.key)||u});return Object.assign(Object.assign(Object.assign({},o),i),{token:Object.assign(Object.assign({},o.token),i.token),components:c,cssVar:d})},[i,o],(s,l)=>s.some((c,u)=>{const d=l[u];return!Dl(c,d,!0)}))}var kE=["children"],R$=bt({});function RE(t){var e=t.children,n=ut(t,kE);return y(R$.Provider,{value:n},e)}var IE=function(t){Ui(n,t);var e=Oo(n);function n(){return Mn(this,n),e.apply(this,arguments)}return En(n,[{key:"render",value:function(){return this.props.children}}]),n}(er);function ME(t){var e=Ms(function(s){return s+1},0),n=ae(e,2),r=n[1],i=U(t),o=pn(function(){return i.current}),a=pn(function(s){i.current=typeof s=="function"?s(i.current):s,r()});return[o,a]}var xo="none",Yc="appear",Uc="enter",Kc="leave",bb="none",gi="prepare",Ya="start",Ua="active",Qv="end",I$="prepared";function yb(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function EE(t,e){var n={animationend:yb("Animation","AnimationEnd"),transitionend:yb("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var AE=EE(dr(),typeof window<"u"?window:{}),M$={};if(dr()){var QE=document.createElement("div");M$=QE.style}var Jc={};function E$(t){if(Jc[t])return Jc[t];var e=AE[t];if(e)for(var n=Object.keys(e),r=n.length,i=0;i1&&arguments[1]!==void 0?arguments[1]:2;e();var o=Xt(function(){i<=1?r({isCanceled:function(){return o!==t.current}}):n(r,i-1)});t.current=o}return be(function(){return function(){e()}},[]),[n,e]};var LE=[gi,Ya,Ua,Qv],jE=[gi,I$],L$=!1,DE=!0;function j$(t){return t===Ua||t===Qv}const BE=function(t,e,n){var r=Oa(bb),i=ae(r,2),o=i[0],a=i[1],s=zE(),l=ae(s,2),c=l[0],u=l[1];function d(){a(gi,!0)}var f=e?jE:LE;return z$(function(){if(o!==bb&&o!==Qv){var h=f.indexOf(o),p=f[h+1],m=n(o);m===L$?a(p,!0):p&&c(function(g){function v(){g.isCanceled()||a(p,!0)}m===!0?v():Promise.resolve(m).then(v)})}},[t,o]),be(function(){return function(){u()}},[]),[d,o]};function WE(t,e,n,r){var i=r.motionEnter,o=i===void 0?!0:i,a=r.motionAppear,s=a===void 0?!0:a,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,h=r.onEnterPrepare,p=r.onLeavePrepare,m=r.onAppearStart,g=r.onEnterStart,v=r.onLeaveStart,O=r.onAppearActive,S=r.onEnterActive,x=r.onLeaveActive,b=r.onAppearEnd,C=r.onEnterEnd,$=r.onLeaveEnd,w=r.onVisibleChanged,P=Oa(),_=ae(P,2),T=_[0],R=_[1],k=ME(xo),I=ae(k,2),Q=I[0],M=I[1],E=Oa(null),N=ae(E,2),z=N[0],L=N[1],F=Q(),H=U(!1),V=U(null);function X(){return n()}var B=U(!1);function G(){M(xo),L(null,!0)}var se=pn(function(te){var Oe=Q();if(Oe!==xo){var ye=X();if(!(te&&!te.deadline&&te.target!==ye)){var pe=B.current,Qe;Oe===Yc&&pe?Qe=b==null?void 0:b(ye,te):Oe===Uc&&pe?Qe=C==null?void 0:C(ye,te):Oe===Kc&&pe&&(Qe=$==null?void 0:$(ye,te)),pe&&Qe!==!1&&G()}}}),re=NE(se),le=ae(re,1),me=le[0],ie=function(Oe){switch(Oe){case Yc:return D(D(D({},gi,f),Ya,m),Ua,O);case Uc:return D(D(D({},gi,h),Ya,g),Ua,S);case Kc:return D(D(D({},gi,p),Ya,v),Ua,x);default:return{}}},ne=ge(function(){return ie(F)},[F]),ue=BE(F,!t,function(te){if(te===gi){var Oe=ne[gi];return Oe?Oe(X()):L$}if(ee in ne){var ye;L(((ye=ne[ee])===null||ye===void 0?void 0:ye.call(ne,X(),null))||null)}return ee===Ua&&F!==xo&&(me(X()),u>0&&(clearTimeout(V.current),V.current=setTimeout(function(){se({deadline:!0})},u))),ee===I$&&G(),DE}),de=ae(ue,2),j=de[0],ee=de[1],he=j$(ee);B.current=he;var ve=U(null);z$(function(){if(!(H.current&&ve.current===e)){R(e);var te=H.current;H.current=!0;var Oe;!te&&e&&s&&(Oe=Yc),te&&e&&o&&(Oe=Uc),(te&&!e&&c||!te&&d&&!e&&c)&&(Oe=Kc);var ye=ie(Oe);Oe&&(t||ye[gi])?(M(Oe),j()):M(xo),ve.current=e}},[e]),be(function(){(F===Yc&&!s||F===Uc&&!o||F===Kc&&!c)&&M(xo)},[s,o,c]),be(function(){return function(){H.current=!1,clearTimeout(V.current)}},[]);var Y=U(!1);be(function(){T&&(Y.current=!0),T!==void 0&&F===xo&&((Y.current||T)&&(w==null||w(T)),Y.current=!0)},[T,F]);var ce=z;return ne[gi]&&ee===Ya&&(ce=W({transition:"none"},ce)),[F,ee,ce,T??e]}function FE(t){var e=t;Je(t)==="object"&&(e=t.transitionSupport);function n(i,o){return!!(i.motionName&&e&&o!==!1)}var r=Se(function(i,o){var a=i.visible,s=a===void 0?!0:a,l=i.removeOnLeave,c=l===void 0?!0:l,u=i.forceRender,d=i.children,f=i.motionName,h=i.leavedClassName,p=i.eventProps,m=fe(R$),g=m.motion,v=n(i,g),O=U(),S=U();function x(){try{return O.current instanceof HTMLElement?O.current:Qu(S.current)}catch{return null}}var b=WE(v,s,x,i),C=ae(b,4),$=C[0],w=C[1],P=C[2],_=C[3],T=U(_);_&&(T.current=!0);var R=Ht(function(N){O.current=N,Sv(o,N)},[o]),k,I=W(W({},p),{},{visible:s});if(!d)k=null;else if($===xo)_?k=d(W({},I),R):!c&&T.current&&h?k=d(W(W({},I),{},{className:h}),R):u||!c&&!h?k=d(W(W({},I),{},{style:{display:"none"}}),R):k=null;else{var Q;w===gi?Q="prepare":j$(w)?Q="active":w===Ya&&(Q="start");var M=Cb(f,"".concat($,"-").concat(Q));k=d(W(W({},I),{},{className:Z(Cb(f,$),D(D({},M,M&&Q),f,typeof f=="string")),style:P}),R)}if(Kt(k)&&vo(k)){var E=Ho(k);E||(k=Xn(k,{ref:R}))}return y(IE,{ref:S},k)});return r.displayName="CSSMotion",r}const pi=FE(N$);var vm="add",Om="keep",bm="remove",_h="removed";function VE(t){var e;return t&&Je(t)==="object"&&"key"in t?e=t:e={key:t},W(W({},e),{},{key:String(e.key)})}function ym(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(VE)}function HE(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=e.length,o=ym(t),a=ym(e);o.forEach(function(c){for(var u=!1,d=r;d1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==bm}),n.forEach(function(u){u.key===c&&(u.status=Om)})}),n}var XE=["component","children","onVisibleChanged","onAllRemoved"],ZE=["status"],qE=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function GE(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pi,n=function(r){Ui(o,r);var i=Oo(o);function o(){var a;Mn(this,o);for(var s=arguments.length,l=new Array(s),c=0;cnull;var KE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);ie.endsWith("Color"))}const n5=t=>{const{prefixCls:e,iconPrefixCls:n,theme:r,holderRender:i}=t;e!==void 0&&(vd=e),n!==void 0&&(B$=n),"holderRender"in t&&(F$=i),r&&(t5(r)?nE(Vu(),r):W$=r)},V$=()=>({getPrefixCls:(t,e)=>e||(t?`${Vu()}-${t}`:Vu()),getIconPrefixCls:e5,getRootPrefixCls:()=>vd||Vu(),getTheme:()=>W$,holderRender:F$}),r5=t=>{const{children:e,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:o,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:d,virtual:f,dropdownMatchSelectWidth:h,popupMatchSelectWidth:p,popupOverflow:m,legacyLocale:g,parentContext:v,iconPrefixCls:O,theme:S,componentDisabled:x,segmented:b,statistic:C,spin:$,calendar:w,carousel:P,cascader:_,collapse:T,typography:R,checkbox:k,descriptions:I,divider:Q,drawer:M,skeleton:E,steps:N,image:z,layout:L,list:F,mentions:H,modal:V,progress:X,result:B,slider:G,breadcrumb:se,menu:re,pagination:le,input:me,textArea:ie,empty:ne,badge:ue,radio:de,rate:j,switch:ee,transfer:he,avatar:ve,message:Y,tag:ce,table:te,card:Oe,tabs:ye,timeline:pe,timePicker:Qe,upload:Me,notification:De,tree:we,colorPicker:Ie,datePicker:rt,rangePicker:Ye,flex:lt,wave:Be,dropdown:ke,warning:Xe,tour:_e,tooltip:Pe,popover:ct,popconfirm:xt,floatButton:Pn,floatButtonGroup:qt,variant:xn,inputNumber:gn,treeSelect:Bt}=t,Ot=Ht((tt,Ct)=>{const{prefixCls:$t}=t;if(Ct)return Ct;const wt=$t||v.getPrefixCls("");return tt?`${wt}-${tt}`:wt},[v.getPrefixCls,t.prefixCls]),ht=O||v.iconPrefixCls||$f,et=n||v.csp;$E(ht,et);const nt=TE(S,v.theme,{prefixCls:Ot("")}),Re={csp:et,autoInsertSpaceInButton:r,alert:i,anchor:o,locale:s||g,direction:c,space:u,splitter:d,virtual:f,popupMatchSelectWidth:p??h,popupOverflow:m,getPrefixCls:Ot,iconPrefixCls:ht,theme:nt,segmented:b,statistic:C,spin:$,calendar:w,carousel:P,cascader:_,collapse:T,typography:R,checkbox:k,descriptions:I,divider:Q,drawer:M,skeleton:E,steps:N,image:z,input:me,textArea:ie,layout:L,list:F,mentions:H,modal:V,progress:X,result:B,slider:G,breadcrumb:se,menu:re,pagination:le,empty:ne,badge:ue,radio:de,rate:j,switch:ee,transfer:he,avatar:ve,message:Y,tag:ce,table:te,card:Oe,tabs:ye,timeline:pe,timePicker:Qe,upload:Me,notification:De,tree:we,colorPicker:Ie,datePicker:rt,rangePicker:Ye,flex:lt,wave:Be,dropdown:ke,warning:Xe,tour:_e,tooltip:Pe,popover:ct,popconfirm:xt,floatButton:Pn,floatButtonGroup:qt,variant:xn,inputNumber:gn,treeSelect:Bt},ot=Object.assign({},v);Object.keys(Re).forEach(tt=>{Re[tt]!==void 0&&(ot[tt]=Re[tt])}),JE.forEach(tt=>{const Ct=t[tt];Ct&&(ot[tt]=Ct)}),typeof r<"u"&&(ot.button=Object.assign({autoInsertSpace:r},ot.button));const dt=vc(()=>ot,ot,(tt,Ct)=>{const $t=Object.keys(tt),wt=Object.keys(Ct);return $t.length!==wt.length||$t.some(Mt=>tt[Mt]!==Ct[Mt])}),{layer:Ee}=fe(Oc),Ze=ge(()=>({prefixCls:ht,csp:et,layer:Ee?"antd":void 0}),[ht,et,Ee]);let Ae=y(At,null,y(UE,{dropdownMatchSelectWidth:h}),e);const We=ge(()=>{var tt,Ct,$t,wt;return Ga(((tt=Zi.Form)===null||tt===void 0?void 0:tt.defaultValidateMessages)||{},(($t=(Ct=dt.locale)===null||Ct===void 0?void 0:Ct.Form)===null||$t===void 0?void 0:$t.defaultValidateMessages)||{},((wt=dt.form)===null||wt===void 0?void 0:wt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[dt,a==null?void 0:a.validateMessages]);Object.keys(We).length>0&&(Ae=y(h$.Provider,{value:We},Ae)),s&&(Ae=y(jM,{locale:s,_ANT_MARK__:LM},Ae)),Ae=y(Rv.Provider,{value:Ze},Ae),l&&(Ae=y(rE,{size:l},Ae)),Ae=y(YE,null,Ae);const st=ge(()=>{const tt=nt||{},{algorithm:Ct,token:$t,components:wt,cssVar:Mt}=tt,vn=KE(tt,["algorithm","token","components","cssVar"]),un=Ct&&(!Array.isArray(Ct)||Ct.length>0)?Jp(Ct):b$,Cn={};Object.entries(wt||{}).forEach(([Ut,nn])=>{const Te=Object.assign({},nn);"algorithm"in Te&&(Te.algorithm===!0?Te.theme=un:(Array.isArray(Te.algorithm)||typeof Te.algorithm=="function")&&(Te.theme=Jp(Te.algorithm)),delete Te.algorithm),Cn[Ut]=Te});const Ln=Object.assign(Object.assign({},Wl),$t);return Object.assign(Object.assign({},vn),{theme:un,token:Ln,components:Cn,override:Object.assign({override:Ln},Cn),cssVar:Mt})},[nt]);return S&&(Ae=y(y$.Provider,{value:st},Ae)),dt.warning&&(Ae=y(EM.Provider,{value:dt.warning},Ae)),x!==void 0&&(Ae=y(Av,{disabled:x},Ae)),y(it.Provider,{value:dt},Ae)},Gr=t=>{const e=fe(it),n=fe(Iv);return y(r5,Object.assign({parentContext:e,legacyLocale:n},t))};Gr.ConfigContext=it;Gr.SizeContext=va;Gr.config=n5;Gr.useConfig=iE;Object.defineProperty(Gr,"SizeContext",{get:()=>va});var i5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function H$(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function o5(t){return H$(t)instanceof ShadowRoot}function Od(t){return o5(t)?H$(t):null}function a5(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function s5(t,e){tr(t,"[@ant-design/icons] ".concat(e))}function wb(t){return Je(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(Je(t.icon)==="object"||typeof t.icon=="function")}function Pb(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var r=t[n];switch(n){case"class":e.className=r,delete e.class;break;default:delete e[n],e[a5(n)]=r}return e},{})}function Sm(t,e,n){return n?oe.createElement(t.tag,W(W({key:e},Pb(t.attrs)),n),(t.children||[]).map(function(r,i){return Sm(r,"".concat(e,"-").concat(t.tag,"-").concat(i))})):oe.createElement(t.tag,W({key:e},Pb(t.attrs)),(t.children||[]).map(function(r,i){return Sm(r,"".concat(e,"-").concat(t.tag,"-").concat(i))}))}function X$(t){return ga(t)[0]}function Z$(t){return t?Array.isArray(t)?t:[t]:[]}var l5=` + `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var Rb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const r=n.getDerivativeToken(t),{override:i}=e,o=Rb(e,["override"]);let a=Object.assign(Object.assign({},r),{override:i});return a=DC(a),o&&Object.entries(o).forEach(([s,l])=>{const{theme:c}=l,u=Rb(l,["theme"]);let d=u;c&&(d=WC(Object.assign(Object.assign({},a),u),{override:u},c)),a[s]=d}),a};function Or(){const{token:t,hashed:e,theme:n,override:r,cssVar:i}=K.useContext(NC),o=`${Ek}-${e||""}`,a=n||QC,[s,l,c]=gE(a,[Xl,t],{salt:o,override:r,getComputedToken:WC,formatToken:DC,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:BC,ignore:Ak,preserve:Qk}});return[a,c,e?l:"",s,i]}const Sa={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Sn=(t,e=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:e?"inherit":t.fontFamily}),zs=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),zo=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),Nk=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active, &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),zk=(t,e,n,r)=>{const i=`[class^="${e}"], [class*=" ${e}"]`,o=n?`.${n}`:i,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:t.fontFamily,fontSize:t.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},s),a),{[i]:a})}},xs=(t,e)=>({outline:`${V(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`,outlineOffset:e??1,transition:"outline-offset 0s, outline 0s"}),hi=(t,e)=>({"&:focus-visible":xs(t,e)}),HC=t=>({[`.${t}`]:Object.assign(Object.assign({},zs()),{[`.${t} .${t}-icon`]:{display:"block"}})}),VC=t=>Object.assign(Object.assign({color:t.colorLink,textDecoration:t.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},hi(t)),{"&:hover":{color:t.colorLinkHover,textDecoration:t.linkHoverDecoration},"&:focus":{color:t.colorLinkHover,textDecoration:t.linkFocusDecoration},"&:active":{color:t.colorLinkActive,textDecoration:t.linkHoverDecoration}}),{genStyleHooks:Ft,genComponentStyleHook:jk,genSubStyleComponent:Ea}=Mk({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:e}=he(lt);return{rootPrefixCls:t(),iconPrefixCls:e}},useToken:()=>{const[t,e,n,r,i]=Or();return{theme:t,realToken:e,hashId:n,token:r,cssVar:i}},useCSP:()=>{const{csp:t}=he(lt);return t??{}},getResetStyles:(t,e)=>{var n;const r=Nk(t);return[r,{"&":r},HC((n=e==null?void 0:e.prefix.iconPrefixCls)!==null&&n!==void 0?n:Af)]},getCommonStyle:zk,getCompUnitless:()=>BC});function FC(t,e){return No.reduce((n,r)=>{const i=t[`${r}1`],o=t[`${r}3`],a=t[`${r}6`],s=t[`${r}7`];return Object.assign(Object.assign({},n),e(r,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))},{})}const Lk=(t,e)=>{const[n,r]=Or();return mp({token:r,hashId:"",path:["ant-design-icons",t],nonce:()=>e==null?void 0:e.nonce,layer:{name:"antd"}},()=>HC(t))},Dk=Object.assign({},Sc),{useId:Ib}=Dk,Bk=()=>"",Wk=typeof Ib>"u"?Bk:Ib;function Hk(t,e,n){var r;Cc();const i=t||{},o=i.inherit===!1||!e?Object.assign(Object.assign({},Cd),{hashed:(r=e==null?void 0:e.hashed)!==null&&r!==void 0?r:Cd.hashed,cssVar:e==null?void 0:e.cssVar}):e,a=Wk();return xc(()=>{var s,l;if(!t)return e;const c=Object.assign({},o.components);Object.keys(t.components||{}).forEach(f=>{c[f]=Object.assign(Object.assign({},c[f]),t.components[f])});const u=`css-var-${a.replace(/:/g,"")}`,d=((s=i.cssVar)!==null&&s!==void 0?s:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof o.cssVar=="object"?o.cssVar:{}),typeof i.cssVar=="object"?i.cssVar:{}),{key:typeof i.cssVar=="object"&&((l=i.cssVar)===null||l===void 0?void 0:l.key)||u});return Object.assign(Object.assign(Object.assign({},o),i),{token:Object.assign(Object.assign({},o.token),i.token),components:c,cssVar:d})},[i,o],(s,l)=>s.some((c,u)=>{const d=l[u];return!Vl(c,d,!0)}))}var Vk=["children"],XC=Tt({});function Fk(t){var e=t.children,n=gt(t,Vk);return b(XC.Provider,{value:n},e)}var Xk=function(t){Ji(n,t);var e=yo(n);function n(){return An(this,n),e.apply(this,arguments)}return Qn(n,[{key:"render",value:function(){return this.props.children}}]),n}(ir);function Zk(t){var e=Qs(function(s){return s+1},0),n=le(e,2),r=n[1],i=ne(t),o=bn(function(){return i.current}),a=bn(function(s){i.current=typeof s=="function"?s(i.current):s,r()});return[o,a]}var Co="none",ru="appear",iu="enter",ou="leave",Mb="none",bi="prepare",es="start",ts="active",Vv="end",ZC="prepared";function Eb(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function qk(t,e){var n={animationend:Eb("Animation","AnimationEnd"),transitionend:Eb("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var Gk=qk(pr(),typeof window<"u"?window:{}),qC={};if(pr()){var Uk=document.createElement("div");qC=Uk.style}var au={};function GC(t){if(au[t])return au[t];var e=Gk[t];if(e)for(var n=Object.keys(e),r=n.length,i=0;i1&&arguments[1]!==void 0?arguments[1]:2;e();var o=Yt(function(){i<=1?r({isCanceled:function(){return o!==t.current}}):n(r,i-1)});t.current=o}return ye(function(){return function(){e()}},[]),[n,e]};var Jk=[bi,es,ts,Vv],e5=[bi,ZC],ew=!1,t5=!0;function tw(t){return t===ts||t===Vv}const n5=function(t,e,n){var r=ya(Mb),i=le(r,2),o=i[0],a=i[1],s=Kk(),l=le(s,2),c=l[0],u=l[1];function d(){a(bi,!0)}var f=e?e5:Jk;return JC(function(){if(o!==Mb&&o!==Vv){var h=f.indexOf(o),m=f[h+1],p=n(o);p===ew?a(m,!0):m&&c(function(g){function O(){g.isCanceled()||a(m,!0)}p===!0?O():Promise.resolve(p).then(O)})}},[t,o]),ye(function(){return function(){u()}},[]),[d,o]};function r5(t,e,n,r){var i=r.motionEnter,o=i===void 0?!0:i,a=r.motionAppear,s=a===void 0?!0:a,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,h=r.onEnterPrepare,m=r.onLeavePrepare,p=r.onAppearStart,g=r.onEnterStart,O=r.onLeaveStart,v=r.onAppearActive,y=r.onEnterActive,S=r.onLeaveActive,x=r.onAppearEnd,$=r.onEnterEnd,C=r.onLeaveEnd,P=r.onVisibleChanged,w=ya(),_=le(w,2),R=_[0],I=_[1],T=Zk(Co),M=le(T,2),Q=M[0],E=M[1],k=ya(null),z=le(k,2),L=z[0],B=z[1],F=Q(),H=ne(!1),X=ne(null);function q(){return n()}var N=ne(!1);function j(){E(Co),B(null,!0)}var oe=bn(function(pe){var Oe=Q();if(Oe!==Co){var be=q();if(!(pe&&!pe.deadline&&pe.target!==be)){var ge=N.current,Me;Oe===ru&&ge?Me=x==null?void 0:x(be,pe):Oe===iu&&ge?Me=$==null?void 0:$(be,pe):Oe===ou&&ge&&(Me=C==null?void 0:C(be,pe)),ge&&Me!==!1&&j()}}}),ee=Yk(oe),se=le(ee,1),fe=se[0],re=function(Oe){switch(Oe){case ru:return W(W(W({},bi,f),es,p),ts,v);case iu:return W(W(W({},bi,h),es,g),ts,y);case ou:return W(W(W({},bi,m),es,O),ts,S);default:return{}}},J=ve(function(){return re(F)},[F]),ue=n5(F,!t,function(pe){if(pe===bi){var Oe=J[bi];return Oe?Oe(q()):ew}if(Y in J){var be;B(((be=J[Y])===null||be===void 0?void 0:be.call(J,q(),null))||null)}return Y===ts&&F!==Co&&(fe(q()),u>0&&(clearTimeout(X.current),X.current=setTimeout(function(){oe({deadline:!0})},u))),Y===ZC&&j(),t5}),de=le(ue,2),D=de[0],Y=de[1],me=tw(Y);N.current=me;var G=ne(null);JC(function(){if(!(H.current&&G.current===e)){I(e);var pe=H.current;H.current=!0;var Oe;!pe&&e&&s&&(Oe=ru),pe&&e&&o&&(Oe=iu),(pe&&!e&&c||!pe&&d&&!e&&c)&&(Oe=ou);var be=re(Oe);Oe&&(t||be[bi])?(E(Oe),D()):E(Co),G.current=e}},[e]),ye(function(){(F===ru&&!s||F===iu&&!o||F===ou&&!c)&&E(Co)},[s,o,c]),ye(function(){return function(){H.current=!1,clearTimeout(X.current)}},[]);var ce=ne(!1);ye(function(){R&&(ce.current=!0),R!==void 0&&F===Co&&((ce.current||R)&&(P==null||P(R)),ce.current=!0)},[R,F]);var ae=L;return J[bi]&&Y===es&&(ae=Z({transition:"none"},ae)),[F,Y,ae,R??e]}function i5(t){var e=t;nt(t)==="object"&&(e=t.transitionSupport);function n(i,o){return!!(i.motionName&&e&&o!==!1)}var r=Se(function(i,o){var a=i.visible,s=a===void 0?!0:a,l=i.removeOnLeave,c=l===void 0?!0:l,u=i.forceRender,d=i.children,f=i.motionName,h=i.leavedClassName,m=i.eventProps,p=he(XC),g=p.motion,O=n(i,g),v=ne(),y=ne();function S(){try{return v.current instanceof HTMLElement?v.current:Wu(y.current)}catch{return null}}var x=r5(O,s,S,i),$=le(x,4),C=$[0],P=$[1],w=$[2],_=$[3],R=ne(_);_&&(R.current=!0);var I=Ut(function(z){v.current=z,Iv(o,z)},[o]),T,M=Z(Z({},m),{},{visible:s});if(!d)T=null;else if(C===Co)_?T=d(Z({},M),I):!c&&R.current&&h?T=d(Z(Z({},M),{},{className:h}),I):u||!c&&!h?T=d(Z(Z({},M),{},{style:{display:"none"}}),I):T=null;else{var Q;P===bi?Q="prepare":tw(P)?Q="active":P===es&&(Q="start");var E=Qb(f,"".concat(C,"-").concat(Q));T=d(Z(Z({},M),{},{className:U(Qb(f,C),W(W({},E,E&&Q),f,typeof f=="string")),style:w}),I)}if(en(T)&&bo(T)){var k=Xo(T);k||(T=Un(T,{ref:I}))}return b(Xk,{ref:y},T)});return r.displayName="CSSMotion",r}const vi=i5(KC);var _p="add",Tp="keep",Rp="remove",zh="removed";function o5(t){var e;return t&&nt(t)==="object"&&"key"in t?e=t:e={key:t},Z(Z({},e),{},{key:String(e.key)})}function Ip(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(o5)}function a5(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=e.length,o=Ip(t),a=Ip(e);o.forEach(function(c){for(var u=!1,d=r;d1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Rp}),n.forEach(function(u){u.key===c&&(u.status=Tp)})}),n}var s5=["component","children","onVisibleChanged","onAllRemoved"],l5=["status"],c5=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function u5(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vi,n=function(r){Ji(o,r);var i=yo(o);function o(){var a;An(this,o);for(var s=arguments.length,l=new Array(s),c=0;cnull;var h5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);ie.endsWith("Color"))}const v5=t=>{const{prefixCls:e,iconPrefixCls:n,theme:r,holderRender:i}=t;e!==void 0&&(wd=e),n!==void 0&&(rw=n),"holderRender"in t&&(ow=i),r&&(g5(r)?vk(Yu(),r):iw=r)},aw=()=>({getPrefixCls:(t,e)=>e||(t?`${Yu()}-${t}`:Yu()),getIconPrefixCls:p5,getRootPrefixCls:()=>wd||Yu(),getTheme:()=>iw,holderRender:ow}),O5=t=>{const{children:e,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:o,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:d,virtual:f,dropdownMatchSelectWidth:h,popupMatchSelectWidth:m,popupOverflow:p,legacyLocale:g,parentContext:O,iconPrefixCls:v,theme:y,componentDisabled:S,segmented:x,statistic:$,spin:C,calendar:P,carousel:w,cascader:_,collapse:R,typography:I,checkbox:T,descriptions:M,divider:Q,drawer:E,skeleton:k,steps:z,image:L,layout:B,list:F,mentions:H,modal:X,progress:q,result:N,slider:j,breadcrumb:oe,menu:ee,pagination:se,input:fe,textArea:re,empty:J,badge:ue,radio:de,rate:D,switch:Y,transfer:me,avatar:G,message:ce,tag:ae,table:pe,card:Oe,tabs:be,timeline:ge,timePicker:Me,upload:Ie,notification:He,tree:Ae,colorPicker:Ee,datePicker:st,rangePicker:Ye,flex:rt,wave:Be,dropdown:Re,warning:Xe,tour:_e,tooltip:Pe,popover:ft,popconfirm:yt,floatButton:xn,floatButtonGroup:Xt,variant:gn,inputNumber:fn,treeSelect:Dt}=t,Ct=Ut((tt,St)=>{const{prefixCls:Pt}=t;if(St)return St;const vt=Pt||O.getPrefixCls("");return tt?`${vt}-${tt}`:vt},[O.getPrefixCls,t.prefixCls]),ht=v||O.iconPrefixCls||Af,et=n||O.csp;Lk(ht,et);const it=Hk(y,O.theme,{prefixCls:Ct("")}),ke={csp:et,autoInsertSpaceInButton:r,alert:i,anchor:o,locale:s||g,direction:c,space:u,splitter:d,virtual:f,popupMatchSelectWidth:m??h,popupOverflow:p,getPrefixCls:Ct,iconPrefixCls:ht,theme:it,segmented:x,statistic:$,spin:C,calendar:P,carousel:w,cascader:_,collapse:R,typography:I,checkbox:T,descriptions:M,divider:Q,drawer:E,skeleton:k,steps:z,image:L,input:fe,textArea:re,layout:B,list:F,mentions:H,modal:X,progress:q,result:N,slider:j,breadcrumb:oe,menu:ee,pagination:se,empty:J,badge:ue,radio:de,rate:D,switch:Y,transfer:me,avatar:G,message:ce,tag:ae,table:pe,card:Oe,tabs:be,timeline:ge,timePicker:Me,upload:Ie,notification:He,tree:Ae,colorPicker:Ee,datePicker:st,rangePicker:Ye,flex:rt,wave:Be,dropdown:Re,warning:Xe,tour:_e,tooltip:Pe,popover:ft,popconfirm:yt,floatButton:xn,floatButtonGroup:Xt,variant:gn,inputNumber:fn,treeSelect:Dt},ct=Object.assign({},O);Object.keys(ke).forEach(tt=>{ke[tt]!==void 0&&(ct[tt]=ke[tt])}),m5.forEach(tt=>{const St=t[tt];St&&(ct[tt]=St)}),typeof r<"u"&&(ct.button=Object.assign({autoInsertSpace:r},ct.button));const Ke=xc(()=>ct,ct,(tt,St)=>{const Pt=Object.keys(tt),vt=Object.keys(St);return Pt.length!==vt.length||Pt.some(_t=>tt[_t]!==St[_t])}),{layer:we}=he($c),We=ve(()=>({prefixCls:ht,csp:et,layer:we?"antd":void 0}),[ht,et,we]);let Qe=b(Qt,null,b(f5,{dropdownMatchSelectWidth:h}),e);const Ve=ve(()=>{var tt,St,Pt,vt;return Ja(((tt=Gi.Form)===null||tt===void 0?void 0:tt.defaultValidateMessages)||{},((Pt=(St=Ke.locale)===null||St===void 0?void 0:St.Form)===null||Pt===void 0?void 0:Pt.defaultValidateMessages)||{},((vt=Ke.form)===null||vt===void 0?void 0:vt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[Ke,a==null?void 0:a.validateMessages]);Object.keys(Ve).length>0&&(Qe=b(TC.Provider,{value:Ve},Qe)),s&&(Qe=b(ek,{locale:s,_ANT_MARK__:JE},Qe)),Qe=b(Lv.Provider,{value:We},Qe),l&&(Qe=b(Ok,{size:l},Qe)),Qe=b(d5,null,Qe);const ut=ve(()=>{const tt=it||{},{algorithm:St,token:Pt,components:vt,cssVar:_t}=tt,hn=h5(tt,["algorithm","token","components","cssVar"]),sn=St&&(!Array.isArray(St)||St.length>0)?cp(St):QC,mn={};Object.entries(vt||{}).forEach(([Bt,Gt])=>{const Te=Object.assign({},Gt);"algorithm"in Te&&(Te.algorithm===!0?Te.theme=sn:(Array.isArray(Te.algorithm)||typeof Te.algorithm=="function")&&(Te.theme=cp(Te.algorithm)),delete Te.algorithm),mn[Bt]=Te});const Tn=Object.assign(Object.assign({},Xl),Pt);return Object.assign(Object.assign({},hn),{theme:sn,token:Tn,components:mn,override:Object.assign({override:Tn},mn),cssVar:_t})},[it]);return y&&(Qe=b(NC.Provider,{value:ut},Qe)),Ke.warning&&(Qe=b(GE.Provider,{value:Ke.warning},Qe)),S!==void 0&&(Qe=b(Hv,{disabled:S},Qe)),b(lt.Provider,{value:Ke},Qe)},Ur=t=>{const e=he(lt),n=he(Dv);return b(O5,Object.assign({parentContext:e,legacyLocale:n},t))};Ur.ConfigContext=lt;Ur.SizeContext=ba;Ur.config=v5;Ur.useConfig=bk;Object.defineProperty(Ur,"SizeContext",{get:()=>ba});var b5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function sw(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function y5(t){return sw(t)instanceof ShadowRoot}function Pd(t){return y5(t)?sw(t):null}function S5(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function x5(t,e){or(t,"[@ant-design/icons] ".concat(e))}function zb(t){return nt(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(nt(t.icon)==="object"||typeof t.icon=="function")}function jb(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var r=t[n];switch(n){case"class":e.className=r,delete e.class;break;default:delete e[n],e[S5(n)]=r}return e},{})}function Mp(t,e,n){return n?K.createElement(t.tag,Z(Z({key:e},jb(t.attrs)),n),(t.children||[]).map(function(r,i){return Mp(r,"".concat(e,"-").concat(t.tag,"-").concat(i))})):K.createElement(t.tag,Z({key:e},jb(t.attrs)),(t.children||[]).map(function(r,i){return Mp(r,"".concat(e,"-").concat(t.tag,"-").concat(i))}))}function lw(t){return Oa(t)[0]}function cw(t){return t?Array.isArray(t)?t:[t]:[]}var $5=` .anticon { display: inline-flex; align-items: center; @@ -108,9 +108,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho transform: rotate(360deg); } } -`,c5=function(e){var n=fe(Rv),r=n.csp,i=n.prefixCls,o=n.layer,a=l5;i&&(a=a.replace(/anticon/g,i)),o&&(a="@layer ".concat(o,` { +`,C5=function(e){var n=he(Lv),r=n.csp,i=n.prefixCls,o=n.layer,a=$5;i&&(a=a.replace(/anticon/g,i)),o&&(a="@layer ".concat(o,` { `).concat(a,` -}`)),be(function(){var s=e.current,l=Od(s);so(a,"@ant-design-icons",{prepend:!o,csp:r,attachTo:l})},[])},u5=["icon","className","onClick","style","primaryColor","secondaryColor"],Sl={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function d5(t){var e=t.primaryColor,n=t.secondaryColor;Sl.primaryColor=e,Sl.secondaryColor=n||X$(e),Sl.calculated=!!n}function f5(){return W({},Sl)}var Ns=function(e){var n=e.icon,r=e.className,i=e.onClick,o=e.style,a=e.primaryColor,s=e.secondaryColor,l=ut(e,u5),c=U(),u=Sl;if(a&&(u={primaryColor:a,secondaryColor:s||X$(a)}),c5(c),s5(wb(n),"icon should be icon definiton, but got ".concat(n)),!wb(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=W(W({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),Sm(d.icon,"svg-".concat(d.name),W(W({className:r,onClick:i,style:o,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};Ns.displayName="IconReact";Ns.getTwoToneColors=f5;Ns.setTwoToneColors=d5;function q$(t){var e=Z$(t),n=ae(e,2),r=n[0],i=n[1];return Ns.setTwoToneColors({primaryColor:r,secondaryColor:i})}function h5(){var t=Ns.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var p5=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];q$(md.primary);var Rt=Se(function(t,e){var n=t.className,r=t.icon,i=t.spin,o=t.rotate,a=t.tabIndex,s=t.onClick,l=t.twoToneColor,c=ut(t,p5),u=fe(Rv),d=u.prefixCls,f=d===void 0?"anticon":d,h=u.rootClassName,p=Z(h,f,D(D({},"".concat(f,"-").concat(r.name),!!r.name),"".concat(f,"-spin"),!!i||r.name==="loading"),n),m=a;m===void 0&&s&&(m=-1);var g=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,v=Z$(l),O=ae(v,2),S=O[0],x=O[1];return y("span",Ce({role:"img","aria-label":r.name},c,{ref:e,tabIndex:m,onClick:s,className:p}),y(Ns,{icon:r,primaryColor:S,secondaryColor:x,style:g}))});Rt.displayName="AntdIcon";Rt.getTwoToneColor=h5;Rt.setTwoToneColor=q$;var m5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:i5}))},Pf=Se(m5),g5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},v5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:g5}))},zs=Se(v5),O5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},b5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:O5}))},Vi=Se(b5),y5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},S5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:y5}))},Ls=Se(S5),x5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},C5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:x5}))},Nv=Se(C5),$5=`accept acceptCharset accessKey action allowFullScreen allowTransparency +}`)),ye(function(){var s=e.current,l=Pd(s);lo(a,"@ant-design-icons",{prepend:!o,csp:r,attachTo:l})},[])},w5=["icon","className","onClick","style","primaryColor","secondaryColor"],wl={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function P5(t){var e=t.primaryColor,n=t.secondaryColor;wl.primaryColor=e,wl.secondaryColor=n||lw(e),wl.calculated=!!n}function _5(){return Z({},wl)}var js=function(e){var n=e.icon,r=e.className,i=e.onClick,o=e.style,a=e.primaryColor,s=e.secondaryColor,l=gt(e,w5),c=ne(),u=wl;if(a&&(u={primaryColor:a,secondaryColor:s||lw(a)}),C5(c),x5(zb(n),"icon should be icon definiton, but got ".concat(n)),!zb(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=Z(Z({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),Mp(d.icon,"svg-".concat(d.name),Z(Z({className:r,onClick:i,style:o,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};js.displayName="IconReact";js.getTwoToneColors=_5;js.setTwoToneColors=P5;function uw(t){var e=cw(t),n=le(e,2),r=n[0],i=n[1];return js.setTwoToneColors({primaryColor:r,secondaryColor:i})}function T5(){var t=js.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var R5=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];uw($d.primary);var Mt=Se(function(t,e){var n=t.className,r=t.icon,i=t.spin,o=t.rotate,a=t.tabIndex,s=t.onClick,l=t.twoToneColor,c=gt(t,R5),u=he(Lv),d=u.prefixCls,f=d===void 0?"anticon":d,h=u.rootClassName,m=U(h,f,W(W({},"".concat(f,"-").concat(r.name),!!r.name),"".concat(f,"-spin"),!!i||r.name==="loading"),n),p=a;p===void 0&&s&&(p=-1);var g=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,O=cw(l),v=le(O,2),y=v[0],S=v[1];return b("span",xe({role:"img","aria-label":r.name},c,{ref:e,tabIndex:p,onClick:s,className:m}),b(js,{icon:r,primaryColor:y,secondaryColor:S,style:g}))});Mt.displayName="AntdIcon";Mt.getTwoToneColor=T5;Mt.setTwoToneColor=uw;var I5=function(e,n){return b(Mt,xe({},e,{ref:n,icon:b5}))},Qf=Se(I5),M5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},E5=function(e,n){return b(Mt,xe({},e,{ref:n,icon:M5}))},Ls=Se(E5),k5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},A5=function(e,n){return b(Mt,xe({},e,{ref:n,icon:k5}))},Xi=Se(A5),Q5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},N5=function(e,n){return b(Mt,xe({},e,{ref:n,icon:Q5}))},Ds=Se(N5),z5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},j5=function(e,n){return b(Mt,xe({},e,{ref:n,icon:z5}))},Fv=Se(j5),L5=`accept acceptCharset accessKey action allowFullScreen allowTransparency alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge charSet checked classID className colSpan cols content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable @@ -121,114 +121,114 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho optimum pattern placeholder poster preload radioGroup readOnly rel required reversed role rowSpan rows sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style - summary tabIndex target title type useMap value width wmode wrap`,w5=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown + summary tabIndex target title type useMap value width wmode wrap`,D5=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata - onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,P5="".concat($5," ").concat(w5).split(/[\s\n]+/),_5="aria-",T5="data-";function _b(t,e){return t.indexOf(e)===0}function $i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;e===!1?n={aria:!0,data:!0,attr:!0}:e===!0?n={aria:!0}:n=W({},e);var r={};return Object.keys(t).forEach(function(i){(n.aria&&(i==="role"||_b(i,_5))||n.data&&_b(i,T5)||n.attr&&P5.includes(i))&&(r[i]=t[i])}),r}function G$(t){return t&&oe.isValidElement(t)&&t.type===oe.Fragment}const zv=(t,e,n)=>oe.isValidElement(t)?oe.cloneElement(t,typeof n=="function"?n(t.props||{}):n):e;function fr(t,e){return zv(t,t,e)}const eu=(t,e,n,r,i)=>({background:t,border:`${q(r.lineWidth)} ${r.lineType} ${e}`,[`${i}-icon`]:{color:n}}),k5=t=>{const{componentCls:e,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:o,fontSizeLG:a,lineHeight:s,borderRadiusLG:l,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:h,defaultPadding:p}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{position:"relative",display:"flex",alignItems:"center",padding:p,wordWrap:"break-word",borderRadius:l,[`&${e}-rtl`]:{direction:"rtl"},[`${e}-content`]:{flex:1,minWidth:0},[`${e}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:s},"&-message":{color:f},[`&${e}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c}, + onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,B5="".concat(L5," ").concat(D5).split(/[\s\n]+/),W5="aria-",H5="data-";function Lb(t,e){return t.indexOf(e)===0}function mi(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;e===!1?n={aria:!0,data:!0,attr:!0}:e===!0?n={aria:!0}:n=Z({},e);var r={};return Object.keys(t).forEach(function(i){(n.aria&&(i==="role"||Lb(i,W5))||n.data&&Lb(i,H5)||n.attr&&B5.includes(i))&&(r[i]=t[i])}),r}function dw(t){return t&&K.isValidElement(t)&&t.type===K.Fragment}const Xv=(t,e,n)=>K.isValidElement(t)?K.cloneElement(t,typeof n=="function"?n(t.props||{}):n):e;function lr(t,e){return Xv(t,t,e)}const su=(t,e,n,r,i)=>({background:t,border:`${V(r.lineWidth)} ${r.lineType} ${e}`,[`${i}-icon`]:{color:n}}),V5=t=>{const{componentCls:e,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:o,fontSizeLG:a,lineHeight:s,borderRadiusLG:l,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:h,defaultPadding:m}=t;return{[e]:Object.assign(Object.assign({},Sn(t)),{position:"relative",display:"flex",alignItems:"center",padding:m,wordWrap:"break-word",borderRadius:l,[`&${e}-rtl`]:{direction:"rtl"},[`${e}-content`]:{flex:1,minWidth:0},[`${e}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:s},"&-message":{color:f},[`&${e}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c}, padding-top ${n} ${c}, padding-bottom ${n} ${c}, - margin-bottom ${n} ${c}`},[`&${e}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${e}-with-description`]:{alignItems:"flex-start",padding:h,[`${e}-icon`]:{marginInlineEnd:i,fontSize:u,lineHeight:0},[`${e}-message`]:{display:"block",marginBottom:r,color:f,fontSize:a},[`${e}-description`]:{display:"block",color:d}},[`${e}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},R5=t=>{const{componentCls:e,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:i,colorWarning:o,colorWarningBorder:a,colorWarningBg:s,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:h}=t;return{[e]:{"&-success":eu(i,r,n,t,e),"&-info":eu(h,f,d,t,e),"&-warning":eu(s,a,o,t,e),"&-error":Object.assign(Object.assign({},eu(u,c,l,t,e)),{[`${e}-description > pre`]:{margin:0,padding:0}})}}},I5=t=>{const{componentCls:e,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:o,colorIcon:a,colorIconHover:s}=t;return{[e]:{"&-action":{marginInlineStart:i},[`${e}-close-icon`]:{marginInlineStart:i,padding:0,overflow:"hidden",fontSize:o,lineHeight:q(o),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${r}`,"&:hover":{color:s}}},"&-close-text":{color:a,transition:`color ${r}`,"&:hover":{color:s}}}}},M5=t=>({withDescriptionIconSize:t.fontSizeHeading3,defaultPadding:`${t.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${t.paddingMD}px ${t.paddingContentHorizontalLG}px`}),E5=Zt("Alert",t=>[k5(t),R5(t),I5(t)],M5);var Tb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{icon:e,prefixCls:n,type:r}=t,i=A5[r]||null;return e?zv(e,y("span",{className:`${n}-icon`},e),()=>({className:Z(`${n}-icon`,e.props.className)})):y(i,{className:`${n}-icon`})},N5=t=>{const{isClosable:e,prefixCls:n,closeIcon:r,handleClose:i,ariaProps:o}=t,a=r===!0||r===void 0?y(Vi,null):r;return e?y("button",Object.assign({type:"button",onClick:i,className:`${n}-close-icon`,tabIndex:0},o),a):null},Y$=Se((t,e)=>{const{description:n,prefixCls:r,message:i,banner:o,className:a,rootClassName:s,style:l,onMouseEnter:c,onMouseLeave:u,onClick:d,afterClose:f,showIcon:h,closable:p,closeText:m,closeIcon:g,action:v,id:O}=t,S=Tb(t,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[x,b]=J(!1),C=U(null);Yt(e,()=>({nativeElement:C.current}));const{getPrefixCls:$,direction:w,closable:P,closeIcon:_,className:T,style:R}=rr("alert"),k=$("alert",r),[I,Q,M]=E5(k),E=B=>{var G;b(!0),(G=t.onClose)===null||G===void 0||G.call(t,B)},N=ge(()=>t.type!==void 0?t.type:o?"warning":"info",[t.type,o]),z=ge(()=>typeof p=="object"&&p.closeIcon||m?!0:typeof p=="boolean"?p:g!==!1&&g!==null&&g!==void 0?!0:!!P,[m,g,p,P]),L=o&&h===void 0?!0:h,F=Z(k,`${k}-${N}`,{[`${k}-with-description`]:!!n,[`${k}-no-icon`]:!L,[`${k}-banner`]:!!o,[`${k}-rtl`]:w==="rtl"},T,a,s,M,Q),H=$i(S,{aria:!0,data:!0}),V=ge(()=>typeof p=="object"&&p.closeIcon?p.closeIcon:m||(g!==void 0?g:typeof P=="object"&&P.closeIcon?P.closeIcon:_),[g,p,m,_]),X=ge(()=>{const B=p??P;if(typeof B=="object"){const{closeIcon:G}=B;return Tb(B,["closeIcon"])}return{}},[p,P]);return I(y(pi,{visible:!x,motionName:`${k}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:B=>({maxHeight:B.offsetHeight}),onLeaveEnd:f},({className:B,style:G},se)=>y("div",Object.assign({id:O,ref:pr(C,se),"data-show":!x,className:Z(F,B),style:Object.assign(Object.assign(Object.assign({},R),l),G),onMouseEnter:c,onMouseLeave:u,onClick:d,role:"alert"},H),L?y(Q5,{description:n,icon:t.icon,prefixCls:k,type:N}):null,y("div",{className:`${k}-content`},i?y("div",{className:`${k}-message`},i):null,n?y("div",{className:`${k}-description`},n):null),v?y("div",{className:`${k}-action`},v):null,y(N5,{isClosable:z,prefixCls:k,closeIcon:V,handleClose:E,ariaProps:X}))))});function z5(t,e,n){return e=ma(e),jC(t,yf()?Reflect.construct(e,n||[],ma(t).constructor):e.apply(t,n))}let L5=function(t){function e(){var n;return Mn(this,e),n=z5(this,e,arguments),n.state={error:void 0,info:{componentStack:""}},n}return Ui(e,t),En(e,[{key:"componentDidCatch",value:function(r,i){this.setState({error:r,info:i})}},{key:"render",value:function(){const{message:r,description:i,id:o,children:a}=this.props,{error:s,info:l}=this.state,c=(l==null?void 0:l.componentStack)||null,u=typeof r>"u"?(s||"").toString():r,d=typeof i>"u"?c:i;return s?y(Y$,{id:o,type:"error",message:u,description:y("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},d)}):a}}])}(er);const oa=Y$;oa.ErrorBoundary=L5;const kb=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Rb=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",tu=(t,e)=>{if(t.clientHeight{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeightoe||o>t&&a=e&&s>=n?o-t-r:a>e&&sn?a-e+i:0,j5=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},Ib=(t,e)=>{var n,r,i,o;if(typeof document>"u")return[];const{scrollMode:a,block:s,inline:l,boundary:c,skipOverflowHiddenElements:u}=e,d=typeof c=="function"?c:M=>M!==c;if(!kb(t))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,h=[];let p=t;for(;kb(p)&&d(p);){if(p=j5(p),p===f){h.push(p);break}p!=null&&p===document.body&&tu(p)&&!tu(document.documentElement)||p!=null&&tu(p,u)&&h.push(p)}const m=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,g=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:v,scrollY:O}=window,{height:S,width:x,top:b,right:C,bottom:$,left:w}=t.getBoundingClientRect(),{top:P,right:_,bottom:T,left:R}=(M=>{const E=window.getComputedStyle(M);return{top:parseFloat(E.scrollMarginTop)||0,right:parseFloat(E.scrollMarginRight)||0,bottom:parseFloat(E.scrollMarginBottom)||0,left:parseFloat(E.scrollMarginLeft)||0}})(t);let k=s==="start"||s==="nearest"?b-P:s==="end"?$+T:b+S/2-P+T,I=l==="center"?w+x/2-R+_:l==="end"?C+_:w-R;const Q=[];for(let M=0;M=0&&w>=0&&$<=g&&C<=m&&(E===f&&!tu(E)||b>=L&&$<=H&&w>=V&&C<=F))return Q;const X=getComputedStyle(E),B=parseInt(X.borderLeftWidth,10),G=parseInt(X.borderTopWidth,10),se=parseInt(X.borderRightWidth,10),re=parseInt(X.borderBottomWidth,10);let le=0,me=0;const ie="offsetWidth"in E?E.offsetWidth-E.clientWidth-B-se:0,ne="offsetHeight"in E?E.offsetHeight-E.clientHeight-G-re:0,ue="offsetWidth"in E?E.offsetWidth===0?0:z/E.offsetWidth:0,de="offsetHeight"in E?E.offsetHeight===0?0:N/E.offsetHeight:0;if(f===E)le=s==="start"?k:s==="end"?k-g:s==="nearest"?nu(O,O+g,g,G,re,O+k,O+k+S,S):k-g/2,me=l==="start"?I:l==="center"?I-m/2:l==="end"?I-m:nu(v,v+m,m,B,se,v+I,v+I+x,x),le=Math.max(0,le+O),me=Math.max(0,me+v);else{le=s==="start"?k-L-G:s==="end"?k-H+re+ne:s==="nearest"?nu(L,H,N,G,re+ne,k,k+S,S):k-(L+N/2)+ne/2,me=l==="start"?I-V-B:l==="center"?I-(V+z/2)+ie/2:l==="end"?I-F+se+ie:nu(V,F,z,B,se+ie,I,I+x,x);const{scrollLeft:j,scrollTop:ee}=E;le=de===0?0:Math.max(0,Math.min(ee+le/de,E.scrollHeight-N/de+ne)),me=ue===0?0:Math.max(0,Math.min(j+me/ue,E.scrollWidth-z/ue+ie)),k+=ee-le,I+=j-me}Q.push({el:E,top:le,left:me})}return Q},D5=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function B5(t,e){if(!t.isConnected||!(i=>{let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(t))return;const n=(i=>{const o=window.getComputedStyle(i);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(Ib(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:o,left:a}of Ib(t,D5(e))){const s=o-n.top+n.bottom,l=a-n.left+n.right;i.scroll({top:s,left:l,behavior:r})}}const $r=t=>{const[,,,,e]=Cr();return e?`${t}-css-var`:""};var je={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},U$=Se(function(t,e){var n=t.prefixCls,r=t.style,i=t.className,o=t.duration,a=o===void 0?4.5:o,s=t.showProgress,l=t.pauseOnHover,c=l===void 0?!0:l,u=t.eventKey,d=t.content,f=t.closable,h=t.closeIcon,p=h===void 0?"x":h,m=t.props,g=t.onClick,v=t.onNoticeClose,O=t.times,S=t.hovering,x=J(!1),b=ae(x,2),C=b[0],$=b[1],w=J(0),P=ae(w,2),_=P[0],T=P[1],R=J(0),k=ae(R,2),I=k[0],Q=k[1],M=S||C,E=a>0&&s,N=function(){v(u)},z=function(B){(B.key==="Enter"||B.code==="Enter"||B.keyCode===je.ENTER)&&N()};be(function(){if(!M&&a>0){var X=Date.now()-I,B=setTimeout(function(){N()},a*1e3-I);return function(){c&&clearTimeout(B),Q(Date.now()-X)}}},[a,M,O]),be(function(){if(!M&&E&&(c||I===0)){var X=performance.now(),B,G=function se(){cancelAnimationFrame(B),B=requestAnimationFrame(function(re){var le=re+I-X,me=Math.min(le/(a*1e3),1);T(me*100),me<1&&se()})};return G(),function(){c&&cancelAnimationFrame(B)}}},[a,I,M,E,O]);var L=ge(function(){return Je(f)==="object"&&f!==null?f:f?{closeIcon:p}:{}},[f,p]),F=$i(L,!0),H=100-(!_||_<0?0:_>100?100:_),V="".concat(n,"-notice");return y("div",Ce({},m,{ref:e,className:Z(V,i,D({},"".concat(V,"-closable"),f)),style:r,onMouseEnter:function(B){var G;$(!0),m==null||(G=m.onMouseEnter)===null||G===void 0||G.call(m,B)},onMouseLeave:function(B){var G;$(!1),m==null||(G=m.onMouseLeave)===null||G===void 0||G.call(m,B)},onClick:g}),y("div",{className:"".concat(V,"-content")},d),f&&y("a",Ce({tabIndex:0,className:"".concat(V,"-close"),onKeyDown:z,"aria-label":"Close"},F,{onClick:function(B){B.preventDefault(),B.stopPropagation(),N()}}),L.closeIcon),E&&y("progress",{className:"".concat(V,"-progress"),max:"100",value:H},H+"%"))}),K$=oe.createContext({}),W5=function(e){var n=e.children,r=e.classNames;return oe.createElement(K$.Provider,{value:{classNames:r}},n)},Mb=8,Eb=3,Ab=16,F5=function(e){var n={offset:Mb,threshold:Eb,gap:Ab};if(e&&Je(e)==="object"){var r,i,o;n.offset=(r=e.offset)!==null&&r!==void 0?r:Mb,n.threshold=(i=e.threshold)!==null&&i!==void 0?i:Eb,n.gap=(o=e.gap)!==null&&o!==void 0?o:Ab}return[!!e,n]},V5=["className","style","classNames","styles"],H5=function(e){var n=e.configList,r=e.placement,i=e.prefixCls,o=e.className,a=e.style,s=e.motion,l=e.onAllNoticeRemoved,c=e.onNoticeClose,u=e.stack,d=fe(K$),f=d.classNames,h=U({}),p=J(null),m=ae(p,2),g=m[0],v=m[1],O=J([]),S=ae(O,2),x=S[0],b=S[1],C=n.map(function(M){return{config:M,key:String(M.key)}}),$=F5(u),w=ae($,2),P=w[0],_=w[1],T=_.offset,R=_.threshold,k=_.gap,I=P&&(x.length>0||C.length<=R),Q=typeof s=="function"?s(r):s;return be(function(){P&&x.length>1&&b(function(M){return M.filter(function(E){return C.some(function(N){var z=N.key;return E===z})})})},[x,C,P]),be(function(){var M;if(P&&h.current[(M=C[C.length-1])===null||M===void 0?void 0:M.key]){var E;v(h.current[(E=C[C.length-1])===null||E===void 0?void 0:E.key])}},[C,P]),oe.createElement(D$,Ce({key:r,className:Z(i,"".concat(i,"-").concat(r),f==null?void 0:f.list,o,D(D({},"".concat(i,"-stack"),!!P),"".concat(i,"-stack-expanded"),I)),style:a,keys:C,motionAppear:!0},Q,{onAllRemoved:function(){l(r)}}),function(M,E){var N=M.config,z=M.className,L=M.style,F=M.index,H=N,V=H.key,X=H.times,B=String(V),G=N,se=G.className,re=G.style,le=G.classNames,me=G.styles,ie=ut(G,V5),ne=C.findIndex(function(pe){return pe.key===B}),ue={};if(P){var de=C.length-1-(ne>-1?ne:F-1),j=r==="top"||r==="bottom"?"-50%":"0";if(de>0){var ee,he,ve;ue.height=I?(ee=h.current[B])===null||ee===void 0?void 0:ee.offsetHeight:g==null?void 0:g.offsetHeight;for(var Y=0,ce=0;ce-1?h.current[B]=Qe:delete h.current[B]},prefixCls:i,classNames:le,styles:me,className:Z(se,f==null?void 0:f.notice),style:re,times:X,key:V,eventKey:V,onNoticeClose:c,hovering:P&&x.length>0})))})},X5=Se(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-notification":n,i=t.container,o=t.motion,a=t.maxCount,s=t.className,l=t.style,c=t.onAllRemoved,u=t.stack,d=t.renderNotifications,f=J([]),h=ae(f,2),p=h[0],m=h[1],g=function(P){var _,T=p.find(function(R){return R.key===P});T==null||(_=T.onClose)===null||_===void 0||_.call(T),m(function(R){return R.filter(function(k){return k.key!==P})})};Yt(e,function(){return{open:function(P){m(function(_){var T=$e(_),R=T.findIndex(function(Q){return Q.key===P.key}),k=W({},P);if(R>=0){var I;k.times=(((I=_[R])===null||I===void 0?void 0:I.times)||0)+1,T[R]=k}else k.times=0,T.push(k);return a>0&&T.length>a&&(T=T.slice(-a)),T})},close:function(P){g(P)},destroy:function(){m([])}}});var v=J({}),O=ae(v,2),S=O[0],x=O[1];be(function(){var w={};p.forEach(function(P){var _=P.placement,T=_===void 0?"topRight":_;T&&(w[T]=w[T]||[],w[T].push(P))}),Object.keys(S).forEach(function(P){w[P]=w[P]||[]}),x(w)},[p]);var b=function(P){x(function(_){var T=W({},_),R=T[P]||[];return R.length||delete T[P],T})},C=U(!1);if(be(function(){Object.keys(S).length>0?C.current=!0:C.current&&(c==null||c(),C.current=!1)},[S]),!i)return null;var $=Object.keys(S);return lf(y(At,null,$.map(function(w){var P=S[w],_=y(H5,{key:w,configList:P,placement:w,prefixCls:r,className:s==null?void 0:s(w),style:l==null?void 0:l(w),motion:o,onNoticeClose:g,onAllNoticeRemoved:b,stack:u});return d?d(_,{prefixCls:r,key:w}):_})),i)}),Z5=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],q5=function(){return document.body},Qb=0;function G5(){for(var t={},e=arguments.length,n=new Array(e),r=0;r0&&arguments[0]!==void 0?arguments[0]:{},e=t.getContainer,n=e===void 0?q5:e,r=t.motion,i=t.prefixCls,o=t.maxCount,a=t.className,s=t.style,l=t.onAllRemoved,c=t.stack,u=t.renderNotifications,d=ut(t,Z5),f=J(),h=ae(f,2),p=h[0],m=h[1],g=U(),v=y(X5,{container:p,ref:g,prefixCls:i,motion:r,maxCount:o,className:a,style:s,onAllRemoved:l,stack:c,renderNotifications:u}),O=J([]),S=ae(O,2),x=S[0],b=S[1],C=pn(function(w){var P=G5(d,w);(P.key===null||P.key===void 0)&&(P.key="rc-notification-".concat(Qb),Qb+=1),b(function(_){return[].concat($e(_),[{type:"open",config:P}])})}),$=ge(function(){return{open:C,close:function(P){b(function(_){return[].concat($e(_),[{type:"close",key:P}])})},destroy:function(){b(function(P){return[].concat($e(P),[{type:"destroy"}])})}}},[]);return be(function(){m(n())}),be(function(){if(g.current&&x.length){x.forEach(function(_){switch(_.type){case"open":g.current.open(_.config);break;case"close":g.current.close(_.key);break;case"destroy":g.current.destroy();break}});var w,P;b(function(_){return(w!==_||!P)&&(w=_,P=_.filter(function(T){return!x.includes(T)})),P})}},[x]),[$,v]}var U5={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},K5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:U5}))},yc=Se(K5);const _f=oe.createContext(void 0),Co=100,J5=10,J$=Co*J5,ew={Modal:Co,Drawer:Co,Popover:Co,Popconfirm:Co,Tooltip:Co,Tour:Co,FloatButton:Co},eA={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function tA(t){return t in ew}const Sc=(t,e)=>{const[,n]=Cr(),r=oe.useContext(_f),i=tA(t);let o;if(e!==void 0)o=[e,e];else{let a=r??0;i?a+=(r?0:n.zIndexPopupBase)+ew[t]:a+=eA[t],o=[r===void 0?e:a,a]}return o};function nA(){const[t,e]=J([]),n=Ht(r=>(e(i=>[].concat($e(i),[r])),()=>{e(i=>i.filter(o=>o!==r))}),[]);return[t,n]}function tw(t,e){this.v=t,this.k=e}function or(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}or=function(a,s,l,c){function u(d,f){or(a,d,function(h){return this._invoke(d,f,h)})}s?i?i(a,s,{value:l,enumerable:!c,configurable:!c,writable:!c}):a[s]=l:(u("next",0),u("throw",1),u("return",2))},or(t,e,n,r)}function Lv(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(h,p,m,g){var v=p&&p.prototype instanceof s?p:s,O=Object.create(v.prototype);return or(O,"_invoke",function(S,x,b){var C,$,w,P=0,_=b||[],T=!1,R={p:0,n:0,v:t,a:k,f:k.bind(t,4),d:function(Q,M){return C=Q,$=0,w=t,R.n=M,a}};function k(I,Q){for($=I,w=Q,e=0;!T&&P&&!M&&e<_.length;e++){var M,E=_[e],N=R.p,z=E[2];I>3?(M=z===Q)&&(w=E[($=E[4])?5:($=3,3)],E[4]=E[5]=t):E[0]<=N&&((M=I<2&&NQ||Q>z)&&(E[4]=I,E[5]=Q,R.n=z,$=0))}if(M||I>1)return a;throw T=!0,Q}return function(I,Q,M){if(P>1)throw TypeError("Generator is already running");for(T&&Q===1&&k(Q,M),$=Q,w=M;(e=$<2?t:w)||!T;){C||($?$<3?($>1&&(R.n=-1),k($,w)):R.n=w:R.v=w);try{if(P=2,C){if($||(I="next"),e=C[I]){if(!(e=e.call(C,w)))throw TypeError("iterator result is not an object");if(!e.done)return e;w=e.value,$<2&&($=0)}else $===1&&(e=C.return)&&e.call(C),$<2&&(w=TypeError("The iterator does not provide a '"+I+"' method"),$=1);C=t}else if((e=(T=R.n<0)?w:S.call(x,R))!==a)break}catch(E){C=t,$=1,w=E}finally{P=1}}return{value:e,done:T}}}(h,m,g),!0),O}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(or(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,or(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,or(d,"constructor",c),or(c,"constructor",l),l.displayName="GeneratorFunction",or(c,i,"GeneratorFunction"),or(d),or(d,i,"Generator"),or(d,r,function(){return this}),or(d,"toString",function(){return"[object Generator]"}),(Lv=function(){return{w:o,m:f}})()}function bd(t,e){function n(i,o,a,s){try{var l=t[i](o),c=l.value;return c instanceof tw?e.resolve(c.v).then(function(u){n("next",u,a,s)},function(u){n("throw",u,a,s)}):e.resolve(c).then(function(u){l.value=u,a(l)},function(u){return n("throw",u,a,s)})}catch(u){s(u)}}var r;this.next||(or(bd.prototype),or(bd.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),or(this,"_invoke",function(i,o,a){function s(){return new e(function(l,c){n(i,a,l,c)})}return r=r?r.then(s,s):s()},!0)}function nw(t,e,n,r,i){return new bd(Lv().w(t,e,n,r),i||Promise)}function rA(t,e,n,r,i){var o=nw(t,e,n,r,i);return o.next().then(function(a){return a.done?a.value:o.next()})}function iA(t){var e=Object(t),n=[];for(var r in e)n.unshift(r);return function i(){for(;n.length;)if((r=n.pop())in e)return i.value=r,i.done=!1,i;return i.done=!0,i}}function Nb(t){if(t!=null){var e=t[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(Je(t)+" is not iterable")}function hr(){var t=Lv(),e=t.m(hr),n=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function r(a){var s=typeof a=="function"&&a.constructor;return!!s&&(s===n||(s.displayName||s.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function o(a){var s,l;return function(c){s||(s={stop:function(){return l(c.a,2)},catch:function(){return c.v},abrupt:function(d,f){return l(c.a,i[d],f)},delegateYield:function(d,f,h){return s.resultName=f,l(c.d,Nb(d),h)},finish:function(d){return l(c.f,d)}},l=function(d,f,h){c.p=s.prev,c.n=s.next;try{return d(f,h)}finally{s.next=c.n}}),s.resultName&&(s[s.resultName]=c.v,s.resultName=void 0),s.sent=c.v,s.next=c.n;try{return a.call(this,s)}finally{c.p=s.prev,c.n=s.next}}}return(hr=function(){return{wrap:function(l,c,u,d){return t.w(o(l),c,u,d&&d.reverse())},isGeneratorFunction:r,mark:t.m,awrap:function(l,c){return new tw(l,c)},AsyncIterator:bd,async:function(l,c,u,d,f){return(r(c)?nw:rA)(o(l),c,u,d,f)},keys:iA,values:Nb}})()}function zb(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function ka(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(l){zb(o,r,i,a,s,"next",l)}function s(l){zb(o,r,i,a,s,"throw",l)}a(void 0)})}}var xc=W({},gc),oA=xc.version,Th=xc.render,aA=xc.unmountComponentAtNode,Tf;try{var sA=Number((oA||"").split(".")[0]);sA>=18&&(Tf=xc.createRoot)}catch{}function Lb(t){var e=xc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&Je(e)==="object"&&(e.usingClientEntryPoint=t)}var yd="__rc_react_root__";function lA(t,e){Lb(!0);var n=e[yd]||Tf(e);Lb(!1),n.render(t),e[yd]=n}function cA(t,e){Th==null||Th(t,e)}function uA(t,e){if(Tf){lA(t,e);return}cA(t,e)}function dA(t){return xm.apply(this,arguments)}function xm(){return xm=ka(hr().mark(function t(e){return hr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=e[yd])===null||i===void 0||i.unmount(),delete e[yd]}));case 1:case"end":return r.stop()}},t)})),xm.apply(this,arguments)}function fA(t){aA(t)}function hA(t){return Cm.apply(this,arguments)}function Cm(){return Cm=ka(hr().mark(function t(e){return hr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Tf===void 0){r.next=2;break}return r.abrupt("return",dA(e));case 2:fA(e);case 3:case"end":return r.stop()}},t)})),Cm.apply(this,arguments)}const pA=(t,e)=>(uA(t,e),()=>hA(e));let mA=pA;function jv(t){return mA}const kh=()=>({height:0,opacity:0}),jb=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},gA=t=>({height:t?t.offsetHeight:0}),Rh=(t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height",Sd=(t=Fl)=>({motionName:`${t}-motion-collapse`,onAppearStart:kh,onEnterStart:kh,onAppearActive:jb,onEnterActive:jb,onLeaveStart:gA,onLeaveActive:kh,onAppearEnd:Rh,onEnterEnd:Rh,onLeaveEnd:Rh,motionDeadline:500}),zo=(t,e,n)=>n!==void 0?n:`${t}-${e}`;function cn(t,e){var n=Object.assign({},t);return Array.isArray(e)&&e.forEach(function(r){delete n[r]}),n}const kf=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),n=e.width,r=e.height;if(n||r)return!0}if(t.getBoundingClientRect){var i=t.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1},vA=t=>{const{componentCls:e,colorPrimary:n}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${t.motionDurationSlow} ${t.motionEaseInOut}`,`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`].join(",")}}}}},OA=CE("Wave",vA),rw=`${Fl}-wave-target`;function bA(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"&&t!=="canvastext"}function yA(t){var e;const{borderTopColor:n,borderColor:r,backgroundColor:i}=getComputedStyle(t);return(e=[n,r,i].find(bA))!==null&&e!==void 0?e:null}function Ih(t){return Number.isNaN(t)?0:t}const SA=t=>{const{className:e,target:n,component:r,registerUnmount:i}=t,o=U(null),a=U(null);be(()=>{a.current=i()},[]);const[s,l]=J(null),[c,u]=J([]),[d,f]=J(0),[h,p]=J(0),[m,g]=J(0),[v,O]=J(0),[S,x]=J(!1),b={left:d,top:h,width:m,height:v,borderRadius:c.map(w=>`${w}px`).join(" ")};s&&(b["--wave-color"]=s);function C(){const w=getComputedStyle(n);l(yA(n));const P=w.position==="static",{borderLeftWidth:_,borderTopWidth:T}=w;f(P?n.offsetLeft:Ih(-parseFloat(_))),p(P?n.offsetTop:Ih(-parseFloat(T))),g(n.offsetWidth),O(n.offsetHeight);const{borderTopLeftRadius:R,borderTopRightRadius:k,borderBottomLeftRadius:I,borderBottomRightRadius:Q}=w;u([R,k,Q,I].map(M=>Ih(parseFloat(M))))}if(be(()=>{if(n){const w=Xt(()=>{C(),x(!0)});let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(C),P.observe(n)),()=>{Xt.cancel(w),P==null||P.disconnect()}}},[]),!S)return null;const $=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(rw));return y(pi,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(w,P)=>{var _,T;if(P.deadline||P.propertyName==="opacity"){const R=(_=o.current)===null||_===void 0?void 0:_.parentElement;(T=a.current)===null||T===void 0||T.call(a).then(()=>{R==null||R.remove()})}return!1}},({className:w},P)=>y("div",{ref:pr(o,P),className:Z(e,w,{"wave-quick":$}),style:b}))},xA=(t,e)=>{var n;const{component:r}=e;if(r==="Checkbox"&&!(!((n=t.querySelector("input"))===null||n===void 0)&&n.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",t==null||t.insertBefore(i,t==null?void 0:t.firstChild);const o=jv();let a=null;function s(){return a}a=o(y(SA,Object.assign({},e,{target:t,registerUnmount:s})),i)},CA=(t,e,n)=>{const{wave:r}=fe(it),[,i,o]=Cr(),a=pn(c=>{const u=t.current;if(r!=null&&r.disabled||!u)return;const d=u.querySelector(`.${rw}`)||u,{showEffect:f}=r||{};(f||xA)(d,{className:e,token:i,component:n,event:c,hashId:o})}),s=U(null);return c=>{Xt.cancel(s.current),s.current=Xt(()=>{a(c)})}},Dv=t=>{const{children:e,disabled:n,component:r}=t,{getPrefixCls:i}=fe(it),o=U(null),a=i("wave"),[,s]=OA(a),l=CA(o,Z(a,s),r);if(oe.useEffect(()=>{const u=o.current;if(!u||u.nodeType!==window.Node.ELEMENT_NODE||n)return;const d=f=>{!kf(f.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")&&!u.className.includes("disabled:")||u.getAttribute("aria-disabled")==="true"||u.className.includes("-leave")||l(f)};return u.addEventListener("click",d,!0),()=>{u.removeEventListener("click",d,!0)}},[n]),!oe.isValidElement(e))return e??null;const c=vo(e)?pr(Ho(e),o):o;return fr(e,{ref:c})},Dr=t=>{const e=oe.useContext(va);return oe.useMemo(()=>t?typeof t=="string"?t??e:typeof t=="function"?t(e):e:e,[t,e])},$A=t=>{const{componentCls:e}=t;return{[e]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},wA=t=>{const{componentCls:e,antCls:n}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item:empty`]:{display:"none"},[`${e}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},PA=t=>{const{componentCls:e}=t;return{[e]:{"&-gap-row-small":{rowGap:t.spaceGapSmallSize},"&-gap-row-middle":{rowGap:t.spaceGapMiddleSize},"&-gap-row-large":{rowGap:t.spaceGapLargeSize},"&-gap-col-small":{columnGap:t.spaceGapSmallSize},"&-gap-col-middle":{columnGap:t.spaceGapMiddleSize},"&-gap-col-large":{columnGap:t.spaceGapLargeSize}}}},iw=Zt("Space",t=>{const e=kt(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[wA(e),PA(e),$A(e)]},()=>({}),{resetStyle:!1});var ow=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=fe(Rf),r=ge(()=>{if(!n)return"";const{compactDirection:i,isFirstItem:o,isLastItem:a}=n,s=i==="vertical"?"-vertical-":"-";return Z(`${t}-compact${s}item`,{[`${t}-compact${s}first-item`]:o,[`${t}-compact${s}last-item`]:a,[`${t}-compact${s}item-rtl`]:e==="rtl"})},[t,e,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},_A=t=>{const{children:e}=t;return y(Rf.Provider,{value:null},e)},TA=t=>{const{children:e}=t,n=ow(t,["children"]);return y(Rf.Provider,{value:ge(()=>n,[n])},e)},kA=t=>{const{getPrefixCls:e,direction:n}=fe(it),{size:r,direction:i,block:o,prefixCls:a,className:s,rootClassName:l,children:c}=t,u=ow(t,["size","direction","block","prefixCls","className","rootClassName","children"]),d=Dr(S=>r??S),f=e("space-compact",a),[h,p]=iw(f),m=Z(f,p,{[`${f}-rtl`]:n==="rtl",[`${f}-block`]:o,[`${f}-vertical`]:i==="vertical"},s,l),g=fe(Rf),v=nr(c),O=ge(()=>v.map((S,x)=>{const b=(S==null?void 0:S.key)||`${f}-item-${x}`;return y(TA,{key:b,compactSize:d,compactDirection:i,isFirstItem:x===0&&(!g||(g==null?void 0:g.isFirstItem)),isLastItem:x===v.length-1&&(!g||(g==null?void 0:g.isLastItem))},S)}),[r,v,g]);return v.length===0?null:h(y("div",Object.assign({className:m},u),O))};var RA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:e,direction:n}=fe(it),{prefixCls:r,size:i,className:o}=t,a=RA(t,["prefixCls","size","className"]),s=e("btn-group",r),[,,l]=Cr(),c=ge(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]),u=Z(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},o,l);return y(aw.Provider,{value:i},y("div",Object.assign({},a,{className:u})))},Db=/^[\u4E00-\u9FA5]{2}$/,$m=Db.test.bind(Db);function Bv(t){return t==="danger"?{danger:!0}:{type:t}}function Bb(t){return typeof t=="string"}function Mh(t){return t==="text"||t==="link"}function MA(t,e){if(t==null)return;const n=e?" ":"";return typeof t!="string"&&typeof t!="number"&&Bb(t.type)&&$m(t.props.children)?fr(t,{children:t.props.children.split("").join(n)}):Bb(t)?$m(t)?oe.createElement("span",null,t.split("").join(n)):oe.createElement("span",null,t):G$(t)?oe.createElement("span",null,t):t}function EA(t,e){let n=!1;const r=[];return oe.Children.forEach(t,i=>{const o=typeof i,a=o==="string"||o==="number";if(n&&a){const s=r.length-1,l=r[s];r[s]=`${l}${i}`}else r.push(i);n=a}),oe.Children.map(r,i=>MA(i,e))}["default","primary","danger"].concat($e(Qo));const wm=Se((t,e)=>{const{className:n,style:r,children:i,prefixCls:o}=t,a=Z(`${o}-icon`,n);return oe.createElement("span",{ref:e,className:a,style:r},i)}),Wb=Se((t,e)=>{const{prefixCls:n,className:r,style:i,iconClassName:o}=t,a=Z(`${n}-loading-icon`,r);return oe.createElement(wm,{prefixCls:n,className:a,style:i,ref:e},oe.createElement(yc,{className:o}))}),Eh=()=>({width:0,opacity:0,transform:"scale(0)"}),Ah=t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),AA=t=>{const{prefixCls:e,loading:n,existIcon:r,className:i,style:o,mount:a}=t,s=!!n;return r?oe.createElement(Wb,{prefixCls:e,className:i,style:o}):oe.createElement(pi,{visible:s,motionName:`${e}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Eh,onAppearActive:Ah,onEnterStart:Eh,onEnterActive:Ah,onLeaveStart:Ah,onLeaveActive:Eh},({className:l,style:c},u)=>{const d=Object.assign(Object.assign({},o),c);return oe.createElement(Wb,{prefixCls:e,className:Z(i,l),style:d,ref:u})})},Fb=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),QA=t=>{const{componentCls:e,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:o}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:t.calc(r).mul(-1).equal(),[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:n}},Fb(`${e}-primary`,i),Fb(`${e}-danger`,o)]}};var NA=["b"],zA=["v"],Qh=function(e){return Math.round(Number(e||0))},LA=function(e){if(e instanceof Dt)return e;if(e&&Je(e)==="object"&&"h"in e&&"b"in e){var n=e,r=n.b,i=ut(n,NA);return W(W({},i),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},Vl=function(t){Ui(n,t);var e=Oo(n);function n(r){return Mn(this,n),e.call(this,LA(r))}return En(n,[{key:"toHsbString",value:function(){var i=this.toHsb(),o=Qh(i.s*100),a=Qh(i.b*100),s=Qh(i.h),l=i.a,c="hsb(".concat(s,", ").concat(o,"%, ").concat(a,"%)"),u="hsba(".concat(s,", ").concat(o,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?c:u}},{key:"toHsb",value:function(){var i=this.toHsv(),o=i.v,a=ut(i,zA);return W(W({},a),{},{b:o,a:this.a})}}]),n}(Dt),jA=function(e){return e instanceof Vl?e:new Vl(e)};jA("#1677ff");const DA=(t,e)=>(t==null?void 0:t.replace(/[^\w/]/g,"").slice(0,e?8:6))||"",BA=(t,e)=>t?DA(t,e):"";let Pm=function(){function t(e){Mn(this,t);var n;if(this.cleared=!1,e instanceof t){this.metaColor=e.metaColor.clone(),this.colors=(n=e.colors)===null||n===void 0?void 0:n.map(i=>({color:new t(i.color),percent:i.percent})),this.cleared=e.cleared;return}const r=Array.isArray(e);r&&e.length?(this.colors=e.map(({color:i,percent:o})=>({color:new t(i),percent:o})),this.metaColor=new Vl(this.colors[0].color.metaColor)):this.metaColor=new Vl(r?"":e),(!e||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return En(t,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return BA(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(i=>`${i.color.toRgbString()} ${i.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,i)=>{const o=n.colors[i];return r.percent===o.percent&&r.color.equals(o.color)}):this.toHexString()===n.toHexString()}}])}();var WA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},FA=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:WA}))},xd=Se(FA),sw=oe.forwardRef(function(t,e){var n=t.prefixCls,r=t.forceRender,i=t.className,o=t.style,a=t.children,s=t.isActive,l=t.role,c=t.classNames,u=t.styles,d=oe.useState(s||r),f=ae(d,2),h=f[0],p=f[1];return oe.useEffect(function(){(r||s)&&p(!0)},[r,s]),h?oe.createElement("div",{ref:e,className:Z("".concat(n,"-content"),D(D({},"".concat(n,"-content-active"),s),"".concat(n,"-content-inactive"),!s),i),style:o,role:l},oe.createElement("div",{className:Z("".concat(n,"-content-box"),c==null?void 0:c.body),style:u==null?void 0:u.body},a)):null});sw.displayName="PanelContent";var VA=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],lw=oe.forwardRef(function(t,e){var n=t.showArrow,r=n===void 0?!0:n,i=t.headerClass,o=t.isActive,a=t.onItemClick,s=t.forceRender,l=t.className,c=t.classNames,u=c===void 0?{}:c,d=t.styles,f=d===void 0?{}:d,h=t.prefixCls,p=t.collapsible,m=t.accordion,g=t.panelKey,v=t.extra,O=t.header,S=t.expandIcon,x=t.openMotion,b=t.destroyInactivePanel,C=t.children,$=ut(t,VA),w=p==="disabled",P=v!=null&&typeof v!="boolean",_=D(D(D({onClick:function(){a==null||a(g)},onKeyDown:function(E){(E.key==="Enter"||E.keyCode===je.ENTER||E.which===je.ENTER)&&(a==null||a(g))},role:m?"tab":"button"},"aria-expanded",o),"aria-disabled",w),"tabIndex",w?-1:0),T=typeof S=="function"?S(t):oe.createElement("i",{className:"arrow"}),R=T&&oe.createElement("div",Ce({className:"".concat(h,"-expand-icon")},["header","icon"].includes(p)?_:{}),T),k=Z("".concat(h,"-item"),D(D({},"".concat(h,"-item-active"),o),"".concat(h,"-item-disabled"),w),l),I=Z(i,"".concat(h,"-header"),D({},"".concat(h,"-collapsible-").concat(p),!!p),u.header),Q=W({className:I,style:f.header},["header","icon"].includes(p)?{}:_);return oe.createElement("div",Ce({},$,{ref:e,className:k}),oe.createElement("div",Q,r&&R,oe.createElement("span",Ce({className:"".concat(h,"-header-text")},p==="header"?_:{}),O),P&&oe.createElement("div",{className:"".concat(h,"-extra")},v)),oe.createElement(pi,Ce({visible:o,leavedClassName:"".concat(h,"-content-hidden")},x,{forceRender:s,removeOnLeave:b}),function(M,E){var N=M.className,z=M.style;return oe.createElement(sw,{ref:E,prefixCls:h,className:N,classNames:u,style:z,styles:f,isActive:o,forceRender:s,role:m?"tabpanel":void 0},C)}))}),HA=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],XA=function(e,n){var r=n.prefixCls,i=n.accordion,o=n.collapsible,a=n.destroyInactivePanel,s=n.onItemClick,l=n.activeKey,c=n.openMotion,u=n.expandIcon;return e.map(function(d,f){var h=d.children,p=d.label,m=d.key,g=d.collapsible,v=d.onItemClick,O=d.destroyInactivePanel,S=ut(d,HA),x=String(m??f),b=g??o,C=O??a,$=function(_){b!=="disabled"&&(s(_),v==null||v(_))},w=!1;return i?w=l[0]===x:w=l.indexOf(x)>-1,oe.createElement(lw,Ce({},S,{prefixCls:r,key:x,panelKey:x,isActive:w,accordion:i,openMotion:c,expandIcon:u,header:p,collapsible:b,onItemClick:$,destroyInactivePanel:C}),h)})},ZA=function(e,n,r){if(!e)return null;var i=r.prefixCls,o=r.accordion,a=r.collapsible,s=r.destroyInactivePanel,l=r.onItemClick,c=r.activeKey,u=r.openMotion,d=r.expandIcon,f=e.key||String(n),h=e.props,p=h.header,m=h.headerClass,g=h.destroyInactivePanel,v=h.collapsible,O=h.onItemClick,S=!1;o?S=c[0]===f:S=c.indexOf(f)>-1;var x=v??a,b=function(w){x!=="disabled"&&(l(w),O==null||O(w))},C={key:f,panelKey:f,header:p,headerClass:m,isActive:S,prefixCls:i,destroyInactivePanel:g??s,openMotion:u,accordion:o,children:e.props.children,onItemClick:b,expandIcon:d,collapsible:x};return typeof e.type=="string"?e:(Object.keys(C).forEach(function($){typeof C[$]>"u"&&delete C[$]}),oe.cloneElement(e,C))};function qA(t,e,n){return Array.isArray(t)?XA(t,n):nr(e).map(function(r,i){return ZA(r,i,n)})}function GA(t){var e=t;if(!Array.isArray(e)){var n=Je(e);e=n==="number"||n==="string"?[e]:[]}return e.map(function(r){return String(r)})}var YA=oe.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-collapse":n,i=t.destroyInactivePanel,o=i===void 0?!1:i,a=t.style,s=t.accordion,l=t.className,c=t.children,u=t.collapsible,d=t.openMotion,f=t.expandIcon,h=t.activeKey,p=t.defaultActiveKey,m=t.onChange,g=t.items,v=Z(r,l),O=_n([],{value:h,onChange:function(P){return m==null?void 0:m(P)},defaultValue:p,postState:GA}),S=ae(O,2),x=S[0],b=S[1],C=function(P){return b(function(){if(s)return x[0]===P?[]:[P];var _=x.indexOf(P),T=_>-1;return T?x.filter(function(R){return R!==P}):[].concat($e(x),[P])})};tr(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var $=qA(g,c,{prefixCls:r,accordion:s,openMotion:d,expandIcon:f,collapsible:u,destroyInactivePanel:o,onItemClick:C,activeKey:x});return oe.createElement("div",Ce({ref:e,className:v,style:a,role:s?"tablist":void 0},$i(t,{aria:!0,data:!0})),$)});const Wv=Object.assign(YA,{Panel:lw});Wv.Panel;const UA=Se((t,e)=>{const{getPrefixCls:n}=fe(it),{prefixCls:r,className:i,showArrow:o=!0}=t,a=n("collapse",r),s=Z({[`${a}-no-arrow`]:!o},i);return y(Wv.Panel,Object.assign({ref:e},t,{prefixCls:a,className:s}))}),Fv=t=>({[t.componentCls]:{[`${t.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${t.motionDurationMid} ${t.motionEaseInOut}, + margin-bottom ${n} ${c}`},[`&${e}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${e}-with-description`]:{alignItems:"flex-start",padding:h,[`${e}-icon`]:{marginInlineEnd:i,fontSize:u,lineHeight:0},[`${e}-message`]:{display:"block",marginBottom:r,color:f,fontSize:a},[`${e}-description`]:{display:"block",color:d}},[`${e}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},F5=t=>{const{componentCls:e,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:i,colorWarning:o,colorWarningBorder:a,colorWarningBg:s,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:h}=t;return{[e]:{"&-success":su(i,r,n,t,e),"&-info":su(h,f,d,t,e),"&-warning":su(s,a,o,t,e),"&-error":Object.assign(Object.assign({},su(u,c,l,t,e)),{[`${e}-description > pre`]:{margin:0,padding:0}})}}},X5=t=>{const{componentCls:e,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:o,colorIcon:a,colorIconHover:s}=t;return{[e]:{"&-action":{marginInlineStart:i},[`${e}-close-icon`]:{marginInlineStart:i,padding:0,overflow:"hidden",fontSize:o,lineHeight:V(o),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${r}`,"&:hover":{color:s}}},"&-close-text":{color:a,transition:`color ${r}`,"&:hover":{color:s}}}}},Z5=t=>({withDescriptionIconSize:t.fontSizeHeading3,defaultPadding:`${t.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${t.paddingMD}px ${t.paddingContentHorizontalLG}px`}),q5=Ft("Alert",t=>[V5(t),F5(t),X5(t)],Z5);var Db=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{icon:e,prefixCls:n,type:r}=t,i=G5[r]||null;return e?Xv(e,b("span",{className:`${n}-icon`},e),()=>({className:U(`${n}-icon`,e.props.className)})):b(i,{className:`${n}-icon`})},Y5=t=>{const{isClosable:e,prefixCls:n,closeIcon:r,handleClose:i,ariaProps:o}=t,a=r===!0||r===void 0?b(Xi,null):r;return e?b("button",Object.assign({type:"button",onClick:i,className:`${n}-close-icon`,tabIndex:0},o),a):null},fw=Se((t,e)=>{const{description:n,prefixCls:r,message:i,banner:o,className:a,rootClassName:s,style:l,onMouseEnter:c,onMouseLeave:u,onClick:d,afterClose:f,showIcon:h,closable:m,closeText:p,closeIcon:g,action:O,id:v}=t,y=Db(t,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[S,x]=te(!1),$=ne(null);Jt(e,()=>({nativeElement:$.current}));const{getPrefixCls:C,direction:P,closable:w,closeIcon:_,className:R,style:I}=Zn("alert"),T=C("alert",r),[M,Q,E]=q5(T),k=N=>{var j;x(!0),(j=t.onClose)===null||j===void 0||j.call(t,N)},z=ve(()=>t.type!==void 0?t.type:o?"warning":"info",[t.type,o]),L=ve(()=>typeof m=="object"&&m.closeIcon||p?!0:typeof m=="boolean"?m:g!==!1&&g!==null&&g!==void 0?!0:!!w,[p,g,m,w]),B=o&&h===void 0?!0:h,F=U(T,`${T}-${z}`,{[`${T}-with-description`]:!!n,[`${T}-no-icon`]:!B,[`${T}-banner`]:!!o,[`${T}-rtl`]:P==="rtl"},R,a,s,E,Q),H=mi(y,{aria:!0,data:!0}),X=ve(()=>typeof m=="object"&&m.closeIcon?m.closeIcon:p||(g!==void 0?g:typeof w=="object"&&w.closeIcon?w.closeIcon:_),[g,m,p,_]),q=ve(()=>{const N=m??w;if(typeof N=="object"){const{closeIcon:j}=N;return Db(N,["closeIcon"])}return{}},[m,w]);return M(b(vi,{visible:!S,motionName:`${T}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:N=>({maxHeight:N.offsetHeight}),onLeaveEnd:f},({className:N,style:j},oe)=>b("div",Object.assign({id:v,ref:vr($,oe),"data-show":!S,className:U(F,N),style:Object.assign(Object.assign(Object.assign({},I),l),j),onMouseEnter:c,onMouseLeave:u,onClick:d,role:"alert"},H),B?b(U5,{description:n,icon:t.icon,prefixCls:T,type:z}):null,b("div",{className:`${T}-content`},i?b("div",{className:`${T}-message`},i):null,n?b("div",{className:`${T}-description`},n):null),O?b("div",{className:`${T}-action`},O):null,b(Y5,{isClosable:L,prefixCls:T,closeIcon:X,handleClose:k,ariaProps:q}))))});function K5(t,e,n){return e=va(e),eC(t,If()?Reflect.construct(e,n||[],va(t).constructor):e.apply(t,n))}let J5=function(t){function e(){var n;return An(this,e),n=K5(this,e,arguments),n.state={error:void 0,info:{componentStack:""}},n}return Ji(e,t),Qn(e,[{key:"componentDidCatch",value:function(r,i){this.setState({error:r,info:i})}},{key:"render",value:function(){const{message:r,description:i,id:o,children:a}=this.props,{error:s,info:l}=this.state,c=(l==null?void 0:l.componentStack)||null,u=typeof r>"u"?(s||"").toString():r,d=typeof i>"u"?c:i;return s?b(fw,{id:o,type:"error",message:u,description:b("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},d)}):a}}])}(ir);const sa=fw;sa.ErrorBoundary=J5;const Bb=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Wb=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",lu=(t,e)=>{if(t.clientHeight{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeightoe||o>t&&a=e&&s>=n?o-t-r:a>e&&sn?a-e+i:0,eA=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},Hb=(t,e)=>{var n,r,i,o;if(typeof document>"u")return[];const{scrollMode:a,block:s,inline:l,boundary:c,skipOverflowHiddenElements:u}=e,d=typeof c=="function"?c:E=>E!==c;if(!Bb(t))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,h=[];let m=t;for(;Bb(m)&&d(m);){if(m=eA(m),m===f){h.push(m);break}m!=null&&m===document.body&&lu(m)&&!lu(document.documentElement)||m!=null&&lu(m,u)&&h.push(m)}const p=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,g=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:O,scrollY:v}=window,{height:y,width:S,top:x,right:$,bottom:C,left:P}=t.getBoundingClientRect(),{top:w,right:_,bottom:R,left:I}=(E=>{const k=window.getComputedStyle(E);return{top:parseFloat(k.scrollMarginTop)||0,right:parseFloat(k.scrollMarginRight)||0,bottom:parseFloat(k.scrollMarginBottom)||0,left:parseFloat(k.scrollMarginLeft)||0}})(t);let T=s==="start"||s==="nearest"?x-w:s==="end"?C+R:x+y/2-w+R,M=l==="center"?P+S/2-I+_:l==="end"?$+_:P-I;const Q=[];for(let E=0;E=0&&P>=0&&C<=g&&$<=p&&(k===f&&!lu(k)||x>=B&&C<=H&&P>=X&&$<=F))return Q;const q=getComputedStyle(k),N=parseInt(q.borderLeftWidth,10),j=parseInt(q.borderTopWidth,10),oe=parseInt(q.borderRightWidth,10),ee=parseInt(q.borderBottomWidth,10);let se=0,fe=0;const re="offsetWidth"in k?k.offsetWidth-k.clientWidth-N-oe:0,J="offsetHeight"in k?k.offsetHeight-k.clientHeight-j-ee:0,ue="offsetWidth"in k?k.offsetWidth===0?0:L/k.offsetWidth:0,de="offsetHeight"in k?k.offsetHeight===0?0:z/k.offsetHeight:0;if(f===k)se=s==="start"?T:s==="end"?T-g:s==="nearest"?cu(v,v+g,g,j,ee,v+T,v+T+y,y):T-g/2,fe=l==="start"?M:l==="center"?M-p/2:l==="end"?M-p:cu(O,O+p,p,N,oe,O+M,O+M+S,S),se=Math.max(0,se+v),fe=Math.max(0,fe+O);else{se=s==="start"?T-B-j:s==="end"?T-H+ee+J:s==="nearest"?cu(B,H,z,j,ee+J,T,T+y,y):T-(B+z/2)+J/2,fe=l==="start"?M-X-N:l==="center"?M-(X+L/2)+re/2:l==="end"?M-F+oe+re:cu(X,F,L,N,oe+re,M,M+S,S);const{scrollLeft:D,scrollTop:Y}=k;se=de===0?0:Math.max(0,Math.min(Y+se/de,k.scrollHeight-z/de+J)),fe=ue===0?0:Math.max(0,Math.min(D+fe/ue,k.scrollWidth-L/ue+re)),T+=Y-se,M+=D-fe}Q.push({el:k,top:se,left:fe})}return Q},tA=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function nA(t,e){if(!t.isConnected||!(i=>{let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(t))return;const n=(i=>{const o=window.getComputedStyle(i);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(Hb(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:o,left:a}of Hb(t,tA(e))){const s=o-n.top+n.bottom,l=a-n.left+n.right;i.scroll({top:s,left:l,behavior:r})}}const Tr=t=>{const[,,,,e]=Or();return e?`${t}-css-var`:""};var ze={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},hw=Se(function(t,e){var n=t.prefixCls,r=t.style,i=t.className,o=t.duration,a=o===void 0?4.5:o,s=t.showProgress,l=t.pauseOnHover,c=l===void 0?!0:l,u=t.eventKey,d=t.content,f=t.closable,h=t.closeIcon,m=h===void 0?"x":h,p=t.props,g=t.onClick,O=t.onNoticeClose,v=t.times,y=t.hovering,S=te(!1),x=le(S,2),$=x[0],C=x[1],P=te(0),w=le(P,2),_=w[0],R=w[1],I=te(0),T=le(I,2),M=T[0],Q=T[1],E=y||$,k=a>0&&s,z=function(){O(u)},L=function(N){(N.key==="Enter"||N.code==="Enter"||N.keyCode===ze.ENTER)&&z()};ye(function(){if(!E&&a>0){var q=Date.now()-M,N=setTimeout(function(){z()},a*1e3-M);return function(){c&&clearTimeout(N),Q(Date.now()-q)}}},[a,E,v]),ye(function(){if(!E&&k&&(c||M===0)){var q=performance.now(),N,j=function oe(){cancelAnimationFrame(N),N=requestAnimationFrame(function(ee){var se=ee+M-q,fe=Math.min(se/(a*1e3),1);R(fe*100),fe<1&&oe()})};return j(),function(){c&&cancelAnimationFrame(N)}}},[a,M,E,k,v]);var B=ve(function(){return nt(f)==="object"&&f!==null?f:f?{closeIcon:m}:{}},[f,m]),F=mi(B,!0),H=100-(!_||_<0?0:_>100?100:_),X="".concat(n,"-notice");return b("div",xe({},p,{ref:e,className:U(X,i,W({},"".concat(X,"-closable"),f)),style:r,onMouseEnter:function(N){var j;C(!0),p==null||(j=p.onMouseEnter)===null||j===void 0||j.call(p,N)},onMouseLeave:function(N){var j;C(!1),p==null||(j=p.onMouseLeave)===null||j===void 0||j.call(p,N)},onClick:g}),b("div",{className:"".concat(X,"-content")},d),f&&b("a",xe({tabIndex:0,className:"".concat(X,"-close"),onKeyDown:L,"aria-label":"Close"},F,{onClick:function(N){N.preventDefault(),N.stopPropagation(),z()}}),B.closeIcon),k&&b("progress",{className:"".concat(X,"-progress"),max:"100",value:H},H+"%"))}),mw=K.createContext({}),rA=function(e){var n=e.children,r=e.classNames;return K.createElement(mw.Provider,{value:{classNames:r}},n)},Vb=8,Fb=3,Xb=16,iA=function(e){var n={offset:Vb,threshold:Fb,gap:Xb};if(e&&nt(e)==="object"){var r,i,o;n.offset=(r=e.offset)!==null&&r!==void 0?r:Vb,n.threshold=(i=e.threshold)!==null&&i!==void 0?i:Fb,n.gap=(o=e.gap)!==null&&o!==void 0?o:Xb}return[!!e,n]},oA=["className","style","classNames","styles"],aA=function(e){var n=e.configList,r=e.placement,i=e.prefixCls,o=e.className,a=e.style,s=e.motion,l=e.onAllNoticeRemoved,c=e.onNoticeClose,u=e.stack,d=he(mw),f=d.classNames,h=ne({}),m=te(null),p=le(m,2),g=p[0],O=p[1],v=te([]),y=le(v,2),S=y[0],x=y[1],$=n.map(function(E){return{config:E,key:String(E.key)}}),C=iA(u),P=le(C,2),w=P[0],_=P[1],R=_.offset,I=_.threshold,T=_.gap,M=w&&(S.length>0||$.length<=I),Q=typeof s=="function"?s(r):s;return ye(function(){w&&S.length>1&&x(function(E){return E.filter(function(k){return $.some(function(z){var L=z.key;return k===L})})})},[S,$,w]),ye(function(){var E;if(w&&h.current[(E=$[$.length-1])===null||E===void 0?void 0:E.key]){var k;O(h.current[(k=$[$.length-1])===null||k===void 0?void 0:k.key])}},[$,w]),K.createElement(nw,xe({key:r,className:U(i,"".concat(i,"-").concat(r),f==null?void 0:f.list,o,W(W({},"".concat(i,"-stack"),!!w),"".concat(i,"-stack-expanded"),M)),style:a,keys:$,motionAppear:!0},Q,{onAllRemoved:function(){l(r)}}),function(E,k){var z=E.config,L=E.className,B=E.style,F=E.index,H=z,X=H.key,q=H.times,N=String(X),j=z,oe=j.className,ee=j.style,se=j.classNames,fe=j.styles,re=gt(j,oA),J=$.findIndex(function(ge){return ge.key===N}),ue={};if(w){var de=$.length-1-(J>-1?J:F-1),D=r==="top"||r==="bottom"?"-50%":"0";if(de>0){var Y,me,G;ue.height=M?(Y=h.current[N])===null||Y===void 0?void 0:Y.offsetHeight:g==null?void 0:g.offsetHeight;for(var ce=0,ae=0;ae-1?h.current[N]=Me:delete h.current[N]},prefixCls:i,classNames:se,styles:fe,className:U(oe,f==null?void 0:f.notice),style:ee,times:q,key:X,eventKey:X,onNoticeClose:c,hovering:w&&S.length>0})))})},sA=Se(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-notification":n,i=t.container,o=t.motion,a=t.maxCount,s=t.className,l=t.style,c=t.onAllRemoved,u=t.stack,d=t.renderNotifications,f=te([]),h=le(f,2),m=h[0],p=h[1],g=function(w){var _,R=m.find(function(I){return I.key===w});R==null||(_=R.onClose)===null||_===void 0||_.call(R),p(function(I){return I.filter(function(T){return T.key!==w})})};Jt(e,function(){return{open:function(w){p(function(_){var R=Ce(_),I=R.findIndex(function(Q){return Q.key===w.key}),T=Z({},w);if(I>=0){var M;T.times=(((M=_[I])===null||M===void 0?void 0:M.times)||0)+1,R[I]=T}else T.times=0,R.push(T);return a>0&&R.length>a&&(R=R.slice(-a)),R})},close:function(w){g(w)},destroy:function(){p([])}}});var O=te({}),v=le(O,2),y=v[0],S=v[1];ye(function(){var P={};m.forEach(function(w){var _=w.placement,R=_===void 0?"topRight":_;R&&(P[R]=P[R]||[],P[R].push(w))}),Object.keys(y).forEach(function(w){P[w]=P[w]||[]}),S(P)},[m]);var x=function(w){S(function(_){var R=Z({},_),I=R[w]||[];return I.length||delete R[w],R})},$=ne(!1);if(ye(function(){Object.keys(y).length>0?$.current=!0:$.current&&(c==null||c(),$.current=!1)},[y]),!i)return null;var C=Object.keys(y);return Of(b(Qt,null,C.map(function(P){var w=y[P],_=b(aA,{key:P,configList:w,placement:P,prefixCls:r,className:s==null?void 0:s(P),style:l==null?void 0:l(P),motion:o,onNoticeClose:g,onAllNoticeRemoved:x,stack:u});return d?d(_,{prefixCls:r,key:P}):_})),i)}),lA=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],cA=function(){return document.body},Zb=0;function uA(){for(var t={},e=arguments.length,n=new Array(e),r=0;r0&&arguments[0]!==void 0?arguments[0]:{},e=t.getContainer,n=e===void 0?cA:e,r=t.motion,i=t.prefixCls,o=t.maxCount,a=t.className,s=t.style,l=t.onAllRemoved,c=t.stack,u=t.renderNotifications,d=gt(t,lA),f=te(),h=le(f,2),m=h[0],p=h[1],g=ne(),O=b(sA,{container:m,ref:g,prefixCls:i,motion:r,maxCount:o,className:a,style:s,onAllRemoved:l,stack:c,renderNotifications:u}),v=te([]),y=le(v,2),S=y[0],x=y[1],$=bn(function(P){var w=uA(d,P);(w.key===null||w.key===void 0)&&(w.key="rc-notification-".concat(Zb),Zb+=1),x(function(_){return[].concat(Ce(_),[{type:"open",config:w}])})}),C=ve(function(){return{open:$,close:function(w){x(function(_){return[].concat(Ce(_),[{type:"close",key:w}])})},destroy:function(){x(function(w){return[].concat(Ce(w),[{type:"destroy"}])})}}},[]);return ye(function(){p(n())}),ye(function(){if(g.current&&S.length){S.forEach(function(_){switch(_.type){case"open":g.current.open(_.config);break;case"close":g.current.close(_.key);break;case"destroy":g.current.destroy();break}});var P,w;x(function(_){return(P!==_||!w)&&(P=_,w=_.filter(function(R){return!S.includes(R)})),w})}},[S]),[C,O]}var fA={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},hA=function(e,n){return b(Mt,xe({},e,{ref:n,icon:fA}))},wc=Se(hA);const Nf=K.createContext(void 0),wo=100,mA=10,pw=wo*mA,gw={Modal:wo,Drawer:wo,Popover:wo,Popconfirm:wo,Tooltip:wo,Tour:wo,FloatButton:wo},pA={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function gA(t){return t in gw}const Pc=(t,e)=>{const[,n]=Or(),r=K.useContext(Nf),i=gA(t);let o;if(e!==void 0)o=[e,e];else{let a=r??0;i?a+=(r?0:n.zIndexPopupBase)+gw[t]:a+=pA[t],o=[r===void 0?e:a,a]}return o};function vA(){const[t,e]=te([]),n=Ut(r=>(e(i=>[].concat(Ce(i),[r])),()=>{e(i=>i.filter(o=>o!==r))}),[]);return[t,n]}function vw(t,e){this.v=t,this.k=e}function ur(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}ur=function(a,s,l,c){function u(d,f){ur(a,d,function(h){return this._invoke(d,f,h)})}s?i?i(a,s,{value:l,enumerable:!c,configurable:!c,writable:!c}):a[s]=l:(u("next",0),u("throw",1),u("return",2))},ur(t,e,n,r)}function Zv(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(h,m,p,g){var O=m&&m.prototype instanceof s?m:s,v=Object.create(O.prototype);return ur(v,"_invoke",function(y,S,x){var $,C,P,w=0,_=x||[],R=!1,I={p:0,n:0,v:t,a:T,f:T.bind(t,4),d:function(Q,E){return $=Q,C=0,P=t,I.n=E,a}};function T(M,Q){for(C=M,P=Q,e=0;!R&&w&&!E&&e<_.length;e++){var E,k=_[e],z=I.p,L=k[2];M>3?(E=L===Q)&&(P=k[(C=k[4])?5:(C=3,3)],k[4]=k[5]=t):k[0]<=z&&((E=M<2&&zQ||Q>L)&&(k[4]=M,k[5]=Q,I.n=L,C=0))}if(E||M>1)return a;throw R=!0,Q}return function(M,Q,E){if(w>1)throw TypeError("Generator is already running");for(R&&Q===1&&T(Q,E),C=Q,P=E;(e=C<2?t:P)||!R;){$||(C?C<3?(C>1&&(I.n=-1),T(C,P)):I.n=P:I.v=P);try{if(w=2,$){if(C||(M="next"),e=$[M]){if(!(e=e.call($,P)))throw TypeError("iterator result is not an object");if(!e.done)return e;P=e.value,C<2&&(C=0)}else C===1&&(e=$.return)&&e.call($),C<2&&(P=TypeError("The iterator does not provide a '"+M+"' method"),C=1);$=t}else if((e=(R=I.n<0)?P:y.call(S,I))!==a)break}catch(k){$=t,C=1,P=k}finally{w=1}}return{value:e,done:R}}}(h,p,g),!0),v}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(ur(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,ur(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,ur(d,"constructor",c),ur(c,"constructor",l),l.displayName="GeneratorFunction",ur(c,i,"GeneratorFunction"),ur(d),ur(d,i,"Generator"),ur(d,r,function(){return this}),ur(d,"toString",function(){return"[object Generator]"}),(Zv=function(){return{w:o,m:f}})()}function _d(t,e){function n(i,o,a,s){try{var l=t[i](o),c=l.value;return c instanceof vw?e.resolve(c.v).then(function(u){n("next",u,a,s)},function(u){n("throw",u,a,s)}):e.resolve(c).then(function(u){l.value=u,a(l)},function(u){return n("throw",u,a,s)})}catch(u){s(u)}}var r;this.next||(ur(_d.prototype),ur(_d.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),ur(this,"_invoke",function(i,o,a){function s(){return new e(function(l,c){n(i,a,l,c)})}return r=r?r.then(s,s):s()},!0)}function Ow(t,e,n,r,i){return new _d(Zv().w(t,e,n,r),i||Promise)}function OA(t,e,n,r,i){var o=Ow(t,e,n,r,i);return o.next().then(function(a){return a.done?a.value:o.next()})}function bA(t){var e=Object(t),n=[];for(var r in e)n.unshift(r);return function i(){for(;n.length;)if((r=n.pop())in e)return i.value=r,i.done=!1,i;return i.done=!0,i}}function qb(t){if(t!=null){var e=t[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(nt(t)+" is not iterable")}function gr(){var t=Zv(),e=t.m(gr),n=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function r(a){var s=typeof a=="function"&&a.constructor;return!!s&&(s===n||(s.displayName||s.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function o(a){var s,l;return function(c){s||(s={stop:function(){return l(c.a,2)},catch:function(){return c.v},abrupt:function(d,f){return l(c.a,i[d],f)},delegateYield:function(d,f,h){return s.resultName=f,l(c.d,qb(d),h)},finish:function(d){return l(c.f,d)}},l=function(d,f,h){c.p=s.prev,c.n=s.next;try{return d(f,h)}finally{s.next=c.n}}),s.resultName&&(s[s.resultName]=c.v,s.resultName=void 0),s.sent=c.v,s.next=c.n;try{return a.call(this,s)}finally{c.p=s.prev,c.n=s.next}}}return(gr=function(){return{wrap:function(l,c,u,d){return t.w(o(l),c,u,d&&d.reverse())},isGeneratorFunction:r,mark:t.m,awrap:function(l,c){return new vw(l,c)},AsyncIterator:_d,async:function(l,c,u,d,f){return(r(c)?Ow:OA)(o(l),c,u,d,f)},keys:bA,values:qb}})()}function Gb(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function ka(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(l){Gb(o,r,i,a,s,"next",l)}function s(l){Gb(o,r,i,a,s,"throw",l)}a(void 0)})}}var _c=Z({},Sc),yA=_c.version,jh=_c.render,SA=_c.unmountComponentAtNode,zf;try{var xA=Number((yA||"").split(".")[0]);xA>=18&&(zf=_c.createRoot)}catch{}function Ub(t){var e=_c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&nt(e)==="object"&&(e.usingClientEntryPoint=t)}var Td="__rc_react_root__";function $A(t,e){Ub(!0);var n=e[Td]||zf(e);Ub(!1),n.render(t),e[Td]=n}function CA(t,e){jh==null||jh(t,e)}function wA(t,e){if(zf){$A(t,e);return}CA(t,e)}function PA(t){return Ep.apply(this,arguments)}function Ep(){return Ep=ka(gr().mark(function t(e){return gr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=e[Td])===null||i===void 0||i.unmount(),delete e[Td]}));case 1:case"end":return r.stop()}},t)})),Ep.apply(this,arguments)}function _A(t){SA(t)}function TA(t){return kp.apply(this,arguments)}function kp(){return kp=ka(gr().mark(function t(e){return gr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(zf===void 0){r.next=2;break}return r.abrupt("return",PA(e));case 2:_A(e);case 3:case"end":return r.stop()}},t)})),kp.apply(this,arguments)}const RA=(t,e)=>(wA(t,e),()=>TA(e));let IA=RA;function qv(t){return IA}const Lh=()=>({height:0,opacity:0}),Yb=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},MA=t=>({height:t?t.offsetHeight:0}),Dh=(t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height",Rd=(t=Zl)=>({motionName:`${t}-motion-collapse`,onAppearStart:Lh,onEnterStart:Lh,onAppearActive:Yb,onEnterActive:Yb,onLeaveStart:MA,onLeaveActive:Lh,onAppearEnd:Dh,onEnterEnd:Dh,onLeaveEnd:Dh,motionDeadline:500}),jo=(t,e,n)=>n!==void 0?n:`${t}-${e}`;function pn(t,e){var n=Object.assign({},t);return Array.isArray(e)&&e.forEach(function(r){delete n[r]}),n}const jf=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),n=e.width,r=e.height;if(n||r)return!0}if(t.getBoundingClientRect){var i=t.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1},EA=t=>{const{componentCls:e,colorPrimary:n}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${t.motionDurationSlow} ${t.motionEaseInOut}`,`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`].join(",")}}}}},kA=jk("Wave",EA),bw=`${Zl}-wave-target`;function AA(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"&&t!=="canvastext"}function QA(t){var e;const{borderTopColor:n,borderColor:r,backgroundColor:i}=getComputedStyle(t);return(e=[n,r,i].find(AA))!==null&&e!==void 0?e:null}function Bh(t){return Number.isNaN(t)?0:t}const NA=t=>{const{className:e,target:n,component:r,registerUnmount:i}=t,o=ne(null),a=ne(null);ye(()=>{a.current=i()},[]);const[s,l]=te(null),[c,u]=te([]),[d,f]=te(0),[h,m]=te(0),[p,g]=te(0),[O,v]=te(0),[y,S]=te(!1),x={left:d,top:h,width:p,height:O,borderRadius:c.map(P=>`${P}px`).join(" ")};s&&(x["--wave-color"]=s);function $(){const P=getComputedStyle(n);l(QA(n));const w=P.position==="static",{borderLeftWidth:_,borderTopWidth:R}=P;f(w?n.offsetLeft:Bh(-parseFloat(_))),m(w?n.offsetTop:Bh(-parseFloat(R))),g(n.offsetWidth),v(n.offsetHeight);const{borderTopLeftRadius:I,borderTopRightRadius:T,borderBottomLeftRadius:M,borderBottomRightRadius:Q}=P;u([I,T,Q,M].map(E=>Bh(parseFloat(E))))}if(ye(()=>{if(n){const P=Yt(()=>{$(),S(!0)});let w;return typeof ResizeObserver<"u"&&(w=new ResizeObserver($),w.observe(n)),()=>{Yt.cancel(P),w==null||w.disconnect()}}},[]),!y)return null;const C=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(bw));return b(vi,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(P,w)=>{var _,R;if(w.deadline||w.propertyName==="opacity"){const I=(_=o.current)===null||_===void 0?void 0:_.parentElement;(R=a.current)===null||R===void 0||R.call(a).then(()=>{I==null||I.remove()})}return!1}},({className:P},w)=>b("div",{ref:vr(o,w),className:U(e,P,{"wave-quick":C}),style:x}))},zA=(t,e)=>{var n;const{component:r}=e;if(r==="Checkbox"&&!(!((n=t.querySelector("input"))===null||n===void 0)&&n.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",t==null||t.insertBefore(i,t==null?void 0:t.firstChild);const o=qv();let a=null;function s(){return a}a=o(b(NA,Object.assign({},e,{target:t,registerUnmount:s})),i)},jA=(t,e,n)=>{const{wave:r}=he(lt),[,i,o]=Or(),a=bn(c=>{const u=t.current;if(r!=null&&r.disabled||!u)return;const d=u.querySelector(`.${bw}`)||u,{showEffect:f}=r||{};(f||zA)(d,{className:e,token:i,component:n,event:c,hashId:o})}),s=ne(null);return c=>{Yt.cancel(s.current),s.current=Yt(()=>{a(c)})}},Gv=t=>{const{children:e,disabled:n,component:r}=t,{getPrefixCls:i}=he(lt),o=ne(null),a=i("wave"),[,s]=kA(a),l=jA(o,U(a,s),r);if(K.useEffect(()=>{const u=o.current;if(!u||u.nodeType!==window.Node.ELEMENT_NODE||n)return;const d=f=>{!jf(f.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")&&!u.className.includes("disabled:")||u.getAttribute("aria-disabled")==="true"||u.className.includes("-leave")||l(f)};return u.addEventListener("click",d,!0),()=>{u.removeEventListener("click",d,!0)}},[n]),!K.isValidElement(e))return e??null;const c=bo(e)?vr(Xo(e),o):o;return lr(e,{ref:c})},br=t=>{const e=K.useContext(ba);return K.useMemo(()=>t?typeof t=="string"?t??e:typeof t=="function"?t(e):e:e,[t,e])},LA=t=>{const{componentCls:e}=t;return{[e]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},DA=t=>{const{componentCls:e,antCls:n}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item:empty`]:{display:"none"},[`${e}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},BA=t=>{const{componentCls:e}=t;return{[e]:{"&-gap-row-small":{rowGap:t.spaceGapSmallSize},"&-gap-row-middle":{rowGap:t.spaceGapMiddleSize},"&-gap-row-large":{rowGap:t.spaceGapLargeSize},"&-gap-col-small":{columnGap:t.spaceGapSmallSize},"&-gap-col-middle":{columnGap:t.spaceGapMiddleSize},"&-gap-col-large":{columnGap:t.spaceGapLargeSize}}}},yw=Ft("Space",t=>{const e=It(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[DA(e),BA(e),LA(e)]},()=>({}),{resetStyle:!1});var Sw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=he(Lf),r=ve(()=>{if(!n)return"";const{compactDirection:i,isFirstItem:o,isLastItem:a}=n,s=i==="vertical"?"-vertical-":"-";return U(`${t}-compact${s}item`,{[`${t}-compact${s}first-item`]:o,[`${t}-compact${s}last-item`]:a,[`${t}-compact${s}item-rtl`]:e==="rtl"})},[t,e,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},WA=t=>{const{children:e}=t;return b(Lf.Provider,{value:null},e)},HA=t=>{const{children:e}=t,n=Sw(t,["children"]);return b(Lf.Provider,{value:ve(()=>n,[n])},e)},VA=t=>{const{getPrefixCls:e,direction:n}=he(lt),{size:r,direction:i,block:o,prefixCls:a,className:s,rootClassName:l,children:c}=t,u=Sw(t,["size","direction","block","prefixCls","className","rootClassName","children"]),d=br(y=>r??y),f=e("space-compact",a),[h,m]=yw(f),p=U(f,m,{[`${f}-rtl`]:n==="rtl",[`${f}-block`]:o,[`${f}-vertical`]:i==="vertical"},s,l),g=he(Lf),O=sr(c),v=ve(()=>O.map((y,S)=>{const x=(y==null?void 0:y.key)||`${f}-item-${S}`;return b(HA,{key:x,compactSize:d,compactDirection:i,isFirstItem:S===0&&(!g||(g==null?void 0:g.isFirstItem)),isLastItem:S===O.length-1&&(!g||(g==null?void 0:g.isLastItem))},y)}),[r,O,g]);return O.length===0?null:h(b("div",Object.assign({className:p},u),v))};var FA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:e,direction:n}=he(lt),{prefixCls:r,size:i,className:o}=t,a=FA(t,["prefixCls","size","className"]),s=e("btn-group",r),[,,l]=Or(),c=ve(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]),u=U(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},o,l);return b(xw.Provider,{value:i},b("div",Object.assign({},a,{className:u})))},Kb=/^[\u4E00-\u9FA5]{2}$/,Ap=Kb.test.bind(Kb);function Uv(t){return t==="danger"?{danger:!0}:{type:t}}function Jb(t){return typeof t=="string"}function Wh(t){return t==="text"||t==="link"}function ZA(t,e){if(t==null)return;const n=e?" ":"";return typeof t!="string"&&typeof t!="number"&&Jb(t.type)&&Ap(t.props.children)?lr(t,{children:t.props.children.split("").join(n)}):Jb(t)?Ap(t)?K.createElement("span",null,t.split("").join(n)):K.createElement("span",null,t):dw(t)?K.createElement("span",null,t):t}function qA(t,e){let n=!1;const r=[];return K.Children.forEach(t,i=>{const o=typeof i,a=o==="string"||o==="number";if(n&&a){const s=r.length-1,l=r[s];r[s]=`${l}${i}`}else r.push(i);n=a}),K.Children.map(r,i=>ZA(i,e))}["default","primary","danger"].concat(Ce(No));const Qp=Se((t,e)=>{const{className:n,style:r,children:i,prefixCls:o}=t,a=U(`${o}-icon`,n);return K.createElement("span",{ref:e,className:a,style:r},i)}),ey=Se((t,e)=>{const{prefixCls:n,className:r,style:i,iconClassName:o}=t,a=U(`${n}-loading-icon`,r);return K.createElement(Qp,{prefixCls:n,className:a,style:i,ref:e},K.createElement(wc,{className:o}))}),Hh=()=>({width:0,opacity:0,transform:"scale(0)"}),Vh=t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),GA=t=>{const{prefixCls:e,loading:n,existIcon:r,className:i,style:o,mount:a}=t,s=!!n;return r?K.createElement(ey,{prefixCls:e,className:i,style:o}):K.createElement(vi,{visible:s,motionName:`${e}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Hh,onAppearActive:Vh,onEnterStart:Hh,onEnterActive:Vh,onLeaveStart:Vh,onLeaveActive:Hh},({className:l,style:c},u)=>{const d=Object.assign(Object.assign({},o),c);return K.createElement(ey,{prefixCls:e,className:U(i,l),style:d,ref:u})})},ty=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),UA=t=>{const{componentCls:e,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:o}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:t.calc(r).mul(-1).equal(),[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:n}},ty(`${e}-primary`,i),ty(`${e}-danger`,o)]}};var YA=["b"],KA=["v"],Fh=function(e){return Math.round(Number(e||0))},JA=function(e){if(e instanceof Vt)return e;if(e&&nt(e)==="object"&&"h"in e&&"b"in e){var n=e,r=n.b,i=gt(n,YA);return Z(Z({},i),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},ql=function(t){Ji(n,t);var e=yo(n);function n(r){return An(this,n),e.call(this,JA(r))}return Qn(n,[{key:"toHsbString",value:function(){var i=this.toHsb(),o=Fh(i.s*100),a=Fh(i.b*100),s=Fh(i.h),l=i.a,c="hsb(".concat(s,", ").concat(o,"%, ").concat(a,"%)"),u="hsba(".concat(s,", ").concat(o,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?c:u}},{key:"toHsb",value:function(){var i=this.toHsv(),o=i.v,a=gt(i,KA);return Z(Z({},a),{},{b:o,a:this.a})}}]),n}(Vt),eQ=function(e){return e instanceof ql?e:new ql(e)};eQ("#1677ff");const tQ=(t,e)=>(t==null?void 0:t.replace(/[^\w/]/g,"").slice(0,e?8:6))||"",nQ=(t,e)=>t?tQ(t,e):"";let Np=function(){function t(e){An(this,t);var n;if(this.cleared=!1,e instanceof t){this.metaColor=e.metaColor.clone(),this.colors=(n=e.colors)===null||n===void 0?void 0:n.map(i=>({color:new t(i.color),percent:i.percent})),this.cleared=e.cleared;return}const r=Array.isArray(e);r&&e.length?(this.colors=e.map(({color:i,percent:o})=>({color:new t(i),percent:o})),this.metaColor=new ql(this.colors[0].color.metaColor)):this.metaColor=new ql(r?"":e),(!e||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return Qn(t,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return nQ(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(i=>`${i.color.toRgbString()} ${i.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,i)=>{const o=n.colors[i];return r.percent===o.percent&&r.color.equals(o.color)}):this.toHexString()===n.toHexString()}}])}();var rQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},iQ=function(e,n){return b(Mt,xe({},e,{ref:n,icon:rQ}))},$s=Se(iQ),$w=K.forwardRef(function(t,e){var n=t.prefixCls,r=t.forceRender,i=t.className,o=t.style,a=t.children,s=t.isActive,l=t.role,c=t.classNames,u=t.styles,d=K.useState(s||r),f=le(d,2),h=f[0],m=f[1];return K.useEffect(function(){(r||s)&&m(!0)},[r,s]),h?K.createElement("div",{ref:e,className:U("".concat(n,"-content"),W(W({},"".concat(n,"-content-active"),s),"".concat(n,"-content-inactive"),!s),i),style:o,role:l},K.createElement("div",{className:U("".concat(n,"-content-box"),c==null?void 0:c.body),style:u==null?void 0:u.body},a)):null});$w.displayName="PanelContent";var oQ=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],Cw=K.forwardRef(function(t,e){var n=t.showArrow,r=n===void 0?!0:n,i=t.headerClass,o=t.isActive,a=t.onItemClick,s=t.forceRender,l=t.className,c=t.classNames,u=c===void 0?{}:c,d=t.styles,f=d===void 0?{}:d,h=t.prefixCls,m=t.collapsible,p=t.accordion,g=t.panelKey,O=t.extra,v=t.header,y=t.expandIcon,S=t.openMotion,x=t.destroyInactivePanel,$=t.children,C=gt(t,oQ),P=m==="disabled",w=O!=null&&typeof O!="boolean",_=W(W(W({onClick:function(){a==null||a(g)},onKeyDown:function(k){(k.key==="Enter"||k.keyCode===ze.ENTER||k.which===ze.ENTER)&&(a==null||a(g))},role:p?"tab":"button"},"aria-expanded",o),"aria-disabled",P),"tabIndex",P?-1:0),R=typeof y=="function"?y(t):K.createElement("i",{className:"arrow"}),I=R&&K.createElement("div",xe({className:"".concat(h,"-expand-icon")},["header","icon"].includes(m)?_:{}),R),T=U("".concat(h,"-item"),W(W({},"".concat(h,"-item-active"),o),"".concat(h,"-item-disabled"),P),l),M=U(i,"".concat(h,"-header"),W({},"".concat(h,"-collapsible-").concat(m),!!m),u.header),Q=Z({className:M,style:f.header},["header","icon"].includes(m)?{}:_);return K.createElement("div",xe({},C,{ref:e,className:T}),K.createElement("div",Q,r&&I,K.createElement("span",xe({className:"".concat(h,"-header-text")},m==="header"?_:{}),v),w&&K.createElement("div",{className:"".concat(h,"-extra")},O)),K.createElement(vi,xe({visible:o,leavedClassName:"".concat(h,"-content-hidden")},S,{forceRender:s,removeOnLeave:x}),function(E,k){var z=E.className,L=E.style;return K.createElement($w,{ref:k,prefixCls:h,className:z,classNames:u,style:L,styles:f,isActive:o,forceRender:s,role:p?"tabpanel":void 0},$)}))}),aQ=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],sQ=function(e,n){var r=n.prefixCls,i=n.accordion,o=n.collapsible,a=n.destroyInactivePanel,s=n.onItemClick,l=n.activeKey,c=n.openMotion,u=n.expandIcon;return e.map(function(d,f){var h=d.children,m=d.label,p=d.key,g=d.collapsible,O=d.onItemClick,v=d.destroyInactivePanel,y=gt(d,aQ),S=String(p??f),x=g??o,$=v??a,C=function(_){x!=="disabled"&&(s(_),O==null||O(_))},P=!1;return i?P=l[0]===S:P=l.indexOf(S)>-1,K.createElement(Cw,xe({},y,{prefixCls:r,key:S,panelKey:S,isActive:P,accordion:i,openMotion:c,expandIcon:u,header:m,collapsible:x,onItemClick:C,destroyInactivePanel:$}),h)})},lQ=function(e,n,r){if(!e)return null;var i=r.prefixCls,o=r.accordion,a=r.collapsible,s=r.destroyInactivePanel,l=r.onItemClick,c=r.activeKey,u=r.openMotion,d=r.expandIcon,f=e.key||String(n),h=e.props,m=h.header,p=h.headerClass,g=h.destroyInactivePanel,O=h.collapsible,v=h.onItemClick,y=!1;o?y=c[0]===f:y=c.indexOf(f)>-1;var S=O??a,x=function(P){S!=="disabled"&&(l(P),v==null||v(P))},$={key:f,panelKey:f,header:m,headerClass:p,isActive:y,prefixCls:i,destroyInactivePanel:g??s,openMotion:u,accordion:o,children:e.props.children,onItemClick:x,expandIcon:d,collapsible:S};return typeof e.type=="string"?e:(Object.keys($).forEach(function(C){typeof $[C]>"u"&&delete $[C]}),K.cloneElement(e,$))};function cQ(t,e,n){return Array.isArray(t)?sQ(t,n):sr(e).map(function(r,i){return lQ(r,i,n)})}function uQ(t){var e=t;if(!Array.isArray(e)){var n=nt(e);e=n==="number"||n==="string"?[e]:[]}return e.map(function(r){return String(r)})}var dQ=K.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-collapse":n,i=t.destroyInactivePanel,o=i===void 0?!1:i,a=t.style,s=t.accordion,l=t.className,c=t.children,u=t.collapsible,d=t.openMotion,f=t.expandIcon,h=t.activeKey,m=t.defaultActiveKey,p=t.onChange,g=t.items,O=U(r,l),v=Pn([],{value:h,onChange:function(w){return p==null?void 0:p(w)},defaultValue:m,postState:uQ}),y=le(v,2),S=y[0],x=y[1],$=function(w){return x(function(){if(s)return S[0]===w?[]:[w];var _=S.indexOf(w),R=_>-1;return R?S.filter(function(I){return I!==w}):[].concat(Ce(S),[w])})};or(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var C=cQ(g,c,{prefixCls:r,accordion:s,openMotion:d,expandIcon:f,collapsible:u,destroyInactivePanel:o,onItemClick:$,activeKey:S});return K.createElement("div",xe({ref:e,className:O,style:a,role:s?"tablist":void 0},mi(t,{aria:!0,data:!0})),C)});const Yv=Object.assign(dQ,{Panel:Cw});Yv.Panel;const fQ=Se((t,e)=>{const{getPrefixCls:n}=he(lt),{prefixCls:r,className:i,showArrow:o=!0}=t,a=n("collapse",r),s=U({[`${a}-no-arrow`]:!o},i);return b(Yv.Panel,Object.assign({ref:e},t,{prefixCls:a,className:s}))}),Kv=t=>({[t.componentCls]:{[`${t.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${t.motionDurationMid} ${t.motionEaseInOut}, opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}},[`${t.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${t.motionDurationMid} ${t.motionEaseInOut}, - opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}}}),KA=t=>({animationDuration:t,animationFillMode:"both"}),JA=t=>({animationDuration:t,animationFillMode:"both"}),If=(t,e,n,r,i=!1)=>{const o=i?"&":"";return{[` + opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}}}),hQ=t=>({animationDuration:t,animationFillMode:"both"}),mQ=t=>({animationDuration:t,animationFillMode:"both"}),Df=(t,e,n,r,i=!1)=>{const o=i?"&":"";return{[` ${o}${t}-enter, ${o}${t}-appear - `]:Object.assign(Object.assign({},KA(r)),{animationPlayState:"paused"}),[`${o}${t}-leave`]:Object.assign(Object.assign({},JA(r)),{animationPlayState:"paused"}),[` + `]:Object.assign(Object.assign({},hQ(r)),{animationPlayState:"paused"}),[`${o}${t}-leave`]:Object.assign(Object.assign({},mQ(r)),{animationPlayState:"paused"}),[` ${o}${t}-enter${t}-enter-active, ${o}${t}-appear${t}-appear-active - `]:{animationName:e,animationPlayState:"running"},[`${o}${t}-leave${t}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},eQ=new _t("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),tQ=new _t("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),nQ=(t,e=!1)=>{const{antCls:n}=t,r=`${n}-fade`,i=e?"&":"";return[If(r,eQ,tQ,t.motionDurationMid,e),{[` + `]:{animationName:e,animationPlayState:"running"},[`${o}${t}-leave${t}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},pQ=new At("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),gQ=new At("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),vQ=(t,e=!1)=>{const{antCls:n}=t,r=`${n}-fade`,i=e?"&":"";return[Df(r,pQ,gQ,t.motionDurationMid,e),{[` ${i}${r}-enter, ${i}${r}-appear - `]:{opacity:0,animationTimingFunction:"linear"},[`${i}${r}-leave`]:{animationTimingFunction:"linear"}}]},rQ=new _t("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),iQ=new _t("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),oQ=new _t("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),aQ=new _t("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),sQ=new _t("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),lQ=new _t("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),cQ=new _t("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),uQ=new _t("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),dQ={"move-up":{inKeyframes:cQ,outKeyframes:uQ},"move-down":{inKeyframes:rQ,outKeyframes:iQ},"move-left":{inKeyframes:oQ,outKeyframes:aQ},"move-right":{inKeyframes:sQ,outKeyframes:lQ}},Cd=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=dQ[e];return[If(r,i,o,t.motionDurationMid),{[` + `]:{opacity:0,animationTimingFunction:"linear"},[`${i}${r}-leave`]:{animationTimingFunction:"linear"}}]},OQ=new At("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),bQ=new At("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),yQ=new At("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),SQ=new At("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),xQ=new At("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),$Q=new At("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),CQ=new At("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),wQ=new At("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),PQ={"move-up":{inKeyframes:CQ,outKeyframes:wQ},"move-down":{inKeyframes:OQ,outKeyframes:bQ},"move-left":{inKeyframes:yQ,outKeyframes:SQ},"move-right":{inKeyframes:xQ,outKeyframes:$Q}},Id=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=PQ[e];return[Df(r,i,o,t.motionDurationMid),{[` ${r}-enter, ${r}-appear - `]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},Vv=new _t("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Hv=new _t("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Xv=new _t("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Zv=new _t("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),fQ=new _t("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),hQ=new _t("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),pQ=new _t("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),mQ=new _t("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),gQ={"slide-up":{inKeyframes:Vv,outKeyframes:Hv},"slide-down":{inKeyframes:Xv,outKeyframes:Zv},"slide-left":{inKeyframes:fQ,outKeyframes:hQ},"slide-right":{inKeyframes:pQ,outKeyframes:mQ}},Lo=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=gQ[e];return[If(r,i,o,t.motionDurationMid),{[` + `]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},Jv=new At("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),e0=new At("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),t0=new At("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),n0=new At("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),_Q=new At("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),TQ=new At("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),RQ=new At("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),IQ=new At("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),MQ={"slide-up":{inKeyframes:Jv,outKeyframes:e0},"slide-down":{inKeyframes:t0,outKeyframes:n0},"slide-left":{inKeyframes:_Q,outKeyframes:TQ},"slide-right":{inKeyframes:RQ,outKeyframes:IQ}},Lo=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=MQ[e];return[Df(r,i,o,t.motionDurationMid),{[` ${r}-enter, ${r}-appear - `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},qv=new _t("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),vQ=new _t("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Vb=new _t("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Hb=new _t("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),OQ=new _t("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),bQ=new _t("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),yQ=new _t("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),SQ=new _t("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),xQ=new _t("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),CQ=new _t("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),$Q=new _t("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),wQ=new _t("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),PQ={zoom:{inKeyframes:qv,outKeyframes:vQ},"zoom-big":{inKeyframes:Vb,outKeyframes:Hb},"zoom-big-fast":{inKeyframes:Vb,outKeyframes:Hb},"zoom-left":{inKeyframes:yQ,outKeyframes:SQ},"zoom-right":{inKeyframes:xQ,outKeyframes:CQ},"zoom-up":{inKeyframes:OQ,outKeyframes:bQ},"zoom-down":{inKeyframes:$Q,outKeyframes:wQ}},Cc=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=PQ[e];return[If(r,i,o,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[` + `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},r0=new At("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),EQ=new At("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),ny=new At("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),ry=new At("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),kQ=new At("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),AQ=new At("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),QQ=new At("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),NQ=new At("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),zQ=new At("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),jQ=new At("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),LQ=new At("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),DQ=new At("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),BQ={zoom:{inKeyframes:r0,outKeyframes:EQ},"zoom-big":{inKeyframes:ny,outKeyframes:ry},"zoom-big-fast":{inKeyframes:ny,outKeyframes:ry},"zoom-left":{inKeyframes:QQ,outKeyframes:NQ},"zoom-right":{inKeyframes:zQ,outKeyframes:jQ},"zoom-up":{inKeyframes:kQ,outKeyframes:AQ},"zoom-down":{inKeyframes:LQ,outKeyframes:DQ}},Tc=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=BQ[e];return[Df(r,i,o,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[` ${r}-enter, ${r}-appear - `]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},_Q=t=>{const{componentCls:e,contentBg:n,padding:r,headerBg:i,headerPadding:o,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:l,lineWidth:c,lineType:u,colorBorder:d,colorText:f,colorTextHeading:h,colorTextDisabled:p,fontSizeLG:m,lineHeight:g,lineHeightLG:v,marginSM:O,paddingSM:S,paddingLG:x,paddingXS:b,motionDurationSlow:C,fontSizeIcon:$,contentPadding:w,fontHeight:P,fontHeightLG:_}=t,T=`${q(c)} ${u} ${d}`;return{[e]:Object.assign(Object.assign({},wn(t)),{backgroundColor:i,border:T,borderRadius:l,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:T,"&:first-child":{[` + `]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},WQ=t=>{const{componentCls:e,contentBg:n,padding:r,headerBg:i,headerPadding:o,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:l,lineWidth:c,lineType:u,colorBorder:d,colorText:f,colorTextHeading:h,colorTextDisabled:m,fontSizeLG:p,lineHeight:g,lineHeightLG:O,marginSM:v,paddingSM:y,paddingLG:S,paddingXS:x,motionDurationSlow:$,fontSizeIcon:C,contentPadding:P,fontHeight:w,fontHeightLG:_}=t,R=`${V(c)} ${u} ${d}`;return{[e]:Object.assign(Object.assign({},Sn(t)),{backgroundColor:i,border:R,borderRadius:l,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:R,"&:first-child":{[` &, - & > ${e}-header`]:{borderRadius:`${q(l)} ${q(l)} 0 0`}},"&:last-child":{[` + & > ${e}-header`]:{borderRadius:`${V(l)} ${V(l)} 0 0`}},"&:last-child":{[` &, - & > ${e}-header`]:{borderRadius:`0 0 ${q(l)} ${q(l)}`}},[`> ${e}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:h,lineHeight:g,cursor:"pointer",transition:`all ${C}, visibility 0s`},Ci(t)),{[`> ${e}-header-text`]:{flex:"auto"},[`${e}-expand-icon`]:{height:P,display:"flex",alignItems:"center",paddingInlineEnd:O},[`${e}-arrow`]:Object.assign(Object.assign({},As()),{fontSize:$,transition:`transform ${C}`,svg:{transition:`transform ${C}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}}),[`${e}-collapsible-header`]:{cursor:"default",[`${e}-header-text`]:{flex:"none",cursor:"pointer"},[`${e}-expand-icon`]:{cursor:"pointer"}},[`${e}-collapsible-icon`]:{cursor:"unset",[`${e}-expand-icon`]:{cursor:"pointer"}}},[`${e}-content`]:{color:f,backgroundColor:n,borderTop:T,[`& > ${e}-content-box`]:{padding:w},"&-hidden":{display:"none"}},"&-small":{[`> ${e}-item`]:{[`> ${e}-header`]:{padding:a,paddingInlineStart:b,[`> ${e}-expand-icon`]:{marginInlineStart:t.calc(S).sub(b).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:S}}},"&-large":{[`> ${e}-item`]:{fontSize:m,lineHeight:v,[`> ${e}-header`]:{padding:s,paddingInlineStart:r,[`> ${e}-expand-icon`]:{height:_,marginInlineStart:t.calc(x).sub(r).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:x}}},[`${e}-item:last-child`]:{borderBottom:0,[`> ${e}-content`]:{borderRadius:`0 0 ${q(l)} ${q(l)}`}},[`& ${e}-item-disabled > ${e}-header`]:{"\n &,\n & > .arrow\n ":{color:p,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:O}}}}})}},TQ=t=>{const{componentCls:e}=t,n=`> ${e}-item > ${e}-header ${e}-arrow`;return{[`${e}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},kQ=t=>{const{componentCls:e,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:o}=t;return{[`${e}-borderless`]:{backgroundColor:n,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${o}`},[` + & > ${e}-header`]:{borderRadius:`0 0 ${V(l)} ${V(l)}`}},[`> ${e}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:h,lineHeight:g,cursor:"pointer",transition:`all ${$}, visibility 0s`},hi(t)),{[`> ${e}-header-text`]:{flex:"auto"},[`${e}-expand-icon`]:{height:w,display:"flex",alignItems:"center",paddingInlineEnd:v},[`${e}-arrow`]:Object.assign(Object.assign({},zs()),{fontSize:C,transition:`transform ${$}`,svg:{transition:`transform ${$}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}}),[`${e}-collapsible-header`]:{cursor:"default",[`${e}-header-text`]:{flex:"none",cursor:"pointer"},[`${e}-expand-icon`]:{cursor:"pointer"}},[`${e}-collapsible-icon`]:{cursor:"unset",[`${e}-expand-icon`]:{cursor:"pointer"}}},[`${e}-content`]:{color:f,backgroundColor:n,borderTop:R,[`& > ${e}-content-box`]:{padding:P},"&-hidden":{display:"none"}},"&-small":{[`> ${e}-item`]:{[`> ${e}-header`]:{padding:a,paddingInlineStart:x,[`> ${e}-expand-icon`]:{marginInlineStart:t.calc(y).sub(x).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:y}}},"&-large":{[`> ${e}-item`]:{fontSize:p,lineHeight:O,[`> ${e}-header`]:{padding:s,paddingInlineStart:r,[`> ${e}-expand-icon`]:{height:_,marginInlineStart:t.calc(S).sub(r).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:S}}},[`${e}-item:last-child`]:{borderBottom:0,[`> ${e}-content`]:{borderRadius:`0 0 ${V(l)} ${V(l)}`}},[`& ${e}-item-disabled > ${e}-header`]:{"\n &,\n & > .arrow\n ":{color:m,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:v}}}}})}},HQ=t=>{const{componentCls:e}=t,n=`> ${e}-item > ${e}-header ${e}-arrow`;return{[`${e}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},VQ=t=>{const{componentCls:e,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:o}=t;return{[`${e}-borderless`]:{backgroundColor:n,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${o}`},[` > ${e}-item:last-child, > ${e}-item:last-child ${e}-header - `]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:i,borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{padding:r}}}},RQ=t=>{const{componentCls:e,paddingSM:n}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:n}}}}}},IQ=t=>({headerPadding:`${t.paddingSM}px ${t.padding}px`,headerBg:t.colorFillAlter,contentPadding:`${t.padding}px 16px`,contentBg:t.colorBgContainer,borderlessContentPadding:`${t.paddingXXS}px 16px ${t.padding}px`,borderlessContentBg:"transparent"}),MQ=Zt("Collapse",t=>{const e=kt(t,{collapseHeaderPaddingSM:`${q(t.paddingXS)} ${q(t.paddingSM)}`,collapseHeaderPaddingLG:`${q(t.padding)} ${q(t.paddingLG)}`,collapsePanelBorderRadius:t.borderRadiusLG});return[_Q(e),kQ(e),RQ(e),TQ(e),Fv(e)]},IQ),EQ=Se((t,e)=>{const{getPrefixCls:n,direction:r,expandIcon:i,className:o,style:a}=rr("collapse"),{prefixCls:s,className:l,rootClassName:c,style:u,bordered:d=!0,ghost:f,size:h,expandIconPosition:p="start",children:m,destroyInactivePanel:g,destroyOnHidden:v,expandIcon:O}=t,S=Dr(Q=>{var M;return(M=h??Q)!==null&&M!==void 0?M:"middle"}),x=n("collapse",s),b=n(),[C,$,w]=MQ(x),P=ge(()=>p==="left"?"start":p==="right"?"end":p,[p]),_=O??i,T=Ht((Q={})=>{const M=typeof _=="function"?_(Q):y(xd,{rotate:Q.isActive?r==="rtl"?-90:90:void 0,"aria-label":Q.isActive?"expanded":"collapsed"});return fr(M,()=>{var E;return{className:Z((E=M.props)===null||E===void 0?void 0:E.className,`${x}-arrow`)}})},[_,x,r]),R=Z(`${x}-icon-position-${P}`,{[`${x}-borderless`]:!d,[`${x}-rtl`]:r==="rtl",[`${x}-ghost`]:!!f,[`${x}-${S}`]:S!=="middle"},o,l,c,$,w),k=ge(()=>Object.assign(Object.assign({},Sd(b)),{motionAppear:!1,leavedClassName:`${x}-content-hidden`}),[b,x]),I=ge(()=>m?nr(m).map((Q,M)=>{var E,N;const z=Q.props;if(z!=null&&z.disabled){const L=(E=Q.key)!==null&&E!==void 0?E:String(M),F=Object.assign(Object.assign({},cn(Q.props,["disabled"])),{key:L,collapsible:(N=z.collapsible)!==null&&N!==void 0?N:"disabled"});return fr(Q,F)}return Q}):null,[m]);return C(y(Wv,Object.assign({ref:e,openMotion:k},cn(t,["rootClassName"]),{expandIcon:T,prefixCls:x,className:R,style:Object.assign(Object.assign({},a),u),destroyInactivePanel:v??g}),I))}),Us=Object.assign(EQ,{Panel:UA}),AQ=t=>t instanceof Pm?t:new Pm(t),QQ=(t,e)=>{const{r:n,g:r,b:i,a:o}=t.toRgb(),a=new Vl(t.toRgbString()).onBackground(e).toHsv();return o<=.5?a.v>.5:n*.299+r*.587+i*.114>192},cw=t=>{const{paddingInline:e,onlyIconSize:n}=t;return kt(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},uw=t=>{var e,n,r,i,o,a;const s=(e=t.contentFontSize)!==null&&e!==void 0?e:t.fontSize,l=(n=t.contentFontSizeSM)!==null&&n!==void 0?n:t.fontSize,c=(r=t.contentFontSizeLG)!==null&&r!==void 0?r:t.fontSizeLG,u=(i=t.contentLineHeight)!==null&&i!==void 0?i:Fu(s),d=(o=t.contentLineHeightSM)!==null&&o!==void 0?o:Fu(l),f=(a=t.contentLineHeightLG)!==null&&a!==void 0?a:Fu(c),h=QQ(new Pm(t.colorBgSolid),"#fff")?"#000":"#fff",p=Qo.reduce((m,g)=>Object.assign(Object.assign({},m),{[`${g}ShadowColor`]:`0 ${q(t.controlOutlineWidth)} 0 ${ul(t[`${g}1`],t.colorBgContainer)}`}),{});return Object.assign(Object.assign({},p),{fontWeight:400,iconGap:t.marginXS,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorder,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:h,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:f,paddingBlock:Math.max((t.controlHeight-s*u)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-l*d)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-c*f)/2-t.lineWidth,0)})},NQ=t=>{const{componentCls:e,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:o,motionEaseInOut:a,iconGap:s,calc:l}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:s,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${q(t.lineWidth)} ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:t.colorText,"&:disabled > *":{pointerEvents:"none"},[`${e}-icon > svg`]:As(),"> a":{color:"currentColor"},"&:not(:disabled)":Ci(t),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${e}-icon-only`]:{paddingInline:0,[`&${e}-compact-item`]:{flex:"none"}},[`&${e}-loading`]:{opacity:i,cursor:"default"},[`${e}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${o} ${a}`).join(",")},[`&:not(${e}-icon-end)`]:{[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},dw=(t,e,n)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":n}}),zQ=t=>({minWidth:t.controlHeight,paddingInline:0,borderRadius:"50%"}),LQ=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),Mf=(t,e,n,r,i,o,a,s)=>({[`&${t}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:e,borderColor:r||void 0,boxShadow:"none"},dw(t,Object.assign({background:e},a),Object.assign({background:e},s))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),jQ=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},LQ(t))}),DQ=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),Ef=(t,e,n,r)=>{const o=r&&["link","text"].includes(r)?DQ:jQ;return Object.assign(Object.assign({},o(t)),dw(t.componentCls,e,n))},Af=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:n},Ef(t,r,i))}),Qf=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:n},Ef(t,r,i))}),Nf=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),zf=(t,e,n,r)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},Ef(t,n,r))}),Gi=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-${n}`]:Object.assign({color:e,boxShadow:"none"},Ef(t,r,i,n))}),BQ=t=>{const{componentCls:e}=t;return Qo.reduce((n,r)=>{const i=t[`${r}6`],o=t[`${r}1`],a=t[`${r}5`],s=t[`${r}2`],l=t[`${r}3`],c=t[`${r}7`];return Object.assign(Object.assign({},n),{[`&${e}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:i,boxShadow:t[`${r}ShadowColor`]},Af(t,t.colorTextLightSolid,i,{background:a},{background:c})),Qf(t,i,t.colorBgContainer,{color:a,borderColor:a,background:t.colorBgContainer},{color:c,borderColor:c,background:t.colorBgContainer})),Nf(t)),zf(t,o,{color:i,background:s},{color:i,background:l})),Gi(t,i,"link",{color:a},{color:c})),Gi(t,i,"text",{color:a,background:o},{color:c,background:l}))})},{})},WQ=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},Af(t,t.solidTextColor,t.colorBgSolid,{color:t.solidTextColor,background:t.colorBgSolidHover},{color:t.solidTextColor,background:t.colorBgSolidActive})),Nf(t)),zf(t,t.colorFillTertiary,{color:t.defaultColor,background:t.colorFillSecondary},{color:t.defaultColor,background:t.colorFill})),Mf(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),Gi(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),FQ=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},Qf(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),Nf(t)),zf(t,t.colorPrimaryBg,{color:t.colorPrimary,background:t.colorPrimaryBgHover},{color:t.colorPrimary,background:t.colorPrimaryBorder})),Gi(t,t.colorPrimaryText,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),Gi(t,t.colorPrimaryText,"link",{color:t.colorPrimaryTextHover,background:t.linkHoverBg},{color:t.colorPrimaryTextActive})),Mf(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),VQ=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},Af(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),Qf(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Nf(t)),zf(t,t.colorErrorBg,{color:t.colorError,background:t.colorErrorBgFilledHover},{color:t.colorError,background:t.colorErrorBgActive})),Gi(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),Gi(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),Mf(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),HQ=t=>Object.assign(Object.assign({},Gi(t,t.colorLink,"link",{color:t.colorLinkHover},{color:t.colorLinkActive})),Mf(t.componentCls,t.ghostBg,t.colorInfo,t.colorInfo,t.colorTextDisabled,t.colorBorder,{color:t.colorInfoHover,borderColor:t.colorInfoHover},{color:t.colorInfoActive,borderColor:t.colorInfoActive})),XQ=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-color-default`]:WQ(t),[`${e}-color-primary`]:FQ(t),[`${e}-color-dangerous`]:VQ(t),[`${e}-color-link`]:HQ(t)},BQ(t))},ZQ=t=>Object.assign(Object.assign(Object.assign(Object.assign({},Qf(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),Gi(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),Af(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),Gi(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),Gv=(t,e="")=>{const{componentCls:n,controlHeight:r,fontSize:i,borderRadius:o,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=t;return[{[e]:{fontSize:i,height:r,padding:`${q(l)} ${q(a)}`,borderRadius:o,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${e}`]:zQ(t)},{[`${n}${n}-round${e}`]:{borderRadius:t.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:t.buttonPaddingHorizontal}}}]},qQ=t=>{const e=kt(t,{fontSize:t.contentFontSize});return Gv(e,t.componentCls)},GQ=t=>{const e=kt(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return Gv(e,`${t.componentCls}-sm`)},YQ=t=>{const e=kt(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return Gv(e,`${t.componentCls}-lg`)},UQ=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},KQ=Zt("Button",t=>{const e=cw(t);return[NQ(e),qQ(e),GQ(e),YQ(e),UQ(e),XQ(e),ZQ(e),QA(e)]},uw,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function JQ(t,e,n,r){const{focusElCls:i,focus:o,borderElCls:a}=n,s=a?"> *":"",l=["hover",o?"focus":null,"active"].filter(Boolean).map(c=>`&:${c} ${s}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":Object.assign(Object.assign({[l]:{zIndex:3}},i?{[`&${i}`]:{zIndex:3}}:{}),{[`&[disabled] ${s}`]:{zIndex:0}})}}function e4(t,e,n){const{borderElCls:r}=n,i=r?`> ${r}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Yv(t,e={focus:!0}){const{componentCls:n}=t,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},JQ(t,r,e,n)),e4(n,r,e))}}function t4(t,e,n){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function n4(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function r4(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},t4(t,e,t.componentCls)),n4(t.componentCls,e))}}const i4=t=>{const{componentCls:e,colorPrimaryHover:n,lineWidth:r,calc:i}=t,o=i(r).mul(-1).equal(),a=s=>{const l=`${e}-compact${s?"-vertical":""}-item${e}-primary:not([disabled])`;return{[`${l} + ${l}::before`]:{position:"absolute",top:s?o:0,insetInlineStart:s?0:o,backgroundColor:n,content:'""',width:s?"100%":r,height:s?r:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},o4=Qs(["Button","compact"],t=>{const e=cw(t);return[Yv(e),r4(e),i4(e)]},uw);var a4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{loading:i=!1,prefixCls:o,color:a,variant:s,type:l,danger:c=!1,shape:u,size:d,styles:f,disabled:h,className:p,rootClassName:m,children:g,icon:v,iconPosition:O="start",ghost:S=!1,block:x=!1,htmlType:b="button",classNames:C,style:$={},autoInsertSpace:w,autoFocus:P}=t,_=a4(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),T=l||"default",{button:R}=oe.useContext(it),k=u||(R==null?void 0:R.shape)||"default",[I,Q]=ge(()=>{if(a&&s)return[a,s];if(l||c){const Pe=l4[T]||[];return c?["danger",Pe[1]]:Pe}return R!=null&&R.color&&(R!=null&&R.variant)?[R.color,R.variant]:["default","outlined"]},[l,a,s,c,R==null?void 0:R.variant,R==null?void 0:R.color]),E=I==="danger"?"dangerous":I,{getPrefixCls:N,direction:z,autoInsertSpace:L,className:F,style:H,classNames:V,styles:X}=rr("button"),B=(n=w??L)!==null&&n!==void 0?n:!0,G=N("btn",o),[se,re,le]=KQ(G),me=fe(qi),ie=h??me,ne=fe(aw),ue=ge(()=>s4(i),[i]),[de,j]=J(ue.loading),[ee,he]=J(!1),ve=U(null),Y=go(e,ve),ce=Ao.count(g)===1&&!v&&!Mh(Q),te=U(!0);oe.useEffect(()=>(te.current=!1,()=>{te.current=!0}),[]),Nt(()=>{let Pe=null;ue.delay>0?Pe=setTimeout(()=>{Pe=null,j(!0)},ue.delay):j(ue.loading);function ct(){Pe&&(clearTimeout(Pe),Pe=null)}return ct},[ue.delay,ue.loading]),be(()=>{if(!ve.current||!B)return;const Pe=ve.current.textContent||"";ce&&$m(Pe)?ee||he(!0):ee&&he(!1)}),be(()=>{P&&ve.current&&ve.current.focus()},[]);const Oe=oe.useCallback(Pe=>{var ct;if(de||ie){Pe.preventDefault();return}(ct=t.onClick)===null||ct===void 0||ct.call(t,("href"in t,Pe))},[t.onClick,de,ie]),{compactSize:ye,compactItemClassnames:pe}=js(G,z),Qe={large:"lg",small:"sm",middle:void 0},Me=Dr(Pe=>{var ct,xt;return(xt=(ct=d??ye)!==null&&ct!==void 0?ct:ne)!==null&&xt!==void 0?xt:Pe}),De=Me&&(r=Qe[Me])!==null&&r!==void 0?r:"",we=de?"loading":v,Ie=cn(_,["navigate"]),rt=Z(G,re,le,{[`${G}-${k}`]:k!=="default"&&k,[`${G}-${T}`]:T,[`${G}-dangerous`]:c,[`${G}-color-${E}`]:E,[`${G}-variant-${Q}`]:Q,[`${G}-${De}`]:De,[`${G}-icon-only`]:!g&&g!==0&&!!we,[`${G}-background-ghost`]:S&&!Mh(Q),[`${G}-loading`]:de,[`${G}-two-chinese-chars`]:ee&&B&&!de,[`${G}-block`]:x,[`${G}-rtl`]:z==="rtl",[`${G}-icon-end`]:O==="end"},pe,p,m,F),Ye=Object.assign(Object.assign({},H),$),lt=Z(C==null?void 0:C.icon,V.icon),Be=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),X.icon||{}),ke=v&&!de?oe.createElement(wm,{prefixCls:G,className:lt,style:Be},v):i&&typeof i=="object"&&i.icon?oe.createElement(wm,{prefixCls:G,className:lt,style:Be},i.icon):oe.createElement(AA,{existIcon:!!v,prefixCls:G,loading:de,mount:te.current}),Xe=g||g===0?EA(g,ce&&B):null;if(Ie.href!==void 0)return se(oe.createElement("a",Object.assign({},Ie,{className:Z(rt,{[`${G}-disabled`]:ie}),href:ie?void 0:Ie.href,style:Ye,onClick:Oe,ref:Y,tabIndex:ie?-1:0,"aria-disabled":ie}),ke,Xe));let _e=oe.createElement("button",Object.assign({},_,{type:b,className:rt,style:Ye,onClick:Oe,disabled:ie,ref:Y}),ke,Xe,pe&&oe.createElement(o4,{prefixCls:G}));return Mh(Q)||(_e=oe.createElement(Dv,{component:"Button",disabled:de},_e)),se(_e)}),vt=c4;vt.Group=IA;vt.__ANT_BUTTON=!0;const Nh=t=>typeof(t==null?void 0:t.then)=="function",Uv=t=>{const{type:e,children:n,prefixCls:r,buttonProps:i,close:o,autoFocus:a,emitEvent:s,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=t,d=U(!1),f=U(null),[h,p]=Oa(!1),m=(...O)=>{o==null||o.apply(void 0,O)};be(()=>{let O=null;return a&&(O=setTimeout(()=>{var S;(S=f.current)===null||S===void 0||S.focus({preventScroll:!0})})),()=>{O&&clearTimeout(O)}},[]);const g=O=>{Nh(O)&&(p(!0),O.then((...S)=>{p(!1,!0),m.apply(void 0,S),d.current=!1},S=>{if(p(!1,!0),d.current=!1,!(l!=null&&l()))return Promise.reject(S)}))},v=O=>{if(d.current)return;if(d.current=!0,!u){m();return}let S;if(s){if(S=u(O),c&&!Nh(S)){d.current=!1,m(O);return}}else if(u.length)S=u(o),d.current=!1;else if(S=u(),!Nh(S)){m();return}g(S)};return y(vt,Object.assign({},Bv(e),{onClick:v,loading:h,prefixCls:r},i,{ref:f}),n)},$c=oe.createContext({}),{Provider:fw}=$c,Xb=()=>{const{autoFocusButton:t,cancelButtonProps:e,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:o,close:a,onCancel:s,onConfirm:l}=fe($c);return i?oe.createElement(Uv,{isSilent:r,actionFn:s,close:(...c)=>{a==null||a.apply(void 0,c),l==null||l(!1)},autoFocus:t==="cancel",buttonProps:e,prefixCls:`${o}-btn`},n):null},Zb=()=>{const{autoFocusButton:t,close:e,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:o,okType:a,onConfirm:s,onOk:l}=fe($c);return oe.createElement(Uv,{isSilent:n,type:a||"primary",actionFn:l,close:(...c)=>{e==null||e.apply(void 0,c),s==null||s(!0)},autoFocus:t==="ok",buttonProps:r,prefixCls:`${i}-btn`},o)};var hw=bt(null),qb=[];function u4(t,e){var n=J(function(){if(!dr())return null;var p=document.createElement("div");return p}),r=ae(n,1),i=r[0],o=U(!1),a=fe(hw),s=J(qb),l=ae(s,2),c=l[0],u=l[1],d=a||(o.current?void 0:function(p){u(function(m){var g=[p].concat($e(m));return g})});function f(){i.parentElement||document.body.appendChild(i),o.current=!0}function h(){var p;(p=i.parentElement)===null||p===void 0||p.removeChild(i),o.current=!1}return Nt(function(){return t?a?a(f):f():h(),h},[t]),Nt(function(){c.length&&(c.forEach(function(p){return p()}),u(qb))},[c]),[i,d]}function d4(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=e;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var i,o;if(t){var a=getComputedStyle(t);r.scrollbarColor=a.scrollbarColor,r.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(t,"::-webkit-scrollbar"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",d=c?"height: ".concat(s.height,";"):"";so(` + `]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:i,borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{padding:r}}}},FQ=t=>{const{componentCls:e,paddingSM:n}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:n}}}}}},XQ=t=>({headerPadding:`${t.paddingSM}px ${t.padding}px`,headerBg:t.colorFillAlter,contentPadding:`${t.padding}px 16px`,contentBg:t.colorBgContainer,borderlessContentPadding:`${t.paddingXXS}px 16px ${t.padding}px`,borderlessContentBg:"transparent"}),ZQ=Ft("Collapse",t=>{const e=It(t,{collapseHeaderPaddingSM:`${V(t.paddingXS)} ${V(t.paddingSM)}`,collapseHeaderPaddingLG:`${V(t.padding)} ${V(t.paddingLG)}`,collapsePanelBorderRadius:t.borderRadiusLG});return[WQ(e),VQ(e),FQ(e),HQ(e),Kv(e)]},XQ),qQ=Se((t,e)=>{const{getPrefixCls:n,direction:r,expandIcon:i,className:o,style:a}=Zn("collapse"),{prefixCls:s,className:l,rootClassName:c,style:u,bordered:d=!0,ghost:f,size:h,expandIconPosition:m="start",children:p,destroyInactivePanel:g,destroyOnHidden:O,expandIcon:v}=t,y=br(Q=>{var E;return(E=h??Q)!==null&&E!==void 0?E:"middle"}),S=n("collapse",s),x=n(),[$,C,P]=ZQ(S),w=ve(()=>m==="left"?"start":m==="right"?"end":m,[m]),_=v??i,R=Ut((Q={})=>{const E=typeof _=="function"?_(Q):b($s,{rotate:Q.isActive?r==="rtl"?-90:90:void 0,"aria-label":Q.isActive?"expanded":"collapsed"});return lr(E,()=>{var k;return{className:U((k=E.props)===null||k===void 0?void 0:k.className,`${S}-arrow`)}})},[_,S,r]),I=U(`${S}-icon-position-${w}`,{[`${S}-borderless`]:!d,[`${S}-rtl`]:r==="rtl",[`${S}-ghost`]:!!f,[`${S}-${y}`]:y!=="middle"},o,l,c,C,P),T=ve(()=>Object.assign(Object.assign({},Rd(x)),{motionAppear:!1,leavedClassName:`${S}-content-hidden`}),[x,S]),M=ve(()=>p?sr(p).map((Q,E)=>{var k,z;const L=Q.props;if(L!=null&&L.disabled){const B=(k=Q.key)!==null&&k!==void 0?k:String(E),F=Object.assign(Object.assign({},pn(Q.props,["disabled"])),{key:B,collapsible:(z=L.collapsible)!==null&&z!==void 0?z:"disabled"});return lr(Q,F)}return Q}):null,[p]);return $(b(Yv,Object.assign({ref:e,openMotion:T},pn(t,["rootClassName"]),{expandIcon:R,prefixCls:S,className:I,style:Object.assign(Object.assign({},a),u),destroyInactivePanel:O??g}),M))}),Js=Object.assign(qQ,{Panel:fQ}),GQ=t=>t instanceof Np?t:new Np(t),UQ=(t,e)=>{const{r:n,g:r,b:i,a:o}=t.toRgb(),a=new ql(t.toRgbString()).onBackground(e).toHsv();return o<=.5?a.v>.5:n*.299+r*.587+i*.114>192},ww=t=>{const{paddingInline:e,onlyIconSize:n}=t;return It(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},Pw=t=>{var e,n,r,i,o,a;const s=(e=t.contentFontSize)!==null&&e!==void 0?e:t.fontSize,l=(n=t.contentFontSizeSM)!==null&&n!==void 0?n:t.fontSize,c=(r=t.contentFontSizeLG)!==null&&r!==void 0?r:t.fontSizeLG,u=(i=t.contentLineHeight)!==null&&i!==void 0?i:Uu(s),d=(o=t.contentLineHeightSM)!==null&&o!==void 0?o:Uu(l),f=(a=t.contentLineHeightLG)!==null&&a!==void 0?a:Uu(c),h=UQ(new Np(t.colorBgSolid),"#fff")?"#000":"#fff",m=No.reduce((p,g)=>Object.assign(Object.assign({},p),{[`${g}ShadowColor`]:`0 ${V(t.controlOutlineWidth)} 0 ${hl(t[`${g}1`],t.colorBgContainer)}`}),{});return Object.assign(Object.assign({},m),{fontWeight:400,iconGap:t.marginXS,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorder,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:h,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:f,paddingBlock:Math.max((t.controlHeight-s*u)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-l*d)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-c*f)/2-t.lineWidth,0)})},YQ=t=>{const{componentCls:e,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:o,motionEaseInOut:a,iconGap:s,calc:l}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:s,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${V(t.lineWidth)} ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:t.colorText,"&:disabled > *":{pointerEvents:"none"},[`${e}-icon > svg`]:zs(),"> a":{color:"currentColor"},"&:not(:disabled)":hi(t),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${e}-icon-only`]:{paddingInline:0,[`&${e}-compact-item`]:{flex:"none"}},[`&${e}-loading`]:{opacity:i,cursor:"default"},[`${e}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${o} ${a}`).join(",")},[`&:not(${e}-icon-end)`]:{[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},_w=(t,e,n)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":n}}),KQ=t=>({minWidth:t.controlHeight,paddingInline:0,borderRadius:"50%"}),JQ=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),Bf=(t,e,n,r,i,o,a,s)=>({[`&${t}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:e,borderColor:r||void 0,boxShadow:"none"},_w(t,Object.assign({background:e},a),Object.assign({background:e},s))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),e4=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},JQ(t))}),t4=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),Wf=(t,e,n,r)=>{const o=r&&["link","text"].includes(r)?t4:e4;return Object.assign(Object.assign({},o(t)),_w(t.componentCls,e,n))},Hf=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:n},Wf(t,r,i))}),Vf=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:n},Wf(t,r,i))}),Ff=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Xf=(t,e,n,r)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},Wf(t,n,r))}),Yi=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-${n}`]:Object.assign({color:e,boxShadow:"none"},Wf(t,r,i,n))}),n4=t=>{const{componentCls:e}=t;return No.reduce((n,r)=>{const i=t[`${r}6`],o=t[`${r}1`],a=t[`${r}5`],s=t[`${r}2`],l=t[`${r}3`],c=t[`${r}7`];return Object.assign(Object.assign({},n),{[`&${e}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:i,boxShadow:t[`${r}ShadowColor`]},Hf(t,t.colorTextLightSolid,i,{background:a},{background:c})),Vf(t,i,t.colorBgContainer,{color:a,borderColor:a,background:t.colorBgContainer},{color:c,borderColor:c,background:t.colorBgContainer})),Ff(t)),Xf(t,o,{color:i,background:s},{color:i,background:l})),Yi(t,i,"link",{color:a},{color:c})),Yi(t,i,"text",{color:a,background:o},{color:c,background:l}))})},{})},r4=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},Hf(t,t.solidTextColor,t.colorBgSolid,{color:t.solidTextColor,background:t.colorBgSolidHover},{color:t.solidTextColor,background:t.colorBgSolidActive})),Ff(t)),Xf(t,t.colorFillTertiary,{color:t.defaultColor,background:t.colorFillSecondary},{color:t.defaultColor,background:t.colorFill})),Bf(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),Yi(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),i4=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},Vf(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),Ff(t)),Xf(t,t.colorPrimaryBg,{color:t.colorPrimary,background:t.colorPrimaryBgHover},{color:t.colorPrimary,background:t.colorPrimaryBorder})),Yi(t,t.colorPrimaryText,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),Yi(t,t.colorPrimaryText,"link",{color:t.colorPrimaryTextHover,background:t.linkHoverBg},{color:t.colorPrimaryTextActive})),Bf(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),o4=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},Hf(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),Vf(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Ff(t)),Xf(t,t.colorErrorBg,{color:t.colorError,background:t.colorErrorBgFilledHover},{color:t.colorError,background:t.colorErrorBgActive})),Yi(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),Yi(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),Bf(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),a4=t=>Object.assign(Object.assign({},Yi(t,t.colorLink,"link",{color:t.colorLinkHover},{color:t.colorLinkActive})),Bf(t.componentCls,t.ghostBg,t.colorInfo,t.colorInfo,t.colorTextDisabled,t.colorBorder,{color:t.colorInfoHover,borderColor:t.colorInfoHover},{color:t.colorInfoActive,borderColor:t.colorInfoActive})),s4=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-color-default`]:r4(t),[`${e}-color-primary`]:i4(t),[`${e}-color-dangerous`]:o4(t),[`${e}-color-link`]:a4(t)},n4(t))},l4=t=>Object.assign(Object.assign(Object.assign(Object.assign({},Vf(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),Yi(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),Hf(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),Yi(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),i0=(t,e="")=>{const{componentCls:n,controlHeight:r,fontSize:i,borderRadius:o,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=t;return[{[e]:{fontSize:i,height:r,padding:`${V(l)} ${V(a)}`,borderRadius:o,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${e}`]:KQ(t)},{[`${n}${n}-round${e}`]:{borderRadius:t.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:t.buttonPaddingHorizontal}}}]},c4=t=>{const e=It(t,{fontSize:t.contentFontSize});return i0(e,t.componentCls)},u4=t=>{const e=It(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return i0(e,`${t.componentCls}-sm`)},d4=t=>{const e=It(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return i0(e,`${t.componentCls}-lg`)},f4=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},h4=Ft("Button",t=>{const e=ww(t);return[YQ(e),c4(e),u4(e),d4(e),f4(e),s4(e),l4(e),UA(e)]},Pw,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function m4(t,e,n,r){const{focusElCls:i,focus:o,borderElCls:a}=n,s=a?"> *":"",l=["hover",o?"focus":null,"active"].filter(Boolean).map(c=>`&:${c} ${s}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":Object.assign(Object.assign({[l]:{zIndex:3}},i?{[`&${i}`]:{zIndex:3}}:{}),{[`&[disabled] ${s}`]:{zIndex:0}})}}function p4(t,e,n){const{borderElCls:r}=n,i=r?`> ${r}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function o0(t,e={focus:!0}){const{componentCls:n}=t,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},m4(t,r,e,n)),p4(n,r,e))}}function g4(t,e,n){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function v4(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function O4(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},g4(t,e,t.componentCls)),v4(t.componentCls,e))}}const b4=t=>{const{componentCls:e,colorPrimaryHover:n,lineWidth:r,calc:i}=t,o=i(r).mul(-1).equal(),a=s=>{const l=`${e}-compact${s?"-vertical":""}-item${e}-primary:not([disabled])`;return{[`${l} + ${l}::before`]:{position:"absolute",top:s?o:0,insetInlineStart:s?0:o,backgroundColor:n,content:'""',width:s?"100%":r,height:s?r:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},y4=Ea(["Button","compact"],t=>{const e=ww(t);return[o0(e),O4(e),b4(e)]},Pw);var S4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{loading:i=!1,prefixCls:o,color:a,variant:s,type:l,danger:c=!1,shape:u,size:d,styles:f,disabled:h,className:m,rootClassName:p,children:g,icon:O,iconPosition:v="start",ghost:y=!1,block:S=!1,htmlType:x="button",classNames:$,style:C={},autoInsertSpace:P,autoFocus:w}=t,_=S4(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),R=l||"default",{button:I}=K.useContext(lt),T=u||(I==null?void 0:I.shape)||"default",[M,Q]=ve(()=>{if(a&&s)return[a,s];if(l||c){const Pe=$4[R]||[];return c?["danger",Pe[1]]:Pe}return I!=null&&I.color&&(I!=null&&I.variant)?[I.color,I.variant]:["default","outlined"]},[l,a,s,c,I==null?void 0:I.variant,I==null?void 0:I.color]),k=M==="danger"?"dangerous":M,{getPrefixCls:z,direction:L,autoInsertSpace:B,className:F,style:H,classNames:X,styles:q}=Zn("button"),N=(n=P??B)!==null&&n!==void 0?n:!0,j=z("btn",o),[oe,ee,se]=h4(j),fe=he(Ui),re=h??fe,J=he(xw),ue=ve(()=>x4(i),[i]),[de,D]=te(ue.loading),[Y,me]=te(!1),G=ne(null),ce=Oo(e,G),ae=wi.count(g)===1&&!O&&!Wh(Q),pe=ne(!0);K.useEffect(()=>(pe.current=!1,()=>{pe.current=!0}),[]),Lt(()=>{let Pe=null;ue.delay>0?Pe=setTimeout(()=>{Pe=null,D(!0)},ue.delay):D(ue.loading);function ft(){Pe&&(clearTimeout(Pe),Pe=null)}return ft},[ue.delay,ue.loading]),ye(()=>{if(!G.current||!N)return;const Pe=G.current.textContent||"";ae&&Ap(Pe)?Y||me(!0):Y&&me(!1)}),ye(()=>{w&&G.current&&G.current.focus()},[]);const Oe=K.useCallback(Pe=>{var ft;if(de||re){Pe.preventDefault();return}(ft=t.onClick)===null||ft===void 0||ft.call(t,("href"in t,Pe))},[t.onClick,de,re]),{compactSize:be,compactItemClassnames:ge}=Bs(j,L),Me={large:"lg",small:"sm",middle:void 0},Ie=br(Pe=>{var ft,yt;return(yt=(ft=d??be)!==null&&ft!==void 0?ft:J)!==null&&yt!==void 0?yt:Pe}),He=Ie&&(r=Me[Ie])!==null&&r!==void 0?r:"",Ae=de?"loading":O,Ee=pn(_,["navigate"]),st=U(j,ee,se,{[`${j}-${T}`]:T!=="default"&&T,[`${j}-${R}`]:R,[`${j}-dangerous`]:c,[`${j}-color-${k}`]:k,[`${j}-variant-${Q}`]:Q,[`${j}-${He}`]:He,[`${j}-icon-only`]:!g&&g!==0&&!!Ae,[`${j}-background-ghost`]:y&&!Wh(Q),[`${j}-loading`]:de,[`${j}-two-chinese-chars`]:Y&&N&&!de,[`${j}-block`]:S,[`${j}-rtl`]:L==="rtl",[`${j}-icon-end`]:v==="end"},ge,m,p,F),Ye=Object.assign(Object.assign({},H),C),rt=U($==null?void 0:$.icon,X.icon),Be=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),q.icon||{}),Re=O&&!de?K.createElement(Qp,{prefixCls:j,className:rt,style:Be},O):i&&typeof i=="object"&&i.icon?K.createElement(Qp,{prefixCls:j,className:rt,style:Be},i.icon):K.createElement(GA,{existIcon:!!O,prefixCls:j,loading:de,mount:pe.current}),Xe=g||g===0?qA(g,ae&&N):null;if(Ee.href!==void 0)return oe(K.createElement("a",Object.assign({},Ee,{className:U(st,{[`${j}-disabled`]:re}),href:re?void 0:Ee.href,style:Ye,onClick:Oe,ref:ce,tabIndex:re?-1:0,"aria-disabled":re}),Re,Xe));let _e=K.createElement("button",Object.assign({},_,{type:x,className:st,style:Ye,onClick:Oe,disabled:re,ref:ce}),Re,Xe,ge&&K.createElement(y4,{prefixCls:j}));return Wh(Q)||(_e=K.createElement(Gv,{component:"Button",disabled:de},_e)),oe(_e)}),wt=C4;wt.Group=XA;wt.__ANT_BUTTON=!0;const Xh=t=>typeof(t==null?void 0:t.then)=="function",a0=t=>{const{type:e,children:n,prefixCls:r,buttonProps:i,close:o,autoFocus:a,emitEvent:s,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=t,d=ne(!1),f=ne(null),[h,m]=ya(!1),p=(...v)=>{o==null||o.apply(void 0,v)};ye(()=>{let v=null;return a&&(v=setTimeout(()=>{var y;(y=f.current)===null||y===void 0||y.focus({preventScroll:!0})})),()=>{v&&clearTimeout(v)}},[]);const g=v=>{Xh(v)&&(m(!0),v.then((...y)=>{m(!1,!0),p.apply(void 0,y),d.current=!1},y=>{if(m(!1,!0),d.current=!1,!(l!=null&&l()))return Promise.reject(y)}))},O=v=>{if(d.current)return;if(d.current=!0,!u){p();return}let y;if(s){if(y=u(v),c&&!Xh(y)){d.current=!1,p(v);return}}else if(u.length)y=u(o),d.current=!1;else if(y=u(),!Xh(y)){p();return}g(y)};return b(wt,Object.assign({},Uv(e),{onClick:O,loading:h,prefixCls:r},i,{ref:f}),n)},Rc=K.createContext({}),{Provider:Tw}=Rc,iy=()=>{const{autoFocusButton:t,cancelButtonProps:e,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:o,close:a,onCancel:s,onConfirm:l}=he(Rc);return i?K.createElement(a0,{isSilent:r,actionFn:s,close:(...c)=>{a==null||a.apply(void 0,c),l==null||l(!1)},autoFocus:t==="cancel",buttonProps:e,prefixCls:`${o}-btn`},n):null},oy=()=>{const{autoFocusButton:t,close:e,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:o,okType:a,onConfirm:s,onOk:l}=he(Rc);return K.createElement(a0,{isSilent:n,type:a||"primary",actionFn:l,close:(...c)=>{e==null||e.apply(void 0,c),s==null||s(!0)},autoFocus:t==="ok",buttonProps:r,prefixCls:`${i}-btn`},o)};var Rw=Tt(null),ay=[];function w4(t,e){var n=te(function(){if(!pr())return null;var m=document.createElement("div");return m}),r=le(n,1),i=r[0],o=ne(!1),a=he(Rw),s=te(ay),l=le(s,2),c=l[0],u=l[1],d=a||(o.current?void 0:function(m){u(function(p){var g=[m].concat(Ce(p));return g})});function f(){i.parentElement||document.body.appendChild(i),o.current=!0}function h(){var m;(m=i.parentElement)===null||m===void 0||m.removeChild(i),o.current=!1}return Lt(function(){return t?a?a(f):f():h(),h},[t]),Lt(function(){c.length&&(c.forEach(function(m){return m()}),u(ay))},[c]),[i,d]}function P4(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=e;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var i,o;if(t){var a=getComputedStyle(t);r.scrollbarColor=a.scrollbarColor,r.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(t,"::-webkit-scrollbar"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",d=c?"height: ".concat(s.height,";"):"";lo(` #`.concat(e,`::-webkit-scrollbar { `).concat(u,` `).concat(d,` -}`),e)}catch(p){console.error(p),i=l,o=c}}document.body.appendChild(n);var f=t&&i&&!isNaN(i)?i:n.offsetWidth-n.clientWidth,h=t&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),jl(e),{width:f,height:h}}function f4(t){return typeof document>"u"||!t||!(t instanceof Element)?{width:0,height:0}:d4(t)}function h4(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var p4="rc-util-locker-".concat(Date.now()),Gb=0;function m4(t){var e=!!t,n=J(function(){return Gb+=1,"".concat(p4,"_").concat(Gb)}),r=ae(n,1),i=r[0];Nt(function(){if(e){var o=f4(document.body).width,a=h4();so(` +}`),e)}catch(m){console.error(m),i=l,o=c}}document.body.appendChild(n);var f=t&&i&&!isNaN(i)?i:n.offsetWidth-n.clientWidth,h=t&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),Hl(e),{width:f,height:h}}function _4(t){return typeof document>"u"||!t||!(t instanceof Element)?{width:0,height:0}:P4(t)}function T4(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var R4="rc-util-locker-".concat(Date.now()),sy=0;function I4(t){var e=!!t,n=te(function(){return sy+=1,"".concat(R4,"_").concat(sy)}),r=le(n,1),i=r[0];Lt(function(){if(e){var o=_4(document.body).width,a=T4();lo(` html body { overflow-y: hidden; `.concat(a?"width: calc(100% - ".concat(o,"px);"):"",` -}`),i)}else jl(i);return function(){jl(i)}},[e,i])}var g4=!1;function v4(t){return g4}var Yb=function(e){return e===!1?!1:!dr()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},Kv=Se(function(t,e){var n=t.open,r=t.autoLock,i=t.getContainer;t.debug;var o=t.autoDestroy,a=o===void 0?!0:o,s=t.children,l=J(n),c=ae(l,2),u=c[0],d=c[1],f=u||n;be(function(){(a||n)&&d(n)},[n,a]);var h=J(function(){return Yb(i)}),p=ae(h,2),m=p[0],g=p[1];be(function(){var T=Yb(i);g(T??null)});var v=u4(f&&!m),O=ae(v,2),S=O[0],x=O[1],b=m??S;m4(r&&n&&dr()&&(b===S||b===document.body));var C=null;if(s&&vo(s)&&e){var $=s;C=$.ref}var w=go(C,e);if(!f||!dr()||m===void 0)return null;var P=b===!1||v4(),_=s;return e&&(_=Xn(s,{ref:w})),y(hw.Provider,{value:x},P?_:lf(_,b))}),pw=bt({});function O4(){var t=W({},gc);return t.useId}var Ub=0,Kb=O4();const Jv=Kb?function(e){var n=Kb();return e||n}:function(e){var n=J("ssr-id"),r=ae(n,2),i=r[0],o=r[1];return be(function(){var a=Ub;Ub+=1,o("rc_unique_".concat(a))},[]),e||i};function Jb(t,e,n){var r=e;return!r&&n&&(r="".concat(t,"-").concat(n)),r}function ey(t,e){var n=t["page".concat(e?"Y":"X","Offset")],r="scroll".concat(e?"Top":"Left");if(typeof n!="number"){var i=t.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function b4(t){var e=t.getBoundingClientRect(),n={left:e.left,top:e.top},r=t.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=ey(i),n.top+=ey(i,!0),n}const y4=Ta(function(t){var e=t.children;return e},function(t,e){var n=e.shouldUpdate;return!n});var S4={width:0,height:0,overflow:"hidden",outline:"none"},x4={outline:"none"},mw=oe.forwardRef(function(t,e){var n=t.prefixCls,r=t.className,i=t.style,o=t.title,a=t.ariaId,s=t.footer,l=t.closable,c=t.closeIcon,u=t.onClose,d=t.children,f=t.bodyStyle,h=t.bodyProps,p=t.modalRender,m=t.onMouseDown,g=t.onMouseUp,v=t.holderRef,O=t.visible,S=t.forceRender,x=t.width,b=t.height,C=t.classNames,$=t.styles,w=oe.useContext(pw),P=w.panel,_=go(v,P),T=U(),R=U();oe.useImperativeHandle(e,function(){return{focus:function(){var H;(H=T.current)===null||H===void 0||H.focus({preventScroll:!0})},changeActive:function(H){var V=document,X=V.activeElement;H&&X===R.current?T.current.focus({preventScroll:!0}):!H&&X===T.current&&R.current.focus({preventScroll:!0})}}});var k={};x!==void 0&&(k.width=x),b!==void 0&&(k.height=b);var I=s?oe.createElement("div",{className:Z("".concat(n,"-footer"),C==null?void 0:C.footer),style:W({},$==null?void 0:$.footer)},s):null,Q=o?oe.createElement("div",{className:Z("".concat(n,"-header"),C==null?void 0:C.header),style:W({},$==null?void 0:$.header)},oe.createElement("div",{className:"".concat(n,"-title"),id:a},o)):null,M=ge(function(){return Je(l)==="object"&&l!==null?l:l?{closeIcon:c??oe.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[l,c,n]),E=$i(M,!0),N=Je(l)==="object"&&l.disabled,z=l?oe.createElement("button",Ce({type:"button",onClick:u,"aria-label":"Close"},E,{className:"".concat(n,"-close"),disabled:N}),M.closeIcon):null,L=oe.createElement("div",{className:Z("".concat(n,"-content"),C==null?void 0:C.content),style:$==null?void 0:$.content},z,Q,oe.createElement("div",Ce({className:Z("".concat(n,"-body"),C==null?void 0:C.body),style:W(W({},f),$==null?void 0:$.body)},h),d),I);return oe.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":o?a:null,"aria-modal":"true",ref:_,style:W(W({},i),k),className:Z(n,r),onMouseDown:m,onMouseUp:g},oe.createElement("div",{ref:T,tabIndex:0,style:x4},oe.createElement(y4,{shouldUpdate:O||S},p?p(L):L)),oe.createElement("div",{tabIndex:0,ref:R,style:S4}))}),gw=Se(function(t,e){var n=t.prefixCls,r=t.title,i=t.style,o=t.className,a=t.visible,s=t.forceRender,l=t.destroyOnClose,c=t.motionName,u=t.ariaId,d=t.onVisibleChanged,f=t.mousePosition,h=U(),p=J(),m=ae(p,2),g=m[0],v=m[1],O={};g&&(O.transformOrigin=g);function S(){var x=b4(h.current);v(f&&(f.x||f.y)?"".concat(f.x-x.left,"px ").concat(f.y-x.top,"px"):"")}return y(pi,{visible:a,onVisibleChanged:d,onAppearPrepare:S,onEnterPrepare:S,forceRender:s,motionName:c,removeOnLeave:l,ref:h},function(x,b){var C=x.className,$=x.style;return y(mw,Ce({},t,{ref:e,title:r,ariaId:u,prefixCls:n,holderRef:b,style:W(W(W({},$),i),O),className:Z(o,C)}))})});gw.displayName="Content";var C4=function(e){var n=e.prefixCls,r=e.style,i=e.visible,o=e.maskProps,a=e.motionName,s=e.className;return y(pi,{key:"mask",visible:i,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},function(l,c){var u=l.className,d=l.style;return y("div",Ce({ref:c,style:W(W({},d),r),className:Z("".concat(n,"-mask"),u,s)},o))})},$4=function(e){var n=e.prefixCls,r=n===void 0?"rc-dialog":n,i=e.zIndex,o=e.visible,a=o===void 0?!1:o,s=e.keyboard,l=s===void 0?!0:s,c=e.focusTriggerAfterClose,u=c===void 0?!0:c,d=e.wrapStyle,f=e.wrapClassName,h=e.wrapProps,p=e.onClose,m=e.afterOpenChange,g=e.afterClose,v=e.transitionName,O=e.animation,S=e.closable,x=S===void 0?!0:S,b=e.mask,C=b===void 0?!0:b,$=e.maskTransitionName,w=e.maskAnimation,P=e.maskClosable,_=P===void 0?!0:P,T=e.maskStyle,R=e.maskProps,k=e.rootClassName,I=e.classNames,Q=e.styles,M=U(),E=U(),N=U(),z=J(a),L=ae(z,2),F=L[0],H=L[1],V=Jv();function X(){Yp(E.current,document.activeElement)||(M.current=document.activeElement)}function B(){if(!Yp(E.current,document.activeElement)){var j;(j=N.current)===null||j===void 0||j.focus()}}function G(j){if(j)B();else{if(H(!1),C&&M.current&&u){try{M.current.focus({preventScroll:!0})}catch{}M.current=null}F&&(g==null||g())}m==null||m(j)}function se(j){p==null||p(j)}var re=U(!1),le=U(),me=function(){clearTimeout(le.current),re.current=!0},ie=function(){le.current=setTimeout(function(){re.current=!1})},ne=null;_&&(ne=function(ee){re.current?re.current=!1:E.current===ee.target&&se(ee)});function ue(j){if(l&&j.keyCode===je.ESC){j.stopPropagation(),se(j);return}a&&j.keyCode===je.TAB&&N.current.changeActive(!j.shiftKey)}be(function(){a&&(H(!0),X())},[a]),be(function(){return function(){clearTimeout(le.current)}},[]);var de=W(W(W({zIndex:i},d),Q==null?void 0:Q.wrapper),{},{display:F?null:"none"});return y("div",Ce({className:Z("".concat(r,"-root"),k)},$i(e,{data:!0})),y(C4,{prefixCls:r,visible:C&&a,motionName:Jb(r,$,w),style:W(W({zIndex:i},T),Q==null?void 0:Q.mask),maskProps:R,className:I==null?void 0:I.mask}),y("div",Ce({tabIndex:-1,onKeyDown:ue,className:Z("".concat(r,"-wrap"),f,I==null?void 0:I.wrapper),ref:E,onClick:ne,style:de},h),y(gw,Ce({},e,{onMouseDown:me,onMouseUp:ie,ref:N,closable:x,ariaId:V,prefixCls:r,visible:a&&F,onClose:se,onVisibleChanged:G,motionName:Jb(r,v,O)}))))},vw=function(e){var n=e.visible,r=e.getContainer,i=e.forceRender,o=e.destroyOnClose,a=o===void 0?!1:o,s=e.afterClose,l=e.panelRef,c=J(n),u=ae(c,2),d=u[0],f=u[1],h=ge(function(){return{panel:l}},[l]);return be(function(){n&&f(!0)},[n]),!i&&a&&!d?null:y(pw.Provider,{value:h},y(Kv,{open:n||i||d,autoDestroy:!1,getContainer:r,autoLock:n||d},y($4,Ce({},e,{destroyOnClose:a,afterClose:function(){s==null||s(),f(!1)}}))))};vw.displayName="Dialog";var aa="RC_FORM_INTERNAL_HOOKS",tn=function(){tr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},ya=bt({getFieldValue:tn,getFieldsValue:tn,getFieldError:tn,getFieldWarning:tn,getFieldsError:tn,isFieldsTouched:tn,isFieldTouched:tn,isFieldValidating:tn,isFieldsValidating:tn,resetFields:tn,setFields:tn,setFieldValue:tn,setFieldsValue:tn,validateFields:tn,submit:tn,getInternalHooks:function(){return tn(),{dispatch:tn,initEntityValue:tn,registerField:tn,useSubscribe:tn,setInitialValues:tn,destroyForm:tn,setCallbacks:tn,registerWatch:tn,getFields:tn,setValidateMessages:tn,setPreserve:tn,getInitialValue:tn}}}),Hl=bt(null);function _m(t){return t==null?[]:Array.isArray(t)?t:[t]}function w4(t){return t&&!!t._init}function Tm(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var km=Tm();function P4(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function _4(t,e,n){if(yf())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&zl(i,n.prototype),i}function Rm(t){var e=typeof Map=="function"?new Map:void 0;return Rm=function(r){if(r===null||!P4(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return _4(r,arguments,ma(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),zl(i,r)},Rm(t)}var T4=/%[sdj%]/g,k4=function(){};function Im(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function Yr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=o)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function R4(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function Wn(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||R4(e)&&typeof t=="string"&&!t)}function I4(t,e,n){var r=[],i=0,o=t.length;function a(s){r.push.apply(r,$e(s||[])),i++,i===o&&n(r)}t.forEach(function(s){e(s,a)})}function ty(t,e,n){var r=0,i=t.length;function o(a){if(a&&a.length){n(a);return}var s=r;r=r+1,se.max?i.push(Yr(o.messages[d].max,e.fullField,e.max)):s&&l&&(ue.max)&&i.push(Yr(o.messages[d].range,e.fullField,e.min,e.max))},Ow=function(e,n,r,i,o,a){e.required&&(!r.hasOwnProperty(e.field)||Wn(n,a||e.type))&&i.push(Yr(o.messages.required,e.fullField))},ru;const j4=function(){if(ru)return ru;var t="[a-fA-F\\d:]",e=function(C){return C&&C.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(i.join("|"),")").concat(o),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(a,"$")),u=function(C){return C&&C.exact?s:new RegExp("(?:".concat(e(C)).concat(n).concat(e(C),")|(?:").concat(e(C)).concat(a).concat(e(C),")"),"g")};u.v4=function(b){return b&&b.exact?l:new RegExp("".concat(e(b)).concat(n).concat(e(b)),"g")},u.v6=function(b){return b&&b.exact?c:new RegExp("".concat(e(b)).concat(a).concat(e(b)),"g")};var d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",h=u.v4().source,p=u.v6().source,m="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",v="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",O="(?::\\d{2,5})?",S='(?:[/?#][^\\s"]*)?',x="(?:".concat(d,"|www\\.)").concat(f,"(?:localhost|").concat(h,"|").concat(p,"|").concat(m).concat(g).concat(v,")").concat(O).concat(S);return ru=new RegExp("(?:^".concat(x,"$)"),"i"),ru};var oy={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},dl={integer:function(e){return dl.number(e)&&parseInt(e,10)===e},float:function(e){return dl.number(e)&&!dl.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return Je(e)==="object"&&!dl.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(oy.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(j4())},hex:function(e){return typeof e=="string"&&!!e.match(oy.hex)}},D4=function(e,n,r,i,o){if(e.required&&n===void 0){Ow(e,n,r,i,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?dl[s](n)||i.push(Yr(o.messages.types[s],e.fullField,e.type)):s&&Je(n)!==e.type&&i.push(Yr(o.messages.types[s],e.fullField,e.type))},B4=function(e,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(Yr(o.messages.whitespace,e.fullField))};const Et={required:Ow,whitespace:B4,type:D4,range:L4,enum:N4,pattern:z4};var W4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o)}r(a)},F4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return r();Et.required(e,n,i,a,o,"array"),n!=null&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},V4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et.type(e,n,i,a,o)}r(a)},H4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n,"date")&&!e.required)return r();if(Et.required(e,n,i,a,o),!Wn(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),Et.type(e,l,i,a,o),l&&Et.range(e,l.getTime(),i,a,o)}}r(a)},X4="enum",Z4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et[X4](e,n,i,a,o)}r(a)},q4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},G4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},Y4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et.type(e,n,i,a,o)}r(a)},U4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},K4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et.type(e,n,i,a,o)}r(a)},J4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n,"string")&&!e.required)return r();Et.required(e,n,i,a,o),Wn(n,"string")||Et.pattern(e,n,i,a,o)}r(a)},e3=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),Wn(n)||Et.type(e,n,i,a,o)}r(a)},t3=function(e,n,r,i,o){var a=[],s=Array.isArray(n)?"array":Je(n);Et.required(e,n,i,a,o,s),r(a)},n3=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n,"string")&&!e.required)return r();Et.required(e,n,i,a,o,"string"),Wn(n,"string")||(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o),Et.pattern(e,n,i,a,o),e.whitespace===!0&&Et.whitespace(e,n,i,a,o))}r(a)},zh=function(e,n,r,i,o){var a=e.type,s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(Wn(n,a)&&!e.required)return r();Et.required(e,n,i,s,o,a),Wn(n,a)||Et.type(e,n,i,s,o)}r(s)};const xl={string:n3,method:Y4,number:U4,boolean:V4,regexp:e3,integer:G4,float:q4,array:F4,object:K4,enum:Z4,pattern:J4,date:H4,url:zh,hex:zh,email:zh,required:t3,any:W4};var wc=function(){function t(e){Mn(this,t),D(this,"rules",null),D(this,"_messages",km),this.define(e)}return En(t,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(Je(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(i){var o=n[i];r.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(n){return n&&(this._messages=iy(Tm(),n)),this._messages}},{key:"validate",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,s=i,l=o;if(typeof s=="function"&&(l=s,s={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(p){var m=[],g={};function v(S){if(Array.isArray(S)){var x;m=(x=m).concat.apply(x,$e(S))}else m.push(S)}for(var O=0;O0&&arguments[0]!==void 0?arguments[0]:[],w=Array.isArray($)?$:[$];!s.suppressWarning&&w.length&&t.warning("async-validator:",w),w.length&&g.message!==void 0&&(w=[].concat(g.message));var P=w.map(ry(g,a));if(s.first&&P.length)return h[g.field]=1,m(P);if(!v)m(P);else{if(g.required&&!p.value)return g.message!==void 0?P=[].concat(g.message).map(ry(g,a)):s.error&&(P=[s.error(g,Yr(s.messages.required,g.field))]),m(P);var _={};g.defaultField&&Object.keys(p.value).map(function(k){_[k]=g.defaultField}),_=W(W({},_),p.rule.fields);var T={};Object.keys(_).forEach(function(k){var I=_[k],Q=Array.isArray(I)?I:[I];T[k]=Q.map(O.bind(null,k))});var R=new t(T);R.messages(s.messages),p.rule.options&&(p.rule.options.messages=s.messages,p.rule.options.error=s.error),R.validate(p.value,p.rule.options||s,function(k){var I=[];P&&P.length&&I.push.apply(I,$e(P)),k&&k.length&&I.push.apply(I,$e(k)),m(I.length?I:null)})}}var x;if(g.asyncValidator)x=g.asyncValidator(g,p.value,S,p.source,s);else if(g.validator){try{x=g.validator(g,p.value,S,p.source,s)}catch($){var b,C;(b=(C=console).error)===null||b===void 0||b.call(C,$),s.suppressValidatorError||setTimeout(function(){throw $},0),S($.message)}x===!0?S():x===!1?S(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||"".concat(g.fullField||g.field," fails")):x instanceof Array?S(x):x instanceof Error&&S(x.message)}x&&x.then&&x.then(function(){return S()},function($){return S($)})},function(p){c(p)},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!xl.hasOwnProperty(n.type))throw new Error(Yr("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),i=r.indexOf("message");return i!==-1&&r.splice(i,1),r.length===1&&r[0]==="required"?xl.required:xl[this.getType(n)]||void 0}}]),t}();D(wc,"register",function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");xl[e]=n});D(wc,"warning",k4);D(wc,"messages",km);D(wc,"validators",xl);var Fr="'${name}' is not a valid ${type}",bw={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Fr,method:Fr,array:Fr,object:Fr,number:Fr,date:Fr,boolean:Fr,integer:Fr,float:Fr,regexp:Fr,email:Fr,url:Fr,hex:Fr},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},ay=wc;function r3(t,e){return t.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return e[r]})}var sy="CODE_LOGIC_ERROR";function Mm(t,e,n,r,i){return Em.apply(this,arguments)}function Em(){return Em=ka(hr().mark(function t(e,n,r,i,o){var a,s,l,c,u,d,f,h,p;return hr().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return a=W({},r),delete a.ruleIndex,ay.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(v){return console.error(v),Promise.reject(sy)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new ay(D({},e,[a])),u=Ga(bw,i.validateMessages),c.messages(u),d=[],g.prev=10,g.next=13,Promise.resolve(c.validate(D({},e,n),W({},i)));case 13:g.next=18;break;case 15:g.prev=15,g.t0=g.catch(10),g.t0.errors&&(d=g.t0.errors.map(function(v,O){var S=v.message,x=S===sy?u.default:S;return Kt(x)?Xn(x,{key:"error_".concat(O)}):x}));case 18:if(!(!d.length&&l)){g.next=23;break}return g.next=21,Promise.all(n.map(function(v,O){return Mm("".concat(e,".").concat(O),v,l,i,o)}));case 21:return f=g.sent,g.abrupt("return",f.reduce(function(v,O){return[].concat($e(v),$e(O))},[]));case 23:return h=W(W({},r),{},{name:e,enum:(r.enum||[]).join(", ")},o),p=d.map(function(v){return typeof v=="string"?r3(v,h):v}),g.abrupt("return",p);case 26:case"end":return g.stop()}},t,null,[[10,15]])})),Em.apply(this,arguments)}function i3(t,e,n,r,i,o){var a=t.join("."),s=n.map(function(u,d){var f=u.validator,h=W(W({},u),{},{ruleIndex:d});return f&&(h.validator=function(p,m,g){var v=!1,O=function(){for(var b=arguments.length,C=new Array(b),$=0;$2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(r){return yw(e,r,n)})}function yw(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!e||!n&&t.length!==e.length?!1:e.every(function(r,i){return t[i]===r})}function s3(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||Je(t)!=="object"||Je(e)!=="object")return!1;var n=Object.keys(t),r=Object.keys(e),i=new Set([].concat(n,r));return $e(i).every(function(o){var a=t[o],s=e[o];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function l3(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&Je(e.target)==="object"&&t in e.target?e.target[t]:e}function cy(t,e,n){var r=t.length;if(e<0||e>=r||n<0||n>=r)return t;var i=t[e],o=e-n;return o>0?[].concat($e(t.slice(0,n)),[i],$e(t.slice(n,e)),$e(t.slice(e+1,r))):o<0?[].concat($e(t.slice(0,e)),$e(t.slice(e+1,n+1)),[i],$e(t.slice(n+1,r))):t}var c3=["name"],ni=[];function Lh(t,e,n,r,i,o){return typeof t=="function"?t(e,n,"source"in o?{source:o.source}:{}):r!==i}var e0=function(t){Ui(n,t);var e=Oo(n);function n(r){var i;if(Mn(this,n),i=e.call(this,r),D(Pt(i),"state",{resetCount:0}),D(Pt(i),"cancelRegisterFunc",null),D(Pt(i),"mounted",!1),D(Pt(i),"touched",!1),D(Pt(i),"dirty",!1),D(Pt(i),"validatePromise",void 0),D(Pt(i),"prevValidating",void 0),D(Pt(i),"errors",ni),D(Pt(i),"warnings",ni),D(Pt(i),"cancelRegister",function(){var l=i.props,c=l.preserve,u=l.isListField,d=l.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(u,c,kn(d)),i.cancelRegisterFunc=null}),D(Pt(i),"getNamePath",function(){var l=i.props,c=l.name,u=l.fieldContext,d=u.prefixName,f=d===void 0?[]:d;return c!==void 0?[].concat($e(f),$e(c)):[]}),D(Pt(i),"getRules",function(){var l=i.props,c=l.rules,u=c===void 0?[]:c,d=l.fieldContext;return u.map(function(f){return typeof f=="function"?f(d):f})}),D(Pt(i),"refresh",function(){i.mounted&&i.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),D(Pt(i),"metaCache",null),D(Pt(i),"triggerMetaEvent",function(l){var c=i.props.onMetaChange;if(c){var u=W(W({},i.getMeta()),{},{destroy:l});Dl(i.metaCache,u)||c(u),i.metaCache=u}else i.metaCache=null}),D(Pt(i),"onStoreChange",function(l,c,u){var d=i.props,f=d.shouldUpdate,h=d.dependencies,p=h===void 0?[]:h,m=d.onReset,g=u.store,v=i.getNamePath(),O=i.getValue(l),S=i.getValue(g),x=c&&is(c,v);switch(u.type==="valueUpdate"&&u.source==="external"&&!Dl(O,S)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=ni,i.warnings=ni,i.triggerMetaEvent()),u.type){case"reset":if(!c||x){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=ni,i.warnings=ni,i.triggerMetaEvent(),m==null||m(),i.refresh();return}break;case"remove":{if(f&&Lh(f,l,g,O,S,u)){i.reRender();return}break}case"setField":{var b=u.data;if(x){"touched"in b&&(i.touched=b.touched),"validating"in b&&!("originRCField"in b)&&(i.validatePromise=b.validating?Promise.resolve([]):null),"errors"in b&&(i.errors=b.errors||ni),"warnings"in b&&(i.warnings=b.warnings||ni),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in b&&is(c,v,!0)){i.reRender();return}if(f&&!v.length&&Lh(f,l,g,O,S,u)){i.reRender();return}break}case"dependenciesUpdate":{var C=p.map(kn);if(C.some(function($){return is(u.relatedFields,$)})){i.reRender();return}break}default:if(x||(!p.length||v.length||f)&&Lh(f,l,g,O,S,u)){i.reRender();return}break}f===!0&&i.reRender()}),D(Pt(i),"validateRules",function(l){var c=i.getNamePath(),u=i.getValue(),d=l||{},f=d.triggerName,h=d.validateOnly,p=h===void 0?!1:h,m=Promise.resolve().then(ka(hr().mark(function g(){var v,O,S,x,b,C,$;return hr().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(i.mounted){P.next=2;break}return P.abrupt("return",[]);case 2:if(v=i.props,O=v.validateFirst,S=O===void 0?!1:O,x=v.messageVariables,b=v.validateDebounce,C=i.getRules(),f&&(C=C.filter(function(_){return _}).filter(function(_){var T=_.validateTrigger;if(!T)return!0;var R=_m(T);return R.includes(f)})),!(b&&f)){P.next=10;break}return P.next=8,new Promise(function(_){setTimeout(_,b)});case 8:if(i.validatePromise===m){P.next=10;break}return P.abrupt("return",[]);case 10:return $=i3(c,u,C,l,S,x),$.catch(function(_){return _}).then(function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ni;if(i.validatePromise===m){var T;i.validatePromise=null;var R=[],k=[];(T=_.forEach)===null||T===void 0||T.call(_,function(I){var Q=I.rule.warningOnly,M=I.errors,E=M===void 0?ni:M;Q?k.push.apply(k,$e(E)):R.push.apply(R,$e(E))}),i.errors=R,i.warnings=k,i.triggerMetaEvent(),i.reRender()}}),P.abrupt("return",$);case 13:case"end":return P.stop()}},g)})));return p||(i.validatePromise=m,i.dirty=!0,i.errors=ni,i.warnings=ni,i.triggerMetaEvent(),i.reRender()),m}),D(Pt(i),"isFieldValidating",function(){return!!i.validatePromise}),D(Pt(i),"isFieldTouched",function(){return i.touched}),D(Pt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var l=i.props.fieldContext,c=l.getInternalHooks(aa),u=c.getInitialValue;return u(i.getNamePath())!==void 0}),D(Pt(i),"getErrors",function(){return i.errors}),D(Pt(i),"getWarnings",function(){return i.warnings}),D(Pt(i),"isListField",function(){return i.props.isListField}),D(Pt(i),"isList",function(){return i.props.isList}),D(Pt(i),"isPreserve",function(){return i.props.preserve}),D(Pt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var l={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return l}),D(Pt(i),"getOnlyChild",function(l){if(typeof l=="function"){var c=i.getMeta();return W(W({},i.getOnlyChild(l(i.getControlled(),c,i.props.fieldContext))),{},{isFunction:!0})}var u=nr(l);return u.length!==1||!Kt(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),D(Pt(i),"getValue",function(l){var c=i.props.fieldContext.getFieldsValue,u=i.getNamePath();return si(l||c(!0),u)}),D(Pt(i),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i.props,u=c.name,d=c.trigger,f=c.validateTrigger,h=c.getValueFromEvent,p=c.normalize,m=c.valuePropName,g=c.getValueProps,v=c.fieldContext,O=f!==void 0?f:v.validateTrigger,S=i.getNamePath(),x=v.getInternalHooks,b=v.getFieldsValue,C=x(aa),$=C.dispatch,w=i.getValue(),P=g||function(I){return D({},m,I)},_=l[d],T=u!==void 0?P(w):{},R=W(W({},l),T);R[d]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var I,Q=arguments.length,M=new Array(Q),E=0;E=0&&_<=T.length?(u.keys=[].concat($e(u.keys.slice(0,_)),[u.id],$e(u.keys.slice(_))),S([].concat($e(T.slice(0,_)),[P],$e(T.slice(_))))):(u.keys=[].concat($e(u.keys),[u.id]),S([].concat($e(T),[P]))),u.id+=1},remove:function(P){var _=b(),T=new Set(Array.isArray(P)?P:[P]);T.size<=0||(u.keys=u.keys.filter(function(R,k){return!T.has(k)}),S(_.filter(function(R,k){return!T.has(k)})))},move:function(P,_){if(P!==_){var T=b();P<0||P>=T.length||_<0||_>=T.length||(u.keys=cy(u.keys,P,_),S(cy(T,P,_)))}}},$=O||[];return Array.isArray($)||($=[]),r($.map(function(w,P){var _=u.keys[P];return _===void 0&&(u.keys[P]=u.id,_=u.keys[P],u.id+=1),{name:P,key:_,isListField:!0}}),C,g)})))}function u3(t){var e=!1,n=t.length,r=[];return t.length?new Promise(function(i,o){t.forEach(function(a,s){a.catch(function(l){return e=!0,l}).then(function(l){n-=1,r[s]=l,!(n>0)&&(e&&o(r),i(r))})})}):Promise.resolve([])}var xw="__@field_split__";function jh(t){return t.map(function(e){return"".concat(Je(e),":").concat(e)}).join(xw)}var Qa=function(){function t(){Mn(this,t),D(this,"kvs",new Map)}return En(t,[{key:"set",value:function(n,r){this.kvs.set(jh(n),r)}},{key:"get",value:function(n){return this.kvs.get(jh(n))}},{key:"update",value:function(n,r){var i=this.get(n),o=r(i);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(jh(n))}},{key:"map",value:function(n){return $e(this.kvs.entries()).map(function(r){var i=ae(r,2),o=i[0],a=i[1],s=o.split(xw);return n({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=ae(c,3),d=u[1],f=u[2];return d==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,o=r.value;return n[i.join(".")]=o,null}),n}}]),t}(),d3=["name"],f3=En(function t(e){var n=this;Mn(this,t),D(this,"formHooked",!1),D(this,"forceRootUpdate",void 0),D(this,"subscribable",!0),D(this,"store",{}),D(this,"fieldEntities",[]),D(this,"initialValues",{}),D(this,"callbacks",{}),D(this,"validateMessages",null),D(this,"preserve",null),D(this,"lastValidatePromise",null),D(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),D(this,"getInternalHooks",function(r){return r===aa?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(tr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),D(this,"useSubscribe",function(r){n.subscribable=r}),D(this,"prevWithoutPreserves",null),D(this,"setInitialValues",function(r,i){if(n.initialValues=r||{},i){var o,a=Ga(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(s){var l=s.key;a=ai(a,l,si(r,l))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),D(this,"destroyForm",function(r){if(r)n.updateStore({});else{var i=new Qa;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=i}}),D(this,"getInitialValue",function(r){var i=si(n.initialValues,r);return r.length?Ga(i):i}),D(this,"setCallbacks",function(r){n.callbacks=r}),D(this,"setValidateMessages",function(r){n.validateMessages=r}),D(this,"setPreserve",function(r){n.preserve=r}),D(this,"watchList",[]),D(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}}),D(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(a){a(i,o,r)})}}),D(this,"timeoutId",null),D(this,"warningUnhooked",function(){}),D(this,"updateStore",function(r){n.store=r}),D(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities}),D(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new Qa;return n.getFieldEntities(r).forEach(function(o){var a=o.getNamePath();i.set(a,o)}),i}),D(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(o){var a=kn(o);return i.get(a)||{INVALIDATE_NAME_PATH:kn(o)}})}),D(this,"getFieldsValue",function(r,i){n.warningUnhooked();var o,a,s;if(r===!0||Array.isArray(r)?(o=r,a=i):r&&Je(r)==="object"&&(s=r.strict,a=r.filter),o===!0&&!a)return n.store;var l=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),c=[];return l.forEach(function(u){var d,f,h="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var p,m;if((p=(m=u).isList)!==null&&p!==void 0&&p.call(m))return}else if(!o&&(d=(f=u).isListField)!==null&&d!==void 0&&d.call(f))return;if(!a)c.push(h);else{var g="getMeta"in u?u.getMeta():null;a(g)&&c.push(h)}}),ly(n.store,c.map(kn))}),D(this,"getFieldValue",function(r){n.warningUnhooked();var i=kn(r);return si(n.store,i)}),D(this,"getFieldsError",function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(o,a){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:kn(r[a]),errors:[],warnings:[]}})}),D(this,"getFieldError",function(r){n.warningUnhooked();var i=kn(r),o=n.getFieldsError([i])[0];return o.errors}),D(this,"getFieldWarning",function(r){n.warningUnhooked();var i=kn(r),o=n.getFieldsError([i])[0];return o.warnings}),D(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},i=new Qa,o=n.getFieldEntities(!0);o.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=i.get(u)||new Set;d.add({entity:l,value:c}),i.set(u,d)}});var a=function(c){c.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var f=u.getNamePath(),h=n.getInitialValue(f);if(h!==void 0)tr(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var p=i.get(f);if(p&&p.size>1)tr(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(p){var m=n.getFieldValue(f),g=u.isListField();!g&&(!r.skipExist||m===void 0)&&n.updateStore(ai(n.store,f,$e(p)[0].value))}}}})},s;r.entities?s=r.entities:r.namePathList?(s=[],r.namePathList.forEach(function(l){var c=i.get(l);if(c){var u;(u=s).push.apply(u,$e($e(c).map(function(d){return d.entity})))}})):s=o,a(s)}),D(this,"resetFields",function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(Ga(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(kn);o.forEach(function(a){var s=n.getInitialValue(a);n.updateStore(ai(n.store,a,s))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(i,o,{type:"reset"}),n.notifyWatch(o)}),D(this,"setFields",function(r){n.warningUnhooked();var i=n.store,o=[];r.forEach(function(a){var s=a.name,l=ut(a,d3),c=kn(s);o.push(c),"value"in l&&n.updateStore(ai(n.store,c,l.value)),n.notifyObservers(i,[c],{type:"setField",data:a})}),n.notifyWatch(o)}),D(this,"getFields",function(){var r=n.getFieldEntities(!0),i=r.map(function(o){var a=o.getNamePath(),s=o.getMeta(),l=W(W({},s),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return i}),D(this,"initEntityValue",function(r){var i=r.props.initialValue;if(i!==void 0){var o=r.getNamePath(),a=si(n.store,o);a===void 0&&n.updateStore(ai(n.store,o,i))}}),D(this,"isMergedPreserve",function(r){var i=r!==void 0?r:n.preserve;return i??!0}),D(this,"registerField",function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==c&&n.fieldEntities.every(function(d){return!yw(d.getNamePath(),i)})){var u=n.store;n.updateStore(ai(u,i,c,!0)),n.notifyObservers(u,[i],{type:"remove"}),n.triggerDependenciesUpdate(u,i)}}n.notifyWatch([i])}}),D(this,"dispatch",function(r){switch(r.type){case"updateValue":{var i=r.namePath,o=r.value;n.updateValue(i,o);break}case"validateField":{var a=r.namePath,s=r.triggerName;n.validateFields([a],{triggerName:s});break}}}),D(this,"notifyObservers",function(r,i,o){if(n.subscribable){var a=W(W({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(r,i,a)})}else n.forceRootUpdate()}),D(this,"triggerDependenciesUpdate",function(r,i){var o=n.getDependencyChildrenFields(i);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[i].concat($e(o))}),o}),D(this,"updateValue",function(r,i){var o=kn(r),a=n.store;n.updateStore(ai(n.store,o,i)),n.notifyObservers(a,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var s=n.triggerDependenciesUpdate(a,o),l=n.callbacks.onValuesChange;if(l){var c=ly(n.store,[o]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat($e(s)))}),D(this,"setFieldsValue",function(r){n.warningUnhooked();var i=n.store;if(r){var o=Ga(n.store,r);n.updateStore(o)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),D(this,"setFieldValue",function(r,i){n.setFields([{name:r,value:i,errors:[],warnings:[]}])}),D(this,"getDependencyChildrenFields",function(r){var i=new Set,o=[],a=new Qa;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=kn(u);a.update(d,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(l),f})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(d){if(!i.has(d)){i.add(d);var f=d.getNamePath();d.isFieldDirty()&&f.length&&(o.push(f),l(f))}})};return s(r),o}),D(this,"triggerOnFieldsChange",function(r,i){var o=n.callbacks.onFieldsChange;if(o){var a=n.getFields();if(i){var s=new Qa;i.forEach(function(c){var u=c.name,d=c.errors;s.set(u,d)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return is(r,u)});l.length&&o(l,a)}}),D(this,"validateFields",function(r,i){n.warningUnhooked();var o,a;Array.isArray(r)||typeof r=="string"||typeof i=="string"?(o=r,a=i):a=r;var s=!!o,l=s?o.map(kn):[],c=[],u=String(Date.now()),d=new Set,f=a||{},h=f.recursive,p=f.dirty;n.getFieldEntities(!0).forEach(function(O){if(s||l.push(O.getNamePath()),!(!O.props.rules||!O.props.rules.length)&&!(p&&!O.isFieldDirty())){var S=O.getNamePath();if(d.add(S.join(u)),!s||is(l,S,h)){var x=O.validateRules(W({validateMessages:W(W({},bw),n.validateMessages)},a));c.push(x.then(function(){return{name:S,errors:[],warnings:[]}}).catch(function(b){var C,$=[],w=[];return(C=b.forEach)===null||C===void 0||C.call(b,function(P){var _=P.rule.warningOnly,T=P.errors;_?w.push.apply(w,$e(T)):$.push.apply($,$e(T))}),$.length?Promise.reject({name:S,errors:$,warnings:w}):{name:S,errors:$,warnings:w}}))}}});var m=u3(c);n.lastValidatePromise=m,m.catch(function(O){return O}).then(function(O){var S=O.map(function(x){var b=x.name;return b});n.notifyObservers(n.store,S,{type:"validateFinish"}),n.triggerOnFieldsChange(S,O)});var g=m.then(function(){return n.lastValidatePromise===m?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(O){var S=O.filter(function(x){return x&&x.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:S,outOfDate:n.lastValidatePromise!==m})});g.catch(function(O){return O});var v=l.filter(function(O){return d.has(O.join(u))});return n.triggerOnFieldsChange(v),g}),D(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(o){console.error(o)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})}),this.forceRootUpdate=e});function n0(t){var e=U(),n=J({}),r=ae(n,2),i=r[1];if(!e.current)if(t)e.current=t;else{var o=function(){i({})},a=new f3(o);e.current=a.getForm()}return[e.current]}var Nm=bt({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Cw=function(e){var n=e.validateMessages,r=e.onFormChange,i=e.onFormFinish,o=e.children,a=fe(Nm),s=U({});return y(Nm.Provider,{value:W(W({},a),{},{validateMessages:W(W({},a.validateMessages),n),triggerFormChange:function(c,u){r&&r(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){i&&i(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=W(W({},s.current),{},D({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=W({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},o)},h3=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],p3=function(e,n){var r=e.name,i=e.initialValues,o=e.fields,a=e.form,s=e.preserve,l=e.children,c=e.component,u=c===void 0?"form":c,d=e.validateMessages,f=e.validateTrigger,h=f===void 0?"onChange":f,p=e.onValuesChange,m=e.onFieldsChange,g=e.onFinish,v=e.onFinishFailed,O=e.clearOnDestroy,S=ut(e,h3),x=U(null),b=fe(Nm),C=n0(a),$=ae(C,1),w=$[0],P=w.getInternalHooks(aa),_=P.useSubscribe,T=P.setInitialValues,R=P.setCallbacks,k=P.setValidateMessages,I=P.setPreserve,Q=P.destroyForm;Yt(n,function(){return W(W({},w),{},{nativeElement:x.current})}),be(function(){return b.registerForm(r,w),function(){b.unregisterForm(r)}},[b,w,r]),k(W(W({},b.validateMessages),d)),R({onValuesChange:p,onFieldsChange:function(X){if(b.triggerFormChange(r,X),m){for(var B=arguments.length,G=new Array(B>1?B-1:0),se=1;se{}}),ww=bt(null),Pw=t=>{const e=cn(t,["prefixCls"]);return y(Cw,Object.assign({},e))},r0=bt({prefixCls:""}),Jr=bt({}),_w=({children:t,status:e,override:n})=>{const r=fe(Jr),i=ge(()=>{const o=Object.assign({},r);return n&&delete o.isFormItemInput,e&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[e,n,r]);return y(Jr.Provider,{value:i},t)},Tw=bt(void 0),bs=t=>{const{space:e,form:n,children:r}=t;if(r==null)return null;let i=r;return n&&(i=oe.createElement(_w,{override:!0,status:!0},i)),e&&(i=oe.createElement(_A,null,i)),i};function dy(...t){const e={};return t.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(e[r]=n[r])})}),e}function $d(t){if(!t)return;const{closable:e,closeIcon:n}=t;return{closable:e,closeIcon:n}}function fy(t){const{closable:e,closeIcon:n}=t||{};return oe.useMemo(()=>{if(!e&&(e===!1||n===!1||n===null))return!1;if(e===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return e&&typeof e=="object"&&(r=Object.assign(Object.assign({},r),e)),r},[e,n])}const g3={};function kw(t,e,n=g3){const r=fy(t),i=fy(e),[o]=Ki("global",Zi.global),a=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,s=oe.useMemo(()=>Object.assign({closeIcon:oe.createElement(Vi,null)},n),[n]),l=oe.useMemo(()=>r===!1?!1:r?dy(s,i,r):i===!1?!1:i?dy(s,i):s.closable?s:!1,[r,i,s]);return oe.useMemo(()=>{var c,u;if(l===!1)return[!1,null,a,{}];const{closeIconRender:d}=s,{closeIcon:f}=l;let h=f;const p=$i(l,!0);return h!=null&&(d&&(h=d(f)),h=oe.isValidElement(h)?oe.cloneElement(h,Object.assign(Object.assign(Object.assign({},h.props),{"aria-label":(u=(c=h.props)===null||c===void 0?void 0:c["aria-label"])!==null&&u!==void 0?u:o.close}),p)):oe.createElement("span",Object.assign({"aria-label":o.close},p),h)),[!0,h,a,p]},[l,s])}var v3=function(e){if(dr()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],r=window.document.documentElement;return n.some(function(i){return i in r.style})}return!1};function hy(t,e){return v3(t)}const O3=()=>dr()&&window.document.documentElement,Lf=t=>{const{prefixCls:e,className:n,style:r,size:i,shape:o}=t,a=Z({[`${e}-lg`]:i==="large",[`${e}-sm`]:i==="small"}),s=Z({[`${e}-circle`]:o==="circle",[`${e}-square`]:o==="square",[`${e}-round`]:o==="round"}),l=ge(()=>typeof i=="number"?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return y("span",{className:Z(e,a,s,n),style:Object.assign(Object.assign({},l),r)})},b3=new _t("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),jf=t=>({height:t,lineHeight:q(t)}),os=t=>Object.assign({width:t},jf(t)),y3=t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:b3,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),Dh=(t,e)=>Object.assign({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},jf(t)),S3=t=>{const{skeletonAvatarCls:e,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o}=t;return{[e]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},os(r)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:Object.assign({},os(i)),[`${e}${e}-sm`]:Object.assign({},os(o))}},x3=t=>{const{controlHeight:e,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=t;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},Dh(e,s)),[`${r}-lg`]:Object.assign({},Dh(i,s)),[`${r}-sm`]:Object.assign({},Dh(o,s))}},py=t=>Object.assign({width:t},jf(t)),C3=t=>{const{skeletonImageCls:e,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:i,calc:o}=t;return{[e]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:i},py(o(n).mul(2).equal())),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:Object.assign(Object.assign({},py(n)),{maxWidth:o(n).mul(4).equal(),maxHeight:o(n).mul(4).equal()}),[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}}),[`${e}${e}-circle`]:{borderRadius:"50%"}}},Bh=(t,e,n)=>{const{skeletonButtonCls:r}=t;return{[`${n}${r}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:e}}},Wh=(t,e)=>Object.assign({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},jf(t)),$3=t=>{const{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:e,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal()},Wh(r,s))},Bh(t,r,n)),{[`${n}-lg`]:Object.assign({},Wh(i,s))}),Bh(t,i,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},Wh(o,s))}),Bh(t,o,`${n}-sm`))},w3=t=>{const{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:o,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:f,marginSM:h,borderRadius:p,titleHeight:m,blockRadius:g,paragraphLiHeight:v,controlHeightXS:O,paragraphMarginTop:S}=t;return{[e]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},os(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},os(c)),[`${n}-sm`]:Object.assign({},os(u))},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:m,background:d,borderRadius:g,[`+ ${i}`]:{marginBlockStart:u}},[i]:{padding:0,"> li":{width:"100%",height:v,listStyle:"none",background:d,borderRadius:g,"+ li":{marginBlockStart:O}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-content`]:{[`${r}, ${i} > li`]:{borderRadius:p}}},[`${e}-with-avatar ${e}-content`]:{[r]:{marginBlockStart:h,[`+ ${i}`]:{marginBlockStart:S}}},[`${e}${e}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},$3(t)),S3(t)),x3(t)),C3(t)),[`${e}${e}-block`]:{width:"100%",[o]:{width:"100%"},[a]:{width:"100%"}},[`${e}${e}-active`]:{[` +}`),i)}else Hl(i);return function(){Hl(i)}},[e,i])}var M4=!1;function E4(t){return M4}var ly=function(e){return e===!1?!1:!pr()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},s0=Se(function(t,e){var n=t.open,r=t.autoLock,i=t.getContainer;t.debug;var o=t.autoDestroy,a=o===void 0?!0:o,s=t.children,l=te(n),c=le(l,2),u=c[0],d=c[1],f=u||n;ye(function(){(a||n)&&d(n)},[n,a]);var h=te(function(){return ly(i)}),m=le(h,2),p=m[0],g=m[1];ye(function(){var R=ly(i);g(R??null)});var O=w4(f&&!p),v=le(O,2),y=v[0],S=v[1],x=p??y;I4(r&&n&&pr()&&(x===y||x===document.body));var $=null;if(s&&bo(s)&&e){var C=s;$=C.ref}var P=Oo($,e);if(!f||!pr()||p===void 0)return null;var w=x===!1||E4(),_=s;return e&&(_=Un(s,{ref:P})),b(Rw.Provider,{value:S},w?_:Of(_,x))}),Iw=Tt({});function k4(){var t=Z({},Sc);return t.useId}var cy=0,uy=k4();const l0=uy?function(e){var n=uy();return e||n}:function(e){var n=te("ssr-id"),r=le(n,2),i=r[0],o=r[1];return ye(function(){var a=cy;cy+=1,o("rc_unique_".concat(a))},[]),e||i};function dy(t,e,n){var r=e;return!r&&n&&(r="".concat(t,"-").concat(n)),r}function fy(t,e){var n=t["page".concat(e?"Y":"X","Offset")],r="scroll".concat(e?"Top":"Left");if(typeof n!="number"){var i=t.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function A4(t){var e=t.getBoundingClientRect(),n={left:e.left,top:e.top},r=t.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=fy(i),n.top+=fy(i,!0),n}const Q4=Ma(function(t){var e=t.children;return e},function(t,e){var n=e.shouldUpdate;return!n});var N4={width:0,height:0,overflow:"hidden",outline:"none"},z4={outline:"none"},Mw=K.forwardRef(function(t,e){var n=t.prefixCls,r=t.className,i=t.style,o=t.title,a=t.ariaId,s=t.footer,l=t.closable,c=t.closeIcon,u=t.onClose,d=t.children,f=t.bodyStyle,h=t.bodyProps,m=t.modalRender,p=t.onMouseDown,g=t.onMouseUp,O=t.holderRef,v=t.visible,y=t.forceRender,S=t.width,x=t.height,$=t.classNames,C=t.styles,P=K.useContext(Iw),w=P.panel,_=Oo(O,w),R=ne(),I=ne();K.useImperativeHandle(e,function(){return{focus:function(){var H;(H=R.current)===null||H===void 0||H.focus({preventScroll:!0})},changeActive:function(H){var X=document,q=X.activeElement;H&&q===I.current?R.current.focus({preventScroll:!0}):!H&&q===R.current&&I.current.focus({preventScroll:!0})}}});var T={};S!==void 0&&(T.width=S),x!==void 0&&(T.height=x);var M=s?K.createElement("div",{className:U("".concat(n,"-footer"),$==null?void 0:$.footer),style:Z({},C==null?void 0:C.footer)},s):null,Q=o?K.createElement("div",{className:U("".concat(n,"-header"),$==null?void 0:$.header),style:Z({},C==null?void 0:C.header)},K.createElement("div",{className:"".concat(n,"-title"),id:a},o)):null,E=ve(function(){return nt(l)==="object"&&l!==null?l:l?{closeIcon:c??K.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[l,c,n]),k=mi(E,!0),z=nt(l)==="object"&&l.disabled,L=l?K.createElement("button",xe({type:"button",onClick:u,"aria-label":"Close"},k,{className:"".concat(n,"-close"),disabled:z}),E.closeIcon):null,B=K.createElement("div",{className:U("".concat(n,"-content"),$==null?void 0:$.content),style:C==null?void 0:C.content},L,Q,K.createElement("div",xe({className:U("".concat(n,"-body"),$==null?void 0:$.body),style:Z(Z({},f),C==null?void 0:C.body)},h),d),M);return K.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":o?a:null,"aria-modal":"true",ref:_,style:Z(Z({},i),T),className:U(n,r),onMouseDown:p,onMouseUp:g},K.createElement("div",{ref:R,tabIndex:0,style:z4},K.createElement(Q4,{shouldUpdate:v||y},m?m(B):B)),K.createElement("div",{tabIndex:0,ref:I,style:N4}))}),Ew=Se(function(t,e){var n=t.prefixCls,r=t.title,i=t.style,o=t.className,a=t.visible,s=t.forceRender,l=t.destroyOnClose,c=t.motionName,u=t.ariaId,d=t.onVisibleChanged,f=t.mousePosition,h=ne(),m=te(),p=le(m,2),g=p[0],O=p[1],v={};g&&(v.transformOrigin=g);function y(){var S=A4(h.current);O(f&&(f.x||f.y)?"".concat(f.x-S.left,"px ").concat(f.y-S.top,"px"):"")}return b(vi,{visible:a,onVisibleChanged:d,onAppearPrepare:y,onEnterPrepare:y,forceRender:s,motionName:c,removeOnLeave:l,ref:h},function(S,x){var $=S.className,C=S.style;return b(Mw,xe({},t,{ref:e,title:r,ariaId:u,prefixCls:n,holderRef:x,style:Z(Z(Z({},C),i),v),className:U(o,$)}))})});Ew.displayName="Content";var j4=function(e){var n=e.prefixCls,r=e.style,i=e.visible,o=e.maskProps,a=e.motionName,s=e.className;return b(vi,{key:"mask",visible:i,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},function(l,c){var u=l.className,d=l.style;return b("div",xe({ref:c,style:Z(Z({},d),r),className:U("".concat(n,"-mask"),u,s)},o))})},L4=function(e){var n=e.prefixCls,r=n===void 0?"rc-dialog":n,i=e.zIndex,o=e.visible,a=o===void 0?!1:o,s=e.keyboard,l=s===void 0?!0:s,c=e.focusTriggerAfterClose,u=c===void 0?!0:c,d=e.wrapStyle,f=e.wrapClassName,h=e.wrapProps,m=e.onClose,p=e.afterOpenChange,g=e.afterClose,O=e.transitionName,v=e.animation,y=e.closable,S=y===void 0?!0:y,x=e.mask,$=x===void 0?!0:x,C=e.maskTransitionName,P=e.maskAnimation,w=e.maskClosable,_=w===void 0?!0:w,R=e.maskStyle,I=e.maskProps,T=e.rootClassName,M=e.classNames,Q=e.styles,E=ne(),k=ne(),z=ne(),L=te(a),B=le(L,2),F=B[0],H=B[1],X=l0();function q(){ap(k.current,document.activeElement)||(E.current=document.activeElement)}function N(){if(!ap(k.current,document.activeElement)){var D;(D=z.current)===null||D===void 0||D.focus()}}function j(D){if(D)N();else{if(H(!1),$&&E.current&&u){try{E.current.focus({preventScroll:!0})}catch{}E.current=null}F&&(g==null||g())}p==null||p(D)}function oe(D){m==null||m(D)}var ee=ne(!1),se=ne(),fe=function(){clearTimeout(se.current),ee.current=!0},re=function(){se.current=setTimeout(function(){ee.current=!1})},J=null;_&&(J=function(Y){ee.current?ee.current=!1:k.current===Y.target&&oe(Y)});function ue(D){if(l&&D.keyCode===ze.ESC){D.stopPropagation(),oe(D);return}a&&D.keyCode===ze.TAB&&z.current.changeActive(!D.shiftKey)}ye(function(){a&&(H(!0),q())},[a]),ye(function(){return function(){clearTimeout(se.current)}},[]);var de=Z(Z(Z({zIndex:i},d),Q==null?void 0:Q.wrapper),{},{display:F?null:"none"});return b("div",xe({className:U("".concat(r,"-root"),T)},mi(e,{data:!0})),b(j4,{prefixCls:r,visible:$&&a,motionName:dy(r,C,P),style:Z(Z({zIndex:i},R),Q==null?void 0:Q.mask),maskProps:I,className:M==null?void 0:M.mask}),b("div",xe({tabIndex:-1,onKeyDown:ue,className:U("".concat(r,"-wrap"),f,M==null?void 0:M.wrapper),ref:k,onClick:J,style:de},h),b(Ew,xe({},e,{onMouseDown:fe,onMouseUp:re,ref:z,closable:S,ariaId:X,prefixCls:r,visible:a&&F,onClose:oe,onVisibleChanged:j,motionName:dy(r,O,v)}))))},kw=function(e){var n=e.visible,r=e.getContainer,i=e.forceRender,o=e.destroyOnClose,a=o===void 0?!1:o,s=e.afterClose,l=e.panelRef,c=te(n),u=le(c,2),d=u[0],f=u[1],h=ve(function(){return{panel:l}},[l]);return ye(function(){n&&f(!0)},[n]),!i&&a&&!d?null:b(Iw.Provider,{value:h},b(s0,{open:n||i||d,autoDestroy:!1,getContainer:r,autoLock:n||d},b(L4,xe({},e,{destroyOnClose:a,afterClose:function(){s==null||s(),f(!1)}}))))};kw.displayName="Dialog";var la="RC_FORM_INTERNAL_HOOKS",rn=function(){or(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},xa=Tt({getFieldValue:rn,getFieldsValue:rn,getFieldError:rn,getFieldWarning:rn,getFieldsError:rn,isFieldsTouched:rn,isFieldTouched:rn,isFieldValidating:rn,isFieldsValidating:rn,resetFields:rn,setFields:rn,setFieldValue:rn,setFieldsValue:rn,validateFields:rn,submit:rn,getInternalHooks:function(){return rn(),{dispatch:rn,initEntityValue:rn,registerField:rn,useSubscribe:rn,setInitialValues:rn,destroyForm:rn,setCallbacks:rn,registerWatch:rn,getFields:rn,setValidateMessages:rn,setPreserve:rn,getInitialValue:rn}}}),Gl=Tt(null);function zp(t){return t==null?[]:Array.isArray(t)?t:[t]}function D4(t){return t&&!!t._init}function jp(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Lp=jp();function B4(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function W4(t,e,n){if(If())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&Bl(i,n.prototype),i}function Dp(t){var e=typeof Map=="function"?new Map:void 0;return Dp=function(r){if(r===null||!B4(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return W4(r,arguments,va(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Bl(i,r)},Dp(t)}var H4=/%[sdj%]/g,V4=function(){};function Bp(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function Yr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=o)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function F4(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function Fn(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||F4(e)&&typeof t=="string"&&!t)}function X4(t,e,n){var r=[],i=0,o=t.length;function a(s){r.push.apply(r,Ce(s||[])),i++,i===o&&n(r)}t.forEach(function(s){e(s,a)})}function hy(t,e,n){var r=0,i=t.length;function o(a){if(a&&a.length){n(a);return}var s=r;r=r+1,se.max?i.push(Yr(o.messages[d].max,e.fullField,e.max)):s&&l&&(ue.max)&&i.push(Yr(o.messages[d].range,e.fullField,e.min,e.max))},Aw=function(e,n,r,i,o,a){e.required&&(!r.hasOwnProperty(e.field)||Fn(n,a||e.type))&&i.push(Yr(o.messages.required,e.fullField))},uu;const eN=function(){if(uu)return uu;var t="[a-fA-F\\d:]",e=function($){return $&&$.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(i.join("|"),")").concat(o),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(a,"$")),u=function($){return $&&$.exact?s:new RegExp("(?:".concat(e($)).concat(n).concat(e($),")|(?:").concat(e($)).concat(a).concat(e($),")"),"g")};u.v4=function(x){return x&&x.exact?l:new RegExp("".concat(e(x)).concat(n).concat(e(x)),"g")},u.v6=function(x){return x&&x.exact?c:new RegExp("".concat(e(x)).concat(a).concat(e(x)),"g")};var d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",h=u.v4().source,m=u.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",O="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",v="(?::\\d{2,5})?",y='(?:[/?#][^\\s"]*)?',S="(?:".concat(d,"|www\\.)").concat(f,"(?:localhost|").concat(h,"|").concat(m,"|").concat(p).concat(g).concat(O,")").concat(v).concat(y);return uu=new RegExp("(?:^".concat(S,"$)"),"i"),uu};var vy={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ml={integer:function(e){return ml.number(e)&&parseInt(e,10)===e},float:function(e){return ml.number(e)&&!ml.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return nt(e)==="object"&&!ml.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(vy.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(eN())},hex:function(e){return typeof e=="string"&&!!e.match(vy.hex)}},tN=function(e,n,r,i,o){if(e.required&&n===void 0){Aw(e,n,r,i,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?ml[s](n)||i.push(Yr(o.messages.types[s],e.fullField,e.type)):s&&nt(n)!==e.type&&i.push(Yr(o.messages.types[s],e.fullField,e.type))},nN=function(e,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(Yr(o.messages.whitespace,e.fullField))};const zt={required:Aw,whitespace:nN,type:tN,range:J4,enum:Y4,pattern:K4};var rN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Fn(n)&&!e.required)return r();zt.required(e,n,i,a,o)}r(a)},iN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return r();zt.required(e,n,i,a,o,"array"),n!=null&&(zt.type(e,n,i,a,o),zt.range(e,n,i,a,o))}r(a)},oN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Fn(n)&&!e.required)return r();zt.required(e,n,i,a,o),n!==void 0&&zt.type(e,n,i,a,o)}r(a)},aN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Fn(n,"date")&&!e.required)return r();if(zt.required(e,n,i,a,o),!Fn(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),zt.type(e,l,i,a,o),l&&zt.range(e,l.getTime(),i,a,o)}}r(a)},sN="enum",lN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Fn(n)&&!e.required)return r();zt.required(e,n,i,a,o),n!==void 0&&zt[sN](e,n,i,a,o)}r(a)},cN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Fn(n)&&!e.required)return r();zt.required(e,n,i,a,o),n!==void 0&&(zt.type(e,n,i,a,o),zt.range(e,n,i,a,o))}r(a)},uN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Fn(n)&&!e.required)return r();zt.required(e,n,i,a,o),n!==void 0&&(zt.type(e,n,i,a,o),zt.range(e,n,i,a,o))}r(a)},dN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Fn(n)&&!e.required)return r();zt.required(e,n,i,a,o),n!==void 0&&zt.type(e,n,i,a,o)}r(a)},fN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),Fn(n)&&!e.required)return r();zt.required(e,n,i,a,o),n!==void 0&&(zt.type(e,n,i,a,o),zt.range(e,n,i,a,o))}r(a)},hN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Fn(n)&&!e.required)return r();zt.required(e,n,i,a,o),n!==void 0&&zt.type(e,n,i,a,o)}r(a)},mN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Fn(n,"string")&&!e.required)return r();zt.required(e,n,i,a,o),Fn(n,"string")||zt.pattern(e,n,i,a,o)}r(a)},pN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Fn(n)&&!e.required)return r();zt.required(e,n,i,a,o),Fn(n)||zt.type(e,n,i,a,o)}r(a)},gN=function(e,n,r,i,o){var a=[],s=Array.isArray(n)?"array":nt(n);zt.required(e,n,i,a,o,s),r(a)},vN=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Fn(n,"string")&&!e.required)return r();zt.required(e,n,i,a,o,"string"),Fn(n,"string")||(zt.type(e,n,i,a,o),zt.range(e,n,i,a,o),zt.pattern(e,n,i,a,o),e.whitespace===!0&&zt.whitespace(e,n,i,a,o))}r(a)},Zh=function(e,n,r,i,o){var a=e.type,s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(Fn(n,a)&&!e.required)return r();zt.required(e,n,i,s,o,a),Fn(n,a)||zt.type(e,n,i,s,o)}r(s)};const Pl={string:vN,method:dN,number:fN,boolean:oN,regexp:pN,integer:uN,float:cN,array:iN,object:hN,enum:lN,pattern:mN,date:aN,url:Zh,hex:Zh,email:Zh,required:gN,any:rN};var Ic=function(){function t(e){An(this,t),W(this,"rules",null),W(this,"_messages",Lp),this.define(e)}return Qn(t,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(nt(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(i){var o=n[i];r.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(n){return n&&(this._messages=gy(jp(),n)),this._messages}},{key:"validate",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,s=i,l=o;if(typeof s=="function"&&(l=s,s={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(m){var p=[],g={};function O(y){if(Array.isArray(y)){var S;p=(S=p).concat.apply(S,Ce(y))}else p.push(y)}for(var v=0;v0&&arguments[0]!==void 0?arguments[0]:[],P=Array.isArray(C)?C:[C];!s.suppressWarning&&P.length&&t.warning("async-validator:",P),P.length&&g.message!==void 0&&(P=[].concat(g.message));var w=P.map(py(g,a));if(s.first&&w.length)return h[g.field]=1,p(w);if(!O)p(w);else{if(g.required&&!m.value)return g.message!==void 0?w=[].concat(g.message).map(py(g,a)):s.error&&(w=[s.error(g,Yr(s.messages.required,g.field))]),p(w);var _={};g.defaultField&&Object.keys(m.value).map(function(T){_[T]=g.defaultField}),_=Z(Z({},_),m.rule.fields);var R={};Object.keys(_).forEach(function(T){var M=_[T],Q=Array.isArray(M)?M:[M];R[T]=Q.map(v.bind(null,T))});var I=new t(R);I.messages(s.messages),m.rule.options&&(m.rule.options.messages=s.messages,m.rule.options.error=s.error),I.validate(m.value,m.rule.options||s,function(T){var M=[];w&&w.length&&M.push.apply(M,Ce(w)),T&&T.length&&M.push.apply(M,Ce(T)),p(M.length?M:null)})}}var S;if(g.asyncValidator)S=g.asyncValidator(g,m.value,y,m.source,s);else if(g.validator){try{S=g.validator(g,m.value,y,m.source,s)}catch(C){var x,$;(x=($=console).error)===null||x===void 0||x.call($,C),s.suppressValidatorError||setTimeout(function(){throw C},0),y(C.message)}S===!0?y():S===!1?y(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||"".concat(g.fullField||g.field," fails")):S instanceof Array?y(S):S instanceof Error&&y(S.message)}S&&S.then&&S.then(function(){return y()},function(C){return y(C)})},function(m){c(m)},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!Pl.hasOwnProperty(n.type))throw new Error(Yr("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),i=r.indexOf("message");return i!==-1&&r.splice(i,1),r.length===1&&r[0]==="required"?Pl.required:Pl[this.getType(n)]||void 0}}]),t}();W(Ic,"register",function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Pl[e]=n});W(Ic,"warning",V4);W(Ic,"messages",Lp);W(Ic,"validators",Pl);var Vr="'${name}' is not a valid ${type}",Qw={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Vr,method:Vr,array:Vr,object:Vr,number:Vr,date:Vr,boolean:Vr,integer:Vr,float:Vr,regexp:Vr,email:Vr,url:Vr,hex:Vr},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Oy=Ic;function ON(t,e){return t.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return e[r]})}var by="CODE_LOGIC_ERROR";function Wp(t,e,n,r,i){return Hp.apply(this,arguments)}function Hp(){return Hp=ka(gr().mark(function t(e,n,r,i,o){var a,s,l,c,u,d,f,h,m;return gr().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return a=Z({},r),delete a.ruleIndex,Oy.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(O){return console.error(O),Promise.reject(by)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new Oy(W({},e,[a])),u=Ja(Qw,i.validateMessages),c.messages(u),d=[],g.prev=10,g.next=13,Promise.resolve(c.validate(W({},e,n),Z({},i)));case 13:g.next=18;break;case 15:g.prev=15,g.t0=g.catch(10),g.t0.errors&&(d=g.t0.errors.map(function(O,v){var y=O.message,S=y===by?u.default:y;return en(S)?Un(S,{key:"error_".concat(v)}):S}));case 18:if(!(!d.length&&l)){g.next=23;break}return g.next=21,Promise.all(n.map(function(O,v){return Wp("".concat(e,".").concat(v),O,l,i,o)}));case 21:return f=g.sent,g.abrupt("return",f.reduce(function(O,v){return[].concat(Ce(O),Ce(v))},[]));case 23:return h=Z(Z({},r),{},{name:e,enum:(r.enum||[]).join(", ")},o),m=d.map(function(O){return typeof O=="string"?ON(O,h):O}),g.abrupt("return",m);case 26:case"end":return g.stop()}},t,null,[[10,15]])})),Hp.apply(this,arguments)}function bN(t,e,n,r,i,o){var a=t.join("."),s=n.map(function(u,d){var f=u.validator,h=Z(Z({},u),{},{ruleIndex:d});return f&&(h.validator=function(m,p,g){var O=!1,v=function(){for(var x=arguments.length,$=new Array(x),C=0;C2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(r){return Nw(e,r,n)})}function Nw(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!e||!n&&t.length!==e.length?!1:e.every(function(r,i){return t[i]===r})}function xN(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||nt(t)!=="object"||nt(e)!=="object")return!1;var n=Object.keys(t),r=Object.keys(e),i=new Set([].concat(n,r));return Ce(i).every(function(o){var a=t[o],s=e[o];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function $N(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&nt(e.target)==="object"&&t in e.target?e.target[t]:e}function Sy(t,e,n){var r=t.length;if(e<0||e>=r||n<0||n>=r)return t;var i=t[e],o=e-n;return o>0?[].concat(Ce(t.slice(0,n)),[i],Ce(t.slice(n,e)),Ce(t.slice(e+1,r))):o<0?[].concat(Ce(t.slice(0,e)),Ce(t.slice(e+1,n+1)),[i],Ce(t.slice(n+1,r))):t}var CN=["name"],ri=[];function qh(t,e,n,r,i,o){return typeof t=="function"?t(e,n,"source"in o?{source:o.source}:{}):r!==i}var c0=function(t){Ji(n,t);var e=yo(n);function n(r){var i;if(An(this,n),i=e.call(this,r),W(kt(i),"state",{resetCount:0}),W(kt(i),"cancelRegisterFunc",null),W(kt(i),"mounted",!1),W(kt(i),"touched",!1),W(kt(i),"dirty",!1),W(kt(i),"validatePromise",void 0),W(kt(i),"prevValidating",void 0),W(kt(i),"errors",ri),W(kt(i),"warnings",ri),W(kt(i),"cancelRegister",function(){var l=i.props,c=l.preserve,u=l.isListField,d=l.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(u,c,Mn(d)),i.cancelRegisterFunc=null}),W(kt(i),"getNamePath",function(){var l=i.props,c=l.name,u=l.fieldContext,d=u.prefixName,f=d===void 0?[]:d;return c!==void 0?[].concat(Ce(f),Ce(c)):[]}),W(kt(i),"getRules",function(){var l=i.props,c=l.rules,u=c===void 0?[]:c,d=l.fieldContext;return u.map(function(f){return typeof f=="function"?f(d):f})}),W(kt(i),"refresh",function(){i.mounted&&i.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),W(kt(i),"metaCache",null),W(kt(i),"triggerMetaEvent",function(l){var c=i.props.onMetaChange;if(c){var u=Z(Z({},i.getMeta()),{},{destroy:l});Vl(i.metaCache,u)||c(u),i.metaCache=u}else i.metaCache=null}),W(kt(i),"onStoreChange",function(l,c,u){var d=i.props,f=d.shouldUpdate,h=d.dependencies,m=h===void 0?[]:h,p=d.onReset,g=u.store,O=i.getNamePath(),v=i.getValue(l),y=i.getValue(g),S=c&&ss(c,O);switch(u.type==="valueUpdate"&&u.source==="external"&&!Vl(v,y)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=ri,i.warnings=ri,i.triggerMetaEvent()),u.type){case"reset":if(!c||S){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=ri,i.warnings=ri,i.triggerMetaEvent(),p==null||p(),i.refresh();return}break;case"remove":{if(f&&qh(f,l,g,v,y,u)){i.reRender();return}break}case"setField":{var x=u.data;if(S){"touched"in x&&(i.touched=x.touched),"validating"in x&&!("originRCField"in x)&&(i.validatePromise=x.validating?Promise.resolve([]):null),"errors"in x&&(i.errors=x.errors||ri),"warnings"in x&&(i.warnings=x.warnings||ri),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in x&&ss(c,O,!0)){i.reRender();return}if(f&&!O.length&&qh(f,l,g,v,y,u)){i.reRender();return}break}case"dependenciesUpdate":{var $=m.map(Mn);if($.some(function(C){return ss(u.relatedFields,C)})){i.reRender();return}break}default:if(S||(!m.length||O.length||f)&&qh(f,l,g,v,y,u)){i.reRender();return}break}f===!0&&i.reRender()}),W(kt(i),"validateRules",function(l){var c=i.getNamePath(),u=i.getValue(),d=l||{},f=d.triggerName,h=d.validateOnly,m=h===void 0?!1:h,p=Promise.resolve().then(ka(gr().mark(function g(){var O,v,y,S,x,$,C;return gr().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(i.mounted){w.next=2;break}return w.abrupt("return",[]);case 2:if(O=i.props,v=O.validateFirst,y=v===void 0?!1:v,S=O.messageVariables,x=O.validateDebounce,$=i.getRules(),f&&($=$.filter(function(_){return _}).filter(function(_){var R=_.validateTrigger;if(!R)return!0;var I=zp(R);return I.includes(f)})),!(x&&f)){w.next=10;break}return w.next=8,new Promise(function(_){setTimeout(_,x)});case 8:if(i.validatePromise===p){w.next=10;break}return w.abrupt("return",[]);case 10:return C=bN(c,u,$,l,y,S),C.catch(function(_){return _}).then(function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ri;if(i.validatePromise===p){var R;i.validatePromise=null;var I=[],T=[];(R=_.forEach)===null||R===void 0||R.call(_,function(M){var Q=M.rule.warningOnly,E=M.errors,k=E===void 0?ri:E;Q?T.push.apply(T,Ce(k)):I.push.apply(I,Ce(k))}),i.errors=I,i.warnings=T,i.triggerMetaEvent(),i.reRender()}}),w.abrupt("return",C);case 13:case"end":return w.stop()}},g)})));return m||(i.validatePromise=p,i.dirty=!0,i.errors=ri,i.warnings=ri,i.triggerMetaEvent(),i.reRender()),p}),W(kt(i),"isFieldValidating",function(){return!!i.validatePromise}),W(kt(i),"isFieldTouched",function(){return i.touched}),W(kt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var l=i.props.fieldContext,c=l.getInternalHooks(la),u=c.getInitialValue;return u(i.getNamePath())!==void 0}),W(kt(i),"getErrors",function(){return i.errors}),W(kt(i),"getWarnings",function(){return i.warnings}),W(kt(i),"isListField",function(){return i.props.isListField}),W(kt(i),"isList",function(){return i.props.isList}),W(kt(i),"isPreserve",function(){return i.props.preserve}),W(kt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var l={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return l}),W(kt(i),"getOnlyChild",function(l){if(typeof l=="function"){var c=i.getMeta();return Z(Z({},i.getOnlyChild(l(i.getControlled(),c,i.props.fieldContext))),{},{isFunction:!0})}var u=sr(l);return u.length!==1||!en(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),W(kt(i),"getValue",function(l){var c=i.props.fieldContext.getFieldsValue,u=i.getNamePath();return si(l||c(!0),u)}),W(kt(i),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i.props,u=c.name,d=c.trigger,f=c.validateTrigger,h=c.getValueFromEvent,m=c.normalize,p=c.valuePropName,g=c.getValueProps,O=c.fieldContext,v=f!==void 0?f:O.validateTrigger,y=i.getNamePath(),S=O.getInternalHooks,x=O.getFieldsValue,$=S(la),C=$.dispatch,P=i.getValue(),w=g||function(M){return W({},p,M)},_=l[d],R=u!==void 0?w(P):{},I=Z(Z({},l),R);I[d]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var M,Q=arguments.length,E=new Array(Q),k=0;k=0&&_<=R.length?(u.keys=[].concat(Ce(u.keys.slice(0,_)),[u.id],Ce(u.keys.slice(_))),y([].concat(Ce(R.slice(0,_)),[w],Ce(R.slice(_))))):(u.keys=[].concat(Ce(u.keys),[u.id]),y([].concat(Ce(R),[w]))),u.id+=1},remove:function(w){var _=x(),R=new Set(Array.isArray(w)?w:[w]);R.size<=0||(u.keys=u.keys.filter(function(I,T){return!R.has(T)}),y(_.filter(function(I,T){return!R.has(T)})))},move:function(w,_){if(w!==_){var R=x();w<0||w>=R.length||_<0||_>=R.length||(u.keys=Sy(u.keys,w,_),y(Sy(R,w,_)))}}},C=v||[];return Array.isArray(C)||(C=[]),r(C.map(function(P,w){var _=u.keys[w];return _===void 0&&(u.keys[w]=u.id,_=u.keys[w],u.id+=1),{name:w,key:_,isListField:!0}}),$,g)})))}function wN(t){var e=!1,n=t.length,r=[];return t.length?new Promise(function(i,o){t.forEach(function(a,s){a.catch(function(l){return e=!0,l}).then(function(l){n-=1,r[s]=l,!(n>0)&&(e&&o(r),i(r))})})}):Promise.resolve([])}var jw="__@field_split__";function Gh(t){return t.map(function(e){return"".concat(nt(e),":").concat(e)}).join(jw)}var La=function(){function t(){An(this,t),W(this,"kvs",new Map)}return Qn(t,[{key:"set",value:function(n,r){this.kvs.set(Gh(n),r)}},{key:"get",value:function(n){return this.kvs.get(Gh(n))}},{key:"update",value:function(n,r){var i=this.get(n),o=r(i);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(Gh(n))}},{key:"map",value:function(n){return Ce(this.kvs.entries()).map(function(r){var i=le(r,2),o=i[0],a=i[1],s=o.split(jw);return n({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=le(c,3),d=u[1],f=u[2];return d==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,o=r.value;return n[i.join(".")]=o,null}),n}}]),t}(),PN=["name"],_N=Qn(function t(e){var n=this;An(this,t),W(this,"formHooked",!1),W(this,"forceRootUpdate",void 0),W(this,"subscribable",!0),W(this,"store",{}),W(this,"fieldEntities",[]),W(this,"initialValues",{}),W(this,"callbacks",{}),W(this,"validateMessages",null),W(this,"preserve",null),W(this,"lastValidatePromise",null),W(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),W(this,"getInternalHooks",function(r){return r===la?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(or(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),W(this,"useSubscribe",function(r){n.subscribable=r}),W(this,"prevWithoutPreserves",null),W(this,"setInitialValues",function(r,i){if(n.initialValues=r||{},i){var o,a=Ja(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(s){var l=s.key;a=ai(a,l,si(r,l))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),W(this,"destroyForm",function(r){if(r)n.updateStore({});else{var i=new La;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=i}}),W(this,"getInitialValue",function(r){var i=si(n.initialValues,r);return r.length?Ja(i):i}),W(this,"setCallbacks",function(r){n.callbacks=r}),W(this,"setValidateMessages",function(r){n.validateMessages=r}),W(this,"setPreserve",function(r){n.preserve=r}),W(this,"watchList",[]),W(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}}),W(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(a){a(i,o,r)})}}),W(this,"timeoutId",null),W(this,"warningUnhooked",function(){}),W(this,"updateStore",function(r){n.store=r}),W(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities}),W(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new La;return n.getFieldEntities(r).forEach(function(o){var a=o.getNamePath();i.set(a,o)}),i}),W(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(o){var a=Mn(o);return i.get(a)||{INVALIDATE_NAME_PATH:Mn(o)}})}),W(this,"getFieldsValue",function(r,i){n.warningUnhooked();var o,a,s;if(r===!0||Array.isArray(r)?(o=r,a=i):r&&nt(r)==="object"&&(s=r.strict,a=r.filter),o===!0&&!a)return n.store;var l=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),c=[];return l.forEach(function(u){var d,f,h="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var m,p;if((m=(p=u).isList)!==null&&m!==void 0&&m.call(p))return}else if(!o&&(d=(f=u).isListField)!==null&&d!==void 0&&d.call(f))return;if(!a)c.push(h);else{var g="getMeta"in u?u.getMeta():null;a(g)&&c.push(h)}}),yy(n.store,c.map(Mn))}),W(this,"getFieldValue",function(r){n.warningUnhooked();var i=Mn(r);return si(n.store,i)}),W(this,"getFieldsError",function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(o,a){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:Mn(r[a]),errors:[],warnings:[]}})}),W(this,"getFieldError",function(r){n.warningUnhooked();var i=Mn(r),o=n.getFieldsError([i])[0];return o.errors}),W(this,"getFieldWarning",function(r){n.warningUnhooked();var i=Mn(r),o=n.getFieldsError([i])[0];return o.warnings}),W(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},i=new La,o=n.getFieldEntities(!0);o.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=i.get(u)||new Set;d.add({entity:l,value:c}),i.set(u,d)}});var a=function(c){c.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var f=u.getNamePath(),h=n.getInitialValue(f);if(h!==void 0)or(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var m=i.get(f);if(m&&m.size>1)or(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(m){var p=n.getFieldValue(f),g=u.isListField();!g&&(!r.skipExist||p===void 0)&&n.updateStore(ai(n.store,f,Ce(m)[0].value))}}}})},s;r.entities?s=r.entities:r.namePathList?(s=[],r.namePathList.forEach(function(l){var c=i.get(l);if(c){var u;(u=s).push.apply(u,Ce(Ce(c).map(function(d){return d.entity})))}})):s=o,a(s)}),W(this,"resetFields",function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(Ja(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(Mn);o.forEach(function(a){var s=n.getInitialValue(a);n.updateStore(ai(n.store,a,s))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(i,o,{type:"reset"}),n.notifyWatch(o)}),W(this,"setFields",function(r){n.warningUnhooked();var i=n.store,o=[];r.forEach(function(a){var s=a.name,l=gt(a,PN),c=Mn(s);o.push(c),"value"in l&&n.updateStore(ai(n.store,c,l.value)),n.notifyObservers(i,[c],{type:"setField",data:a})}),n.notifyWatch(o)}),W(this,"getFields",function(){var r=n.getFieldEntities(!0),i=r.map(function(o){var a=o.getNamePath(),s=o.getMeta(),l=Z(Z({},s),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return i}),W(this,"initEntityValue",function(r){var i=r.props.initialValue;if(i!==void 0){var o=r.getNamePath(),a=si(n.store,o);a===void 0&&n.updateStore(ai(n.store,o,i))}}),W(this,"isMergedPreserve",function(r){var i=r!==void 0?r:n.preserve;return i??!0}),W(this,"registerField",function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==c&&n.fieldEntities.every(function(d){return!Nw(d.getNamePath(),i)})){var u=n.store;n.updateStore(ai(u,i,c,!0)),n.notifyObservers(u,[i],{type:"remove"}),n.triggerDependenciesUpdate(u,i)}}n.notifyWatch([i])}}),W(this,"dispatch",function(r){switch(r.type){case"updateValue":{var i=r.namePath,o=r.value;n.updateValue(i,o);break}case"validateField":{var a=r.namePath,s=r.triggerName;n.validateFields([a],{triggerName:s});break}}}),W(this,"notifyObservers",function(r,i,o){if(n.subscribable){var a=Z(Z({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(r,i,a)})}else n.forceRootUpdate()}),W(this,"triggerDependenciesUpdate",function(r,i){var o=n.getDependencyChildrenFields(i);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[i].concat(Ce(o))}),o}),W(this,"updateValue",function(r,i){var o=Mn(r),a=n.store;n.updateStore(ai(n.store,o,i)),n.notifyObservers(a,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var s=n.triggerDependenciesUpdate(a,o),l=n.callbacks.onValuesChange;if(l){var c=yy(n.store,[o]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(Ce(s)))}),W(this,"setFieldsValue",function(r){n.warningUnhooked();var i=n.store;if(r){var o=Ja(n.store,r);n.updateStore(o)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),W(this,"setFieldValue",function(r,i){n.setFields([{name:r,value:i,errors:[],warnings:[]}])}),W(this,"getDependencyChildrenFields",function(r){var i=new Set,o=[],a=new La;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=Mn(u);a.update(d,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(l),f})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(d){if(!i.has(d)){i.add(d);var f=d.getNamePath();d.isFieldDirty()&&f.length&&(o.push(f),l(f))}})};return s(r),o}),W(this,"triggerOnFieldsChange",function(r,i){var o=n.callbacks.onFieldsChange;if(o){var a=n.getFields();if(i){var s=new La;i.forEach(function(c){var u=c.name,d=c.errors;s.set(u,d)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return ss(r,u)});l.length&&o(l,a)}}),W(this,"validateFields",function(r,i){n.warningUnhooked();var o,a;Array.isArray(r)||typeof r=="string"||typeof i=="string"?(o=r,a=i):a=r;var s=!!o,l=s?o.map(Mn):[],c=[],u=String(Date.now()),d=new Set,f=a||{},h=f.recursive,m=f.dirty;n.getFieldEntities(!0).forEach(function(v){if(s||l.push(v.getNamePath()),!(!v.props.rules||!v.props.rules.length)&&!(m&&!v.isFieldDirty())){var y=v.getNamePath();if(d.add(y.join(u)),!s||ss(l,y,h)){var S=v.validateRules(Z({validateMessages:Z(Z({},Qw),n.validateMessages)},a));c.push(S.then(function(){return{name:y,errors:[],warnings:[]}}).catch(function(x){var $,C=[],P=[];return($=x.forEach)===null||$===void 0||$.call(x,function(w){var _=w.rule.warningOnly,R=w.errors;_?P.push.apply(P,Ce(R)):C.push.apply(C,Ce(R))}),C.length?Promise.reject({name:y,errors:C,warnings:P}):{name:y,errors:C,warnings:P}}))}}});var p=wN(c);n.lastValidatePromise=p,p.catch(function(v){return v}).then(function(v){var y=v.map(function(S){var x=S.name;return x});n.notifyObservers(n.store,y,{type:"validateFinish"}),n.triggerOnFieldsChange(y,v)});var g=p.then(function(){return n.lastValidatePromise===p?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(v){var y=v.filter(function(S){return S&&S.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:y,outOfDate:n.lastValidatePromise!==p})});g.catch(function(v){return v});var O=l.filter(function(v){return d.has(v.join(u))});return n.triggerOnFieldsChange(O),g}),W(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(o){console.error(o)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})}),this.forceRootUpdate=e});function d0(t){var e=ne(),n=te({}),r=le(n,2),i=r[1];if(!e.current)if(t)e.current=t;else{var o=function(){i({})},a=new _N(o);e.current=a.getForm()}return[e.current]}var Xp=Tt({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Lw=function(e){var n=e.validateMessages,r=e.onFormChange,i=e.onFormFinish,o=e.children,a=he(Xp),s=ne({});return b(Xp.Provider,{value:Z(Z({},a),{},{validateMessages:Z(Z({},a.validateMessages),n),triggerFormChange:function(c,u){r&&r(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){i&&i(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=Z(Z({},s.current),{},W({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=Z({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},o)},TN=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],RN=function(e,n){var r=e.name,i=e.initialValues,o=e.fields,a=e.form,s=e.preserve,l=e.children,c=e.component,u=c===void 0?"form":c,d=e.validateMessages,f=e.validateTrigger,h=f===void 0?"onChange":f,m=e.onValuesChange,p=e.onFieldsChange,g=e.onFinish,O=e.onFinishFailed,v=e.clearOnDestroy,y=gt(e,TN),S=ne(null),x=he(Xp),$=d0(a),C=le($,1),P=C[0],w=P.getInternalHooks(la),_=w.useSubscribe,R=w.setInitialValues,I=w.setCallbacks,T=w.setValidateMessages,M=w.setPreserve,Q=w.destroyForm;Jt(n,function(){return Z(Z({},P),{},{nativeElement:S.current})}),ye(function(){return x.registerForm(r,P),function(){x.unregisterForm(r)}},[x,P,r]),T(Z(Z({},x.validateMessages),d)),I({onValuesChange:m,onFieldsChange:function(q){if(x.triggerFormChange(r,q),p){for(var N=arguments.length,j=new Array(N>1?N-1:0),oe=1;oe{}}),Bw=Tt(null),Ww=t=>{const e=pn(t,["prefixCls"]);return b(Lw,Object.assign({},e))},f0=Tt({prefixCls:""}),ei=Tt({}),Hw=({children:t,status:e,override:n})=>{const r=he(ei),i=ve(()=>{const o=Object.assign({},r);return n&&delete o.isFormItemInput,e&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[e,n,r]);return b(ei.Provider,{value:i},t)},Vw=Tt(void 0),Cs=t=>{const{space:e,form:n,children:r}=t;if(r==null)return null;let i=r;return n&&(i=K.createElement(Hw,{override:!0,status:!0},i)),e&&(i=K.createElement(WA,null,i)),i};function Zp(...t){const e={};return t.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(e[r]=n[r])})}),e}function Md(t){if(!t)return;const{closable:e,closeIcon:n}=t;return{closable:e,closeIcon:n}}function $y(t){const{closable:e,closeIcon:n}=t||{};return K.useMemo(()=>{if(!e&&(e===!1||n===!1||n===null))return!1;if(e===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return e&&typeof e=="object"&&(r=Object.assign(Object.assign({},r),e)),r},[e,n])}const MN={};function Fw(t,e,n=MN){const r=$y(t),i=$y(e),[o]=Ii("global",Gi.global),a=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,s=K.useMemo(()=>Object.assign({closeIcon:K.createElement(Xi,null)},n),[n]),l=K.useMemo(()=>r===!1?!1:r?Zp(s,i,r):i===!1?!1:i?Zp(s,i):s.closable?s:!1,[r,i,s]);return K.useMemo(()=>{var c,u;if(l===!1)return[!1,null,a,{}];const{closeIconRender:d}=s,{closeIcon:f}=l;let h=f;const m=mi(l,!0);return h!=null&&(d&&(h=d(f)),h=K.isValidElement(h)?K.cloneElement(h,Object.assign(Object.assign(Object.assign({},h.props),{"aria-label":(u=(c=h.props)===null||c===void 0?void 0:c["aria-label"])!==null&&u!==void 0?u:o.close}),m)):K.createElement("span",Object.assign({"aria-label":o.close},m),h)),[!0,h,a,m]},[l,s])}var EN=function(e){if(pr()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],r=window.document.documentElement;return n.some(function(i){return i in r.style})}return!1};function Cy(t,e){return EN(t)}const kN=()=>pr()&&window.document.documentElement,Zf=t=>{const{prefixCls:e,className:n,style:r,size:i,shape:o}=t,a=U({[`${e}-lg`]:i==="large",[`${e}-sm`]:i==="small"}),s=U({[`${e}-circle`]:o==="circle",[`${e}-square`]:o==="square",[`${e}-round`]:o==="round"}),l=ve(()=>typeof i=="number"?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return b("span",{className:U(e,a,s,n),style:Object.assign(Object.assign({},l),r)})},AN=new At("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),qf=t=>({height:t,lineHeight:V(t)}),ls=t=>Object.assign({width:t},qf(t)),QN=t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:AN,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),Uh=(t,e)=>Object.assign({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},qf(t)),NN=t=>{const{skeletonAvatarCls:e,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o}=t;return{[e]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},ls(r)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:Object.assign({},ls(i)),[`${e}${e}-sm`]:Object.assign({},ls(o))}},zN=t=>{const{controlHeight:e,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=t;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},Uh(e,s)),[`${r}-lg`]:Object.assign({},Uh(i,s)),[`${r}-sm`]:Object.assign({},Uh(o,s))}},wy=t=>Object.assign({width:t},qf(t)),jN=t=>{const{skeletonImageCls:e,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:i,calc:o}=t;return{[e]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:i},wy(o(n).mul(2).equal())),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:Object.assign(Object.assign({},wy(n)),{maxWidth:o(n).mul(4).equal(),maxHeight:o(n).mul(4).equal()}),[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}}),[`${e}${e}-circle`]:{borderRadius:"50%"}}},Yh=(t,e,n)=>{const{skeletonButtonCls:r}=t;return{[`${n}${r}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:e}}},Kh=(t,e)=>Object.assign({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},qf(t)),LN=t=>{const{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:e,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal()},Kh(r,s))},Yh(t,r,n)),{[`${n}-lg`]:Object.assign({},Kh(i,s))}),Yh(t,i,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},Kh(o,s))}),Yh(t,o,`${n}-sm`))},DN=t=>{const{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:o,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:f,marginSM:h,borderRadius:m,titleHeight:p,blockRadius:g,paragraphLiHeight:O,controlHeightXS:v,paragraphMarginTop:y}=t;return{[e]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},ls(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},ls(c)),[`${n}-sm`]:Object.assign({},ls(u))},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:p,background:d,borderRadius:g,[`+ ${i}`]:{marginBlockStart:u}},[i]:{padding:0,"> li":{width:"100%",height:O,listStyle:"none",background:d,borderRadius:g,"+ li":{marginBlockStart:v}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-content`]:{[`${r}, ${i} > li`]:{borderRadius:m}}},[`${e}-with-avatar ${e}-content`]:{[r]:{marginBlockStart:h,[`+ ${i}`]:{marginBlockStart:y}}},[`${e}${e}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},LN(t)),NN(t)),zN(t)),jN(t)),[`${e}${e}-block`]:{width:"100%",[o]:{width:"100%"},[a]:{width:"100%"}},[`${e}${e}-active`]:{[` ${r}, ${i} > li, ${n}, ${o}, ${a}, ${s} - `]:Object.assign({},y3(t))}}},P3=t=>{const{colorFillContent:e,colorFill:n}=t,r=e,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:t.controlHeight/2,blockRadius:t.borderRadiusSM,paragraphMarginTop:t.marginLG+t.marginXXS,paragraphLiHeight:t.controlHeight/2}},Bs=Zt("Skeleton",t=>{const{componentCls:e,calc:n}=t,r=kt(t,{skeletonAvatarCls:`${e}-avatar`,skeletonTitleCls:`${e}-title`,skeletonParagraphCls:`${e}-paragraph`,skeletonButtonCls:`${e}-button`,skeletonInputCls:`${e}-input`,skeletonImageCls:`${e}-image`,imageSizeBase:n(t.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${t.gradientFromColor} 25%, ${t.gradientToColor} 37%, ${t.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return w3(r)},P3,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),_3=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,shape:o="circle",size:a="default"}=t,{getPrefixCls:s}=fe(it),l=s("skeleton",e),[c,u,d]=Bs(l),f=cn(t,["prefixCls","className"]),h=Z(l,`${l}-element`,{[`${l}-active`]:i},n,r,u,d);return c(y("div",{className:h},y(Lf,Object.assign({prefixCls:`${l}-avatar`,shape:o,size:a},f))))},T3=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,block:o=!1,size:a="default"}=t,{getPrefixCls:s}=fe(it),l=s("skeleton",e),[c,u,d]=Bs(l),f=cn(t,["prefixCls"]),h=Z(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,u,d);return c(y("div",{className:h},y(Lf,Object.assign({prefixCls:`${l}-button`,size:a},f))))},k3="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",R3=t=>{const{prefixCls:e,className:n,rootClassName:r,style:i,active:o}=t,{getPrefixCls:a}=fe(it),s=a("skeleton",e),[l,c,u]=Bs(s),d=Z(s,`${s}-element`,{[`${s}-active`]:o},n,r,c,u);return l(y("div",{className:d},y("div",{className:Z(`${s}-image`,n),style:i},y("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},y("title",null,"Image placeholder"),y("path",{d:k3,className:`${s}-image-path`})))))},I3=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,block:o,size:a="default"}=t,{getPrefixCls:s}=fe(it),l=s("skeleton",e),[c,u,d]=Bs(l),f=cn(t,["prefixCls"]),h=Z(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,u,d);return c(y("div",{className:h},y(Lf,Object.assign({prefixCls:`${l}-input`,size:a},f))))},M3=t=>{const{prefixCls:e,className:n,rootClassName:r,style:i,active:o,children:a}=t,{getPrefixCls:s}=fe(it),l=s("skeleton",e),[c,u,d]=Bs(l),f=Z(l,`${l}-element`,{[`${l}-active`]:o},u,n,r,d);return c(y("div",{className:f},y("div",{className:Z(`${l}-image`,n),style:i},a)))},E3=(t,e)=>{const{width:n,rows:r=2}=e;if(Array.isArray(n))return n[t];if(r-1===t)return n},A3=t=>{const{prefixCls:e,className:n,style:r,rows:i=0}=t,o=Array.from({length:i}).map((a,s)=>y("li",{key:s,style:{width:E3(s,t)}}));return y("ul",{className:Z(e,n),style:r},o)},Q3=({prefixCls:t,className:e,width:n,style:r})=>y("h3",{className:Z(t,e),style:Object.assign({width:n},r)});function Fh(t){return t&&typeof t=="object"?t:{}}function N3(t,e){return t&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function z3(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}function L3(t,e){const n={};return(!t||!e)&&(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}const Ra=t=>{const{prefixCls:e,loading:n,className:r,rootClassName:i,style:o,children:a,avatar:s=!1,title:l=!0,paragraph:c=!0,active:u,round:d}=t,{getPrefixCls:f,direction:h,className:p,style:m}=rr("skeleton"),g=f("skeleton",e),[v,O,S]=Bs(g);if(n||!("loading"in t)){const x=!!s,b=!!l,C=!!c;let $;if(x){const _=Object.assign(Object.assign({prefixCls:`${g}-avatar`},N3(b,C)),Fh(s));$=y("div",{className:`${g}-header`},y(Lf,Object.assign({},_)))}let w;if(b||C){let _;if(b){const R=Object.assign(Object.assign({prefixCls:`${g}-title`},z3(x,C)),Fh(l));_=y(Q3,Object.assign({},R))}let T;if(C){const R=Object.assign(Object.assign({prefixCls:`${g}-paragraph`},L3(x,b)),Fh(c));T=y(A3,Object.assign({},R))}w=y("div",{className:`${g}-content`},_,T)}const P=Z(g,{[`${g}-with-avatar`]:x,[`${g}-active`]:u,[`${g}-rtl`]:h==="rtl",[`${g}-round`]:d},p,r,i,O,S);return v(y("div",{className:P,style:Object.assign(Object.assign({},m),o)},$,w))}return a??null};Ra.Button=T3;Ra.Avatar=_3;Ra.Input=I3;Ra.Image=R3;Ra.Node=M3;function my(){}const j3=bt({add:my,remove:my});function D3(t){const e=fe(j3),n=U(null);return pn(i=>{if(i){const o=t?i.querySelector(t):i;e.add(o),n.current=o}else e.remove(n.current)})}const gy=()=>{const{cancelButtonProps:t,cancelTextLocale:e,onCancel:n}=fe($c);return oe.createElement(vt,Object.assign({onClick:n},t),e)},vy=()=>{const{confirmLoading:t,okButtonProps:e,okType:n,okTextLocale:r,onOk:i}=fe($c);return oe.createElement(vt,Object.assign({},Bv(n),{loading:t,onClick:i},e),r)};function Rw(t,e){return oe.createElement("span",{className:`${t}-close-x`},e||oe.createElement(Vi,{className:`${t}-close-icon`}))}const Iw=t=>{const{okText:e,okType:n="primary",cancelText:r,confirmLoading:i,onOk:o,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:c}=t,[u]=Ki("Modal",m$()),d=e||(u==null?void 0:u.okText),f=r||(u==null?void 0:u.cancelText),h={confirmLoading:i,okButtonProps:s,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:o,onCancel:a},p=oe.useMemo(()=>h,$e(Object.values(h)));let m;return typeof c=="function"||typeof c>"u"?(m=oe.createElement(oe.Fragment,null,oe.createElement(gy,null),oe.createElement(vy,null)),typeof c=="function"&&(m=c(m,{OkBtn:vy,CancelBtn:gy})),m=oe.createElement(fw,{value:p},m)):m=c,oe.createElement(Av,{disabled:!1},m)},B3=t=>{const{componentCls:e}=t;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},W3=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},F3=(t,e)=>{const{prefixCls:n,componentCls:r,gridColumns:i}=t,o={};for(let a=i;a>=0;a--)a===0?(o[`${r}${e}-${a}`]={display:"none"},o[`${r}-push-${a}`]={insetInlineStart:"auto"},o[`${r}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${e}-push-${a}`]={insetInlineStart:"auto"},o[`${r}${e}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${e}-offset-${a}`]={marginInlineStart:0},o[`${r}${e}-order-${a}`]={order:0}):(o[`${r}${e}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/i*100}%`,maxWidth:`${a/i*100}%`}],o[`${r}${e}-push-${a}`]={insetInlineStart:`${a/i*100}%`},o[`${r}${e}-pull-${a}`]={insetInlineEnd:`${a/i*100}%`},o[`${r}${e}-offset-${a}`]={marginInlineStart:`${a/i*100}%`},o[`${r}${e}-order-${a}`]={order:a});return o[`${r}${e}-flex`]={flex:`var(--${n}${e}-flex)`},o},zm=(t,e)=>F3(t,e),V3=(t,e,n)=>({[`@media (min-width: ${q(e)})`]:Object.assign({},zm(t,n))}),H3=()=>({}),X3=()=>({}),Z3=Zt("Grid",B3,H3),Mw=t=>({xs:t.screenXSMin,sm:t.screenSMMin,md:t.screenMDMin,lg:t.screenLGMin,xl:t.screenXLMin,xxl:t.screenXXLMin}),q3=Zt("Grid",t=>{const e=kt(t,{gridColumns:24}),n=Mw(e);return delete n.xs,[W3(e),zm(e,""),zm(e,"-xs"),Object.keys(n).map(r=>V3(e,n[r],`-${r}`)).reduce((r,i)=>Object.assign(Object.assign({},r),i),{})]},X3);function Oy(t){return{position:t,inset:0}}const G3=t=>{const{componentCls:e,antCls:n}=t;return[{[`${e}-root`]:{[`${e}${n}-zoom-enter, ${e}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${n}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:Object.assign(Object.assign({},Oy("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,pointerEvents:"none",[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:Object.assign(Object.assign({},Oy("fixed")),{zIndex:t.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:nQ(t)}]},Y3=t=>{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl"},[`${e}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[e]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${t.screenSMMax}px)`]:{[e]:{maxWidth:"calc(100vw - 16px)",margin:`${q(t.marginXS)} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:Object.assign(Object.assign({},wn(t)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${q(t.calc(t.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:t.paddingLG,[`${e}-title`]:{margin:0,color:t.titleColor,fontWeight:t.fontWeightStrong,fontSize:t.titleFontSize,lineHeight:t.titleLineHeight,wordWrap:"break-word"},[`${e}-content`]:{position:"relative",backgroundColor:t.contentBg,backgroundClip:"padding-box",border:0,borderRadius:t.borderRadiusLG,boxShadow:t.boxShadow,pointerEvents:"auto",padding:t.contentPadding},[`${e}-close`]:Object.assign({position:"absolute",top:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),insetInlineEnd:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),zIndex:t.calc(t.zIndexPopupBase).add(10).equal(),padding:0,color:t.modalCloseIconColor,fontWeight:t.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:t.borderRadiusSM,width:t.modalCloseBtnSize,height:t.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,"&-x":{display:"flex",fontSize:t.fontSizeLG,fontStyle:"normal",lineHeight:q(t.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:t.modalCloseIconHoverColor,backgroundColor:t.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:t.colorBgTextActive}},Ci(t)),[`${e}-header`]:{color:t.colorText,background:t.headerBg,borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`,marginBottom:t.headerMarginBottom,padding:t.headerPadding,borderBottom:t.headerBorderBottom},[`${e}-body`]:{fontSize:t.fontSize,lineHeight:t.lineHeight,wordWrap:"break-word",padding:t.bodyPadding,[`${e}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${q(t.margin)} auto`}},[`${e}-footer`]:{textAlign:"end",background:t.footerBg,marginTop:t.footerMarginTop,padding:t.footerPadding,borderTop:t.footerBorderTop,borderRadius:t.footerBorderRadius,[`> ${t.antCls}-btn + ${t.antCls}-btn`]:{marginInlineStart:t.marginXS}},[`${e}-open`]:{overflow:"hidden"}})},{[`${e}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${e}-content, + `]:Object.assign({},QN(t))}}},BN=t=>{const{colorFillContent:e,colorFill:n}=t,r=e,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:t.controlHeight/2,blockRadius:t.borderRadiusSM,paragraphMarginTop:t.marginLG+t.marginXXS,paragraphLiHeight:t.controlHeight/2}},Hs=Ft("Skeleton",t=>{const{componentCls:e,calc:n}=t,r=It(t,{skeletonAvatarCls:`${e}-avatar`,skeletonTitleCls:`${e}-title`,skeletonParagraphCls:`${e}-paragraph`,skeletonButtonCls:`${e}-button`,skeletonInputCls:`${e}-input`,skeletonImageCls:`${e}-image`,imageSizeBase:n(t.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${t.gradientFromColor} 25%, ${t.gradientToColor} 37%, ${t.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return DN(r)},BN,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),WN=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,shape:o="circle",size:a="default"}=t,{getPrefixCls:s}=he(lt),l=s("skeleton",e),[c,u,d]=Hs(l),f=pn(t,["prefixCls","className"]),h=U(l,`${l}-element`,{[`${l}-active`]:i},n,r,u,d);return c(b("div",{className:h},b(Zf,Object.assign({prefixCls:`${l}-avatar`,shape:o,size:a},f))))},HN=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,block:o=!1,size:a="default"}=t,{getPrefixCls:s}=he(lt),l=s("skeleton",e),[c,u,d]=Hs(l),f=pn(t,["prefixCls"]),h=U(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,u,d);return c(b("div",{className:h},b(Zf,Object.assign({prefixCls:`${l}-button`,size:a},f))))},VN="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",FN=t=>{const{prefixCls:e,className:n,rootClassName:r,style:i,active:o}=t,{getPrefixCls:a}=he(lt),s=a("skeleton",e),[l,c,u]=Hs(s),d=U(s,`${s}-element`,{[`${s}-active`]:o},n,r,c,u);return l(b("div",{className:d},b("div",{className:U(`${s}-image`,n),style:i},b("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},b("title",null,"Image placeholder"),b("path",{d:VN,className:`${s}-image-path`})))))},XN=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,block:o,size:a="default"}=t,{getPrefixCls:s}=he(lt),l=s("skeleton",e),[c,u,d]=Hs(l),f=pn(t,["prefixCls"]),h=U(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,u,d);return c(b("div",{className:h},b(Zf,Object.assign({prefixCls:`${l}-input`,size:a},f))))},ZN=t=>{const{prefixCls:e,className:n,rootClassName:r,style:i,active:o,children:a}=t,{getPrefixCls:s}=he(lt),l=s("skeleton",e),[c,u,d]=Hs(l),f=U(l,`${l}-element`,{[`${l}-active`]:o},u,n,r,d);return c(b("div",{className:f},b("div",{className:U(`${l}-image`,n),style:i},a)))},qN=(t,e)=>{const{width:n,rows:r=2}=e;if(Array.isArray(n))return n[t];if(r-1===t)return n},GN=t=>{const{prefixCls:e,className:n,style:r,rows:i=0}=t,o=Array.from({length:i}).map((a,s)=>b("li",{key:s,style:{width:qN(s,t)}}));return b("ul",{className:U(e,n),style:r},o)},UN=({prefixCls:t,className:e,width:n,style:r})=>b("h3",{className:U(t,e),style:Object.assign({width:n},r)});function Jh(t){return t&&typeof t=="object"?t:{}}function YN(t,e){return t&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function KN(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}function JN(t,e){const n={};return(!t||!e)&&(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}const Aa=t=>{const{prefixCls:e,loading:n,className:r,rootClassName:i,style:o,children:a,avatar:s=!1,title:l=!0,paragraph:c=!0,active:u,round:d}=t,{getPrefixCls:f,direction:h,className:m,style:p}=Zn("skeleton"),g=f("skeleton",e),[O,v,y]=Hs(g);if(n||!("loading"in t)){const S=!!s,x=!!l,$=!!c;let C;if(S){const _=Object.assign(Object.assign({prefixCls:`${g}-avatar`},YN(x,$)),Jh(s));C=b("div",{className:`${g}-header`},b(Zf,Object.assign({},_)))}let P;if(x||$){let _;if(x){const I=Object.assign(Object.assign({prefixCls:`${g}-title`},KN(S,$)),Jh(l));_=b(UN,Object.assign({},I))}let R;if($){const I=Object.assign(Object.assign({prefixCls:`${g}-paragraph`},JN(S,x)),Jh(c));R=b(GN,Object.assign({},I))}P=b("div",{className:`${g}-content`},_,R)}const w=U(g,{[`${g}-with-avatar`]:S,[`${g}-active`]:u,[`${g}-rtl`]:h==="rtl",[`${g}-round`]:d},m,r,i,v,y);return O(b("div",{className:w,style:Object.assign(Object.assign({},p),o)},C,P))}return a??null};Aa.Button=HN;Aa.Avatar=WN;Aa.Input=XN;Aa.Image=FN;Aa.Node=ZN;function Py(){}const ez=Tt({add:Py,remove:Py});function tz(t){const e=he(ez),n=ne(null);return bn(i=>{if(i){const o=t?i.querySelector(t):i;e.add(o),n.current=o}else e.remove(n.current)})}const _y=()=>{const{cancelButtonProps:t,cancelTextLocale:e,onCancel:n}=he(Rc);return K.createElement(wt,Object.assign({onClick:n},t),e)},Ty=()=>{const{confirmLoading:t,okButtonProps:e,okType:n,okTextLocale:r,onOk:i}=he(Rc);return K.createElement(wt,Object.assign({},Uv(n),{loading:t,onClick:i},e),r)};function Xw(t,e){return K.createElement("span",{className:`${t}-close-x`},e||K.createElement(Xi,{className:`${t}-close-icon`}))}const Zw=t=>{const{okText:e,okType:n="primary",cancelText:r,confirmLoading:i,onOk:o,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:c}=t,[u]=Ii("Modal",MC()),d=e||(u==null?void 0:u.okText),f=r||(u==null?void 0:u.cancelText),h={confirmLoading:i,okButtonProps:s,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:o,onCancel:a},m=K.useMemo(()=>h,Ce(Object.values(h)));let p;return typeof c=="function"||typeof c>"u"?(p=K.createElement(K.Fragment,null,K.createElement(_y,null),K.createElement(Ty,null)),typeof c=="function"&&(p=c(p,{OkBtn:Ty,CancelBtn:_y})),p=K.createElement(Tw,{value:m},p)):p=c,K.createElement(Hv,{disabled:!1},p)},nz=t=>{const{componentCls:e}=t;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},rz=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},iz=(t,e)=>{const{prefixCls:n,componentCls:r,gridColumns:i}=t,o={};for(let a=i;a>=0;a--)a===0?(o[`${r}${e}-${a}`]={display:"none"},o[`${r}-push-${a}`]={insetInlineStart:"auto"},o[`${r}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${e}-push-${a}`]={insetInlineStart:"auto"},o[`${r}${e}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${e}-offset-${a}`]={marginInlineStart:0},o[`${r}${e}-order-${a}`]={order:0}):(o[`${r}${e}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/i*100}%`,maxWidth:`${a/i*100}%`}],o[`${r}${e}-push-${a}`]={insetInlineStart:`${a/i*100}%`},o[`${r}${e}-pull-${a}`]={insetInlineEnd:`${a/i*100}%`},o[`${r}${e}-offset-${a}`]={marginInlineStart:`${a/i*100}%`},o[`${r}${e}-order-${a}`]={order:a});return o[`${r}${e}-flex`]={flex:`var(--${n}${e}-flex)`},o},qp=(t,e)=>iz(t,e),oz=(t,e,n)=>({[`@media (min-width: ${V(e)})`]:Object.assign({},qp(t,n))}),az=()=>({}),sz=()=>({}),lz=Ft("Grid",nz,az),qw=t=>({xs:t.screenXSMin,sm:t.screenSMMin,md:t.screenMDMin,lg:t.screenLGMin,xl:t.screenXLMin,xxl:t.screenXXLMin}),cz=Ft("Grid",t=>{const e=It(t,{gridColumns:24}),n=qw(e);return delete n.xs,[rz(e),qp(e,""),qp(e,"-xs"),Object.keys(n).map(r=>oz(e,n[r],`-${r}`)).reduce((r,i)=>Object.assign(Object.assign({},r),i),{})]},sz);function Ry(t){return{position:t,inset:0}}const uz=t=>{const{componentCls:e,antCls:n}=t;return[{[`${e}-root`]:{[`${e}${n}-zoom-enter, ${e}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${n}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:Object.assign(Object.assign({},Ry("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,pointerEvents:"none",[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:Object.assign(Object.assign({},Ry("fixed")),{zIndex:t.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:vQ(t)}]},dz=t=>{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl"},[`${e}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[e]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${t.screenSMMax}px)`]:{[e]:{maxWidth:"calc(100vw - 16px)",margin:`${V(t.marginXS)} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:Object.assign(Object.assign({},Sn(t)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${V(t.calc(t.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:t.paddingLG,[`${e}-title`]:{margin:0,color:t.titleColor,fontWeight:t.fontWeightStrong,fontSize:t.titleFontSize,lineHeight:t.titleLineHeight,wordWrap:"break-word"},[`${e}-content`]:{position:"relative",backgroundColor:t.contentBg,backgroundClip:"padding-box",border:0,borderRadius:t.borderRadiusLG,boxShadow:t.boxShadow,pointerEvents:"auto",padding:t.contentPadding},[`${e}-close`]:Object.assign({position:"absolute",top:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),insetInlineEnd:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),zIndex:t.calc(t.zIndexPopupBase).add(10).equal(),padding:0,color:t.modalCloseIconColor,fontWeight:t.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:t.borderRadiusSM,width:t.modalCloseBtnSize,height:t.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,"&-x":{display:"flex",fontSize:t.fontSizeLG,fontStyle:"normal",lineHeight:V(t.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:t.modalCloseIconHoverColor,backgroundColor:t.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:t.colorBgTextActive}},hi(t)),[`${e}-header`]:{color:t.colorText,background:t.headerBg,borderRadius:`${V(t.borderRadiusLG)} ${V(t.borderRadiusLG)} 0 0`,marginBottom:t.headerMarginBottom,padding:t.headerPadding,borderBottom:t.headerBorderBottom},[`${e}-body`]:{fontSize:t.fontSize,lineHeight:t.lineHeight,wordWrap:"break-word",padding:t.bodyPadding,[`${e}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${V(t.margin)} auto`}},[`${e}-footer`]:{textAlign:"end",background:t.footerBg,marginTop:t.footerMarginTop,padding:t.footerPadding,borderTop:t.footerBorderTop,borderRadius:t.footerBorderRadius,[`> ${t.antCls}-btn + ${t.antCls}-btn`]:{marginInlineStart:t.marginXS}},[`${e}-open`]:{overflow:"hidden"}})},{[`${e}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${e}-content, ${e}-body, - ${e}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${e}-confirm-body`]:{marginBottom:"auto"}}}]},U3=t=>{const{componentCls:e}=t;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},K3=t=>{const{componentCls:e}=t,n=Mw(t),r=Object.assign({},n);delete r.xs;const i=`--${e.replace(".","")}-`,o=Object.keys(r).map(a=>({[`@media (min-width: ${q(r[a])})`]:{width:`var(${i}${a}-width)`}}));return{[`${e}-root`]:{[e]:[].concat($e(Object.keys(n).map((a,s)=>{const l=Object.keys(n)[s-1];return l?{[`${i}${a}-width`]:`var(${i}${l}-width)`}:null})),[{width:`var(${i}xs-width)`}],$e(o))}}},Ew=t=>{const e=t.padding,n=t.fontSizeHeading5,r=t.lineHeightHeading5;return kt(t,{modalHeaderHeight:t.calc(t.calc(r).mul(n).equal()).add(t.calc(e).mul(2).equal()).equal(),modalFooterBorderColorSplit:t.colorSplit,modalFooterBorderStyle:t.lineType,modalFooterBorderWidth:t.lineWidth,modalCloseIconColor:t.colorIcon,modalCloseIconHoverColor:t.colorIconHover,modalCloseBtnSize:t.controlHeight,modalConfirmIconSize:t.fontHeight,modalTitleHeight:t.calc(t.titleFontSize).mul(t.titleLineHeight).equal()})},Aw=t=>({footerBg:"transparent",headerBg:t.colorBgElevated,titleLineHeight:t.lineHeightHeading5,titleFontSize:t.fontSizeHeading5,contentBg:t.colorBgElevated,titleColor:t.colorTextHeading,contentPadding:t.wireframe?0:`${q(t.paddingMD)} ${q(t.paddingContentHorizontalLG)}`,headerPadding:t.wireframe?`${q(t.padding)} ${q(t.paddingLG)}`:0,headerBorderBottom:t.wireframe?`${q(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",headerMarginBottom:t.wireframe?0:t.marginXS,bodyPadding:t.wireframe?t.paddingLG:0,footerPadding:t.wireframe?`${q(t.paddingXS)} ${q(t.padding)}`:0,footerBorderTop:t.wireframe?`${q(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",footerBorderRadius:t.wireframe?`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`:0,footerMarginTop:t.wireframe?0:t.marginSM,confirmBodyPadding:t.wireframe?`${q(t.padding*2)} ${q(t.padding*2)} ${q(t.paddingLG)}`:0,confirmIconMarginInlineEnd:t.wireframe?t.margin:t.marginSM,confirmBtnsMarginTop:t.wireframe?t.marginLG:t.marginSM}),Qw=Zt("Modal",t=>{const e=Ew(t);return[Y3(e),U3(e),G3(e),Cc(e,"zoom"),K3(e)]},Aw,{unitless:{titleLineHeight:!0}});var J3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{Lm={x:t.pageX,y:t.pageY},setTimeout(()=>{Lm=null},100)};O3()&&document.documentElement.addEventListener("click",eN,!0);const Nw=t=>{const{prefixCls:e,className:n,rootClassName:r,open:i,wrapClassName:o,centered:a,getContainer:s,focusTriggerAfterClose:l=!0,style:c,visible:u,width:d=520,footer:f,classNames:h,styles:p,children:m,loading:g,confirmLoading:v,zIndex:O,mousePosition:S,onOk:x,onCancel:b,destroyOnHidden:C,destroyOnClose:$,panelRef:w=null}=t,P=J3(t,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose","panelRef"]),{getPopupContainer:_,getPrefixCls:T,direction:R,modal:k}=fe(it),I=j=>{v||b==null||b(j)},Q=j=>{x==null||x(j)},M=T("modal",e),E=T(),N=$r(M),[z,L,F]=Qw(M,N),H=Z(o,{[`${M}-centered`]:a??(k==null?void 0:k.centered),[`${M}-wrap-rtl`]:R==="rtl"}),V=f!==null&&!g?y(Iw,Object.assign({},t,{onOk:Q,onCancel:I})):null,[X,B,G,se]=kw($d(t),$d(k),{closable:!0,closeIcon:y(Vi,{className:`${M}-close-icon`}),closeIconRender:j=>Rw(M,j)}),re=D3(`.${M}-content`),le=pr(w,re),[me,ie]=Sc("Modal",O),[ne,ue]=ge(()=>d&&typeof d=="object"?[void 0,d]:[d,void 0],[d]),de=ge(()=>{const j={};return ue&&Object.keys(ue).forEach(ee=>{const he=ue[ee];he!==void 0&&(j[`--${M}-${ee}-width`]=typeof he=="number"?`${he}px`:he)}),j},[ue]);return z(y(bs,{form:!0,space:!0},y(_f.Provider,{value:ie},y(vw,Object.assign({width:ne},P,{zIndex:me,getContainer:s===void 0?_:s,prefixCls:M,rootClassName:Z(L,r,F,N),footer:V,visible:i??u,mousePosition:S??Lm,onClose:I,closable:X&&Object.assign({disabled:G,closeIcon:B},se),closeIcon:B,focusTriggerAfterClose:l,transitionName:zo(E,"zoom",t.transitionName),maskTransitionName:zo(E,"fade",t.maskTransitionName),className:Z(L,n,k==null?void 0:k.className),style:Object.assign(Object.assign(Object.assign({},k==null?void 0:k.style),c),de),classNames:Object.assign(Object.assign(Object.assign({},k==null?void 0:k.classNames),h),{wrapper:Z(H,h==null?void 0:h.wrapper)}),styles:Object.assign(Object.assign({},k==null?void 0:k.styles),p),panelRef:le,destroyOnClose:C??$}),g?y(Ra,{active:!0,title:!1,paragraph:{rows:4},className:`${M}-body-skeleton`}):m))))},tN=t=>{const{componentCls:e,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:o,lineHeight:a,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:c}=t,u=`${e}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${t.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},No()),[`&${e} ${e}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t.iconCls}`]:{flex:"none",fontSize:i,marginInlineEnd:t.confirmIconMarginInlineEnd,marginTop:t.calc(t.calc(l).sub(i).equal()).div(2).equal()},[`&-has-title > ${t.iconCls}`]:{marginTop:t.calc(t.calc(s).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:t.marginXS,maxWidth:`calc(100% - ${q(t.marginSM)})`},[`${t.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${q(t.calc(t.modalConfirmIconSize).add(t.marginSM).equal())})`},[`${u}-title`]:{color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-content`]:{color:t.colorText,fontSize:o,lineHeight:a},[`${u}-btns`]:{textAlign:"end",marginTop:t.confirmBtnsMarginTop,[`${t.antCls}-btn + ${t.antCls}-btn`]:{marginBottom:0,marginInlineStart:t.marginXS}}},[`${u}-error ${u}-body > ${t.iconCls}`]:{color:t.colorError},[`${u}-warning ${u}-body > ${t.iconCls}, - ${u}-confirm ${u}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${u}-info ${u}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${u}-success ${u}-body > ${t.iconCls}`]:{color:t.colorSuccess}}},nN=Qs(["Modal","confirm"],t=>{const e=Ew(t);return tN(e)},Aw,{order:-1e3});var rN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);iO,$e(Object.values(O))),x=y(At,null,y(Xb,null),y(Zb,null)),b=t.title!==void 0&&t.title!==null,C=`${o}-body`;return y("div",{className:`${o}-body-wrapper`},y("div",{className:Z(C,{[`${C}-has-title`]:b})},d,y("div",{className:`${o}-paragraph`},b&&y("span",{className:`${o}-title`},t.title),y("div",{className:`${o}-content`},t.content))),l===void 0||typeof l=="function"?y(fw,{value:S},y("div",{className:`${o}-btns`},typeof l=="function"?l(x,{OkBtn:Zb,CancelBtn:Xb}):x)):l,y(nN,{prefixCls:e}))}const iN=t=>{const{close:e,zIndex:n,maskStyle:r,direction:i,prefixCls:o,wrapClassName:a,rootPrefixCls:s,bodyStyle:l,closable:c=!1,onConfirm:u,styles:d}=t,f=`${o}-confirm`,h=t.width||416,p=t.style||{},m=t.mask===void 0?!0:t.mask,g=t.maskClosable===void 0?!1:t.maskClosable,v=Z(f,`${f}-${t.type}`,{[`${f}-rtl`]:i==="rtl"},t.className),[,O]=Cr(),S=ge(()=>n!==void 0?n:O.zIndexPopupBase+J$,[n,O]);return y(Nw,Object.assign({},t,{className:v,wrapClassName:Z({[`${f}-centered`]:!!t.centered},a),onCancel:()=>{e==null||e({triggerCancel:!0}),u==null||u(!1)},title:"",footer:null,transitionName:zo(s||"","zoom",t.transitionName),maskTransitionName:zo(s||"","fade",t.maskTransitionName),mask:m,maskClosable:g,style:p,styles:Object.assign({body:l,mask:r},d),width:h,zIndex:S,closable:c}),y(zw,Object.assign({},t,{confirmPrefixCls:f})))},Lw=t=>{const{rootPrefixCls:e,iconPrefixCls:n,direction:r,theme:i}=t;return y(Gr,{prefixCls:e,iconPrefixCls:n,direction:r,theme:i},y(iN,Object.assign({},t)))},sa=[];let jw="";function Dw(){return jw}const oN=t=>{var e,n;const{prefixCls:r,getContainer:i,direction:o}=t,a=m$(),s=fe(it),l=Dw()||s.getPrefixCls(),c=r||`${l}-modal`;let u=i;return u===!1&&(u=void 0),oe.createElement(Lw,Object.assign({},t,{rootPrefixCls:l,prefixCls:c,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:o??s.direction,locale:(n=(e=s.locale)===null||e===void 0?void 0:e.Modal)!==null&&n!==void 0?n:a,getContainer:u}))};function Pc(t){const e=V$(),n=document.createDocumentFragment();let r=Object.assign(Object.assign({},t),{close:l,open:!0}),i,o;function a(...u){var d;if(u.some(p=>p==null?void 0:p.triggerCancel)){var h;(d=t.onCancel)===null||d===void 0||(h=d).call.apply(h,[t,()=>{}].concat($e(u.slice(1))))}for(let p=0;p{const d=e.getPrefixCls(void 0,Dw()),f=e.getIconPrefixCls(),h=e.getTheme(),p=oe.createElement(oN,Object.assign({},u));o=jv()(oe.createElement(Gr,{prefixCls:d,iconPrefixCls:f,theme:h},e.holderRender?e.holderRender(p):p),n)})}function l(...u){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof t.afterClose=="function"&&t.afterClose(),a.apply(this,u)}}),r.visible&&delete r.visible,s(r)}function c(u){typeof u=="function"?r=u(r):r=Object.assign(Object.assign({},r),u),s(r)}return s(r),sa.push(l),{destroy:l,update:c}}function Bw(t){return Object.assign(Object.assign({},t),{type:"warning"})}function Ww(t){return Object.assign(Object.assign({},t),{type:"info"})}function Fw(t){return Object.assign(Object.assign({},t),{type:"success"})}function Vw(t){return Object.assign(Object.assign({},t),{type:"error"})}function Hw(t){return Object.assign(Object.assign({},t),{type:"confirm"})}function aN({rootPrefixCls:t}){jw=t}var sN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,{afterClose:r,config:i}=t,o=sN(t,["afterClose","config"]);const[a,s]=J(!0),[l,c]=J(i),{direction:u,getPrefixCls:d}=fe(it),f=d("modal"),h=d(),p=()=>{var O;r(),(O=l.afterClose)===null||O===void 0||O.call(l)},m=(...O)=>{var S;if(s(!1),O.some(C=>C==null?void 0:C.triggerCancel)){var b;(S=l.onCancel)===null||S===void 0||(b=S).call.apply(b,[l,()=>{}].concat($e(O.slice(1))))}};Yt(e,()=>({destroy:m,update:O=>{c(S=>{const x=typeof O=="function"?O(S):O;return Object.assign(Object.assign({},S),x)})}}));const g=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[v]=Ki("Modal",Zi.Modal);return y(Lw,Object.assign({prefixCls:f,rootPrefixCls:h},l,{close:m,open:a,afterClose:p,okText:l.okText||(g?v==null?void 0:v.okText:v==null?void 0:v.justOkText),direction:l.direction||u,cancelText:l.cancelText||(v==null?void 0:v.cancelText)},o))},cN=Se(lN);let by=0;const uN=Ta(Se((t,e)=>{const[n,r]=nA();return Yt(e,()=>({patchElement:r}),[]),y(At,null,n)}));function dN(){const t=U(null),[e,n]=J([]);be(()=>{e.length&&($e(e).forEach(a=>{a()}),n([]))},[e]);const r=Ht(o=>function(s){var l;by+=1;const c=av();let u;const d=new Promise(g=>{u=g});let f=!1,h;const p=y(cN,{key:`modal-${by}`,config:o(s),ref:c,afterClose:()=>{h==null||h()},isSilent:()=>f,onConfirm:g=>{u(g)}});return h=(l=t.current)===null||l===void 0?void 0:l.patchElement(p),h&&sa.push(h),{destroy:()=>{function g(){var v;(v=c.current)===null||v===void 0||v.destroy()}c.current?g():n(v=>[].concat($e(v),[g]))},update:g=>{function v(){var O;(O=c.current)===null||O===void 0||O.update(g)}c.current?v():n(O=>[].concat($e(O),[v]))},then:g=>(f=!0,d.then(g))}},[]);return[ge(()=>({info:r(Ww),success:r(Fw),error:r(Vw),warning:r(Bw),confirm:r(Hw)}),[]),y(uN,{key:"modal-holder",ref:t})]}const fN=t=>{const{componentCls:e,notificationMarginEdge:n,animationMaxHeight:r}=t,i=`${e}-notice`,o=new _t("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),a=new _t("antNotificationTopFadeIn",{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),s=new _t("antNotificationBottomFadeIn",{"0%":{bottom:t.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),l=new _t("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return{[e]:{[`&${e}-top, &${e}-bottom`]:{marginInline:0,[i]:{marginInline:"auto auto"}},[`&${e}-top`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:a}},[`&${e}-bottom`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:s}},[`&${e}-topRight, &${e}-bottomRight`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:o}},[`&${e}-topLeft, &${e}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[i]:{marginInlineEnd:"auto",marginInlineStart:0},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:l}}}}},hN=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],pN={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},mN=(t,e)=>{const{componentCls:n}=t;return{[`${n}-${e}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[e.startsWith("top")?"top":"bottom"]:0,[pN[e]]:{value:0,_skip_check_:!0}}}}},gN=t=>{const e={};for(let n=1;n ${t.componentCls}-notice`]:{opacity:0,transition:`opacity ${t.motionDurationMid}`}};return Object.assign({[`&:not(:nth-last-child(-n+${t.notificationStackLayer}))`]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"}},e)},vN=t=>{const e={};for(let n=1;n{const{componentCls:e}=t;return Object.assign({[`${e}-stack`]:{[`& > ${e}-notice-wrapper`]:Object.assign({transition:`transform ${t.motionDurationSlow}, backdrop-filter 0s`,willChange:"transform, opacity",position:"absolute"},gN(t))},[`${e}-stack:not(${e}-stack-expanded)`]:{[`& > ${e}-notice-wrapper`]:Object.assign({},vN(t))},[`${e}-stack${e}-stack-expanded`]:{[`& > ${e}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",[`& > ${t.componentCls}-notice`]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:t.margin,width:"100%",insetInline:0,bottom:t.calc(t.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}}},hN.map(n=>mN(t,n)).reduce((n,r)=>Object.assign(Object.assign({},n),r),{}))},Xw=t=>{const{iconCls:e,componentCls:n,boxShadow:r,fontSizeLG:i,notificationMarginBottom:o,borderRadiusLG:a,colorSuccess:s,colorInfo:l,colorWarning:c,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:h,notificationMarginEdge:p,notificationProgressBg:m,notificationProgressHeight:g,fontSize:v,lineHeight:O,width:S,notificationIconSize:x,colorText:b}=t,C=`${n}-notice`;return{position:"relative",marginBottom:o,marginInlineStart:"auto",background:f,borderRadius:a,boxShadow:r,[C]:{padding:h,width:S,maxWidth:`calc(100vw - ${q(t.calc(p).mul(2).equal())})`,overflow:"hidden",lineHeight:O,wordWrap:"break-word"},[`${C}-message`]:{color:d,fontSize:i,lineHeight:t.lineHeightLG},[`${C}-description`]:{fontSize:v,color:b,marginTop:t.marginXS},[`${C}-closable ${C}-message`]:{paddingInlineEnd:t.paddingLG},[`${C}-with-icon ${C}-message`]:{marginInlineStart:t.calc(t.marginSM).add(x).equal(),fontSize:i},[`${C}-with-icon ${C}-description`]:{marginInlineStart:t.calc(t.marginSM).add(x).equal(),fontSize:v},[`${C}-icon`]:{position:"absolute",fontSize:x,lineHeight:1,[`&-success${e}`]:{color:s},[`&-info${e}`]:{color:l},[`&-warning${e}`]:{color:c},[`&-error${e}`]:{color:u}},[`${C}-close`]:Object.assign({position:"absolute",top:t.notificationPaddingVertical,insetInlineEnd:t.notificationPaddingHorizontal,color:t.colorIcon,outline:"none",width:t.notificationCloseButtonSize,height:t.notificationCloseButtonSize,borderRadius:t.borderRadiusSM,transition:`background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none","&:hover":{color:t.colorIconHover,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}},Ci(t)),[`${C}-progress`]:{position:"absolute",display:"block",appearance:"none",inlineSize:`calc(100% - ${q(a)} * 2)`,left:{_skip_check_:!0,value:a},right:{_skip_check_:!0,value:a},bottom:0,blockSize:g,border:0,"&, &::-webkit-progress-bar":{borderRadius:a,backgroundColor:"rgba(0, 0, 0, 0.04)"},"&::-moz-progress-bar":{background:m},"&::-webkit-progress-value":{borderRadius:a,background:m}},[`${C}-actions`]:{float:"right",marginTop:t.marginSM}}},bN=t=>{const{componentCls:e,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:i,motionEaseInOut:o}=t,a=`${e}-notice`,s=new _t("antNotificationFadeOut",{"0%":{maxHeight:t.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[e]:Object.assign(Object.assign({},wn(t)),{position:"fixed",zIndex:t.zIndexPopup,marginRight:{value:r,_skip_check_:!0},[`${e}-hook-holder`]:{position:"relative"},[`${e}-fade-appear-prepare`]:{opacity:"0 !important"},[`${e}-fade-enter, ${e}-fade-appear`]:{animationDuration:t.motionDurationMid,animationTimingFunction:o,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${e}-fade-leave`]:{animationTimingFunction:o,animationFillMode:"both",animationDuration:i,animationPlayState:"paused"},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationPlayState:"running"},[`${e}-fade-leave${e}-fade-leave-active`]:{animationName:s,animationPlayState:"running"},"&-rtl":{direction:"rtl",[`${a}-actions`]:{float:"left"}}})},{[e]:{[`${a}-wrapper`]:Object.assign({},Xw(t))}}]},Zw=t=>({zIndexPopup:t.zIndexPopupBase+J$+50,width:384}),qw=t=>{const e=t.paddingMD,n=t.paddingLG;return kt(t,{notificationBg:t.colorBgElevated,notificationPaddingVertical:e,notificationPaddingHorizontal:n,notificationIconSize:t.calc(t.fontSizeLG).mul(t.lineHeightLG).equal(),notificationCloseButtonSize:t.calc(t.controlHeightLG).mul(.55).equal(),notificationMarginBottom:t.margin,notificationPadding:`${q(t.paddingMD)} ${q(t.paddingContentHorizontalLG)}`,notificationMarginEdge:t.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2,notificationProgressBg:`linear-gradient(90deg, ${t.colorPrimaryBorderHover}, ${t.colorPrimary})`})},Gw=Zt("Notification",t=>{const e=qw(t);return[bN(e),fN(e),ON(e)]},Zw),yN=Qs(["Notification","PurePanel"],t=>{const e=`${t.componentCls}-notice`,n=qw(t);return{[`${e}-pure-panel`]:Object.assign(Object.assign({},Xw(n)),{width:n.width,maxWidth:`calc(100vw - ${q(t.calc(n.notificationMarginEdge).mul(2).equal())})`,margin:0})}},Zw);var SN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,icon:n,type:r,message:i,description:o,actions:a,role:s="alert"}=t;let l=null;return n?l=y("span",{className:`${e}-icon`},n):r&&(l=y(xN[r]||null,{className:Z(`${e}-icon`,`${e}-icon-${r}`)})),y("div",{className:Z({[`${e}-with-icon`]:l}),role:s},l,y("div",{className:`${e}-message`},i),o&&y("div",{className:`${e}-description`},o),a&&y("div",{className:`${e}-actions`},a))},CN=t=>{const{prefixCls:e,className:n,icon:r,type:i,message:o,description:a,btn:s,actions:l,closable:c=!0,closeIcon:u,className:d}=t,f=SN(t,["prefixCls","className","icon","type","message","description","btn","actions","closable","closeIcon","className"]),{getPrefixCls:h}=fe(it),p=l??s,m=e||h("notification"),g=`${m}-notice`,v=$r(m),[O,S,x]=Gw(m,v);return O(y("div",{className:Z(`${g}-pure-panel`,S,n,x,v)},y(yN,{prefixCls:m}),y(U$,Object.assign({},f,{prefixCls:m,eventKey:"pure",duration:null,closable:c,className:Z({notificationClassName:d}),closeIcon:i0(m,u),content:y(Yw,{prefixCls:g,icon:r,type:i,message:o,description:a,actions:p})}))))};function $N(t,e,n){let r;switch(t){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:e,bottom:"auto"};break;case"topLeft":r={left:0,top:e,bottom:"auto"};break;case"topRight":r={right:0,top:e,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n};break}return r}function wN(t){return{motionName:`${t}-fade`}}function PN(t,e,n){return typeof t<"u"?t:typeof(e==null?void 0:e.closeIcon)<"u"?e.closeIcon:n==null?void 0:n.closeIcon}var _N=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=$r(e),[r,i,o]=Gw(e,n);return r(oe.createElement(W5,{classNames:{list:Z(i,o,n)}},t))},IN=(t,{prefixCls:e,key:n})=>oe.createElement(RN,{prefixCls:e,key:n},t),MN=oe.forwardRef((t,e)=>{const{top:n,bottom:r,prefixCls:i,getContainer:o,maxCount:a,rtl:s,onAllRemoved:l,stack:c,duration:u,pauseOnHover:d=!0,showProgress:f}=t,{getPrefixCls:h,getPopupContainer:p,notification:m,direction:g}=fe(it),[,v]=Cr(),O=i||h("notification"),S=w=>$N(w,n??yy,r??yy),x=()=>Z({[`${O}-rtl`]:s??g==="rtl"}),b=()=>wN(O),[C,$]=Y5({prefixCls:O,style:S,className:x,motion:b,closable:!0,closeIcon:i0(O),duration:u??TN,getContainer:()=>(o==null?void 0:o())||(p==null?void 0:p())||document.body,maxCount:a,pauseOnHover:d,showProgress:f,onAllRemoved:l,renderNotifications:IN,stack:c===!1?!1:{threshold:typeof c=="object"?c==null?void 0:c.threshold:void 0,offset:8,gap:v.margin}});return oe.useImperativeHandle(e,()=>Object.assign(Object.assign({},C),{prefixCls:O,notification:m})),$});function Uw(t){const e=oe.useRef(null);return bc(),[oe.useMemo(()=>{const r=s=>{var l;if(!e.current)return;const{open:c,prefixCls:u,notification:d}=e.current,f=`${u}-notice`,{message:h,description:p,icon:m,type:g,btn:v,actions:O,className:S,style:x,role:b="alert",closeIcon:C,closable:$}=s,w=_N(s,["message","description","icon","type","btn","actions","className","style","role","closeIcon","closable"]),P=O??v,_=i0(f,PN(C,t,d));return c(Object.assign(Object.assign({placement:(l=t==null?void 0:t.placement)!==null&&l!==void 0?l:kN},w),{content:oe.createElement(Yw,{prefixCls:f,icon:m,type:g,message:h,description:p,actions:P,role:b}),className:Z(g&&`${f}-${g}`,S,d==null?void 0:d.className),style:Object.assign(Object.assign({},d==null?void 0:d.style),x),closeIcon:_,closable:$??!!_}))},o={open:r,destroy:s=>{var l,c;s!==void 0?(l=e.current)===null||l===void 0||l.close(s):(c=e.current)===null||c===void 0||c.destroy()}};return["success","info","warning","error"].forEach(s=>{o[s]=l=>r(Object.assign(Object.assign({},l),{type:s}))}),o},[]),oe.createElement(MN,Object.assign({key:"notification-holder"},t,{ref:e}))]}function EN(t){return Uw(t)}const AN=oe.createContext({});function Kw(t){return e=>y(Gr,{theme:{token:{motion:!1,zIndexPopupBase:0}}},y(t,Object.assign({},e)))}const Jw=(t,e,n,r,i)=>Kw(a=>{const{prefixCls:s,style:l}=a,c=U(null),[u,d]=J(0),[f,h]=J(0),[p,m]=_n(!1,{value:a.open}),{getPrefixCls:g}=fe(it),v=g(r||"select",s);be(()=>{if(m(!0),typeof ResizeObserver<"u"){const x=new ResizeObserver(C=>{const $=C[0].target;d($.offsetHeight+8),h($.offsetWidth)}),b=setInterval(()=>{var C;const $=i?`.${i(v)}`:`.${v}-dropdown`,w=(C=c.current)===null||C===void 0?void 0:C.querySelector($);w&&(clearInterval(b),x.observe(w))},10);return()=>{clearInterval(b),x.disconnect()}}},[]);let O=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:p,visible:p,getPopupContainer:()=>c.current});return e&&Object.assign(O,{[e]:{overflow:{adjustX:!1,adjustY:!1}}}),y("div",{ref:c,style:{paddingBottom:u,position:"relative",minWidth:f}},y(t,Object.assign({},O)))}),o0=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};var Df=function(e){var n=e.className,r=e.customizeIcon,i=e.customizeIconProps,o=e.children,a=e.onMouseDown,s=e.onClick,l=typeof r=="function"?r(i):r;return y("span",{className:n,onMouseDown:function(u){u.preventDefault(),a==null||a(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:y("span",{className:Z(n.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},o))},QN=function(e,n,r,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=oe.useMemo(function(){if(Je(i)==="object")return i.clearIcon;if(o)return o},[i,o]),u=oe.useMemo(function(){return!!(!a&&i&&(r.length||s)&&!(l==="combobox"&&s===""))},[i,a,r.length,s,l]);return{allowClear:u,clearIcon:oe.createElement(Df,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:c},"×")}},e2=bt(null);function NN(){return fe(e2)}function zN(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=J(!1),n=ae(e,2),r=n[0],i=n[1],o=U(null),a=function(){window.clearTimeout(o.current)};be(function(){return a},[]);var s=function(c,u){a(),o.current=window.setTimeout(function(){i(c),u&&u()},t)};return[r,s,a]}function t2(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=U(null),n=U(null);be(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||e.current===null)&&(e.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){e.current=null},t)}return[function(){return e.current},r]}function LN(t,e,n,r){var i=U(null);i.current={open:e,triggerOpen:n,customizedTrigger:r},be(function(){function o(a){var s;if(!((s=i.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),i.current.open&&t().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function jN(t){return t&&![je.ESC,je.SHIFT,je.BACKSPACE,je.TAB,je.WIN_KEY,je.ALT,je.META,je.WIN_KEY_RIGHT,je.CTRL,je.SEMICOLON,je.EQUALS,je.CAPS_LOCK,je.CONTEXT_MENU,je.F1,je.F2,je.F3,je.F4,je.F5,je.F6,je.F7,je.F8,je.F9,je.F10,je.F11,je.F12].includes(t)}var DN=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Na=void 0;function BN(t,e){var n=t.prefixCls,r=t.invalidate,i=t.item,o=t.renderItem,a=t.responsive,s=t.responsiveDisabled,l=t.registerSize,c=t.itemKey,u=t.className,d=t.style,f=t.children,h=t.display,p=t.order,m=t.component,g=m===void 0?"div":m,v=ut(t,DN),O=a&&!h;function S(w){l(c,w)}be(function(){return function(){S(null)}},[]);var x=o&&i!==Na?o(i,{index:p}):f,b;r||(b={opacity:O?0:1,height:O?0:Na,overflowY:O?"hidden":Na,order:a?p:Na,pointerEvents:O?"none":Na,position:O?"absolute":Na});var C={};O&&(C["aria-hidden"]=!0);var $=y(g,Ce({className:Z(!r&&n,u),style:W(W({},b),d)},C,v,{ref:e}),x);return a&&($=y(Kr,{onResize:function(P){var _=P.offsetWidth;S(_)},disabled:s},$)),$}var Cl=Se(BN);Cl.displayName="Item";function WN(t){if(typeof MessageChannel>"u")Xt(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function FN(){var t=U(null),e=function(r){t.current||(t.current=[],WN(function(){Ov(function(){t.current.forEach(function(i){i()}),t.current=null})})),t.current.push(r)};return e}function Ks(t,e){var n=J(e),r=ae(n,2),i=r[0],o=r[1],a=pn(function(s){t(function(){o(s)})});return[i,a]}var wd=oe.createContext(null),VN=["component"],HN=["className"],XN=["className"],ZN=function(e,n){var r=fe(wd);if(!r){var i=e.component,o=i===void 0?"div":i,a=ut(e,VN);return y(o,Ce({},a,{ref:n}))}var s=r.className,l=ut(r,HN),c=e.className,u=ut(e,XN);return y(wd.Provider,{value:null},y(Cl,Ce({ref:n,className:Z(s,c)},l,u)))},n2=Se(ZN);n2.displayName="RawItem";var qN=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],r2="responsive",i2="invalidate";function GN(t){return"+ ".concat(t.length," ...")}function YN(t,e){var n=t.prefixCls,r=n===void 0?"rc-overflow":n,i=t.data,o=i===void 0?[]:i,a=t.renderItem,s=t.renderRawItem,l=t.itemKey,c=t.itemWidth,u=c===void 0?10:c,d=t.ssr,f=t.style,h=t.className,p=t.maxCount,m=t.renderRest,g=t.renderRawRest,v=t.suffix,O=t.component,S=O===void 0?"div":O,x=t.itemComponent,b=t.onVisibleChange,C=ut(t,qN),$=d==="full",w=FN(),P=Ks(w,null),_=ae(P,2),T=_[0],R=_[1],k=T||0,I=Ks(w,new Map),Q=ae(I,2),M=Q[0],E=Q[1],N=Ks(w,0),z=ae(N,2),L=z[0],F=z[1],H=Ks(w,0),V=ae(H,2),X=V[0],B=V[1],G=Ks(w,0),se=ae(G,2),re=se[0],le=se[1],me=J(null),ie=ae(me,2),ne=ie[0],ue=ie[1],de=J(null),j=ae(de,2),ee=j[0],he=j[1],ve=ge(function(){return ee===null&&$?Number.MAX_SAFE_INTEGER:ee||0},[ee,T]),Y=J(!1),ce=ae(Y,2),te=ce[0],Oe=ce[1],ye="".concat(r,"-item"),pe=Math.max(L,X),Qe=p===r2,Me=o.length&&Qe,De=p===i2,we=Me||typeof p=="number"&&o.length>p,Ie=ge(function(){var et=o;return Me?T===null&&$?et=o:et=o.slice(0,Math.min(o.length,k/u)):typeof p=="number"&&(et=o.slice(0,p)),et},[o,u,T,p,Me]),rt=ge(function(){return Me?o.slice(ve+1):o.slice(Ie.length)},[o,Ie,Me,ve]),Ye=Ht(function(et,nt){var Re;return typeof l=="function"?l(et):(Re=l&&(et==null?void 0:et[l]))!==null&&Re!==void 0?Re:nt},[l]),lt=Ht(a||function(et){return et},[a]);function Be(et,nt,Re){ee===et&&(nt===void 0||nt===ne)||(he(et),Re||(Oe(etk){Be(ot-1,et-dt-re+X);break}}v&&ct(0)+re>k&&ue(null)}},[k,M,X,re,Ye,Ie]);var xt=te&&!!rt.length,Pn={};ne!==null&&Me&&(Pn={position:"absolute",left:ne,top:0});var qt={prefixCls:ye,responsive:Me,component:x,invalidate:De},xn=s?function(et,nt){var Re=Ye(et,nt);return y(wd.Provider,{key:Re,value:W(W({},qt),{},{order:nt,item:et,itemKey:Re,registerSize:Xe,display:nt<=ve})},s(et,nt))}:function(et,nt){var Re=Ye(et,nt);return y(Cl,Ce({},qt,{order:nt,key:Re,item:et,renderItem:lt,itemKey:Re,registerSize:Xe,display:nt<=ve}))},gn={order:xt?ve:Number.MAX_SAFE_INTEGER,className:"".concat(ye,"-rest"),registerSize:_e,display:xt},Bt=m||GN,Ot=g?y(wd.Provider,{value:W(W({},qt),gn)},g(rt)):y(Cl,Ce({},qt,gn),typeof Bt=="function"?Bt(rt):Bt),ht=y(S,Ce({className:Z(!De&&r,h),style:f,ref:e},C),Ie.map(xn),we?Ot:null,v&&y(Cl,Ce({},qt,{responsive:Qe,responsiveDisabled:!Me,order:ve,className:"".concat(ye,"-suffix"),registerSize:Pe,display:!0,style:Pn}),v));return Qe?y(Kr,{onResize:ke,disabled:!Me},ht):ht}var Hi=Se(YN);Hi.displayName="Overflow";Hi.Item=n2;Hi.RESPONSIVE=r2;Hi.INVALIDATE=i2;function UN(t,e,n){var r=W(W({},t),e);return Object.keys(e).forEach(function(i){var o=e[i];typeof o=="function"&&(r[i]=function(){for(var a,s=arguments.length,l=new Array(s),c=0;cS&&(ce="".concat(te.slice(0,S),"..."))}var Oe=function(pe){pe&&pe.stopPropagation(),w(j)};return typeof C=="function"?le(ve,ce,ee,Y,Oe):re(j,ce,ee,Y,Oe)},ie=function(j){if(!i.length)return null;var ee=typeof b=="function"?b(j):b;return typeof C=="function"?le(void 0,ee,!1,!1,void 0,!0):re({title:ee},ee,!1)},ne=y("div",{className:"".concat(B,"-search"),style:{width:z},onFocus:function(){X(!0)},onBlur:function(){X(!1)}},y(o2,{ref:l,open:o,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:h,autoComplete:p,editable:se,activeDescendantId:m,value:G,onKeyDown:T,onMouseDown:R,onChange:P,onPaste:_,onCompositionStart:k,onCompositionEnd:I,onBlur:Q,tabIndex:g,attrs:$i(e,!0)}),y("span",{ref:M,className:"".concat(B,"-search-mirror"),"aria-hidden":!0},G," ")),ue=y(Hi,{prefixCls:"".concat(B,"-overflow"),data:i,renderItem:me,renderRest:ie,suffix:ne,itemKey:oz,maxCount:O});return y("span",{className:"".concat(B,"-wrap")},ue,!i.length&&!G&&y("span",{className:"".concat(B,"-placeholder")},c))},sz=function(e){var n=e.inputElement,r=e.prefixCls,i=e.id,o=e.inputRef,a=e.disabled,s=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,f=e.values,h=e.placeholder,p=e.tabIndex,m=e.showSearch,g=e.searchValue,v=e.activeValue,O=e.maxLength,S=e.onInputKeyDown,x=e.onInputMouseDown,b=e.onInputChange,C=e.onInputPaste,$=e.onInputCompositionStart,w=e.onInputCompositionEnd,P=e.onInputBlur,_=e.title,T=J(!1),R=ae(T,2),k=R[0],I=R[1],Q=u==="combobox",M=Q||m,E=f[0],N=g||"";Q&&v&&!k&&(N=v),be(function(){Q&&I(!1)},[Q,v]);var z=u!=="combobox"&&!d&&!m?!1:!!N,L=_===void 0?s2(E):_,F=ge(function(){return E?null:y("span",{className:"".concat(r,"-selection-placeholder"),style:z?{visibility:"hidden"}:void 0},h)},[E,z,h,r]);return y("span",{className:"".concat(r,"-selection-wrap")},y("span",{className:"".concat(r,"-selection-search")},y(o2,{ref:o,prefixCls:r,id:i,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:M,activeDescendantId:c,value:N,onKeyDown:S,onMouseDown:x,onChange:function(V){I(!0),b(V)},onPaste:C,onCompositionStart:$,onCompositionEnd:w,onBlur:P,tabIndex:p,attrs:$i(e,!0),maxLength:Q?O:void 0})),!Q&&E?y("span",{className:"".concat(r,"-selection-item"),title:L,style:z?{visibility:"hidden"}:void 0},E.label):null,F)},lz=function(e,n){var r=U(null),i=U(!1),o=e.prefixCls,a=e.open,s=e.mode,l=e.showSearch,c=e.tokenWithEnter,u=e.disabled,d=e.prefix,f=e.autoClearSearchValue,h=e.onSearch,p=e.onSearchSubmit,m=e.onToggleOpen,g=e.onInputKeyDown,v=e.onInputBlur,O=e.domRef;Yt(n,function(){return{focus:function(L){r.current.focus(L)},blur:function(){r.current.blur()}}});var S=t2(0),x=ae(S,2),b=x[0],C=x[1],$=function(L){var F=L.which,H=r.current instanceof HTMLTextAreaElement;!H&&a&&(F===je.UP||F===je.DOWN)&&L.preventDefault(),g&&g(L),F===je.ENTER&&s==="tags"&&!i.current&&!a&&(p==null||p(L.target.value)),!(H&&!a&&~[je.UP,je.DOWN,je.LEFT,je.RIGHT].indexOf(F))&&jN(F)&&m(!0)},w=function(){C(!0)},P=U(null),_=function(L){h(L,!0,i.current)!==!1&&m(!0)},T=function(){i.current=!0},R=function(L){i.current=!1,s!=="combobox"&&_(L.target.value)},k=function(L){var F=L.target.value;if(c&&P.current&&/[\r\n]/.test(P.current)){var H=P.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");F=F.replace(H,P.current)}P.current=null,_(F)},I=function(L){var F=L.clipboardData,H=F==null?void 0:F.getData("text");P.current=H||""},Q=function(L){var F=L.target;if(F!==r.current){var H=document.body.style.msTouchAction!==void 0;H?setTimeout(function(){r.current.focus()}):r.current.focus()}},M=function(L){var F=b();L.target!==r.current&&!F&&!(s==="combobox"&&u)&&L.preventDefault(),(s!=="combobox"&&(!l||!F)||!a)&&(a&&f!==!1&&h("",!0,!1),m())},E={inputRef:r,onInputKeyDown:$,onInputMouseDown:w,onInputChange:k,onInputPaste:I,onInputCompositionStart:T,onInputCompositionEnd:R,onInputBlur:v},N=s==="multiple"||s==="tags"?y(az,Ce({},e,E)):y(sz,Ce({},e,E));return y("div",{ref:O,className:"".concat(o,"-selector"),onClick:Q,onMouseDown:M},d&&y("div",{className:"".concat(o,"-prefix")},d),N)},cz=Se(lz);function uz(t){var e=t.prefixCls,n=t.align,r=t.arrow,i=t.arrowPos,o=r||{},a=o.className,s=o.content,l=i.x,c=l===void 0?0:l,u=i.y,d=u===void 0?0:u,f=U();if(!n||!n.points)return null;var h={position:"absolute"};if(n.autoArrow!==!1){var p=n.points[0],m=n.points[1],g=p[0],v=p[1],O=m[0],S=m[1];g===O||!["t","b"].includes(g)?h.top=d:g==="t"?h.top=0:h.bottom=0,v===S||!["l","r"].includes(v)?h.left=c:v==="l"?h.left=0:h.right=0}return y("div",{ref:f,className:Z("".concat(e,"-arrow"),a),style:h},s)}function dz(t){var e=t.prefixCls,n=t.open,r=t.zIndex,i=t.mask,o=t.motion;return i?y(pi,Ce({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return y("div",{style:{zIndex:r},className:Z("".concat(e,"-mask"),s)})}):null}var fz=Ta(function(t){var e=t.children;return e},function(t,e){return e.cache}),hz=Se(function(t,e){var n=t.popup,r=t.className,i=t.prefixCls,o=t.style,a=t.target,s=t.onVisibleChanged,l=t.open,c=t.keepDom,u=t.fresh,d=t.onClick,f=t.mask,h=t.arrow,p=t.arrowPos,m=t.align,g=t.motion,v=t.maskMotion,O=t.forceRender,S=t.getPopupContainer,x=t.autoDestroy,b=t.portal,C=t.zIndex,$=t.onMouseEnter,w=t.onMouseLeave,P=t.onPointerEnter,_=t.onPointerDownCapture,T=t.ready,R=t.offsetX,k=t.offsetY,I=t.offsetR,Q=t.offsetB,M=t.onAlign,E=t.onPrepare,N=t.stretch,z=t.targetWidth,L=t.targetHeight,F=typeof n=="function"?n():n,H=l||c,V=(S==null?void 0:S.length)>0,X=J(!S||!V),B=ae(X,2),G=B[0],se=B[1];if(Nt(function(){!G&&V&&a&&se(!0)},[G,V,a]),!G)return null;var re="auto",le={left:"-1000vw",top:"-1000vh",right:re,bottom:re};if(T||!l){var me,ie=m.points,ne=m.dynamicInset||((me=m._experimental)===null||me===void 0?void 0:me.dynamicInset),ue=ne&&ie[0][1]==="r",de=ne&&ie[0][0]==="b";ue?(le.right=I,le.left=re):(le.left=R,le.right=re),de?(le.bottom=Q,le.top=re):(le.top=k,le.bottom=re)}var j={};return N&&(N.includes("height")&&L?j.height=L:N.includes("minHeight")&&L&&(j.minHeight=L),N.includes("width")&&z?j.width=z:N.includes("minWidth")&&z&&(j.minWidth=z)),l||(j.pointerEvents="none"),y(b,{open:O||H,getContainer:S&&function(){return S(a)},autoDestroy:x},y(dz,{prefixCls:i,open:l,zIndex:C,mask:f,motion:v}),y(Kr,{onResize:M,disabled:!l},function(ee){return y(pi,Ce({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:O,leavedClassName:"".concat(i,"-hidden")},g,{onAppearPrepare:E,onEnterPrepare:E,visible:l,onVisibleChanged:function(ve){var Y;g==null||(Y=g.onVisibleChanged)===null||Y===void 0||Y.call(g,ve),s(ve)}}),function(he,ve){var Y=he.className,ce=he.style,te=Z(i,Y,r);return y("div",{ref:pr(ee,e,ve),className:te,style:W(W(W(W({"--arrow-x":"".concat(p.x||0,"px"),"--arrow-y":"".concat(p.y||0,"px")},le),j),ce),{},{boxSizing:"border-box",zIndex:C},o),onMouseEnter:$,onMouseLeave:w,onPointerEnter:P,onClick:d,onPointerDownCapture:_},h&&y(uz,{prefixCls:i,arrow:h,arrowPos:p,align:m}),y(fz,{cache:!l&&!u},F))})}))}),pz=Se(function(t,e){var n=t.children,r=t.getTriggerDOMNode,i=vo(n),o=Ht(function(s){Sv(e,r?r(s):s)},[r]),a=go(o,Ho(n));return i?Xn(n,{ref:a}):n}),Cy=bt(null);function $y(t){return t?Array.isArray(t)?t:[t]:[]}function mz(t,e,n,r){return ge(function(){var i=$y(n??e),o=$y(r??e),a=new Set(i),s=new Set(o);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[t,e,n,r])}function gz(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function vz(t,e,n,r){for(var i=n.points,o=Object.keys(t),a=0;a1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function Js(t){return Xl(parseFloat(t),0)}function Py(t,e){var n=W({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=_c(r).getComputedStyle(r),o=i.overflow,a=i.overflowClipMargin,s=i.borderTopWidth,l=i.borderBottomWidth,c=i.borderLeftWidth,u=i.borderRightWidth,d=r.getBoundingClientRect(),f=r.offsetHeight,h=r.clientHeight,p=r.offsetWidth,m=r.clientWidth,g=Js(s),v=Js(l),O=Js(c),S=Js(u),x=Xl(Math.round(d.width/p*1e3)/1e3),b=Xl(Math.round(d.height/f*1e3)/1e3),C=(p-m-O-S)*x,$=(f-h-g-v)*b,w=g*b,P=v*b,_=O*x,T=S*x,R=0,k=0;if(o==="clip"){var I=Js(a);R=I*x,k=I*b}var Q=d.x+_-R,M=d.y+w-k,E=Q+d.width+2*R-_-T-C,N=M+d.height+2*k-w-P-$;n.left=Math.max(n.left,Q),n.top=Math.max(n.top,M),n.right=Math.min(n.right,E),n.bottom=Math.min(n.bottom,N)}}),n}function _y(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),r=n.match(/^(.*)\%$/);return r?t*(parseFloat(r[1])/100):parseFloat(n)}function Ty(t,e){var n=e||[],r=ae(n,2),i=r[0],o=r[1];return[_y(t.width,i),_y(t.height,o)]}function ky(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function za(t,e){var n=e[0],r=e[1],i,o;return n==="t"?o=t.y:n==="b"?o=t.y+t.height:o=t.y+t.height/2,r==="l"?i=t.x:r==="r"?i=t.x+t.width:i=t.x+t.width/2,{x:i,y:o}}function So(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(r,i){return i===e?n[r]||"c":r}).join("")}function Oz(t,e,n,r,i,o,a){var s=J({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),l=ae(s,2),c=l[0],u=l[1],d=U(0),f=ge(function(){return e?jm(e):[]},[e]),h=U({}),p=function(){h.current={}};t||p();var m=pn(function(){if(e&&n&&t){let Rr=function(Ia,yo){var Ma=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qe,Fc=H.x+Ia,Vc=H.y+yo,hh=Fc+de,Ke=Vc+ue,mt=Math.max(Fc,Ma.left),On=Math.max(Vc,Ma.top),Tn=Math.min(hh,Ma.right),bn=Math.min(Ke,Ma.bottom);return Math.max(0,(Tn-mt)*(bn-On))},qo=function(){un=H.y+ot,Cn=un+ue,Ln=H.x+Re,Ut=Ln+de};var SO=Rr,Wc=qo,O,S,x,b,C=e,$=C.ownerDocument,w=_c(C),P=w.getComputedStyle(C),_=P.position,T=C.style.left,R=C.style.top,k=C.style.right,I=C.style.bottom,Q=C.style.overflow,M=W(W({},i[r]),o),E=$.createElement("div");(O=C.parentElement)===null||O===void 0||O.appendChild(E),E.style.left="".concat(C.offsetLeft,"px"),E.style.top="".concat(C.offsetTop,"px"),E.style.position=_,E.style.height="".concat(C.offsetHeight,"px"),E.style.width="".concat(C.offsetWidth,"px"),C.style.left="0",C.style.top="0",C.style.right="auto",C.style.bottom="auto",C.style.overflow="hidden";var N;if(Array.isArray(n))N={x:n[0],y:n[1],width:0,height:0};else{var z,L,F=n.getBoundingClientRect();F.x=(z=F.x)!==null&&z!==void 0?z:F.left,F.y=(L=F.y)!==null&&L!==void 0?L:F.top,N={x:F.x,y:F.y,width:F.width,height:F.height}}var H=C.getBoundingClientRect(),V=w.getComputedStyle(C),X=V.height,B=V.width;H.x=(S=H.x)!==null&&S!==void 0?S:H.left,H.y=(x=H.y)!==null&&x!==void 0?x:H.top;var G=$.documentElement,se=G.clientWidth,re=G.clientHeight,le=G.scrollWidth,me=G.scrollHeight,ie=G.scrollTop,ne=G.scrollLeft,ue=H.height,de=H.width,j=N.height,ee=N.width,he={left:0,top:0,right:se,bottom:re},ve={left:-ne,top:-ie,right:le-ne,bottom:me-ie},Y=M.htmlRegion,ce="visible",te="visibleFirst";Y!=="scroll"&&Y!==te&&(Y=ce);var Oe=Y===te,ye=Py(ve,f),pe=Py(he,f),Qe=Y===ce?pe:ye,Me=Oe?pe:Qe;C.style.left="auto",C.style.top="auto",C.style.right="0",C.style.bottom="0";var De=C.getBoundingClientRect();C.style.left=T,C.style.top=R,C.style.right=k,C.style.bottom=I,C.style.overflow=Q,(b=C.parentElement)===null||b===void 0||b.removeChild(E);var we=Xl(Math.round(de/parseFloat(B)*1e3)/1e3),Ie=Xl(Math.round(ue/parseFloat(X)*1e3)/1e3);if(we===0||Ie===0||Nl(n)&&!kf(n))return;var rt=M.offset,Ye=M.targetOffset,lt=Ty(H,rt),Be=ae(lt,2),ke=Be[0],Xe=Be[1],_e=Ty(N,Ye),Pe=ae(_e,2),ct=Pe[0],xt=Pe[1];N.x-=ct,N.y-=xt;var Pn=M.points||[],qt=ae(Pn,2),xn=qt[0],gn=qt[1],Bt=ky(gn),Ot=ky(xn),ht=za(N,Bt),et=za(H,Ot),nt=W({},M),Re=ht.x-et.x+ke,ot=ht.y-et.y+Xe,dt=Rr(Re,ot),Ee=Rr(Re,ot,pe),Ze=za(N,["t","l"]),Ae=za(H,["t","l"]),We=za(N,["b","r"]),st=za(H,["b","r"]),tt=M.overflow||{},Ct=tt.adjustX,$t=tt.adjustY,wt=tt.shiftX,Mt=tt.shiftY,vn=function(yo){return typeof yo=="boolean"?yo:yo>=0},un,Cn,Ln,Ut;qo();var nn=vn($t),Te=Ot[0]===Bt[0];if(nn&&Ot[0]==="t"&&(Cn>Me.bottom||h.current.bt)){var Le=ot;Te?Le-=ue-j:Le=Ze.y-st.y-Xe;var pt=Rr(Re,Le),yt=Rr(Re,Le,pe);pt>dt||pt===dt&&(!Oe||yt>=Ee)?(h.current.bt=!0,ot=Le,Xe=-Xe,nt.points=[So(Ot,0),So(Bt,0)]):h.current.bt=!1}if(nn&&Ot[0]==="b"&&(undt||Ge===dt&&(!Oe||ft>=Ee)?(h.current.tb=!0,ot=Ue,Xe=-Xe,nt.points=[So(Ot,0),So(Bt,0)]):h.current.tb=!1}var It=vn(Ct),zt=Ot[1]===Bt[1];if(It&&Ot[1]==="l"&&(Ut>Me.right||h.current.rl)){var Vt=Re;zt?Vt-=de-ee:Vt=Ze.x-st.x-ke;var dn=Rr(Vt,ot),Br=Rr(Vt,ot,pe);dn>dt||dn===dt&&(!Oe||Br>=Ee)?(h.current.rl=!0,Re=Vt,ke=-ke,nt.points=[So(Ot,1),So(Bt,1)]):h.current.rl=!1}if(It&&Ot[1]==="r"&&(Lndt||Pr===dt&&(!Oe||_r>=Ee)?(h.current.lr=!0,Re=wr,ke=-ke,nt.points=[So(Ot,1),So(Bt,1)]):h.current.lr=!1}qo();var qn=wt===!0?0:wt;typeof qn=="number"&&(Lnpe.right&&(Re-=Ut-pe.right-ke,N.x>pe.right-qn&&(Re+=N.x-pe.right+qn)));var Tr=Mt===!0?0:Mt;typeof Tr=="number"&&(unpe.bottom&&(ot-=Cn-pe.bottom-Xe,N.y>pe.bottom-Tr&&(ot+=N.y-pe.bottom+Tr)));var kr=H.x+Re,ei=kr+de,Ri=H.y+ot,Gt=Ri+ue,qe=N.x,Fe=qe+ee,Lt=N.y,Wt=Lt+j,en=Math.max(kr,qe),fn=Math.min(ei,Fe),gr=(en+fn)/2,Gn=gr-kr,vr=Math.max(Ri,Lt),ir=Math.min(Gt,Wt),Or=(vr+ir)/2,Ii=Or-Ri;a==null||a(e,nt);var br=De.right-H.x-(Re+H.width),qs=De.bottom-H.y-(ot+H.height);we===1&&(Re=Math.round(Re),br=Math.round(br)),Ie===1&&(ot=Math.round(ot),qs=Math.round(qs));var fh={ready:!0,offsetX:Re/we,offsetY:ot/Ie,offsetR:br/we,offsetB:qs/Ie,arrowX:Gn/we,arrowY:Ii/Ie,scaleX:we,scaleY:Ie,align:nt};u(fh)}}),g=function(){d.current+=1;var S=d.current;Promise.resolve().then(function(){d.current===S&&m()})},v=function(){u(function(S){return W(W({},S),{},{ready:!1})})};return Nt(v,[r]),Nt(function(){t||v()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,g]}function bz(t,e,n,r,i){Nt(function(){if(t&&e&&n){let f=function(){r(),i()};var d=f,o=e,a=n,s=jm(o),l=jm(a),c=_c(a),u=new Set([c].concat($e(s),$e(l)));return u.forEach(function(h){h.addEventListener("scroll",f,{passive:!0})}),c.addEventListener("resize",f,{passive:!0}),r(),function(){u.forEach(function(h){h.removeEventListener("scroll",f),c.removeEventListener("resize",f)})}}},[t,e,n])}function yz(t,e,n,r,i,o,a,s){var l=U(t);l.current=t;var c=U(!1);be(function(){if(e&&r&&(!i||o)){var d=function(){c.current=!1},f=function(g){var v;l.current&&!a(((v=g.composedPath)===null||v===void 0||(v=v.call(g))===null||v===void 0?void 0:v[0])||g.target)&&!c.current&&s(!1)},h=_c(r);h.addEventListener("pointerdown",d,!0),h.addEventListener("mousedown",f,!0),h.addEventListener("contextmenu",f,!0);var p=Od(n);return p&&(p.addEventListener("mousedown",f,!0),p.addEventListener("contextmenu",f,!0)),function(){h.removeEventListener("pointerdown",d,!0),h.removeEventListener("mousedown",f,!0),h.removeEventListener("contextmenu",f,!0),p&&(p.removeEventListener("mousedown",f,!0),p.removeEventListener("contextmenu",f,!0))}}},[e,n,r,i,o]);function u(){c.current=!0}return u}var Sz=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function xz(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Kv,e=Se(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=n.children,s=n.action,l=s===void 0?"hover":s,c=n.showAction,u=n.hideAction,d=n.popupVisible,f=n.defaultPopupVisible,h=n.onPopupVisibleChange,p=n.afterPopupVisibleChange,m=n.mouseEnterDelay,g=n.mouseLeaveDelay,v=g===void 0?.1:g,O=n.focusDelay,S=n.blurDelay,x=n.mask,b=n.maskClosable,C=b===void 0?!0:b,$=n.getPopupContainer,w=n.forceRender,P=n.autoDestroy,_=n.destroyPopupOnHide,T=n.popup,R=n.popupClassName,k=n.popupStyle,I=n.popupPlacement,Q=n.builtinPlacements,M=Q===void 0?{}:Q,E=n.popupAlign,N=n.zIndex,z=n.stretch,L=n.getPopupClassNameFromAlign,F=n.fresh,H=n.alignPoint,V=n.onPopupClick,X=n.onPopupAlign,B=n.arrow,G=n.popupMotion,se=n.maskMotion,re=n.popupTransitionName,le=n.popupAnimation,me=n.maskTransitionName,ie=n.maskAnimation,ne=n.className,ue=n.getTriggerDOMNode,de=ut(n,Sz),j=P||_||!1,ee=J(!1),he=ae(ee,2),ve=he[0],Y=he[1];Nt(function(){Y(o0())},[]);var ce=U({}),te=fe(Cy),Oe=ge(function(){return{registerSubPopup:function(mt,On){ce.current[mt]=On,te==null||te.registerSubPopup(mt,On)}}},[te]),ye=Jv(),pe=J(null),Qe=ae(pe,2),Me=Qe[0],De=Qe[1],we=U(null),Ie=pn(function(Ke){we.current=Ke,Nl(Ke)&&Me!==Ke&&De(Ke),te==null||te.registerSubPopup(ye,Ke)}),rt=J(null),Ye=ae(rt,2),lt=Ye[0],Be=Ye[1],ke=U(null),Xe=pn(function(Ke){Nl(Ke)&<!==Ke&&(Be(Ke),ke.current=Ke)}),_e=Ao.only(a),Pe=(_e==null?void 0:_e.props)||{},ct={},xt=pn(function(Ke){var mt,On,Tn=lt;return(Tn==null?void 0:Tn.contains(Ke))||((mt=Od(Tn))===null||mt===void 0?void 0:mt.host)===Ke||Ke===Tn||(Me==null?void 0:Me.contains(Ke))||((On=Od(Me))===null||On===void 0?void 0:On.host)===Ke||Ke===Me||Object.values(ce.current).some(function(bn){return(bn==null?void 0:bn.contains(Ke))||Ke===bn})}),Pn=wy(o,G,le,re),qt=wy(o,se,ie,me),xn=J(f||!1),gn=ae(xn,2),Bt=gn[0],Ot=gn[1],ht=d??Bt,et=pn(function(Ke){d===void 0&&Ot(Ke)});Nt(function(){Ot(d||!1)},[d]);var nt=U(ht);nt.current=ht;var Re=U([]);Re.current=[];var ot=pn(function(Ke){var mt;et(Ke),((mt=Re.current[Re.current.length-1])!==null&&mt!==void 0?mt:ht)!==Ke&&(Re.current.push(Ke),h==null||h(Ke))}),dt=U(),Ee=function(){clearTimeout(dt.current)},Ze=function(mt){var On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Ee(),On===0?ot(mt):dt.current=setTimeout(function(){ot(mt)},On*1e3)};be(function(){return Ee},[]);var Ae=J(!1),We=ae(Ae,2),st=We[0],tt=We[1];Nt(function(Ke){(!Ke||ht)&&tt(!0)},[ht]);var Ct=J(null),$t=ae(Ct,2),wt=$t[0],Mt=$t[1],vn=J(null),un=ae(vn,2),Cn=un[0],Ln=un[1],Ut=function(mt){Ln([mt.clientX,mt.clientY])},nn=Oz(ht,Me,H&&Cn!==null?Cn:lt,I,M,E,X),Te=ae(nn,11),Le=Te[0],pt=Te[1],yt=Te[2],Ue=Te[3],Ge=Te[4],ft=Te[5],It=Te[6],zt=Te[7],Vt=Te[8],dn=Te[9],Br=Te[10],wr=mz(ve,l,c,u),Pr=ae(wr,2),_r=Pr[0],qn=Pr[1],Tr=_r.has("click"),kr=qn.has("click")||qn.has("contextMenu"),ei=pn(function(){st||Br()}),Ri=function(){nt.current&&H&&kr&&Ze(!1)};bz(ht,lt,Me,ei,Ri),Nt(function(){ei()},[Cn,I]),Nt(function(){ht&&!(M!=null&&M[I])&&ei()},[JSON.stringify(E)]);var Gt=ge(function(){var Ke=vz(M,o,dn,H);return Z(Ke,L==null?void 0:L(dn))},[dn,L,M,o,H]);Yt(r,function(){return{nativeElement:ke.current,popupElement:we.current,forceAlign:ei}});var qe=J(0),Fe=ae(qe,2),Lt=Fe[0],Wt=Fe[1],en=J(0),fn=ae(en,2),gr=fn[0],Gn=fn[1],vr=function(){if(z&<){var mt=lt.getBoundingClientRect();Wt(mt.width),Gn(mt.height)}},ir=function(){vr(),ei()},Or=function(mt){tt(!1),Br(),p==null||p(mt)},Ii=function(){return new Promise(function(mt){vr(),Mt(function(){return mt})})};Nt(function(){wt&&(Br(),wt(),Mt(null))},[wt]);function br(Ke,mt,On,Tn){ct[Ke]=function(bn){var Hc;Tn==null||Tn(bn),Ze(mt,On);for(var ph=arguments.length,xO=new Array(ph>1?ph-1:0),Xc=1;Xc1?On-1:0),bn=1;bn1?On-1:0),bn=1;bn1&&arguments[1]!==void 0?arguments[1]:{},n=e.fieldNames,r=e.childrenAsData,i=[],o=l2(n,!1),a=o.label,s=o.value,l=o.options,c=o.groupLabel;function u(d,f){Array.isArray(d)&&d.forEach(function(h){if(f||!(l in h)){var p=h[s];i.push({key:Ry(h,i.length),groupOption:f,data:h,label:h[a],value:p})}else{var m=h[c];m===void 0&&r&&(m=h.label),i.push({key:Ry(h,i.length),group:!0,data:h,label:m}),u(h[l],!0)}})}return u(t,!1),i}function Bm(t){var e=W({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return tr(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var Tz=function(e,n,r){if(!n||!n.length)return null;var i=!1,o=function s(l,c){var u=d$(c),d=u[0],f=u.slice(1);if(!d)return[l];var h=l.split(d);return i=i||h.length>1,h.reduce(function(p,m){return[].concat($e(p),$e(s(m,f)))},[]).filter(Boolean)},a=o(e,n);return i?typeof r<"u"?a.slice(0,r):a:null},a0=bt(null);function kz(t){var e=t.visible,n=t.values;if(!e)return null;var r=50;return y("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(i){var o=i.label,a=i.value;return["number","string"].includes(Je(o))?o:a}).join(", ")),n.length>r?", ...":null)}var Rz=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Iz=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Wm=function(e){return e==="tags"||e==="multiple"},Mz=Se(function(t,e){var n,r=t.id,i=t.prefixCls,o=t.className,a=t.showSearch,s=t.tagRender,l=t.direction,c=t.omitDomProps,u=t.displayValues,d=t.onDisplayValuesChange,f=t.emptyOptions,h=t.notFoundContent,p=h===void 0?"Not Found":h,m=t.onClear,g=t.mode,v=t.disabled,O=t.loading,S=t.getInputElement,x=t.getRawInputElement,b=t.open,C=t.defaultOpen,$=t.onDropdownVisibleChange,w=t.activeValue,P=t.onActiveValueChange,_=t.activeDescendantId,T=t.searchValue,R=t.autoClearSearchValue,k=t.onSearch,I=t.onSearchSplit,Q=t.tokenSeparators,M=t.allowClear,E=t.prefix,N=t.suffixIcon,z=t.clearIcon,L=t.OptionList,F=t.animation,H=t.transitionName,V=t.dropdownStyle,X=t.dropdownClassName,B=t.dropdownMatchSelectWidth,G=t.dropdownRender,se=t.dropdownAlign,re=t.placement,le=t.builtinPlacements,me=t.getPopupContainer,ie=t.showAction,ne=ie===void 0?[]:ie,ue=t.onFocus,de=t.onBlur,j=t.onKeyUp,ee=t.onKeyDown,he=t.onMouseDown,ve=ut(t,Rz),Y=Wm(g),ce=(a!==void 0?a:Y)||g==="combobox",te=W({},ve);Iz.forEach(function(qe){delete te[qe]}),c==null||c.forEach(function(qe){delete te[qe]});var Oe=J(!1),ye=ae(Oe,2),pe=ye[0],Qe=ye[1];be(function(){Qe(o0())},[]);var Me=U(null),De=U(null),we=U(null),Ie=U(null),rt=U(null),Ye=U(!1),lt=zN(),Be=ae(lt,3),ke=Be[0],Xe=Be[1],_e=Be[2];Yt(e,function(){var qe,Fe;return{focus:(qe=Ie.current)===null||qe===void 0?void 0:qe.focus,blur:(Fe=Ie.current)===null||Fe===void 0?void 0:Fe.blur,scrollTo:function(Wt){var en;return(en=rt.current)===null||en===void 0?void 0:en.scrollTo(Wt)},nativeElement:Me.current||De.current}});var Pe=ge(function(){var qe;if(g!=="combobox")return T;var Fe=(qe=u[0])===null||qe===void 0?void 0:qe.value;return typeof Fe=="string"||typeof Fe=="number"?String(Fe):""},[T,g,u]),ct=g==="combobox"&&typeof S=="function"&&S()||null,xt=typeof x=="function"&&x(),Pn=go(De,xt==null||(n=xt.props)===null||n===void 0?void 0:n.ref),qt=J(!1),xn=ae(qt,2),gn=xn[0],Bt=xn[1];Nt(function(){Bt(!0)},[]);var Ot=_n(!1,{defaultValue:C,value:b}),ht=ae(Ot,2),et=ht[0],nt=ht[1],Re=gn?et:!1,ot=!p&&f;(v||ot&&Re&&g==="combobox")&&(Re=!1);var dt=ot?!1:Re,Ee=Ht(function(qe){var Fe=qe!==void 0?qe:!Re;v||(nt(Fe),Re!==Fe&&($==null||$(Fe)))},[v,Re,nt,$]),Ze=ge(function(){return(Q||[]).some(function(qe){return[` + ${e}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${e}-confirm-body`]:{marginBottom:"auto"}}}]},fz=t=>{const{componentCls:e}=t;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},hz=t=>{const{componentCls:e}=t,n=qw(t),r=Object.assign({},n);delete r.xs;const i=`--${e.replace(".","")}-`,o=Object.keys(r).map(a=>({[`@media (min-width: ${V(r[a])})`]:{width:`var(${i}${a}-width)`}}));return{[`${e}-root`]:{[e]:[].concat(Ce(Object.keys(n).map((a,s)=>{const l=Object.keys(n)[s-1];return l?{[`${i}${a}-width`]:`var(${i}${l}-width)`}:null})),[{width:`var(${i}xs-width)`}],Ce(o))}}},Gw=t=>{const e=t.padding,n=t.fontSizeHeading5,r=t.lineHeightHeading5;return It(t,{modalHeaderHeight:t.calc(t.calc(r).mul(n).equal()).add(t.calc(e).mul(2).equal()).equal(),modalFooterBorderColorSplit:t.colorSplit,modalFooterBorderStyle:t.lineType,modalFooterBorderWidth:t.lineWidth,modalCloseIconColor:t.colorIcon,modalCloseIconHoverColor:t.colorIconHover,modalCloseBtnSize:t.controlHeight,modalConfirmIconSize:t.fontHeight,modalTitleHeight:t.calc(t.titleFontSize).mul(t.titleLineHeight).equal()})},Uw=t=>({footerBg:"transparent",headerBg:t.colorBgElevated,titleLineHeight:t.lineHeightHeading5,titleFontSize:t.fontSizeHeading5,contentBg:t.colorBgElevated,titleColor:t.colorTextHeading,contentPadding:t.wireframe?0:`${V(t.paddingMD)} ${V(t.paddingContentHorizontalLG)}`,headerPadding:t.wireframe?`${V(t.padding)} ${V(t.paddingLG)}`:0,headerBorderBottom:t.wireframe?`${V(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",headerMarginBottom:t.wireframe?0:t.marginXS,bodyPadding:t.wireframe?t.paddingLG:0,footerPadding:t.wireframe?`${V(t.paddingXS)} ${V(t.padding)}`:0,footerBorderTop:t.wireframe?`${V(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",footerBorderRadius:t.wireframe?`0 0 ${V(t.borderRadiusLG)} ${V(t.borderRadiusLG)}`:0,footerMarginTop:t.wireframe?0:t.marginSM,confirmBodyPadding:t.wireframe?`${V(t.padding*2)} ${V(t.padding*2)} ${V(t.paddingLG)}`:0,confirmIconMarginInlineEnd:t.wireframe?t.margin:t.marginSM,confirmBtnsMarginTop:t.wireframe?t.marginLG:t.marginSM}),Yw=Ft("Modal",t=>{const e=Gw(t);return[dz(e),fz(e),uz(e),Tc(e,"zoom"),hz(e)]},Uw,{unitless:{titleLineHeight:!0}});var mz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{Gp={x:t.pageX,y:t.pageY},setTimeout(()=>{Gp=null},100)};kN()&&document.documentElement.addEventListener("click",pz,!0);const Kw=t=>{const{prefixCls:e,className:n,rootClassName:r,open:i,wrapClassName:o,centered:a,getContainer:s,focusTriggerAfterClose:l=!0,style:c,visible:u,width:d=520,footer:f,classNames:h,styles:m,children:p,loading:g,confirmLoading:O,zIndex:v,mousePosition:y,onOk:S,onCancel:x,destroyOnHidden:$,destroyOnClose:C,panelRef:P=null}=t,w=mz(t,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose","panelRef"]),{getPopupContainer:_,getPrefixCls:R,direction:I,modal:T}=he(lt),M=D=>{O||x==null||x(D)},Q=D=>{S==null||S(D)},E=R("modal",e),k=R(),z=Tr(E),[L,B,F]=Yw(E,z),H=U(o,{[`${E}-centered`]:a??(T==null?void 0:T.centered),[`${E}-wrap-rtl`]:I==="rtl"}),X=f!==null&&!g?b(Zw,Object.assign({},t,{onOk:Q,onCancel:M})):null,[q,N,j,oe]=Fw(Md(t),Md(T),{closable:!0,closeIcon:b(Xi,{className:`${E}-close-icon`}),closeIconRender:D=>Xw(E,D)}),ee=tz(`.${E}-content`),se=vr(P,ee),[fe,re]=Pc("Modal",v),[J,ue]=ve(()=>d&&typeof d=="object"?[void 0,d]:[d,void 0],[d]),de=ve(()=>{const D={};return ue&&Object.keys(ue).forEach(Y=>{const me=ue[Y];me!==void 0&&(D[`--${E}-${Y}-width`]=typeof me=="number"?`${me}px`:me)}),D},[ue]);return L(b(Cs,{form:!0,space:!0},b(Nf.Provider,{value:re},b(kw,Object.assign({width:J},w,{zIndex:fe,getContainer:s===void 0?_:s,prefixCls:E,rootClassName:U(B,r,F,z),footer:X,visible:i??u,mousePosition:y??Gp,onClose:M,closable:q&&Object.assign({disabled:j,closeIcon:N},oe),closeIcon:N,focusTriggerAfterClose:l,transitionName:jo(k,"zoom",t.transitionName),maskTransitionName:jo(k,"fade",t.maskTransitionName),className:U(B,n,T==null?void 0:T.className),style:Object.assign(Object.assign(Object.assign({},T==null?void 0:T.style),c),de),classNames:Object.assign(Object.assign(Object.assign({},T==null?void 0:T.classNames),h),{wrapper:U(H,h==null?void 0:h.wrapper)}),styles:Object.assign(Object.assign({},T==null?void 0:T.styles),m),panelRef:se,destroyOnClose:$??C}),g?b(Aa,{active:!0,title:!1,paragraph:{rows:4},className:`${E}-body-skeleton`}):p))))},gz=t=>{const{componentCls:e,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:o,lineHeight:a,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:c}=t,u=`${e}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${t.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},zo()),[`&${e} ${e}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t.iconCls}`]:{flex:"none",fontSize:i,marginInlineEnd:t.confirmIconMarginInlineEnd,marginTop:t.calc(t.calc(l).sub(i).equal()).div(2).equal()},[`&-has-title > ${t.iconCls}`]:{marginTop:t.calc(t.calc(s).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:t.marginXS,maxWidth:`calc(100% - ${V(t.marginSM)})`},[`${t.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${V(t.calc(t.modalConfirmIconSize).add(t.marginSM).equal())})`},[`${u}-title`]:{color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-content`]:{color:t.colorText,fontSize:o,lineHeight:a},[`${u}-btns`]:{textAlign:"end",marginTop:t.confirmBtnsMarginTop,[`${t.antCls}-btn + ${t.antCls}-btn`]:{marginBottom:0,marginInlineStart:t.marginXS}}},[`${u}-error ${u}-body > ${t.iconCls}`]:{color:t.colorError},[`${u}-warning ${u}-body > ${t.iconCls}, + ${u}-confirm ${u}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${u}-info ${u}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${u}-success ${u}-body > ${t.iconCls}`]:{color:t.colorSuccess}}},vz=Ea(["Modal","confirm"],t=>{const e=Gw(t);return gz(e)},Uw,{order:-1e3});var Oz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);iv,Ce(Object.values(v))),S=b(Qt,null,b(iy,null),b(oy,null)),x=t.title!==void 0&&t.title!==null,$=`${o}-body`;return b("div",{className:`${o}-body-wrapper`},b("div",{className:U($,{[`${$}-has-title`]:x})},d,b("div",{className:`${o}-paragraph`},x&&b("span",{className:`${o}-title`},t.title),b("div",{className:`${o}-content`},t.content))),l===void 0||typeof l=="function"?b(Tw,{value:y},b("div",{className:`${o}-btns`},typeof l=="function"?l(S,{OkBtn:oy,CancelBtn:iy}):S)):l,b(vz,{prefixCls:e}))}const bz=t=>{const{close:e,zIndex:n,maskStyle:r,direction:i,prefixCls:o,wrapClassName:a,rootPrefixCls:s,bodyStyle:l,closable:c=!1,onConfirm:u,styles:d}=t,f=`${o}-confirm`,h=t.width||416,m=t.style||{},p=t.mask===void 0?!0:t.mask,g=t.maskClosable===void 0?!1:t.maskClosable,O=U(f,`${f}-${t.type}`,{[`${f}-rtl`]:i==="rtl"},t.className),[,v]=Or(),y=ve(()=>n!==void 0?n:v.zIndexPopupBase+pw,[n,v]);return b(Kw,Object.assign({},t,{className:O,wrapClassName:U({[`${f}-centered`]:!!t.centered},a),onCancel:()=>{e==null||e({triggerCancel:!0}),u==null||u(!1)},title:"",footer:null,transitionName:jo(s||"","zoom",t.transitionName),maskTransitionName:jo(s||"","fade",t.maskTransitionName),mask:p,maskClosable:g,style:m,styles:Object.assign({body:l,mask:r},d),width:h,zIndex:y,closable:c}),b(Jw,Object.assign({},t,{confirmPrefixCls:f})))},e2=t=>{const{rootPrefixCls:e,iconPrefixCls:n,direction:r,theme:i}=t;return b(Ur,{prefixCls:e,iconPrefixCls:n,direction:r,theme:i},b(bz,Object.assign({},t)))},ca=[];let t2="";function n2(){return t2}const yz=t=>{var e,n;const{prefixCls:r,getContainer:i,direction:o}=t,a=MC(),s=he(lt),l=n2()||s.getPrefixCls(),c=r||`${l}-modal`;let u=i;return u===!1&&(u=void 0),K.createElement(e2,Object.assign({},t,{rootPrefixCls:l,prefixCls:c,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:o??s.direction,locale:(n=(e=s.locale)===null||e===void 0?void 0:e.Modal)!==null&&n!==void 0?n:a,getContainer:u}))};function Mc(t){const e=aw(),n=document.createDocumentFragment();let r=Object.assign(Object.assign({},t),{close:l,open:!0}),i,o;function a(...u){var d;if(u.some(m=>m==null?void 0:m.triggerCancel)){var h;(d=t.onCancel)===null||d===void 0||(h=d).call.apply(h,[t,()=>{}].concat(Ce(u.slice(1))))}for(let m=0;m{const d=e.getPrefixCls(void 0,n2()),f=e.getIconPrefixCls(),h=e.getTheme(),m=K.createElement(yz,Object.assign({},u));o=qv()(K.createElement(Ur,{prefixCls:d,iconPrefixCls:f,theme:h},e.holderRender?e.holderRender(m):m),n)})}function l(...u){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof t.afterClose=="function"&&t.afterClose(),a.apply(this,u)}}),r.visible&&delete r.visible,s(r)}function c(u){typeof u=="function"?r=u(r):r=Object.assign(Object.assign({},r),u),s(r)}return s(r),ca.push(l),{destroy:l,update:c}}function r2(t){return Object.assign(Object.assign({},t),{type:"warning"})}function i2(t){return Object.assign(Object.assign({},t),{type:"info"})}function o2(t){return Object.assign(Object.assign({},t),{type:"success"})}function a2(t){return Object.assign(Object.assign({},t),{type:"error"})}function s2(t){return Object.assign(Object.assign({},t),{type:"confirm"})}function Sz({rootPrefixCls:t}){t2=t}var xz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,{afterClose:r,config:i}=t,o=xz(t,["afterClose","config"]);const[a,s]=te(!0),[l,c]=te(i),{direction:u,getPrefixCls:d}=he(lt),f=d("modal"),h=d(),m=()=>{var v;r(),(v=l.afterClose)===null||v===void 0||v.call(l)},p=(...v)=>{var y;if(s(!1),v.some($=>$==null?void 0:$.triggerCancel)){var x;(y=l.onCancel)===null||y===void 0||(x=y).call.apply(x,[l,()=>{}].concat(Ce(v.slice(1))))}};Jt(e,()=>({destroy:p,update:v=>{c(y=>{const S=typeof v=="function"?v(y):v;return Object.assign(Object.assign({},y),S)})}}));const g=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[O]=Ii("Modal",Gi.Modal);return b(e2,Object.assign({prefixCls:f,rootPrefixCls:h},l,{close:p,open:a,afterClose:m,okText:l.okText||(g?O==null?void 0:O.okText:O==null?void 0:O.justOkText),direction:l.direction||u,cancelText:l.cancelText||(O==null?void 0:O.cancelText)},o))},Cz=Se($z);let Iy=0;const wz=Ma(Se((t,e)=>{const[n,r]=vA();return Jt(e,()=>({patchElement:r}),[]),b(Qt,null,n)}));function Pz(){const t=ne(null),[e,n]=te([]);ye(()=>{e.length&&(Ce(e).forEach(a=>{a()}),n([]))},[e]);const r=Ut(o=>function(s){var l;Iy+=1;const c=pv();let u;const d=new Promise(g=>{u=g});let f=!1,h;const m=b(Cz,{key:`modal-${Iy}`,config:o(s),ref:c,afterClose:()=>{h==null||h()},isSilent:()=>f,onConfirm:g=>{u(g)}});return h=(l=t.current)===null||l===void 0?void 0:l.patchElement(m),h&&ca.push(h),{destroy:()=>{function g(){var O;(O=c.current)===null||O===void 0||O.destroy()}c.current?g():n(O=>[].concat(Ce(O),[g]))},update:g=>{function O(){var v;(v=c.current)===null||v===void 0||v.update(g)}c.current?O():n(v=>[].concat(Ce(v),[O]))},then:g=>(f=!0,d.then(g))}},[]);return[ve(()=>({info:r(i2),success:r(o2),error:r(a2),warning:r(r2),confirm:r(s2)}),[]),b(wz,{key:"modal-holder",ref:t})]}const _z=t=>{const{componentCls:e,notificationMarginEdge:n,animationMaxHeight:r}=t,i=`${e}-notice`,o=new At("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),a=new At("antNotificationTopFadeIn",{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),s=new At("antNotificationBottomFadeIn",{"0%":{bottom:t.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),l=new At("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return{[e]:{[`&${e}-top, &${e}-bottom`]:{marginInline:0,[i]:{marginInline:"auto auto"}},[`&${e}-top`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:a}},[`&${e}-bottom`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:s}},[`&${e}-topRight, &${e}-bottomRight`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:o}},[`&${e}-topLeft, &${e}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[i]:{marginInlineEnd:"auto",marginInlineStart:0},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:l}}}}},Tz=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],Rz={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},Iz=(t,e)=>{const{componentCls:n}=t;return{[`${n}-${e}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[e.startsWith("top")?"top":"bottom"]:0,[Rz[e]]:{value:0,_skip_check_:!0}}}}},Mz=t=>{const e={};for(let n=1;n ${t.componentCls}-notice`]:{opacity:0,transition:`opacity ${t.motionDurationMid}`}};return Object.assign({[`&:not(:nth-last-child(-n+${t.notificationStackLayer}))`]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"}},e)},Ez=t=>{const e={};for(let n=1;n{const{componentCls:e}=t;return Object.assign({[`${e}-stack`]:{[`& > ${e}-notice-wrapper`]:Object.assign({transition:`transform ${t.motionDurationSlow}, backdrop-filter 0s`,willChange:"transform, opacity",position:"absolute"},Mz(t))},[`${e}-stack:not(${e}-stack-expanded)`]:{[`& > ${e}-notice-wrapper`]:Object.assign({},Ez(t))},[`${e}-stack${e}-stack-expanded`]:{[`& > ${e}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",[`& > ${t.componentCls}-notice`]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:t.margin,width:"100%",insetInline:0,bottom:t.calc(t.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}}},Tz.map(n=>Iz(t,n)).reduce((n,r)=>Object.assign(Object.assign({},n),r),{}))},l2=t=>{const{iconCls:e,componentCls:n,boxShadow:r,fontSizeLG:i,notificationMarginBottom:o,borderRadiusLG:a,colorSuccess:s,colorInfo:l,colorWarning:c,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:h,notificationMarginEdge:m,notificationProgressBg:p,notificationProgressHeight:g,fontSize:O,lineHeight:v,width:y,notificationIconSize:S,colorText:x}=t,$=`${n}-notice`;return{position:"relative",marginBottom:o,marginInlineStart:"auto",background:f,borderRadius:a,boxShadow:r,[$]:{padding:h,width:y,maxWidth:`calc(100vw - ${V(t.calc(m).mul(2).equal())})`,overflow:"hidden",lineHeight:v,wordWrap:"break-word"},[`${$}-message`]:{color:d,fontSize:i,lineHeight:t.lineHeightLG},[`${$}-description`]:{fontSize:O,color:x,marginTop:t.marginXS},[`${$}-closable ${$}-message`]:{paddingInlineEnd:t.paddingLG},[`${$}-with-icon ${$}-message`]:{marginInlineStart:t.calc(t.marginSM).add(S).equal(),fontSize:i},[`${$}-with-icon ${$}-description`]:{marginInlineStart:t.calc(t.marginSM).add(S).equal(),fontSize:O},[`${$}-icon`]:{position:"absolute",fontSize:S,lineHeight:1,[`&-success${e}`]:{color:s},[`&-info${e}`]:{color:l},[`&-warning${e}`]:{color:c},[`&-error${e}`]:{color:u}},[`${$}-close`]:Object.assign({position:"absolute",top:t.notificationPaddingVertical,insetInlineEnd:t.notificationPaddingHorizontal,color:t.colorIcon,outline:"none",width:t.notificationCloseButtonSize,height:t.notificationCloseButtonSize,borderRadius:t.borderRadiusSM,transition:`background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none","&:hover":{color:t.colorIconHover,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}},hi(t)),[`${$}-progress`]:{position:"absolute",display:"block",appearance:"none",inlineSize:`calc(100% - ${V(a)} * 2)`,left:{_skip_check_:!0,value:a},right:{_skip_check_:!0,value:a},bottom:0,blockSize:g,border:0,"&, &::-webkit-progress-bar":{borderRadius:a,backgroundColor:"rgba(0, 0, 0, 0.04)"},"&::-moz-progress-bar":{background:p},"&::-webkit-progress-value":{borderRadius:a,background:p}},[`${$}-actions`]:{float:"right",marginTop:t.marginSM}}},Az=t=>{const{componentCls:e,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:i,motionEaseInOut:o}=t,a=`${e}-notice`,s=new At("antNotificationFadeOut",{"0%":{maxHeight:t.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[e]:Object.assign(Object.assign({},Sn(t)),{position:"fixed",zIndex:t.zIndexPopup,marginRight:{value:r,_skip_check_:!0},[`${e}-hook-holder`]:{position:"relative"},[`${e}-fade-appear-prepare`]:{opacity:"0 !important"},[`${e}-fade-enter, ${e}-fade-appear`]:{animationDuration:t.motionDurationMid,animationTimingFunction:o,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${e}-fade-leave`]:{animationTimingFunction:o,animationFillMode:"both",animationDuration:i,animationPlayState:"paused"},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationPlayState:"running"},[`${e}-fade-leave${e}-fade-leave-active`]:{animationName:s,animationPlayState:"running"},"&-rtl":{direction:"rtl",[`${a}-actions`]:{float:"left"}}})},{[e]:{[`${a}-wrapper`]:Object.assign({},l2(t))}}]},c2=t=>({zIndexPopup:t.zIndexPopupBase+pw+50,width:384}),u2=t=>{const e=t.paddingMD,n=t.paddingLG;return It(t,{notificationBg:t.colorBgElevated,notificationPaddingVertical:e,notificationPaddingHorizontal:n,notificationIconSize:t.calc(t.fontSizeLG).mul(t.lineHeightLG).equal(),notificationCloseButtonSize:t.calc(t.controlHeightLG).mul(.55).equal(),notificationMarginBottom:t.margin,notificationPadding:`${V(t.paddingMD)} ${V(t.paddingContentHorizontalLG)}`,notificationMarginEdge:t.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2,notificationProgressBg:`linear-gradient(90deg, ${t.colorPrimaryBorderHover}, ${t.colorPrimary})`})},d2=Ft("Notification",t=>{const e=u2(t);return[Az(e),_z(e),kz(e)]},c2),Qz=Ea(["Notification","PurePanel"],t=>{const e=`${t.componentCls}-notice`,n=u2(t);return{[`${e}-pure-panel`]:Object.assign(Object.assign({},l2(n)),{width:n.width,maxWidth:`calc(100vw - ${V(t.calc(n.notificationMarginEdge).mul(2).equal())})`,margin:0})}},c2);var Nz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,icon:n,type:r,message:i,description:o,actions:a,role:s="alert"}=t;let l=null;return n?l=b("span",{className:`${e}-icon`},n):r&&(l=b(zz[r]||null,{className:U(`${e}-icon`,`${e}-icon-${r}`)})),b("div",{className:U({[`${e}-with-icon`]:l}),role:s},l,b("div",{className:`${e}-message`},i),o&&b("div",{className:`${e}-description`},o),a&&b("div",{className:`${e}-actions`},a))},jz=t=>{const{prefixCls:e,className:n,icon:r,type:i,message:o,description:a,btn:s,actions:l,closable:c=!0,closeIcon:u,className:d}=t,f=Nz(t,["prefixCls","className","icon","type","message","description","btn","actions","closable","closeIcon","className"]),{getPrefixCls:h}=he(lt),m=l??s,p=e||h("notification"),g=`${p}-notice`,O=Tr(p),[v,y,S]=d2(p,O);return v(b("div",{className:U(`${g}-pure-panel`,y,n,S,O)},b(Qz,{prefixCls:p}),b(hw,Object.assign({},f,{prefixCls:p,eventKey:"pure",duration:null,closable:c,className:U({notificationClassName:d}),closeIcon:h0(p,u),content:b(f2,{prefixCls:g,icon:r,type:i,message:o,description:a,actions:m})}))))};function Lz(t,e,n){let r;switch(t){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:e,bottom:"auto"};break;case"topLeft":r={left:0,top:e,bottom:"auto"};break;case"topRight":r={right:0,top:e,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n};break}return r}function Dz(t){return{motionName:`${t}-fade`}}function Bz(t,e,n){return typeof t<"u"?t:typeof(e==null?void 0:e.closeIcon)<"u"?e.closeIcon:n==null?void 0:n.closeIcon}var Wz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=Tr(e),[r,i,o]=d2(e,n);return r(K.createElement(rA,{classNames:{list:U(i,o,n)}},t))},Xz=(t,{prefixCls:e,key:n})=>K.createElement(Fz,{prefixCls:e,key:n},t),Zz=K.forwardRef((t,e)=>{const{top:n,bottom:r,prefixCls:i,getContainer:o,maxCount:a,rtl:s,onAllRemoved:l,stack:c,duration:u,pauseOnHover:d=!0,showProgress:f}=t,{getPrefixCls:h,getPopupContainer:m,notification:p,direction:g}=he(lt),[,O]=Or(),v=i||h("notification"),y=P=>Lz(P,n??My,r??My),S=()=>U({[`${v}-rtl`]:s??g==="rtl"}),x=()=>Dz(v),[$,C]=dA({prefixCls:v,style:y,className:S,motion:x,closable:!0,closeIcon:h0(v),duration:u??Hz,getContainer:()=>(o==null?void 0:o())||(m==null?void 0:m())||document.body,maxCount:a,pauseOnHover:d,showProgress:f,onAllRemoved:l,renderNotifications:Xz,stack:c===!1?!1:{threshold:typeof c=="object"?c==null?void 0:c.threshold:void 0,offset:8,gap:O.margin}});return K.useImperativeHandle(e,()=>Object.assign(Object.assign({},$),{prefixCls:v,notification:p})),C});function h2(t){const e=K.useRef(null);return Cc(),[K.useMemo(()=>{const r=s=>{var l;if(!e.current)return;const{open:c,prefixCls:u,notification:d}=e.current,f=`${u}-notice`,{message:h,description:m,icon:p,type:g,btn:O,actions:v,className:y,style:S,role:x="alert",closeIcon:$,closable:C}=s,P=Wz(s,["message","description","icon","type","btn","actions","className","style","role","closeIcon","closable"]),w=v??O,_=h0(f,Bz($,t,d));return c(Object.assign(Object.assign({placement:(l=t==null?void 0:t.placement)!==null&&l!==void 0?l:Vz},P),{content:K.createElement(f2,{prefixCls:f,icon:p,type:g,message:h,description:m,actions:w,role:x}),className:U(g&&`${f}-${g}`,y,d==null?void 0:d.className),style:Object.assign(Object.assign({},d==null?void 0:d.style),S),closeIcon:_,closable:C??!!_}))},o={open:r,destroy:s=>{var l,c;s!==void 0?(l=e.current)===null||l===void 0||l.close(s):(c=e.current)===null||c===void 0||c.destroy()}};return["success","info","warning","error"].forEach(s=>{o[s]=l=>r(Object.assign(Object.assign({},l),{type:s}))}),o},[]),K.createElement(Zz,Object.assign({key:"notification-holder"},t,{ref:e}))]}function qz(t){return h2(t)}const Gz=K.createContext({});function m2(t){return e=>b(Ur,{theme:{token:{motion:!1,zIndexPopupBase:0}}},b(t,Object.assign({},e)))}const p2=(t,e,n,r,i)=>m2(a=>{const{prefixCls:s,style:l}=a,c=ne(null),[u,d]=te(0),[f,h]=te(0),[m,p]=Pn(!1,{value:a.open}),{getPrefixCls:g}=he(lt),O=g(r||"select",s);ye(()=>{if(p(!0),typeof ResizeObserver<"u"){const S=new ResizeObserver($=>{const C=$[0].target;d(C.offsetHeight+8),h(C.offsetWidth)}),x=setInterval(()=>{var $;const C=i?`.${i(O)}`:`.${O}-dropdown`,P=($=c.current)===null||$===void 0?void 0:$.querySelector(C);P&&(clearInterval(x),S.observe(P))},10);return()=>{clearInterval(x),S.disconnect()}}},[]);let v=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:m,visible:m,getPopupContainer:()=>c.current});return e&&Object.assign(v,{[e]:{overflow:{adjustX:!1,adjustY:!1}}}),b("div",{ref:c,style:{paddingBottom:u,position:"relative",minWidth:f}},b(t,Object.assign({},v)))}),m0=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};var Gf=function(e){var n=e.className,r=e.customizeIcon,i=e.customizeIconProps,o=e.children,a=e.onMouseDown,s=e.onClick,l=typeof r=="function"?r(i):r;return b("span",{className:n,onMouseDown:function(u){u.preventDefault(),a==null||a(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:b("span",{className:U(n.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},o))},Uz=function(e,n,r,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=K.useMemo(function(){if(nt(i)==="object")return i.clearIcon;if(o)return o},[i,o]),u=K.useMemo(function(){return!!(!a&&i&&(r.length||s)&&!(l==="combobox"&&s===""))},[i,a,r.length,s,l]);return{allowClear:u,clearIcon:K.createElement(Gf,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:c},"×")}},g2=Tt(null);function Yz(){return he(g2)}function Kz(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=te(!1),n=le(e,2),r=n[0],i=n[1],o=ne(null),a=function(){window.clearTimeout(o.current)};ye(function(){return a},[]);var s=function(c,u){a(),o.current=window.setTimeout(function(){i(c),u&&u()},t)};return[r,s,a]}function v2(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=ne(null),n=ne(null);ye(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||e.current===null)&&(e.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){e.current=null},t)}return[function(){return e.current},r]}function Jz(t,e,n,r){var i=ne(null);i.current={open:e,triggerOpen:n,customizedTrigger:r},ye(function(){function o(a){var s;if(!((s=i.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),i.current.open&&t().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function e3(t){return t&&![ze.ESC,ze.SHIFT,ze.BACKSPACE,ze.TAB,ze.WIN_KEY,ze.ALT,ze.META,ze.WIN_KEY_RIGHT,ze.CTRL,ze.SEMICOLON,ze.EQUALS,ze.CAPS_LOCK,ze.CONTEXT_MENU,ze.F1,ze.F2,ze.F3,ze.F4,ze.F5,ze.F6,ze.F7,ze.F8,ze.F9,ze.F10,ze.F11,ze.F12].includes(t)}var t3=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Da=void 0;function n3(t,e){var n=t.prefixCls,r=t.invalidate,i=t.item,o=t.renderItem,a=t.responsive,s=t.responsiveDisabled,l=t.registerSize,c=t.itemKey,u=t.className,d=t.style,f=t.children,h=t.display,m=t.order,p=t.component,g=p===void 0?"div":p,O=gt(t,t3),v=a&&!h;function y(P){l(c,P)}ye(function(){return function(){y(null)}},[]);var S=o&&i!==Da?o(i,{index:m}):f,x;r||(x={opacity:v?0:1,height:v?0:Da,overflowY:v?"hidden":Da,order:a?m:Da,pointerEvents:v?"none":Da,position:v?"absolute":Da});var $={};v&&($["aria-hidden"]=!0);var C=b(g,xe({className:U(!r&&n,u),style:Z(Z({},x),d)},$,O,{ref:e}),S);return a&&(C=b(Jr,{onResize:function(w){var _=w.offsetWidth;y(_)},disabled:s},C)),C}var _l=Se(n3);_l.displayName="Item";function r3(t){if(typeof MessageChannel>"u")Yt(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function i3(){var t=ne(null),e=function(r){t.current||(t.current=[],r3(function(){_v(function(){t.current.forEach(function(i){i()}),t.current=null})})),t.current.push(r)};return e}function el(t,e){var n=te(e),r=le(n,2),i=r[0],o=r[1],a=bn(function(s){t(function(){o(s)})});return[i,a]}var Ed=K.createContext(null),o3=["component"],a3=["className"],s3=["className"],l3=function(e,n){var r=he(Ed);if(!r){var i=e.component,o=i===void 0?"div":i,a=gt(e,o3);return b(o,xe({},a,{ref:n}))}var s=r.className,l=gt(r,a3),c=e.className,u=gt(e,s3);return b(Ed.Provider,{value:null},b(_l,xe({ref:n,className:U(s,c)},l,u)))},O2=Se(l3);O2.displayName="RawItem";var c3=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],b2="responsive",y2="invalidate";function u3(t){return"+ ".concat(t.length," ...")}function d3(t,e){var n=t.prefixCls,r=n===void 0?"rc-overflow":n,i=t.data,o=i===void 0?[]:i,a=t.renderItem,s=t.renderRawItem,l=t.itemKey,c=t.itemWidth,u=c===void 0?10:c,d=t.ssr,f=t.style,h=t.className,m=t.maxCount,p=t.renderRest,g=t.renderRawRest,O=t.suffix,v=t.component,y=v===void 0?"div":v,S=t.itemComponent,x=t.onVisibleChange,$=gt(t,c3),C=d==="full",P=i3(),w=el(P,null),_=le(w,2),R=_[0],I=_[1],T=R||0,M=el(P,new Map),Q=le(M,2),E=Q[0],k=Q[1],z=el(P,0),L=le(z,2),B=L[0],F=L[1],H=el(P,0),X=le(H,2),q=X[0],N=X[1],j=el(P,0),oe=le(j,2),ee=oe[0],se=oe[1],fe=te(null),re=le(fe,2),J=re[0],ue=re[1],de=te(null),D=le(de,2),Y=D[0],me=D[1],G=ve(function(){return Y===null&&C?Number.MAX_SAFE_INTEGER:Y||0},[Y,R]),ce=te(!1),ae=le(ce,2),pe=ae[0],Oe=ae[1],be="".concat(r,"-item"),ge=Math.max(B,q),Me=m===b2,Ie=o.length&&Me,He=m===y2,Ae=Ie||typeof m=="number"&&o.length>m,Ee=ve(function(){var et=o;return Ie?R===null&&C?et=o:et=o.slice(0,Math.min(o.length,T/u)):typeof m=="number"&&(et=o.slice(0,m)),et},[o,u,R,m,Ie]),st=ve(function(){return Ie?o.slice(G+1):o.slice(Ee.length)},[o,Ee,Ie,G]),Ye=Ut(function(et,it){var ke;return typeof l=="function"?l(et):(ke=l&&(et==null?void 0:et[l]))!==null&&ke!==void 0?ke:it},[l]),rt=Ut(a||function(et){return et},[a]);function Be(et,it,ke){Y===et&&(it===void 0||it===J)||(me(et),ke||(Oe(etT){Be(ct-1,et-Ke-ee+q);break}}O&&ft(0)+ee>T&&ue(null)}},[T,E,q,ee,Ye,Ee]);var yt=pe&&!!st.length,xn={};J!==null&&Ie&&(xn={position:"absolute",left:J,top:0});var Xt={prefixCls:be,responsive:Ie,component:S,invalidate:He},gn=s?function(et,it){var ke=Ye(et,it);return b(Ed.Provider,{key:ke,value:Z(Z({},Xt),{},{order:it,item:et,itemKey:ke,registerSize:Xe,display:it<=G})},s(et,it))}:function(et,it){var ke=Ye(et,it);return b(_l,xe({},Xt,{order:it,key:ke,item:et,renderItem:rt,itemKey:ke,registerSize:Xe,display:it<=G}))},fn={order:yt?G:Number.MAX_SAFE_INTEGER,className:"".concat(be,"-rest"),registerSize:_e,display:yt},Dt=p||u3,Ct=g?b(Ed.Provider,{value:Z(Z({},Xt),fn)},g(st)):b(_l,xe({},Xt,fn),typeof Dt=="function"?Dt(st):Dt),ht=b(y,xe({className:U(!He&&r,h),style:f,ref:e},$),Ee.map(gn),Ae?Ct:null,O&&b(_l,xe({},Xt,{responsive:Me,responsiveDisabled:!Ie,order:G,className:"".concat(be,"-suffix"),registerSize:Pe,display:!0,style:xn}),O));return Me?b(Jr,{onResize:Re,disabled:!Ie},ht):ht}var Zi=Se(d3);Zi.displayName="Overflow";Zi.Item=O2;Zi.RESPONSIVE=b2;Zi.INVALIDATE=y2;function f3(t,e,n){var r=Z(Z({},t),e);return Object.keys(e).forEach(function(i){var o=e[i];typeof o=="function"&&(r[i]=function(){for(var a,s=arguments.length,l=new Array(s),c=0;cy&&(ae="".concat(pe.slice(0,y),"..."))}var Oe=function(ge){ge&&ge.stopPropagation(),P(D)};return typeof $=="function"?se(G,ae,Y,ce,Oe):ee(D,ae,Y,ce,Oe)},re=function(D){if(!i.length)return null;var Y=typeof x=="function"?x(D):x;return typeof $=="function"?se(void 0,Y,!1,!1,void 0,!0):ee({title:Y},Y,!1)},J=b("div",{className:"".concat(N,"-search"),style:{width:L},onFocus:function(){q(!0)},onBlur:function(){q(!1)}},b(S2,{ref:l,open:o,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:h,autoComplete:m,editable:oe,activeDescendantId:p,value:j,onKeyDown:R,onMouseDown:I,onChange:w,onPaste:_,onCompositionStart:T,onCompositionEnd:M,onBlur:Q,tabIndex:g,attrs:mi(e,!0)}),b("span",{ref:E,className:"".concat(N,"-search-mirror"),"aria-hidden":!0},j," ")),ue=b(Zi,{prefixCls:"".concat(N,"-overflow"),data:i,renderItem:fe,renderRest:re,suffix:J,itemKey:y3,maxCount:v});return b("span",{className:"".concat(N,"-wrap")},ue,!i.length&&!j&&b("span",{className:"".concat(N,"-placeholder")},c))},x3=function(e){var n=e.inputElement,r=e.prefixCls,i=e.id,o=e.inputRef,a=e.disabled,s=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,f=e.values,h=e.placeholder,m=e.tabIndex,p=e.showSearch,g=e.searchValue,O=e.activeValue,v=e.maxLength,y=e.onInputKeyDown,S=e.onInputMouseDown,x=e.onInputChange,$=e.onInputPaste,C=e.onInputCompositionStart,P=e.onInputCompositionEnd,w=e.onInputBlur,_=e.title,R=te(!1),I=le(R,2),T=I[0],M=I[1],Q=u==="combobox",E=Q||p,k=f[0],z=g||"";Q&&O&&!T&&(z=O),ye(function(){Q&&M(!1)},[Q,O]);var L=u!=="combobox"&&!d&&!p?!1:!!z,B=_===void 0?$2(k):_,F=ve(function(){return k?null:b("span",{className:"".concat(r,"-selection-placeholder"),style:L?{visibility:"hidden"}:void 0},h)},[k,L,h,r]);return b("span",{className:"".concat(r,"-selection-wrap")},b("span",{className:"".concat(r,"-selection-search")},b(S2,{ref:o,prefixCls:r,id:i,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:E,activeDescendantId:c,value:z,onKeyDown:y,onMouseDown:S,onChange:function(X){M(!0),x(X)},onPaste:$,onCompositionStart:C,onCompositionEnd:P,onBlur:w,tabIndex:m,attrs:mi(e,!0),maxLength:Q?v:void 0})),!Q&&k?b("span",{className:"".concat(r,"-selection-item"),title:B,style:L?{visibility:"hidden"}:void 0},k.label):null,F)},$3=function(e,n){var r=ne(null),i=ne(!1),o=e.prefixCls,a=e.open,s=e.mode,l=e.showSearch,c=e.tokenWithEnter,u=e.disabled,d=e.prefix,f=e.autoClearSearchValue,h=e.onSearch,m=e.onSearchSubmit,p=e.onToggleOpen,g=e.onInputKeyDown,O=e.onInputBlur,v=e.domRef;Jt(n,function(){return{focus:function(B){r.current.focus(B)},blur:function(){r.current.blur()}}});var y=v2(0),S=le(y,2),x=S[0],$=S[1],C=function(B){var F=B.which,H=r.current instanceof HTMLTextAreaElement;!H&&a&&(F===ze.UP||F===ze.DOWN)&&B.preventDefault(),g&&g(B),F===ze.ENTER&&s==="tags"&&!i.current&&!a&&(m==null||m(B.target.value)),!(H&&!a&&~[ze.UP,ze.DOWN,ze.LEFT,ze.RIGHT].indexOf(F))&&e3(F)&&p(!0)},P=function(){$(!0)},w=ne(null),_=function(B){h(B,!0,i.current)!==!1&&p(!0)},R=function(){i.current=!0},I=function(B){i.current=!1,s!=="combobox"&&_(B.target.value)},T=function(B){var F=B.target.value;if(c&&w.current&&/[\r\n]/.test(w.current)){var H=w.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");F=F.replace(H,w.current)}w.current=null,_(F)},M=function(B){var F=B.clipboardData,H=F==null?void 0:F.getData("text");w.current=H||""},Q=function(B){var F=B.target;if(F!==r.current){var H=document.body.style.msTouchAction!==void 0;H?setTimeout(function(){r.current.focus()}):r.current.focus()}},E=function(B){var F=x();B.target!==r.current&&!F&&!(s==="combobox"&&u)&&B.preventDefault(),(s!=="combobox"&&(!l||!F)||!a)&&(a&&f!==!1&&h("",!0,!1),p())},k={inputRef:r,onInputKeyDown:C,onInputMouseDown:P,onInputChange:T,onInputPaste:M,onInputCompositionStart:R,onInputCompositionEnd:I,onInputBlur:O},z=s==="multiple"||s==="tags"?b(S3,xe({},e,k)):b(x3,xe({},e,k));return b("div",{ref:v,className:"".concat(o,"-selector"),onClick:Q,onMouseDown:E},d&&b("div",{className:"".concat(o,"-prefix")},d),z)},C3=Se($3);function w3(t){var e=t.prefixCls,n=t.align,r=t.arrow,i=t.arrowPos,o=r||{},a=o.className,s=o.content,l=i.x,c=l===void 0?0:l,u=i.y,d=u===void 0?0:u,f=ne();if(!n||!n.points)return null;var h={position:"absolute"};if(n.autoArrow!==!1){var m=n.points[0],p=n.points[1],g=m[0],O=m[1],v=p[0],y=p[1];g===v||!["t","b"].includes(g)?h.top=d:g==="t"?h.top=0:h.bottom=0,O===y||!["l","r"].includes(O)?h.left=c:O==="l"?h.left=0:h.right=0}return b("div",{ref:f,className:U("".concat(e,"-arrow"),a),style:h},s)}function P3(t){var e=t.prefixCls,n=t.open,r=t.zIndex,i=t.mask,o=t.motion;return i?b(vi,xe({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return b("div",{style:{zIndex:r},className:U("".concat(e,"-mask"),s)})}):null}var _3=Ma(function(t){var e=t.children;return e},function(t,e){return e.cache}),T3=Se(function(t,e){var n=t.popup,r=t.className,i=t.prefixCls,o=t.style,a=t.target,s=t.onVisibleChanged,l=t.open,c=t.keepDom,u=t.fresh,d=t.onClick,f=t.mask,h=t.arrow,m=t.arrowPos,p=t.align,g=t.motion,O=t.maskMotion,v=t.forceRender,y=t.getPopupContainer,S=t.autoDestroy,x=t.portal,$=t.zIndex,C=t.onMouseEnter,P=t.onMouseLeave,w=t.onPointerEnter,_=t.onPointerDownCapture,R=t.ready,I=t.offsetX,T=t.offsetY,M=t.offsetR,Q=t.offsetB,E=t.onAlign,k=t.onPrepare,z=t.stretch,L=t.targetWidth,B=t.targetHeight,F=typeof n=="function"?n():n,H=l||c,X=(y==null?void 0:y.length)>0,q=te(!y||!X),N=le(q,2),j=N[0],oe=N[1];if(Lt(function(){!j&&X&&a&&oe(!0)},[j,X,a]),!j)return null;var ee="auto",se={left:"-1000vw",top:"-1000vh",right:ee,bottom:ee};if(R||!l){var fe,re=p.points,J=p.dynamicInset||((fe=p._experimental)===null||fe===void 0?void 0:fe.dynamicInset),ue=J&&re[0][1]==="r",de=J&&re[0][0]==="b";ue?(se.right=M,se.left=ee):(se.left=I,se.right=ee),de?(se.bottom=Q,se.top=ee):(se.top=T,se.bottom=ee)}var D={};return z&&(z.includes("height")&&B?D.height=B:z.includes("minHeight")&&B&&(D.minHeight=B),z.includes("width")&&L?D.width=L:z.includes("minWidth")&&L&&(D.minWidth=L)),l||(D.pointerEvents="none"),b(x,{open:v||H,getContainer:y&&function(){return y(a)},autoDestroy:S},b(P3,{prefixCls:i,open:l,zIndex:$,mask:f,motion:O}),b(Jr,{onResize:E,disabled:!l},function(Y){return b(vi,xe({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:v,leavedClassName:"".concat(i,"-hidden")},g,{onAppearPrepare:k,onEnterPrepare:k,visible:l,onVisibleChanged:function(G){var ce;g==null||(ce=g.onVisibleChanged)===null||ce===void 0||ce.call(g,G),s(G)}}),function(me,G){var ce=me.className,ae=me.style,pe=U(i,ce,r);return b("div",{ref:vr(Y,e,G),className:pe,style:Z(Z(Z(Z({"--arrow-x":"".concat(m.x||0,"px"),"--arrow-y":"".concat(m.y||0,"px")},se),D),ae),{},{boxSizing:"border-box",zIndex:$},o),onMouseEnter:C,onMouseLeave:P,onPointerEnter:w,onClick:d,onPointerDownCapture:_},h&&b(w3,{prefixCls:i,arrow:h,arrowPos:m,align:p}),b(_3,{cache:!l&&!u},F))})}))}),R3=Se(function(t,e){var n=t.children,r=t.getTriggerDOMNode,i=bo(n),o=Ut(function(s){Iv(e,r?r(s):s)},[r]),a=Oo(o,Xo(n));return i?Un(n,{ref:a}):n}),Ay=Tt(null);function Qy(t){return t?Array.isArray(t)?t:[t]:[]}function I3(t,e,n,r){return ve(function(){var i=Qy(n??e),o=Qy(r??e),a=new Set(i),s=new Set(o);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[t,e,n,r])}function M3(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function E3(t,e,n,r){for(var i=n.points,o=Object.keys(t),a=0;a1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function tl(t){return Ul(parseFloat(t),0)}function zy(t,e){var n=Z({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=Ec(r).getComputedStyle(r),o=i.overflow,a=i.overflowClipMargin,s=i.borderTopWidth,l=i.borderBottomWidth,c=i.borderLeftWidth,u=i.borderRightWidth,d=r.getBoundingClientRect(),f=r.offsetHeight,h=r.clientHeight,m=r.offsetWidth,p=r.clientWidth,g=tl(s),O=tl(l),v=tl(c),y=tl(u),S=Ul(Math.round(d.width/m*1e3)/1e3),x=Ul(Math.round(d.height/f*1e3)/1e3),$=(m-p-v-y)*S,C=(f-h-g-O)*x,P=g*x,w=O*x,_=v*S,R=y*S,I=0,T=0;if(o==="clip"){var M=tl(a);I=M*S,T=M*x}var Q=d.x+_-I,E=d.y+P-T,k=Q+d.width+2*I-_-R-$,z=E+d.height+2*T-P-w-C;n.left=Math.max(n.left,Q),n.top=Math.max(n.top,E),n.right=Math.min(n.right,k),n.bottom=Math.min(n.bottom,z)}}),n}function jy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),r=n.match(/^(.*)\%$/);return r?t*(parseFloat(r[1])/100):parseFloat(n)}function Ly(t,e){var n=e||[],r=le(n,2),i=r[0],o=r[1];return[jy(t.width,i),jy(t.height,o)]}function Dy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function Ba(t,e){var n=e[0],r=e[1],i,o;return n==="t"?o=t.y:n==="b"?o=t.y+t.height:o=t.y+t.height/2,r==="l"?i=t.x:r==="r"?i=t.x+t.width:i=t.x+t.width/2,{x:i,y:o}}function $o(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(r,i){return i===e?n[r]||"c":r}).join("")}function k3(t,e,n,r,i,o,a){var s=te({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),l=le(s,2),c=l[0],u=l[1],d=ne(0),f=ve(function(){return e?Up(e):[]},[e]),h=ne({}),m=function(){h.current={}};t||m();var p=bn(function(){if(e&&n&&t){let kr=function(Qa,xo){var Na=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Me,Uc=H.x+Qa,Yc=H.y+xo,$h=Uc+de,at=Yc+ue,Ot=Math.max(Uc,Na.left),$n=Math.max(Yc,Na.top),In=Math.min($h,Na.right),Cn=Math.min(at,Na.bottom);return Math.max(0,(In-Ot)*(Cn-$n))},Go=function(){sn=H.y+ct,mn=sn+ue,Tn=H.x+ke,Bt=Tn+de};var kO=kr,Gc=Go,v,y,S,x,$=e,C=$.ownerDocument,P=Ec($),w=P.getComputedStyle($),_=w.position,R=$.style.left,I=$.style.top,T=$.style.right,M=$.style.bottom,Q=$.style.overflow,E=Z(Z({},i[r]),o),k=C.createElement("div");(v=$.parentElement)===null||v===void 0||v.appendChild(k),k.style.left="".concat($.offsetLeft,"px"),k.style.top="".concat($.offsetTop,"px"),k.style.position=_,k.style.height="".concat($.offsetHeight,"px"),k.style.width="".concat($.offsetWidth,"px"),$.style.left="0",$.style.top="0",$.style.right="auto",$.style.bottom="auto",$.style.overflow="hidden";var z;if(Array.isArray(n))z={x:n[0],y:n[1],width:0,height:0};else{var L,B,F=n.getBoundingClientRect();F.x=(L=F.x)!==null&&L!==void 0?L:F.left,F.y=(B=F.y)!==null&&B!==void 0?B:F.top,z={x:F.x,y:F.y,width:F.width,height:F.height}}var H=$.getBoundingClientRect(),X=P.getComputedStyle($),q=X.height,N=X.width;H.x=(y=H.x)!==null&&y!==void 0?y:H.left,H.y=(S=H.y)!==null&&S!==void 0?S:H.top;var j=C.documentElement,oe=j.clientWidth,ee=j.clientHeight,se=j.scrollWidth,fe=j.scrollHeight,re=j.scrollTop,J=j.scrollLeft,ue=H.height,de=H.width,D=z.height,Y=z.width,me={left:0,top:0,right:oe,bottom:ee},G={left:-J,top:-re,right:se-J,bottom:fe-re},ce=E.htmlRegion,ae="visible",pe="visibleFirst";ce!=="scroll"&&ce!==pe&&(ce=ae);var Oe=ce===pe,be=zy(G,f),ge=zy(me,f),Me=ce===ae?ge:be,Ie=Oe?ge:Me;$.style.left="auto",$.style.top="auto",$.style.right="0",$.style.bottom="0";var He=$.getBoundingClientRect();$.style.left=R,$.style.top=I,$.style.right=T,$.style.bottom=M,$.style.overflow=Q,(x=$.parentElement)===null||x===void 0||x.removeChild(k);var Ae=Ul(Math.round(de/parseFloat(N)*1e3)/1e3),Ee=Ul(Math.round(ue/parseFloat(q)*1e3)/1e3);if(Ae===0||Ee===0||Dl(n)&&!jf(n))return;var st=E.offset,Ye=E.targetOffset,rt=Ly(H,st),Be=le(rt,2),Re=Be[0],Xe=Be[1],_e=Ly(z,Ye),Pe=le(_e,2),ft=Pe[0],yt=Pe[1];z.x-=ft,z.y-=yt;var xn=E.points||[],Xt=le(xn,2),gn=Xt[0],fn=Xt[1],Dt=Dy(fn),Ct=Dy(gn),ht=Ba(z,Dt),et=Ba(H,Ct),it=Z({},E),ke=ht.x-et.x+Re,ct=ht.y-et.y+Xe,Ke=kr(ke,ct),we=kr(ke,ct,ge),We=Ba(z,["t","l"]),Qe=Ba(H,["t","l"]),Ve=Ba(z,["b","r"]),ut=Ba(H,["b","r"]),tt=E.overflow||{},St=tt.adjustX,Pt=tt.adjustY,vt=tt.shiftX,_t=tt.shiftY,hn=function(xo){return typeof xo=="boolean"?xo:xo>=0},sn,mn,Tn,Bt;Go();var Gt=hn(Pt),Te=Ct[0]===Dt[0];if(Gt&&Ct[0]==="t"&&(mn>Ie.bottom||h.current.bt)){var Le=ct;Te?Le-=ue-D:Le=We.y-ut.y-Xe;var mt=kr(ke,Le),xt=kr(ke,Le,ge);mt>Ke||mt===Ke&&(!Oe||xt>=we)?(h.current.bt=!0,ct=Le,Xe=-Xe,it.points=[$o(Ct,0),$o(Dt,0)]):h.current.bt=!1}if(Gt&&Ct[0]==="b"&&(snKe||Fe===Ke&&(!Oe||pt>=we)?(h.current.tb=!0,ct=Ue,Xe=-Xe,it.points=[$o(Ct,0),$o(Dt,0)]):h.current.tb=!1}var Et=hn(St),Ne=Ct[1]===Dt[1];if(Et&&Ct[1]==="l"&&(Bt>Ie.right||h.current.rl)){var ot=ke;Ne?ot-=de-Y:ot=We.x-ut.x-Re;var bt=kr(ot,ct),Rn=kr(ot,ct,ge);bt>Ke||bt===Ke&&(!Oe||Rn>=we)?(h.current.rl=!0,ke=ot,Re=-Re,it.points=[$o(Ct,1),$o(Dt,1)]):h.current.rl=!1}if(Et&&Ct[1]==="r"&&(TnKe||Rr===Ke&&(!Oe||Ir>=we)?(h.current.lr=!0,ke=Bn,Re=-Re,it.points=[$o(Ct,1),$o(Dt,1)]):h.current.lr=!1}Go();var Kn=vt===!0?0:vt;typeof Kn=="number"&&(Tnge.right&&(ke-=Bt-ge.right-Re,z.x>ge.right-Kn&&(ke+=z.x-ge.right+Kn)));var Mr=_t===!0?0:_t;typeof Mr=="number"&&(snge.bottom&&(ct-=mn-ge.bottom-Xe,z.y>ge.bottom-Mr&&(ct+=z.y-ge.bottom+Mr)));var Er=H.x+ke,ti=Er+de,Ei=H.y+ct,Kt=Ei+ue,Je=z.x,Ze=Je+Y,Wt=z.y,Zt=Wt+D,nn=Math.max(Er,Je),vn=Math.min(ti,Ze),Sr=(nn+vn)/2,Jn=Sr-Er,xr=Math.max(Ei,Wt),cr=Math.min(Kt,Zt),$r=(xr+cr)/2,ki=$r-Ei;a==null||a(e,it);var Cr=He.right-H.x-(ke+H.width),Us=He.bottom-H.y-(ct+H.height);Ae===1&&(ke=Math.round(ke),Cr=Math.round(Cr)),Ee===1&&(ct=Math.round(ct),Us=Math.round(Us));var xh={ready:!0,offsetX:ke/Ae,offsetY:ct/Ee,offsetR:Cr/Ae,offsetB:Us/Ee,arrowX:Jn/Ae,arrowY:ki/Ee,scaleX:Ae,scaleY:Ee,align:it};u(xh)}}),g=function(){d.current+=1;var y=d.current;Promise.resolve().then(function(){d.current===y&&p()})},O=function(){u(function(y){return Z(Z({},y),{},{ready:!1})})};return Lt(O,[r]),Lt(function(){t||O()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,g]}function A3(t,e,n,r,i){Lt(function(){if(t&&e&&n){let f=function(){r(),i()};var d=f,o=e,a=n,s=Up(o),l=Up(a),c=Ec(a),u=new Set([c].concat(Ce(s),Ce(l)));return u.forEach(function(h){h.addEventListener("scroll",f,{passive:!0})}),c.addEventListener("resize",f,{passive:!0}),r(),function(){u.forEach(function(h){h.removeEventListener("scroll",f),c.removeEventListener("resize",f)})}}},[t,e,n])}function Q3(t,e,n,r,i,o,a,s){var l=ne(t);l.current=t;var c=ne(!1);ye(function(){if(e&&r&&(!i||o)){var d=function(){c.current=!1},f=function(g){var O;l.current&&!a(((O=g.composedPath)===null||O===void 0||(O=O.call(g))===null||O===void 0?void 0:O[0])||g.target)&&!c.current&&s(!1)},h=Ec(r);h.addEventListener("pointerdown",d,!0),h.addEventListener("mousedown",f,!0),h.addEventListener("contextmenu",f,!0);var m=Pd(n);return m&&(m.addEventListener("mousedown",f,!0),m.addEventListener("contextmenu",f,!0)),function(){h.removeEventListener("pointerdown",d,!0),h.removeEventListener("mousedown",f,!0),h.removeEventListener("contextmenu",f,!0),m&&(m.removeEventListener("mousedown",f,!0),m.removeEventListener("contextmenu",f,!0))}}},[e,n,r,i,o]);function u(){c.current=!0}return u}var N3=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function z3(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s0,e=Se(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=n.children,s=n.action,l=s===void 0?"hover":s,c=n.showAction,u=n.hideAction,d=n.popupVisible,f=n.defaultPopupVisible,h=n.onPopupVisibleChange,m=n.afterPopupVisibleChange,p=n.mouseEnterDelay,g=n.mouseLeaveDelay,O=g===void 0?.1:g,v=n.focusDelay,y=n.blurDelay,S=n.mask,x=n.maskClosable,$=x===void 0?!0:x,C=n.getPopupContainer,P=n.forceRender,w=n.autoDestroy,_=n.destroyPopupOnHide,R=n.popup,I=n.popupClassName,T=n.popupStyle,M=n.popupPlacement,Q=n.builtinPlacements,E=Q===void 0?{}:Q,k=n.popupAlign,z=n.zIndex,L=n.stretch,B=n.getPopupClassNameFromAlign,F=n.fresh,H=n.alignPoint,X=n.onPopupClick,q=n.onPopupAlign,N=n.arrow,j=n.popupMotion,oe=n.maskMotion,ee=n.popupTransitionName,se=n.popupAnimation,fe=n.maskTransitionName,re=n.maskAnimation,J=n.className,ue=n.getTriggerDOMNode,de=gt(n,N3),D=w||_||!1,Y=te(!1),me=le(Y,2),G=me[0],ce=me[1];Lt(function(){ce(m0())},[]);var ae=ne({}),pe=he(Ay),Oe=ve(function(){return{registerSubPopup:function(Ot,$n){ae.current[Ot]=$n,pe==null||pe.registerSubPopup(Ot,$n)}}},[pe]),be=l0(),ge=te(null),Me=le(ge,2),Ie=Me[0],He=Me[1],Ae=ne(null),Ee=bn(function(at){Ae.current=at,Dl(at)&&Ie!==at&&He(at),pe==null||pe.registerSubPopup(be,at)}),st=te(null),Ye=le(st,2),rt=Ye[0],Be=Ye[1],Re=ne(null),Xe=bn(function(at){Dl(at)&&rt!==at&&(Be(at),Re.current=at)}),_e=wi.only(a),Pe=(_e==null?void 0:_e.props)||{},ft={},yt=bn(function(at){var Ot,$n,In=rt;return(In==null?void 0:In.contains(at))||((Ot=Pd(In))===null||Ot===void 0?void 0:Ot.host)===at||at===In||(Ie==null?void 0:Ie.contains(at))||(($n=Pd(Ie))===null||$n===void 0?void 0:$n.host)===at||at===Ie||Object.values(ae.current).some(function(Cn){return(Cn==null?void 0:Cn.contains(at))||at===Cn})}),xn=Ny(o,j,se,ee),Xt=Ny(o,oe,re,fe),gn=te(f||!1),fn=le(gn,2),Dt=fn[0],Ct=fn[1],ht=d??Dt,et=bn(function(at){d===void 0&&Ct(at)});Lt(function(){Ct(d||!1)},[d]);var it=ne(ht);it.current=ht;var ke=ne([]);ke.current=[];var ct=bn(function(at){var Ot;et(at),((Ot=ke.current[ke.current.length-1])!==null&&Ot!==void 0?Ot:ht)!==at&&(ke.current.push(at),h==null||h(at))}),Ke=ne(),we=function(){clearTimeout(Ke.current)},We=function(Ot){var $n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;we(),$n===0?ct(Ot):Ke.current=setTimeout(function(){ct(Ot)},$n*1e3)};ye(function(){return we},[]);var Qe=te(!1),Ve=le(Qe,2),ut=Ve[0],tt=Ve[1];Lt(function(at){(!at||ht)&&tt(!0)},[ht]);var St=te(null),Pt=le(St,2),vt=Pt[0],_t=Pt[1],hn=te(null),sn=le(hn,2),mn=sn[0],Tn=sn[1],Bt=function(Ot){Tn([Ot.clientX,Ot.clientY])},Gt=k3(ht,Ie,H&&mn!==null?mn:rt,M,E,k,q),Te=le(Gt,11),Le=Te[0],mt=Te[1],xt=Te[2],Ue=Te[3],Fe=Te[4],pt=Te[5],Et=Te[6],Ne=Te[7],ot=Te[8],bt=Te[9],Rn=Te[10],Bn=I3(G,l,c,u),Rr=le(Bn,2),Ir=Rr[0],Kn=Rr[1],Mr=Ir.has("click"),Er=Kn.has("click")||Kn.has("contextMenu"),ti=bn(function(){ut||Rn()}),Ei=function(){it.current&&H&&Er&&We(!1)};A3(ht,rt,Ie,ti,Ei),Lt(function(){ti()},[mn,M]),Lt(function(){ht&&!(E!=null&&E[M])&&ti()},[JSON.stringify(k)]);var Kt=ve(function(){var at=E3(E,o,bt,H);return U(at,B==null?void 0:B(bt))},[bt,B,E,o,H]);Jt(r,function(){return{nativeElement:Re.current,popupElement:Ae.current,forceAlign:ti}});var Je=te(0),Ze=le(Je,2),Wt=Ze[0],Zt=Ze[1],nn=te(0),vn=le(nn,2),Sr=vn[0],Jn=vn[1],xr=function(){if(L&&rt){var Ot=rt.getBoundingClientRect();Zt(Ot.width),Jn(Ot.height)}},cr=function(){xr(),ti()},$r=function(Ot){tt(!1),Rn(),m==null||m(Ot)},ki=function(){return new Promise(function(Ot){xr(),_t(function(){return Ot})})};Lt(function(){vt&&(Rn(),vt(),_t(null))},[vt]);function Cr(at,Ot,$n,In){ft[at]=function(Cn){var Kc;In==null||In(Cn),We(Ot,$n);for(var Ch=arguments.length,AO=new Array(Ch>1?Ch-1:0),Jc=1;Jc1?$n-1:0),Cn=1;Cn<$n;Cn++)In[Cn-1]=arguments[Cn];(Ot=Pe.onClick)===null||Ot===void 0||Ot.call.apply(Ot,[Pe,at].concat(In))});var Us=Q3(ht,Er,rt,Ie,S,$,yt,We),xh=Ir.has("hover"),kO=Kn.has("hover"),Gc,kr;xh&&(Cr("onMouseEnter",!0,p,function(at){Bt(at)}),Cr("onPointerEnter",!0,p,function(at){Bt(at)}),Gc=function(Ot){(ht||ut)&&Ie!==null&&Ie!==void 0&&Ie.contains(Ot.target)&&We(!0,p)},H&&(ft.onMouseMove=function(at){var Ot;(Ot=Pe.onMouseMove)===null||Ot===void 0||Ot.call(Pe,at)})),kO&&(Cr("onMouseLeave",!1,O),Cr("onPointerLeave",!1,O),kr=function(){We(!1,O)}),Ir.has("focus")&&Cr("onFocus",!0,v),Kn.has("focus")&&Cr("onBlur",!1,y),Ir.has("contextMenu")&&(ft.onContextMenu=function(at){var Ot;it.current&&Kn.has("contextMenu")?We(!1):(Bt(at),We(!0)),at.preventDefault();for(var $n=arguments.length,In=new Array($n>1?$n-1:0),Cn=1;Cn<$n;Cn++)In[Cn-1]=arguments[Cn];(Ot=Pe.onContextMenu)===null||Ot===void 0||Ot.call.apply(Ot,[Pe,at].concat(In))}),J&&(ft.className=U(Pe.className,J));var Go=ne(!1);Go.current||(Go.current=P||ht||ut);var Qa=Z(Z({},Pe),ft),xo={},Na=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Na.forEach(function(at){de[at]&&(xo[at]=function(){for(var Ot,$n=arguments.length,In=new Array($n),Cn=0;Cn<$n;Cn++)In[Cn]=arguments[Cn];(Ot=Qa[at])===null||Ot===void 0||Ot.call.apply(Ot,[Qa].concat(In)),de[at].apply(de,In)})});var Uc=Un(_e,Z(Z({},Qa),xo)),Yc={x:pt,y:Et},$h=N?Z({},N!==!0?N:{}):null;return b(Qt,null,b(Jr,{disabled:!ht,ref:Xe,onResize:cr},b(R3,{getTriggerDOMNode:ue},Uc)),Go.current&&b(Ay.Provider,{value:Oe},b(T3,{portal:t,ref:Ee,prefixCls:o,popup:R,className:U(I,Kt),style:T,target:rt,onMouseEnter:Gc,onMouseLeave:kr,onPointerEnter:Gc,zIndex:z,open:ht,keepDom:ut,fresh:F,onClick:X,onPointerDownCapture:Us,mask:S,motion:xn,maskMotion:Xt,onVisibleChanged:$r,onPrepare:ki,forceRender:P,autoDestroy:D,getPopupContainer:C,align:bt,arrow:$h,arrowPos:Yc,ready:Le,offsetX:mt,offsetY:xt,offsetR:Ue,offsetB:Fe,onAlign:ti,stretch:L,targetWidth:Wt/Ne,targetHeight:Sr/ot})))});return e}const Uf=z3(s0);var j3=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],L3=function(e){var n=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},D3=function(e,n){var r=e.prefixCls;e.disabled;var i=e.visible,o=e.children,a=e.popupElement,s=e.animation,l=e.transitionName,c=e.dropdownStyle,u=e.dropdownClassName,d=e.direction,f=d===void 0?"ltr":d,h=e.placement,m=e.builtinPlacements,p=e.dropdownMatchSelectWidth,g=e.dropdownRender,O=e.dropdownAlign,v=e.getPopupContainer,y=e.empty,S=e.getTriggerDOMNode,x=e.onPopupVisibleChange,$=e.onPopupMouseEnter,C=gt(e,j3),P="".concat(r,"-dropdown"),w=a;g&&(w=g(a));var _=ve(function(){return m||L3(p)},[m,p]),R=s?"".concat(P,"-").concat(s):l,I=typeof p=="number",T=ve(function(){return I?null:p===!1?"minWidth":"width"},[p,I]),M=c;I&&(M=Z(Z({},M),{},{width:p}));var Q=ne(null);return Jt(n,function(){return{getPopupElement:function(){var k;return(k=Q.current)===null||k===void 0?void 0:k.popupElement}}}),b(Uf,xe({},C,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:h||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:_,prefixCls:P,popupTransitionName:R,popup:b("div",{onMouseEnter:$},w),ref:Q,stretch:T,popupAlign:O,popupVisible:i,getPopupContainer:v,popupClassName:U(u,W({},"".concat(P,"-empty"),y)),popupStyle:M,getTriggerDOMNode:S,onPopupVisibleChange:x}),o)},B3=Se(D3);function By(t,e){var n=t.key,r;return"value"in t&&(r=t.value),n??(r!==void 0?r:"rc-index-key-".concat(e))}function Yp(t){return typeof t<"u"&&!Number.isNaN(t)}function C2(t,e){var n=t||{},r=n.label,i=n.value,o=n.options,a=n.groupLabel,s=r||(e?"children":"label");return{label:s,value:i||"value",options:o||"options",groupLabel:a||s}}function W3(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.fieldNames,r=e.childrenAsData,i=[],o=C2(n,!1),a=o.label,s=o.value,l=o.options,c=o.groupLabel;function u(d,f){Array.isArray(d)&&d.forEach(function(h){if(f||!(l in h)){var m=h[s];i.push({key:By(h,i.length),groupOption:f,data:h,label:h[a],value:m})}else{var p=h[c];p===void 0&&r&&(p=h.label),i.push({key:By(h,i.length),group:!0,data:h,label:p}),u(h[l],!0)}})}return u(t,!1),i}function Kp(t){var e=Z({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return or(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var H3=function(e,n,r){if(!n||!n.length)return null;var i=!1,o=function s(l,c){var u=PC(c),d=u[0],f=u.slice(1);if(!d)return[l];var h=l.split(d);return i=i||h.length>1,h.reduce(function(m,p){return[].concat(Ce(m),Ce(s(p,f)))},[]).filter(Boolean)},a=o(e,n);return i?typeof r<"u"?a.slice(0,r):a:null},p0=Tt(null);function V3(t){var e=t.visible,n=t.values;if(!e)return null;var r=50;return b("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(i){var o=i.label,a=i.value;return["number","string"].includes(nt(o))?o:a}).join(", ")),n.length>r?", ...":null)}var F3=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],X3=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Jp=function(e){return e==="tags"||e==="multiple"},Z3=Se(function(t,e){var n,r=t.id,i=t.prefixCls,o=t.className,a=t.showSearch,s=t.tagRender,l=t.direction,c=t.omitDomProps,u=t.displayValues,d=t.onDisplayValuesChange,f=t.emptyOptions,h=t.notFoundContent,m=h===void 0?"Not Found":h,p=t.onClear,g=t.mode,O=t.disabled,v=t.loading,y=t.getInputElement,S=t.getRawInputElement,x=t.open,$=t.defaultOpen,C=t.onDropdownVisibleChange,P=t.activeValue,w=t.onActiveValueChange,_=t.activeDescendantId,R=t.searchValue,I=t.autoClearSearchValue,T=t.onSearch,M=t.onSearchSplit,Q=t.tokenSeparators,E=t.allowClear,k=t.prefix,z=t.suffixIcon,L=t.clearIcon,B=t.OptionList,F=t.animation,H=t.transitionName,X=t.dropdownStyle,q=t.dropdownClassName,N=t.dropdownMatchSelectWidth,j=t.dropdownRender,oe=t.dropdownAlign,ee=t.placement,se=t.builtinPlacements,fe=t.getPopupContainer,re=t.showAction,J=re===void 0?[]:re,ue=t.onFocus,de=t.onBlur,D=t.onKeyUp,Y=t.onKeyDown,me=t.onMouseDown,G=gt(t,F3),ce=Jp(g),ae=(a!==void 0?a:ce)||g==="combobox",pe=Z({},G);X3.forEach(function(Je){delete pe[Je]}),c==null||c.forEach(function(Je){delete pe[Je]});var Oe=te(!1),be=le(Oe,2),ge=be[0],Me=be[1];ye(function(){Me(m0())},[]);var Ie=ne(null),He=ne(null),Ae=ne(null),Ee=ne(null),st=ne(null),Ye=ne(!1),rt=Kz(),Be=le(rt,3),Re=Be[0],Xe=Be[1],_e=Be[2];Jt(e,function(){var Je,Ze;return{focus:(Je=Ee.current)===null||Je===void 0?void 0:Je.focus,blur:(Ze=Ee.current)===null||Ze===void 0?void 0:Ze.blur,scrollTo:function(Zt){var nn;return(nn=st.current)===null||nn===void 0?void 0:nn.scrollTo(Zt)},nativeElement:Ie.current||He.current}});var Pe=ve(function(){var Je;if(g!=="combobox")return R;var Ze=(Je=u[0])===null||Je===void 0?void 0:Je.value;return typeof Ze=="string"||typeof Ze=="number"?String(Ze):""},[R,g,u]),ft=g==="combobox"&&typeof y=="function"&&y()||null,yt=typeof S=="function"&&S(),xn=Oo(He,yt==null||(n=yt.props)===null||n===void 0?void 0:n.ref),Xt=te(!1),gn=le(Xt,2),fn=gn[0],Dt=gn[1];Lt(function(){Dt(!0)},[]);var Ct=Pn(!1,{defaultValue:$,value:x}),ht=le(Ct,2),et=ht[0],it=ht[1],ke=fn?et:!1,ct=!m&&f;(O||ct&&ke&&g==="combobox")&&(ke=!1);var Ke=ct?!1:ke,we=Ut(function(Je){var Ze=Je!==void 0?Je:!ke;O||(it(Ze),ke!==Ze&&(C==null||C(Ze)))},[O,ke,it,C]),We=ve(function(){return(Q||[]).some(function(Je){return[` `,`\r -`].includes(qe)})},[Q]),Ae=fe(a0)||{},We=Ae.maxCount,st=Ae.rawValues,tt=function(Fe,Lt,Wt){if(!(Y&&Dm(We)&&(st==null?void 0:st.size)>=We)){var en=!0,fn=Fe;P==null||P(null);var gr=Tz(Fe,Q,Dm(We)?We-st.size:void 0),Gn=Wt?null:gr;return g!=="combobox"&&Gn&&(fn="",I==null||I(Gn),Ee(!1),en=!1),k&&Pe!==fn&&k(fn,{source:Lt?"typing":"effect"}),en}},Ct=function(Fe){!Fe||!Fe.trim()||k(Fe,{source:"submit"})};be(function(){!Re&&!Y&&g!=="combobox"&&tt("",!1,!1)},[Re]),be(function(){et&&v&&nt(!1),v&&!Ye.current&&Xe(!1)},[v]);var $t=t2(),wt=ae($t,2),Mt=wt[0],vn=wt[1],un=U(!1),Cn=function(Fe){var Lt=Mt(),Wt=Fe.key,en=Wt==="Enter";if(en&&(g!=="combobox"&&Fe.preventDefault(),Re||Ee(!0)),vn(!!Pe),Wt==="Backspace"&&!Lt&&Y&&!Pe&&u.length){for(var fn=$e(u),gr=null,Gn=fn.length-1;Gn>=0;Gn-=1){var vr=fn[Gn];if(!vr.disabled){fn.splice(Gn,1),gr=vr;break}}gr&&d(fn,{type:"remove",values:[gr]})}for(var ir=arguments.length,Or=new Array(ir>1?ir-1:0),Ii=1;Ii1?Lt-1:0),en=1;en1?gr-1:0),vr=1;vr"u"?"undefined":Je(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const u2=function(t,e,n,r){var i=U(!1),o=U(null);function a(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var s=U({top:t,bottom:e,left:n,right:r});return s.current.top=t,s.current.bottom=e,s.current.left=n,s.current.right=r,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?c<0&&s.current.left||c>0&&s.current.right:c<0&&s.current.top||c>0&&s.current.bottom;return u&&d?(clearTimeout(o.current),i.current=!1):(!d||i.current)&&a(),!i.current&&d}};function zz(t,e,n,r,i,o,a){var s=U(0),l=U(null),c=U(null),u=U(!1),d=u2(e,n,r,i);function f(O,S){if(Xt.cancel(l.current),!d(!1,S)){var x=O;if(!x._virtualHandled)x._virtualHandled=!0;else return;s.current+=S,c.current=S,Iy||x.preventDefault(),l.current=Xt(function(){var b=u.current?10:1;a(s.current*b,!1),s.current=0})}}function h(O,S){a(S,!0),Iy||O.preventDefault()}var p=U(null),m=U(null);function g(O){if(t){Xt.cancel(m.current),m.current=Xt(function(){p.current=null},2);var S=O.deltaX,x=O.deltaY,b=O.shiftKey,C=S,$=x;(p.current==="sx"||!p.current&&b&&x&&!S)&&(C=x,$=0,p.current="sx");var w=Math.abs(C),P=Math.abs($);p.current===null&&(p.current=o&&w>P?"x":"y"),p.current==="y"?f(O,$):h(O,C)}}function v(O){t&&(u.current=O.detail===c.current)}return[g,v]}function Lz(t,e,n,r){var i=ge(function(){return[new Map,[]]},[t,n.id,r]),o=ae(i,2),a=o[0],s=o[1],l=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,f=a.get(u),h=a.get(d);if(f===void 0||h===void 0)for(var p=t.length,m=s.length;m0&&arguments[0]!==void 0?arguments[0]:!1;u();var p=function(){var v=!1;s.current.forEach(function(O,S){if(O&&O.offsetParent){var x=O.offsetHeight,b=getComputedStyle(O),C=b.marginTop,$=b.marginBottom,w=My(C),P=My($),_=x+w+P;l.current.get(S)!==_&&(l.current.set(S,_),v=!0)}}),v&&a(function(O){return O+1})};if(h)p();else{c.current+=1;var m=c.current;Promise.resolve().then(function(){m===c.current&&p()})}}function f(h,p){var m=t(h);s.current.get(m),p?(s.current.set(m,p),d()):s.current.delete(m)}return be(function(){return u},[]),[f,d,l.current,o]}var Ey=14/15;function Bz(t,e,n){var r=U(!1),i=U(0),o=U(0),a=U(null),s=U(null),l,c=function(h){if(r.current){var p=Math.ceil(h.touches[0].pageX),m=Math.ceil(h.touches[0].pageY),g=i.current-p,v=o.current-m,O=Math.abs(g)>Math.abs(v);O?i.current=p:o.current=m;var S=n(O,O?g:v,!1,h);S&&h.preventDefault(),clearInterval(s.current),S&&(s.current=setInterval(function(){O?g*=Ey:v*=Ey;var x=Math.floor(O?g:v);(!n(O,x,!0)||Math.abs(x)<=.1)&&clearInterval(s.current)},16))}},u=function(){r.current=!1,l()},d=function(h){l(),h.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(h.touches[0].pageX),o.current=Math.ceil(h.touches[0].pageY),a.current=h.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},Nt(function(){return t&&e.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=e.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[t])}function Ay(t){return Math.floor(Math.pow(t,.5))}function Fm(t,e){var n="touches"in t?t.touches[0]:t;return n[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}function Wz(t,e,n){be(function(){var r=e.current;if(t&&r){var i=!1,o,a,s=function(){Xt.cancel(o)},l=function f(){s(),o=Xt(function(){n(a),f()})},c=function(){i=!1,s()},u=function(h){if(!(h.target.draggable||h.button!==0)){var p=h;p._virtualHandled||(p._virtualHandled=!0,i=!0)}},d=function(h){if(i){var p=Fm(h,!1),m=r.getBoundingClientRect(),g=m.top,v=m.bottom;if(p<=g){var O=g-p;a=-Ay(O),l()}else if(p>=v){var S=p-v;a=Ay(S),l()}else s()}};return r.addEventListener("mousedown",u),r.ownerDocument.addEventListener("mouseup",c),r.ownerDocument.addEventListener("mousemove",d),r.ownerDocument.addEventListener("dragend",c),function(){r.removeEventListener("mousedown",u),r.ownerDocument.removeEventListener("mouseup",c),r.ownerDocument.removeEventListener("mousemove",d),r.ownerDocument.removeEventListener("dragend",c),s()}}},[t])}var Fz=10;function Vz(t,e,n,r,i,o,a,s){var l=U(),c=J(null),u=ae(c,2),d=u[0],f=u[1];return Nt(function(){if(d&&d.times=0;I-=1){var Q=i(e[I]),M=n.get(Q);if(M===void 0){O=!0;break}if(k-=M,k<=0)break}switch(b){case"top":x=$-g;break;case"bottom":x=w-v+g;break;default:{var E=t.current.scrollTop,N=E+v;$N&&(S="bottom")}}x!==null&&a(x),x!==d.lastTop&&(O=!0)}O&&f(W(W({},d),{},{times:d.times+1,targetAlign:S,lastTop:x}))}},[d,t.current]),function(h){if(h==null){s();return}if(Xt.cancel(l.current),typeof h=="number")a(h);else if(h&&Je(h)==="object"){var p,m=h.align;"index"in h?p=h.index:p=e.findIndex(function(O){return i(O)===h.key});var g=h.offset,v=g===void 0?0:g;f({times:0,index:p,offset:v,originAlign:m})}}}var Qy=Se(function(t,e){var n=t.prefixCls,r=t.rtl,i=t.scrollOffset,o=t.scrollRange,a=t.onStartMove,s=t.onStopMove,l=t.onScroll,c=t.horizontal,u=t.spinSize,d=t.containerSize,f=t.style,h=t.thumbStyle,p=t.showScrollBar,m=J(!1),g=ae(m,2),v=g[0],O=g[1],S=J(null),x=ae(S,2),b=x[0],C=x[1],$=J(null),w=ae($,2),P=w[0],_=w[1],T=!r,R=U(),k=U(),I=J(p),Q=ae(I,2),M=Q[0],E=Q[1],N=U(),z=function(){p===!0||p===!1||(clearTimeout(N.current),E(!0),N.current=setTimeout(function(){E(!1)},3e3))},L=o-d||0,F=d-u||0,H=ge(function(){if(i===0||L===0)return 0;var ie=i/L;return ie*F},[i,L,F]),V=function(ne){ne.stopPropagation(),ne.preventDefault()},X=U({top:H,dragging:v,pageY:b,startTop:P});X.current={top:H,dragging:v,pageY:b,startTop:P};var B=function(ne){O(!0),C(Fm(ne,c)),_(X.current.top),a(),ne.stopPropagation(),ne.preventDefault()};be(function(){var ie=function(j){j.preventDefault()},ne=R.current,ue=k.current;return ne.addEventListener("touchstart",ie,{passive:!1}),ue.addEventListener("touchstart",B,{passive:!1}),function(){ne.removeEventListener("touchstart",ie),ue.removeEventListener("touchstart",B)}},[]);var G=U();G.current=L;var se=U();se.current=F,be(function(){if(v){var ie,ne=function(j){var ee=X.current,he=ee.dragging,ve=ee.pageY,Y=ee.startTop;Xt.cancel(ie);var ce=R.current.getBoundingClientRect(),te=d/(c?ce.width:ce.height);if(he){var Oe=(Fm(j,c)-ve)*te,ye=Y;!T&&c?ye-=Oe:ye+=Oe;var pe=G.current,Qe=se.current,Me=Qe?ye/Qe:0,De=Math.ceil(Me*pe);De=Math.max(De,0),De=Math.min(De,pe),ie=Xt(function(){l(De,c)})}},ue=function(){O(!1),s()};return window.addEventListener("mousemove",ne,{passive:!0}),window.addEventListener("touchmove",ne,{passive:!0}),window.addEventListener("mouseup",ue,{passive:!0}),window.addEventListener("touchend",ue,{passive:!0}),function(){window.removeEventListener("mousemove",ne),window.removeEventListener("touchmove",ne),window.removeEventListener("mouseup",ue),window.removeEventListener("touchend",ue),Xt.cancel(ie)}}},[v]),be(function(){return z(),function(){clearTimeout(N.current)}},[i]),Yt(e,function(){return{delayHidden:z}});var re="".concat(n,"-scrollbar"),le={position:"absolute",visibility:M?null:"hidden"},me={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return c?(Object.assign(le,{height:8,left:0,right:0,bottom:0}),Object.assign(me,D({height:"100%",width:u},T?"left":"right",H))):(Object.assign(le,D({width:8,top:0,bottom:0},T?"right":"left",0)),Object.assign(me,{width:"100%",height:u,top:H})),y("div",{ref:R,className:Z(re,D(D(D({},"".concat(re,"-horizontal"),c),"".concat(re,"-vertical"),!c),"".concat(re,"-visible"),M)),style:W(W({},le),f),onMouseDown:V,onMouseMove:z},y("div",{ref:k,className:Z("".concat(re,"-thumb"),D({},"".concat(re,"-thumb-moving"),v)),style:W(W({},me),h),onMouseDown:B}))}),Hz=20;function Ny(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=t/e*t;return isNaN(n)&&(n=0),n=Math.max(n,Hz),Math.floor(n)}var Xz=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Zz=[],qz={overflowY:"auto",overflowAnchor:"none"};function Gz(t,e){var n=t.prefixCls,r=n===void 0?"rc-virtual-list":n,i=t.className,o=t.height,a=t.itemHeight,s=t.fullHeight,l=s===void 0?!0:s,c=t.style,u=t.data,d=t.children,f=t.itemKey,h=t.virtual,p=t.direction,m=t.scrollWidth,g=t.component,v=g===void 0?"div":g,O=t.onScroll,S=t.onVirtualScroll,x=t.onVisibleChange,b=t.innerProps,C=t.extraRender,$=t.styles,w=t.showScrollBar,P=w===void 0?"optional":w,_=ut(t,Xz),T=Ht(function(Te){return typeof f=="function"?f(Te):Te==null?void 0:Te[f]},[f]),R=Dz(T),k=ae(R,4),I=k[0],Q=k[1],M=k[2],E=k[3],N=!!(h!==!1&&o&&a),z=ge(function(){return Object.values(M.maps).reduce(function(Te,Le){return Te+Le},0)},[M.id,M.maps]),L=N&&u&&(Math.max(a*u.length,z)>o||!!m),F=p==="rtl",H=Z(r,D({},"".concat(r,"-rtl"),F),i),V=u||Zz,X=U(),B=U(),G=U(),se=J(0),re=ae(se,2),le=re[0],me=re[1],ie=J(0),ne=ae(ie,2),ue=ne[0],de=ne[1],j=J(!1),ee=ae(j,2),he=ee[0],ve=ee[1],Y=function(){ve(!0)},ce=function(){ve(!1)},te={getKey:T};function Oe(Te){me(function(Le){var pt;typeof Te=="function"?pt=Te(Le):pt=Te;var yt=Bt(pt);return X.current.scrollTop=yt,yt})}var ye=U({start:0,end:V.length}),pe=U(),Qe=Nz(V,T),Me=ae(Qe,1),De=Me[0];pe.current=De;var we=ge(function(){if(!N)return{scrollHeight:void 0,start:0,end:V.length-1,offset:void 0};if(!L){var Te;return{scrollHeight:((Te=B.current)===null||Te===void 0?void 0:Te.offsetHeight)||0,start:0,end:V.length-1,offset:void 0}}for(var Le=0,pt,yt,Ue,Ge=V.length,ft=0;ft=le&&pt===void 0&&(pt=ft,yt=Le),dn>le+o&&Ue===void 0&&(Ue=ft),Le=dn}return pt===void 0&&(pt=0,yt=0,Ue=Math.ceil(o/a)),Ue===void 0&&(Ue=V.length-1),Ue=Math.min(Ue+1,V.length-1),{scrollHeight:Le,start:pt,end:Ue,offset:yt}},[L,N,le,V,E,o]),Ie=we.scrollHeight,rt=we.start,Ye=we.end,lt=we.offset;ye.current.start=rt,ye.current.end=Ye,Ti(function(){var Te=M.getRecord();if(Te.size===1){var Le=Array.from(Te.keys())[0],pt=Te.get(Le),yt=V[rt];if(yt&&pt===void 0){var Ue=T(yt);if(Ue===Le){var Ge=M.get(Le),ft=Ge-a;Oe(function(It){return It+ft})}}}M.resetRecord()},[Ie]);var Be=J({width:0,height:o}),ke=ae(Be,2),Xe=ke[0],_e=ke[1],Pe=function(Le){_e({width:Le.offsetWidth,height:Le.offsetHeight})},ct=U(),xt=U(),Pn=ge(function(){return Ny(Xe.width,m)},[Xe.width,m]),qt=ge(function(){return Ny(Xe.height,Ie)},[Xe.height,Ie]),xn=Ie-o,gn=U(xn);gn.current=xn;function Bt(Te){var Le=Te;return Number.isNaN(gn.current)||(Le=Math.min(Le,gn.current)),Le=Math.max(Le,0),Le}var Ot=le<=0,ht=le>=xn,et=ue<=0,nt=ue>=m,Re=u2(Ot,ht,et,nt),ot=function(){return{x:F?-ue:ue,y:le}},dt=U(ot()),Ee=pn(function(Te){if(S){var Le=W(W({},ot()),Te);(dt.current.x!==Le.x||dt.current.y!==Le.y)&&(S(Le),dt.current=Le)}});function Ze(Te,Le){var pt=Te;Le?(Ql(function(){de(pt)}),Ee()):Oe(pt)}function Ae(Te){var Le=Te.currentTarget.scrollTop;Le!==le&&Oe(Le),O==null||O(Te),Ee()}var We=function(Le){var pt=Le,yt=m?m-Xe.width:0;return pt=Math.max(pt,0),pt=Math.min(pt,yt),pt},st=pn(function(Te,Le){Le?(Ql(function(){de(function(pt){var yt=pt+(F?-Te:Te);return We(yt)})}),Ee()):Oe(function(pt){var yt=pt+Te;return yt})}),tt=zz(N,Ot,ht,et,nt,!!m,st),Ct=ae(tt,2),$t=Ct[0],wt=Ct[1];Bz(N,X,function(Te,Le,pt,yt){var Ue=yt;return Re(Te,Le,pt)?!1:!Ue||!Ue._virtualHandled?(Ue&&(Ue._virtualHandled=!0),$t({preventDefault:function(){},deltaX:Te?Le:0,deltaY:Te?0:Le}),!0):!1}),Wz(L,X,function(Te){Oe(function(Le){return Le+Te})}),Nt(function(){function Te(pt){var yt=Ot&&pt.detail<0,Ue=ht&&pt.detail>0;N&&!yt&&!Ue&&pt.preventDefault()}var Le=X.current;return Le.addEventListener("wheel",$t,{passive:!1}),Le.addEventListener("DOMMouseScroll",wt,{passive:!0}),Le.addEventListener("MozMousePixelScroll",Te,{passive:!1}),function(){Le.removeEventListener("wheel",$t),Le.removeEventListener("DOMMouseScroll",wt),Le.removeEventListener("MozMousePixelScroll",Te)}},[N,Ot,ht]),Nt(function(){if(m){var Te=We(ue);de(Te),Ee({x:Te})}},[Xe.width,m]);var Mt=function(){var Le,pt;(Le=ct.current)===null||Le===void 0||Le.delayHidden(),(pt=xt.current)===null||pt===void 0||pt.delayHidden()},vn=Vz(X,V,M,a,T,function(){return Q(!0)},Oe,Mt);Yt(e,function(){return{nativeElement:G.current,getScrollInfo:ot,scrollTo:function(Le){function pt(yt){return yt&&Je(yt)==="object"&&("left"in yt||"top"in yt)}pt(Le)?(Le.left!==void 0&&de(We(Le.left)),vn(Le.top)):vn(Le)}}}),Nt(function(){if(x){var Te=V.slice(rt,Ye+1);x(Te,V)}},[rt,Ye,V]);var un=Lz(V,T,M,a),Cn=C==null?void 0:C({start:rt,end:Ye,virtual:L,offsetX:ue,offsetY:lt,rtl:F,getSize:un}),Ln=Az(V,rt,Ye,m,ue,I,d,te),Ut=null;o&&(Ut=W(D({},l?"height":"maxHeight",o),qz),N&&(Ut.overflowY="hidden",m&&(Ut.overflowX="hidden"),he&&(Ut.pointerEvents="none")));var nn={};return F&&(nn.dir="rtl"),y("div",Ce({ref:G,style:W(W({},c),{},{position:"relative"}),className:H},nn,_),y(Kr,{onResize:Pe},y(v,{className:"".concat(r,"-holder"),style:Ut,ref:X,onScroll:Ae,onMouseEnter:Mt},y(c2,{prefixCls:r,height:Ie,offsetX:ue,offsetY:lt,scrollWidth:m,onInnerResize:Q,ref:B,innerProps:b,rtl:F,extra:Cn},Ln))),L&&Ie>o&&y(Qy,{ref:ct,prefixCls:r,scrollOffset:le,scrollRange:Ie,rtl:F,onScroll:Ze,onStartMove:Y,onStopMove:ce,spinSize:qt,containerSize:Xe.height,style:$==null?void 0:$.verticalScrollBar,thumbStyle:$==null?void 0:$.verticalScrollBarThumb,showScrollBar:P}),L&&m>Xe.width&&y(Qy,{ref:xt,prefixCls:r,scrollOffset:ue,scrollRange:m,rtl:F,onScroll:Ze,onStartMove:Y,onStopMove:ce,spinSize:Pn,containerSize:Xe.width,horizontal:!0,style:$==null?void 0:$.horizontalScrollBar,thumbStyle:$==null?void 0:$.horizontalScrollBarThumb,showScrollBar:P}))}var d2=Se(Gz);d2.displayName="List";function Yz(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Uz=["disabled","title","children","style","className"];function zy(t){return typeof t=="string"||typeof t=="number"}var Kz=function(e,n){var r=NN(),i=r.prefixCls,o=r.id,a=r.open,s=r.multiple,l=r.mode,c=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,f=r.onPopupScroll,h=fe(a0),p=h.maxCount,m=h.flattenOptions,g=h.onActiveValue,v=h.defaultActiveFirstOption,O=h.onSelect,S=h.menuItemSelectedIcon,x=h.rawValues,b=h.fieldNames,C=h.virtual,$=h.direction,w=h.listHeight,P=h.listItemHeight,_=h.optionRender,T="".concat(i,"-item"),R=vc(function(){return m},[a,m],function(ie,ne){return ne[0]&&ie[1]!==ne[1]}),k=U(null),I=ge(function(){return s&&Dm(p)&&(x==null?void 0:x.size)>=p},[s,p,x==null?void 0:x.size]),Q=function(ne){ne.preventDefault()},M=function(ne){var ue;(ue=k.current)===null||ue===void 0||ue.scrollTo(typeof ne=="number"?{index:ne}:ne)},E=Ht(function(ie){return l==="combobox"?!1:x.has(ie)},[l,$e(x).toString(),x.size]),N=function(ne){for(var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,de=R.length,j=0;j1&&arguments[1]!==void 0?arguments[1]:!1;H(ne);var de={source:ue?"keyboard":"mouse"},j=R[ne];if(!j){g(null,-1,de);return}g(j.value,ne,de)};be(function(){V(v!==!1?N(0):-1)},[R.length,c]);var X=Ht(function(ie){return l==="combobox"?String(ie).toLowerCase()===c.toLowerCase():x.has(ie)},[l,c,$e(x).toString(),x.size]);be(function(){var ie=setTimeout(function(){if(!s&&a&&x.size===1){var ue=Array.from(x)[0],de=R.findIndex(function(j){var ee=j.data;return c?String(ee.value).startsWith(c):ee.value===ue});de!==-1&&(V(de),M(de))}});if(a){var ne;(ne=k.current)===null||ne===void 0||ne.scrollTo(void 0)}return function(){return clearTimeout(ie)}},[a,c]);var B=function(ne){ne!==void 0&&O(ne,{selected:!x.has(ne)}),s||u(!1)};if(Yt(n,function(){return{onKeyDown:function(ne){var ue=ne.which,de=ne.ctrlKey;switch(ue){case je.N:case je.P:case je.UP:case je.DOWN:{var j=0;if(ue===je.UP?j=-1:ue===je.DOWN?j=1:Yz()&&de&&(ue===je.N?j=1:ue===je.P&&(j=-1)),j!==0){var ee=N(F+j,j);M(ee),V(ee,!0)}break}case je.TAB:case je.ENTER:{var he,ve=R[F];ve&&!(ve!=null&&(he=ve.data)!==null&&he!==void 0&&he.disabled)&&!I?B(ve.value):B(void 0),a&&ne.preventDefault();break}case je.ESC:u(!1),a&&ne.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ne){M(ne)}}}),R.length===0)return y("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(T,"-empty"),onMouseDown:Q},d);var G=Object.keys(b).map(function(ie){return b[ie]}),se=function(ne){return ne.label};function re(ie,ne){var ue=ie.group;return{role:ue?"presentation":"option",id:"".concat(o,"_list_").concat(ne)}}var le=function(ne){var ue=R[ne];if(!ue)return null;var de=ue.data||{},j=de.value,ee=ue.group,he=$i(de,!0),ve=se(ue);return ue?y("div",Ce({"aria-label":typeof ve=="string"&&!ee?ve:null},he,{key:ne},re(ue,ne),{"aria-selected":X(j)}),j):null},me={role:"listbox",id:"".concat(o,"_list")};return y(At,null,C&&y("div",Ce({},me,{style:{height:0,width:0,overflow:"hidden"}}),le(F-1),le(F),le(F+1)),y(d2,{itemKey:"key",ref:k,data:R,height:w,itemHeight:P,fullHeight:!1,onMouseDown:Q,onScroll:f,virtual:C,direction:$,innerProps:C?null:me},function(ie,ne){var ue=ie.group,de=ie.groupOption,j=ie.data,ee=ie.label,he=ie.value,ve=j.key;if(ue){var Y,ce=(Y=j.title)!==null&&Y!==void 0?Y:zy(ee)?ee.toString():void 0;return y("div",{className:Z(T,"".concat(T,"-group"),j.className),title:ce},ee!==void 0?ee:ve)}var te=j.disabled,Oe=j.title;j.children;var ye=j.style,pe=j.className,Qe=ut(j,Uz),Me=cn(Qe,G),De=E(he),we=te||!De&&I,Ie="".concat(T,"-option"),rt=Z(T,Ie,pe,D(D(D(D({},"".concat(Ie,"-grouped"),de),"".concat(Ie,"-active"),F===ne&&!we),"".concat(Ie,"-disabled"),we),"".concat(Ie,"-selected"),De)),Ye=se(ie),lt=!S||typeof S=="function"||De,Be=typeof Ye=="number"?Ye:Ye||he,ke=zy(Be)?Be.toString():void 0;return Oe!==void 0&&(ke=Oe),y("div",Ce({},$i(Me),C?{}:re(ie,ne),{"aria-selected":X(he),className:rt,title:ke,onMouseMove:function(){F===ne||we||V(ne)},onClick:function(){we||B(he)},style:ye}),y("div",{className:"".concat(Ie,"-content")},typeof _=="function"?_(ie,{index:ne}):Be),Kt(S)||De,lt&&y(Df,{className:"".concat(T,"-option-state"),customizeIcon:S,customizeIconProps:{value:he,disabled:we,isSelected:De}},De?"✓":null))}))},Jz=Se(Kz);const e6=function(t,e){var n=U({values:new Map,options:new Map}),r=ge(function(){var o=n.current,a=o.values,s=o.options,l=t.map(function(d){if(d.label===void 0){var f;return W(W({},d),{},{label:(f=a.get(d.value))===null||f===void 0?void 0:f.label})}return d}),c=new Map,u=new Map;return l.forEach(function(d){c.set(d.value,d),u.set(d.value,e.get(d.value)||s.get(d.value))}),n.current.values=c,n.current.options=u,l},[t,e]),i=Ht(function(o){return e.get(o)||n.current.options.get(o)},[e]);return[r,i]};function Vh(t,e){return a2(t).join("").toUpperCase().includes(e)}const t6=function(t,e,n,r,i){return ge(function(){if(!n||r===!1)return t;var o=e.options,a=e.label,s=e.value,l=[],c=typeof r=="function",u=n.toUpperCase(),d=c?r:function(h,p){return i?Vh(p[i],u):p[o]?Vh(p[a!=="children"?a:"label"],u):Vh(p[s],u)},f=c?function(h){return Bm(h)}:function(h){return h};return t.forEach(function(h){if(h[o]){var p=d(n,f(h));if(p)l.push(h);else{var m=h[o].filter(function(g){return d(n,f(g))});m.length&&l.push(W(W({},h),{},D({},o,m)))}return}d(n,f(h))&&l.push(h)}),l},[t,r,i,n,e])};var Ly=0,n6=dr();function r6(){var t;return n6?(t=Ly,Ly+=1):t="TEST_OR_SSR",t}function i6(t){var e=J(),n=ae(e,2),r=n[0],i=n[1];return be(function(){i("rc_select_".concat(r6()))},[]),t||r}var o6=["children","value"],a6=["children"];function s6(t){var e=t,n=e.key,r=e.props,i=r.children,o=r.value,a=ut(r,o6);return W({key:n,value:o!==void 0?o:n,children:i},a)}function f2(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return nr(t).map(function(n,r){if(!Kt(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,a=i.key,s=i.props,l=s.children,c=ut(s,a6);return e||!o?s6(n):W(W({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},c),{},{options:f2(l)})}).filter(function(n){return n})}var l6=function(e,n,r,i,o){return ge(function(){var a=e,s=!e;s&&(a=f2(n));var l=new Map,c=new Map,u=function(h,p,m){m&&typeof m=="string"&&h.set(p[m],p)},d=function f(h){for(var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=0;m0?Ee(We.options):We.options}):We})},Be=ge(function(){return O?lt(Ye):Ye},[Ye,O,me]),ke=ge(function(){return _z(Be,{fieldNames:se,childrenAsData:B})},[Be,se,B]),Xe=function(Ze){var Ae=ee(Ze);if(ce(Ae),L&&(Ae.length!==pe.length||Ae.some(function(tt,Ct){var $t;return(($t=pe[Ct])===null||$t===void 0?void 0:$t.value)!==(tt==null?void 0:tt.value)}))){var We=z?Ae:Ae.map(function(tt){return tt.value}),st=Ae.map(function(tt){return Bm(Qe(tt.value))});L(X?We:We[0],X?st:st[0])}},_e=J(null),Pe=ae(_e,2),ct=Pe[0],xt=Pe[1],Pn=J(0),qt=ae(Pn,2),xn=qt[0],gn=qt[1],Bt=w!==void 0?w:r!=="combobox",Ot=Ht(function(Ee,Ze){var Ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},We=Ae.source,st=We===void 0?"keyboard":We;gn(Ze),a&&r==="combobox"&&Ee!==null&&st==="keyboard"&&xt(String(Ee))},[a,r]),ht=function(Ze,Ae,We){var st=function(){var Ut,nn=Qe(Ze);return[z?{label:nn==null?void 0:nn[se.label],value:Ze,key:(Ut=nn==null?void 0:nn.key)!==null&&Ut!==void 0?Ut:Ze}:Ze,Bm(nn)]};if(Ae&&h){var tt=st(),Ct=ae(tt,2),$t=Ct[0],wt=Ct[1];h($t,wt)}else if(!Ae&&p&&We!=="clear"){var Mt=st(),vn=ae(Mt,2),un=vn[0],Cn=vn[1];p(un,Cn)}},et=jy(function(Ee,Ze){var Ae,We=X?Ze.selected:!0;We?Ae=X?[].concat($e(pe),[Ee]):[Ee]:Ae=pe.filter(function(st){return st.value!==Ee}),Xe(Ae),ht(Ee,We),r==="combobox"?xt(""):(!Wm||f)&&(ie(""),xt(""))}),nt=function(Ze,Ae){Xe(Ze);var We=Ae.type,st=Ae.values;(We==="remove"||We==="clear")&&st.forEach(function(tt){ht(tt.value,!1,We)})},Re=function(Ze,Ae){if(ie(Ze),xt(null),Ae.source==="submit"){var We=(Ze||"").trim();if(We){var st=Array.from(new Set([].concat($e(De),[We])));Xe(st),ht(We,!0),ie("")}return}Ae.source!=="blur"&&(r==="combobox"&&Xe(Ze),u==null||u(Ze))},ot=function(Ze){var Ae=Ze;r!=="tags"&&(Ae=Ze.map(function(st){var tt=de.get(st);return tt==null?void 0:tt.value}).filter(function(st){return st!==void 0}));var We=Array.from(new Set([].concat($e(De),$e(Ae))));Xe(We),We.forEach(function(st){ht(st,!0)})},dt=ge(function(){var Ee=_!==!1&&g!==!1;return W(W({},ne),{},{flattenOptions:ke,onActiveValue:Ot,defaultActiveFirstOption:Bt,onSelect:et,menuItemSelectedIcon:P,rawValues:De,fieldNames:se,virtual:Ee,direction:T,listHeight:k,listItemHeight:Q,childrenAsData:B,maxCount:F,optionRender:C})},[F,ne,ke,Ot,Bt,et,P,De,se,_,g,T,k,Q,B,C]);return y(a0.Provider,{value:dt},y(Mz,Ce({},H,{id:V,prefixCls:o,ref:e,omitDomProps:u6,mode:r,displayValues:Me,onDisplayValuesChange:nt,direction:T,searchValue:me,onSearch:Re,autoClearSearchValue:f,onSearchSplit:ot,dropdownMatchSelectWidth:g,OptionList:Jz,emptyOptions:!ke.length,activeValue:ct,activeDescendantId:"".concat(V,"_list_").concat(xn)})))}),c0=f6;c0.Option=l0;c0.OptGroup=s0;function Pd(t,e,n){return Z({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const Wf=(t,e)=>e||t,h6=()=>{const[,t]=Cr(),[e]=Ki("Empty"),r=new Dt(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return y("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},y("title",null,(e==null?void 0:e.description)||"Empty"),y("g",{fill:"none",fillRule:"evenodd"},y("g",{transform:"translate(24 31.67)"},y("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),y("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),y("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),y("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),y("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),y("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),y("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},y("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),y("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},p6=()=>{const[,t]=Cr(),[e]=Ki("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:o}=t,{borderColor:a,shadowColor:s,contentColor:l}=ge(()=>({borderColor:new Dt(n).onBackground(o).toHexString(),shadowColor:new Dt(r).onBackground(o).toHexString(),contentColor:new Dt(i).onBackground(o).toHexString()}),[n,r,i,o]);return y("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},y("title",null,(e==null?void 0:e.description)||"Empty"),y("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},y("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),y("g",{fillRule:"nonzero",stroke:a},y("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),y("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))},m6=t=>{const{componentCls:e,margin:n,marginXS:r,marginXL:i,fontSize:o,lineHeight:a}=t;return{[e]:{marginInline:r,fontSize:o,lineHeight:a,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:r,opacity:t.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${e}-description`]:{color:t.colorTextDescription},[`${e}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:t.colorTextDescription,[`${e}-description`]:{color:t.colorTextDescription},[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:r,color:t.colorTextDescription,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},g6=Zt("Empty",t=>{const{componentCls:e,controlHeightLG:n,calc:r}=t,i=kt(t,{emptyImgCls:`${e}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return m6(i)});var v6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var e;const{className:n,rootClassName:r,prefixCls:i,image:o,description:a,children:s,imageStyle:l,style:c,classNames:u,styles:d}=t,f=v6(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:h,direction:p,className:m,style:g,classNames:v,styles:O,image:S}=rr("empty"),x=h("empty",i),[b,C,$]=g6(x),[w]=Ki("Empty"),P=typeof a<"u"?a:w==null?void 0:w.description,_=typeof P=="string"?P:"empty",T=(e=o??S)!==null&&e!==void 0?e:h2;let R=null;return typeof T=="string"?R=y("img",{draggable:!1,alt:_,src:T}):R=T,b(y("div",Object.assign({className:Z(C,$,x,m,{[`${x}-normal`]:T===p2,[`${x}-rtl`]:p==="rtl"},n,r,v.root,u==null?void 0:u.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},O.root),g),d==null?void 0:d.root),c)},f),y("div",{className:Z(`${x}-image`,v.image,u==null?void 0:u.image),style:Object.assign(Object.assign(Object.assign({},l),O.image),d==null?void 0:d.image)},R),P&&y("div",{className:Z(`${x}-description`,v.description,u==null?void 0:u.description),style:Object.assign(Object.assign({},O.description),d==null?void 0:d.description)},P),s&&y("div",{className:Z(`${x}-footer`,v.footer,u==null?void 0:u.footer),style:Object.assign(Object.assign({},O.footer),d==null?void 0:d.footer)},s)))};Jo.PRESENTED_IMAGE_DEFAULT=h2;Jo.PRESENTED_IMAGE_SIMPLE=p2;const O6=t=>{const{componentName:e}=t,{getPrefixCls:n}=fe(it),r=n("empty");switch(e){case"Table":case"List":return oe.createElement(Jo,{image:Jo.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return oe.createElement(Jo,{image:Jo.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return oe.createElement(Jo,null)}},Ff=(t,e,n=void 0)=>{var r,i;const{variant:o,[t]:a}=fe(it),s=fe(Tw),l=a==null?void 0:a.variant;let c;typeof e<"u"?c=e:n===!1?c="borderless":c=(i=(r=s??l)!==null&&r!==void 0?r:o)!==null&&i!==void 0?i:"outlined";const u=KM.includes(c);return[c,u]},b6=t=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function y6(t,e){return t||b6(e)}const Dy=t=>{const{optionHeight:e,optionFontSize:n,optionLineHeight:r,optionPadding:i}=t;return{position:"relative",display:"block",minHeight:e,padding:i,color:t.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},S6=t=>{const{antCls:e,componentCls:n}=t,r=`${n}-item`,i=`&${e}-slide-up-enter${e}-slide-up-enter-active`,o=`&${e}-slide-up-appear${e}-slide-up-appear-active`,a=`&${e}-slide-up-leave${e}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},wn(t)),{position:"absolute",top:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",padding:t.paddingXXS,overflow:"hidden",fontSize:t.fontSize,fontVariant:"initial",backgroundColor:t.colorBgElevated,borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,[` +`].includes(Je)})},[Q]),Qe=he(p0)||{},Ve=Qe.maxCount,ut=Qe.rawValues,tt=function(Ze,Wt,Zt){if(!(ce&&Yp(Ve)&&(ut==null?void 0:ut.size)>=Ve)){var nn=!0,vn=Ze;w==null||w(null);var Sr=H3(Ze,Q,Yp(Ve)?Ve-ut.size:void 0),Jn=Zt?null:Sr;return g!=="combobox"&&Jn&&(vn="",M==null||M(Jn),we(!1),nn=!1),T&&Pe!==vn&&T(vn,{source:Wt?"typing":"effect"}),nn}},St=function(Ze){!Ze||!Ze.trim()||T(Ze,{source:"submit"})};ye(function(){!ke&&!ce&&g!=="combobox"&&tt("",!1,!1)},[ke]),ye(function(){et&&O&&it(!1),O&&!Ye.current&&Xe(!1)},[O]);var Pt=v2(),vt=le(Pt,2),_t=vt[0],hn=vt[1],sn=ne(!1),mn=function(Ze){var Wt=_t(),Zt=Ze.key,nn=Zt==="Enter";if(nn&&(g!=="combobox"&&Ze.preventDefault(),ke||we(!0)),hn(!!Pe),Zt==="Backspace"&&!Wt&&ce&&!Pe&&u.length){for(var vn=Ce(u),Sr=null,Jn=vn.length-1;Jn>=0;Jn-=1){var xr=vn[Jn];if(!xr.disabled){vn.splice(Jn,1),Sr=xr;break}}Sr&&d(vn,{type:"remove",values:[Sr]})}for(var cr=arguments.length,$r=new Array(cr>1?cr-1:0),ki=1;ki1?Wt-1:0),nn=1;nn1?Sr-1:0),xr=1;xr"u"?"undefined":nt(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const P2=function(t,e,n,r){var i=ne(!1),o=ne(null);function a(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var s=ne({top:t,bottom:e,left:n,right:r});return s.current.top=t,s.current.bottom=e,s.current.left=n,s.current.right=r,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?c<0&&s.current.left||c>0&&s.current.right:c<0&&s.current.top||c>0&&s.current.bottom;return u&&d?(clearTimeout(o.current),i.current=!1):(!d||i.current)&&a(),!i.current&&d}};function K3(t,e,n,r,i,o,a){var s=ne(0),l=ne(null),c=ne(null),u=ne(!1),d=P2(e,n,r,i);function f(v,y){if(Yt.cancel(l.current),!d(!1,y)){var S=v;if(!S._virtualHandled)S._virtualHandled=!0;else return;s.current+=y,c.current=y,Wy||S.preventDefault(),l.current=Yt(function(){var x=u.current?10:1;a(s.current*x,!1),s.current=0})}}function h(v,y){a(y,!0),Wy||v.preventDefault()}var m=ne(null),p=ne(null);function g(v){if(t){Yt.cancel(p.current),p.current=Yt(function(){m.current=null},2);var y=v.deltaX,S=v.deltaY,x=v.shiftKey,$=y,C=S;(m.current==="sx"||!m.current&&x&&S&&!y)&&($=S,C=0,m.current="sx");var P=Math.abs($),w=Math.abs(C);m.current===null&&(m.current=o&&P>w?"x":"y"),m.current==="y"?f(v,C):h(v,$)}}function O(v){t&&(u.current=v.detail===c.current)}return[g,O]}function J3(t,e,n,r){var i=ve(function(){return[new Map,[]]},[t,n.id,r]),o=le(i,2),a=o[0],s=o[1],l=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,f=a.get(u),h=a.get(d);if(f===void 0||h===void 0)for(var m=t.length,p=s.length;p0&&arguments[0]!==void 0?arguments[0]:!1;u();var m=function(){var O=!1;s.current.forEach(function(v,y){if(v&&v.offsetParent){var S=v.offsetHeight,x=getComputedStyle(v),$=x.marginTop,C=x.marginBottom,P=Hy($),w=Hy(C),_=S+P+w;l.current.get(y)!==_&&(l.current.set(y,_),O=!0)}}),O&&a(function(v){return v+1})};if(h)m();else{c.current+=1;var p=c.current;Promise.resolve().then(function(){p===c.current&&m()})}}function f(h,m){var p=t(h);s.current.get(p),m?(s.current.set(p,m),d()):s.current.delete(p)}return ye(function(){return u},[]),[f,d,l.current,o]}var Vy=14/15;function n6(t,e,n){var r=ne(!1),i=ne(0),o=ne(0),a=ne(null),s=ne(null),l,c=function(h){if(r.current){var m=Math.ceil(h.touches[0].pageX),p=Math.ceil(h.touches[0].pageY),g=i.current-m,O=o.current-p,v=Math.abs(g)>Math.abs(O);v?i.current=m:o.current=p;var y=n(v,v?g:O,!1,h);y&&h.preventDefault(),clearInterval(s.current),y&&(s.current=setInterval(function(){v?g*=Vy:O*=Vy;var S=Math.floor(v?g:O);(!n(v,S,!0)||Math.abs(S)<=.1)&&clearInterval(s.current)},16))}},u=function(){r.current=!1,l()},d=function(h){l(),h.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(h.touches[0].pageX),o.current=Math.ceil(h.touches[0].pageY),a.current=h.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},Lt(function(){return t&&e.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=e.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[t])}function Fy(t){return Math.floor(Math.pow(t,.5))}function eg(t,e){var n="touches"in t?t.touches[0]:t;return n[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}function r6(t,e,n){ye(function(){var r=e.current;if(t&&r){var i=!1,o,a,s=function(){Yt.cancel(o)},l=function f(){s(),o=Yt(function(){n(a),f()})},c=function(){i=!1,s()},u=function(h){if(!(h.target.draggable||h.button!==0)){var m=h;m._virtualHandled||(m._virtualHandled=!0,i=!0)}},d=function(h){if(i){var m=eg(h,!1),p=r.getBoundingClientRect(),g=p.top,O=p.bottom;if(m<=g){var v=g-m;a=-Fy(v),l()}else if(m>=O){var y=m-O;a=Fy(y),l()}else s()}};return r.addEventListener("mousedown",u),r.ownerDocument.addEventListener("mouseup",c),r.ownerDocument.addEventListener("mousemove",d),r.ownerDocument.addEventListener("dragend",c),function(){r.removeEventListener("mousedown",u),r.ownerDocument.removeEventListener("mouseup",c),r.ownerDocument.removeEventListener("mousemove",d),r.ownerDocument.removeEventListener("dragend",c),s()}}},[t])}var i6=10;function o6(t,e,n,r,i,o,a,s){var l=ne(),c=te(null),u=le(c,2),d=u[0],f=u[1];return Lt(function(){if(d&&d.times=0;M-=1){var Q=i(e[M]),E=n.get(Q);if(E===void 0){v=!0;break}if(T-=E,T<=0)break}switch(x){case"top":S=C-g;break;case"bottom":S=P-O+g;break;default:{var k=t.current.scrollTop,z=k+O;Cz&&(y="bottom")}}S!==null&&a(S),S!==d.lastTop&&(v=!0)}v&&f(Z(Z({},d),{},{times:d.times+1,targetAlign:y,lastTop:S}))}},[d,t.current]),function(h){if(h==null){s();return}if(Yt.cancel(l.current),typeof h=="number")a(h);else if(h&&nt(h)==="object"){var m,p=h.align;"index"in h?m=h.index:m=e.findIndex(function(v){return i(v)===h.key});var g=h.offset,O=g===void 0?0:g;f({times:0,index:m,offset:O,originAlign:p})}}}var Xy=Se(function(t,e){var n=t.prefixCls,r=t.rtl,i=t.scrollOffset,o=t.scrollRange,a=t.onStartMove,s=t.onStopMove,l=t.onScroll,c=t.horizontal,u=t.spinSize,d=t.containerSize,f=t.style,h=t.thumbStyle,m=t.showScrollBar,p=te(!1),g=le(p,2),O=g[0],v=g[1],y=te(null),S=le(y,2),x=S[0],$=S[1],C=te(null),P=le(C,2),w=P[0],_=P[1],R=!r,I=ne(),T=ne(),M=te(m),Q=le(M,2),E=Q[0],k=Q[1],z=ne(),L=function(){m===!0||m===!1||(clearTimeout(z.current),k(!0),z.current=setTimeout(function(){k(!1)},3e3))},B=o-d||0,F=d-u||0,H=ve(function(){if(i===0||B===0)return 0;var re=i/B;return re*F},[i,B,F]),X=function(J){J.stopPropagation(),J.preventDefault()},q=ne({top:H,dragging:O,pageY:x,startTop:w});q.current={top:H,dragging:O,pageY:x,startTop:w};var N=function(J){v(!0),$(eg(J,c)),_(q.current.top),a(),J.stopPropagation(),J.preventDefault()};ye(function(){var re=function(D){D.preventDefault()},J=I.current,ue=T.current;return J.addEventListener("touchstart",re,{passive:!1}),ue.addEventListener("touchstart",N,{passive:!1}),function(){J.removeEventListener("touchstart",re),ue.removeEventListener("touchstart",N)}},[]);var j=ne();j.current=B;var oe=ne();oe.current=F,ye(function(){if(O){var re,J=function(D){var Y=q.current,me=Y.dragging,G=Y.pageY,ce=Y.startTop;Yt.cancel(re);var ae=I.current.getBoundingClientRect(),pe=d/(c?ae.width:ae.height);if(me){var Oe=(eg(D,c)-G)*pe,be=ce;!R&&c?be-=Oe:be+=Oe;var ge=j.current,Me=oe.current,Ie=Me?be/Me:0,He=Math.ceil(Ie*ge);He=Math.max(He,0),He=Math.min(He,ge),re=Yt(function(){l(He,c)})}},ue=function(){v(!1),s()};return window.addEventListener("mousemove",J,{passive:!0}),window.addEventListener("touchmove",J,{passive:!0}),window.addEventListener("mouseup",ue,{passive:!0}),window.addEventListener("touchend",ue,{passive:!0}),function(){window.removeEventListener("mousemove",J),window.removeEventListener("touchmove",J),window.removeEventListener("mouseup",ue),window.removeEventListener("touchend",ue),Yt.cancel(re)}}},[O]),ye(function(){return L(),function(){clearTimeout(z.current)}},[i]),Jt(e,function(){return{delayHidden:L}});var ee="".concat(n,"-scrollbar"),se={position:"absolute",visibility:E?null:"hidden"},fe={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return c?(Object.assign(se,{height:8,left:0,right:0,bottom:0}),Object.assign(fe,W({height:"100%",width:u},R?"left":"right",H))):(Object.assign(se,W({width:8,top:0,bottom:0},R?"right":"left",0)),Object.assign(fe,{width:"100%",height:u,top:H})),b("div",{ref:I,className:U(ee,W(W(W({},"".concat(ee,"-horizontal"),c),"".concat(ee,"-vertical"),!c),"".concat(ee,"-visible"),E)),style:Z(Z({},se),f),onMouseDown:X,onMouseMove:L},b("div",{ref:T,className:U("".concat(ee,"-thumb"),W({},"".concat(ee,"-thumb-moving"),O)),style:Z(Z({},fe),h),onMouseDown:N}))}),a6=20;function Zy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=t/e*t;return isNaN(n)&&(n=0),n=Math.max(n,a6),Math.floor(n)}var s6=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],l6=[],c6={overflowY:"auto",overflowAnchor:"none"};function u6(t,e){var n=t.prefixCls,r=n===void 0?"rc-virtual-list":n,i=t.className,o=t.height,a=t.itemHeight,s=t.fullHeight,l=s===void 0?!0:s,c=t.style,u=t.data,d=t.children,f=t.itemKey,h=t.virtual,m=t.direction,p=t.scrollWidth,g=t.component,O=g===void 0?"div":g,v=t.onScroll,y=t.onVirtualScroll,S=t.onVisibleChange,x=t.innerProps,$=t.extraRender,C=t.styles,P=t.showScrollBar,w=P===void 0?"optional":P,_=gt(t,s6),R=Ut(function(Te){return typeof f=="function"?f(Te):Te==null?void 0:Te[f]},[f]),I=t6(R),T=le(I,4),M=T[0],Q=T[1],E=T[2],k=T[3],z=!!(h!==!1&&o&&a),L=ve(function(){return Object.values(E.maps).reduce(function(Te,Le){return Te+Le},0)},[E.id,E.maps]),B=z&&u&&(Math.max(a*u.length,L)>o||!!p),F=m==="rtl",H=U(r,W({},"".concat(r,"-rtl"),F),i),X=u||l6,q=ne(),N=ne(),j=ne(),oe=te(0),ee=le(oe,2),se=ee[0],fe=ee[1],re=te(0),J=le(re,2),ue=J[0],de=J[1],D=te(!1),Y=le(D,2),me=Y[0],G=Y[1],ce=function(){G(!0)},ae=function(){G(!1)},pe={getKey:R};function Oe(Te){fe(function(Le){var mt;typeof Te=="function"?mt=Te(Le):mt=Te;var xt=Dt(mt);return q.current.scrollTop=xt,xt})}var be=ne({start:0,end:X.length}),ge=ne(),Me=Y3(X,R),Ie=le(Me,1),He=Ie[0];ge.current=He;var Ae=ve(function(){if(!z)return{scrollHeight:void 0,start:0,end:X.length-1,offset:void 0};if(!B){var Te;return{scrollHeight:((Te=N.current)===null||Te===void 0?void 0:Te.offsetHeight)||0,start:0,end:X.length-1,offset:void 0}}for(var Le=0,mt,xt,Ue,Fe=X.length,pt=0;pt=se&&mt===void 0&&(mt=pt,xt=Le),bt>se+o&&Ue===void 0&&(Ue=pt),Le=bt}return mt===void 0&&(mt=0,xt=0,Ue=Math.ceil(o/a)),Ue===void 0&&(Ue=X.length-1),Ue=Math.min(Ue+1,X.length-1),{scrollHeight:Le,start:mt,end:Ue,offset:xt}},[B,z,se,X,k,o]),Ee=Ae.scrollHeight,st=Ae.start,Ye=Ae.end,rt=Ae.offset;be.current.start=st,be.current.end=Ye,Ri(function(){var Te=E.getRecord();if(Te.size===1){var Le=Array.from(Te.keys())[0],mt=Te.get(Le),xt=X[st];if(xt&&mt===void 0){var Ue=R(xt);if(Ue===Le){var Fe=E.get(Le),pt=Fe-a;Oe(function(Et){return Et+pt})}}}E.resetRecord()},[Ee]);var Be=te({width:0,height:o}),Re=le(Be,2),Xe=Re[0],_e=Re[1],Pe=function(Le){_e({width:Le.offsetWidth,height:Le.offsetHeight})},ft=ne(),yt=ne(),xn=ve(function(){return Zy(Xe.width,p)},[Xe.width,p]),Xt=ve(function(){return Zy(Xe.height,Ee)},[Xe.height,Ee]),gn=Ee-o,fn=ne(gn);fn.current=gn;function Dt(Te){var Le=Te;return Number.isNaN(fn.current)||(Le=Math.min(Le,fn.current)),Le=Math.max(Le,0),Le}var Ct=se<=0,ht=se>=gn,et=ue<=0,it=ue>=p,ke=P2(Ct,ht,et,it),ct=function(){return{x:F?-ue:ue,y:se}},Ke=ne(ct()),we=bn(function(Te){if(y){var Le=Z(Z({},ct()),Te);(Ke.current.x!==Le.x||Ke.current.y!==Le.y)&&(y(Le),Ke.current=Le)}});function We(Te,Le){var mt=Te;Le?(Ll(function(){de(mt)}),we()):Oe(mt)}function Qe(Te){var Le=Te.currentTarget.scrollTop;Le!==se&&Oe(Le),v==null||v(Te),we()}var Ve=function(Le){var mt=Le,xt=p?p-Xe.width:0;return mt=Math.max(mt,0),mt=Math.min(mt,xt),mt},ut=bn(function(Te,Le){Le?(Ll(function(){de(function(mt){var xt=mt+(F?-Te:Te);return Ve(xt)})}),we()):Oe(function(mt){var xt=mt+Te;return xt})}),tt=K3(z,Ct,ht,et,it,!!p,ut),St=le(tt,2),Pt=St[0],vt=St[1];n6(z,q,function(Te,Le,mt,xt){var Ue=xt;return ke(Te,Le,mt)?!1:!Ue||!Ue._virtualHandled?(Ue&&(Ue._virtualHandled=!0),Pt({preventDefault:function(){},deltaX:Te?Le:0,deltaY:Te?0:Le}),!0):!1}),r6(B,q,function(Te){Oe(function(Le){return Le+Te})}),Lt(function(){function Te(mt){var xt=Ct&&mt.detail<0,Ue=ht&&mt.detail>0;z&&!xt&&!Ue&&mt.preventDefault()}var Le=q.current;return Le.addEventListener("wheel",Pt,{passive:!1}),Le.addEventListener("DOMMouseScroll",vt,{passive:!0}),Le.addEventListener("MozMousePixelScroll",Te,{passive:!1}),function(){Le.removeEventListener("wheel",Pt),Le.removeEventListener("DOMMouseScroll",vt),Le.removeEventListener("MozMousePixelScroll",Te)}},[z,Ct,ht]),Lt(function(){if(p){var Te=Ve(ue);de(Te),we({x:Te})}},[Xe.width,p]);var _t=function(){var Le,mt;(Le=ft.current)===null||Le===void 0||Le.delayHidden(),(mt=yt.current)===null||mt===void 0||mt.delayHidden()},hn=o6(q,X,E,a,R,function(){return Q(!0)},Oe,_t);Jt(e,function(){return{nativeElement:j.current,getScrollInfo:ct,scrollTo:function(Le){function mt(xt){return xt&&nt(xt)==="object"&&("left"in xt||"top"in xt)}mt(Le)?(Le.left!==void 0&&de(Ve(Le.left)),hn(Le.top)):hn(Le)}}}),Lt(function(){if(S){var Te=X.slice(st,Ye+1);S(Te,X)}},[st,Ye,X]);var sn=J3(X,R,E,a),mn=$==null?void 0:$({start:st,end:Ye,virtual:B,offsetX:ue,offsetY:rt,rtl:F,getSize:sn}),Tn=G3(X,st,Ye,p,ue,M,d,pe),Bt=null;o&&(Bt=Z(W({},l?"height":"maxHeight",o),c6),z&&(Bt.overflowY="hidden",p&&(Bt.overflowX="hidden"),me&&(Bt.pointerEvents="none")));var Gt={};return F&&(Gt.dir="rtl"),b("div",xe({ref:j,style:Z(Z({},c),{},{position:"relative"}),className:H},Gt,_),b(Jr,{onResize:Pe},b(O,{className:"".concat(r,"-holder"),style:Bt,ref:q,onScroll:Qe,onMouseEnter:_t},b(w2,{prefixCls:r,height:Ee,offsetX:ue,offsetY:rt,scrollWidth:p,onInnerResize:Q,ref:N,innerProps:x,rtl:F,extra:mn},Tn))),B&&Ee>o&&b(Xy,{ref:ft,prefixCls:r,scrollOffset:se,scrollRange:Ee,rtl:F,onScroll:We,onStartMove:ce,onStopMove:ae,spinSize:Xt,containerSize:Xe.height,style:C==null?void 0:C.verticalScrollBar,thumbStyle:C==null?void 0:C.verticalScrollBarThumb,showScrollBar:w}),B&&p>Xe.width&&b(Xy,{ref:yt,prefixCls:r,scrollOffset:ue,scrollRange:p,rtl:F,onScroll:We,onStartMove:ce,onStopMove:ae,spinSize:xn,containerSize:Xe.width,horizontal:!0,style:C==null?void 0:C.horizontalScrollBar,thumbStyle:C==null?void 0:C.horizontalScrollBarThumb,showScrollBar:w}))}var _2=Se(u6);_2.displayName="List";function d6(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var f6=["disabled","title","children","style","className"];function qy(t){return typeof t=="string"||typeof t=="number"}var h6=function(e,n){var r=Yz(),i=r.prefixCls,o=r.id,a=r.open,s=r.multiple,l=r.mode,c=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,f=r.onPopupScroll,h=he(p0),m=h.maxCount,p=h.flattenOptions,g=h.onActiveValue,O=h.defaultActiveFirstOption,v=h.onSelect,y=h.menuItemSelectedIcon,S=h.rawValues,x=h.fieldNames,$=h.virtual,C=h.direction,P=h.listHeight,w=h.listItemHeight,_=h.optionRender,R="".concat(i,"-item"),I=xc(function(){return p},[a,p],function(re,J){return J[0]&&re[1]!==J[1]}),T=ne(null),M=ve(function(){return s&&Yp(m)&&(S==null?void 0:S.size)>=m},[s,m,S==null?void 0:S.size]),Q=function(J){J.preventDefault()},E=function(J){var ue;(ue=T.current)===null||ue===void 0||ue.scrollTo(typeof J=="number"?{index:J}:J)},k=Ut(function(re){return l==="combobox"?!1:S.has(re)},[l,Ce(S).toString(),S.size]),z=function(J){for(var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,de=I.length,D=0;D1&&arguments[1]!==void 0?arguments[1]:!1;H(J);var de={source:ue?"keyboard":"mouse"},D=I[J];if(!D){g(null,-1,de);return}g(D.value,J,de)};ye(function(){X(O!==!1?z(0):-1)},[I.length,c]);var q=Ut(function(re){return l==="combobox"?String(re).toLowerCase()===c.toLowerCase():S.has(re)},[l,c,Ce(S).toString(),S.size]);ye(function(){var re=setTimeout(function(){if(!s&&a&&S.size===1){var ue=Array.from(S)[0],de=I.findIndex(function(D){var Y=D.data;return c?String(Y.value).startsWith(c):Y.value===ue});de!==-1&&(X(de),E(de))}});if(a){var J;(J=T.current)===null||J===void 0||J.scrollTo(void 0)}return function(){return clearTimeout(re)}},[a,c]);var N=function(J){J!==void 0&&v(J,{selected:!S.has(J)}),s||u(!1)};if(Jt(n,function(){return{onKeyDown:function(J){var ue=J.which,de=J.ctrlKey;switch(ue){case ze.N:case ze.P:case ze.UP:case ze.DOWN:{var D=0;if(ue===ze.UP?D=-1:ue===ze.DOWN?D=1:d6()&&de&&(ue===ze.N?D=1:ue===ze.P&&(D=-1)),D!==0){var Y=z(F+D,D);E(Y),X(Y,!0)}break}case ze.TAB:case ze.ENTER:{var me,G=I[F];G&&!(G!=null&&(me=G.data)!==null&&me!==void 0&&me.disabled)&&!M?N(G.value):N(void 0),a&&J.preventDefault();break}case ze.ESC:u(!1),a&&J.stopPropagation()}},onKeyUp:function(){},scrollTo:function(J){E(J)}}}),I.length===0)return b("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(R,"-empty"),onMouseDown:Q},d);var j=Object.keys(x).map(function(re){return x[re]}),oe=function(J){return J.label};function ee(re,J){var ue=re.group;return{role:ue?"presentation":"option",id:"".concat(o,"_list_").concat(J)}}var se=function(J){var ue=I[J];if(!ue)return null;var de=ue.data||{},D=de.value,Y=ue.group,me=mi(de,!0),G=oe(ue);return ue?b("div",xe({"aria-label":typeof G=="string"&&!Y?G:null},me,{key:J},ee(ue,J),{"aria-selected":q(D)}),D):null},fe={role:"listbox",id:"".concat(o,"_list")};return b(Qt,null,$&&b("div",xe({},fe,{style:{height:0,width:0,overflow:"hidden"}}),se(F-1),se(F),se(F+1)),b(_2,{itemKey:"key",ref:T,data:I,height:P,itemHeight:w,fullHeight:!1,onMouseDown:Q,onScroll:f,virtual:$,direction:C,innerProps:$?null:fe},function(re,J){var ue=re.group,de=re.groupOption,D=re.data,Y=re.label,me=re.value,G=D.key;if(ue){var ce,ae=(ce=D.title)!==null&&ce!==void 0?ce:qy(Y)?Y.toString():void 0;return b("div",{className:U(R,"".concat(R,"-group"),D.className),title:ae},Y!==void 0?Y:G)}var pe=D.disabled,Oe=D.title;D.children;var be=D.style,ge=D.className,Me=gt(D,f6),Ie=pn(Me,j),He=k(me),Ae=pe||!He&&M,Ee="".concat(R,"-option"),st=U(R,Ee,ge,W(W(W(W({},"".concat(Ee,"-grouped"),de),"".concat(Ee,"-active"),F===J&&!Ae),"".concat(Ee,"-disabled"),Ae),"".concat(Ee,"-selected"),He)),Ye=oe(re),rt=!y||typeof y=="function"||He,Be=typeof Ye=="number"?Ye:Ye||me,Re=qy(Be)?Be.toString():void 0;return Oe!==void 0&&(Re=Oe),b("div",xe({},mi(Ie),$?{}:ee(re,J),{"aria-selected":q(me),className:st,title:Re,onMouseMove:function(){F===J||Ae||X(J)},onClick:function(){Ae||N(me)},style:be}),b("div",{className:"".concat(Ee,"-content")},typeof _=="function"?_(re,{index:J}):Be),en(y)||He,rt&&b(Gf,{className:"".concat(R,"-option-state"),customizeIcon:y,customizeIconProps:{value:me,disabled:Ae,isSelected:He}},He?"✓":null))}))},m6=Se(h6);const p6=function(t,e){var n=ne({values:new Map,options:new Map}),r=ve(function(){var o=n.current,a=o.values,s=o.options,l=t.map(function(d){if(d.label===void 0){var f;return Z(Z({},d),{},{label:(f=a.get(d.value))===null||f===void 0?void 0:f.label})}return d}),c=new Map,u=new Map;return l.forEach(function(d){c.set(d.value,d),u.set(d.value,e.get(d.value)||s.get(d.value))}),n.current.values=c,n.current.options=u,l},[t,e]),i=Ut(function(o){return e.get(o)||n.current.options.get(o)},[e]);return[r,i]};function em(t,e){return x2(t).join("").toUpperCase().includes(e)}const g6=function(t,e,n,r,i){return ve(function(){if(!n||r===!1)return t;var o=e.options,a=e.label,s=e.value,l=[],c=typeof r=="function",u=n.toUpperCase(),d=c?r:function(h,m){return i?em(m[i],u):m[o]?em(m[a!=="children"?a:"label"],u):em(m[s],u)},f=c?function(h){return Kp(h)}:function(h){return h};return t.forEach(function(h){if(h[o]){var m=d(n,f(h));if(m)l.push(h);else{var p=h[o].filter(function(g){return d(n,f(g))});p.length&&l.push(Z(Z({},h),{},W({},o,p)))}return}d(n,f(h))&&l.push(h)}),l},[t,r,i,n,e])};var Gy=0,v6=pr();function O6(){var t;return v6?(t=Gy,Gy+=1):t="TEST_OR_SSR",t}function b6(t){var e=te(),n=le(e,2),r=n[0],i=n[1];return ye(function(){i("rc_select_".concat(O6()))},[]),t||r}var y6=["children","value"],S6=["children"];function x6(t){var e=t,n=e.key,r=e.props,i=r.children,o=r.value,a=gt(r,y6);return Z({key:n,value:o!==void 0?o:n,children:i},a)}function T2(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return sr(t).map(function(n,r){if(!en(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,a=i.key,s=i.props,l=s.children,c=gt(s,S6);return e||!o?x6(n):Z(Z({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},c),{},{options:T2(l)})}).filter(function(n){return n})}var $6=function(e,n,r,i,o){return ve(function(){var a=e,s=!e;s&&(a=T2(n));var l=new Map,c=new Map,u=function(h,m,p){p&&typeof p=="string"&&h.set(m[p],m)},d=function f(h){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=0;p0?we(Ve.options):Ve.options}):Ve})},Be=ve(function(){return v?rt(Ye):Ye},[Ye,v,fe]),Re=ve(function(){return W3(Be,{fieldNames:oe,childrenAsData:N})},[Be,oe,N]),Xe=function(We){var Qe=Y(We);if(ae(Qe),B&&(Qe.length!==ge.length||Qe.some(function(tt,St){var Pt;return((Pt=ge[St])===null||Pt===void 0?void 0:Pt.value)!==(tt==null?void 0:tt.value)}))){var Ve=L?Qe:Qe.map(function(tt){return tt.value}),ut=Qe.map(function(tt){return Kp(Me(tt.value))});B(q?Ve:Ve[0],q?ut:ut[0])}},_e=te(null),Pe=le(_e,2),ft=Pe[0],yt=Pe[1],xn=te(0),Xt=le(xn,2),gn=Xt[0],fn=Xt[1],Dt=P!==void 0?P:r!=="combobox",Ct=Ut(function(we,We){var Qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ve=Qe.source,ut=Ve===void 0?"keyboard":Ve;fn(We),a&&r==="combobox"&&we!==null&&ut==="keyboard"&&yt(String(we))},[a,r]),ht=function(We,Qe,Ve){var ut=function(){var Bt,Gt=Me(We);return[L?{label:Gt==null?void 0:Gt[oe.label],value:We,key:(Bt=Gt==null?void 0:Gt.key)!==null&&Bt!==void 0?Bt:We}:We,Kp(Gt)]};if(Qe&&h){var tt=ut(),St=le(tt,2),Pt=St[0],vt=St[1];h(Pt,vt)}else if(!Qe&&m&&Ve!=="clear"){var _t=ut(),hn=le(_t,2),sn=hn[0],mn=hn[1];m(sn,mn)}},et=Uy(function(we,We){var Qe,Ve=q?We.selected:!0;Ve?Qe=q?[].concat(Ce(ge),[we]):[we]:Qe=ge.filter(function(ut){return ut.value!==we}),Xe(Qe),ht(we,Ve),r==="combobox"?yt(""):(!Jp||f)&&(re(""),yt(""))}),it=function(We,Qe){Xe(We);var Ve=Qe.type,ut=Qe.values;(Ve==="remove"||Ve==="clear")&&ut.forEach(function(tt){ht(tt.value,!1,Ve)})},ke=function(We,Qe){if(re(We),yt(null),Qe.source==="submit"){var Ve=(We||"").trim();if(Ve){var ut=Array.from(new Set([].concat(Ce(He),[Ve])));Xe(ut),ht(Ve,!0),re("")}return}Qe.source!=="blur"&&(r==="combobox"&&Xe(We),u==null||u(We))},ct=function(We){var Qe=We;r!=="tags"&&(Qe=We.map(function(ut){var tt=de.get(ut);return tt==null?void 0:tt.value}).filter(function(ut){return ut!==void 0}));var Ve=Array.from(new Set([].concat(Ce(He),Ce(Qe))));Xe(Ve),Ve.forEach(function(ut){ht(ut,!0)})},Ke=ve(function(){var we=_!==!1&&g!==!1;return Z(Z({},J),{},{flattenOptions:Re,onActiveValue:Ct,defaultActiveFirstOption:Dt,onSelect:et,menuItemSelectedIcon:w,rawValues:He,fieldNames:oe,virtual:we,direction:R,listHeight:T,listItemHeight:Q,childrenAsData:N,maxCount:F,optionRender:$})},[F,J,Re,Ct,Dt,et,w,He,oe,_,g,R,T,Q,N,$]);return b(p0.Provider,{value:Ke},b(Z3,xe({},H,{id:X,prefixCls:o,ref:e,omitDomProps:w6,mode:r,displayValues:Ie,onDisplayValuesChange:it,direction:R,searchValue:fe,onSearch:ke,autoClearSearchValue:f,onSearchSplit:ct,dropdownMatchSelectWidth:g,OptionList:m6,emptyOptions:!Re.length,activeValue:ft,activeDescendantId:"".concat(X,"_list_").concat(gn)})))}),O0=_6;O0.Option=v0;O0.OptGroup=g0;function kd(t,e,n){return U({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const Yf=(t,e)=>e||t,T6=()=>{const[,t]=Or(),[e]=Ii("Empty"),r=new Vt(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return b("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},b("title",null,(e==null?void 0:e.description)||"Empty"),b("g",{fill:"none",fillRule:"evenodd"},b("g",{transform:"translate(24 31.67)"},b("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),b("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),b("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),b("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),b("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),b("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),b("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},b("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),b("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},R6=()=>{const[,t]=Or(),[e]=Ii("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:o}=t,{borderColor:a,shadowColor:s,contentColor:l}=ve(()=>({borderColor:new Vt(n).onBackground(o).toHexString(),shadowColor:new Vt(r).onBackground(o).toHexString(),contentColor:new Vt(i).onBackground(o).toHexString()}),[n,r,i,o]);return b("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},b("title",null,(e==null?void 0:e.description)||"Empty"),b("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},b("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),b("g",{fillRule:"nonzero",stroke:a},b("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),b("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))},I6=t=>{const{componentCls:e,margin:n,marginXS:r,marginXL:i,fontSize:o,lineHeight:a}=t;return{[e]:{marginInline:r,fontSize:o,lineHeight:a,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:r,opacity:t.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${e}-description`]:{color:t.colorTextDescription},[`${e}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:t.colorTextDescription,[`${e}-description`]:{color:t.colorTextDescription},[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:r,color:t.colorTextDescription,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},M6=Ft("Empty",t=>{const{componentCls:e,controlHeightLG:n,calc:r}=t,i=It(t,{emptyImgCls:`${e}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return I6(i)});var E6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var e;const{className:n,rootClassName:r,prefixCls:i,image:o,description:a,children:s,imageStyle:l,style:c,classNames:u,styles:d}=t,f=E6(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:h,direction:m,className:p,style:g,classNames:O,styles:v,image:y}=Zn("empty"),S=h("empty",i),[x,$,C]=M6(S),[P]=Ii("Empty"),w=typeof a<"u"?a:P==null?void 0:P.description,_=typeof w=="string"?w:"empty",R=(e=o??y)!==null&&e!==void 0?e:R2;let I=null;return typeof R=="string"?I=b("img",{draggable:!1,alt:_,src:R}):I=R,x(b("div",Object.assign({className:U($,C,S,p,{[`${S}-normal`]:R===I2,[`${S}-rtl`]:m==="rtl"},n,r,O.root,u==null?void 0:u.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},v.root),g),d==null?void 0:d.root),c)},f),b("div",{className:U(`${S}-image`,O.image,u==null?void 0:u.image),style:Object.assign(Object.assign(Object.assign({},l),v.image),d==null?void 0:d.image)},I),w&&b("div",{className:U(`${S}-description`,O.description,u==null?void 0:u.description),style:Object.assign(Object.assign({},v.description),d==null?void 0:d.description)},w),s&&b("div",{className:U(`${S}-footer`,O.footer,u==null?void 0:u.footer),style:Object.assign(Object.assign({},v.footer),d==null?void 0:d.footer)},s)))};ta.PRESENTED_IMAGE_DEFAULT=R2;ta.PRESENTED_IMAGE_SIMPLE=I2;const M2=t=>{const{componentName:e}=t,{getPrefixCls:n}=he(lt),r=n("empty");switch(e){case"Table":case"List":return K.createElement(ta,{image:ta.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return K.createElement(ta,{image:ta.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return K.createElement(ta,null)}},Kf=(t,e,n=void 0)=>{var r,i;const{variant:o,[t]:a}=he(lt),s=he(Vw),l=a==null?void 0:a.variant;let c;typeof e<"u"?c=e:n===!1?c="borderless":c=(i=(r=s??l)!==null&&r!==void 0?r:o)!==null&&i!==void 0?i:"outlined";const u=hk.includes(c);return[c,u]},k6=t=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function A6(t,e){return t||k6(e)}const Yy=t=>{const{optionHeight:e,optionFontSize:n,optionLineHeight:r,optionPadding:i}=t;return{position:"relative",display:"block",minHeight:e,padding:i,color:t.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},Q6=t=>{const{antCls:e,componentCls:n}=t,r=`${n}-item`,i=`&${e}-slide-up-enter${e}-slide-up-enter-active`,o=`&${e}-slide-up-appear${e}-slide-up-appear-active`,a=`&${e}-slide-up-leave${e}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},Sn(t)),{position:"absolute",top:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",padding:t.paddingXXS,overflow:"hidden",fontSize:t.fontSize,fontVariant:"initial",backgroundColor:t.colorBgElevated,borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,[` ${i}${s}bottomLeft, ${o}${s}bottomLeft - `]:{animationName:Vv},[` + `]:{animationName:Jv},[` ${i}${s}topLeft, ${o}${s}topLeft, ${i}${s}topRight, ${o}${s}topRight - `]:{animationName:Xv},[`${a}${s}bottomLeft`]:{animationName:Hv},[` + `]:{animationName:t0},[`${a}${s}bottomLeft`]:{animationName:e0},[` ${a}${s}topLeft, ${a}${s}topRight - `]:{animationName:Zv},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},Dy(t)),{cursor:"pointer",transition:`background ${t.motionDurationSlow} ease`,borderRadius:t.borderRadiusSM,"&-group":{color:t.colorTextDescription,fontSize:t.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},ba),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:t.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:t.optionSelectedColor,fontWeight:t.optionSelectedFontWeight,backgroundColor:t.optionSelectedBg,[`${r}-option-state`]:{color:t.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:t.colorBgContainerDisabled},color:t.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:t.calc(t.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},Dy(t)),{color:t.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Lo(t,"slide-up"),Lo(t,"slide-down"),Cd(t,"move-up"),Cd(t,"move-down")]},x6=t=>{const{multipleSelectItemHeight:e,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=t,o=t.max(t.calc(n).sub(r).equal(),0),a=t.max(t.calc(o).sub(i).equal(),0);return{basePadding:o,containerPadding:a,itemHeight:q(e),itemLineHeight:q(t.calc(e).sub(t.calc(t.lineWidth).mul(2)).equal())}},C6=t=>{const{multipleSelectItemHeight:e,selectHeight:n,lineWidth:r}=t;return t.calc(n).sub(e).div(2).sub(r).equal()},$6=t=>{const{componentCls:e,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:o,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=t;return{[`${e}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${e}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:r,cursor:"default",transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:t.calc(u).mul(2).equal(),paddingInlineStart:o,paddingInlineEnd:t.calc(o).div(2).equal(),[`${e}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:t.calc(o).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},As()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},w6=(t,e)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=t,i=`${n}-selection-overflow`,o=t.multipleSelectItemHeight,a=C6(t),s=e?`${n}-${e}`:"",l=x6(t);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},$6(t)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:t.borderRadius,[`${n}-disabled&`]:{background:t.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${q(r)} 0`,lineHeight:q(o),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:q(l.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:q(o),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${i}-item + ${i}-item, + `]:{animationName:n0},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},Yy(t)),{cursor:"pointer",transition:`background ${t.motionDurationSlow} ease`,borderRadius:t.borderRadiusSM,"&-group":{color:t.colorTextDescription,fontSize:t.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Sa),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:t.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:t.optionSelectedColor,fontWeight:t.optionSelectedFontWeight,backgroundColor:t.optionSelectedBg,[`${r}-option-state`]:{color:t.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:t.colorBgContainerDisabled},color:t.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:t.calc(t.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},Yy(t)),{color:t.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Lo(t,"slide-up"),Lo(t,"slide-down"),Id(t,"move-up"),Id(t,"move-down")]},N6=t=>{const{multipleSelectItemHeight:e,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=t,o=t.max(t.calc(n).sub(r).equal(),0),a=t.max(t.calc(o).sub(i).equal(),0);return{basePadding:o,containerPadding:a,itemHeight:V(e),itemLineHeight:V(t.calc(e).sub(t.calc(t.lineWidth).mul(2)).equal())}},z6=t=>{const{multipleSelectItemHeight:e,selectHeight:n,lineWidth:r}=t;return t.calc(n).sub(e).div(2).sub(r).equal()},j6=t=>{const{componentCls:e,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:o,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=t;return{[`${e}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${e}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:r,cursor:"default",transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:t.calc(u).mul(2).equal(),paddingInlineStart:o,paddingInlineEnd:t.calc(o).div(2).equal(),[`${e}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:t.calc(o).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},zs()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},L6=(t,e)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=t,i=`${n}-selection-overflow`,o=t.multipleSelectItemHeight,a=z6(t),s=e?`${n}-${e}`:"",l=N6(t);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},j6(t)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:t.borderRadius,[`${n}-disabled&`]:{background:t.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${V(r)} 0`,lineHeight:V(o),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:V(l.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:V(o),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${i}-item + ${i}-item, ${n}-prefix + ${n}-selection-wrap - `]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:l.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:o,fontFamily:t.fontFamily,lineHeight:q(o),transition:`all ${t.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:t.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${t.motionDurationSlow}`}})}};function Hh(t,e){const{componentCls:n}=t,r=e?`${n}-${e}`:"",i={[`${n}-multiple${r}`]:{fontSize:t.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[` + `]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:l.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:o,fontFamily:t.fontFamily,lineHeight:V(o),transition:`all ${t.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:t.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${t.motionDurationSlow}`}})}};function tm(t,e){const{componentCls:n}=t,r=e?`${n}-${e}`:"",i={[`${n}-multiple${r}`]:{fontSize:t.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[` &${n}-show-arrow ${n}-selector, &${n}-allow-clear ${n}-selector - `]:{paddingInlineEnd:t.calc(t.fontSizeIcon).add(t.controlPaddingHorizontal).equal()}}};return[w6(t,e),i]}const P6=t=>{const{componentCls:e}=t,n=kt(t,{selectHeight:t.controlHeightSM,multipleSelectItemHeight:t.multipleItemHeightSM,borderRadius:t.borderRadiusSM,borderRadiusSM:t.borderRadiusXS}),r=kt(t,{fontSize:t.fontSizeLG,selectHeight:t.controlHeightLG,multipleSelectItemHeight:t.multipleItemHeightLG,borderRadius:t.borderRadiusLG,borderRadiusSM:t.borderRadius});return[Hh(t),Hh(n,"sm"),{[`${e}-multiple${e}-sm`]:{[`${e}-selection-placeholder`]:{insetInline:t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal()},[`${e}-selection-search`]:{marginInlineStart:2}}},Hh(r,"lg")]};function Xh(t,e){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:i}=t,o=t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),a=e?`${n}-${e}`:"";return{[`${n}-single${a}`]:{fontSize:t.fontSize,height:t.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},wn(t,!0)),{display:"flex",borderRadius:i,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:q(o)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[` + `]:{paddingInlineEnd:t.calc(t.fontSizeIcon).add(t.controlPaddingHorizontal).equal()}}};return[L6(t,e),i]}const D6=t=>{const{componentCls:e}=t,n=It(t,{selectHeight:t.controlHeightSM,multipleSelectItemHeight:t.multipleItemHeightSM,borderRadius:t.borderRadiusSM,borderRadiusSM:t.borderRadiusXS}),r=It(t,{fontSize:t.fontSizeLG,selectHeight:t.controlHeightLG,multipleSelectItemHeight:t.multipleItemHeightLG,borderRadius:t.borderRadiusLG,borderRadiusSM:t.borderRadius});return[tm(t),tm(n,"sm"),{[`${e}-multiple${e}-sm`]:{[`${e}-selection-placeholder`]:{insetInline:t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal()},[`${e}-selection-search`]:{marginInlineStart:2}}},tm(r,"lg")]};function nm(t,e){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:i}=t,o=t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),a=e?`${n}-${e}`:"";return{[`${n}-single${a}`]:{fontSize:t.fontSize,height:t.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},Sn(t,!0)),{display:"flex",borderRadius:i,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:V(o)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[` ${n}-selection-item, ${n}-selection-placeholder - `]:{display:"block",padding:0,lineHeight:q(o),transition:`all ${t.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` + `]:{display:"block",padding:0,lineHeight:V(o),transition:`all ${t.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` &${n}-show-arrow ${n}-selection-item, &${n}-show-arrow ${n}-selection-search, &${n}-show-arrow ${n}-selection-placeholder - `]:{paddingInlineEnd:t.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:t.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${q(r)}`,[`${n}-selection-search-input`]:{height:o,fontSize:t.fontSize},"&:after":{lineHeight:q(o)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${q(r)}`,"&:after":{display:"none"}}}}}}}function _6(t){const{componentCls:e}=t,n=t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal();return[Xh(t),Xh(kt(t,{controlHeight:t.controlHeightSM,borderRadius:t.borderRadiusSM}),"sm"),{[`${e}-single${e}-sm`]:{[`&:not(${e}-customize-input)`]:{[`${e}-selector`]:{padding:`0 ${q(n)}`},[`&${e}-show-arrow ${e}-selection-search`]:{insetInlineEnd:t.calc(n).add(t.calc(t.fontSize).mul(1.5)).equal()},[` + `]:{paddingInlineEnd:t.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:t.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${V(r)}`,[`${n}-selection-search-input`]:{height:o,fontSize:t.fontSize},"&:after":{lineHeight:V(o)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${V(r)}`,"&:after":{display:"none"}}}}}}}function B6(t){const{componentCls:e}=t,n=t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal();return[nm(t),nm(It(t,{controlHeight:t.controlHeightSM,borderRadius:t.borderRadiusSM}),"sm"),{[`${e}-single${e}-sm`]:{[`&:not(${e}-customize-input)`]:{[`${e}-selector`]:{padding:`0 ${V(n)}`},[`&${e}-show-arrow ${e}-selection-search`]:{insetInlineEnd:t.calc(n).add(t.calc(t.fontSize).mul(1.5)).equal()},[` &${e}-show-arrow ${e}-selection-item, &${e}-show-arrow ${e}-selection-placeholder - `]:{paddingInlineEnd:t.calc(t.fontSize).mul(1.5).equal()}}}},Xh(kt(t,{controlHeight:t.singleItemHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}const T6=t=>{const{fontSize:e,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:o,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:h,colorBgContainer:p,colorFillSecondary:m,colorBgContainerDisabled:g,colorTextDisabled:v,colorPrimaryHover:O,colorPrimary:S,controlOutline:x}=t,b=s*2,C=r*2,$=Math.min(i-b,i-C),w=Math.min(o-b,o-C),P=Math.min(a-b,a-C);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:h,optionPadding:`${(i-e*n)/2}px ${l}px`,optionFontSize:e,optionLineHeight:n,optionHeight:i,selectorBg:p,clearBg:p,singleItemHeightLG:a,multipleItemBg:m,multipleItemBorderColor:"transparent",multipleItemHeight:$,multipleItemHeightSM:w,multipleItemHeightLG:P,multipleSelectorBgDisabled:g,multipleItemColorDisabled:v,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(t.fontSize*1.25),hoverBorderColor:O,activeBorderColor:S,activeOutlineColor:x,selectAffixPadding:s}},m2=(t,e)=>{const{componentCls:n,antCls:r,controlOutlineWidth:i}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${q(t.lineWidth)} ${t.lineType} ${e.borderColor}`,background:t.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,boxShadow:`0 0 0 ${q(i)} ${e.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:e.color}}}},By=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},m2(t,e))}),k6=t=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},m2(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),By(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),By(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),g2=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:e.bg,border:`${q(t.lineWidth)} ${t.lineType} transparent`,color:e.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:e.hoverBg},[`${n}-focused& ${n}-selector`]:{background:t.selectorBg,borderColor:e.activeBorderColor,outline:0}}}},Wy=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},g2(t,e))}),R6=t=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},g2(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor,color:t.colorText})),Wy(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,color:t.colorError})),Wy(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{borderColor:t.colorBorder,background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.colorBgContainer,border:`${q(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}})}),I6=t=>({"&-borderless":{[`${t.componentCls}-selector`]:{background:"transparent",border:`${q(t.lineWidth)} ${t.lineType} transparent`},[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`},[`&${t.componentCls}-status-error`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorError}},[`&${t.componentCls}-status-warning`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorWarning}}}}),v2=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${q(t.lineWidth)} 0`,borderStyle:`none none ${t.lineType} none`,borderColor:e.borderColor,background:t.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,outline:0},[`${n}-prefix`]:{color:e.color}}}},Fy=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},v2(t,e))}),M6=t=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},v2(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),Fy(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),Fy(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),E6=t=>({[t.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},k6(t)),R6(t)),I6(t)),M6(t))}),A6=t=>{const{componentCls:e}=t;return{position:"relative",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,input:{cursor:"pointer"},[`${e}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${e}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Q6=t=>{const{componentCls:e}=t;return{[`${e}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},N6=t=>{const{antCls:e,componentCls:n,inputPaddingHorizontalBase:r,iconCls:i}=t,o={[`${n}-clear`]:{opacity:1,background:t.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},wn(t)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},A6(t)),Q6(t)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},ba),{[`> ${e}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},ba),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},As()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${t.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${t.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:t.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:t.colorIcon}},"@media(hover:none)":o,"&:hover":o}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:t.calc(r).add(t.fontSize).add(t.paddingXS).equal()}}}}}},z6=t=>{const{componentCls:e}=t;return[{[e]:{[`&${e}-in-form-item`]:{width:"100%"}}},N6(t),_6(t),P6(t),S6(t),{[`${e}-rtl`]:{direction:"rtl"}},Yv(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},L6=Zt("Select",(t,{rootPrefixCls:e})=>{const n=kt(t,{rootPrefixCls:e,inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(1).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[z6(n),E6(n)]},T6,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var j6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},D6=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:j6}))},_d=Se(D6),B6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},W6=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:B6}))},O2=Se(W6),F6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},V6=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:F6}))},b2=Se(V6);function H6({suffixIcon:t,clearIcon:e,menuItemSelectedIcon:n,removeIcon:r,loading:i,multiple:o,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:c,showArrow:u,componentName:d}){const f=e??y(zs,null),h=v=>t===null&&!a&&!u?null:y(At,null,l!==!1&&v,a&&c);let p=null;if(t!==void 0)p=h(t);else if(i)p=h(y(yc,{spin:!0}));else{const v=`${s}-suffix`;p=({open:O,showSearch:S})=>h(O&&S?y(b2,{className:v}):y(O2,{className:v}))}let m=null;n!==void 0?m=n:o?m=y(_d,null):m=null;let g=null;return r!==void 0?g=r:g=y(Vi,null),{clearIcon:f,suffixIcon:p,itemIcon:m,removeIcon:g}}function X6(t){return oe.useMemo(()=>{if(t)return(...e)=>oe.createElement(bs,{space:!0},t.apply(void 0,e))},[t])}function Z6(t,e){return e!==void 0?e:t!==null}var q6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r,i,o,a;const{prefixCls:s,bordered:l,className:c,rootClassName:u,getPopupContainer:d,popupClassName:f,dropdownClassName:h,listHeight:p=256,placement:m,listItemHeight:g,size:v,disabled:O,notFoundContent:S,status:x,builtinPlacements:b,dropdownMatchSelectWidth:C,popupMatchSelectWidth:$,direction:w,style:P,allowClear:_,variant:T,dropdownStyle:R,transitionName:k,tagRender:I,maxCount:Q,prefix:M,dropdownRender:E,popupRender:N,onDropdownVisibleChange:z,onOpenChange:L,styles:F,classNames:H}=t,V=q6(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:X,getPrefixCls:B,renderEmpty:G,direction:se,virtual:re,popupMatchSelectWidth:le,popupOverflow:me}=fe(it),{showSearch:ie,style:ne,styles:ue,className:de,classNames:j}=rr("select"),[,ee]=Cr(),he=g??(ee==null?void 0:ee.controlHeight),ve=B("select",s),Y=B(),ce=w??se,{compactSize:te,compactItemClassnames:Oe}=js(ve,ce),[ye,pe]=Ff("select",T,l),Qe=$r(ve),[Me,De,we]=L6(ve,Qe),Ie=ge(()=>{const{mode:We}=t;if(We!=="combobox")return We===y2?"combobox":We},[t.mode]),rt=Ie==="multiple"||Ie==="tags",Ye=Z6(t.suffixIcon,t.showArrow),lt=(n=$??C)!==null&&n!==void 0?n:le,Be=((r=F==null?void 0:F.popup)===null||r===void 0?void 0:r.root)||((i=ue.popup)===null||i===void 0?void 0:i.root)||R,ke=X6(N||E),Xe=L||z,{status:_e,hasFeedback:Pe,isFormItemInput:ct,feedbackIcon:xt}=fe(Jr),Pn=Wf(_e,x);let qt;S!==void 0?qt=S:Ie==="combobox"?qt=null:qt=(G==null?void 0:G("Select"))||y(O6,{componentName:"Select"});const{suffixIcon:xn,itemIcon:gn,removeIcon:Bt,clearIcon:Ot}=H6(Object.assign(Object.assign({},V),{multiple:rt,hasFeedback:Pe,feedbackIcon:xt,showSuffixIcon:Ye,prefixCls:ve,componentName:"Select"})),ht=_===!0?{clearIcon:Ot}:_,et=cn(V,["suffixIcon","itemIcon"]),nt=Z(((o=H==null?void 0:H.popup)===null||o===void 0?void 0:o.root)||((a=j==null?void 0:j.popup)===null||a===void 0?void 0:a.root)||f||h,{[`${ve}-dropdown-${ce}`]:ce==="rtl"},u,j.root,H==null?void 0:H.root,we,Qe,De),Re=Dr(We=>{var st;return(st=v??te)!==null&&st!==void 0?st:We}),ot=fe(qi),dt=O??ot,Ee=Z({[`${ve}-lg`]:Re==="large",[`${ve}-sm`]:Re==="small",[`${ve}-rtl`]:ce==="rtl",[`${ve}-${ye}`]:pe,[`${ve}-in-form-item`]:ct},Pd(ve,Pn,Pe),Oe,de,c,j.root,H==null?void 0:H.root,u,we,Qe,De),Ze=ge(()=>m!==void 0?m:ce==="rtl"?"bottomRight":"bottomLeft",[m,ce]),[Ae]=Sc("SelectLike",Be==null?void 0:Be.zIndex);return Me(y(c0,Object.assign({ref:e,virtual:re,showSearch:ie},et,{style:Object.assign(Object.assign(Object.assign(Object.assign({},ue.root),F==null?void 0:F.root),ne),P),dropdownMatchSelectWidth:lt,transitionName:zo(Y,"slide-up",k),builtinPlacements:y6(b,me),listHeight:p,listItemHeight:he,mode:Ie,prefixCls:ve,placement:Ze,direction:ce,prefix:M,suffixIcon:xn,menuItemSelectedIcon:gn,removeIcon:Bt,allowClear:ht,notFoundContent:qt,className:Ee,getPopupContainer:d||X,dropdownClassName:nt,disabled:dt,dropdownStyle:Object.assign(Object.assign({},Be),{zIndex:Ae}),maxCount:rt?Q:void 0,tagRender:rt?I:void 0,dropdownRender:ke,onDropdownVisibleChange:Xe})))},jn=Se(G6),Y6=Jw(jn,"dropdownAlign");jn.SECRET_COMBOBOX_MODE_DO_NOT_USE=y2;jn.Option=l0;jn.OptGroup=s0;jn._InternalPanelDoNotUseOrYouWillBeFired=Y6;const S2=(t,e)=>{typeof(t==null?void 0:t.addEventListener)<"u"?t.addEventListener("change",e):typeof(t==null?void 0:t.addListener)<"u"&&t.addListener(e)},x2=(t,e)=>{typeof(t==null?void 0:t.removeEventListener)<"u"?t.removeEventListener("change",e):typeof(t==null?void 0:t.removeListener)<"u"&&t.removeListener(e)},ys=["xxl","xl","lg","md","sm","xs"],U6=t=>({xs:`(max-width: ${t.screenXSMax}px)`,sm:`(min-width: ${t.screenSM}px)`,md:`(min-width: ${t.screenMD}px)`,lg:`(min-width: ${t.screenLG}px)`,xl:`(min-width: ${t.screenXL}px)`,xxl:`(min-width: ${t.screenXXL}px)`}),K6=t=>{const e=t,n=[].concat(ys).reverse();return n.forEach((r,i)=>{const o=r.toUpperCase(),a=`screen${o}Min`,s=`screen${o}`;if(!(e[a]<=e[s]))throw new Error(`${a}<=${s} fails : !(${e[a]}<=${e[s]})`);if(i{const[,t]=Cr(),e=U6(K6(t));return oe.useMemo(()=>{const n=new Map;let r=-1,i={};return{responsiveMap:e,matchHandlers:{},dispatch(o){return i=o,n.forEach(a=>a(i)),n.size>=1},subscribe(o){return n.size||this.register(),r+=1,n.set(r,o),o(i),r},unsubscribe(o){n.delete(o),n.size||this.unregister()},register(){Object.entries(e).forEach(([o,a])=>{const s=({matches:c})=>{this.dispatch(Object.assign(Object.assign({},i),{[o]:c}))},l=window.matchMedia(a);S2(l,s),this.matchHandlers[a]={mql:l,listener:s},s(l)})},unregister(){Object.values(e).forEach(o=>{const a=this.matchHandlers[o];x2(a==null?void 0:a.mql,a==null?void 0:a.listener)}),n.clear()}}},[t])};function eL(){const[,t]=Ms(e=>e+1,0);return t}function C2(t=!0,e={}){const n=U(e),r=eL(),i=J6();return Nt(()=>{const o=i.subscribe(a=>{n.current=a,t&&r()});return()=>i.unsubscribe(o)},[]),n.current}const Vm=bt({}),tL=t=>{const{antCls:e,componentCls:n,iconCls:r,avatarBg:i,avatarColor:o,containerSize:a,containerSizeLG:s,containerSizeSM:l,textFontSize:c,textFontSizeLG:u,textFontSizeSM:d,iconFontSize:f,iconFontSizeLG:h,iconFontSizeSM:p,borderRadius:m,borderRadiusLG:g,borderRadiusSM:v,lineWidth:O,lineType:S}=t,x=(b,C,$,w)=>({width:b,height:b,borderRadius:"50%",fontSize:C,[`&${n}-square`]:{borderRadius:w},[`&${n}-icon`]:{fontSize:$,[`> ${r}`]:{margin:0}}});return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:o,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:i,border:`${q(O)} ${S} transparent`,"&-image":{background:"transparent"},[`${e}-image-img`]:{display:"block"}}),x(a,c,f,m)),{"&-lg":Object.assign({},x(s,u,h,g)),"&-sm":Object.assign({},x(l,d,p,v)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},nL=t=>{const{componentCls:e,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=t;return{[`${e}-group`]:{display:"inline-flex",[e]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${e}-group-popover`]:{[`${e} + ${e}`]:{marginInlineStart:i}}}},rL=t=>{const{controlHeight:e,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:o,fontSizeXL:a,fontSizeHeading3:s,marginXS:l,marginXXS:c,colorBorderBg:u}=t;return{containerSize:e,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((o+a)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:c,groupOverlapping:-l,groupBorderColor:u}},$2=Zt("Avatar",t=>{const{colorTextLightSolid:e,colorTextPlaceholder:n}=t,r=kt(t,{avatarBg:n,avatarColor:e});return[tL(r),nL(r)]},rL);var iL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,shape:r,size:i,src:o,srcSet:a,icon:s,className:l,rootClassName:c,style:u,alt:d,draggable:f,children:h,crossOrigin:p,gap:m=4,onError:g}=t,v=iL(t,["prefixCls","shape","size","src","srcSet","icon","className","rootClassName","style","alt","draggable","children","crossOrigin","gap","onError"]),[O,S]=J(1),[x,b]=J(!1),[C,$]=J(!0),w=U(null),P=U(null),_=pr(e,w),{getPrefixCls:T,avatar:R}=fe(it),k=fe(Vm),I=()=>{if(!P.current||!w.current)return;const ie=P.current.offsetWidth,ne=w.current.offsetWidth;ie!==0&&ne!==0&&m*2{b(!0)},[]),be(()=>{$(!0),S(1)},[o]),be(I,[m]);const Q=()=>{(g==null?void 0:g())!==!1&&$(!1)},M=Dr(ie=>{var ne,ue;return(ue=(ne=i??(k==null?void 0:k.size))!==null&&ne!==void 0?ne:ie)!==null&&ue!==void 0?ue:"default"}),E=Object.keys(typeof M=="object"?M||{}:{}).some(ie=>["xs","sm","md","lg","xl","xxl"].includes(ie)),N=C2(E),z=ge(()=>{if(typeof M!="object")return{};const ie=ys.find(ue=>N[ue]),ne=M[ie];return ne?{width:ne,height:ne,fontSize:ne&&(s||h)?ne/2:18}:{}},[N,M]),L=T("avatar",n),F=$r(L),[H,V,X]=$2(L,F),B=Z({[`${L}-lg`]:M==="large",[`${L}-sm`]:M==="small"}),G=Kt(o),se=r||(k==null?void 0:k.shape)||"circle",re=Z(L,B,R==null?void 0:R.className,`${L}-${se}`,{[`${L}-image`]:G||o&&C,[`${L}-icon`]:!!s},X,F,l,c,V),le=typeof M=="number"?{width:M,height:M,fontSize:s?M/2:18}:{};let me;if(typeof o=="string"&&C)me=y("img",{src:o,draggable:f,srcSet:a,onError:Q,alt:d,crossOrigin:p});else if(G)me=o;else if(s)me=s;else if(x||O!==1){const ie=`scale(${O})`,ne={msTransform:ie,WebkitTransform:ie,transform:ie};me=y(Kr,{onResize:I},y("span",{className:`${L}-string`,ref:P,style:Object.assign({},ne)},h))}else me=y("span",{className:`${L}-string`,style:{opacity:0},ref:P},h);return H(y("span",Object.assign({},v,{style:Object.assign(Object.assign(Object.assign(Object.assign({},le),z),R==null?void 0:R.style),u),className:re,ref:_}),me))}),Ss=t=>t?typeof t=="function"?t():t:null;function u0(t){var e=t.children,n=t.prefixCls,r=t.id,i=t.overlayInnerStyle,o=t.bodyClassName,a=t.className,s=t.style;return y("div",{className:Z("".concat(n,"-content"),a),style:s},y("div",{className:Z("".concat(n,"-inner"),o),id:r,role:"tooltip",style:i},typeof e=="function"?e():e))}var La={shiftX:64,adjustY:1},ja={adjustX:1,shiftY:!0},ri=[0,0],oL={left:{points:["cr","cl"],overflow:ja,offset:[-4,0],targetOffset:ri},right:{points:["cl","cr"],overflow:ja,offset:[4,0],targetOffset:ri},top:{points:["bc","tc"],overflow:La,offset:[0,-4],targetOffset:ri},bottom:{points:["tc","bc"],overflow:La,offset:[0,4],targetOffset:ri},topLeft:{points:["bl","tl"],overflow:La,offset:[0,-4],targetOffset:ri},leftTop:{points:["tr","tl"],overflow:ja,offset:[-4,0],targetOffset:ri},topRight:{points:["br","tr"],overflow:La,offset:[0,-4],targetOffset:ri},rightTop:{points:["tl","tr"],overflow:ja,offset:[4,0],targetOffset:ri},bottomRight:{points:["tr","br"],overflow:La,offset:[0,4],targetOffset:ri},rightBottom:{points:["bl","br"],overflow:ja,offset:[4,0],targetOffset:ri},bottomLeft:{points:["tl","bl"],overflow:La,offset:[0,4],targetOffset:ri},leftBottom:{points:["br","bl"],overflow:ja,offset:[-4,0],targetOffset:ri}},aL=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],sL=function(e,n){var r=e.overlayClassName,i=e.trigger,o=i===void 0?["hover"]:i,a=e.mouseEnterDelay,s=a===void 0?0:a,l=e.mouseLeaveDelay,c=l===void 0?.1:l,u=e.overlayStyle,d=e.prefixCls,f=d===void 0?"rc-tooltip":d,h=e.children,p=e.onVisibleChange,m=e.afterVisibleChange,g=e.transitionName,v=e.animation,O=e.motion,S=e.placement,x=S===void 0?"right":S,b=e.align,C=b===void 0?{}:b,$=e.destroyTooltipOnHide,w=$===void 0?!1:$,P=e.defaultVisible,_=e.getTooltipContainer,T=e.overlayInnerStyle;e.arrowContent;var R=e.overlay,k=e.id,I=e.showArrow,Q=I===void 0?!0:I,M=e.classNames,E=e.styles,N=ut(e,aL),z=Jv(k),L=U(null);Yt(n,function(){return L.current});var F=W({},N);"visible"in e&&(F.popupVisible=e.visible);var H=function(){return y(u0,{key:"content",prefixCls:f,id:z,bodyClassName:M==null?void 0:M.body,overlayInnerStyle:W(W({},T),E==null?void 0:E.body)},R)},V=function(){var B=Ao.only(h),G=(B==null?void 0:B.props)||{},se=W(W({},G),{},{"aria-describedby":R?z:null});return Xn(h,se)};return y(Bf,Ce({popupClassName:Z(r,M==null?void 0:M.root),prefixCls:f,popup:H,action:o,builtinPlacements:oL,popupPlacement:x,ref:L,popupAlign:C,getPopupContainer:_,onPopupVisibleChange:p,afterPopupVisibleChange:m,popupTransitionName:g,popupAnimation:v,popupMotion:O,defaultPopupVisible:P,autoDestroy:w,mouseLeaveDelay:c,popupStyle:W(W({},u),E==null?void 0:E.root),mouseEnterDelay:s,arrow:Q},F),V())};const lL=Se(sL);function d0(t){const{sizePopupArrow:e,borderRadiusXS:n,borderRadiusOuter:r}=t,i=e/2,o=0,a=i,s=r*1/Math.sqrt(2),l=i-r*(1-1/Math.sqrt(2)),c=i-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*i-c,f=u,h=2*i-s,p=l,m=2*i-o,g=a,v=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),O=r*(Math.sqrt(2)-1),S=`polygon(${O}px 100%, 50% ${O}px, ${2*i-O}px 100%, ${O}px 100%)`,x=`path('M ${o} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${h} ${p} A ${r} ${r} 0 0 0 ${m} ${g} Z')`;return{arrowShadowWidth:v,arrowPath:x,arrowPolygon:S}}const cL=(t,e,n)=>{const{sizePopupArrow:r,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=t;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:e,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${q(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},P2=8;function Vf(t){const{contentRadius:e,limitVerticalRadius:n}=t,r=e>12?e+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?P2:r}}function iu(t,e){return t?e:{}}function f0(t,e,n){const{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=t,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},cL(t,e,i)),{"&:before":{background:e}})]},iu(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${q(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),iu(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${q(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),iu(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:o},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:o}})),iu(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:o},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:o}}))}}function uL(t,e,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const i=r&&typeof r=="object"?r:{},o={};switch(t){case"top":case"bottom":o.shiftX=e.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=e.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const Vy={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},dL={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},fL=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function _2(t){const{arrowWidth:e,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o,visibleFirst:a}=t,s=e/2,l={},c=Vf({contentRadius:o,limitVerticalRadius:!0});return Object.keys(Vy).forEach(u=>{const d=r&&dL[u]||Vy[u],f=Object.assign(Object.assign({},d),{offset:[0,0],dynamicInset:!0});switch(l[u]=f,fL.has(u)&&(f.autoArrow=!1),u){case"top":case"topLeft":case"topRight":f.offset[1]=-s-i;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+i;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-i;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+i;break}if(r)switch(u){case"topLeft":case"bottomLeft":f.offset[0]=-c.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=c.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-c.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=c.arrowOffsetHorizontal*2-s;break}f.overflow=uL(u,c,e,n),a&&(f.htmlRegion="visibleFirst")}),l}const hL=t=>{const{calc:e,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:h}=t,p=e(a).add(h).add(f).equal(),m=e(a).mul(2).add(h).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${n}-inner`]:{minWidth:m,minHeight:l,padding:`${q(t.calc(u).div(2).equal())} ${q(d)}`,color:`var(--ant-tooltip-color, ${i})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:p},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:t.min(a,P2)}},[`${n}-content`]:{position:"relative"}}),k$(t,(g,{darkColor:v})=>({[`&${n}-${g}`]:{[`${n}-inner`]:{backgroundColor:v},[`${n}-arrow`]:{"--antd-arrow-background-color":v}}}))),{"&-rtl":{direction:"rtl"}})},f0(t,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow}}]},pL=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+70},Vf({contentRadius:t.borderRadius,limitVerticalRadius:!0})),d0(kt(t,{borderRadiusOuter:Math.min(t.borderRadiusOuter,4)}))),T2=(t,e=!0)=>Zt("Tooltip",r=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:a}=r,s=kt(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a});return[hL(s),Cc(r,"zoom-big-fast")]},pL,{resetStyle:!1,injectStyle:e})(t),mL=Qo.map(t=>`${t}-inverse`),gL=["success","processing","error","default","warning"];function k2(t,e=!0){return e?[].concat($e(mL),$e(Qo)).includes(t):Qo.includes(t)}function vL(t){return gL.includes(t)}function R2(t,e){const n=k2(e),r=Z({[`${t}-${e}`]:e&&n}),i={},o={},a=AQ(e).toRgb(),l=(.299*a.r+.587*a.g+.114*a.b)/255<.5?"#FFF":"#000";return e&&!n&&(i.background=e,i["--ant-tooltip-color"]=l,o["--antd-arrow-background-color"]=e),{className:r,overlayStyle:i,arrowStyle:o}}const OL=t=>{const{prefixCls:e,className:n,placement:r="top",title:i,color:o,overlayInnerStyle:a}=t,{getPrefixCls:s}=fe(it),l=s("tooltip",e),[c,u,d]=T2(l),f=R2(l,o),h=f.arrowStyle,p=Object.assign(Object.assign({},a),f.overlayStyle),m=Z(u,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return c(y("div",{className:m,style:h},y("div",{className:`${l}-arrow`}),y(u0,Object.assign({},t,{className:u,prefixCls:l,overlayInnerStyle:p}),i)))};var bL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,openClassName:o,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:f,destroyOnHidden:h,arrow:p=!0,title:m,overlay:g,builtinPlacements:v,arrowPointAtCenter:O=!1,autoAdjustOverflow:S=!0,motion:x,getPopupContainer:b,placement:C="top",mouseEnterDelay:$=.1,mouseLeaveDelay:w=.1,overlayStyle:P,rootClassName:_,overlayClassName:T,styles:R,classNames:k}=t,I=bL(t,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),Q=!!p,[,M]=Cr(),{getPopupContainer:E,getPrefixCls:N,direction:z,className:L,style:F,classNames:H,styles:V}=rr("tooltip"),X=bc(),B=U(null),G=()=>{var Ye;(Ye=B.current)===null||Ye===void 0||Ye.forceAlign()};Yt(e,()=>{var Ye,lt;return{forceAlign:G,forcePopupAlign:()=>{X.deprecated(!1,"forcePopupAlign","forceAlign"),G()},nativeElement:(Ye=B.current)===null||Ye===void 0?void 0:Ye.nativeElement,popupElement:(lt=B.current)===null||lt===void 0?void 0:lt.popupElement}});const[se,re]=_n(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),le=!m&&!g&&m!==0,me=Ye=>{var lt,Be;re(le?!1:Ye),le||((lt=t.onOpenChange)===null||lt===void 0||lt.call(t,Ye),(Be=t.onVisibleChange)===null||Be===void 0||Be.call(t,Ye))},ie=ge(()=>{var Ye,lt;let Be=O;return typeof p=="object"&&(Be=(lt=(Ye=p.pointAtCenter)!==null&&Ye!==void 0?Ye:p.arrowPointAtCenter)!==null&<!==void 0?lt:O),v||_2({arrowPointAtCenter:Be,autoAdjustOverflow:S,arrowWidth:Q?M.sizePopupArrow:0,borderRadius:M.borderRadius,offset:M.marginXXS,visibleFirst:!0})},[O,p,v,M]),ne=ge(()=>m===0?m:g||m||"",[g,m]),ue=y(bs,{space:!0},typeof ne=="function"?ne():ne),de=N("tooltip",i),j=N(),ee=t["data-popover-inject"];let he=se;!("open"in t)&&!("visible"in t)&&le&&(he=!1);const ve=Kt(c)&&!G$(c)?c:y("span",null,c),Y=ve.props,ce=!Y.className||typeof Y.className=="string"?Z(Y.className,o||`${de}-open`):Y.className,[te,Oe,ye]=T2(de,!ee),pe=R2(de,s),Qe=pe.arrowStyle,Me=Z(T,{[`${de}-rtl`]:z==="rtl"},pe.className,_,Oe,ye,L,H.root,k==null?void 0:k.root),De=Z(H.body,k==null?void 0:k.body),[we,Ie]=Sc("Tooltip",I.zIndex),rt=y(lL,Object.assign({},I,{zIndex:we,showArrow:Q,placement:C,mouseEnterDelay:$,mouseLeaveDelay:w,prefixCls:de,classNames:{root:Me,body:De},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Qe),V.root),F),P),R==null?void 0:R.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},V.body),l),R==null?void 0:R.body),pe.overlayStyle)},getTooltipContainer:b||a||E,ref:B,builtinPlacements:ie,overlay:ue,visible:he,onVisibleChange:me,afterVisibleChange:u??d,arrowContent:y("span",{className:`${de}-arrow-content`}),motion:{motionName:zo(j,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:h??!!f}),he?fr(ve,{className:ce}):ve);return te(y(_f.Provider,{value:Ie},rt))}),on=yL;on._InternalPanelDoNotUseOrYouWillBeFired=OL;const SL=t=>{const{componentCls:e,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:o,boxShadowSecondary:a,colorTextHeading:s,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:h,innerContentPadding:p,titlePadding:m}=t;return[{[e]:Object.assign(Object.assign({},wn(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":d,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:l,boxShadow:a,padding:o},[`${e}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:h,padding:m},[`${e}-inner-content`]:{color:n,padding:p}})},f0(t,"var(--antd-arrow-background-color)"),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow,display:"inline-block",[`${e}-content`]:{display:"inline-block"}}}]},xL=t=>{const{componentCls:e}=t;return{[e]:Qo.map(n=>{const r=t[`${n}6`];return{[`&${e}-${n}`]:{"--antd-arrow-background-color":r,[`${e}-inner`]:{backgroundColor:r},[`${e}-arrow`]:{background:"transparent"}}}})}},CL=t=>{const{lineWidth:e,controlHeight:n,fontHeight:r,padding:i,wireframe:o,zIndexPopupBase:a,borderRadiusLG:s,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=t,f=n-r,h=f/2,p=f/2-e,m=i;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},d0(t)),Vf({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:o?0:12,titleMarginBottom:o?0:l,titlePadding:o?`${h}px ${m}px ${p}px`:0,titleBorderBottom:o?`${e}px ${c} ${u}`:"none",innerContentPadding:o?`${d}px ${m}px`:0})},I2=Zt("Popover",t=>{const{colorBgElevated:e,colorText:n}=t,r=kt(t,{popoverBg:e,popoverColor:n});return[SL(r),xL(r),Cc(r,"zoom-big")]},CL,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var $L=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i!t&&!e?null:y(At,null,t&&y("div",{className:`${n}-title`},t),e&&y("div",{className:`${n}-inner-content`},e)),wL=t=>{const{hashId:e,prefixCls:n,className:r,style:i,placement:o="top",title:a,content:s,children:l}=t,c=Ss(a),u=Ss(s),d=Z(e,n,`${n}-pure`,`${n}-placement-${o}`,r);return y("div",{className:d,style:i},y("div",{className:`${n}-arrow`}),y(u0,Object.assign({},t,{className:e,prefixCls:n}),l||y(M2,{prefixCls:n,title:c,content:u})))},E2=t=>{const{prefixCls:e,className:n}=t,r=$L(t,["prefixCls","className"]),{getPrefixCls:i}=fe(it),o=i("popover",e),[a,s,l]=I2(o);return a(y(wL,Object.assign({},r,{prefixCls:o,hashId:s,className:Z(n,l)})))};var PL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,title:o,content:a,overlayClassName:s,placement:l="top",trigger:c="hover",children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:f=.1,onOpenChange:h,overlayStyle:p={},styles:m,classNames:g}=t,v=PL(t,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:O,className:S,style:x,classNames:b,styles:C}=rr("popover"),$=O("popover",i),[w,P,_]=I2($),T=O(),R=Z(s,P,_,S,b.root,g==null?void 0:g.root),k=Z(b.body,g==null?void 0:g.body),[I,Q]=_n(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),M=(F,H)=>{Q(F,!0),h==null||h(F,H)},E=F=>{F.keyCode===je.ESC&&M(!1,F)},N=F=>{M(F)},z=Ss(o),L=Ss(a);return w(y(on,Object.assign({placement:l,trigger:c,mouseEnterDelay:d,mouseLeaveDelay:f},v,{prefixCls:$,classNames:{root:R,body:k},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},C.root),x),p),m==null?void 0:m.root),body:Object.assign(Object.assign({},C.body),m==null?void 0:m.body)},ref:e,open:I,onOpenChange:N,overlay:z||L?y(M2,{prefixCls:$,title:z,content:L}):null,transitionName:zo(T,"zoom-big",v.transitionName),"data-popover-inject":!0}),fr(u,{onKeyDown:F=>{var H,V;Kt(u)&&((V=u==null?void 0:(H=u.props).onKeyDown)===null||V===void 0||V.call(H,F)),E(F)}})))}),h0=_L;h0._InternalPanelDoNotUseOrYouWillBeFired=E2;const Hy=t=>{const{size:e,shape:n}=fe(Vm),r=ge(()=>({size:t.size||e,shape:t.shape||n}),[t.size,t.shape,e,n]);return y(Vm.Provider,{value:r},t.children)},TL=t=>{var e,n,r,i;const{getPrefixCls:o,direction:a}=fe(it),{prefixCls:s,className:l,rootClassName:c,style:u,maxCount:d,maxStyle:f,size:h,shape:p,maxPopoverPlacement:m,maxPopoverTrigger:g,children:v,max:O}=t,S=o("avatar",s),x=`${S}-group`,b=$r(S),[C,$,w]=$2(S,b),P=Z(x,{[`${x}-rtl`]:a==="rtl"},w,b,l,c,$),_=nr(v).map((k,I)=>fr(k,{key:`avatar-key-${I}`})),T=(O==null?void 0:O.count)||d,R=_.length;if(T&&Ttypeof t!="object"&&typeof t!="function"||t===null;var Q2=bt(null);function N2(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function z2(t){var e=fe(Q2);return N2(e,t)}var jL=["children","locked"],wi=bt(null);function DL(t,e){var n=W({},t);return Object.keys(e).forEach(function(r){var i=e[r];i!==void 0&&(n[r]=i)}),n}function Zl(t){var e=t.children,n=t.locked,r=ut(t,jL),i=fe(wi),o=vc(function(){return DL(i,r)},[i,r],function(a,s){return!n&&(a[0]!==s[0]||!Dl(a[1],s[1],!0))});return y(wi.Provider,{value:o},e)}var BL=[],L2=bt(null);function Hf(){return fe(L2)}var j2=bt(BL);function Ws(t){var e=fe(j2);return ge(function(){return t!==void 0?[].concat($e(e),[t]):e},[e,t])}var D2=bt(null),m0=bt({});function Xy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(kf(t)){var n=t.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||t.isContentEditable||n==="a"&&!!t.getAttribute("href"),i=t.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&a===null&&(a=0),r&&t.disabled&&(a=null),a!==null&&(a>=0||e&&a<0)}return!1}function WL(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=$e(t.querySelectorAll("*")).filter(function(r){return Xy(r,e)});return Xy(t,e)&&n.unshift(t),n}var Xm=je.LEFT,Zm=je.RIGHT,qm=je.UP,Hu=je.DOWN,Xu=je.ENTER,B2=je.ESC,el=je.HOME,tl=je.END,Zy=[qm,Hu,Xm,Zm];function FL(t,e,n,r){var i,o="prev",a="next",s="children",l="parent";if(t==="inline"&&r===Xu)return{inlineTrigger:!0};var c=D(D({},qm,o),Hu,a),u=D(D(D(D({},Xm,n?a:o),Zm,n?o:a),Hu,s),Xu,s),d=D(D(D(D(D(D({},qm,o),Hu,a),Xu,s),B2,l),Xm,n?s:l),Zm,n?l:s),f={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},h=(i=f["".concat(t).concat(e?"":"Sub")])===null||i===void 0?void 0:i[r];switch(h){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function VL(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function HL(t,e){for(var n=t||document.activeElement;n;){if(e.has(n))return n;n=n.parentElement}return null}function g0(t,e){var n=WL(t,!0);return n.filter(function(r){return e.has(r)})}function qy(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var i=g0(t,e),o=i.length,a=i.findIndex(function(s){return n===s});return r<0?a===-1?a=o-1:a-=1:r>0&&(a+=1),a=(a+o)%o,i[a]}var Gm=function(e,n){var r=new Set,i=new Map,o=new Map;return e.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(N2(n,a),"']"));s&&(r.add(s),o.set(s,a),i.set(a,s))}),{elements:r,key2element:i,element2key:o}};function XL(t,e,n,r,i,o,a,s,l,c){var u=U(),d=U();d.current=e;var f=function(){Xt.cancel(u.current)};return be(function(){return function(){f()}},[]),function(h){var p=h.which;if([].concat(Zy,[Xu,B2,el,tl]).includes(p)){var m=o(),g=Gm(m,r),v=g,O=v.elements,S=v.key2element,x=v.element2key,b=S.get(e),C=HL(b,O),$=x.get(C),w=FL(t,a($,!0).length===1,n,p);if(!w&&p!==el&&p!==tl)return;(Zy.includes(p)||[el,tl].includes(p))&&h.preventDefault();var P=function(E){if(E){var N=E,z=E.querySelector("a");z!=null&&z.getAttribute("href")&&(N=z);var L=x.get(E);s(L),f(),u.current=Xt(function(){d.current===L&&N.focus()})}};if([el,tl].includes(p)||w.sibling||!C){var _;!C||t==="inline"?_=i.current:_=VL(C);var T,R=g0(_,O);p===el?T=R[0]:p===tl?T=R[R.length-1]:T=qy(_,O,C,w.offset),P(T)}else if(w.inlineTrigger)l($);else if(w.offset>0)l($,!0),f(),u.current=Xt(function(){g=Gm(m,r);var M=C.getAttribute("aria-controls"),E=document.getElementById(M),N=qy(E,g.elements);P(N)},5);else if(w.offset<0){var k=a($,!0),I=k[k.length-2],Q=S.get(I);l(I,!1),P(Q)}}c==null||c(h)}}function ZL(t){Promise.resolve().then(t)}var v0="__RC_UTIL_PATH_SPLIT__",Gy=function(e){return e.join(v0)},qL=function(e){return e.split(v0)},Ym="rc-menu-more";function GL(){var t=J({}),e=ae(t,2),n=e[1],r=U(new Map),i=U(new Map),o=J([]),a=ae(o,2),s=a[0],l=a[1],c=U(0),u=U(!1),d=function(){u.current||n({})},f=Ht(function(S,x){var b=Gy(x);i.current.set(b,S),r.current.set(S,b),c.current+=1;var C=c.current;ZL(function(){C===c.current&&d()})},[]),h=Ht(function(S,x){var b=Gy(x);i.current.delete(b),r.current.delete(S)},[]),p=Ht(function(S){l(S)},[]),m=Ht(function(S,x){var b=r.current.get(S)||"",C=qL(b);return x&&s.includes(C[0])&&C.unshift(Ym),C},[s]),g=Ht(function(S,x){return S.filter(function(b){return b!==void 0}).some(function(b){var C=m(b,!0);return C.includes(x)})},[m]),v=function(){var x=$e(r.current.keys());return s.length&&x.push(Ym),x},O=Ht(function(S){var x="".concat(r.current.get(S)).concat(v0),b=new Set;return $e(i.current.keys()).forEach(function(C){C.startsWith(x)&&b.add(i.current.get(C))}),b},[]);return be(function(){return function(){u.current=!0}},[]),{registerPath:f,unregisterPath:h,refreshOverflowKeys:p,isSubPathKey:g,getKeyPath:m,getKeys:v,getSubPathKeys:O}}function fl(t){var e=U(t);e.current=t;var n=Ht(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a1&&(O.motionAppear=!1);var S=O.onVisibleChanged;return O.onVisibleChanged=function(x){return!f.current&&!x&&g(!0),S==null?void 0:S(x)},m?null:y(Zl,{mode:o,locked:!f.current},y(pi,Ce({visible:v},O,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(x){var b=x.className,C=x.style;return y(O0,{id:e,className:b,style:C},i)}))}var fj=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],hj=["active"],pj=Se(function(t,e){var n=t.style,r=t.className,i=t.title,o=t.eventKey;t.warnKey;var a=t.disabled,s=t.internalPopupClose,l=t.children,c=t.itemIcon,u=t.expandIcon,d=t.popupClassName,f=t.popupOffset,h=t.popupStyle,p=t.onClick,m=t.onMouseEnter,g=t.onMouseLeave,v=t.onTitleClick,O=t.onTitleMouseEnter,S=t.onTitleMouseLeave,x=ut(t,fj),b=z2(o),C=fe(wi),$=C.prefixCls,w=C.mode,P=C.openKeys,_=C.disabled,T=C.overflowDisabled,R=C.activeKey,k=C.selectedKeys,I=C.itemIcon,Q=C.expandIcon,M=C.onItemClick,E=C.onOpenChange,N=C.onActive,z=fe(m0),L=z._internalRenderSubMenuItem,F=fe(D2),H=F.isSubPathKey,V=Ws(),X="".concat($,"-submenu"),B=_||a,G=U(),se=U(),re=c??I,le=u??Q,me=P.includes(o),ie=!T&&me,ne=H(k,o),ue=W2(o,B,O,S),de=ue.active,j=ut(ue,hj),ee=J(!1),he=ae(ee,2),ve=he[0],Y=he[1],ce=function(_e){B||Y(_e)},te=function(_e){ce(!0),m==null||m({key:o,domEvent:_e})},Oe=function(_e){ce(!1),g==null||g({key:o,domEvent:_e})},ye=ge(function(){return de||(w!=="inline"?ve||H([R],o):!1)},[w,de,R,ve,o,H]),pe=F2(V.length),Qe=function(_e){B||(v==null||v({key:o,domEvent:_e}),w==="inline"&&E(o,!me))},Me=fl(function(Xe){p==null||p(Td(Xe)),M(Xe)}),De=function(_e){w!=="inline"&&E(o,_e)},we=function(){N(o)},Ie=b&&"".concat(b,"-popup"),rt=ge(function(){return y(V2,{icon:w!=="horizontal"?le:void 0,props:W(W({},t),{},{isOpen:ie,isSubMenu:!0})},y("i",{className:"".concat(X,"-arrow")}))},[w,le,t,ie,X]),Ye=y("div",Ce({role:"menuitem",style:pe,className:"".concat(X,"-title"),tabIndex:B?null:-1,ref:G,title:typeof i=="string"?i:null,"data-menu-id":T&&b?null:b,"aria-expanded":ie,"aria-haspopup":!0,"aria-controls":Ie,"aria-disabled":B,onClick:Qe,onFocus:we},j),i,rt),lt=U(w);if(w!=="inline"&&V.length>1?lt.current="vertical":lt.current=w,!T){var Be=lt.current;Ye=y(uj,{mode:Be,prefixCls:X,visible:!s&&ie&&w!=="inline",popupClassName:d,popupOffset:f,popupStyle:h,popup:y(Zl,{mode:Be==="horizontal"?"vertical":Be},y(O0,{id:Ie,ref:se},l)),disabled:B,onVisibleChange:De},Ye)}var ke=y(Hi.Item,Ce({ref:e,role:"none"},x,{component:"li",style:n,className:Z(X,"".concat(X,"-").concat(w),r,D(D(D(D({},"".concat(X,"-open"),ie),"".concat(X,"-active"),ye),"".concat(X,"-selected"),ne),"".concat(X,"-disabled"),B)),onMouseEnter:te,onMouseLeave:Oe}),Ye,!T&&y(dj,{id:Ie,open:ie,keyPath:V},l));return L&&(ke=L(ke,t,{selected:ne,active:ye,open:ie,disabled:B})),y(Zl,{onItemClick:Me,mode:w==="horizontal"?"vertical":w,itemIcon:re,expandIcon:le},ke)}),Xf=Se(function(t,e){var n=t.eventKey,r=t.children,i=Ws(n),o=b0(r,i),a=Hf();be(function(){if(a)return a.registerPath(n,i),function(){a.unregisterPath(n,i)}},[i]);var s;return a?s=o:s=y(pj,Ce({ref:e},t),o),y(j2.Provider,{value:i},s)});function y0(t){var e=t.className,n=t.style,r=fe(wi),i=r.prefixCls,o=Hf();return o?null:y("li",{role:"separator",className:Z("".concat(i,"-item-divider"),e),style:n})}var mj=["className","title","eventKey","children"],gj=Se(function(t,e){var n=t.className,r=t.title;t.eventKey;var i=t.children,o=ut(t,mj),a=fe(wi),s=a.prefixCls,l="".concat(s,"-item-group");return y("li",Ce({ref:e,role:"presentation"},o,{onClick:function(u){return u.stopPropagation()},className:Z(l,n)}),y("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),y("ul",{role:"group",className:"".concat(l,"-list")},i))}),S0=Se(function(t,e){var n=t.eventKey,r=t.children,i=Ws(n),o=b0(r,i),a=Hf();return a?o:y(gj,Ce({ref:e},cn(t,["warnKey"])),o)}),vj=["label","children","key","type","extra"];function Um(t,e,n){var r=e.item,i=e.group,o=e.submenu,a=e.divider;return(t||[]).map(function(s,l){if(s&&Je(s)==="object"){var c=s,u=c.label,d=c.children,f=c.key,h=c.type,p=c.extra,m=ut(c,vj),g=f??"tmp-".concat(l);return d||h==="group"?h==="group"?y(i,Ce({key:g},m,{title:u}),Um(d,e,n)):y(o,Ce({key:g},m,{title:u}),Um(d,e,n)):h==="divider"?y(a,Ce({key:g},m)):y(r,Ce({key:g},m,{extra:p}),u,(!!p||p===0)&&y("span",{className:"".concat(n,"-item-extra")},p))}return null}).filter(function(s){return s})}function Uy(t,e,n,r,i){var o=t,a=W({divider:y0,item:Tc,group:S0,submenu:Xf},r);return e&&(o=Um(e,a,i)),b0(o,n)}var Oj=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Go=[],bj=Se(function(t,e){var n,r=t,i=r.prefixCls,o=i===void 0?"rc-menu":i,a=r.rootClassName,s=r.style,l=r.className,c=r.tabIndex,u=c===void 0?0:c,d=r.items,f=r.children,h=r.direction,p=r.id,m=r.mode,g=m===void 0?"vertical":m,v=r.inlineCollapsed,O=r.disabled,S=r.disabledOverflow,x=r.subMenuOpenDelay,b=x===void 0?.1:x,C=r.subMenuCloseDelay,$=C===void 0?.1:C,w=r.forceSubMenuRender,P=r.defaultOpenKeys,_=r.openKeys,T=r.activeKey,R=r.defaultActiveFirst,k=r.selectable,I=k===void 0?!0:k,Q=r.multiple,M=Q===void 0?!1:Q,E=r.defaultSelectedKeys,N=r.selectedKeys,z=r.onSelect,L=r.onDeselect,F=r.inlineIndent,H=F===void 0?24:F,V=r.motion,X=r.defaultMotions,B=r.triggerSubMenuAction,G=B===void 0?"hover":B,se=r.builtinPlacements,re=r.itemIcon,le=r.expandIcon,me=r.overflowedIndicator,ie=me===void 0?"...":me,ne=r.overflowedIndicatorPopupClassName,ue=r.getPopupContainer,de=r.onClick,j=r.onOpenChange,ee=r.onKeyDown;r.openAnimation,r.openTransitionName;var he=r._internalRenderMenuItem,ve=r._internalRenderSubMenuItem,Y=r._internalComponents,ce=ut(r,Oj),te=ge(function(){return[Uy(f,d,Go,Y,o),Uy(f,d,Go,{},o)]},[f,d,Y]),Oe=ae(te,2),ye=Oe[0],pe=Oe[1],Qe=J(!1),Me=ae(Qe,2),De=Me[0],we=Me[1],Ie=U(),rt=UL(p),Ye=h==="rtl",lt=_n(P,{value:_,postState:function(qe){return qe||Go}}),Be=ae(lt,2),ke=Be[0],Xe=Be[1],_e=function(qe){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Lt(){Xe(qe),j==null||j(qe)}Fe?Ql(Lt):Lt()},Pe=J(ke),ct=ae(Pe,2),xt=ct[0],Pn=ct[1],qt=U(!1),xn=ge(function(){return(g==="inline"||g==="vertical")&&v?["vertical",v]:[g,!1]},[g,v]),gn=ae(xn,2),Bt=gn[0],Ot=gn[1],ht=Bt==="inline",et=J(Bt),nt=ae(et,2),Re=nt[0],ot=nt[1],dt=J(Ot),Ee=ae(dt,2),Ze=Ee[0],Ae=Ee[1];be(function(){ot(Bt),Ae(Ot),qt.current&&(ht?Xe(xt):_e(Go))},[Bt,Ot]);var We=J(0),st=ae(We,2),tt=st[0],Ct=st[1],$t=tt>=ye.length-1||Re!=="horizontal"||S;be(function(){ht&&Pn(ke)},[ke]),be(function(){return qt.current=!0,function(){qt.current=!1}},[]);var wt=GL(),Mt=wt.registerPath,vn=wt.unregisterPath,un=wt.refreshOverflowKeys,Cn=wt.isSubPathKey,Ln=wt.getKeyPath,Ut=wt.getKeys,nn=wt.getSubPathKeys,Te=ge(function(){return{registerPath:Mt,unregisterPath:vn}},[Mt,vn]),Le=ge(function(){return{isSubPathKey:Cn}},[Cn]);be(function(){un($t?Go:ye.slice(tt+1).map(function(Gt){return Gt.key}))},[tt,$t]);var pt=_n(T||R&&((n=ye[0])===null||n===void 0?void 0:n.key),{value:T}),yt=ae(pt,2),Ue=yt[0],Ge=yt[1],ft=fl(function(Gt){Ge(Gt)}),It=fl(function(){Ge(void 0)});Yt(e,function(){return{list:Ie.current,focus:function(qe){var Fe,Lt=Ut(),Wt=Gm(Lt,rt),en=Wt.elements,fn=Wt.key2element,gr=Wt.element2key,Gn=g0(Ie.current,en),vr=Ue??(Gn[0]?gr.get(Gn[0]):(Fe=ye.find(function(Ii){return!Ii.props.disabled}))===null||Fe===void 0?void 0:Fe.key),ir=fn.get(vr);if(vr&&ir){var Or;ir==null||(Or=ir.focus)===null||Or===void 0||Or.call(ir,qe)}}}});var zt=_n(E||[],{value:N,postState:function(qe){return Array.isArray(qe)?qe:qe==null?Go:[qe]}}),Vt=ae(zt,2),dn=Vt[0],Br=Vt[1],wr=function(qe){if(I){var Fe=qe.key,Lt=dn.includes(Fe),Wt;M?Lt?Wt=dn.filter(function(fn){return fn!==Fe}):Wt=[].concat($e(dn),[Fe]):Wt=[Fe],Br(Wt);var en=W(W({},qe),{},{selectedKeys:Wt});Lt?L==null||L(en):z==null||z(en)}!M&&ke.length&&Re!=="inline"&&_e(Go)},Pr=fl(function(Gt){de==null||de(Td(Gt)),wr(Gt)}),_r=fl(function(Gt,qe){var Fe=ke.filter(function(Wt){return Wt!==Gt});if(qe)Fe.push(Gt);else if(Re!=="inline"){var Lt=nn(Gt);Fe=Fe.filter(function(Wt){return!Lt.has(Wt)})}Dl(ke,Fe,!0)||_e(Fe,!0)}),qn=function(qe,Fe){var Lt=Fe??!ke.includes(qe);_r(qe,Lt)},Tr=XL(Re,Ue,Ye,rt,Ie,Ut,Ln,Ge,qn,ee);be(function(){we(!0)},[]);var kr=ge(function(){return{_internalRenderMenuItem:he,_internalRenderSubMenuItem:ve}},[he,ve]),ei=Re!=="horizontal"||S?ye:ye.map(function(Gt,qe){return y(Zl,{key:Gt.key,overflowDisabled:qe>tt},Gt)}),Ri=y(Hi,Ce({id:p,ref:Ie,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:Tc,className:Z(o,"".concat(o,"-root"),"".concat(o,"-").concat(Re),l,D(D({},"".concat(o,"-inline-collapsed"),Ze),"".concat(o,"-rtl"),Ye),a),dir:h,style:s,role:"menu",tabIndex:u,data:ei,renderRawItem:function(qe){return qe},renderRawRest:function(qe){var Fe=qe.length,Lt=Fe?ye.slice(-Fe):null;return y(Xf,{eventKey:Ym,title:ie,disabled:$t,internalPopupClose:Fe===0,popupClassName:ne},Lt)},maxCount:Re!=="horizontal"||S?Hi.INVALIDATE:Hi.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(qe){Ct(qe)},onKeyDown:Tr},ce));return y(m0.Provider,{value:kr},y(Q2.Provider,{value:rt},y(Zl,{prefixCls:o,rootClassName:a,mode:Re,openKeys:ke,rtl:Ye,disabled:O,motion:De?V:null,defaultMotions:De?X:null,activeKey:Ue,onActive:ft,onInactive:It,selectedKeys:dn,inlineIndent:H,subMenuOpenDelay:b,subMenuCloseDelay:$,forceSubMenuRender:w,builtinPlacements:se,triggerSubMenuAction:G,getPopupContainer:ue,itemIcon:re,expandIcon:le,onItemClick:Pr,onOpenChange:_r},y(D2.Provider,{value:Le},Ri),y("div",{style:{display:"none"},"aria-hidden":!0},y(L2.Provider,{value:Te},pe)))))}),Fs=bj;Fs.Item=Tc;Fs.SubMenu=Xf;Fs.ItemGroup=S0;Fs.Divider=y0;var yj={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},Sj=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:yj}))},xj=Se(Sj);const X2=bt({siderHook:{addSider:()=>null,removeSider:()=>null}}),Cj=t=>{const{antCls:e,componentCls:n,colorText:r,footerBg:i,headerHeight:o,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=t;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:o,padding:a,color:s,lineHeight:q(o),background:d,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:i},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},Z2=t=>{const{colorBgLayout:e,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:o,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=t,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140",bodyBg:e,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:i,footerPadding:`${o}px ${c}px`,footerBg:e,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:i}},q2=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],G2=Zt("Layout",Cj,Z2,{deprecatedTokens:q2}),$j=t=>{const{componentCls:e,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:o,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:h,lightTriggerColor:p,lightTriggerBg:m,bodyBg:g}=t;return{[e]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${e}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${e}-children`]:{overflow:"hidden"},[`${e}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:q(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${e}-zero-width-trigger`]:{position:"absolute",top:c,insetInlineEnd:t.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${q(f)} ${q(f)} 0`,cursor:"pointer",transition:`background ${i} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${i}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:t.calc(u).mul(-1).equal(),borderRadius:`${q(f)} 0 0 ${q(f)}`}},"&-light":{background:h,[`${e}-trigger`]:{color:p,background:m},[`${e}-zero-width-trigger`]:{color:p,background:m,border:`1px solid ${g}`,borderInlineStart:0}}}}},wj=Zt(["Layout","Sider"],$j,Z2,{deprecatedTokens:q2});var Pj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i!Number.isNaN(Number.parseFloat(t))&&isFinite(t),Zf=bt({}),Tj=(()=>{let t=0;return(e="")=>(t+=1,`${e}${t}`)})(),Y2=Se((t,e)=>{const{prefixCls:n,className:r,trigger:i,children:o,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:h,breakpoint:p,onCollapse:m,onBreakpoint:g}=t,v=Pj(t,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:O}=fe(X2),[S,x]=J("collapsed"in t?t.collapsed:a),[b,C]=J(!1);be(()=>{"collapsed"in t&&x(t.collapsed)},[t.collapsed]);const $=(re,le)=>{"collapsed"in t||x(re),m==null||m(re,le)},{getPrefixCls:w,direction:P}=fe(it),_=w("layout-sider",n),[T,R,k]=wj(_),I=U(null);I.current=re=>{C(re.matches),g==null||g(re.matches),S!==re.matches&&$(re.matches,"responsive")},be(()=>{function re(me){var ie;return(ie=I.current)===null||ie===void 0?void 0:ie.call(I,me)}let le;return typeof(window==null?void 0:window.matchMedia)<"u"&&p&&p in Ky&&(le=window.matchMedia(`screen and (max-width: ${Ky[p]})`),S2(le,re),re(le)),()=>{x2(le,re)}},[p]),be(()=>{const re=Tj("ant-sider-");return O.addSider(re),()=>O.removeSider(re)},[]);const Q=()=>{$(!S,"clickTrigger")},M=cn(v,["collapsed"]),E=S?f:d,N=_j(E)?`${E}px`:String(E),z=parseFloat(String(f||0))===0?y("span",{onClick:Q,className:Z(`${_}-zero-width-trigger`,`${_}-zero-width-trigger-${u?"right":"left"}`),style:h},i||y(xj,null)):null,L=P==="rtl"==!u,V={expanded:y(L?xd:Hm,null),collapsed:y(L?Hm:xd,null)}[S?"collapsed":"expanded"],X=i!==null?z||y("div",{className:`${_}-trigger`,onClick:Q,style:{width:N}},i||V):null,B=Object.assign(Object.assign({},l),{flex:`0 0 ${N}`,maxWidth:N,minWidth:N,width:N}),G=Z(_,`${_}-${s}`,{[`${_}-collapsed`]:!!S,[`${_}-has-trigger`]:c&&i!==null&&!z,[`${_}-below`]:!!b,[`${_}-zero-width`]:parseFloat(N)===0},r,R,k),se=ge(()=>({siderCollapsed:S}),[S]);return T(y(Zf.Provider,{value:se},y("aside",Object.assign({className:G},M,{style:B,ref:e}),y("div",{className:`${_}-children`},o),c||b&&z?X:null)))});var kj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},Rj=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:kj}))},x0=Se(Rj);const kd=bt({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var Ij=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,dashed:r}=t,i=Ij(t,["prefixCls","className","dashed"]),{getPrefixCls:o}=fe(it),a=o("menu",e),s=Z({[`${a}-item-divider-dashed`]:!!r},n);return y(y0,Object.assign({className:s},i))},K2=t=>{var e;const{className:n,children:r,icon:i,title:o,danger:a,extra:s}=t,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:f}=fe(kd),h=S=>{const x=r==null?void 0:r[0],b=y("span",{className:Z(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},r);return(!i||Kt(r)&&r.type==="span")&&r&&S&&c&&typeof x=="string"?y("div",{className:`${l}-inline-collapsed-noicon`},x.charAt(0)):b},{siderCollapsed:p}=fe(Zf);let m=o;typeof o>"u"?m=c?r:"":o===!1&&(m="");const g={title:m};!p&&!f&&(g.title=null,g.open=!1);const v=nr(r).length;let O=y(Tc,Object.assign({},cn(t,["title","icon","danger"]),{className:Z({[`${l}-item-danger`]:a,[`${l}-item-only-child`]:(i?v+1:v)===1},n),title:typeof o=="string"?o:void 0}),fr(i,{className:Z(Kt(i)?(e=i.props)===null||e===void 0?void 0:e.className:void 0,`${l}-item-icon`)}),h(f));return d||(O=y(on,Object.assign({},g,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),O)),O};var Mj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{children:n}=t,r=Mj(t,["children"]),i=fe(Rd),o=ge(()=>Object.assign(Object.assign({},i),r),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=KR(n),s=go(e,a?Ho(n):null);return y(Rd.Provider,{value:o},y(bs,{space:!0},a?Xn(n,{ref:s}):n))}),Aj=t=>{const{componentCls:e,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:o,lineType:a,itemPaddingInline:s}=t;return{[`${e}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${q(o)} ${a} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${e}-item:hover, + `]:{paddingInlineEnd:t.calc(t.fontSize).mul(1.5).equal()}}}},nm(It(t,{controlHeight:t.singleItemHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}const W6=t=>{const{fontSize:e,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:o,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:h,colorBgContainer:m,colorFillSecondary:p,colorBgContainerDisabled:g,colorTextDisabled:O,colorPrimaryHover:v,colorPrimary:y,controlOutline:S}=t,x=s*2,$=r*2,C=Math.min(i-x,i-$),P=Math.min(o-x,o-$),w=Math.min(a-x,a-$);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:h,optionPadding:`${(i-e*n)/2}px ${l}px`,optionFontSize:e,optionLineHeight:n,optionHeight:i,selectorBg:m,clearBg:m,singleItemHeightLG:a,multipleItemBg:p,multipleItemBorderColor:"transparent",multipleItemHeight:C,multipleItemHeightSM:P,multipleItemHeightLG:w,multipleSelectorBgDisabled:g,multipleItemColorDisabled:O,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(t.fontSize*1.25),hoverBorderColor:v,activeBorderColor:y,activeOutlineColor:S,selectAffixPadding:s}},E2=(t,e)=>{const{componentCls:n,antCls:r,controlOutlineWidth:i}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${V(t.lineWidth)} ${t.lineType} ${e.borderColor}`,background:t.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,boxShadow:`0 0 0 ${V(i)} ${e.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:e.color}}}},Ky=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},E2(t,e))}),H6=t=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},E2(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),Ky(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),Ky(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${V(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),k2=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:e.bg,border:`${V(t.lineWidth)} ${t.lineType} transparent`,color:e.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:e.hoverBg},[`${n}-focused& ${n}-selector`]:{background:t.selectorBg,borderColor:e.activeBorderColor,outline:0}}}},Jy=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},k2(t,e))}),V6=t=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},k2(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor,color:t.colorText})),Jy(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,color:t.colorError})),Jy(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{borderColor:t.colorBorder,background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.colorBgContainer,border:`${V(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}})}),F6=t=>({"&-borderless":{[`${t.componentCls}-selector`]:{background:"transparent",border:`${V(t.lineWidth)} ${t.lineType} transparent`},[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${V(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`},[`&${t.componentCls}-status-error`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorError}},[`&${t.componentCls}-status-warning`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorWarning}}}}),A2=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${V(t.lineWidth)} 0`,borderStyle:`none none ${t.lineType} none`,borderColor:e.borderColor,background:t.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,outline:0},[`${n}-prefix`]:{color:e.color}}}},eS=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},A2(t,e))}),X6=t=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},A2(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),eS(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),eS(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${V(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),Z6=t=>({[t.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},H6(t)),V6(t)),F6(t)),X6(t))}),q6=t=>{const{componentCls:e}=t;return{position:"relative",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,input:{cursor:"pointer"},[`${e}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${e}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},G6=t=>{const{componentCls:e}=t;return{[`${e}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},U6=t=>{const{antCls:e,componentCls:n,inputPaddingHorizontalBase:r,iconCls:i}=t,o={[`${n}-clear`]:{opacity:1,background:t.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},Sn(t)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},q6(t)),G6(t)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Sa),{[`> ${e}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},Sa),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},zs()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${t.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${t.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:t.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:t.colorIcon}},"@media(hover:none)":o,"&:hover":o}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:t.calc(r).add(t.fontSize).add(t.paddingXS).equal()}}}}}},Y6=t=>{const{componentCls:e}=t;return[{[e]:{[`&${e}-in-form-item`]:{width:"100%"}}},U6(t),B6(t),D6(t),Q6(t),{[`${e}-rtl`]:{direction:"rtl"}},o0(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},K6=Ft("Select",(t,{rootPrefixCls:e})=>{const n=It(t,{rootPrefixCls:e,inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(1).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[Y6(n),Z6(n)]},W6,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var J6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},ej=function(e,n){return b(Mt,xe({},e,{ref:n,icon:J6}))},Ad=Se(ej),tj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},nj=function(e,n){return b(Mt,xe({},e,{ref:n,icon:tj}))},Q2=Se(nj),rj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},ij=function(e,n){return b(Mt,xe({},e,{ref:n,icon:rj}))},N2=Se(ij);function oj({suffixIcon:t,clearIcon:e,menuItemSelectedIcon:n,removeIcon:r,loading:i,multiple:o,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:c,showArrow:u,componentName:d}){const f=e??b(Ls,null),h=O=>t===null&&!a&&!u?null:b(Qt,null,l!==!1&&O,a&&c);let m=null;if(t!==void 0)m=h(t);else if(i)m=h(b(wc,{spin:!0}));else{const O=`${s}-suffix`;m=({open:v,showSearch:y})=>h(v&&y?b(N2,{className:O}):b(Q2,{className:O}))}let p=null;n!==void 0?p=n:o?p=b(Ad,null):p=null;let g=null;return r!==void 0?g=r:g=b(Xi,null),{clearIcon:f,suffixIcon:m,itemIcon:p,removeIcon:g}}function aj(t){return K.useMemo(()=>{if(t)return(...e)=>K.createElement(Cs,{space:!0},t.apply(void 0,e))},[t])}function sj(t,e){return e!==void 0?e:t!==null}var lj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r,i,o,a;const{prefixCls:s,bordered:l,className:c,rootClassName:u,getPopupContainer:d,popupClassName:f,dropdownClassName:h,listHeight:m=256,placement:p,listItemHeight:g,size:O,disabled:v,notFoundContent:y,status:S,builtinPlacements:x,dropdownMatchSelectWidth:$,popupMatchSelectWidth:C,direction:P,style:w,allowClear:_,variant:R,dropdownStyle:I,transitionName:T,tagRender:M,maxCount:Q,prefix:E,dropdownRender:k,popupRender:z,onDropdownVisibleChange:L,onOpenChange:B,styles:F,classNames:H}=t,X=lj(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:q,getPrefixCls:N,renderEmpty:j,direction:oe,virtual:ee,popupMatchSelectWidth:se,popupOverflow:fe}=he(lt),{showSearch:re,style:J,styles:ue,className:de,classNames:D}=Zn("select"),[,Y]=Or(),me=g??(Y==null?void 0:Y.controlHeight),G=N("select",s),ce=N(),ae=P??oe,{compactSize:pe,compactItemClassnames:Oe}=Bs(G,ae),[be,ge]=Kf("select",R,l),Me=Tr(G),[Ie,He,Ae]=K6(G,Me),Ee=ve(()=>{const{mode:Ve}=t;if(Ve!=="combobox")return Ve===z2?"combobox":Ve},[t.mode]),st=Ee==="multiple"||Ee==="tags",Ye=sj(t.suffixIcon,t.showArrow),rt=(n=C??$)!==null&&n!==void 0?n:se,Be=((r=F==null?void 0:F.popup)===null||r===void 0?void 0:r.root)||((i=ue.popup)===null||i===void 0?void 0:i.root)||I,Re=aj(z||k),Xe=B||L,{status:_e,hasFeedback:Pe,isFormItemInput:ft,feedbackIcon:yt}=he(ei),xn=Yf(_e,S);let Xt;y!==void 0?Xt=y:Ee==="combobox"?Xt=null:Xt=(j==null?void 0:j("Select"))||b(M2,{componentName:"Select"});const{suffixIcon:gn,itemIcon:fn,removeIcon:Dt,clearIcon:Ct}=oj(Object.assign(Object.assign({},X),{multiple:st,hasFeedback:Pe,feedbackIcon:yt,showSuffixIcon:Ye,prefixCls:G,componentName:"Select"})),ht=_===!0?{clearIcon:Ct}:_,et=pn(X,["suffixIcon","itemIcon"]),it=U(((o=H==null?void 0:H.popup)===null||o===void 0?void 0:o.root)||((a=D==null?void 0:D.popup)===null||a===void 0?void 0:a.root)||f||h,{[`${G}-dropdown-${ae}`]:ae==="rtl"},u,D.root,H==null?void 0:H.root,Ae,Me,He),ke=br(Ve=>{var ut;return(ut=O??pe)!==null&&ut!==void 0?ut:Ve}),ct=he(Ui),Ke=v??ct,we=U({[`${G}-lg`]:ke==="large",[`${G}-sm`]:ke==="small",[`${G}-rtl`]:ae==="rtl",[`${G}-${be}`]:ge,[`${G}-in-form-item`]:ft},kd(G,xn,Pe),Oe,de,c,D.root,H==null?void 0:H.root,u,Ae,Me,He),We=ve(()=>p!==void 0?p:ae==="rtl"?"bottomRight":"bottomLeft",[p,ae]),[Qe]=Pc("SelectLike",Be==null?void 0:Be.zIndex);return Ie(b(O0,Object.assign({ref:e,virtual:ee,showSearch:re},et,{style:Object.assign(Object.assign(Object.assign(Object.assign({},ue.root),F==null?void 0:F.root),J),w),dropdownMatchSelectWidth:rt,transitionName:jo(ce,"slide-up",T),builtinPlacements:A6(x,fe),listHeight:m,listItemHeight:me,mode:Ee,prefixCls:G,placement:We,direction:ae,prefix:E,suffixIcon:gn,menuItemSelectedIcon:fn,removeIcon:Dt,allowClear:ht,notFoundContent:Xt,className:we,getPopupContainer:d||q,dropdownClassName:it,disabled:Ke,dropdownStyle:Object.assign(Object.assign({},Be),{zIndex:Qe}),maxCount:st?Q:void 0,tagRender:st?M:void 0,dropdownRender:Re,onDropdownVisibleChange:Xe})))},Nn=Se(cj),uj=p2(Nn,"dropdownAlign");Nn.SECRET_COMBOBOX_MODE_DO_NOT_USE=z2;Nn.Option=v0;Nn.OptGroup=g0;Nn._InternalPanelDoNotUseOrYouWillBeFired=uj;const j2=(t,e)=>{typeof(t==null?void 0:t.addEventListener)<"u"?t.addEventListener("change",e):typeof(t==null?void 0:t.addListener)<"u"&&t.addListener(e)},L2=(t,e)=>{typeof(t==null?void 0:t.removeEventListener)<"u"?t.removeEventListener("change",e):typeof(t==null?void 0:t.removeListener)<"u"&&t.removeListener(e)},Do=["xxl","xl","lg","md","sm","xs"],dj=t=>({xs:`(max-width: ${t.screenXSMax}px)`,sm:`(min-width: ${t.screenSM}px)`,md:`(min-width: ${t.screenMD}px)`,lg:`(min-width: ${t.screenLG}px)`,xl:`(min-width: ${t.screenXL}px)`,xxl:`(min-width: ${t.screenXXL}px)`}),fj=t=>{const e=t,n=[].concat(Do).reverse();return n.forEach((r,i)=>{const o=r.toUpperCase(),a=`screen${o}Min`,s=`screen${o}`;if(!(e[a]<=e[s]))throw new Error(`${a}<=${s} fails : !(${e[a]}<=${e[s]})`);if(i{const[,t]=Or(),e=dj(fj(t));return K.useMemo(()=>{const n=new Map;let r=-1,i={};return{responsiveMap:e,matchHandlers:{},dispatch(o){return i=o,n.forEach(a=>a(i)),n.size>=1},subscribe(o){return n.size||this.register(),r+=1,n.set(r,o),o(i),r},unsubscribe(o){n.delete(o),n.size||this.unregister()},register(){Object.entries(e).forEach(([o,a])=>{const s=({matches:c})=>{this.dispatch(Object.assign(Object.assign({},i),{[o]:c}))},l=window.matchMedia(a);j2(l,s),this.matchHandlers[a]={mql:l,listener:s},s(l)})},unregister(){Object.values(e).forEach(o=>{const a=this.matchHandlers[o];L2(a==null?void 0:a.mql,a==null?void 0:a.listener)}),n.clear()}}},[t])};function mj(){const[,t]=Qs(e=>e+1,0);return t}function Jf(t=!0,e={}){const n=ne(e),r=mj(),i=hj();return Lt(()=>{const o=i.subscribe(a=>{n.current=a,t&&r()});return()=>i.unsubscribe(o)},[]),n.current}const tg=Tt({}),pj=t=>{const{antCls:e,componentCls:n,iconCls:r,avatarBg:i,avatarColor:o,containerSize:a,containerSizeLG:s,containerSizeSM:l,textFontSize:c,textFontSizeLG:u,textFontSizeSM:d,iconFontSize:f,iconFontSizeLG:h,iconFontSizeSM:m,borderRadius:p,borderRadiusLG:g,borderRadiusSM:O,lineWidth:v,lineType:y}=t,S=(x,$,C,P)=>({width:x,height:x,borderRadius:"50%",fontSize:$,[`&${n}-square`]:{borderRadius:P},[`&${n}-icon`]:{fontSize:C,[`> ${r}`]:{margin:0}}});return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},Sn(t)),{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:o,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:i,border:`${V(v)} ${y} transparent`,"&-image":{background:"transparent"},[`${e}-image-img`]:{display:"block"}}),S(a,c,f,p)),{"&-lg":Object.assign({},S(s,u,h,g)),"&-sm":Object.assign({},S(l,d,m,O)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},gj=t=>{const{componentCls:e,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=t;return{[`${e}-group`]:{display:"inline-flex",[e]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${e}-group-popover`]:{[`${e} + ${e}`]:{marginInlineStart:i}}}},vj=t=>{const{controlHeight:e,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:o,fontSizeXL:a,fontSizeHeading3:s,marginXS:l,marginXXS:c,colorBorderBg:u}=t;return{containerSize:e,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((o+a)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:c,groupOverlapping:-l,groupBorderColor:u}},D2=Ft("Avatar",t=>{const{colorTextLightSolid:e,colorTextPlaceholder:n}=t,r=It(t,{avatarBg:n,avatarColor:e});return[pj(r),gj(r)]},vj);var Oj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,shape:r,size:i,src:o,srcSet:a,icon:s,className:l,rootClassName:c,style:u,alt:d,draggable:f,children:h,crossOrigin:m,gap:p=4,onError:g}=t,O=Oj(t,["prefixCls","shape","size","src","srcSet","icon","className","rootClassName","style","alt","draggable","children","crossOrigin","gap","onError"]),[v,y]=te(1),[S,x]=te(!1),[$,C]=te(!0),P=ne(null),w=ne(null),_=vr(e,P),{getPrefixCls:R,avatar:I}=he(lt),T=he(tg),M=()=>{if(!w.current||!P.current)return;const re=w.current.offsetWidth,J=P.current.offsetWidth;re!==0&&J!==0&&p*2{x(!0)},[]),ye(()=>{C(!0),y(1)},[o]),ye(M,[p]);const Q=()=>{(g==null?void 0:g())!==!1&&C(!1)},E=br(re=>{var J,ue;return(ue=(J=i??(T==null?void 0:T.size))!==null&&J!==void 0?J:re)!==null&&ue!==void 0?ue:"default"}),k=Object.keys(typeof E=="object"?E||{}:{}).some(re=>["xs","sm","md","lg","xl","xxl"].includes(re)),z=Jf(k),L=ve(()=>{if(typeof E!="object")return{};const re=Do.find(ue=>z[ue]),J=E[re];return J?{width:J,height:J,fontSize:J&&(s||h)?J/2:18}:{}},[z,E]),B=R("avatar",n),F=Tr(B),[H,X,q]=D2(B,F),N=U({[`${B}-lg`]:E==="large",[`${B}-sm`]:E==="small"}),j=en(o),oe=r||(T==null?void 0:T.shape)||"circle",ee=U(B,N,I==null?void 0:I.className,`${B}-${oe}`,{[`${B}-image`]:j||o&&$,[`${B}-icon`]:!!s},q,F,l,c,X),se=typeof E=="number"?{width:E,height:E,fontSize:s?E/2:18}:{};let fe;if(typeof o=="string"&&$)fe=b("img",{src:o,draggable:f,srcSet:a,onError:Q,alt:d,crossOrigin:m});else if(j)fe=o;else if(s)fe=s;else if(S||v!==1){const re=`scale(${v})`,J={msTransform:re,WebkitTransform:re,transform:re};fe=b(Jr,{onResize:M},b("span",{className:`${B}-string`,ref:w,style:Object.assign({},J)},h))}else fe=b("span",{className:`${B}-string`,style:{opacity:0},ref:w},h);return H(b("span",Object.assign({},O,{style:Object.assign(Object.assign(Object.assign(Object.assign({},se),L),I==null?void 0:I.style),u),className:ee,ref:_}),fe))}),ws=t=>t?typeof t=="function"?t():t:null;function b0(t){var e=t.children,n=t.prefixCls,r=t.id,i=t.overlayInnerStyle,o=t.bodyClassName,a=t.className,s=t.style;return b("div",{className:U("".concat(n,"-content"),a),style:s},b("div",{className:U("".concat(n,"-inner"),o),id:r,role:"tooltip",style:i},typeof e=="function"?e():e))}var Wa={shiftX:64,adjustY:1},Ha={adjustX:1,shiftY:!0},ii=[0,0],bj={left:{points:["cr","cl"],overflow:Ha,offset:[-4,0],targetOffset:ii},right:{points:["cl","cr"],overflow:Ha,offset:[4,0],targetOffset:ii},top:{points:["bc","tc"],overflow:Wa,offset:[0,-4],targetOffset:ii},bottom:{points:["tc","bc"],overflow:Wa,offset:[0,4],targetOffset:ii},topLeft:{points:["bl","tl"],overflow:Wa,offset:[0,-4],targetOffset:ii},leftTop:{points:["tr","tl"],overflow:Ha,offset:[-4,0],targetOffset:ii},topRight:{points:["br","tr"],overflow:Wa,offset:[0,-4],targetOffset:ii},rightTop:{points:["tl","tr"],overflow:Ha,offset:[4,0],targetOffset:ii},bottomRight:{points:["tr","br"],overflow:Wa,offset:[0,4],targetOffset:ii},rightBottom:{points:["bl","br"],overflow:Ha,offset:[4,0],targetOffset:ii},bottomLeft:{points:["tl","bl"],overflow:Wa,offset:[0,4],targetOffset:ii},leftBottom:{points:["br","bl"],overflow:Ha,offset:[-4,0],targetOffset:ii}},yj=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],Sj=function(e,n){var r=e.overlayClassName,i=e.trigger,o=i===void 0?["hover"]:i,a=e.mouseEnterDelay,s=a===void 0?0:a,l=e.mouseLeaveDelay,c=l===void 0?.1:l,u=e.overlayStyle,d=e.prefixCls,f=d===void 0?"rc-tooltip":d,h=e.children,m=e.onVisibleChange,p=e.afterVisibleChange,g=e.transitionName,O=e.animation,v=e.motion,y=e.placement,S=y===void 0?"right":y,x=e.align,$=x===void 0?{}:x,C=e.destroyTooltipOnHide,P=C===void 0?!1:C,w=e.defaultVisible,_=e.getTooltipContainer,R=e.overlayInnerStyle;e.arrowContent;var I=e.overlay,T=e.id,M=e.showArrow,Q=M===void 0?!0:M,E=e.classNames,k=e.styles,z=gt(e,yj),L=l0(T),B=ne(null);Jt(n,function(){return B.current});var F=Z({},z);"visible"in e&&(F.popupVisible=e.visible);var H=function(){return b(b0,{key:"content",prefixCls:f,id:L,bodyClassName:E==null?void 0:E.body,overlayInnerStyle:Z(Z({},R),k==null?void 0:k.body)},I)},X=function(){var N=wi.only(h),j=(N==null?void 0:N.props)||{},oe=Z(Z({},j),{},{"aria-describedby":I?L:null});return Un(h,oe)};return b(Uf,xe({popupClassName:U(r,E==null?void 0:E.root),prefixCls:f,popup:H,action:o,builtinPlacements:bj,popupPlacement:S,ref:B,popupAlign:$,getPopupContainer:_,onPopupVisibleChange:m,afterPopupVisibleChange:p,popupTransitionName:g,popupAnimation:O,popupMotion:v,defaultPopupVisible:w,autoDestroy:P,mouseLeaveDelay:c,popupStyle:Z(Z({},u),k==null?void 0:k.root),mouseEnterDelay:s,arrow:Q},F),X())};const xj=Se(Sj);function y0(t){const{sizePopupArrow:e,borderRadiusXS:n,borderRadiusOuter:r}=t,i=e/2,o=0,a=i,s=r*1/Math.sqrt(2),l=i-r*(1-1/Math.sqrt(2)),c=i-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*i-c,f=u,h=2*i-s,m=l,p=2*i-o,g=a,O=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),v=r*(Math.sqrt(2)-1),y=`polygon(${v}px 100%, 50% ${v}px, ${2*i-v}px 100%, ${v}px 100%)`,S=`path('M ${o} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${h} ${m} A ${r} ${r} 0 0 0 ${p} ${g} Z')`;return{arrowShadowWidth:O,arrowPath:S,arrowPolygon:y}}const $j=(t,e,n)=>{const{sizePopupArrow:r,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=t;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:e,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${V(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},W2=8;function eh(t){const{contentRadius:e,limitVerticalRadius:n}=t,r=e>12?e+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?W2:r}}function du(t,e){return t?e:{}}function S0(t,e,n){const{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=t,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},$j(t,e,i)),{"&:before":{background:e}})]},du(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${V(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),du(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${V(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),du(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:o},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:o}})),du(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:o},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:o}}))}}function Cj(t,e,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const i=r&&typeof r=="object"?r:{},o={};switch(t){case"top":case"bottom":o.shiftX=e.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=e.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const tS={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},wj={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},Pj=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function H2(t){const{arrowWidth:e,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o,visibleFirst:a}=t,s=e/2,l={},c=eh({contentRadius:o,limitVerticalRadius:!0});return Object.keys(tS).forEach(u=>{const d=r&&wj[u]||tS[u],f=Object.assign(Object.assign({},d),{offset:[0,0],dynamicInset:!0});switch(l[u]=f,Pj.has(u)&&(f.autoArrow=!1),u){case"top":case"topLeft":case"topRight":f.offset[1]=-s-i;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+i;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-i;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+i;break}if(r)switch(u){case"topLeft":case"bottomLeft":f.offset[0]=-c.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=c.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-c.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=c.arrowOffsetHorizontal*2-s;break}f.overflow=Cj(u,c,e,n),a&&(f.htmlRegion="visibleFirst")}),l}const _j=t=>{const{calc:e,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:h}=t,m=e(a).add(h).add(f).equal(),p=e(a).mul(2).add(h).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},Sn(t)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${n}-inner`]:{minWidth:p,minHeight:l,padding:`${V(t.calc(u).div(2).equal())} ${V(d)}`,color:`var(--ant-tooltip-color, ${i})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:m},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:t.min(a,W2)}},[`${n}-content`]:{position:"relative"}}),FC(t,(g,{darkColor:O})=>({[`&${n}-${g}`]:{[`${n}-inner`]:{backgroundColor:O},[`${n}-arrow`]:{"--antd-arrow-background-color":O}}}))),{"&-rtl":{direction:"rtl"}})},S0(t,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow}}]},Tj=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+70},eh({contentRadius:t.borderRadius,limitVerticalRadius:!0})),y0(It(t,{borderRadiusOuter:Math.min(t.borderRadiusOuter,4)}))),V2=(t,e=!0)=>Ft("Tooltip",r=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:a}=r,s=It(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a});return[_j(s),Tc(r,"zoom-big-fast")]},Tj,{resetStyle:!1,injectStyle:e})(t),Rj=No.map(t=>`${t}-inverse`),Ij=["success","processing","error","default","warning"];function F2(t,e=!0){return e?[].concat(Ce(Rj),Ce(No)).includes(t):No.includes(t)}function Mj(t){return Ij.includes(t)}function X2(t,e){const n=F2(e),r=U({[`${t}-${e}`]:e&&n}),i={},o={},a=GQ(e).toRgb(),l=(.299*a.r+.587*a.g+.114*a.b)/255<.5?"#FFF":"#000";return e&&!n&&(i.background=e,i["--ant-tooltip-color"]=l,o["--antd-arrow-background-color"]=e),{className:r,overlayStyle:i,arrowStyle:o}}const Ej=t=>{const{prefixCls:e,className:n,placement:r="top",title:i,color:o,overlayInnerStyle:a}=t,{getPrefixCls:s}=he(lt),l=s("tooltip",e),[c,u,d]=V2(l),f=X2(l,o),h=f.arrowStyle,m=Object.assign(Object.assign({},a),f.overlayStyle),p=U(u,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return c(b("div",{className:p,style:h},b("div",{className:`${l}-arrow`}),b(b0,Object.assign({},t,{className:u,prefixCls:l,overlayInnerStyle:m}),i)))};var kj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,openClassName:o,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:f,destroyOnHidden:h,arrow:m=!0,title:p,overlay:g,builtinPlacements:O,arrowPointAtCenter:v=!1,autoAdjustOverflow:y=!0,motion:S,getPopupContainer:x,placement:$="top",mouseEnterDelay:C=.1,mouseLeaveDelay:P=.1,overlayStyle:w,rootClassName:_,overlayClassName:R,styles:I,classNames:T}=t,M=kj(t,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),Q=!!m,[,E]=Or(),{getPopupContainer:k,getPrefixCls:z,direction:L,className:B,style:F,classNames:H,styles:X}=Zn("tooltip"),q=Cc(),N=ne(null),j=()=>{var Ye;(Ye=N.current)===null||Ye===void 0||Ye.forceAlign()};Jt(e,()=>{var Ye,rt;return{forceAlign:j,forcePopupAlign:()=>{q.deprecated(!1,"forcePopupAlign","forceAlign"),j()},nativeElement:(Ye=N.current)===null||Ye===void 0?void 0:Ye.nativeElement,popupElement:(rt=N.current)===null||rt===void 0?void 0:rt.popupElement}});const[oe,ee]=Pn(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),se=!p&&!g&&p!==0,fe=Ye=>{var rt,Be;ee(se?!1:Ye),se||((rt=t.onOpenChange)===null||rt===void 0||rt.call(t,Ye),(Be=t.onVisibleChange)===null||Be===void 0||Be.call(t,Ye))},re=ve(()=>{var Ye,rt;let Be=v;return typeof m=="object"&&(Be=(rt=(Ye=m.pointAtCenter)!==null&&Ye!==void 0?Ye:m.arrowPointAtCenter)!==null&&rt!==void 0?rt:v),O||H2({arrowPointAtCenter:Be,autoAdjustOverflow:y,arrowWidth:Q?E.sizePopupArrow:0,borderRadius:E.borderRadius,offset:E.marginXXS,visibleFirst:!0})},[v,m,O,E]),J=ve(()=>p===0?p:g||p||"",[g,p]),ue=b(Cs,{space:!0},typeof J=="function"?J():J),de=z("tooltip",i),D=z(),Y=t["data-popover-inject"];let me=oe;!("open"in t)&&!("visible"in t)&&se&&(me=!1);const G=en(c)&&!dw(c)?c:b("span",null,c),ce=G.props,ae=!ce.className||typeof ce.className=="string"?U(ce.className,o||`${de}-open`):ce.className,[pe,Oe,be]=V2(de,!Y),ge=X2(de,s),Me=ge.arrowStyle,Ie=U(R,{[`${de}-rtl`]:L==="rtl"},ge.className,_,Oe,be,B,H.root,T==null?void 0:T.root),He=U(H.body,T==null?void 0:T.body),[Ae,Ee]=Pc("Tooltip",M.zIndex),st=b(xj,Object.assign({},M,{zIndex:Ae,showArrow:Q,placement:$,mouseEnterDelay:C,mouseLeaveDelay:P,prefixCls:de,classNames:{root:Ie,body:He},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Me),X.root),F),w),I==null?void 0:I.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},X.body),l),I==null?void 0:I.body),ge.overlayStyle)},getTooltipContainer:x||a||k,ref:N,builtinPlacements:re,overlay:ue,visible:me,onVisibleChange:fe,afterVisibleChange:u??d,arrowContent:b("span",{className:`${de}-arrow-content`}),motion:{motionName:jo(D,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:h??!!f}),me?lr(G,{className:ae}):G);return pe(b(Nf.Provider,{value:Ee},st))}),on=Aj;on._InternalPanelDoNotUseOrYouWillBeFired=Ej;const Qj=t=>{const{componentCls:e,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:o,boxShadowSecondary:a,colorTextHeading:s,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:h,innerContentPadding:m,titlePadding:p}=t;return[{[e]:Object.assign(Object.assign({},Sn(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":d,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:l,boxShadow:a,padding:o},[`${e}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:h,padding:p},[`${e}-inner-content`]:{color:n,padding:m}})},S0(t,"var(--antd-arrow-background-color)"),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow,display:"inline-block",[`${e}-content`]:{display:"inline-block"}}}]},Nj=t=>{const{componentCls:e}=t;return{[e]:No.map(n=>{const r=t[`${n}6`];return{[`&${e}-${n}`]:{"--antd-arrow-background-color":r,[`${e}-inner`]:{backgroundColor:r},[`${e}-arrow`]:{background:"transparent"}}}})}},zj=t=>{const{lineWidth:e,controlHeight:n,fontHeight:r,padding:i,wireframe:o,zIndexPopupBase:a,borderRadiusLG:s,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=t,f=n-r,h=f/2,m=f/2-e,p=i;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},y0(t)),eh({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:o?0:12,titleMarginBottom:o?0:l,titlePadding:o?`${h}px ${p}px ${m}px`:0,titleBorderBottom:o?`${e}px ${c} ${u}`:"none",innerContentPadding:o?`${d}px ${p}px`:0})},Z2=Ft("Popover",t=>{const{colorBgElevated:e,colorText:n}=t,r=It(t,{popoverBg:e,popoverColor:n});return[Qj(r),Nj(r),Tc(r,"zoom-big")]},zj,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var jj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i!t&&!e?null:b(Qt,null,t&&b("div",{className:`${n}-title`},t),e&&b("div",{className:`${n}-inner-content`},e)),Lj=t=>{const{hashId:e,prefixCls:n,className:r,style:i,placement:o="top",title:a,content:s,children:l}=t,c=ws(a),u=ws(s),d=U(e,n,`${n}-pure`,`${n}-placement-${o}`,r);return b("div",{className:d,style:i},b("div",{className:`${n}-arrow`}),b(b0,Object.assign({},t,{className:e,prefixCls:n}),l||b(q2,{prefixCls:n,title:c,content:u})))},G2=t=>{const{prefixCls:e,className:n}=t,r=jj(t,["prefixCls","className"]),{getPrefixCls:i}=he(lt),o=i("popover",e),[a,s,l]=Z2(o);return a(b(Lj,Object.assign({},r,{prefixCls:o,hashId:s,className:U(n,l)})))};var Dj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,title:o,content:a,overlayClassName:s,placement:l="top",trigger:c="hover",children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:f=.1,onOpenChange:h,overlayStyle:m={},styles:p,classNames:g}=t,O=Dj(t,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:v,className:y,style:S,classNames:x,styles:$}=Zn("popover"),C=v("popover",i),[P,w,_]=Z2(C),R=v(),I=U(s,w,_,y,x.root,g==null?void 0:g.root),T=U(x.body,g==null?void 0:g.body),[M,Q]=Pn(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),E=(F,H)=>{Q(F,!0),h==null||h(F,H)},k=F=>{F.keyCode===ze.ESC&&E(!1,F)},z=F=>{E(F)},L=ws(o),B=ws(a);return P(b(on,Object.assign({placement:l,trigger:c,mouseEnterDelay:d,mouseLeaveDelay:f},O,{prefixCls:C,classNames:{root:I,body:T},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},$.root),S),m),p==null?void 0:p.root),body:Object.assign(Object.assign({},$.body),p==null?void 0:p.body)},ref:e,open:M,onOpenChange:z,overlay:L||B?b(q2,{prefixCls:C,title:L,content:B}):null,transitionName:jo(R,"zoom-big",O.transitionName),"data-popover-inject":!0}),lr(u,{onKeyDown:F=>{var H,X;en(u)&&((X=u==null?void 0:(H=u.props).onKeyDown)===null||X===void 0||X.call(H,F)),k(F)}})))}),x0=Bj;x0._InternalPanelDoNotUseOrYouWillBeFired=G2;const nS=t=>{const{size:e,shape:n}=he(tg),r=ve(()=>({size:t.size||e,shape:t.shape||n}),[t.size,t.shape,e,n]);return b(tg.Provider,{value:r},t.children)},Wj=t=>{var e,n,r,i;const{getPrefixCls:o,direction:a}=he(lt),{prefixCls:s,className:l,rootClassName:c,style:u,maxCount:d,maxStyle:f,size:h,shape:m,maxPopoverPlacement:p,maxPopoverTrigger:g,children:O,max:v}=t,y=o("avatar",s),S=`${y}-group`,x=Tr(y),[$,C,P]=D2(y,x),w=U(S,{[`${S}-rtl`]:a==="rtl"},P,x,l,c,C),_=sr(O).map((T,M)=>lr(T,{key:`avatar-key-${M}`})),R=(v==null?void 0:v.count)||d,I=_.length;if(R&&Rtypeof t!="object"&&typeof t!="function"||t===null;var Y2=Tt(null);function K2(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function J2(t){var e=he(Y2);return K2(e,t)}var Jj=["children","locked"],Pi=Tt(null);function eL(t,e){var n=Z({},t);return Object.keys(e).forEach(function(r){var i=e[r];i!==void 0&&(n[r]=i)}),n}function Kl(t){var e=t.children,n=t.locked,r=gt(t,Jj),i=he(Pi),o=xc(function(){return eL(i,r)},[i,r],function(a,s){return!n&&(a[0]!==s[0]||!Vl(a[1],s[1],!0))});return b(Pi.Provider,{value:o},e)}var tL=[],eP=Tt(null);function th(){return he(eP)}var tP=Tt(tL);function Vs(t){var e=he(tP);return ve(function(){return t!==void 0?[].concat(Ce(e),[t]):e},[e,t])}var nP=Tt(null),$0=Tt({});function rS(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(jf(t)){var n=t.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||t.isContentEditable||n==="a"&&!!t.getAttribute("href"),i=t.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&a===null&&(a=0),r&&t.disabled&&(a=null),a!==null&&(a>=0||e&&a<0)}return!1}function nL(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Ce(t.querySelectorAll("*")).filter(function(r){return rS(r,e)});return rS(t,e)&&n.unshift(t),n}var ng=ze.LEFT,rg=ze.RIGHT,ig=ze.UP,Ku=ze.DOWN,Ju=ze.ENTER,rP=ze.ESC,nl=ze.HOME,rl=ze.END,iS=[ig,Ku,ng,rg];function rL(t,e,n,r){var i,o="prev",a="next",s="children",l="parent";if(t==="inline"&&r===Ju)return{inlineTrigger:!0};var c=W(W({},ig,o),Ku,a),u=W(W(W(W({},ng,n?a:o),rg,n?o:a),Ku,s),Ju,s),d=W(W(W(W(W(W({},ig,o),Ku,a),Ju,s),rP,l),ng,n?s:l),rg,n?l:s),f={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},h=(i=f["".concat(t).concat(e?"":"Sub")])===null||i===void 0?void 0:i[r];switch(h){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function iL(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function oL(t,e){for(var n=t||document.activeElement;n;){if(e.has(n))return n;n=n.parentElement}return null}function C0(t,e){var n=nL(t,!0);return n.filter(function(r){return e.has(r)})}function oS(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var i=C0(t,e),o=i.length,a=i.findIndex(function(s){return n===s});return r<0?a===-1?a=o-1:a-=1:r>0&&(a+=1),a=(a+o)%o,i[a]}var og=function(e,n){var r=new Set,i=new Map,o=new Map;return e.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(K2(n,a),"']"));s&&(r.add(s),o.set(s,a),i.set(a,s))}),{elements:r,key2element:i,element2key:o}};function aL(t,e,n,r,i,o,a,s,l,c){var u=ne(),d=ne();d.current=e;var f=function(){Yt.cancel(u.current)};return ye(function(){return function(){f()}},[]),function(h){var m=h.which;if([].concat(iS,[Ju,rP,nl,rl]).includes(m)){var p=o(),g=og(p,r),O=g,v=O.elements,y=O.key2element,S=O.element2key,x=y.get(e),$=oL(x,v),C=S.get($),P=rL(t,a(C,!0).length===1,n,m);if(!P&&m!==nl&&m!==rl)return;(iS.includes(m)||[nl,rl].includes(m))&&h.preventDefault();var w=function(k){if(k){var z=k,L=k.querySelector("a");L!=null&&L.getAttribute("href")&&(z=L);var B=S.get(k);s(B),f(),u.current=Yt(function(){d.current===B&&z.focus()})}};if([nl,rl].includes(m)||P.sibling||!$){var _;!$||t==="inline"?_=i.current:_=iL($);var R,I=C0(_,v);m===nl?R=I[0]:m===rl?R=I[I.length-1]:R=oS(_,v,$,P.offset),w(R)}else if(P.inlineTrigger)l(C);else if(P.offset>0)l(C,!0),f(),u.current=Yt(function(){g=og(p,r);var E=$.getAttribute("aria-controls"),k=document.getElementById(E),z=oS(k,g.elements);w(z)},5);else if(P.offset<0){var T=a(C,!0),M=T[T.length-2],Q=y.get(M);l(M,!1),w(Q)}}c==null||c(h)}}function sL(t){Promise.resolve().then(t)}var w0="__RC_UTIL_PATH_SPLIT__",aS=function(e){return e.join(w0)},lL=function(e){return e.split(w0)},ag="rc-menu-more";function cL(){var t=te({}),e=le(t,2),n=e[1],r=ne(new Map),i=ne(new Map),o=te([]),a=le(o,2),s=a[0],l=a[1],c=ne(0),u=ne(!1),d=function(){u.current||n({})},f=Ut(function(y,S){var x=aS(S);i.current.set(x,y),r.current.set(y,x),c.current+=1;var $=c.current;sL(function(){$===c.current&&d()})},[]),h=Ut(function(y,S){var x=aS(S);i.current.delete(x),r.current.delete(y)},[]),m=Ut(function(y){l(y)},[]),p=Ut(function(y,S){var x=r.current.get(y)||"",$=lL(x);return S&&s.includes($[0])&&$.unshift(ag),$},[s]),g=Ut(function(y,S){return y.filter(function(x){return x!==void 0}).some(function(x){var $=p(x,!0);return $.includes(S)})},[p]),O=function(){var S=Ce(r.current.keys());return s.length&&S.push(ag),S},v=Ut(function(y){var S="".concat(r.current.get(y)).concat(w0),x=new Set;return Ce(i.current.keys()).forEach(function($){$.startsWith(S)&&x.add(i.current.get($))}),x},[]);return ye(function(){return function(){u.current=!0}},[]),{registerPath:f,unregisterPath:h,refreshOverflowKeys:m,isSubPathKey:g,getKeyPath:p,getKeys:O,getSubPathKeys:v}}function pl(t){var e=ne(t);e.current=t;var n=Ut(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a1&&(v.motionAppear=!1);var y=v.onVisibleChanged;return v.onVisibleChanged=function(S){return!f.current&&!S&&g(!0),y==null?void 0:y(S)},p?null:b(Kl,{mode:o,locked:!f.current},b(vi,xe({visible:O},v,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(S){var x=S.className,$=S.style;return b(P0,{id:e,className:x,style:$},i)}))}var PL=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],_L=["active"],TL=Se(function(t,e){var n=t.style,r=t.className,i=t.title,o=t.eventKey;t.warnKey;var a=t.disabled,s=t.internalPopupClose,l=t.children,c=t.itemIcon,u=t.expandIcon,d=t.popupClassName,f=t.popupOffset,h=t.popupStyle,m=t.onClick,p=t.onMouseEnter,g=t.onMouseLeave,O=t.onTitleClick,v=t.onTitleMouseEnter,y=t.onTitleMouseLeave,S=gt(t,PL),x=J2(o),$=he(Pi),C=$.prefixCls,P=$.mode,w=$.openKeys,_=$.disabled,R=$.overflowDisabled,I=$.activeKey,T=$.selectedKeys,M=$.itemIcon,Q=$.expandIcon,E=$.onItemClick,k=$.onOpenChange,z=$.onActive,L=he($0),B=L._internalRenderSubMenuItem,F=he(nP),H=F.isSubPathKey,X=Vs(),q="".concat(C,"-submenu"),N=_||a,j=ne(),oe=ne(),ee=c??M,se=u??Q,fe=w.includes(o),re=!R&&fe,J=H(T,o),ue=iP(o,N,v,y),de=ue.active,D=gt(ue,_L),Y=te(!1),me=le(Y,2),G=me[0],ce=me[1],ae=function(_e){N||ce(_e)},pe=function(_e){ae(!0),p==null||p({key:o,domEvent:_e})},Oe=function(_e){ae(!1),g==null||g({key:o,domEvent:_e})},be=ve(function(){return de||(P!=="inline"?G||H([I],o):!1)},[P,de,I,G,o,H]),ge=oP(X.length),Me=function(_e){N||(O==null||O({key:o,domEvent:_e}),P==="inline"&&k(o,!fe))},Ie=pl(function(Xe){m==null||m(Nd(Xe)),E(Xe)}),He=function(_e){P!=="inline"&&k(o,_e)},Ae=function(){z(o)},Ee=x&&"".concat(x,"-popup"),st=ve(function(){return b(aP,{icon:P!=="horizontal"?se:void 0,props:Z(Z({},t),{},{isOpen:re,isSubMenu:!0})},b("i",{className:"".concat(q,"-arrow")}))},[P,se,t,re,q]),Ye=b("div",xe({role:"menuitem",style:ge,className:"".concat(q,"-title"),tabIndex:N?null:-1,ref:j,title:typeof i=="string"?i:null,"data-menu-id":R&&x?null:x,"aria-expanded":re,"aria-haspopup":!0,"aria-controls":Ee,"aria-disabled":N,onClick:Me,onFocus:Ae},D),i,st),rt=ne(P);if(P!=="inline"&&X.length>1?rt.current="vertical":rt.current=P,!R){var Be=rt.current;Ye=b(CL,{mode:Be,prefixCls:q,visible:!s&&re&&P!=="inline",popupClassName:d,popupOffset:f,popupStyle:h,popup:b(Kl,{mode:Be==="horizontal"?"vertical":Be},b(P0,{id:Ee,ref:oe},l)),disabled:N,onVisibleChange:He},Ye)}var Re=b(Zi.Item,xe({ref:e,role:"none"},S,{component:"li",style:n,className:U(q,"".concat(q,"-").concat(P),r,W(W(W(W({},"".concat(q,"-open"),re),"".concat(q,"-active"),be),"".concat(q,"-selected"),J),"".concat(q,"-disabled"),N)),onMouseEnter:pe,onMouseLeave:Oe}),Ye,!R&&b(wL,{id:Ee,open:re,keyPath:X},l));return B&&(Re=B(Re,t,{selected:J,active:be,open:re,disabled:N})),b(Kl,{onItemClick:Ie,mode:P==="horizontal"?"vertical":P,itemIcon:ee,expandIcon:se},Re)}),nh=Se(function(t,e){var n=t.eventKey,r=t.children,i=Vs(n),o=_0(r,i),a=th();ye(function(){if(a)return a.registerPath(n,i),function(){a.unregisterPath(n,i)}},[i]);var s;return a?s=o:s=b(TL,xe({ref:e},t),o),b(tP.Provider,{value:i},s)});function T0(t){var e=t.className,n=t.style,r=he(Pi),i=r.prefixCls,o=th();return o?null:b("li",{role:"separator",className:U("".concat(i,"-item-divider"),e),style:n})}var RL=["className","title","eventKey","children"],IL=Se(function(t,e){var n=t.className,r=t.title;t.eventKey;var i=t.children,o=gt(t,RL),a=he(Pi),s=a.prefixCls,l="".concat(s,"-item-group");return b("li",xe({ref:e,role:"presentation"},o,{onClick:function(u){return u.stopPropagation()},className:U(l,n)}),b("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),b("ul",{role:"group",className:"".concat(l,"-list")},i))}),R0=Se(function(t,e){var n=t.eventKey,r=t.children,i=Vs(n),o=_0(r,i),a=th();return a?o:b(IL,xe({ref:e},pn(t,["warnKey"])),o)}),ML=["label","children","key","type","extra"];function sg(t,e,n){var r=e.item,i=e.group,o=e.submenu,a=e.divider;return(t||[]).map(function(s,l){if(s&&nt(s)==="object"){var c=s,u=c.label,d=c.children,f=c.key,h=c.type,m=c.extra,p=gt(c,ML),g=f??"tmp-".concat(l);return d||h==="group"?h==="group"?b(i,xe({key:g},p,{title:u}),sg(d,e,n)):b(o,xe({key:g},p,{title:u}),sg(d,e,n)):h==="divider"?b(a,xe({key:g},p)):b(r,xe({key:g},p,{extra:m}),u,(!!m||m===0)&&b("span",{className:"".concat(n,"-item-extra")},m))}return null}).filter(function(s){return s})}function lS(t,e,n,r,i){var o=t,a=Z({divider:T0,item:kc,group:R0,submenu:nh},r);return e&&(o=sg(e,a,i)),_0(o,n)}var EL=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Uo=[],kL=Se(function(t,e){var n,r=t,i=r.prefixCls,o=i===void 0?"rc-menu":i,a=r.rootClassName,s=r.style,l=r.className,c=r.tabIndex,u=c===void 0?0:c,d=r.items,f=r.children,h=r.direction,m=r.id,p=r.mode,g=p===void 0?"vertical":p,O=r.inlineCollapsed,v=r.disabled,y=r.disabledOverflow,S=r.subMenuOpenDelay,x=S===void 0?.1:S,$=r.subMenuCloseDelay,C=$===void 0?.1:$,P=r.forceSubMenuRender,w=r.defaultOpenKeys,_=r.openKeys,R=r.activeKey,I=r.defaultActiveFirst,T=r.selectable,M=T===void 0?!0:T,Q=r.multiple,E=Q===void 0?!1:Q,k=r.defaultSelectedKeys,z=r.selectedKeys,L=r.onSelect,B=r.onDeselect,F=r.inlineIndent,H=F===void 0?24:F,X=r.motion,q=r.defaultMotions,N=r.triggerSubMenuAction,j=N===void 0?"hover":N,oe=r.builtinPlacements,ee=r.itemIcon,se=r.expandIcon,fe=r.overflowedIndicator,re=fe===void 0?"...":fe,J=r.overflowedIndicatorPopupClassName,ue=r.getPopupContainer,de=r.onClick,D=r.onOpenChange,Y=r.onKeyDown;r.openAnimation,r.openTransitionName;var me=r._internalRenderMenuItem,G=r._internalRenderSubMenuItem,ce=r._internalComponents,ae=gt(r,EL),pe=ve(function(){return[lS(f,d,Uo,ce,o),lS(f,d,Uo,{},o)]},[f,d,ce]),Oe=le(pe,2),be=Oe[0],ge=Oe[1],Me=te(!1),Ie=le(Me,2),He=Ie[0],Ae=Ie[1],Ee=ne(),st=dL(m),Ye=h==="rtl",rt=Pn(w,{value:_,postState:function(Je){return Je||Uo}}),Be=le(rt,2),Re=Be[0],Xe=Be[1],_e=function(Je){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Wt(){Xe(Je),D==null||D(Je)}Ze?Ll(Wt):Wt()},Pe=te(Re),ft=le(Pe,2),yt=ft[0],xn=ft[1],Xt=ne(!1),gn=ve(function(){return(g==="inline"||g==="vertical")&&O?["vertical",O]:[g,!1]},[g,O]),fn=le(gn,2),Dt=fn[0],Ct=fn[1],ht=Dt==="inline",et=te(Dt),it=le(et,2),ke=it[0],ct=it[1],Ke=te(Ct),we=le(Ke,2),We=we[0],Qe=we[1];ye(function(){ct(Dt),Qe(Ct),Xt.current&&(ht?Xe(yt):_e(Uo))},[Dt,Ct]);var Ve=te(0),ut=le(Ve,2),tt=ut[0],St=ut[1],Pt=tt>=be.length-1||ke!=="horizontal"||y;ye(function(){ht&&xn(Re)},[Re]),ye(function(){return Xt.current=!0,function(){Xt.current=!1}},[]);var vt=cL(),_t=vt.registerPath,hn=vt.unregisterPath,sn=vt.refreshOverflowKeys,mn=vt.isSubPathKey,Tn=vt.getKeyPath,Bt=vt.getKeys,Gt=vt.getSubPathKeys,Te=ve(function(){return{registerPath:_t,unregisterPath:hn}},[_t,hn]),Le=ve(function(){return{isSubPathKey:mn}},[mn]);ye(function(){sn(Pt?Uo:be.slice(tt+1).map(function(Kt){return Kt.key}))},[tt,Pt]);var mt=Pn(R||I&&((n=be[0])===null||n===void 0?void 0:n.key),{value:R}),xt=le(mt,2),Ue=xt[0],Fe=xt[1],pt=pl(function(Kt){Fe(Kt)}),Et=pl(function(){Fe(void 0)});Jt(e,function(){return{list:Ee.current,focus:function(Je){var Ze,Wt=Bt(),Zt=og(Wt,st),nn=Zt.elements,vn=Zt.key2element,Sr=Zt.element2key,Jn=C0(Ee.current,nn),xr=Ue??(Jn[0]?Sr.get(Jn[0]):(Ze=be.find(function(ki){return!ki.props.disabled}))===null||Ze===void 0?void 0:Ze.key),cr=vn.get(xr);if(xr&&cr){var $r;cr==null||($r=cr.focus)===null||$r===void 0||$r.call(cr,Je)}}}});var Ne=Pn(k||[],{value:z,postState:function(Je){return Array.isArray(Je)?Je:Je==null?Uo:[Je]}}),ot=le(Ne,2),bt=ot[0],Rn=ot[1],Bn=function(Je){if(M){var Ze=Je.key,Wt=bt.includes(Ze),Zt;E?Wt?Zt=bt.filter(function(vn){return vn!==Ze}):Zt=[].concat(Ce(bt),[Ze]):Zt=[Ze],Rn(Zt);var nn=Z(Z({},Je),{},{selectedKeys:Zt});Wt?B==null||B(nn):L==null||L(nn)}!E&&Re.length&&ke!=="inline"&&_e(Uo)},Rr=pl(function(Kt){de==null||de(Nd(Kt)),Bn(Kt)}),Ir=pl(function(Kt,Je){var Ze=Re.filter(function(Zt){return Zt!==Kt});if(Je)Ze.push(Kt);else if(ke!=="inline"){var Wt=Gt(Kt);Ze=Ze.filter(function(Zt){return!Wt.has(Zt)})}Vl(Re,Ze,!0)||_e(Ze,!0)}),Kn=function(Je,Ze){var Wt=Ze??!Re.includes(Je);Ir(Je,Wt)},Mr=aL(ke,Ue,Ye,st,Ee,Bt,Tn,Fe,Kn,Y);ye(function(){Ae(!0)},[]);var Er=ve(function(){return{_internalRenderMenuItem:me,_internalRenderSubMenuItem:G}},[me,G]),ti=ke!=="horizontal"||y?be:be.map(function(Kt,Je){return b(Kl,{key:Kt.key,overflowDisabled:Je>tt},Kt)}),Ei=b(Zi,xe({id:m,ref:Ee,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:kc,className:U(o,"".concat(o,"-root"),"".concat(o,"-").concat(ke),l,W(W({},"".concat(o,"-inline-collapsed"),We),"".concat(o,"-rtl"),Ye),a),dir:h,style:s,role:"menu",tabIndex:u,data:ti,renderRawItem:function(Je){return Je},renderRawRest:function(Je){var Ze=Je.length,Wt=Ze?be.slice(-Ze):null;return b(nh,{eventKey:ag,title:re,disabled:Pt,internalPopupClose:Ze===0,popupClassName:J},Wt)},maxCount:ke!=="horizontal"||y?Zi.INVALIDATE:Zi.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Je){St(Je)},onKeyDown:Mr},ae));return b($0.Provider,{value:Er},b(Y2.Provider,{value:st},b(Kl,{prefixCls:o,rootClassName:a,mode:ke,openKeys:Re,rtl:Ye,disabled:v,motion:He?X:null,defaultMotions:He?q:null,activeKey:Ue,onActive:pt,onInactive:Et,selectedKeys:bt,inlineIndent:H,subMenuOpenDelay:x,subMenuCloseDelay:C,forceSubMenuRender:P,builtinPlacements:oe,triggerSubMenuAction:j,getPopupContainer:ue,itemIcon:ee,expandIcon:se,onItemClick:Rr,onOpenChange:Ir},b(nP.Provider,{value:Le},Ei),b("div",{style:{display:"none"},"aria-hidden":!0},b(eP.Provider,{value:Te},ge)))))}),Fs=kL;Fs.Item=kc;Fs.SubMenu=nh;Fs.ItemGroup=R0;Fs.Divider=T0;var AL={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},QL=function(e,n){return b(Mt,xe({},e,{ref:n,icon:AL}))},NL=Se(QL);const lP=Tt({siderHook:{addSider:()=>null,removeSider:()=>null}}),zL=t=>{const{antCls:e,componentCls:n,colorText:r,footerBg:i,headerHeight:o,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=t;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:o,padding:a,color:s,lineHeight:V(o),background:d,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:i},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},cP=t=>{const{colorBgLayout:e,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:o,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=t,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140",bodyBg:e,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:i,footerPadding:`${o}px ${c}px`,footerBg:e,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:i}},uP=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],dP=Ft("Layout",zL,cP,{deprecatedTokens:uP}),jL=t=>{const{componentCls:e,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:o,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:h,lightTriggerColor:m,lightTriggerBg:p,bodyBg:g}=t;return{[e]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${e}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${e}-children`]:{overflow:"hidden"},[`${e}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:V(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${e}-zero-width-trigger`]:{position:"absolute",top:c,insetInlineEnd:t.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${V(f)} ${V(f)} 0`,cursor:"pointer",transition:`background ${i} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${i}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:t.calc(u).mul(-1).equal(),borderRadius:`${V(f)} 0 0 ${V(f)}`}},"&-light":{background:h,[`${e}-trigger`]:{color:m,background:p},[`${e}-zero-width-trigger`]:{color:m,background:p,border:`1px solid ${g}`,borderInlineStart:0}}}}},LL=Ft(["Layout","Sider"],jL,cP,{deprecatedTokens:uP});var DL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i!Number.isNaN(Number.parseFloat(t))&&isFinite(t),rh=Tt({}),WL=(()=>{let t=0;return(e="")=>(t+=1,`${e}${t}`)})(),fP=Se((t,e)=>{const{prefixCls:n,className:r,trigger:i,children:o,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:h,breakpoint:m,onCollapse:p,onBreakpoint:g}=t,O=DL(t,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:v}=he(lP),[y,S]=te("collapsed"in t?t.collapsed:a),[x,$]=te(!1);ye(()=>{"collapsed"in t&&S(t.collapsed)},[t.collapsed]);const C=(ee,se)=>{"collapsed"in t||S(ee),p==null||p(ee,se)},{getPrefixCls:P,direction:w}=he(lt),_=P("layout-sider",n),[R,I,T]=LL(_),M=ne(null);M.current=ee=>{$(ee.matches),g==null||g(ee.matches),y!==ee.matches&&C(ee.matches,"responsive")},ye(()=>{function ee(fe){var re;return(re=M.current)===null||re===void 0?void 0:re.call(M,fe)}let se;return typeof(window==null?void 0:window.matchMedia)<"u"&&m&&m in cS&&(se=window.matchMedia(`screen and (max-width: ${cS[m]})`),j2(se,ee),ee(se)),()=>{L2(se,ee)}},[m]),ye(()=>{const ee=WL("ant-sider-");return v.addSider(ee),()=>v.removeSider(ee)},[]);const Q=()=>{C(!y,"clickTrigger")},E=pn(O,["collapsed"]),k=y?f:d,z=BL(k)?`${k}px`:String(k),L=parseFloat(String(f||0))===0?b("span",{onClick:Q,className:U(`${_}-zero-width-trigger`,`${_}-zero-width-trigger-${u?"right":"left"}`),style:h},i||b(NL,null)):null,B=w==="rtl"==!u,X={expanded:b(B?$s:Yl,null),collapsed:b(B?Yl:$s,null)}[y?"collapsed":"expanded"],q=i!==null?L||b("div",{className:`${_}-trigger`,onClick:Q,style:{width:z}},i||X):null,N=Object.assign(Object.assign({},l),{flex:`0 0 ${z}`,maxWidth:z,minWidth:z,width:z}),j=U(_,`${_}-${s}`,{[`${_}-collapsed`]:!!y,[`${_}-has-trigger`]:c&&i!==null&&!L,[`${_}-below`]:!!x,[`${_}-zero-width`]:parseFloat(z)===0},r,I,T),oe=ve(()=>({siderCollapsed:y}),[y]);return R(b(rh.Provider,{value:oe},b("aside",Object.assign({className:j},E,{style:N,ref:e}),b("div",{className:`${_}-children`},o),c||x&&L?q:null)))});var HL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},VL=function(e,n){return b(Mt,xe({},e,{ref:n,icon:HL}))},I0=Se(VL);const zd=Tt({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var FL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,dashed:r}=t,i=FL(t,["prefixCls","className","dashed"]),{getPrefixCls:o}=he(lt),a=o("menu",e),s=U({[`${a}-item-divider-dashed`]:!!r},n);return b(T0,Object.assign({className:s},i))},mP=t=>{var e;const{className:n,children:r,icon:i,title:o,danger:a,extra:s}=t,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:f}=he(zd),h=y=>{const S=r==null?void 0:r[0],x=b("span",{className:U(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},r);return(!i||en(r)&&r.type==="span")&&r&&y&&c&&typeof S=="string"?b("div",{className:`${l}-inline-collapsed-noicon`},S.charAt(0)):x},{siderCollapsed:m}=he(rh);let p=o;typeof o>"u"?p=c?r:"":o===!1&&(p="");const g={title:p};!m&&!f&&(g.title=null,g.open=!1);const O=sr(r).length;let v=b(kc,Object.assign({},pn(t,["title","icon","danger"]),{className:U({[`${l}-item-danger`]:a,[`${l}-item-only-child`]:(i?O+1:O)===1},n),title:typeof o=="string"?o:void 0}),lr(i,{className:U(en(i)?(e=i.props)===null||e===void 0?void 0:e.className:void 0,`${l}-item-icon`)}),h(f));return d||(v=b(on,Object.assign({},g,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),v)),v};var XL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{children:n}=t,r=XL(t,["children"]),i=he(jd),o=ve(()=>Object.assign(Object.assign({},i),r),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=mM(n),s=Oo(e,a?Xo(n):null);return b(jd.Provider,{value:o},b(Cs,{space:!0},a?Un(n,{ref:s}):n))}),qL=t=>{const{componentCls:e,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:o,lineType:a,itemPaddingInline:s}=t;return{[`${e}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${V(o)} ${a} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${e}-item:hover, > ${e}-item-active, - > ${e}-submenu ${e}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${e}-item, ${e}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${e}-submenu-arrow`]:{display:"none"}}}},Qj=({componentCls:t,menuArrowOffset:e,calc:n})=>({[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical, - ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${q(n(e).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${q(e)})`}}}}),Jy=t=>wf(t),e1=(t,e)=>{const{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:o,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:h,motionEaseInOut:p,motionEaseOut:m,itemPaddingInline:g,motionDurationMid:v,itemHoverColor:O,lineType:S,colorSplit:x,itemDisabledColor:b,dangerItemColor:C,dangerItemHoverColor:$,dangerItemSelectedColor:w,dangerItemActiveBg:P,dangerItemSelectedBg:_,popupBg:T,itemHoverBg:R,itemActiveBg:k,menuSubMenuBg:I,horizontalItemSelectedColor:Q,horizontalItemSelectedBg:M,horizontalItemBorderRadius:E,horizontalItemHoverBg:N}=t;return{[`${n}-${e}, ${n}-${e} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:Object.assign({},Jy(t)),[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:o},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},Jy(t))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${b} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:O}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:R},"&:active":{backgroundColor:k}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:R},"&:active":{backgroundColor:k}}},[`${n}-item-danger`]:{color:C,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:$}},[`&${n}-item:active`]:{background:P}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:w},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:_}},[`&${n}-submenu > ${n}`]:{backgroundColor:I},[`&${n}-popup > ${n}`]:{backgroundColor:T},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:T},[`&${n}-horizontal`]:Object.assign(Object.assign({},e==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:t.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:E,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${q(u)} solid transparent`,transition:`border-color ${h} ${p}`,content:'""'},"&:hover, &-active, &-open":{background:N,"&::after":{borderBottomWidth:u,borderBottomColor:Q}},"&-selected":{color:Q,backgroundColor:M,"&:hover":{backgroundColor:M},"&::after":{borderBottomWidth:u,borderBottomColor:Q}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${q(f)} ${S} ${x}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${q(d)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${v} ${m}`,`opacity ${v} ${m}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${v} ${p}`,`opacity ${v} ${p}`].join(",")}}}}}},t1=t=>{const{componentCls:e,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:o,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=t,u=t.calc(o).add(i).add(a).equal();return{[`${e}-item`]:{position:"relative",overflow:"hidden"},[`${e}-item, ${e}-submenu-title`]:{height:n,lineHeight:q(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${e}-item, - > ${e}-submenu > ${e}-submenu-title`]:{height:n,lineHeight:q(n)},[`${e}-item-group-list ${e}-submenu-title, - ${e}-submenu-title`]:{paddingInlineEnd:u}}},Nj=t=>{const{componentCls:e,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:o,controlHeightLG:a,motionEaseOut:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:h,boxShadowSecondary:p,collapsedWidth:m,collapsedIconSize:g}=t,v={height:r,lineHeight:q(r),listStylePosition:"inside",listStyleType:"disc"};return[{[e]:{"&-inline, &-vertical":Object.assign({[`&${e}-root`]:{boxShadow:"none"}},t1(t))},[`${e}-submenu-popup`]:{[`${e}-vertical`]:Object.assign(Object.assign({},t1(t)),{boxShadow:p})}},{[`${e}-submenu-popup ${e}-vertical${e}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${q(t.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${e}-inline`]:{width:"100%",[`&${e}-root`]:{[`${e}-item, ${e}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${f}`,`background ${f}`,`padding ${d} ${s}`].join(","),[`> ${e}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${e}-sub${e}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${e}-submenu > ${e}-submenu-title`]:v,[`& ${e}-item-group-title`]:{paddingInlineStart:l}},[`${e}-item`]:v}},{[`${e}-inline-collapsed`]:{width:m,[`&${e}-root`]:{[`${e}-item, ${e}-submenu ${e}-submenu-title`]:{[`> ${e}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${e}-item, + > ${e}-submenu ${e}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${e}-item, ${e}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${e}-submenu-arrow`]:{display:"none"}}}},GL=({componentCls:t,menuArrowOffset:e,calc:n})=>({[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical, + ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${V(n(e).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${V(e)})`}}}}),uS=t=>xs(t),dS=(t,e)=>{const{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:o,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:h,motionEaseInOut:m,motionEaseOut:p,itemPaddingInline:g,motionDurationMid:O,itemHoverColor:v,lineType:y,colorSplit:S,itemDisabledColor:x,dangerItemColor:$,dangerItemHoverColor:C,dangerItemSelectedColor:P,dangerItemActiveBg:w,dangerItemSelectedBg:_,popupBg:R,itemHoverBg:I,itemActiveBg:T,menuSubMenuBg:M,horizontalItemSelectedColor:Q,horizontalItemSelectedBg:E,horizontalItemBorderRadius:k,horizontalItemHoverBg:z}=t;return{[`${n}-${e}, ${n}-${e} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:Object.assign({},uS(t)),[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:o},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},uS(t))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${x} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:v}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:I},"&:active":{backgroundColor:T}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:I},"&:active":{backgroundColor:T}}},[`${n}-item-danger`]:{color:$,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:C}},[`&${n}-item:active`]:{background:w}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:P},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:_}},[`&${n}-submenu > ${n}`]:{backgroundColor:M},[`&${n}-popup > ${n}`]:{backgroundColor:R},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:R},[`&${n}-horizontal`]:Object.assign(Object.assign({},e==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:t.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:k,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${V(u)} solid transparent`,transition:`border-color ${h} ${m}`,content:'""'},"&:hover, &-active, &-open":{background:z,"&::after":{borderBottomWidth:u,borderBottomColor:Q}},"&-selected":{color:Q,backgroundColor:E,"&:hover":{backgroundColor:E},"&::after":{borderBottomWidth:u,borderBottomColor:Q}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${V(f)} ${y} ${S}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${V(d)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${O} ${p}`,`opacity ${O} ${p}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:P}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${O} ${m}`,`opacity ${O} ${m}`].join(",")}}}}}},fS=t=>{const{componentCls:e,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:o,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=t,u=t.calc(o).add(i).add(a).equal();return{[`${e}-item`]:{position:"relative",overflow:"hidden"},[`${e}-item, ${e}-submenu-title`]:{height:n,lineHeight:V(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${e}-item, + > ${e}-submenu > ${e}-submenu-title`]:{height:n,lineHeight:V(n)},[`${e}-item-group-list ${e}-submenu-title, + ${e}-submenu-title`]:{paddingInlineEnd:u}}},UL=t=>{const{componentCls:e,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:o,controlHeightLG:a,motionEaseOut:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:h,boxShadowSecondary:m,collapsedWidth:p,collapsedIconSize:g}=t,O={height:r,lineHeight:V(r),listStylePosition:"inside",listStyleType:"disc"};return[{[e]:{"&-inline, &-vertical":Object.assign({[`&${e}-root`]:{boxShadow:"none"}},fS(t))},[`${e}-submenu-popup`]:{[`${e}-vertical`]:Object.assign(Object.assign({},fS(t)),{boxShadow:m})}},{[`${e}-submenu-popup ${e}-vertical${e}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${V(t.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${e}-inline`]:{width:"100%",[`&${e}-root`]:{[`${e}-item, ${e}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${f}`,`background ${f}`,`padding ${d} ${s}`].join(","),[`> ${e}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${e}-sub${e}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${e}-submenu > ${e}-submenu-title`]:O,[`& ${e}-item-group-title`]:{paddingInlineStart:l}},[`${e}-item`]:O}},{[`${e}-inline-collapsed`]:{width:p,[`&${e}-root`]:{[`${e}-item, ${e}-submenu ${e}-submenu-title`]:{[`> ${e}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${e}-item, > ${e}-item-group > ${e}-item-group-list > ${e}-item, > ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title, - > ${e}-submenu > ${e}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${q(t.calc(g).div(2).equal())} - ${q(c)})`,textOverflow:"clip",[` + > ${e}-submenu > ${e}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${V(t.calc(g).div(2).equal())} - ${V(c)})`,textOverflow:"clip",[` ${e}-submenu-arrow, ${e}-submenu-expand-icon - `]:{opacity:0},[`${e}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:q(r),"+ span":{display:"inline-block",opacity:0}}},[`${e}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${e}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:i}},[`${e}-item-group-title`]:Object.assign(Object.assign({},ba),{paddingInline:h})}}]},n1=t=>{const{componentCls:e,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:o,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=t;return{[`${e}-item, ${e}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(","),[`${e}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${o}`,`margin ${n} ${i}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(",")}},[`${e}-item-icon`]:Object.assign({},As()),[`&${e}-item-only-child`]:{[`> ${a}, > ${e}-item-icon`]:{marginInlineEnd:0}}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${e}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},r1=t=>{const{componentCls:e,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:o,menuArrowOffset:a}=t;return{[`${e}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:t.calc(o).mul(.6).equal(),height:t.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:i,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${q(t.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${q(a)})`}}}}},zj=t=>{const{antCls:e,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:h,menuArrowSize:p,menuArrowOffset:m,lineType:g,groupTitleLineHeight:v,groupTitleFontSize:O}=t;return[{"":{[n]:Object.assign(Object.assign({},No()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),No()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:t.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${q(s)} ${q(l)}`,fontSize:O,lineHeight:v,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${i} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${e}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:t.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),n1(t)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${q(t.calc(r).mul(2).equal())} ${q(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:f,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:f},n1(t)),r1(t)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:h},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:t.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:t.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:t.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:t.paddingXS}}}),r1(t)),{[`&-inline-collapsed ${n}-submenu-arrow, - &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${q(m)})`},"&::after":{transform:`rotate(45deg) translateX(${q(t.calc(m).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${q(t.calc(p).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${q(t.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${q(m)})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},Lj=t=>{var e,n,r;const{colorPrimary:i,colorError:o,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:h,lineWidthBold:p,controlItemBgActive:m,colorBgTextHover:g,controlHeightLG:v,lineHeight:O,colorBgElevated:S,marginXXS:x,padding:b,fontSize:C,controlHeightSM:$,fontSizeLG:w,colorTextLightSolid:P,colorErrorHover:_}=t,T=(e=t.activeBarWidth)!==null&&e!==void 0?e:0,R=(n=t.activeBarBorderWidth)!==null&&n!==void 0?n:h,k=(r=t.itemMarginInline)!==null&&r!==void 0?r:t.marginXXS,I=new Dt(P).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:t.zIndexPopupBase+50,radiusItem:t.borderRadiusLG,itemBorderRadius:t.borderRadiusLG,radiusSubMenuItem:t.borderRadiusSM,subMenuItemBorderRadius:t.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:i,itemSelectedColor:i,subMenuItemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:u,itemBg:u,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:f,itemActiveBg:m,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:T,colorActiveBarHeight:p,activeBarHeight:p,colorActiveBarBorderSize:h,activeBarBorderWidth:R,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:k,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:v,groupTitleLineHeight:O,collapsedWidth:v*2,popupBg:S,itemMarginBlock:x,itemPaddingInline:b,horizontalLineHeight:`${v*1.15}px`,iconSize:C,iconMarginInlineEnd:$-C,collapsedIconSize:w,groupTitleFontSize:C,darkItemDisabledColor:new Dt(P).setA(.25).toRgbString(),darkItemColor:I,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:P,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:I,darkItemHoverColor:P,darkDangerItemHoverColor:_,darkDangerItemSelectedColor:P,darkDangerItemActiveBg:o,itemWidth:T?`calc(100% + ${R}px)`:`calc(100% - ${k*2}px)`}},jj=(t,e=t,n=!0)=>Zt("Menu",i=>{const{colorBgElevated:o,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:h,darkDangerItemSelectedBg:p,darkItemHoverBg:m,darkGroupTitleColor:g,darkItemHoverColor:v,darkItemDisabledColor:O,darkDangerItemHoverColor:S,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:b,popupBg:C,darkPopupBg:$}=i,w=i.calc(s).div(7).mul(5).equal(),P=kt(i,{menuArrowSize:w,menuHorizontalHeight:i.calc(a).mul(1.15).equal(),menuArrowOffset:i.calc(w).mul(.25).equal(),menuSubMenuBg:o,calc:i.calc,popupBg:C}),_=kt(P,{itemColor:l,itemHoverColor:v,groupTitleColor:g,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:$,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:m,itemDisabledColor:O,dangerItemColor:c,dangerItemHoverColor:S,dangerItemSelectedColor:x,dangerItemActiveBg:b,dangerItemSelectedBg:p,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:h});return[zj(P),Aj(P),Nj(P),e1(P,"light"),e1(_,"dark"),Qj(P),Fv(P),Lo(P,"slide-up"),Lo(P,"slide-down"),Cc(P,"zoom-big")]},Lj,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(t,e),J2=t=>{var e;const{popupClassName:n,icon:r,title:i,theme:o}=t,a=fe(kd),{prefixCls:s,inlineCollapsed:l,theme:c}=a,u=Ws();let d;if(!r)d=l&&!u.length&&i&&typeof i=="string"?y("div",{className:`${s}-inline-collapsed-noicon`},i.charAt(0)):y("span",{className:`${s}-title-content`},i);else{const p=Kt(i)&&i.type==="span";d=y(At,null,fr(r,{className:Z(Kt(r)?(e=r.props)===null||e===void 0?void 0:e.className:void 0,`${s}-item-icon`)}),p?i:y("span",{className:`${s}-title-content`},i))}const f=ge(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[h]=Sc("Menu");return y(kd.Provider,{value:f},y(Xf,Object.assign({},cn(t,["icon"]),{title:d,popupClassName:Z(s,n,`${s}-${o||c}`),popupStyle:Object.assign({zIndex:h},t.popupStyle)})))};var Dj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const r=fe(Rd),i=r||{},{getPrefixCls:o,getPopupContainer:a,direction:s,menu:l}=fe(it),c=o(),{prefixCls:u,className:d,style:f,theme:h="light",expandIcon:p,_internalDisableMenuItemTitleTooltip:m,inlineCollapsed:g,siderCollapsed:v,rootClassName:O,mode:S,selectable:x,onClick:b,overflowedIndicatorPopupClassName:C}=t,$=Dj(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),w=cn($,["collapsedWidth"]);(n=i.validator)===null||n===void 0||n.call(i,{mode:S});const P=pn((...H)=>{var V;b==null||b.apply(void 0,H),(V=i.onClick)===null||V===void 0||V.call(i)}),_=i.mode||S,T=x??i.selectable,R=g??v,k={horizontal:{motionName:`${c}-slide-up`},inline:Sd(c),other:{motionName:`${c}-zoom-big`}},I=o("menu",u||i.prefixCls),Q=$r(I),[M,E,N]=jj(I,Q,!r),z=Z(`${I}-${h}`,l==null?void 0:l.className,d),L=ge(()=>{var H,V;if(typeof p=="function"||Zh(p))return p||null;if(typeof i.expandIcon=="function"||Zh(i.expandIcon))return i.expandIcon||null;if(typeof(l==null?void 0:l.expandIcon)=="function"||Zh(l==null?void 0:l.expandIcon))return(l==null?void 0:l.expandIcon)||null;const X=(H=p??(i==null?void 0:i.expandIcon))!==null&&H!==void 0?H:l==null?void 0:l.expandIcon;return fr(X,{className:Z(`${I}-submenu-expand-icon`,Kt(X)?(V=X.props)===null||V===void 0?void 0:V.className:void 0)})},[p,i==null?void 0:i.expandIcon,l==null?void 0:l.expandIcon,I]),F=ge(()=>({prefixCls:I,inlineCollapsed:R||!1,direction:s,firstLevel:!0,theme:h,mode:_,disableMenuItemTitleTooltip:m}),[I,R,s,m,h]);return M(y(Rd.Provider,{value:null},y(kd.Provider,{value:F},y(Fs,Object.assign({getPopupContainer:a,overflowedIndicator:y(x0,null),overflowedIndicatorPopupClassName:Z(I,`${I}-${h}`,C),mode:_,selectable:T,onClick:P},w,{inlineCollapsed:R,style:Object.assign(Object.assign({},l==null?void 0:l.style),f),className:z,prefixCls:I,direction:s,defaultMotions:k,expandIcon:L,ref:e,rootClassName:Z(O,E,i.rootClassName,N,Q),_internalComponents:Bj})))))}),kc=Se((t,e)=>{const n=U(null),r=fe(Zf);return Yt(e,()=>({menu:n.current,focus:i=>{var o;(o=n.current)===null||o===void 0||o.focus(i)}})),y(Wj,Object.assign({ref:n},t,r))});kc.Item=K2;kc.SubMenu=J2;kc.Divider=U2;kc.ItemGroup=S0;const Fj=t=>{const{componentCls:e,menuCls:n,colorError:r,colorTextLightSolid:i}=t,o=`${n}-item`;return{[`${e}, ${e}-menu-submenu`]:{[`${n} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},Vj=t=>{const{componentCls:e,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:o,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:h,controlPaddingHorizontal:p,colorBgElevated:m}=t;return[{[e]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:t.calc(o).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:h}},[`${e}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:h},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${e}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomLeft, + `]:{opacity:0},[`${e}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:V(r),"+ span":{display:"inline-block",opacity:0}}},[`${e}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${e}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:i}},[`${e}-item-group-title`]:Object.assign(Object.assign({},Sa),{paddingInline:h})}}]},hS=t=>{const{componentCls:e,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:o,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=t;return{[`${e}-item, ${e}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(","),[`${e}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${o}`,`margin ${n} ${i}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(",")}},[`${e}-item-icon`]:Object.assign({},zs()),[`&${e}-item-only-child`]:{[`> ${a}, > ${e}-item-icon`]:{marginInlineEnd:0}}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${e}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},mS=t=>{const{componentCls:e,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:o,menuArrowOffset:a}=t;return{[`${e}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:t.calc(o).mul(.6).equal(),height:t.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:i,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${V(t.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${V(a)})`}}}}},YL=t=>{const{antCls:e,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:h,menuArrowSize:m,menuArrowOffset:p,lineType:g,groupTitleLineHeight:O,groupTitleFontSize:v}=t;return[{"":{[n]:Object.assign(Object.assign({},zo()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Sn(t)),zo()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:t.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${V(s)} ${V(l)}`,fontSize:v,lineHeight:O,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${i} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${e}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:t.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),hS(t)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${V(t.calc(r).mul(2).equal())} ${V(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:f,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:f},hS(t)),mS(t)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:h},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:t.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:t.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:t.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:t.paddingXS}}}),mS(t)),{[`&-inline-collapsed ${n}-submenu-arrow, + &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${V(p)})`},"&::after":{transform:`rotate(45deg) translateX(${V(t.calc(p).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${V(t.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${V(t.calc(p).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${V(p)})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},KL=t=>{var e,n,r;const{colorPrimary:i,colorError:o,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:h,lineWidthBold:m,controlItemBgActive:p,colorBgTextHover:g,controlHeightLG:O,lineHeight:v,colorBgElevated:y,marginXXS:S,padding:x,fontSize:$,controlHeightSM:C,fontSizeLG:P,colorTextLightSolid:w,colorErrorHover:_}=t,R=(e=t.activeBarWidth)!==null&&e!==void 0?e:0,I=(n=t.activeBarBorderWidth)!==null&&n!==void 0?n:h,T=(r=t.itemMarginInline)!==null&&r!==void 0?r:t.marginXXS,M=new Vt(w).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:t.zIndexPopupBase+50,radiusItem:t.borderRadiusLG,itemBorderRadius:t.borderRadiusLG,radiusSubMenuItem:t.borderRadiusSM,subMenuItemBorderRadius:t.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:i,itemSelectedColor:i,subMenuItemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:u,itemBg:u,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:f,itemActiveBg:p,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:p,itemSelectedBg:p,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:R,colorActiveBarHeight:m,activeBarHeight:m,colorActiveBarBorderSize:h,activeBarBorderWidth:I,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:T,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:O,groupTitleLineHeight:v,collapsedWidth:O*2,popupBg:y,itemMarginBlock:S,itemPaddingInline:x,horizontalLineHeight:`${O*1.15}px`,iconSize:$,iconMarginInlineEnd:C-$,collapsedIconSize:P,groupTitleFontSize:$,darkItemDisabledColor:new Vt(w).setA(.25).toRgbString(),darkItemColor:M,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:w,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:M,darkItemHoverColor:w,darkDangerItemHoverColor:_,darkDangerItemSelectedColor:w,darkDangerItemActiveBg:o,itemWidth:R?`calc(100% + ${I}px)`:`calc(100% - ${T*2}px)`}},JL=(t,e=t,n=!0)=>Ft("Menu",i=>{const{colorBgElevated:o,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:h,darkDangerItemSelectedBg:m,darkItemHoverBg:p,darkGroupTitleColor:g,darkItemHoverColor:O,darkItemDisabledColor:v,darkDangerItemHoverColor:y,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:x,popupBg:$,darkPopupBg:C}=i,P=i.calc(s).div(7).mul(5).equal(),w=It(i,{menuArrowSize:P,menuHorizontalHeight:i.calc(a).mul(1.15).equal(),menuArrowOffset:i.calc(P).mul(.25).equal(),menuSubMenuBg:o,calc:i.calc,popupBg:$}),_=It(w,{itemColor:l,itemHoverColor:O,groupTitleColor:g,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:C,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:p,itemDisabledColor:v,dangerItemColor:c,dangerItemHoverColor:y,dangerItemSelectedColor:S,dangerItemActiveBg:x,dangerItemSelectedBg:m,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:h});return[YL(w),qL(w),UL(w),dS(w,"light"),dS(_,"dark"),GL(w),Kv(w),Lo(w,"slide-up"),Lo(w,"slide-down"),Tc(w,"zoom-big")]},KL,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(t,e),pP=t=>{var e;const{popupClassName:n,icon:r,title:i,theme:o}=t,a=he(zd),{prefixCls:s,inlineCollapsed:l,theme:c}=a,u=Vs();let d;if(!r)d=l&&!u.length&&i&&typeof i=="string"?b("div",{className:`${s}-inline-collapsed-noicon`},i.charAt(0)):b("span",{className:`${s}-title-content`},i);else{const m=en(i)&&i.type==="span";d=b(Qt,null,lr(r,{className:U(en(r)?(e=r.props)===null||e===void 0?void 0:e.className:void 0,`${s}-item-icon`)}),m?i:b("span",{className:`${s}-title-content`},i))}const f=ve(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[h]=Pc("Menu");return b(zd.Provider,{value:f},b(nh,Object.assign({},pn(t,["icon"]),{title:d,popupClassName:U(s,n,`${s}-${o||c}`),popupStyle:Object.assign({zIndex:h},t.popupStyle)})))};var eD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const r=he(jd),i=r||{},{getPrefixCls:o,getPopupContainer:a,direction:s,menu:l}=he(lt),c=o(),{prefixCls:u,className:d,style:f,theme:h="light",expandIcon:m,_internalDisableMenuItemTitleTooltip:p,inlineCollapsed:g,siderCollapsed:O,rootClassName:v,mode:y,selectable:S,onClick:x,overflowedIndicatorPopupClassName:$}=t,C=eD(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),P=pn(C,["collapsedWidth"]);(n=i.validator)===null||n===void 0||n.call(i,{mode:y});const w=bn((...H)=>{var X;x==null||x.apply(void 0,H),(X=i.onClick)===null||X===void 0||X.call(i)}),_=i.mode||y,R=S??i.selectable,I=g??O,T={horizontal:{motionName:`${c}-slide-up`},inline:Rd(c),other:{motionName:`${c}-zoom-big`}},M=o("menu",u||i.prefixCls),Q=Tr(M),[E,k,z]=JL(M,Q,!r),L=U(`${M}-${h}`,l==null?void 0:l.className,d),B=ve(()=>{var H,X;if(typeof m=="function"||rm(m))return m||null;if(typeof i.expandIcon=="function"||rm(i.expandIcon))return i.expandIcon||null;if(typeof(l==null?void 0:l.expandIcon)=="function"||rm(l==null?void 0:l.expandIcon))return(l==null?void 0:l.expandIcon)||null;const q=(H=m??(i==null?void 0:i.expandIcon))!==null&&H!==void 0?H:l==null?void 0:l.expandIcon;return lr(q,{className:U(`${M}-submenu-expand-icon`,en(q)?(X=q.props)===null||X===void 0?void 0:X.className:void 0)})},[m,i==null?void 0:i.expandIcon,l==null?void 0:l.expandIcon,M]),F=ve(()=>({prefixCls:M,inlineCollapsed:I||!1,direction:s,firstLevel:!0,theme:h,mode:_,disableMenuItemTitleTooltip:p}),[M,I,s,p,h]);return E(b(jd.Provider,{value:null},b(zd.Provider,{value:F},b(Fs,Object.assign({getPopupContainer:a,overflowedIndicator:b(I0,null),overflowedIndicatorPopupClassName:U(M,`${M}-${h}`,$),mode:_,selectable:R,onClick:w},P,{inlineCollapsed:I,style:Object.assign(Object.assign({},l==null?void 0:l.style),f),className:L,prefixCls:M,direction:s,defaultMotions:T,expandIcon:B,ref:e,rootClassName:U(v,k,i.rootClassName,z,Q),_internalComponents:tD})))))}),Ac=Se((t,e)=>{const n=ne(null),r=he(rh);return Jt(e,()=>({menu:n.current,focus:i=>{var o;(o=n.current)===null||o===void 0||o.focus(i)}})),b(nD,Object.assign({ref:n},t,r))});Ac.Item=mP;Ac.SubMenu=pP;Ac.Divider=hP;Ac.ItemGroup=R0;const rD=t=>{const{componentCls:e,menuCls:n,colorError:r,colorTextLightSolid:i}=t,o=`${n}-item`;return{[`${e}, ${e}-menu-submenu`]:{[`${n} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},iD=t=>{const{componentCls:e,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:o,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:h,controlPaddingHorizontal:m,colorBgElevated:p}=t;return[{[e]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:t.calc(o).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:h}},[`${e}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:h},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${e}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomLeft, &${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomLeft, &${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottom, &${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottom, &${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomRight, - &${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomRight`]:{animationName:Vv},[`&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topLeft, + &${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomRight`]:{animationName:Jv},[`&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topLeft, &${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topLeft, &${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-top, &${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-top, &${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topRight, - &${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topRight`]:{animationName:Xv},[`&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomLeft, + &${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topRight`]:{animationName:t0},[`&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomLeft, &${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottom, - &${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomRight`]:{animationName:Hv},[`&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topLeft, + &${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomRight`]:{animationName:e0},[`&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topLeft, &${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-top, - &${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topRight`]:{animationName:Zv}}},f0(t,m,{arrowPlacement:{top:!0,bottom:!0}}),{[`${e} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${e}, ${e}-menu-submenu`]:Object.assign(Object.assign({},wn(t)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},Ci(t)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${q(c)} ${q(p)}`,color:t.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:t.padding,marginInlineStart:"auto",fontSize:t.fontSizeSM,color:t.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${q(c)} ${q(p)}`,color:t.colorText,fontWeight:"normal",fontSize:u,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:t.borderRadiusSM,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},Ci(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${q(t.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${e}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${e}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorIcon,fontSize:h,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${q(t.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:t.calc(p).add(t.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${e}-menu-submenu-title`]:{[`&, ${e}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})})},[Lo(t,"slide-up"),Lo(t,"slide-down"),Cd(t,"move-up"),Cd(t,"move-down"),Cc(t,"zoom-big")]]},Hj=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+50,paddingBlock:(t.controlHeight-t.fontSize*t.lineHeight)/2},Vf({contentRadius:t.borderRadiusLG,limitVerticalRadius:!0})),d0(t)),Xj=Zt("Dropdown",t=>{const{marginXXS:e,sizePopupArrow:n,paddingXXS:r,componentCls:i}=t,o=kt(t,{menuCls:`${i}-menu`,dropdownArrowDistance:t.calc(n).div(2).add(e).equal(),dropdownEdgeChildPadding:r});return[Vj(o),Fj(o)]},Hj,{resetStyle:!1}),qf=t=>{var e;const{menu:n,arrow:r,prefixCls:i,children:o,trigger:a,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:h,open:p,onOpenChange:m,visible:g,onVisibleChange:v,mouseEnterDelay:O=.15,mouseLeaveDelay:S=.1,autoAdjustOverflow:x=!0,placement:b="",overlay:C,transitionName:$,destroyOnHidden:w,destroyPopupOnHide:P}=t,{getPopupContainer:_,getPrefixCls:T,direction:R,dropdown:k}=fe(it),I=c||l;bc();const Q=ge(()=>{const he=T();return $!==void 0?$:b.includes("top")?`${he}-slide-down`:`${he}-slide-up`},[T,b,$]),M=ge(()=>b?b.includes("Center")?b.slice(0,b.indexOf("Center")):b:R==="rtl"?"bottomRight":"bottomLeft",[b,R]),E=T("dropdown",i),N=$r(E),[z,L,F]=Xj(E,N),[,H]=Cr(),V=Ao.only(LL(o)?y("span",null,o):o),X=fr(V,{className:Z(`${E}-trigger`,{[`${E}-rtl`]:R==="rtl"},V.props.className),disabled:(e=V.props.disabled)!==null&&e!==void 0?e:s}),B=s?[]:a,G=!!(B!=null&&B.includes("contextMenu")),[se,re]=_n(!1,{value:p??g}),le=pn(he=>{m==null||m(he,{source:"trigger"}),v==null||v(he),re(he)}),me=Z(d,f,L,F,N,k==null?void 0:k.className,{[`${E}-rtl`]:R==="rtl"}),ie=_2({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:x,offset:H.marginXXS,arrowWidth:r?H.sizePopupArrow:0,borderRadius:H.borderRadius}),ne=pn(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),re(!1))}),ue=()=>{let he;return n!=null&&n.items?he=y(kc,Object.assign({},n)):typeof C=="function"?he=C():he=C,I&&(he=I(he)),he=Ao.only(typeof he=="string"?y("span",null,he):he),y(Ej,{prefixCls:`${E}-menu`,rootClassName:Z(F,N),expandIcon:y("span",{className:`${E}-menu-submenu-arrow`},R==="rtl"?y(Hm,{className:`${E}-menu-submenu-arrow-icon`}):y(xd,{className:`${E}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ne,validator:({mode:ve})=>{}},he)},[de,j]=Sc("Dropdown",h==null?void 0:h.zIndex);let ee=y(A2,Object.assign({alignPoint:G},cn(t,["rootClassName"]),{mouseEnterDelay:O,mouseLeaveDelay:S,visible:se,builtinPlacements:ie,arrow:!!r,overlayClassName:me,prefixCls:E,getPopupContainer:u||_,transitionName:Q,trigger:B,overlay:ue,placement:M,onVisibleChange:le,overlayStyle:Object.assign(Object.assign(Object.assign({},k==null?void 0:k.style),h),{zIndex:de}),autoDestroy:w??P}),X);return de&&(ee=y(_f.Provider,{value:j},ee)),z(ee)},Zj=Jw(qf,"align",void 0,"dropdown",t=>t),qj=t=>y(Zj,Object.assign({},t),y("span",null));qf._InternalPanelDoNotUseOrYouWillBeFired=qj;const Gj=["parentNode"],Yj="form_item";function $l(t){return t===void 0||t===!1?[]:Array.isArray(t)?t:[t]}function eP(t,e){if(!t.length)return;const n=t.join("_");return e?`${e}_${n}`:Gj.includes(n)?`${Yj}_${n}`:n}function tP(t,e,n,r,i,o){let a=r;return o!==void 0?a=o:n.validating?a="validating":t.length?a="error":e.length?a="warning":(n.touched||i&&n.validated)&&(a="success"),a}var Uj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);it??Object.assign(Object.assign({},e),{__INTERNAL__:{itemRef:i=>o=>{const a=i1(i);o?n.current[a]=o:delete n.current[a]}},scrollToField:(i,o={})=>{const{focus:a}=o,s=Uj(o,["focus"]),l=o1(i,r);l&&(B5(l,Object.assign({scrollMode:"if-needed",block:"nearest"},s)),a&&r.focusField(i))},focusField:i=>{var o,a;const s=r.getFieldInstance(i);typeof(s==null?void 0:s.focus)=="function"?s.focus():(a=(o=o1(i,r))===null||o===void 0?void 0:o.focus)===null||a===void 0||a.call(o)},getFieldInstance:i=>{const o=i1(i);return n.current[o]}}),[t,e]);return[r]}function Gf(t){return kt(t,{inputAffixPadding:t.paddingXXS})}const Yf=t=>{const{controlHeight:e,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:h,colorPrimary:p,controlOutlineWidth:m,controlOutline:g,colorErrorOutline:v,colorWarningOutline:O,colorBgContainer:S,inputFontSize:x,inputFontSizeLG:b,inputFontSizeSM:C}=t,$=x||n,w=C||$,P=b||s,_=Math.round((e-$*r)/2*10)/10-i,T=Math.round((o-w*r)/2*10)/10-i,R=Math.ceil((a-P*l)/2*10)/10-i;return{paddingBlock:Math.max(_,0),paddingBlockSM:Math.max(T,0),paddingBlockLG:Math.max(R,0),paddingInline:c-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:p,hoverBorderColor:h,activeShadow:`0 0 0 ${m}px ${g}`,errorActiveShadow:`0 0 0 ${m}px ${v}`,warningActiveShadow:`0 0 0 ${m}px ${O}`,hoverBg:S,activeBg:S,inputFontSize:$,inputFontSizeLG:P,inputFontSizeSM:w}},Kj=t=>({borderColor:t.hoverBorderColor,backgroundColor:t.hoverBg}),C0=t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},Kj(kt(t,{hoverBorderColor:t.colorBorder,hoverBg:t.colorBgContainerDisabled})))}),rP=(t,e)=>({background:t.colorBgContainer,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:e.borderColor,"&:hover":{borderColor:e.hoverBorderColor,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:e.activeBorderColor,boxShadow:e.activeShadow,outline:0,backgroundColor:t.activeBg}}),a1=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},rP(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:e.borderColor}}),Jj=(t,e)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},rP(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},C0(t))}),a1(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),a1(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),s1=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{borderColor:e.addonBorderColor,color:e.addonColor}}}),eD=t=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.addonBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},s1(t,{status:"error",addonBorderColor:t.colorError,addonColor:t.colorErrorText})),s1(t,{status:"warning",addonBorderColor:t.colorWarning,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group-addon`]:Object.assign({},C0(t))}})}),tD=(t,e)=>{const{componentCls:n}=t;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:t.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:t.colorWarning}}},e)}},iP=(t,e)=>{var n;return{background:e.bg,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=e==null?void 0:e.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:e.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:e.activeBorderColor,backgroundColor:t.activeBg}}},l1=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},iP(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}})}),nD=(t,e)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},iP(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},C0(t))}),l1(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,inputColor:t.colorErrorText,affixColor:t.colorError})),l1(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,inputColor:t.colorWarningText,affixColor:t.colorWarning})),e)}),c1=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{background:e.addonBg,color:e.addonColor}}}),rD=t=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group-addon`]:{background:t.colorFillTertiary,"&:last-child":{position:"static"}}},c1(t,{status:"error",addonBg:t.colorErrorBg,addonColor:t.colorErrorText})),c1(t,{status:"warning",addonBg:t.colorWarningBg,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary,color:t.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`}}}})}),oP=(t,e)=>({background:t.colorBgContainer,borderWidth:`${q(t.lineWidth)} 0`,borderStyle:`${t.lineType} none`,borderColor:`transparent transparent ${e.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${e.borderColor} transparent`,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${e.activeBorderColor} transparent`,outline:0,backgroundColor:t.activeBg}}),u1=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},oP(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:`transparent transparent ${e.borderColor} transparent`}}),iD=(t,e)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},oP(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:{color:t.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${t.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),u1(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),u1(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),oD=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),aP=t=>{const{paddingBlockLG:e,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=t;return{padding:`${q(e)} ${q(i)}`,fontSize:t.inputFontSizeLG,lineHeight:n,borderRadius:r}},sP=t=>({padding:`${q(t.paddingBlockSM)} ${q(t.paddingInlineSM)}`,fontSize:t.inputFontSizeSM,borderRadius:t.borderRadiusSM}),lP=t=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${q(t.paddingBlock)} ${q(t.paddingInline)}`,color:t.colorText,fontSize:t.inputFontSize,lineHeight:t.lineHeight,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},oD(t.colorTextPlaceholder)),{"&-lg":Object.assign({},aP(t)),"&-sm":Object.assign({},sP(t)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),aD=t=>{const{componentCls:e,antCls:n}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:Object.assign({},aP(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:Object.assign({},sP(t)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightSM},[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${q(t.paddingInline)}`,color:t.colorText,fontWeight:"normal",fontSize:t.inputFontSize,textAlign:"center",borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${q(t.calc(t.paddingBlock).add(1).mul(-1).equal())} ${q(t.calc(t.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${q(t.lineWidth)} ${t.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${q(t.calc(t.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[e]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${e}-search-with-button &`]:{zIndex:0}}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${e}-search &`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius}},[`&:not(:first-child), ${e}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:Object.assign(Object.assign({display:"block"},No()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[` + &${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topRight`]:{animationName:n0}}},S0(t,p,{arrowPlacement:{top:!0,bottom:!0}}),{[`${e} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${e}, ${e}-menu-submenu`]:Object.assign(Object.assign({},Sn(t)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:p,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},hi(t)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${V(c)} ${V(m)}`,color:t.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:t.padding,marginInlineStart:"auto",fontSize:t.fontSizeSM,color:t.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${V(c)} ${V(m)}`,color:t.colorText,fontWeight:"normal",fontSize:u,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:t.borderRadiusSM,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},hi(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:p,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${V(t.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${e}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${e}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorIcon,fontSize:h,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${V(t.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:t.calc(m).add(t.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${e}-menu-submenu-title`]:{[`&, ${e}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:p,cursor:"not-allowed"}},[`${n}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})})},[Lo(t,"slide-up"),Lo(t,"slide-down"),Id(t,"move-up"),Id(t,"move-down"),Tc(t,"zoom-big")]]},oD=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+50,paddingBlock:(t.controlHeight-t.fontSize*t.lineHeight)/2},eh({contentRadius:t.borderRadiusLG,limitVerticalRadius:!0})),y0(t)),aD=Ft("Dropdown",t=>{const{marginXXS:e,sizePopupArrow:n,paddingXXS:r,componentCls:i}=t,o=It(t,{menuCls:`${i}-menu`,dropdownArrowDistance:t.calc(n).div(2).add(e).equal(),dropdownEdgeChildPadding:r});return[iD(o),rD(o)]},oD,{resetStyle:!1}),ih=t=>{var e;const{menu:n,arrow:r,prefixCls:i,children:o,trigger:a,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:h,open:m,onOpenChange:p,visible:g,onVisibleChange:O,mouseEnterDelay:v=.15,mouseLeaveDelay:y=.1,autoAdjustOverflow:S=!0,placement:x="",overlay:$,transitionName:C,destroyOnHidden:P,destroyPopupOnHide:w}=t,{getPopupContainer:_,getPrefixCls:R,direction:I,dropdown:T}=he(lt),M=c||l;Cc();const Q=ve(()=>{const me=R();return C!==void 0?C:x.includes("top")?`${me}-slide-down`:`${me}-slide-up`},[R,x,C]),E=ve(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:I==="rtl"?"bottomRight":"bottomLeft",[x,I]),k=R("dropdown",i),z=Tr(k),[L,B,F]=aD(k,z),[,H]=Or(),X=wi.only(Kj(o)?b("span",null,o):o),q=lr(X,{className:U(`${k}-trigger`,{[`${k}-rtl`]:I==="rtl"},X.props.className),disabled:(e=X.props.disabled)!==null&&e!==void 0?e:s}),N=s?[]:a,j=!!(N!=null&&N.includes("contextMenu")),[oe,ee]=Pn(!1,{value:m??g}),se=bn(me=>{p==null||p(me,{source:"trigger"}),O==null||O(me),ee(me)}),fe=U(d,f,B,F,z,T==null?void 0:T.className,{[`${k}-rtl`]:I==="rtl"}),re=H2({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:S,offset:H.marginXXS,arrowWidth:r?H.sizePopupArrow:0,borderRadius:H.borderRadius}),J=bn(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(p==null||p(!1,{source:"menu"}),ee(!1))}),ue=()=>{let me;return n!=null&&n.items?me=b(Ac,Object.assign({},n)):typeof $=="function"?me=$():me=$,M&&(me=M(me)),me=wi.only(typeof me=="string"?b("span",null,me):me),b(ZL,{prefixCls:`${k}-menu`,rootClassName:U(F,z),expandIcon:b("span",{className:`${k}-menu-submenu-arrow`},I==="rtl"?b(Yl,{className:`${k}-menu-submenu-arrow-icon`}):b($s,{className:`${k}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:J,validator:({mode:G})=>{}},me)},[de,D]=Pc("Dropdown",h==null?void 0:h.zIndex);let Y=b(U2,Object.assign({alignPoint:j},pn(t,["rootClassName"]),{mouseEnterDelay:v,mouseLeaveDelay:y,visible:oe,builtinPlacements:re,arrow:!!r,overlayClassName:fe,prefixCls:k,getPopupContainer:u||_,transitionName:Q,trigger:N,overlay:ue,placement:E,onVisibleChange:se,overlayStyle:Object.assign(Object.assign(Object.assign({},T==null?void 0:T.style),h),{zIndex:de}),autoDestroy:P??w}),q);return de&&(Y=b(Nf.Provider,{value:D},Y)),L(Y)},sD=p2(ih,"align",void 0,"dropdown",t=>t),lD=t=>b(sD,Object.assign({},t),b("span",null));ih._InternalPanelDoNotUseOrYouWillBeFired=lD;const cD=["parentNode"],uD="form_item";function Tl(t){return t===void 0||t===!1?[]:Array.isArray(t)?t:[t]}function gP(t,e){if(!t.length)return;const n=t.join("_");return e?`${e}_${n}`:cD.includes(n)?`${uD}_${n}`:n}function vP(t,e,n,r,i,o){let a=r;return o!==void 0?a=o:n.validating?a="validating":t.length?a="error":e.length?a="warning":(n.touched||i&&n.validated)&&(a="success"),a}var dD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);it??Object.assign(Object.assign({},e),{__INTERNAL__:{itemRef:i=>o=>{const a=pS(i);o?n.current[a]=o:delete n.current[a]}},scrollToField:(i,o={})=>{const{focus:a}=o,s=dD(o,["focus"]),l=gS(i,r);l&&(nA(l,Object.assign({scrollMode:"if-needed",block:"nearest"},s)),a&&r.focusField(i))},focusField:i=>{var o,a;const s=r.getFieldInstance(i);typeof(s==null?void 0:s.focus)=="function"?s.focus():(a=(o=gS(i,r))===null||o===void 0?void 0:o.focus)===null||a===void 0||a.call(o)},getFieldInstance:i=>{const o=pS(i);return n.current[o]}}),[t,e]);return[r]}function Qc(t){return It(t,{inputAffixPadding:t.paddingXXS})}const Nc=t=>{const{controlHeight:e,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:h,colorPrimary:m,controlOutlineWidth:p,controlOutline:g,colorErrorOutline:O,colorWarningOutline:v,colorBgContainer:y,inputFontSize:S,inputFontSizeLG:x,inputFontSizeSM:$}=t,C=S||n,P=$||C,w=x||s,_=Math.round((e-C*r)/2*10)/10-i,R=Math.round((o-P*r)/2*10)/10-i,I=Math.ceil((a-w*l)/2*10)/10-i;return{paddingBlock:Math.max(_,0),paddingBlockSM:Math.max(R,0),paddingBlockLG:Math.max(I,0),paddingInline:c-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:h,activeShadow:`0 0 0 ${p}px ${g}`,errorActiveShadow:`0 0 0 ${p}px ${O}`,warningActiveShadow:`0 0 0 ${p}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:C,inputFontSizeLG:w,inputFontSizeSM:P}},fD=t=>({borderColor:t.hoverBorderColor,backgroundColor:t.hoverBg}),oh=t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},fD(It(t,{hoverBorderColor:t.colorBorder,hoverBg:t.colorBgContainerDisabled})))}),M0=(t,e)=>({background:t.colorBgContainer,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:e.borderColor,"&:hover":{borderColor:e.hoverBorderColor,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:e.activeBorderColor,boxShadow:e.activeShadow,outline:0,backgroundColor:t.activeBg}}),vS=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},M0(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:e.borderColor}}),hD=(t,e)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},M0(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},oh(t))}),vS(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),vS(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),OS=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{borderColor:e.addonBorderColor,color:e.addonColor}}}),mD=t=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.addonBg,border:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},OS(t,{status:"error",addonBorderColor:t.colorError,addonColor:t.colorErrorText})),OS(t,{status:"warning",addonBorderColor:t.colorWarning,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group-addon`]:Object.assign({},oh(t))}})}),pD=(t,e)=>{const{componentCls:n}=t;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:t.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:t.colorWarning}}},e)}},bP=(t,e)=>{var n;return{background:e.bg,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=e==null?void 0:e.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:e.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:e.activeBorderColor,backgroundColor:t.activeBg}}},bS=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},bP(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}})}),gD=(t,e)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},bP(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},oh(t))}),bS(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,inputColor:t.colorErrorText,affixColor:t.colorError})),bS(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,inputColor:t.colorWarningText,affixColor:t.colorWarning})),e)}),yS=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{background:e.addonBg,color:e.addonColor}}}),vD=t=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group-addon`]:{background:t.colorFillTertiary,"&:last-child":{position:"static"}}},yS(t,{status:"error",addonBg:t.colorErrorBg,addonColor:t.colorErrorText})),yS(t,{status:"warning",addonBg:t.colorWarningBg,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary,color:t.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`}}}})}),yP=(t,e)=>({background:t.colorBgContainer,borderWidth:`${V(t.lineWidth)} 0`,borderStyle:`${t.lineType} none`,borderColor:`transparent transparent ${e.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${e.borderColor} transparent`,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${e.activeBorderColor} transparent`,outline:0,backgroundColor:t.activeBg}}),SS=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},yP(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:`transparent transparent ${e.borderColor} transparent`}}),OD=(t,e)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},yP(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:{color:t.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${t.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),SS(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),SS(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),bD=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),SP=t=>{const{paddingBlockLG:e,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=t;return{padding:`${V(e)} ${V(i)}`,fontSize:t.inputFontSizeLG,lineHeight:n,borderRadius:r}},E0=t=>({padding:`${V(t.paddingBlockSM)} ${V(t.paddingInlineSM)}`,fontSize:t.inputFontSizeSM,borderRadius:t.borderRadiusSM}),k0=t=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${V(t.paddingBlock)} ${V(t.paddingInline)}`,color:t.colorText,fontSize:t.inputFontSize,lineHeight:t.lineHeight,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},bD(t.colorTextPlaceholder)),{"&-lg":Object.assign({},SP(t)),"&-sm":Object.assign({},E0(t)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),yD=t=>{const{componentCls:e,antCls:n}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:Object.assign({},SP(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:Object.assign({},E0(t)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightSM},[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${V(t.paddingInline)}`,color:t.colorText,fontWeight:"normal",fontSize:t.inputFontSize,textAlign:"center",borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${V(t.calc(t.paddingBlock).add(1).mul(-1).equal())} ${V(t.calc(t.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${V(t.lineWidth)} ${t.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${V(t.calc(t.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[e]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${e}-search-with-button &`]:{zIndex:0}}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${e}-search &`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius}},[`&:not(:first-child), ${e}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:Object.assign(Object.assign({display:"block"},zo()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[` & > ${e}-affix-wrapper, & > ${e}-number-affix-wrapper, & > ${n}-picker-range @@ -241,27 +241,27 @@ html body { & > ${n}-cascader-picker:first-child ${e}`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius},[`& > *:last-child, & > ${n}-select:last-child > ${n}-select-selector, & > ${n}-cascader-picker:last-child ${e}, - & > ${n}-cascader-picker-focused:last-child ${e}`]:{borderInlineEndWidth:t.lineWidth,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius},[`& > ${n}-select-auto-complete ${e}`]:{verticalAlign:"top"},[`${e}-group-wrapper + ${e}-group-wrapper`]:{marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),[`${e}-affix-wrapper`]:{borderRadius:0}},[`${e}-group-wrapper:not(:last-child)`]:{[`&${e}-search > ${e}-group`]:{[`& > ${e}-group-addon > ${e}-search-button`]:{borderRadius:0},[`& > ${e}`]:{borderStartStartRadius:t.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:t.borderRadius}}}})}},sD=t=>{const{componentCls:e,controlHeightSM:n,lineWidth:r,calc:i}=t,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),lP(t)),Jj(t)),nD(t)),tD(t)),iD(t)),{'&[type="color"]':{height:t.controlHeight,[`&${e}-lg`]:{height:t.controlHeightLG},[`&${e}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},lD=t=>{const{componentCls:e}=t;return{[`${e}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:t.colorIcon},"&:active":{color:t.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${q(t.inputAffixPadding)}`}}}},cD=t=>{const{componentCls:e,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:s}=t,l=`${e}-affix-wrapper`,c=`${e}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},lP(t)),{display:"inline-flex",[`&:not(${e}-disabled):hover`]:{zIndex:1,[`${e}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${e}`]:{padding:0},[`> input${e}, > textarea${e}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[e]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:t.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:t.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),lD(t)),{[`${s}${e}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:a}}}),[`${e}-underlined`]:{borderRadius:0},[c]:{[`${s}${e}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},uD=t=>{const{componentCls:e,borderRadiusLG:n,borderRadiusSM:r}=t;return{[`${e}-group`]:Object.assign(Object.assign(Object.assign({},wn(t)),aD(t)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${e}-group-addon`]:{borderRadius:n,fontSize:t.inputFontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:r}}},eD(t)),rD(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},dD=t=>{const{componentCls:e,antCls:n}=t,r=`${e}-search`;return{[r]:{[e]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${e}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:t.colorPrimaryHover}}},[`${e}-affix-wrapper`]:{height:t.controlHeight,borderRadius:0},[`${e}-lg`]:{lineHeight:t.calc(t.lineHeightLG).sub(2e-4).equal()},[`> ${e}-group`]:{[`> ${e}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-color-primary)`]:{color:t.colorTextDescription,"&:not([disabled]):hover":{color:t.colorPrimaryHover},"&:active":{color:t.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:t.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${e}-affix-wrapper, ${r}-button`]:{height:t.controlHeightLG}},"&-small":{[`${e}-affix-wrapper, ${r}-button`]:{height:t.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${e}-compact-item`]:{[`&:not(${e}-compact-last-item)`]:{[`${e}-group-addon`]:{[`${e}-search-button`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${e}-compact-first-item)`]:{[`${e},${e}-affix-wrapper`]:{borderRadius:0}},[`> ${e}-group-addon ${e}-search-button, + & > ${n}-cascader-picker-focused:last-child ${e}`]:{borderInlineEndWidth:t.lineWidth,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius},[`& > ${n}-select-auto-complete ${e}`]:{verticalAlign:"top"},[`${e}-group-wrapper + ${e}-group-wrapper`]:{marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),[`${e}-affix-wrapper`]:{borderRadius:0}},[`${e}-group-wrapper:not(:last-child)`]:{[`&${e}-search > ${e}-group`]:{[`& > ${e}-group-addon > ${e}-search-button`]:{borderRadius:0},[`& > ${e}`]:{borderStartStartRadius:t.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:t.borderRadius}}}})}},SD=t=>{const{componentCls:e,controlHeightSM:n,lineWidth:r,calc:i}=t,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Sn(t)),k0(t)),hD(t)),gD(t)),pD(t)),OD(t)),{'&[type="color"]':{height:t.controlHeight,[`&${e}-lg`]:{height:t.controlHeightLG},[`&${e}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},xD=t=>{const{componentCls:e}=t;return{[`${e}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:t.colorIcon},"&:active":{color:t.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${V(t.inputAffixPadding)}`}}}},$D=t=>{const{componentCls:e,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:s}=t,l=`${e}-affix-wrapper`,c=`${e}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},k0(t)),{display:"inline-flex",[`&:not(${e}-disabled):hover`]:{zIndex:1,[`${e}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${e}`]:{padding:0},[`> input${e}, > textarea${e}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[e]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:t.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:t.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),xD(t)),{[`${s}${e}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:a}}}),[`${e}-underlined`]:{borderRadius:0},[c]:{[`${s}${e}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},CD=t=>{const{componentCls:e,borderRadiusLG:n,borderRadiusSM:r}=t;return{[`${e}-group`]:Object.assign(Object.assign(Object.assign({},Sn(t)),yD(t)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${e}-group-addon`]:{borderRadius:n,fontSize:t.inputFontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:r}}},mD(t)),vD(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},wD=t=>{const{componentCls:e,antCls:n}=t,r=`${e}-search`;return{[r]:{[e]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${e}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:t.colorPrimaryHover}}},[`${e}-affix-wrapper`]:{height:t.controlHeight,borderRadius:0},[`${e}-lg`]:{lineHeight:t.calc(t.lineHeightLG).sub(2e-4).equal()},[`> ${e}-group`]:{[`> ${e}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-color-primary)`]:{color:t.colorTextDescription,"&:not([disabled]):hover":{color:t.colorPrimaryHover},"&:active":{color:t.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:t.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${e}-affix-wrapper, ${r}-button`]:{height:t.controlHeightLG}},"&-small":{[`${e}-affix-wrapper, ${r}-button`]:{height:t.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${e}-compact-item`]:{[`&:not(${e}-compact-last-item)`]:{[`${e}-group-addon`]:{[`${e}-search-button`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${e}-compact-first-item)`]:{[`${e},${e}-affix-wrapper`]:{borderRadius:0}},[`> ${e}-group-addon ${e}-search-button, > ${e}, - ${e}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}},fD=t=>{const{componentCls:e}=t;return{[`${e}-out-of-range`]:{[`&, & input, & textarea, ${e}-show-count-suffix, ${e}-data-count`]:{color:t.colorError}}}},cP=Zt(["Input","Shared"],t=>{const e=kt(t,Gf(t));return[sD(e),cD(e)]},Yf,{resetFont:!1}),uP=Zt(["Input","Component"],t=>{const e=kt(t,Gf(t));return[uD(e),dD(e),fD(e),Yv(e)]},Yf,{resetFont:!1});var hD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},pD=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:hD}))},ea=Se(pD);const Uf=bt(null);var mD=function(e){var n=e.activeTabOffset,r=e.horizontal,i=e.rtl,o=e.indicator,a=o===void 0?{}:o,s=a.size,l=a.align,c=l===void 0?"center":l,u=J(),d=ae(u,2),f=d[0],h=d[1],p=U(),m=oe.useCallback(function(v){return typeof s=="function"?s(v):typeof s=="number"?s:v},[s]);function g(){Xt.cancel(p.current)}return be(function(){var v={};if(n)if(r){v.width=m(n.width);var O=i?"right":"left";c==="start"&&(v[O]=n[O]),c==="center"&&(v[O]=n[O]+n.width/2,v.transform=i?"translateX(50%)":"translateX(-50%)"),c==="end"&&(v[O]=n[O]+n.width,v.transform="translateX(-100%)")}else v.height=m(n.height),c==="start"&&(v.top=n.top),c==="center"&&(v.top=n.top+n.height/2,v.transform="translateY(-50%)"),c==="end"&&(v.top=n.top+n.height,v.transform="translateY(-100%)");return g(),p.current=Xt(function(){var S=f&&v&&Object.keys(v).every(function(x){var b=v[x],C=f[x];return typeof b=="number"&&typeof C=="number"?Math.round(b)===Math.round(C):b===C});S||h(v)}),g},[JSON.stringify(n),r,i,c,m]),{style:f}},d1={width:0,height:0,left:0,top:0};function gD(t,e,n){return ge(function(){for(var r,i=new Map,o=e.get((r=t[0])===null||r===void 0?void 0:r.key)||d1,a=o.left+o.width,s=0;sI?(R=_,C.current="x"):(R=T,C.current="y"),e(-R,-R)&&P.preventDefault()}var w=U(null);w.current={onTouchStart:S,onTouchMove:x,onTouchEnd:b,onWheel:$},be(function(){function P(k){w.current.onTouchStart(k)}function _(k){w.current.onTouchMove(k)}function T(k){w.current.onTouchEnd(k)}function R(k){w.current.onWheel(k)}return document.addEventListener("touchmove",_,{passive:!1}),document.addEventListener("touchend",T,{passive:!0}),t.current.addEventListener("touchstart",P,{passive:!0}),t.current.addEventListener("wheel",R,{passive:!1}),function(){document.removeEventListener("touchmove",_),document.removeEventListener("touchend",T)}},[])}function dP(t){var e=J(0),n=ae(e,2),r=n[0],i=n[1],o=U(0),a=U();return a.current=t,tm(function(){var s;(s=a.current)===null||s===void 0||s.call(a)},[r]),function(){o.current===r&&(o.current+=1,i(o.current))}}function bD(t){var e=U([]),n=J({}),r=ae(n,2),i=r[1],o=U(typeof t=="function"?t():t),a=dP(function(){var l=o.current;e.current.forEach(function(c){l=c(l)}),e.current=[],o.current=l,i({})});function s(l){e.current.push(l),a()}return[o.current,s]}var m1={width:0,height:0,left:0,top:0,right:0};function yD(t,e,n,r,i,o,a){var s=a.tabs,l=a.tabPosition,c=a.rtl,u,d,f;return["top","bottom"].includes(l)?(u="width",d=c?"right":"left",f=Math.abs(n)):(u="height",d="top",f=-n),ge(function(){if(!s.length)return[0,0];for(var h=s.length,p=h,m=0;mMath.floor(f+e)){p=m-1;break}}for(var v=0,O=h-1;O>=0;O-=1){var S=t.get(s[O].key)||m1;if(S[d]p?[0,-1]:[v,p]},[t,e,r,i,o,f,l,s.map(function(h){return h.key}).join("_"),c])}function g1(t){var e;return t instanceof Map?(e={},t.forEach(function(n,r){e[r]=n})):e=t,JSON.stringify(e)}var SD="TABS_DQ";function fP(t){return String(t).replace(/"/g,SD)}function $0(t,e,n,r){return!(!n||r||t===!1||t===void 0&&(e===!1||e===null))}var hP=Se(function(t,e){var n=t.prefixCls,r=t.editable,i=t.locale,o=t.style;return!r||r.showAdd===!1?null:y("button",{ref:e,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(s){r.onEdit("add",{event:s})}},r.addIcon||"+")}),v1=Se(function(t,e){var n=t.position,r=t.prefixCls,i=t.extra;if(!i)return null;var o,a={};return Je(i)==="object"&&!Kt(i)?a=i:a.right=i,n==="right"&&(o=a.right),n==="left"&&(o=a.left),o?y("div",{className:"".concat(r,"-extra-content"),ref:e},o):null}),xD=Se(function(t,e){var n=t.prefixCls,r=t.id,i=t.tabs,o=t.locale,a=t.mobile,s=t.more,l=s===void 0?{}:s,c=t.style,u=t.className,d=t.editable,f=t.tabBarGutter,h=t.rtl,p=t.removeAriaLabel,m=t.onTabClick,g=t.getPopupContainer,v=t.popupClassName,O=J(!1),S=ae(O,2),x=S[0],b=S[1],C=J(null),$=ae(C,2),w=$[0],P=$[1],_=l.icon,T=_===void 0?"More":_,R="".concat(r,"-more-popup"),k="".concat(n,"-dropdown"),I=w!==null?"".concat(R,"-").concat(w):null,Q=o==null?void 0:o.dropdownAriaLabel;function M(V,X){V.preventDefault(),V.stopPropagation(),d.onEdit("remove",{key:X,event:V})}var E=y(Fs,{onClick:function(X){var B=X.key,G=X.domEvent;m(B,G),b(!1)},prefixCls:"".concat(k,"-menu"),id:R,tabIndex:-1,role:"listbox","aria-activedescendant":I,selectedKeys:[w],"aria-label":Q!==void 0?Q:"expanded dropdown"},i.map(function(V){var X=V.closable,B=V.disabled,G=V.closeIcon,se=V.key,re=V.label,le=$0(X,G,d,B);return y(Tc,{key:se,id:"".concat(R,"-").concat(se),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(se),disabled:B},y("span",null,re),le&&y("button",{type:"button","aria-label":p||"remove",tabIndex:0,className:"".concat(k,"-menu-item-remove"),onClick:function(ie){ie.stopPropagation(),M(ie,se)}},G||d.removeIcon||"×"))}));function N(V){for(var X=i.filter(function(le){return!le.disabled}),B=X.findIndex(function(le){return le.key===w})||0,G=X.length,se=0;seGe?"left":"right"})}),k=ae(R,2),I=k[0],Q=k[1],M=f1(0,function(Ue,Ge){!T&&m&&m({direction:Ue>Ge?"top":"bottom"})}),E=ae(M,2),N=E[0],z=E[1],L=J([0,0]),F=ae(L,2),H=F[0],V=F[1],X=J([0,0]),B=ae(X,2),G=B[0],se=B[1],re=J([0,0]),le=ae(re,2),me=le[0],ie=le[1],ne=J([0,0]),ue=ae(ne,2),de=ue[0],j=ue[1],ee=bD(new Map),he=ae(ee,2),ve=he[0],Y=he[1],ce=gD(S,ve,G[0]),te=ou(H,T),Oe=ou(G,T),ye=ou(me,T),pe=ou(de,T),Qe=Math.floor(te)Ie?Ie:Ue}var Ye=U(null),lt=J(),Be=ae(lt,2),ke=Be[0],Xe=Be[1];function _e(){Xe(Date.now())}function Pe(){Ye.current&&clearTimeout(Ye.current)}OD($,function(Ue,Ge){function ft(It,zt){It(function(Vt){var dn=rt(Vt+zt);return dn})}return Qe?(T?ft(Q,Ue):ft(z,Ge),Pe(),_e(),!0):!1}),be(function(){return Pe(),ke&&(Ye.current=setTimeout(function(){Xe(0)},100)),Pe},[ke]);var ct=yD(ce,Me,T?I:N,Oe,ye,pe,W(W({},t),{},{tabs:S})),xt=ae(ct,2),Pn=xt[0],qt=xt[1],xn=pn(function(){var Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a,Ge=ce.get(Ue)||{width:0,height:0,left:0,right:0,top:0};if(T){var ft=I;s?Ge.rightI+Me&&(ft=Ge.right+Ge.width-Me):Ge.left<-I?ft=-Ge.left:Ge.left+Ge.width>-I+Me&&(ft=-(Ge.left+Ge.width-Me)),z(0),Q(rt(ft))}else{var It=N;Ge.top<-N?It=-Ge.top:Ge.top+Ge.height>-N+Me&&(It=-(Ge.top+Ge.height-Me)),Q(0),z(rt(It))}}),gn=J(),Bt=ae(gn,2),Ot=Bt[0],ht=Bt[1],et=J(!1),nt=ae(et,2),Re=nt[0],ot=nt[1],dt=S.filter(function(Ue){return!Ue.disabled}).map(function(Ue){return Ue.key}),Ee=function(Ge){var ft=dt.indexOf(Ot||a),It=dt.length,zt=(ft+Ge+It)%It,Vt=dt[zt];ht(Vt)},Ze=function(Ge,ft){var It=dt.indexOf(Ge),zt=S.find(function(dn){return dn.key===Ge}),Vt=$0(zt==null?void 0:zt.closable,zt==null?void 0:zt.closeIcon,c,zt==null?void 0:zt.disabled);Vt&&(ft.preventDefault(),ft.stopPropagation(),c.onEdit("remove",{key:Ge,event:ft}),It===dt.length-1?Ee(-1):Ee(1))},Ae=function(Ge,ft){ot(!0),ft.button===1&&Ze(Ge,ft)},We=function(Ge){var ft=Ge.code,It=s&&T,zt=dt[0],Vt=dt[dt.length-1];switch(ft){case"ArrowLeft":{T&&Ee(It?1:-1);break}case"ArrowRight":{T&&Ee(It?-1:1);break}case"ArrowUp":{Ge.preventDefault(),T||Ee(-1);break}case"ArrowDown":{Ge.preventDefault(),T||Ee(1);break}case"Home":{Ge.preventDefault(),ht(zt);break}case"End":{Ge.preventDefault(),ht(Vt);break}case"Enter":case"Space":{Ge.preventDefault(),p(Ot??a,Ge);break}case"Backspace":case"Delete":{Ze(Ot,Ge);break}}},st={};T?st[s?"marginRight":"marginLeft"]=f:st.marginTop=f;var tt=S.map(function(Ue,Ge){var ft=Ue.key;return y($D,{id:i,prefixCls:O,key:ft,tab:Ue,style:Ge===0?void 0:st,closable:Ue.closable,editable:c,active:ft===a,focus:ft===Ot,renderWrapper:h,removeAriaLabel:u==null?void 0:u.removeAriaLabel,tabCount:dt.length,currentPosition:Ge+1,onClick:function(zt){p(ft,zt)},onKeyDown:We,onFocus:function(){Re||ht(ft),xn(ft),_e(),$.current&&(s||($.current.scrollLeft=0),$.current.scrollTop=0)},onBlur:function(){ht(void 0)},onMouseDown:function(zt){return Ae(ft,zt)},onMouseUp:function(){ot(!1)}})}),Ct=function(){return Y(function(){var Ge,ft=new Map,It=(Ge=w.current)===null||Ge===void 0?void 0:Ge.getBoundingClientRect();return S.forEach(function(zt){var Vt,dn=zt.key,Br=(Vt=w.current)===null||Vt===void 0?void 0:Vt.querySelector('[data-node-key="'.concat(fP(dn),'"]'));if(Br){var wr=wD(Br,It),Pr=ae(wr,4),_r=Pr[0],qn=Pr[1],Tr=Pr[2],kr=Pr[3];ft.set(dn,{width:_r,height:qn,left:Tr,top:kr})}}),ft})};be(function(){Ct()},[S.map(function(Ue){return Ue.key}).join("_")]);var $t=dP(function(){var Ue=Wa(x),Ge=Wa(b),ft=Wa(C);V([Ue[0]-Ge[0]-ft[0],Ue[1]-Ge[1]-ft[1]]);var It=Wa(_);ie(It);var zt=Wa(P);j(zt);var Vt=Wa(w);se([Vt[0]-It[0],Vt[1]-It[1]]),Ct()}),wt=S.slice(0,Pn),Mt=S.slice(qt+1),vn=[].concat($e(wt),$e(Mt)),un=ce.get(a),Cn=mD({activeTabOffset:un,horizontal:T,indicator:g,rtl:s}),Ln=Cn.style;be(function(){xn()},[a,we,Ie,g1(un),g1(ce),T]),be(function(){$t()},[s]);var Ut=!!vn.length,nn="".concat(O,"-nav-wrap"),Te,Le,pt,yt;return T?s?(Le=I>0,Te=I!==Ie):(Te=I<0,Le=I!==we):(pt=N<0,yt=N!==we),y(Kr,{onResize:$t},y("div",{ref:go(e,x),role:"tablist","aria-orientation":T?"horizontal":"vertical",className:Z("".concat(O,"-nav"),n),style:r,onKeyDown:function(){_e()}},y(v1,{ref:b,position:"left",extra:l,prefixCls:O}),y(Kr,{onResize:$t},y("div",{className:Z(nn,D(D(D(D({},"".concat(nn,"-ping-left"),Te),"".concat(nn,"-ping-right"),Le),"".concat(nn,"-ping-top"),pt),"".concat(nn,"-ping-bottom"),yt)),ref:$},y(Kr,{onResize:$t},y("div",{ref:w,className:"".concat(O,"-nav-list"),style:{transform:"translate(".concat(I,"px, ").concat(N,"px)"),transition:ke?"none":void 0}},tt,y(hP,{ref:_,prefixCls:O,locale:u,editable:c,style:W(W({},tt.length===0?void 0:st),{},{visibility:Ut?"hidden":null})}),y("div",{className:Z("".concat(O,"-ink-bar"),D({},"".concat(O,"-ink-bar-animated"),o.inkBar)),style:Ln}))))),y(CD,Ce({},t,{removeAriaLabel:u==null?void 0:u.removeAriaLabel,ref:P,prefixCls:O,tabs:vn,className:!Ut&&De,tabMoving:!!ke})),y(v1,{ref:C,position:"right",extra:l,prefixCls:O})))}),pP=Se(function(t,e){var n=t.prefixCls,r=t.className,i=t.style,o=t.id,a=t.active,s=t.tabKey,l=t.children;return y("div",{id:o&&"".concat(o,"-panel-").concat(s),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(s),"aria-hidden":!a,style:i,className:Z(n,a&&"".concat(n,"-active"),r),ref:e},l)}),PD=["renderTabBar"],_D=["label","key"],TD=function(e){var n=e.renderTabBar,r=ut(e,PD),i=fe(Uf),o=i.tabs;if(n){var a=W(W({},r),{},{panes:o.map(function(s){var l=s.label,c=s.key,u=ut(s,_D);return y(pP,Ce({tab:l,key:c,tabKey:c},u))})});return n(a,O1)}return y(O1,r)},kD=["key","forceRender","style","className","destroyInactiveTabPane"],RD=function(e){var n=e.id,r=e.activeKey,i=e.animated,o=e.tabPosition,a=e.destroyInactiveTabPane,s=fe(Uf),l=s.prefixCls,c=s.tabs,u=i.tabPane,d="".concat(l,"-tabpane");return y("div",{className:Z("".concat(l,"-content-holder"))},y("div",{className:Z("".concat(l,"-content"),"".concat(l,"-content-").concat(o),D({},"".concat(l,"-content-animated"),u))},c.map(function(f){var h=f.key,p=f.forceRender,m=f.style,g=f.className,v=f.destroyInactiveTabPane,O=ut(f,kD),S=h===r;return y(pi,Ce({key:h,visible:S,forceRender:p,removeOnLeave:!!(a||v),leavedClassName:"".concat(d,"-hidden")},i.tabPaneMotion),function(x,b){var C=x.style,$=x.className;return y(pP,Ce({},O,{prefixCls:d,id:n,tabKey:h,animated:u,active:S,style:W(W({},m),C),className:Z(g,$),ref:b}))})})))};function ID(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},e;return t===!1?e={inkBar:!1,tabPane:!1}:t===!0?e={inkBar:!0,tabPane:!1}:e=W({inkBar:!0},Je(t)==="object"?t:{}),e.tabPaneMotion&&e.tabPane===void 0&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}var MD=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],b1=0,ED=Se(function(t,e){var n=t.id,r=t.prefixCls,i=r===void 0?"rc-tabs":r,o=t.className,a=t.items,s=t.direction,l=t.activeKey,c=t.defaultActiveKey,u=t.editable,d=t.animated,f=t.tabPosition,h=f===void 0?"top":f,p=t.tabBarGutter,m=t.tabBarStyle,g=t.tabBarExtraContent,v=t.locale,O=t.more,S=t.destroyInactiveTabPane,x=t.renderTabBar,b=t.onChange,C=t.onTabClick,$=t.onTabScroll,w=t.getPopupContainer,P=t.popupClassName,_=t.indicator,T=ut(t,MD),R=ge(function(){return(a||[]).filter(function(de){return de&&Je(de)==="object"&&"key"in de})},[a]),k=s==="rtl",I=ID(d),Q=J(!1),M=ae(Q,2),E=M[0],N=M[1];be(function(){N(o0())},[]);var z=_n(function(){var de;return(de=R[0])===null||de===void 0?void 0:de.key},{value:l,defaultValue:c}),L=ae(z,2),F=L[0],H=L[1],V=J(function(){return R.findIndex(function(de){return de.key===F})}),X=ae(V,2),B=X[0],G=X[1];be(function(){var de=R.findIndex(function(ee){return ee.key===F});if(de===-1){var j;de=Math.max(0,Math.min(B,R.length-1)),H((j=R[de])===null||j===void 0?void 0:j.key)}G(de)},[R.map(function(de){return de.key}).join("_"),F,B]);var se=_n(null,{value:n}),re=ae(se,2),le=re[0],me=re[1];be(function(){n||(me("rc-tabs-".concat(b1)),b1+=1)},[]);function ie(de,j){C==null||C(de,j);var ee=de!==F;H(de),ee&&(b==null||b(de))}var ne={id:le,activeKey:F,animated:I,tabPosition:h,rtl:k,mobile:E},ue=W(W({},ne),{},{editable:u,locale:v,more:O,tabBarGutter:p,onTabClick:ie,onTabScroll:$,extra:g,style:m,panes:null,getPopupContainer:w,popupClassName:P,indicator:_});return y(Uf.Provider,{value:{tabs:R,prefixCls:i}},y("div",Ce({ref:e,id:n,className:Z(i,"".concat(i,"-").concat(h),D(D(D({},"".concat(i,"-mobile"),E),"".concat(i,"-editable"),u),"".concat(i,"-rtl"),k),o)},T),y(TD,Ce({},ue,{renderTabBar:x})),y(RD,Ce({destroyInactiveTabPane:S},ne,{animated:I}))))});const AD={motionAppear:!1,motionEnter:!0,motionLeave:!0};function QD(t,e={inkBar:!0,tabPane:!1}){let n;return e===!1?n={inkBar:!1,tabPane:!1}:e===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof e=="object"?e:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},AD),{motionName:zo(t,"switch")})),n}var ND=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);ie)}function LD(t,e){if(t)return t.map(r=>{var i;const o=(i=r.destroyOnHidden)!==null&&i!==void 0?i:r.destroyInactiveTabPane;return Object.assign(Object.assign({},r),{destroyInactiveTabPane:o})});const n=nr(e).map(r=>{if(Kt(r)){const{key:i,props:o}=r,a=o||{},{tab:s}=a,l=ND(a,["tab"]);return Object.assign(Object.assign({key:String(i)},l),{label:s})}return null});return zD(n)}const jD=t=>{const{componentCls:e,motionDurationSlow:n}=t;return[{[e]:{[`${e}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[Lo(t,"slide-up"),Lo(t,"slide-down")]]},DD=t=>{const{componentCls:e,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:o,itemSelectedColor:a}=t;return{[`${e}-card`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{margin:0,padding:n,background:r,border:`${q(t.lineWidth)} ${t.lineType} ${o}`,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`},[`${e}-tab-active`]:{color:a,background:t.colorBgContainer},[`${e}-tab-focus:has(${e}-tab-btn:focus-visible)`]:wf(t,-3),[`& ${e}-tab${e}-tab-focus ${e}-tab-btn:focus-visible`]:{outline:"none"},[`${e}-ink-bar`]:{visibility:"hidden"}},[`&${e}-top, &${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginLeft:{_skip_check_:!0,value:q(i)}}}},[`&${e}-top`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`},[`${e}-tab-active`]:{borderBottomColor:t.colorBgContainer}}},[`&${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`},[`${e}-tab-active`]:{borderTopColor:t.colorBgContainer}}},[`&${e}-left, &${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginTop:q(i)}}},[`&${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${q(t.borderRadiusLG)} 0 0 ${q(t.borderRadiusLG)}`}},[`${e}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:t.colorBgContainer}}}},[`&${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0`}},[`${e}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:t.colorBgContainer}}}}}}},BD=t=>{const{componentCls:e,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=t;return{[`${e}-dropdown`]:Object.assign(Object.assign({},wn(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:t.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${e}-dropdown-menu`]:{maxHeight:t.tabsDropdownHeight,margin:0,padding:`${q(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:t.colorBgContainer,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,"&-item":Object.assign(Object.assign({},ba),{display:"flex",alignItems:"center",minWidth:t.tabsDropdownWidth,margin:0,padding:`${q(t.paddingXXS)} ${q(t.paddingSM)}`,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:t.marginSM},color:t.colorIcon,fontSize:t.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:t.controlItemBgHover},"&-disabled":{"&, &:hover":{color:t.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},WD=t=>{const{componentCls:e,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:o,verticalItemMargin:a,calc:s}=t;return{[`${e}-top, ${e}-bottom`]:{flexDirection:"column",[`> ${e}-nav, > div > ${e}-nav`]:{margin:i,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${q(t.lineWidth)} ${t.lineType} ${r}`,content:"''"},[`${e}-ink-bar`]:{height:t.lineWidthBold,"&-animated":{transition:`width ${t.motionDurationSlow}, left ${t.motionDurationSlow}, + ${e}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}},PD=t=>{const{componentCls:e}=t;return{[`${e}-out-of-range`]:{[`&, & input, & textarea, ${e}-show-count-suffix, ${e}-data-count`]:{color:t.colorError}}}},xP=Ft(["Input","Shared"],t=>{const e=It(t,Qc(t));return[SD(e),$D(e)]},Nc,{resetFont:!1}),$P=Ft(["Input","Component"],t=>{const e=It(t,Qc(t));return[CD(e),wD(e),PD(e),o0(e)]},Nc,{resetFont:!1});var _D={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},TD=function(e,n){return b(Mt,xe({},e,{ref:n,icon:_D}))},na=Se(TD);const ah=Tt(null);var RD=function(e){var n=e.activeTabOffset,r=e.horizontal,i=e.rtl,o=e.indicator,a=o===void 0?{}:o,s=a.size,l=a.align,c=l===void 0?"center":l,u=te(),d=le(u,2),f=d[0],h=d[1],m=ne(),p=K.useCallback(function(O){return typeof s=="function"?s(O):typeof s=="number"?s:O},[s]);function g(){Yt.cancel(m.current)}return ye(function(){var O={};if(n)if(r){O.width=p(n.width);var v=i?"right":"left";c==="start"&&(O[v]=n[v]),c==="center"&&(O[v]=n[v]+n.width/2,O.transform=i?"translateX(50%)":"translateX(-50%)"),c==="end"&&(O[v]=n[v]+n.width,O.transform="translateX(-100%)")}else O.height=p(n.height),c==="start"&&(O.top=n.top),c==="center"&&(O.top=n.top+n.height/2,O.transform="translateY(-50%)"),c==="end"&&(O.top=n.top+n.height,O.transform="translateY(-100%)");return g(),m.current=Yt(function(){var y=f&&O&&Object.keys(O).every(function(S){var x=O[S],$=f[S];return typeof x=="number"&&typeof $=="number"?Math.round(x)===Math.round($):x===$});y||h(O)}),g},[JSON.stringify(n),r,i,c,p]),{style:f}},xS={width:0,height:0,left:0,top:0};function ID(t,e,n){return ve(function(){for(var r,i=new Map,o=e.get((r=t[0])===null||r===void 0?void 0:r.key)||xS,a=o.left+o.width,s=0;sM?(I=_,$.current="x"):(I=R,$.current="y"),e(-I,-I)&&w.preventDefault()}var P=ne(null);P.current={onTouchStart:y,onTouchMove:S,onTouchEnd:x,onWheel:C},ye(function(){function w(T){P.current.onTouchStart(T)}function _(T){P.current.onTouchMove(T)}function R(T){P.current.onTouchEnd(T)}function I(T){P.current.onWheel(T)}return document.addEventListener("touchmove",_,{passive:!1}),document.addEventListener("touchend",R,{passive:!0}),t.current.addEventListener("touchstart",w,{passive:!0}),t.current.addEventListener("wheel",I,{passive:!1}),function(){document.removeEventListener("touchmove",_),document.removeEventListener("touchend",R)}},[])}function CP(t){var e=te(0),n=le(e,2),r=n[0],i=n[1],o=ne(0),a=ne();return a.current=t,dp(function(){var s;(s=a.current)===null||s===void 0||s.call(a)},[r]),function(){o.current===r&&(o.current+=1,i(o.current))}}function kD(t){var e=ne([]),n=te({}),r=le(n,2),i=r[1],o=ne(typeof t=="function"?t():t),a=CP(function(){var l=o.current;e.current.forEach(function(c){l=c(l)}),e.current=[],o.current=l,i({})});function s(l){e.current.push(l),a()}return[o.current,s]}var PS={width:0,height:0,left:0,top:0,right:0};function AD(t,e,n,r,i,o,a){var s=a.tabs,l=a.tabPosition,c=a.rtl,u,d,f;return["top","bottom"].includes(l)?(u="width",d=c?"right":"left",f=Math.abs(n)):(u="height",d="top",f=-n),ve(function(){if(!s.length)return[0,0];for(var h=s.length,m=h,p=0;pMath.floor(f+e)){m=p-1;break}}for(var O=0,v=h-1;v>=0;v-=1){var y=t.get(s[v].key)||PS;if(y[d]m?[0,-1]:[O,m]},[t,e,r,i,o,f,l,s.map(function(h){return h.key}).join("_"),c])}function _S(t){var e;return t instanceof Map?(e={},t.forEach(function(n,r){e[r]=n})):e=t,JSON.stringify(e)}var QD="TABS_DQ";function wP(t){return String(t).replace(/"/g,QD)}function A0(t,e,n,r){return!(!n||r||t===!1||t===void 0&&(e===!1||e===null))}var PP=Se(function(t,e){var n=t.prefixCls,r=t.editable,i=t.locale,o=t.style;return!r||r.showAdd===!1?null:b("button",{ref:e,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(s){r.onEdit("add",{event:s})}},r.addIcon||"+")}),TS=Se(function(t,e){var n=t.position,r=t.prefixCls,i=t.extra;if(!i)return null;var o,a={};return nt(i)==="object"&&!en(i)?a=i:a.right=i,n==="right"&&(o=a.right),n==="left"&&(o=a.left),o?b("div",{className:"".concat(r,"-extra-content"),ref:e},o):null}),ND=Se(function(t,e){var n=t.prefixCls,r=t.id,i=t.tabs,o=t.locale,a=t.mobile,s=t.more,l=s===void 0?{}:s,c=t.style,u=t.className,d=t.editable,f=t.tabBarGutter,h=t.rtl,m=t.removeAriaLabel,p=t.onTabClick,g=t.getPopupContainer,O=t.popupClassName,v=te(!1),y=le(v,2),S=y[0],x=y[1],$=te(null),C=le($,2),P=C[0],w=C[1],_=l.icon,R=_===void 0?"More":_,I="".concat(r,"-more-popup"),T="".concat(n,"-dropdown"),M=P!==null?"".concat(I,"-").concat(P):null,Q=o==null?void 0:o.dropdownAriaLabel;function E(X,q){X.preventDefault(),X.stopPropagation(),d.onEdit("remove",{key:q,event:X})}var k=b(Fs,{onClick:function(q){var N=q.key,j=q.domEvent;p(N,j),x(!1)},prefixCls:"".concat(T,"-menu"),id:I,tabIndex:-1,role:"listbox","aria-activedescendant":M,selectedKeys:[P],"aria-label":Q!==void 0?Q:"expanded dropdown"},i.map(function(X){var q=X.closable,N=X.disabled,j=X.closeIcon,oe=X.key,ee=X.label,se=A0(q,j,d,N);return b(kc,{key:oe,id:"".concat(I,"-").concat(oe),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(oe),disabled:N},b("span",null,ee),se&&b("button",{type:"button","aria-label":m||"remove",tabIndex:0,className:"".concat(T,"-menu-item-remove"),onClick:function(re){re.stopPropagation(),E(re,oe)}},j||d.removeIcon||"×"))}));function z(X){for(var q=i.filter(function(se){return!se.disabled}),N=q.findIndex(function(se){return se.key===P})||0,j=q.length,oe=0;oeFe?"left":"right"})}),T=le(I,2),M=T[0],Q=T[1],E=$S(0,function(Ue,Fe){!R&&p&&p({direction:Ue>Fe?"top":"bottom"})}),k=le(E,2),z=k[0],L=k[1],B=te([0,0]),F=le(B,2),H=F[0],X=F[1],q=te([0,0]),N=le(q,2),j=N[0],oe=N[1],ee=te([0,0]),se=le(ee,2),fe=se[0],re=se[1],J=te([0,0]),ue=le(J,2),de=ue[0],D=ue[1],Y=kD(new Map),me=le(Y,2),G=me[0],ce=me[1],ae=ID(y,G,j[0]),pe=fu(H,R),Oe=fu(j,R),be=fu(fe,R),ge=fu(de,R),Me=Math.floor(pe)Ee?Ee:Ue}var Ye=ne(null),rt=te(),Be=le(rt,2),Re=Be[0],Xe=Be[1];function _e(){Xe(Date.now())}function Pe(){Ye.current&&clearTimeout(Ye.current)}ED(C,function(Ue,Fe){function pt(Et,Ne){Et(function(ot){var bt=st(ot+Ne);return bt})}return Me?(R?pt(Q,Ue):pt(L,Fe),Pe(),_e(),!0):!1}),ye(function(){return Pe(),Re&&(Ye.current=setTimeout(function(){Xe(0)},100)),Pe},[Re]);var ft=AD(ae,Ie,R?M:z,Oe,be,ge,Z(Z({},t),{},{tabs:y})),yt=le(ft,2),xn=yt[0],Xt=yt[1],gn=bn(function(){var Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a,Fe=ae.get(Ue)||{width:0,height:0,left:0,right:0,top:0};if(R){var pt=M;s?Fe.rightM+Ie&&(pt=Fe.right+Fe.width-Ie):Fe.left<-M?pt=-Fe.left:Fe.left+Fe.width>-M+Ie&&(pt=-(Fe.left+Fe.width-Ie)),L(0),Q(st(pt))}else{var Et=z;Fe.top<-z?Et=-Fe.top:Fe.top+Fe.height>-z+Ie&&(Et=-(Fe.top+Fe.height-Ie)),Q(0),L(st(Et))}}),fn=te(),Dt=le(fn,2),Ct=Dt[0],ht=Dt[1],et=te(!1),it=le(et,2),ke=it[0],ct=it[1],Ke=y.filter(function(Ue){return!Ue.disabled}).map(function(Ue){return Ue.key}),we=function(Fe){var pt=Ke.indexOf(Ct||a),Et=Ke.length,Ne=(pt+Fe+Et)%Et,ot=Ke[Ne];ht(ot)},We=function(Fe,pt){var Et=Ke.indexOf(Fe),Ne=y.find(function(bt){return bt.key===Fe}),ot=A0(Ne==null?void 0:Ne.closable,Ne==null?void 0:Ne.closeIcon,c,Ne==null?void 0:Ne.disabled);ot&&(pt.preventDefault(),pt.stopPropagation(),c.onEdit("remove",{key:Fe,event:pt}),Et===Ke.length-1?we(-1):we(1))},Qe=function(Fe,pt){ct(!0),pt.button===1&&We(Fe,pt)},Ve=function(Fe){var pt=Fe.code,Et=s&&R,Ne=Ke[0],ot=Ke[Ke.length-1];switch(pt){case"ArrowLeft":{R&&we(Et?1:-1);break}case"ArrowRight":{R&&we(Et?-1:1);break}case"ArrowUp":{Fe.preventDefault(),R||we(-1);break}case"ArrowDown":{Fe.preventDefault(),R||we(1);break}case"Home":{Fe.preventDefault(),ht(Ne);break}case"End":{Fe.preventDefault(),ht(ot);break}case"Enter":case"Space":{Fe.preventDefault(),m(Ct??a,Fe);break}case"Backspace":case"Delete":{We(Ct,Fe);break}}},ut={};R?ut[s?"marginRight":"marginLeft"]=f:ut.marginTop=f;var tt=y.map(function(Ue,Fe){var pt=Ue.key;return b(jD,{id:i,prefixCls:v,key:pt,tab:Ue,style:Fe===0?void 0:ut,closable:Ue.closable,editable:c,active:pt===a,focus:pt===Ct,renderWrapper:h,removeAriaLabel:u==null?void 0:u.removeAriaLabel,tabCount:Ke.length,currentPosition:Fe+1,onClick:function(Ne){m(pt,Ne)},onKeyDown:Ve,onFocus:function(){ke||ht(pt),gn(pt),_e(),C.current&&(s||(C.current.scrollLeft=0),C.current.scrollTop=0)},onBlur:function(){ht(void 0)},onMouseDown:function(Ne){return Qe(pt,Ne)},onMouseUp:function(){ct(!1)}})}),St=function(){return ce(function(){var Fe,pt=new Map,Et=(Fe=P.current)===null||Fe===void 0?void 0:Fe.getBoundingClientRect();return y.forEach(function(Ne){var ot,bt=Ne.key,Rn=(ot=P.current)===null||ot===void 0?void 0:ot.querySelector('[data-node-key="'.concat(wP(bt),'"]'));if(Rn){var Bn=LD(Rn,Et),Rr=le(Bn,4),Ir=Rr[0],Kn=Rr[1],Mr=Rr[2],Er=Rr[3];pt.set(bt,{width:Ir,height:Kn,left:Mr,top:Er})}}),pt})};ye(function(){St()},[y.map(function(Ue){return Ue.key}).join("_")]);var Pt=CP(function(){var Ue=Xa(S),Fe=Xa(x),pt=Xa($);X([Ue[0]-Fe[0]-pt[0],Ue[1]-Fe[1]-pt[1]]);var Et=Xa(_);re(Et);var Ne=Xa(w);D(Ne);var ot=Xa(P);oe([ot[0]-Et[0],ot[1]-Et[1]]),St()}),vt=y.slice(0,xn),_t=y.slice(Xt+1),hn=[].concat(Ce(vt),Ce(_t)),sn=ae.get(a),mn=RD({activeTabOffset:sn,horizontal:R,indicator:g,rtl:s}),Tn=mn.style;ye(function(){gn()},[a,Ae,Ee,_S(sn),_S(ae),R]),ye(function(){Pt()},[s]);var Bt=!!hn.length,Gt="".concat(v,"-nav-wrap"),Te,Le,mt,xt;return R?s?(Le=M>0,Te=M!==Ee):(Te=M<0,Le=M!==Ae):(mt=z<0,xt=z!==Ae),b(Jr,{onResize:Pt},b("div",{ref:Oo(e,S),role:"tablist","aria-orientation":R?"horizontal":"vertical",className:U("".concat(v,"-nav"),n),style:r,onKeyDown:function(){_e()}},b(TS,{ref:x,position:"left",extra:l,prefixCls:v}),b(Jr,{onResize:Pt},b("div",{className:U(Gt,W(W(W(W({},"".concat(Gt,"-ping-left"),Te),"".concat(Gt,"-ping-right"),Le),"".concat(Gt,"-ping-top"),mt),"".concat(Gt,"-ping-bottom"),xt)),ref:C},b(Jr,{onResize:Pt},b("div",{ref:P,className:"".concat(v,"-nav-list"),style:{transform:"translate(".concat(M,"px, ").concat(z,"px)"),transition:Re?"none":void 0}},tt,b(PP,{ref:_,prefixCls:v,locale:u,editable:c,style:Z(Z({},tt.length===0?void 0:ut),{},{visibility:Bt?"hidden":null})}),b("div",{className:U("".concat(v,"-ink-bar"),W({},"".concat(v,"-ink-bar-animated"),o.inkBar)),style:Tn}))))),b(zD,xe({},t,{removeAriaLabel:u==null?void 0:u.removeAriaLabel,ref:w,prefixCls:v,tabs:hn,className:!Bt&&He,tabMoving:!!Re})),b(TS,{ref:$,position:"right",extra:l,prefixCls:v})))}),_P=Se(function(t,e){var n=t.prefixCls,r=t.className,i=t.style,o=t.id,a=t.active,s=t.tabKey,l=t.children;return b("div",{id:o&&"".concat(o,"-panel-").concat(s),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(s),"aria-hidden":!a,style:i,className:U(n,a&&"".concat(n,"-active"),r),ref:e},l)}),DD=["renderTabBar"],BD=["label","key"],WD=function(e){var n=e.renderTabBar,r=gt(e,DD),i=he(ah),o=i.tabs;if(n){var a=Z(Z({},r),{},{panes:o.map(function(s){var l=s.label,c=s.key,u=gt(s,BD);return b(_P,xe({tab:l,key:c,tabKey:c},u))})});return n(a,RS)}return b(RS,r)},HD=["key","forceRender","style","className","destroyInactiveTabPane"],VD=function(e){var n=e.id,r=e.activeKey,i=e.animated,o=e.tabPosition,a=e.destroyInactiveTabPane,s=he(ah),l=s.prefixCls,c=s.tabs,u=i.tabPane,d="".concat(l,"-tabpane");return b("div",{className:U("".concat(l,"-content-holder"))},b("div",{className:U("".concat(l,"-content"),"".concat(l,"-content-").concat(o),W({},"".concat(l,"-content-animated"),u))},c.map(function(f){var h=f.key,m=f.forceRender,p=f.style,g=f.className,O=f.destroyInactiveTabPane,v=gt(f,HD),y=h===r;return b(vi,xe({key:h,visible:y,forceRender:m,removeOnLeave:!!(a||O),leavedClassName:"".concat(d,"-hidden")},i.tabPaneMotion),function(S,x){var $=S.style,C=S.className;return b(_P,xe({},v,{prefixCls:d,id:n,tabKey:h,animated:u,active:y,style:Z(Z({},p),$),className:U(g,C),ref:x}))})})))};function FD(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},e;return t===!1?e={inkBar:!1,tabPane:!1}:t===!0?e={inkBar:!0,tabPane:!1}:e=Z({inkBar:!0},nt(t)==="object"?t:{}),e.tabPaneMotion&&e.tabPane===void 0&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}var XD=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],IS=0,ZD=Se(function(t,e){var n=t.id,r=t.prefixCls,i=r===void 0?"rc-tabs":r,o=t.className,a=t.items,s=t.direction,l=t.activeKey,c=t.defaultActiveKey,u=t.editable,d=t.animated,f=t.tabPosition,h=f===void 0?"top":f,m=t.tabBarGutter,p=t.tabBarStyle,g=t.tabBarExtraContent,O=t.locale,v=t.more,y=t.destroyInactiveTabPane,S=t.renderTabBar,x=t.onChange,$=t.onTabClick,C=t.onTabScroll,P=t.getPopupContainer,w=t.popupClassName,_=t.indicator,R=gt(t,XD),I=ve(function(){return(a||[]).filter(function(de){return de&&nt(de)==="object"&&"key"in de})},[a]),T=s==="rtl",M=FD(d),Q=te(!1),E=le(Q,2),k=E[0],z=E[1];ye(function(){z(m0())},[]);var L=Pn(function(){var de;return(de=I[0])===null||de===void 0?void 0:de.key},{value:l,defaultValue:c}),B=le(L,2),F=B[0],H=B[1],X=te(function(){return I.findIndex(function(de){return de.key===F})}),q=le(X,2),N=q[0],j=q[1];ye(function(){var de=I.findIndex(function(Y){return Y.key===F});if(de===-1){var D;de=Math.max(0,Math.min(N,I.length-1)),H((D=I[de])===null||D===void 0?void 0:D.key)}j(de)},[I.map(function(de){return de.key}).join("_"),F,N]);var oe=Pn(null,{value:n}),ee=le(oe,2),se=ee[0],fe=ee[1];ye(function(){n||(fe("rc-tabs-".concat(IS)),IS+=1)},[]);function re(de,D){$==null||$(de,D);var Y=de!==F;H(de),Y&&(x==null||x(de))}var J={id:se,activeKey:F,animated:M,tabPosition:h,rtl:T,mobile:k},ue=Z(Z({},J),{},{editable:u,locale:O,more:v,tabBarGutter:m,onTabClick:re,onTabScroll:C,extra:g,style:p,panes:null,getPopupContainer:P,popupClassName:w,indicator:_});return b(ah.Provider,{value:{tabs:I,prefixCls:i}},b("div",xe({ref:e,id:n,className:U(i,"".concat(i,"-").concat(h),W(W(W({},"".concat(i,"-mobile"),k),"".concat(i,"-editable"),u),"".concat(i,"-rtl"),T),o)},R),b(WD,xe({},ue,{renderTabBar:S})),b(VD,xe({destroyInactiveTabPane:y},J,{animated:M}))))});const qD={motionAppear:!1,motionEnter:!0,motionLeave:!0};function GD(t,e={inkBar:!0,tabPane:!1}){let n;return e===!1?n={inkBar:!1,tabPane:!1}:e===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof e=="object"?e:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},qD),{motionName:jo(t,"switch")})),n}var UD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);ie)}function KD(t,e){if(t)return t.map(r=>{var i;const o=(i=r.destroyOnHidden)!==null&&i!==void 0?i:r.destroyInactiveTabPane;return Object.assign(Object.assign({},r),{destroyInactiveTabPane:o})});const n=sr(e).map(r=>{if(en(r)){const{key:i,props:o}=r,a=o||{},{tab:s}=a,l=UD(a,["tab"]);return Object.assign(Object.assign({key:String(i)},l),{label:s})}return null});return YD(n)}const JD=t=>{const{componentCls:e,motionDurationSlow:n}=t;return[{[e]:{[`${e}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[Lo(t,"slide-up"),Lo(t,"slide-down")]]},eB=t=>{const{componentCls:e,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:o,itemSelectedColor:a}=t;return{[`${e}-card`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{margin:0,padding:n,background:r,border:`${V(t.lineWidth)} ${t.lineType} ${o}`,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`},[`${e}-tab-active`]:{color:a,background:t.colorBgContainer},[`${e}-tab-focus:has(${e}-tab-btn:focus-visible)`]:xs(t,-3),[`& ${e}-tab${e}-tab-focus ${e}-tab-btn:focus-visible`]:{outline:"none"},[`${e}-ink-bar`]:{visibility:"hidden"}},[`&${e}-top, &${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginLeft:{_skip_check_:!0,value:V(i)}}}},[`&${e}-top`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`${V(t.borderRadiusLG)} ${V(t.borderRadiusLG)} 0 0`},[`${e}-tab-active`]:{borderBottomColor:t.colorBgContainer}}},[`&${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`0 0 ${V(t.borderRadiusLG)} ${V(t.borderRadiusLG)}`},[`${e}-tab-active`]:{borderTopColor:t.colorBgContainer}}},[`&${e}-left, &${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginTop:V(i)}}},[`&${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${V(t.borderRadiusLG)} 0 0 ${V(t.borderRadiusLG)}`}},[`${e}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:t.colorBgContainer}}}},[`&${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${V(t.borderRadiusLG)} ${V(t.borderRadiusLG)} 0`}},[`${e}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:t.colorBgContainer}}}}}}},tB=t=>{const{componentCls:e,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=t;return{[`${e}-dropdown`]:Object.assign(Object.assign({},Sn(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:t.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${e}-dropdown-menu`]:{maxHeight:t.tabsDropdownHeight,margin:0,padding:`${V(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:t.colorBgContainer,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Sa),{display:"flex",alignItems:"center",minWidth:t.tabsDropdownWidth,margin:0,padding:`${V(t.paddingXXS)} ${V(t.paddingSM)}`,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:t.marginSM},color:t.colorIcon,fontSize:t.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:t.controlItemBgHover},"&-disabled":{"&, &:hover":{color:t.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},nB=t=>{const{componentCls:e,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:o,verticalItemMargin:a,calc:s}=t;return{[`${e}-top, ${e}-bottom`]:{flexDirection:"column",[`> ${e}-nav, > div > ${e}-nav`]:{margin:i,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${V(t.lineWidth)} ${t.lineType} ${r}`,content:"''"},[`${e}-ink-bar`]:{height:t.lineWidthBold,"&-animated":{transition:`width ${t.motionDurationSlow}, left ${t.motionDurationSlow}, right ${t.motionDurationSlow}`}},[`${e}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:t.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowRight},[`&${e}-nav-wrap-ping-left::before`]:{opacity:1},[`&${e}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${e}-top`]:{[`> ${e}-nav, - > div > ${e}-nav`]:{"&::before":{bottom:0},[`${e}-ink-bar`]:{bottom:0}}},[`${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${e}-ink-bar`]:{top:0}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0}},[`${e}-left, ${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{flexDirection:"column",minWidth:s(t.controlHeight).mul(1.25).equal(),[`${e}-tab`]:{padding:o,textAlign:"center"},[`${e}-tab + ${e}-tab`]:{margin:a},[`${e}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:t.controlHeight},"&::before":{top:0,boxShadow:t.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:t.boxShadowTabsOverflowBottom},[`&${e}-nav-wrap-ping-top::before`]:{opacity:1},[`&${e}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${e}-ink-bar`]:{width:t.lineWidthBold,"&-animated":{transition:`height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`}},[`${e}-nav-list, ${e}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{marginLeft:{_skip_check_:!0,value:q(s(t.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:t.paddingLG}}}},[`${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,[`${e}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:s(t.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingRight:{_skip_check_:!0,value:t.paddingLG}}}}}},FD=t=>{const{componentCls:e,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:o,horizontalItemPaddingSM:a,horizontalItemPaddingLG:s}=t;return{[e]:{"&-small":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:a,fontSize:t.titleFontSizeSM}}},"&-large":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:s,fontSize:t.titleFontSizeLG,lineHeight:t.lineHeightLG}}}},[`${e}-card`]:{[`&${e}-small`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:n},[`${e}-nav-add`]:{minWidth:i,minHeight:i}},[`&${e}-bottom`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`0 0 ${q(t.borderRadius)} ${q(t.borderRadius)}`}},[`&${e}-top`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`${q(t.borderRadius)} ${q(t.borderRadius)} 0 0`}},[`&${e}-right`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${q(t.borderRadius)} ${q(t.borderRadius)} 0`}}},[`&${e}-left`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${q(t.borderRadius)} 0 0 ${q(t.borderRadius)}`}}}},[`&${e}-large`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:r},[`${e}-nav-add`]:{minWidth:o,minHeight:o}}}}}},VD=t=>{const{componentCls:e,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:o,horizontalItemPadding:a,itemSelectedColor:s,itemColor:l}=t,c=`${e}-tab`;return{[c]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:t.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${t.motionDurationSlow}`,[`${c}-icon:not(:last-child)`]:{marginInlineEnd:t.marginSM}},"&-remove":Object.assign({flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:t.calc(t.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:t.marginXS},color:t.colorIcon,fontSize:t.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"&:hover":{color:t.colorTextHeading}},Ci(t)),"&:hover":{color:r},[`&${c}-active ${c}-btn`]:{color:s,textShadow:t.tabsActiveTextShadow},[`&${c}-focus ${c}-btn:focus-visible`]:wf(t),[`&${c}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${c}-disabled ${c}-btn, &${c}-disabled ${e}-remove`]:{"&:focus, &:active":{color:t.colorTextDisabled}},[`& ${c}-remove ${i}`]:{margin:0,verticalAlign:"middle"},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:t.marginSM}}},[`${c} + ${c}`]:{margin:{_skip_check_:!0,value:o}}}},HD=t=>{const{componentCls:e,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:o}=t;return{[`${e}-rtl`]:{direction:"rtl",[`${e}-nav`]:{[`${e}-tab`]:{margin:{_skip_check_:!0,value:n},[`${e}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:q(t.marginSM)}},[`${e}-tab-remove`]:{marginRight:{_skip_check_:!0,value:q(t.marginXS)},marginLeft:{_skip_check_:!0,value:q(o(t.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${e}-left`]:{[`> ${e}-nav`]:{order:1},[`> ${e}-content-holder`]:{order:0}},[`&${e}-right`]:{[`> ${e}-nav`]:{order:0},[`> ${e}-content-holder`]:{order:1}},[`&${e}-card${e}-top, &${e}-card${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${e}-dropdown-rtl`]:{direction:"rtl"},[`${e}-menu-item`]:{[`${e}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},XD=t=>{const{componentCls:e,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:o,itemActiveColor:a,colorBorderSecondary:s}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{display:"flex",[`> ${e}-nav, > div > ${e}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${e}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${t.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${e}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${t.motionDurationSlow}`},[`${e}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${e}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${e}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:t.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:t.calc(t.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${e}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${q(t.lineWidth)} ${t.lineType} ${s}`,borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:t.colorText,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:a}},Ci(t,-3))},[`${e}-extra-content`]:{flex:"none"},[`${e}-ink-bar`]:{position:"absolute",background:t.inkBarColor,pointerEvents:"none"}}),VD(t)),{[`${e}-content`]:{position:"relative",width:"100%"},[`${e}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${e}-tabpane`]:Object.assign(Object.assign({},Ci(t)),{"&-hidden":{display:"none"}})}),[`${e}-centered`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-nav-wrap`]:{[`&:not([class*='${e}-nav-wrap-ping']) > ${e}-nav-list`]:{margin:"auto"}}}}}},ZD=t=>{const{cardHeight:e,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:o}=t,a=e||o,s=n||i,l=r||o+8;return{zIndexPopup:t.zIndexPopupBase+50,cardBg:t.colorFillAlter,cardHeight:a,cardHeightSM:s,cardHeightLG:l,cardPadding:`${(a-t.fontHeight)/2-t.lineWidth}px ${t.padding}px`,cardPaddingSM:`${(s-t.fontHeight)/2-t.lineWidth}px ${t.paddingXS}px`,cardPaddingLG:`${(l-t.fontHeightLG)/2-t.lineWidth}px ${t.padding}px`,titleFontSize:t.fontSize,titleFontSizeLG:t.fontSizeLG,titleFontSizeSM:t.fontSize,inkBarColor:t.colorPrimary,horizontalMargin:`0 0 ${t.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${t.paddingSM}px 0`,horizontalItemPaddingSM:`${t.paddingXS}px 0`,horizontalItemPaddingLG:`${t.padding}px 0`,verticalItemPadding:`${t.paddingXS}px ${t.paddingLG}px`,verticalItemMargin:`${t.margin}px 0 0 0`,itemColor:t.colorText,itemSelectedColor:t.colorPrimary,itemHoverColor:t.colorPrimaryHover,itemActiveColor:t.colorPrimaryActive,cardGutter:t.marginXXS/2}},qD=Zt("Tabs",t=>{const e=kt(t,{tabsCardPadding:t.cardPadding,dropdownEdgeChildVerticalPadding:t.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${q(t.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${q(t.horizontalItemGutter)}`});return[FD(e),HD(e),WD(e),BD(e),DD(e),XD(e),jD(e)]},ZD),GD=()=>null;var YD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r,i,o,a,s,l,c,u,d,f;const{type:h,className:p,rootClassName:m,size:g,onEdit:v,hideAdd:O,centered:S,addIcon:x,removeIcon:b,moreIcon:C,more:$,popupClassName:w,children:P,items:_,animated:T,style:R,indicatorSize:k,indicator:I,destroyInactiveTabPane:Q,destroyOnHidden:M}=t,E=YD(t,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:N}=E,{direction:z,tabs:L,getPrefixCls:F,getPopupContainer:H}=fe(it),V=F("tabs",N),X=$r(V),[B,G,se]=qD(V,X),re=U(null);Yt(e,()=>({nativeElement:re.current}));let le;h==="editable-card"&&(le={onEdit:(ee,{key:he,event:ve})=>{v==null||v(ee==="add"?ve:he,ee)},removeIcon:(n=b??(L==null?void 0:L.removeIcon))!==null&&n!==void 0?n:y(Vi,null),addIcon:(x??(L==null?void 0:L.addIcon))||y(ea,null),showAdd:O!==!0});const me=F(),ie=Dr(g),ne=LD(_,P),ue=QD(V,T),de=Object.assign(Object.assign({},L==null?void 0:L.style),R),j={align:(r=I==null?void 0:I.align)!==null&&r!==void 0?r:(i=L==null?void 0:L.indicator)===null||i===void 0?void 0:i.align,size:(l=(a=(o=I==null?void 0:I.size)!==null&&o!==void 0?o:k)!==null&&a!==void 0?a:(s=L==null?void 0:L.indicator)===null||s===void 0?void 0:s.size)!==null&&l!==void 0?l:L==null?void 0:L.indicatorSize};return B(y(ED,Object.assign({ref:re,direction:z,getPopupContainer:H},E,{items:ne,className:Z({[`${V}-${ie}`]:ie,[`${V}-card`]:["card","editable-card"].includes(h),[`${V}-editable-card`]:h==="editable-card",[`${V}-centered`]:S},L==null?void 0:L.className,p,m,G,se,X),popupClassName:Z(w,G,se,X),style:de,editable:le,more:Object.assign({icon:(f=(d=(u=(c=L==null?void 0:L.more)===null||c===void 0?void 0:c.icon)!==null&&u!==void 0?u:L==null?void 0:L.moreIcon)!==null&&d!==void 0?d:C)!==null&&f!==void 0?f:y(x0,null),transitionName:`${me}-slide-up`},$),prefixCls:V,animated:ue,indicator:j,destroyInactiveTabPane:M??Q})))}),mP=UD;mP.TabPane=GD;var KD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{prefixCls:e,className:n,hoverable:r=!0}=t,i=KD(t,["prefixCls","className","hoverable"]);const{getPrefixCls:o}=fe(it),a=o("card",e),s=Z(`${a}-grid`,n,{[`${a}-grid-hoverable`]:r});return y("div",Object.assign({},i,{className:s}))},JD=t=>{const{antCls:e,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:o}=t;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:`0 ${q(i)}`,color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.headerFontSize,background:t.headerBg,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorderSecondary}`,borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`},No()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},ba),{[` + > div > ${e}-nav`]:{"&::before":{bottom:0},[`${e}-ink-bar`]:{bottom:0}}},[`${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${e}-ink-bar`]:{top:0}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0}},[`${e}-left, ${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{flexDirection:"column",minWidth:s(t.controlHeight).mul(1.25).equal(),[`${e}-tab`]:{padding:o,textAlign:"center"},[`${e}-tab + ${e}-tab`]:{margin:a},[`${e}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:t.controlHeight},"&::before":{top:0,boxShadow:t.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:t.boxShadowTabsOverflowBottom},[`&${e}-nav-wrap-ping-top::before`]:{opacity:1},[`&${e}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${e}-ink-bar`]:{width:t.lineWidthBold,"&-animated":{transition:`height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`}},[`${e}-nav-list, ${e}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{marginLeft:{_skip_check_:!0,value:V(s(t.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:t.paddingLG}}}},[`${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,[`${e}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:s(t.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingRight:{_skip_check_:!0,value:t.paddingLG}}}}}},rB=t=>{const{componentCls:e,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:o,horizontalItemPaddingSM:a,horizontalItemPaddingLG:s}=t;return{[e]:{"&-small":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:a,fontSize:t.titleFontSizeSM}}},"&-large":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:s,fontSize:t.titleFontSizeLG,lineHeight:t.lineHeightLG}}}},[`${e}-card`]:{[`&${e}-small`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:n},[`${e}-nav-add`]:{minWidth:i,minHeight:i}},[`&${e}-bottom`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`0 0 ${V(t.borderRadius)} ${V(t.borderRadius)}`}},[`&${e}-top`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`${V(t.borderRadius)} ${V(t.borderRadius)} 0 0`}},[`&${e}-right`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${V(t.borderRadius)} ${V(t.borderRadius)} 0`}}},[`&${e}-left`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${V(t.borderRadius)} 0 0 ${V(t.borderRadius)}`}}}},[`&${e}-large`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:r},[`${e}-nav-add`]:{minWidth:o,minHeight:o}}}}}},iB=t=>{const{componentCls:e,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:o,horizontalItemPadding:a,itemSelectedColor:s,itemColor:l}=t,c=`${e}-tab`;return{[c]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:t.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${t.motionDurationSlow}`,[`${c}-icon:not(:last-child)`]:{marginInlineEnd:t.marginSM}},"&-remove":Object.assign({flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:t.calc(t.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:t.marginXS},color:t.colorIcon,fontSize:t.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"&:hover":{color:t.colorTextHeading}},hi(t)),"&:hover":{color:r},[`&${c}-active ${c}-btn`]:{color:s,textShadow:t.tabsActiveTextShadow},[`&${c}-focus ${c}-btn:focus-visible`]:xs(t),[`&${c}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${c}-disabled ${c}-btn, &${c}-disabled ${e}-remove`]:{"&:focus, &:active":{color:t.colorTextDisabled}},[`& ${c}-remove ${i}`]:{margin:0,verticalAlign:"middle"},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:t.marginSM}}},[`${c} + ${c}`]:{margin:{_skip_check_:!0,value:o}}}},oB=t=>{const{componentCls:e,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:o}=t;return{[`${e}-rtl`]:{direction:"rtl",[`${e}-nav`]:{[`${e}-tab`]:{margin:{_skip_check_:!0,value:n},[`${e}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:V(t.marginSM)}},[`${e}-tab-remove`]:{marginRight:{_skip_check_:!0,value:V(t.marginXS)},marginLeft:{_skip_check_:!0,value:V(o(t.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${e}-left`]:{[`> ${e}-nav`]:{order:1},[`> ${e}-content-holder`]:{order:0}},[`&${e}-right`]:{[`> ${e}-nav`]:{order:0},[`> ${e}-content-holder`]:{order:1}},[`&${e}-card${e}-top, &${e}-card${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${e}-dropdown-rtl`]:{direction:"rtl"},[`${e}-menu-item`]:{[`${e}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},aB=t=>{const{componentCls:e,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:o,itemActiveColor:a,colorBorderSecondary:s}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},Sn(t)),{display:"flex",[`> ${e}-nav, > div > ${e}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${e}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${t.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${e}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${t.motionDurationSlow}`},[`${e}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${e}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${e}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:t.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:t.calc(t.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${e}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${V(t.lineWidth)} ${t.lineType} ${s}`,borderRadius:`${V(t.borderRadiusLG)} ${V(t.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:t.colorText,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:a}},hi(t,-3))},[`${e}-extra-content`]:{flex:"none"},[`${e}-ink-bar`]:{position:"absolute",background:t.inkBarColor,pointerEvents:"none"}}),iB(t)),{[`${e}-content`]:{position:"relative",width:"100%"},[`${e}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${e}-tabpane`]:Object.assign(Object.assign({},hi(t)),{"&-hidden":{display:"none"}})}),[`${e}-centered`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-nav-wrap`]:{[`&:not([class*='${e}-nav-wrap-ping']) > ${e}-nav-list`]:{margin:"auto"}}}}}},sB=t=>{const{cardHeight:e,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:o}=t,a=e||o,s=n||i,l=r||o+8;return{zIndexPopup:t.zIndexPopupBase+50,cardBg:t.colorFillAlter,cardHeight:a,cardHeightSM:s,cardHeightLG:l,cardPadding:`${(a-t.fontHeight)/2-t.lineWidth}px ${t.padding}px`,cardPaddingSM:`${(s-t.fontHeight)/2-t.lineWidth}px ${t.paddingXS}px`,cardPaddingLG:`${(l-t.fontHeightLG)/2-t.lineWidth}px ${t.padding}px`,titleFontSize:t.fontSize,titleFontSizeLG:t.fontSizeLG,titleFontSizeSM:t.fontSize,inkBarColor:t.colorPrimary,horizontalMargin:`0 0 ${t.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${t.paddingSM}px 0`,horizontalItemPaddingSM:`${t.paddingXS}px 0`,horizontalItemPaddingLG:`${t.padding}px 0`,verticalItemPadding:`${t.paddingXS}px ${t.paddingLG}px`,verticalItemMargin:`${t.margin}px 0 0 0`,itemColor:t.colorText,itemSelectedColor:t.colorPrimary,itemHoverColor:t.colorPrimaryHover,itemActiveColor:t.colorPrimaryActive,cardGutter:t.marginXXS/2}},lB=Ft("Tabs",t=>{const e=It(t,{tabsCardPadding:t.cardPadding,dropdownEdgeChildVerticalPadding:t.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${V(t.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${V(t.horizontalItemGutter)}`});return[rB(e),oB(e),nB(e),tB(e),eB(e),aB(e),JD(e)]},sB),cB=()=>null;var uB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r,i,o,a,s,l,c,u,d,f;const{type:h,className:m,rootClassName:p,size:g,onEdit:O,hideAdd:v,centered:y,addIcon:S,removeIcon:x,moreIcon:$,more:C,popupClassName:P,children:w,items:_,animated:R,style:I,indicatorSize:T,indicator:M,destroyInactiveTabPane:Q,destroyOnHidden:E}=t,k=uB(t,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:z}=k,{direction:L,tabs:B,getPrefixCls:F,getPopupContainer:H}=he(lt),X=F("tabs",z),q=Tr(X),[N,j,oe]=lB(X,q),ee=ne(null);Jt(e,()=>({nativeElement:ee.current}));let se;h==="editable-card"&&(se={onEdit:(Y,{key:me,event:G})=>{O==null||O(Y==="add"?G:me,Y)},removeIcon:(n=x??(B==null?void 0:B.removeIcon))!==null&&n!==void 0?n:b(Xi,null),addIcon:(S??(B==null?void 0:B.addIcon))||b(na,null),showAdd:v!==!0});const fe=F(),re=br(g),J=KD(_,w),ue=GD(X,R),de=Object.assign(Object.assign({},B==null?void 0:B.style),I),D={align:(r=M==null?void 0:M.align)!==null&&r!==void 0?r:(i=B==null?void 0:B.indicator)===null||i===void 0?void 0:i.align,size:(l=(a=(o=M==null?void 0:M.size)!==null&&o!==void 0?o:T)!==null&&a!==void 0?a:(s=B==null?void 0:B.indicator)===null||s===void 0?void 0:s.size)!==null&&l!==void 0?l:B==null?void 0:B.indicatorSize};return N(b(ZD,Object.assign({ref:ee,direction:L,getPopupContainer:H},k,{items:J,className:U({[`${X}-${re}`]:re,[`${X}-card`]:["card","editable-card"].includes(h),[`${X}-editable-card`]:h==="editable-card",[`${X}-centered`]:y},B==null?void 0:B.className,m,p,j,oe,q),popupClassName:U(P,j,oe,q),style:de,editable:se,more:Object.assign({icon:(f=(d=(u=(c=B==null?void 0:B.more)===null||c===void 0?void 0:c.icon)!==null&&u!==void 0?u:B==null?void 0:B.moreIcon)!==null&&d!==void 0?d:$)!==null&&f!==void 0?f:b(I0,null),transitionName:`${fe}-slide-up`},C),prefixCls:X,animated:ue,indicator:D,destroyInactiveTabPane:E??Q})))}),TP=dB;TP.TabPane=cB;var fB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{prefixCls:e,className:n,hoverable:r=!0}=t,i=fB(t,["prefixCls","className","hoverable"]);const{getPrefixCls:o}=he(lt),a=o("card",e),s=U(`${a}-grid`,n,{[`${a}-grid-hoverable`]:r});return b("div",Object.assign({},i,{className:s}))},hB=t=>{const{antCls:e,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:o}=t;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:`0 ${V(i)}`,color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.headerFontSize,background:t.headerBg,borderBottom:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorderSecondary}`,borderRadius:`${V(t.borderRadiusLG)} ${V(t.borderRadiusLG)} 0 0`},zo()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},Sa),{[` > ${n}-typography, > ${n}-typography-edit-content - `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${e}-tabs-top`]:{clear:"both",marginBottom:o,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,"&-bar":{borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorderSecondary}`}}})},eB=t=>{const{cardPaddingBase:e,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=t;return{width:"33.33%",padding:e,border:0,borderRadius:0,boxShadow:` - ${q(i)} 0 0 0 ${n}, - 0 ${q(i)} 0 0 ${n}, - ${q(i)} ${q(i)} 0 0 ${n}, - ${q(i)} 0 0 0 ${n} inset, - 0 ${q(i)} 0 0 ${n} inset; - `,transition:`all ${t.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}},tB=t=>{const{componentCls:e,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:o,actionsBg:a}=t;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:`${q(t.lineWidth)} ${t.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`},No()),{"& > li":{margin:r,color:t.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:t.calc(t.cardActionsIconSize).mul(2).equal(),fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer","&:hover":{color:t.colorPrimary,transition:`color ${t.motionDurationMid}`},[`a:not(${e}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:t.colorIcon,lineHeight:q(t.fontHeight),transition:`color ${t.motionDurationMid}`,"&:hover":{color:t.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:q(t.calc(i).mul(t.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${q(t.lineWidth)} ${t.lineType} ${o}`}}})},nB=t=>Object.assign(Object.assign({margin:`${q(t.calc(t.marginXXS).mul(-1).equal())} 0`,display:"flex"},No()),{"&-avatar":{paddingInlineEnd:t.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:t.marginXS}},"&-title":Object.assign({color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG},ba),"&-description":{color:t.colorTextDescription}}),rB=t=>{const{componentCls:e,colorFillAlter:n,headerPadding:r,bodyPadding:i}=t;return{[`${e}-head`]:{padding:`0 ${q(r)}`,background:n,"&-title":{fontSize:t.fontSize}},[`${e}-body`]:{padding:`${q(t.padding)} ${q(i)}`}}},iB=t=>{const{componentCls:e}=t;return{overflow:"hidden",[`${e}-body`]:{userSelect:"none"}}},oB=t=>{const{componentCls:e,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:o,bodyPadding:a,extraColor:s}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{position:"relative",background:t.colorBgContainer,borderRadius:t.borderRadiusLG,[`&:not(${e}-bordered)`]:{boxShadow:o},[`${e}-head`]:JD(t),[`${e}-extra`]:{marginInlineStart:"auto",color:s,fontWeight:"normal",fontSize:t.fontSize},[`${e}-body`]:Object.assign({padding:a,borderRadius:`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`},No()),[`${e}-grid`]:eB(t),[`${e}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`}},[`${e}-actions`]:tB(t),[`${e}-meta`]:nB(t)}),[`${e}-bordered`]:{border:`${q(t.lineWidth)} ${t.lineType} ${i}`,[`${e}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${e}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${t.motionDurationMid}, border-color ${t.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${e}-contain-grid`]:{borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0 `,[`${e}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${e}-loading) ${e}-body`]:{marginBlockStart:t.calc(t.lineWidth).mul(-1).equal(),marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),padding:0}},[`${e}-contain-tabs`]:{[`> div${e}-head`]:{minHeight:0,[`${e}-head-title, ${e}-extra`]:{paddingTop:r}}},[`${e}-type-inner`]:rB(t),[`${e}-loading`]:iB(t),[`${e}-rtl`]:{direction:"rtl"}}},aB=t=>{const{componentCls:e,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:o}=t;return{[`${e}-small`]:{[`> ${e}-head`]:{minHeight:i,padding:`0 ${q(r)}`,fontSize:o,[`> ${e}-head-wrapper`]:{[`> ${e}-extra`]:{fontSize:t.fontSize}}},[`> ${e}-body`]:{padding:n}},[`${e}-small${e}-contain-tabs`]:{[`> ${e}-head`]:{[`${e}-head-title, ${e}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},sB=t=>{var e,n;return{headerBg:"transparent",headerFontSize:t.fontSizeLG,headerFontSizeSM:t.fontSize,headerHeight:t.fontSizeLG*t.lineHeightLG+t.padding*2,headerHeightSM:t.fontSize*t.lineHeight+t.paddingXS*2,actionsBg:t.colorBgContainer,actionsLiMargin:`${t.paddingSM}px 0`,tabsMarginBottom:-t.padding-t.lineWidth,extraColor:t.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:(e=t.bodyPadding)!==null&&e!==void 0?e:t.paddingLG,headerPadding:(n=t.headerPadding)!==null&&n!==void 0?n:t.paddingLG}},lB=Zt("Card",t=>{const e=kt(t,{cardShadow:t.boxShadowCard,cardHeadPadding:t.padding,cardPaddingBase:t.paddingLG,cardActionsIconSize:t.fontSize});return[oB(e),aB(e)]},sB);var y1=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{actionClasses:e,actions:n=[],actionStyle:r}=t;return y("ul",{className:e,style:r},n.map((i,o)=>{const a=`action-${o}`;return y("li",{style:{width:`${100/n.length}%`},key:a},y("span",null,i))}))},uB=Se((t,e)=>{const{prefixCls:n,className:r,rootClassName:i,style:o,extra:a,headStyle:s={},bodyStyle:l={},title:c,loading:u,bordered:d,variant:f,size:h,type:p,cover:m,actions:g,tabList:v,children:O,activeTabKey:S,defaultActiveTabKey:x,tabBarExtraContent:b,hoverable:C,tabProps:$={},classNames:w,styles:P}=t,_=y1(t,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:T,direction:R,card:k}=fe(it),[I]=Ff("card",f,d),Q=ce=>{var te;(te=t.onTabChange)===null||te===void 0||te.call(t,ce)},M=ce=>{var te;return Z((te=k==null?void 0:k.classNames)===null||te===void 0?void 0:te[ce],w==null?void 0:w[ce])},E=ce=>{var te;return Object.assign(Object.assign({},(te=k==null?void 0:k.styles)===null||te===void 0?void 0:te[ce]),P==null?void 0:P[ce])},N=ge(()=>{let ce=!1;return Ao.forEach(O,te=>{(te==null?void 0:te.type)===gP&&(ce=!0)}),ce},[O]),z=T("card",n),[L,F,H]=lB(z),V=y(Ra,{loading:!0,active:!0,paragraph:{rows:4},title:!1},O),X=S!==void 0,B=Object.assign(Object.assign({},$),{[X?"activeKey":"defaultActiveKey"]:X?S:x,tabBarExtraContent:b});let G;const se=Dr(h),le=v?y(mP,Object.assign({size:!se||se==="default"?"large":se},B,{className:`${z}-head-tabs`,onChange:Q,items:v.map(ce=>{var{tab:te}=ce,Oe=y1(ce,["tab"]);return Object.assign({label:te},Oe)})})):null;if(c||a||le){const ce=Z(`${z}-head`,M("header")),te=Z(`${z}-head-title`,M("title")),Oe=Z(`${z}-extra`,M("extra")),ye=Object.assign(Object.assign({},s),E("header"));G=y("div",{className:ce,style:ye},y("div",{className:`${z}-head-wrapper`},c&&y("div",{className:te,style:E("title")},c),a&&y("div",{className:Oe,style:E("extra")},a)),le)}const me=Z(`${z}-cover`,M("cover")),ie=m?y("div",{className:me,style:E("cover")},m):null,ne=Z(`${z}-body`,M("body")),ue=Object.assign(Object.assign({},l),E("body")),de=y("div",{className:ne,style:ue},u?V:O),j=Z(`${z}-actions`,M("actions")),ee=g!=null&&g.length?y(cB,{actionClasses:j,actionStyle:E("actions"),actions:g}):null,he=cn(_,["onTabChange"]),ve=Z(z,k==null?void 0:k.className,{[`${z}-loading`]:u,[`${z}-bordered`]:I!=="borderless",[`${z}-hoverable`]:C,[`${z}-contain-grid`]:N,[`${z}-contain-tabs`]:v==null?void 0:v.length,[`${z}-${se}`]:se,[`${z}-type-${p}`]:!!p,[`${z}-rtl`]:R==="rtl"},r,i,F,H),Y=Object.assign(Object.assign({},k==null?void 0:k.style),o);return L(y("div",Object.assign({ref:e},he,{className:ve,style:Y}),G,ie,de,ee))});var dB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,avatar:r,title:i,description:o}=t,a=dB(t,["prefixCls","className","avatar","title","description"]),{getPrefixCls:s}=fe(it),l=s("card",e),c=Z(`${l}-meta`,n),u=r?y("div",{className:`${l}-meta-avatar`},r):null,d=i?y("div",{className:`${l}-meta-title`},i):null,f=o?y("div",{className:`${l}-meta-description`},o):null,h=d||f?y("div",{className:`${l}-meta-detail`},d,f):null;return y("div",Object.assign({},a,{className:c}),u,h)},Sa=uB;Sa.Grid=gP;Sa.Meta=fB;function hB(t,e,n){var r=n||{},i=r.noTrailing,o=i===void 0?!1:i,a=r.noLeading,s=a===void 0?!1:a,l=r.debounceMode,c=l===void 0?void 0:l,u,d=!1,f=0;function h(){u&&clearTimeout(u)}function p(g){var v=g||{},O=v.upcomingOnly,S=O===void 0?!1:O;h(),d=!S}function m(){for(var g=arguments.length,v=new Array(g),O=0;Ot?s?(f=Date.now(),o||(u=setTimeout(c?C:b,t))):b():o!==!0&&(u=setTimeout(c?C:b,c===void 0?t-x:t))}return m.cancel=p,m}function pB(t,e,n){var r={},i=r.atBegin,o=i===void 0?!1:i;return hB(t,e,{debounceMode:o!==!1})}const vP=bt({});var mB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:n,direction:r}=fe(it),{gutter:i,wrap:o}=fe(vP),{prefixCls:a,span:s,order:l,offset:c,push:u,pull:d,className:f,children:h,flex:p,style:m}=t,g=mB(t,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),v=n("col",a),[O,S,x]=q3(v),b={};let C={};gB.forEach(P=>{let _={};const T=t[P];typeof T=="number"?_.span=T:typeof T=="object"&&(_=T||{}),delete g[P],C=Object.assign(Object.assign({},C),{[`${v}-${P}-${_.span}`]:_.span!==void 0,[`${v}-${P}-order-${_.order}`]:_.order||_.order===0,[`${v}-${P}-offset-${_.offset}`]:_.offset||_.offset===0,[`${v}-${P}-push-${_.push}`]:_.push||_.push===0,[`${v}-${P}-pull-${_.pull}`]:_.pull||_.pull===0,[`${v}-rtl`]:r==="rtl"}),_.flex&&(C[`${v}-${P}-flex`]=!0,b[`--${v}-${P}-flex`]=S1(_.flex))});const $=Z(v,{[`${v}-${s}`]:s!==void 0,[`${v}-order-${l}`]:l,[`${v}-offset-${c}`]:c,[`${v}-push-${u}`]:u,[`${v}-pull-${d}`]:d},f,C,S,x),w={};if(i&&i[0]>0){const P=i[0]/2;w.paddingLeft=P,w.paddingRight=P}return p&&(w.flex=S1(p),o===!1&&!w.minWidth&&(w.minWidth=0)),O(y("div",Object.assign({},g,{style:Object.assign(Object.assign(Object.assign({},w),m),b),className:$,ref:e}),h))});function vB(t,e){const n=[void 0,void 0],r=Array.isArray(t)?t:[t,void 0],i=e||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((o,a)=>{if(typeof o=="object"&&o!==null)for(let s=0;s{if(typeof t=="string"&&r(t),typeof t=="object")for(let o=0;o{i()},[JSON.stringify(t),e]),n}const xs=Se((t,e)=>{const{prefixCls:n,justify:r,align:i,className:o,style:a,children:s,gutter:l=0,wrap:c}=t,u=OB(t,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:d,direction:f}=fe(it),h=C2(!0,null),p=x1(i,h),m=x1(r,h),g=d("row",n),[v,O,S]=Z3(g),x=vB(l,h),b=Z(g,{[`${g}-no-wrap`]:c===!1,[`${g}-${m}`]:m,[`${g}-${p}`]:p,[`${g}-rtl`]:f==="rtl"},o,O,S),C={},$=x[0]!=null&&x[0]>0?x[0]/-2:void 0;$&&(C.marginLeft=$,C.marginRight=$);const[w,P]=x;C.rowGap=P;const _=ge(()=>({gutter:[w,P],wrap:c}),[w,P,c]);return v(y(vP.Provider,{value:_},y("div",Object.assign({},u,{className:b,style:Object.assign(Object.assign({},C),a),ref:e}),s)))}),bB=t=>{const{componentCls:e}=t;return{[e]:{"&-horizontal":{[`&${e}`]:{"&-sm":{marginBlock:t.marginXS},"&-md":{marginBlock:t.margin}}}}}},yB=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:s}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{borderBlockStart:`${q(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${q(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${q(t.marginLG)} 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${q(t.dividerHorizontalWithTextGutterMargin)} 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${q(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${e}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${e}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${q(i)} 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${q(i)} 0 0`},[`&-horizontal${e}-with-text${e}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${e}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-start${e}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${e}-with-text-end${e}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:n}}})}},SB=t=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:t.marginXS}),xB=Zt("Divider",t=>{const e=kt(t,{dividerHorizontalWithTextGutterMargin:t.margin,sizePaddingEdgeHorizontal:0});return[yB(e),bB(e)]},SB,{unitless:{orientationMargin:!0}});var CB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:e,direction:n,className:r,style:i}=rr("divider"),{prefixCls:o,type:a="horizontal",orientation:s="center",orientationMargin:l,className:c,rootClassName:u,children:d,dashed:f,variant:h="solid",plain:p,style:m,size:g}=t,v=CB(t,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),O=e("divider",o),[S,x,b]=xB(O),C=Dr(g),$=$B[C],w=!!d,P=ge(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),_=P==="start"&&l!=null,T=P==="end"&&l!=null,R=Z(O,r,x,b,`${O}-${a}`,{[`${O}-with-text`]:w,[`${O}-with-text-${P}`]:w,[`${O}-dashed`]:!!f,[`${O}-${h}`]:h!=="solid",[`${O}-plain`]:!!p,[`${O}-rtl`]:n==="rtl",[`${O}-no-default-orientation-margin-start`]:_,[`${O}-no-default-orientation-margin-end`]:T,[`${O}-${$}`]:!!$},c,u),k=ge(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),I={marginInlineStart:_?k:void 0,marginInlineEnd:T?k:void 0};return S(y("div",Object.assign({className:R,style:Object.assign(Object.assign({},i),m)},v,{role:"separator"}),d&&a!=="vertical"&&y("span",{className:`${O}-inner-text`,style:I},d)))};function wB(t){return!!(t.addonBefore||t.addonAfter)}function PB(t){return!!(t.prefix||t.suffix||t.allowClear)}function C1(t,e,n){var r=e.cloneNode(!0),i=Object.create(t,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(r.selectionStart=e.selectionStart,r.selectionEnd=e.selectionEnd),r.setSelectionRange=function(){e.setSelectionRange.apply(e,arguments)},i}function Id(t,e,n,r){if(n){var i=e;if(e.type==="click"){i=C1(e,t,""),n(i);return}if(t.type!=="file"&&r!==void 0){i=C1(e,t,r),n(i);return}n(i)}}function OP(t,e){if(t){t.focus(e);var n=e||{},r=n.cursor;if(r){var i=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}}}var bP=oe.forwardRef(function(t,e){var n,r,i,o=t.inputElement,a=t.children,s=t.prefixCls,l=t.prefix,c=t.suffix,u=t.addonBefore,d=t.addonAfter,f=t.className,h=t.style,p=t.disabled,m=t.readOnly,g=t.focused,v=t.triggerFocus,O=t.allowClear,S=t.value,x=t.handleReset,b=t.hidden,C=t.classes,$=t.classNames,w=t.dataAttrs,P=t.styles,_=t.components,T=t.onClear,R=a??o,k=(_==null?void 0:_.affixWrapper)||"span",I=(_==null?void 0:_.groupWrapper)||"span",Q=(_==null?void 0:_.wrapper)||"span",M=(_==null?void 0:_.groupAddon)||"span",E=U(null),N=function(j){var ee;(ee=E.current)!==null&&ee!==void 0&&ee.contains(j.target)&&(v==null||v())},z=PB(t),L=Xn(R,{value:S,className:Z((n=R.props)===null||n===void 0?void 0:n.className,!z&&($==null?void 0:$.variant))||null}),F=U(null);if(oe.useImperativeHandle(e,function(){return{nativeElement:F.current||E.current}}),z){var H=null;if(O){var V=!p&&!m&&S,X="".concat(s,"-clear-icon"),B=Je(O)==="object"&&O!==null&&O!==void 0&&O.clearIcon?O.clearIcon:"✖";H=oe.createElement("button",{type:"button",tabIndex:-1,onClick:function(j){x==null||x(j),T==null||T()},onMouseDown:function(j){return j.preventDefault()},className:Z(X,D(D({},"".concat(X,"-hidden"),!V),"".concat(X,"-has-suffix"),!!c))},B)}var G="".concat(s,"-affix-wrapper"),se=Z(G,D(D(D(D(D({},"".concat(s,"-disabled"),p),"".concat(G,"-disabled"),p),"".concat(G,"-focused"),g),"".concat(G,"-readonly"),m),"".concat(G,"-input-with-clear-btn"),c&&O&&S),C==null?void 0:C.affixWrapper,$==null?void 0:$.affixWrapper,$==null?void 0:$.variant),re=(c||O)&&oe.createElement("span",{className:Z("".concat(s,"-suffix"),$==null?void 0:$.suffix),style:P==null?void 0:P.suffix},H,c);L=oe.createElement(k,Ce({className:se,style:P==null?void 0:P.affixWrapper,onClick:N},w==null?void 0:w.affixWrapper,{ref:E}),l&&oe.createElement("span",{className:Z("".concat(s,"-prefix"),$==null?void 0:$.prefix),style:P==null?void 0:P.prefix},l),L,re)}if(wB(t)){var le="".concat(s,"-group"),me="".concat(le,"-addon"),ie="".concat(le,"-wrapper"),ne=Z("".concat(s,"-wrapper"),le,C==null?void 0:C.wrapper,$==null?void 0:$.wrapper),ue=Z(ie,D({},"".concat(ie,"-disabled"),p),C==null?void 0:C.group,$==null?void 0:$.groupWrapper);L=oe.createElement(I,{className:ue,ref:F},oe.createElement(Q,{className:ne},u&&oe.createElement(M,{className:me},u),L,d&&oe.createElement(M,{className:me},d)))}return oe.cloneElement(L,{className:Z((r=L.props)===null||r===void 0?void 0:r.className,f)||null,style:W(W({},(i=L.props)===null||i===void 0?void 0:i.style),h),hidden:b})}),_B=["show"];function yP(t,e){return ge(function(){var n={};e&&(n.show=Je(e)==="object"&&e.formatter?e.formatter:!!e),n=W(W({},n),t);var r=n,i=r.show,o=ut(r,_B);return W(W({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(a){return a.length}})},[t,e])}var TB=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],kB=Se(function(t,e){var n=t.autoComplete,r=t.onChange,i=t.onFocus,o=t.onBlur,a=t.onPressEnter,s=t.onKeyDown,l=t.onKeyUp,c=t.prefixCls,u=c===void 0?"rc-input":c,d=t.disabled,f=t.htmlSize,h=t.className,p=t.maxLength,m=t.suffix,g=t.showCount,v=t.count,O=t.type,S=O===void 0?"text":O,x=t.classes,b=t.classNames,C=t.styles,$=t.onCompositionStart,w=t.onCompositionEnd,P=ut(t,TB),_=J(!1),T=ae(_,2),R=T[0],k=T[1],I=U(!1),Q=U(!1),M=U(null),E=U(null),N=function(pe){M.current&&OP(M.current,pe)},z=_n(t.defaultValue,{value:t.value}),L=ae(z,2),F=L[0],H=L[1],V=F==null?"":String(F),X=J(null),B=ae(X,2),G=B[0],se=B[1],re=yP(v,g),le=re.max||p,me=re.strategy(V),ie=!!le&&me>le;Yt(e,function(){var ye;return{focus:N,blur:function(){var Qe;(Qe=M.current)===null||Qe===void 0||Qe.blur()},setSelectionRange:function(Qe,Me,De){var we;(we=M.current)===null||we===void 0||we.setSelectionRange(Qe,Me,De)},select:function(){var Qe;(Qe=M.current)===null||Qe===void 0||Qe.select()},input:M.current,nativeElement:((ye=E.current)===null||ye===void 0?void 0:ye.nativeElement)||M.current}}),be(function(){Q.current&&(Q.current=!1),k(function(ye){return ye&&d?!1:ye})},[d]);var ne=function(pe,Qe,Me){var De=Qe;if(!I.current&&re.exceedFormatter&&re.max&&re.strategy(Qe)>re.max){if(De=re.exceedFormatter(Qe,{max:re.max}),Qe!==De){var we,Ie;se([((we=M.current)===null||we===void 0?void 0:we.selectionStart)||0,((Ie=M.current)===null||Ie===void 0?void 0:Ie.selectionEnd)||0])}}else if(Me.source==="compositionEnd")return;H(De),M.current&&Id(M.current,pe,r,De)};be(function(){if(G){var ye;(ye=M.current)===null||ye===void 0||ye.setSelectionRange.apply(ye,$e(G))}},[G]);var ue=function(pe){ne(pe,pe.target.value,{source:"change"})},de=function(pe){I.current=!1,ne(pe,pe.currentTarget.value,{source:"compositionEnd"}),w==null||w(pe)},j=function(pe){a&&pe.key==="Enter"&&!Q.current&&(Q.current=!0,a(pe)),s==null||s(pe)},ee=function(pe){pe.key==="Enter"&&(Q.current=!1),l==null||l(pe)},he=function(pe){k(!0),i==null||i(pe)},ve=function(pe){Q.current&&(Q.current=!1),k(!1),o==null||o(pe)},Y=function(pe){H(""),N(),M.current&&Id(M.current,pe,r)},ce=ie&&"".concat(u,"-out-of-range"),te=function(){var pe=cn(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return oe.createElement("input",Ce({autoComplete:n},pe,{onChange:ue,onFocus:he,onBlur:ve,onKeyDown:j,onKeyUp:ee,className:Z(u,D({},"".concat(u,"-disabled"),d),b==null?void 0:b.input),style:C==null?void 0:C.input,ref:M,size:f,type:S,onCompositionStart:function(Me){I.current=!0,$==null||$(Me)},onCompositionEnd:de}))},Oe=function(){var pe=Number(le)>0;if(m||re.show){var Qe=re.showFormatter?re.showFormatter({value:V,count:me,maxLength:le}):"".concat(me).concat(pe?" / ".concat(le):"");return oe.createElement(oe.Fragment,null,re.show&&oe.createElement("span",{className:Z("".concat(u,"-show-count-suffix"),D({},"".concat(u,"-show-count-has-suffix"),!!m),b==null?void 0:b.count),style:W({},C==null?void 0:C.count)},Qe),m)}return null};return oe.createElement(bP,Ce({},P,{prefixCls:u,className:Z(h,ce),handleReset:Y,value:V,focused:R,triggerFocus:N,suffix:Oe(),disabled:d,classes:x,classNames:b,styles:C,ref:E}),te())});const SP=t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:oe.createElement(zs,null)}),e};function xP(t,e){const n=U([]),r=()=>{n.current.push(setTimeout(()=>{var i,o,a,s;!((i=t.current)===null||i===void 0)&&i.input&&((o=t.current)===null||o===void 0?void 0:o.input.getAttribute("type"))==="password"&&(!((a=t.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=t.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return be(()=>(e&&r(),()=>n.current.forEach(i=>{i&&clearTimeout(i)})),[]),r}function RB(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var IB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,bordered:r=!0,status:i,size:o,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:h,style:p,styles:m,rootClassName:g,onChange:v,classNames:O,variant:S}=t,x=IB(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:b,direction:C,allowClear:$,autoComplete:w,className:P,style:_,classNames:T,styles:R}=rr("input"),k=b("input",n),I=U(null),Q=$r(k),[M,E,N]=cP(k,g),[z]=uP(k,Q),{compactSize:L,compactItemClassnames:F}=js(k,C),H=Dr(ve=>{var Y;return(Y=o??L)!==null&&Y!==void 0?Y:ve}),V=oe.useContext(qi),X=a??V,{status:B,hasFeedback:G,feedbackIcon:se}=fe(Jr),re=Wf(B,i),le=RB(t)||!!G;U(le);const me=xP(I,!0),ie=ve=>{me(),s==null||s(ve)},ne=ve=>{me(),l==null||l(ve)},ue=ve=>{me(),v==null||v(ve)},de=(G||c)&&oe.createElement(oe.Fragment,null,c,G&&se),j=SP(u??$),[ee,he]=Ff("input",S,r);return M(z(oe.createElement(kB,Object.assign({ref:pr(e,I),prefixCls:k,autoComplete:w},x,{disabled:X,onBlur:ie,onFocus:ne,style:Object.assign(Object.assign({},_),p),styles:Object.assign(Object.assign({},R),m),suffix:de,allowClear:j,className:Z(h,g,N,Q,F,P),onChange:ue,addonBefore:f&&oe.createElement(bs,{form:!0,space:!0},f),addonAfter:d&&oe.createElement(bs,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},O),T),{input:Z({[`${k}-sm`]:H==="small",[`${k}-lg`]:H==="large",[`${k}-rtl`]:C==="rtl"},O==null?void 0:O.input,T.input,E),variant:Z({[`${k}-${ee}`]:he},Pd(k,re)),affixWrapper:Z({[`${k}-affix-wrapper-sm`]:H==="small",[`${k}-affix-wrapper-lg`]:H==="large",[`${k}-affix-wrapper-rtl`]:C==="rtl"},E),wrapper:Z({[`${k}-group-rtl`]:C==="rtl"},E),groupWrapper:Z({[`${k}-group-wrapper-sm`]:H==="small",[`${k}-group-wrapper-lg`]:H==="large",[`${k}-group-wrapper-rtl`]:C==="rtl",[`${k}-group-wrapper-${ee}`]:he},Pd(`${k}-group-wrapper`,re,G),E)})}))))});function $1(t){return["small","middle","large"].includes(t)}function w1(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const CP=oe.createContext({latestIndex:0}),MB=CP.Provider,EB=({className:t,index:e,children:n,split:r,style:i})=>{const{latestIndex:o}=fe(CP);return n==null?null:y(At,null,y("div",{className:t,style:i},n),e{var n;const{getPrefixCls:r,direction:i,size:o,className:a,style:s,classNames:l,styles:c}=rr("space"),{size:u=o??"small",align:d,className:f,rootClassName:h,children:p,direction:m="horizontal",prefixCls:g,split:v,style:O,wrap:S=!1,classNames:x,styles:b}=t,C=AB(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[$,w]=Array.isArray(u)?u:[u,u],P=$1(w),_=$1($),T=w1(w),R=w1($),k=nr(p,{keepEmpty:!0}),I=d===void 0&&m==="horizontal"?"center":d,Q=r("space",g),[M,E,N]=iw(Q),z=Z(Q,a,E,`${Q}-${m}`,{[`${Q}-rtl`]:i==="rtl",[`${Q}-align-${I}`]:I,[`${Q}-gap-row-${w}`]:P,[`${Q}-gap-col-${$}`]:_},f,h,N),L=Z(`${Q}-item`,(n=x==null?void 0:x.item)!==null&&n!==void 0?n:l.item);let F=0;const H=k.map((B,G)=>{var se;B!=null&&(F=G);const re=(B==null?void 0:B.key)||`${L}-${G}`;return y(EB,{className:L,key:re,index:G,split:v,style:(se=b==null?void 0:b.item)!==null&&se!==void 0?se:c.item},B)}),V=ge(()=>({latestIndex:F}),[F]);if(k.length===0)return null;const X={};return S&&(X.flexWrap="wrap"),!_&&R&&(X.columnGap=$),!P&&T&&(X.rowGap=w),M(y("div",Object.assign({ref:e,className:z,style:Object.assign(Object.assign(Object.assign({},X),s),O)},C),y(MB,{value:V},H)))}),jo=QB;jo.Compact=kA;var NB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPopupContainer:e,getPrefixCls:n,direction:r}=fe(it),{prefixCls:i,type:o="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:h,arrow:p,autoFocus:m,overlay:g,trigger:v,align:O,open:S,onOpenChange:x,placement:b,getPopupContainer:C,href:$,icon:w=y(x0,null),title:P,buttonsRender:_=ie=>ie,mouseEnterDelay:T,mouseLeaveDelay:R,overlayClassName:k,overlayStyle:I,destroyOnHidden:Q,destroyPopupOnHide:M,dropdownRender:E,popupRender:N}=t,z=NB(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),L=n("dropdown",i),F=`${L}-button`,V={menu:h,arrow:p,autoFocus:m,align:O,disabled:s,trigger:s?[]:v,onOpenChange:x,getPopupContainer:C||e,mouseEnterDelay:T,mouseLeaveDelay:R,overlayClassName:k,overlayStyle:I,destroyOnHidden:Q,popupRender:N||E},{compactSize:X,compactItemClassnames:B}=js(L,r),G=Z(F,B,f);"destroyPopupOnHide"in t&&(V.destroyPopupOnHide=M),"overlay"in t&&(V.overlay=g),"open"in t&&(V.open=S),"placement"in t?V.placement=b:V.placement=r==="rtl"?"bottomLeft":"bottomRight";const se=y(vt,{type:o,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:$,title:P},d),re=y(vt,{type:o,danger:a,icon:w}),[le,me]=_([se,re]);return y(jo.Compact,Object.assign({className:G,size:X,block:!0},z),le,y(qf,Object.assign({},V),me))};$P.__ANT_BUTTON=!0;const w0=qf;w0.Button=$P;function zB(t){return t==null?null:typeof t=="object"&&!Kt(t)?t:{title:t}}var LB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},jB=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:LB}))},DB=Se(jB);function Md(t){const[e,n]=J(t);return be(()=>{const r=setTimeout(()=>{n(t)},t.length?0:10);return()=>{clearTimeout(r)}},[t]),e}const BB=t=>{const{componentCls:e}=t,n=`${e}-show-help`,r=`${e}-show-help-item`;return{[n]:{transition:`opacity ${t.motionDurationFast} ${t.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:`height ${t.motionDurationFast} ${t.motionEaseInOut}, + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${e}-tabs-top`]:{clear:"both",marginBottom:o,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,"&-bar":{borderBottom:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorderSecondary}`}}})},mB=t=>{const{cardPaddingBase:e,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=t;return{width:"33.33%",padding:e,border:0,borderRadius:0,boxShadow:` + ${V(i)} 0 0 0 ${n}, + 0 ${V(i)} 0 0 ${n}, + ${V(i)} ${V(i)} 0 0 ${n}, + ${V(i)} 0 0 0 ${n} inset, + 0 ${V(i)} 0 0 ${n} inset; + `,transition:`all ${t.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}},pB=t=>{const{componentCls:e,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:o,actionsBg:a}=t;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:`${V(t.lineWidth)} ${t.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${V(t.borderRadiusLG)} ${V(t.borderRadiusLG)}`},zo()),{"& > li":{margin:r,color:t.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:t.calc(t.cardActionsIconSize).mul(2).equal(),fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer","&:hover":{color:t.colorPrimary,transition:`color ${t.motionDurationMid}`},[`a:not(${e}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:t.colorIcon,lineHeight:V(t.fontHeight),transition:`color ${t.motionDurationMid}`,"&:hover":{color:t.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:V(t.calc(i).mul(t.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${V(t.lineWidth)} ${t.lineType} ${o}`}}})},gB=t=>Object.assign(Object.assign({margin:`${V(t.calc(t.marginXXS).mul(-1).equal())} 0`,display:"flex"},zo()),{"&-avatar":{paddingInlineEnd:t.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:t.marginXS}},"&-title":Object.assign({color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG},Sa),"&-description":{color:t.colorTextDescription}}),vB=t=>{const{componentCls:e,colorFillAlter:n,headerPadding:r,bodyPadding:i}=t;return{[`${e}-head`]:{padding:`0 ${V(r)}`,background:n,"&-title":{fontSize:t.fontSize}},[`${e}-body`]:{padding:`${V(t.padding)} ${V(i)}`}}},OB=t=>{const{componentCls:e}=t;return{overflow:"hidden",[`${e}-body`]:{userSelect:"none"}}},bB=t=>{const{componentCls:e,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:o,bodyPadding:a,extraColor:s}=t;return{[e]:Object.assign(Object.assign({},Sn(t)),{position:"relative",background:t.colorBgContainer,borderRadius:t.borderRadiusLG,[`&:not(${e}-bordered)`]:{boxShadow:o},[`${e}-head`]:hB(t),[`${e}-extra`]:{marginInlineStart:"auto",color:s,fontWeight:"normal",fontSize:t.fontSize},[`${e}-body`]:Object.assign({padding:a,borderRadius:`0 0 ${V(t.borderRadiusLG)} ${V(t.borderRadiusLG)}`},zo()),[`${e}-grid`]:mB(t),[`${e}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${V(t.borderRadiusLG)} ${V(t.borderRadiusLG)} 0 0`}},[`${e}-actions`]:pB(t),[`${e}-meta`]:gB(t)}),[`${e}-bordered`]:{border:`${V(t.lineWidth)} ${t.lineType} ${i}`,[`${e}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${e}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${t.motionDurationMid}, border-color ${t.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${e}-contain-grid`]:{borderRadius:`${V(t.borderRadiusLG)} ${V(t.borderRadiusLG)} 0 0 `,[`${e}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${e}-loading) ${e}-body`]:{marginBlockStart:t.calc(t.lineWidth).mul(-1).equal(),marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),padding:0}},[`${e}-contain-tabs`]:{[`> div${e}-head`]:{minHeight:0,[`${e}-head-title, ${e}-extra`]:{paddingTop:r}}},[`${e}-type-inner`]:vB(t),[`${e}-loading`]:OB(t),[`${e}-rtl`]:{direction:"rtl"}}},yB=t=>{const{componentCls:e,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:o}=t;return{[`${e}-small`]:{[`> ${e}-head`]:{minHeight:i,padding:`0 ${V(r)}`,fontSize:o,[`> ${e}-head-wrapper`]:{[`> ${e}-extra`]:{fontSize:t.fontSize}}},[`> ${e}-body`]:{padding:n}},[`${e}-small${e}-contain-tabs`]:{[`> ${e}-head`]:{[`${e}-head-title, ${e}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},SB=t=>{var e,n;return{headerBg:"transparent",headerFontSize:t.fontSizeLG,headerFontSizeSM:t.fontSize,headerHeight:t.fontSizeLG*t.lineHeightLG+t.padding*2,headerHeightSM:t.fontSize*t.lineHeight+t.paddingXS*2,actionsBg:t.colorBgContainer,actionsLiMargin:`${t.paddingSM}px 0`,tabsMarginBottom:-t.padding-t.lineWidth,extraColor:t.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:(e=t.bodyPadding)!==null&&e!==void 0?e:t.paddingLG,headerPadding:(n=t.headerPadding)!==null&&n!==void 0?n:t.paddingLG}},xB=Ft("Card",t=>{const e=It(t,{cardShadow:t.boxShadowCard,cardHeadPadding:t.padding,cardPaddingBase:t.paddingLG,cardActionsIconSize:t.fontSize});return[bB(e),yB(e)]},SB);var MS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{actionClasses:e,actions:n=[],actionStyle:r}=t;return b("ul",{className:e,style:r},n.map((i,o)=>{const a=`action-${o}`;return b("li",{style:{width:`${100/n.length}%`},key:a},b("span",null,i))}))},CB=Se((t,e)=>{const{prefixCls:n,className:r,rootClassName:i,style:o,extra:a,headStyle:s={},bodyStyle:l={},title:c,loading:u,bordered:d,variant:f,size:h,type:m,cover:p,actions:g,tabList:O,children:v,activeTabKey:y,defaultActiveTabKey:S,tabBarExtraContent:x,hoverable:$,tabProps:C={},classNames:P,styles:w}=t,_=MS(t,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:R,direction:I,card:T}=he(lt),[M]=Kf("card",f,d),Q=ae=>{var pe;(pe=t.onTabChange)===null||pe===void 0||pe.call(t,ae)},E=ae=>{var pe;return U((pe=T==null?void 0:T.classNames)===null||pe===void 0?void 0:pe[ae],P==null?void 0:P[ae])},k=ae=>{var pe;return Object.assign(Object.assign({},(pe=T==null?void 0:T.styles)===null||pe===void 0?void 0:pe[ae]),w==null?void 0:w[ae])},z=ve(()=>{let ae=!1;return wi.forEach(v,pe=>{(pe==null?void 0:pe.type)===RP&&(ae=!0)}),ae},[v]),L=R("card",n),[B,F,H]=xB(L),X=b(Aa,{loading:!0,active:!0,paragraph:{rows:4},title:!1},v),q=y!==void 0,N=Object.assign(Object.assign({},C),{[q?"activeKey":"defaultActiveKey"]:q?y:S,tabBarExtraContent:x});let j;const oe=br(h),se=O?b(TP,Object.assign({size:!oe||oe==="default"?"large":oe},N,{className:`${L}-head-tabs`,onChange:Q,items:O.map(ae=>{var{tab:pe}=ae,Oe=MS(ae,["tab"]);return Object.assign({label:pe},Oe)})})):null;if(c||a||se){const ae=U(`${L}-head`,E("header")),pe=U(`${L}-head-title`,E("title")),Oe=U(`${L}-extra`,E("extra")),be=Object.assign(Object.assign({},s),k("header"));j=b("div",{className:ae,style:be},b("div",{className:`${L}-head-wrapper`},c&&b("div",{className:pe,style:k("title")},c),a&&b("div",{className:Oe,style:k("extra")},a)),se)}const fe=U(`${L}-cover`,E("cover")),re=p?b("div",{className:fe,style:k("cover")},p):null,J=U(`${L}-body`,E("body")),ue=Object.assign(Object.assign({},l),k("body")),de=b("div",{className:J,style:ue},u?X:v),D=U(`${L}-actions`,E("actions")),Y=g!=null&&g.length?b($B,{actionClasses:D,actionStyle:k("actions"),actions:g}):null,me=pn(_,["onTabChange"]),G=U(L,T==null?void 0:T.className,{[`${L}-loading`]:u,[`${L}-bordered`]:M!=="borderless",[`${L}-hoverable`]:$,[`${L}-contain-grid`]:z,[`${L}-contain-tabs`]:O==null?void 0:O.length,[`${L}-${oe}`]:oe,[`${L}-type-${m}`]:!!m,[`${L}-rtl`]:I==="rtl"},r,i,F,H),ce=Object.assign(Object.assign({},T==null?void 0:T.style),o);return B(b("div",Object.assign({ref:e},me,{className:G,style:ce}),j,re,de,Y))});var wB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,avatar:r,title:i,description:o}=t,a=wB(t,["prefixCls","className","avatar","title","description"]),{getPrefixCls:s}=he(lt),l=s("card",e),c=U(`${l}-meta`,n),u=r?b("div",{className:`${l}-meta-avatar`},r):null,d=i?b("div",{className:`${l}-meta-title`},i):null,f=o?b("div",{className:`${l}-meta-description`},o):null,h=d||f?b("div",{className:`${l}-meta-detail`},d,f):null;return b("div",Object.assign({},a,{className:c}),u,h)},$a=CB;$a.Grid=RP;$a.Meta=PB;function _B(t,e,n){var r=n||{},i=r.noTrailing,o=i===void 0?!1:i,a=r.noLeading,s=a===void 0?!1:a,l=r.debounceMode,c=l===void 0?void 0:l,u,d=!1,f=0;function h(){u&&clearTimeout(u)}function m(g){var O=g||{},v=O.upcomingOnly,y=v===void 0?!1:v;h(),d=!y}function p(){for(var g=arguments.length,O=new Array(g),v=0;vt?s?(f=Date.now(),o||(u=setTimeout(c?$:x,t))):x():o!==!0&&(u=setTimeout(c?$:x,c===void 0?t-S:t))}return p.cancel=m,p}function TB(t,e,n){var r={},i=r.atBegin,o=i===void 0?!1:i;return _B(t,e,{debounceMode:o!==!1})}const IP=Tt({});var RB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:n,direction:r}=he(lt),{gutter:i,wrap:o}=he(IP),{prefixCls:a,span:s,order:l,offset:c,push:u,pull:d,className:f,children:h,flex:m,style:p}=t,g=RB(t,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),O=n("col",a),[v,y,S]=cz(O),x={};let $={};IB.forEach(w=>{let _={};const R=t[w];typeof R=="number"?_.span=R:typeof R=="object"&&(_=R||{}),delete g[w],$=Object.assign(Object.assign({},$),{[`${O}-${w}-${_.span}`]:_.span!==void 0,[`${O}-${w}-order-${_.order}`]:_.order||_.order===0,[`${O}-${w}-offset-${_.offset}`]:_.offset||_.offset===0,[`${O}-${w}-push-${_.push}`]:_.push||_.push===0,[`${O}-${w}-pull-${_.pull}`]:_.pull||_.pull===0,[`${O}-rtl`]:r==="rtl"}),_.flex&&($[`${O}-${w}-flex`]=!0,x[`--${O}-${w}-flex`]=ES(_.flex))});const C=U(O,{[`${O}-${s}`]:s!==void 0,[`${O}-order-${l}`]:l,[`${O}-offset-${c}`]:c,[`${O}-push-${u}`]:u,[`${O}-pull-${d}`]:d},f,$,y,S),P={};if(i&&i[0]>0){const w=i[0]/2;P.paddingLeft=w,P.paddingRight=w}return m&&(P.flex=ES(m),o===!1&&!P.minWidth&&(P.minWidth=0)),v(b("div",Object.assign({},g,{style:Object.assign(Object.assign(Object.assign({},P),p),x),className:C,ref:e}),h))});function MB(t,e){const n=[void 0,void 0],r=Array.isArray(t)?t:[t,void 0],i=e||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((o,a)=>{if(typeof o=="object"&&o!==null)for(let s=0;s{if(typeof t=="string"&&r(t),typeof t=="object")for(let o=0;o{i()},[JSON.stringify(t),e]),n}const Ca=Se((t,e)=>{const{prefixCls:n,justify:r,align:i,className:o,style:a,children:s,gutter:l=0,wrap:c}=t,u=EB(t,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:d,direction:f}=he(lt),h=Jf(!0,null),m=kS(i,h),p=kS(r,h),g=d("row",n),[O,v,y]=lz(g),S=MB(l,h),x=U(g,{[`${g}-no-wrap`]:c===!1,[`${g}-${p}`]:p,[`${g}-${m}`]:m,[`${g}-rtl`]:f==="rtl"},o,v,y),$={},C=S[0]!=null&&S[0]>0?S[0]/-2:void 0;C&&($.marginLeft=C,$.marginRight=C);const[P,w]=S;$.rowGap=w;const _=ve(()=>({gutter:[P,w],wrap:c}),[P,w,c]);return O(b(IP.Provider,{value:_},b("div",Object.assign({},u,{className:x,style:Object.assign(Object.assign({},$),a),ref:e}),s)))}),kB=t=>{const{componentCls:e}=t;return{[e]:{"&-horizontal":{[`&${e}`]:{"&-sm":{marginBlock:t.marginXS},"&-md":{marginBlock:t.margin}}}}}},AB=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:s}=t;return{[e]:Object.assign(Object.assign({},Sn(t)),{borderBlockStart:`${V(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${V(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${V(t.marginLG)} 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${V(t.dividerHorizontalWithTextGutterMargin)} 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${V(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${e}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${e}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${V(i)} 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${V(i)} 0 0`},[`&-horizontal${e}-with-text${e}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${e}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-start${e}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${e}-with-text-end${e}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:n}}})}},QB=t=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:t.marginXS}),NB=Ft("Divider",t=>{const e=It(t,{dividerHorizontalWithTextGutterMargin:t.margin,sizePaddingEdgeHorizontal:0});return[AB(e),kB(e)]},QB,{unitless:{orientationMargin:!0}});var zB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:e,direction:n,className:r,style:i}=Zn("divider"),{prefixCls:o,type:a="horizontal",orientation:s="center",orientationMargin:l,className:c,rootClassName:u,children:d,dashed:f,variant:h="solid",plain:m,style:p,size:g}=t,O=zB(t,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),v=e("divider",o),[y,S,x]=NB(v),$=br(g),C=jB[$],P=!!d,w=ve(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),_=w==="start"&&l!=null,R=w==="end"&&l!=null,I=U(v,r,S,x,`${v}-${a}`,{[`${v}-with-text`]:P,[`${v}-with-text-${w}`]:P,[`${v}-dashed`]:!!f,[`${v}-${h}`]:h!=="solid",[`${v}-plain`]:!!m,[`${v}-rtl`]:n==="rtl",[`${v}-no-default-orientation-margin-start`]:_,[`${v}-no-default-orientation-margin-end`]:R,[`${v}-${C}`]:!!C},c,u),T=ve(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),M={marginInlineStart:_?T:void 0,marginInlineEnd:R?T:void 0};return y(b("div",Object.assign({className:I,style:Object.assign(Object.assign({},i),p)},O,{role:"separator"}),d&&a!=="vertical"&&b("span",{className:`${v}-inner-text`,style:M},d)))};function LB(t){return!!(t.addonBefore||t.addonAfter)}function DB(t){return!!(t.prefix||t.suffix||t.allowClear)}function AS(t,e,n){var r=e.cloneNode(!0),i=Object.create(t,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(r.selectionStart=e.selectionStart,r.selectionEnd=e.selectionEnd),r.setSelectionRange=function(){e.setSelectionRange.apply(e,arguments)},i}function Ld(t,e,n,r){if(n){var i=e;if(e.type==="click"){i=AS(e,t,""),n(i);return}if(t.type!=="file"&&r!==void 0){i=AS(e,t,r),n(i);return}n(i)}}function MP(t,e){if(t){t.focus(e);var n=e||{},r=n.cursor;if(r){var i=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}}}var EP=K.forwardRef(function(t,e){var n,r,i,o=t.inputElement,a=t.children,s=t.prefixCls,l=t.prefix,c=t.suffix,u=t.addonBefore,d=t.addonAfter,f=t.className,h=t.style,m=t.disabled,p=t.readOnly,g=t.focused,O=t.triggerFocus,v=t.allowClear,y=t.value,S=t.handleReset,x=t.hidden,$=t.classes,C=t.classNames,P=t.dataAttrs,w=t.styles,_=t.components,R=t.onClear,I=a??o,T=(_==null?void 0:_.affixWrapper)||"span",M=(_==null?void 0:_.groupWrapper)||"span",Q=(_==null?void 0:_.wrapper)||"span",E=(_==null?void 0:_.groupAddon)||"span",k=ne(null),z=function(D){var Y;(Y=k.current)!==null&&Y!==void 0&&Y.contains(D.target)&&(O==null||O())},L=DB(t),B=Un(I,{value:y,className:U((n=I.props)===null||n===void 0?void 0:n.className,!L&&(C==null?void 0:C.variant))||null}),F=ne(null);if(K.useImperativeHandle(e,function(){return{nativeElement:F.current||k.current}}),L){var H=null;if(v){var X=!m&&!p&&y,q="".concat(s,"-clear-icon"),N=nt(v)==="object"&&v!==null&&v!==void 0&&v.clearIcon?v.clearIcon:"✖";H=K.createElement("button",{type:"button",tabIndex:-1,onClick:function(D){S==null||S(D),R==null||R()},onMouseDown:function(D){return D.preventDefault()},className:U(q,W(W({},"".concat(q,"-hidden"),!X),"".concat(q,"-has-suffix"),!!c))},N)}var j="".concat(s,"-affix-wrapper"),oe=U(j,W(W(W(W(W({},"".concat(s,"-disabled"),m),"".concat(j,"-disabled"),m),"".concat(j,"-focused"),g),"".concat(j,"-readonly"),p),"".concat(j,"-input-with-clear-btn"),c&&v&&y),$==null?void 0:$.affixWrapper,C==null?void 0:C.affixWrapper,C==null?void 0:C.variant),ee=(c||v)&&K.createElement("span",{className:U("".concat(s,"-suffix"),C==null?void 0:C.suffix),style:w==null?void 0:w.suffix},H,c);B=K.createElement(T,xe({className:oe,style:w==null?void 0:w.affixWrapper,onClick:z},P==null?void 0:P.affixWrapper,{ref:k}),l&&K.createElement("span",{className:U("".concat(s,"-prefix"),C==null?void 0:C.prefix),style:w==null?void 0:w.prefix},l),B,ee)}if(LB(t)){var se="".concat(s,"-group"),fe="".concat(se,"-addon"),re="".concat(se,"-wrapper"),J=U("".concat(s,"-wrapper"),se,$==null?void 0:$.wrapper,C==null?void 0:C.wrapper),ue=U(re,W({},"".concat(re,"-disabled"),m),$==null?void 0:$.group,C==null?void 0:C.groupWrapper);B=K.createElement(M,{className:ue,ref:F},K.createElement(Q,{className:J},u&&K.createElement(E,{className:fe},u),B,d&&K.createElement(E,{className:fe},d)))}return K.cloneElement(B,{className:U((r=B.props)===null||r===void 0?void 0:r.className,f)||null,style:Z(Z({},(i=B.props)===null||i===void 0?void 0:i.style),h),hidden:x})}),BB=["show"];function kP(t,e){return ve(function(){var n={};e&&(n.show=nt(e)==="object"&&e.formatter?e.formatter:!!e),n=Z(Z({},n),t);var r=n,i=r.show,o=gt(r,BB);return Z(Z({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(a){return a.length}})},[t,e])}var WB=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],HB=Se(function(t,e){var n=t.autoComplete,r=t.onChange,i=t.onFocus,o=t.onBlur,a=t.onPressEnter,s=t.onKeyDown,l=t.onKeyUp,c=t.prefixCls,u=c===void 0?"rc-input":c,d=t.disabled,f=t.htmlSize,h=t.className,m=t.maxLength,p=t.suffix,g=t.showCount,O=t.count,v=t.type,y=v===void 0?"text":v,S=t.classes,x=t.classNames,$=t.styles,C=t.onCompositionStart,P=t.onCompositionEnd,w=gt(t,WB),_=te(!1),R=le(_,2),I=R[0],T=R[1],M=ne(!1),Q=ne(!1),E=ne(null),k=ne(null),z=function(ge){E.current&&MP(E.current,ge)},L=Pn(t.defaultValue,{value:t.value}),B=le(L,2),F=B[0],H=B[1],X=F==null?"":String(F),q=te(null),N=le(q,2),j=N[0],oe=N[1],ee=kP(O,g),se=ee.max||m,fe=ee.strategy(X),re=!!se&&fe>se;Jt(e,function(){var be;return{focus:z,blur:function(){var Me;(Me=E.current)===null||Me===void 0||Me.blur()},setSelectionRange:function(Me,Ie,He){var Ae;(Ae=E.current)===null||Ae===void 0||Ae.setSelectionRange(Me,Ie,He)},select:function(){var Me;(Me=E.current)===null||Me===void 0||Me.select()},input:E.current,nativeElement:((be=k.current)===null||be===void 0?void 0:be.nativeElement)||E.current}}),ye(function(){Q.current&&(Q.current=!1),T(function(be){return be&&d?!1:be})},[d]);var J=function(ge,Me,Ie){var He=Me;if(!M.current&&ee.exceedFormatter&&ee.max&&ee.strategy(Me)>ee.max){if(He=ee.exceedFormatter(Me,{max:ee.max}),Me!==He){var Ae,Ee;oe([((Ae=E.current)===null||Ae===void 0?void 0:Ae.selectionStart)||0,((Ee=E.current)===null||Ee===void 0?void 0:Ee.selectionEnd)||0])}}else if(Ie.source==="compositionEnd")return;H(He),E.current&&Ld(E.current,ge,r,He)};ye(function(){if(j){var be;(be=E.current)===null||be===void 0||be.setSelectionRange.apply(be,Ce(j))}},[j]);var ue=function(ge){J(ge,ge.target.value,{source:"change"})},de=function(ge){M.current=!1,J(ge,ge.currentTarget.value,{source:"compositionEnd"}),P==null||P(ge)},D=function(ge){a&&ge.key==="Enter"&&!Q.current&&(Q.current=!0,a(ge)),s==null||s(ge)},Y=function(ge){ge.key==="Enter"&&(Q.current=!1),l==null||l(ge)},me=function(ge){T(!0),i==null||i(ge)},G=function(ge){Q.current&&(Q.current=!1),T(!1),o==null||o(ge)},ce=function(ge){H(""),z(),E.current&&Ld(E.current,ge,r)},ae=re&&"".concat(u,"-out-of-range"),pe=function(){var ge=pn(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return K.createElement("input",xe({autoComplete:n},ge,{onChange:ue,onFocus:me,onBlur:G,onKeyDown:D,onKeyUp:Y,className:U(u,W({},"".concat(u,"-disabled"),d),x==null?void 0:x.input),style:$==null?void 0:$.input,ref:E,size:f,type:y,onCompositionStart:function(Ie){M.current=!0,C==null||C(Ie)},onCompositionEnd:de}))},Oe=function(){var ge=Number(se)>0;if(p||ee.show){var Me=ee.showFormatter?ee.showFormatter({value:X,count:fe,maxLength:se}):"".concat(fe).concat(ge?" / ".concat(se):"");return K.createElement(K.Fragment,null,ee.show&&K.createElement("span",{className:U("".concat(u,"-show-count-suffix"),W({},"".concat(u,"-show-count-has-suffix"),!!p),x==null?void 0:x.count),style:Z({},$==null?void 0:$.count)},Me),p)}return null};return K.createElement(EP,xe({},w,{prefixCls:u,className:U(h,ae),handleReset:ce,value:X,focused:I,triggerFocus:z,suffix:Oe(),disabled:d,classes:S,classNames:x,styles:$,ref:k}),pe())});const AP=t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:K.createElement(Ls,null)}),e};function QP(t,e){const n=ne([]),r=()=>{n.current.push(setTimeout(()=>{var i,o,a,s;!((i=t.current)===null||i===void 0)&&i.input&&((o=t.current)===null||o===void 0?void 0:o.input.getAttribute("type"))==="password"&&(!((a=t.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=t.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return ye(()=>(e&&r(),()=>n.current.forEach(i=>{i&&clearTimeout(i)})),[]),r}function VB(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var FB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,bordered:r=!0,status:i,size:o,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:h,style:m,styles:p,rootClassName:g,onChange:O,classNames:v,variant:y}=t,S=FB(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:x,direction:$,allowClear:C,autoComplete:P,className:w,style:_,classNames:R,styles:I}=Zn("input"),T=x("input",n),M=ne(null),Q=Tr(T),[E,k,z]=xP(T,g),[L]=$P(T,Q),{compactSize:B,compactItemClassnames:F}=Bs(T,$),H=br(G=>{var ce;return(ce=o??B)!==null&&ce!==void 0?ce:G}),X=K.useContext(Ui),q=a??X,{status:N,hasFeedback:j,feedbackIcon:oe}=he(ei),ee=Yf(N,i),se=VB(t)||!!j;ne(se);const fe=QP(M,!0),re=G=>{fe(),s==null||s(G)},J=G=>{fe(),l==null||l(G)},ue=G=>{fe(),O==null||O(G)},de=(j||c)&&K.createElement(K.Fragment,null,c,j&&oe),D=AP(u??C),[Y,me]=Kf("input",y,r);return E(L(K.createElement(HB,Object.assign({ref:vr(e,M),prefixCls:T,autoComplete:P},S,{disabled:q,onBlur:re,onFocus:J,style:Object.assign(Object.assign({},_),m),styles:Object.assign(Object.assign({},I),p),suffix:de,allowClear:D,className:U(h,g,z,Q,F,w),onChange:ue,addonBefore:f&&K.createElement(Cs,{form:!0,space:!0},f),addonAfter:d&&K.createElement(Cs,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},v),R),{input:U({[`${T}-sm`]:H==="small",[`${T}-lg`]:H==="large",[`${T}-rtl`]:$==="rtl"},v==null?void 0:v.input,R.input,k),variant:U({[`${T}-${Y}`]:me},kd(T,ee)),affixWrapper:U({[`${T}-affix-wrapper-sm`]:H==="small",[`${T}-affix-wrapper-lg`]:H==="large",[`${T}-affix-wrapper-rtl`]:$==="rtl"},k),wrapper:U({[`${T}-group-rtl`]:$==="rtl"},k),groupWrapper:U({[`${T}-group-wrapper-sm`]:H==="small",[`${T}-group-wrapper-lg`]:H==="large",[`${T}-group-wrapper-rtl`]:$==="rtl",[`${T}-group-wrapper-${Y}`]:me},kd(`${T}-group-wrapper`,ee,j),k)})}))))});function QS(t){return["small","middle","large"].includes(t)}function NS(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const NP=K.createContext({latestIndex:0}),XB=NP.Provider,ZB=({className:t,index:e,children:n,split:r,style:i})=>{const{latestIndex:o}=he(NP);return n==null?null:b(Qt,null,b("div",{className:t,style:i},n),e{var n;const{getPrefixCls:r,direction:i,size:o,className:a,style:s,classNames:l,styles:c}=Zn("space"),{size:u=o??"small",align:d,className:f,rootClassName:h,children:m,direction:p="horizontal",prefixCls:g,split:O,style:v,wrap:y=!1,classNames:S,styles:x}=t,$=qB(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[C,P]=Array.isArray(u)?u:[u,u],w=QS(P),_=QS(C),R=NS(P),I=NS(C),T=sr(m,{keepEmpty:!0}),M=d===void 0&&p==="horizontal"?"center":d,Q=r("space",g),[E,k,z]=yw(Q),L=U(Q,a,k,`${Q}-${p}`,{[`${Q}-rtl`]:i==="rtl",[`${Q}-align-${M}`]:M,[`${Q}-gap-row-${P}`]:w,[`${Q}-gap-col-${C}`]:_},f,h,z),B=U(`${Q}-item`,(n=S==null?void 0:S.item)!==null&&n!==void 0?n:l.item);let F=0;const H=T.map((N,j)=>{var oe;N!=null&&(F=j);const ee=(N==null?void 0:N.key)||`${B}-${j}`;return b(ZB,{className:B,key:ee,index:j,split:O,style:(oe=x==null?void 0:x.item)!==null&&oe!==void 0?oe:c.item},N)}),X=ve(()=>({latestIndex:F}),[F]);if(T.length===0)return null;const q={};return y&&(q.flexWrap="wrap"),!_&&I&&(q.columnGap=C),!w&&R&&(q.rowGap=P),E(b("div",Object.assign({ref:e,className:L,style:Object.assign(Object.assign(Object.assign({},q),s),v)},$),b(XB,{value:X},H)))}),co=GB;co.Compact=VA;var UB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPopupContainer:e,getPrefixCls:n,direction:r}=he(lt),{prefixCls:i,type:o="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:h,arrow:m,autoFocus:p,overlay:g,trigger:O,align:v,open:y,onOpenChange:S,placement:x,getPopupContainer:$,href:C,icon:P=b(I0,null),title:w,buttonsRender:_=re=>re,mouseEnterDelay:R,mouseLeaveDelay:I,overlayClassName:T,overlayStyle:M,destroyOnHidden:Q,destroyPopupOnHide:E,dropdownRender:k,popupRender:z}=t,L=UB(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),B=n("dropdown",i),F=`${B}-button`,X={menu:h,arrow:m,autoFocus:p,align:v,disabled:s,trigger:s?[]:O,onOpenChange:S,getPopupContainer:$||e,mouseEnterDelay:R,mouseLeaveDelay:I,overlayClassName:T,overlayStyle:M,destroyOnHidden:Q,popupRender:z||k},{compactSize:q,compactItemClassnames:N}=Bs(B,r),j=U(F,N,f);"destroyPopupOnHide"in t&&(X.destroyPopupOnHide=E),"overlay"in t&&(X.overlay=g),"open"in t&&(X.open=y),"placement"in t?X.placement=x:X.placement=r==="rtl"?"bottomLeft":"bottomRight";const oe=b(wt,{type:o,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:C,title:w},d),ee=b(wt,{type:o,danger:a,icon:P}),[se,fe]=_([oe,ee]);return b(co.Compact,Object.assign({className:j,size:q,block:!0},L),se,b(ih,Object.assign({},X),fe))};zP.__ANT_BUTTON=!0;const Q0=ih;Q0.Button=zP;function YB(t){return t==null?null:typeof t=="object"&&!en(t)?t:{title:t}}var KB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},JB=function(e,n){return b(Mt,xe({},e,{ref:n,icon:KB}))},e8=Se(JB);function Dd(t){const[e,n]=te(t);return ye(()=>{const r=setTimeout(()=>{n(t)},t.length?0:10);return()=>{clearTimeout(r)}},[t]),e}const t8=t=>{const{componentCls:e}=t,n=`${e}-show-help`,r=`${e}-show-help-item`;return{[n]:{transition:`opacity ${t.motionDurationFast} ${t.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:`height ${t.motionDurationFast} ${t.motionEaseInOut}, opacity ${t.motionDurationFast} ${t.motionEaseInOut}, - transform ${t.motionDurationFast} ${t.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${r}-leave-active`]:{transform:"translateY(-5px)"}}}}},WB=t=>({legend:{display:"block",width:"100%",marginBottom:t.marginLG,padding:0,color:t.colorTextDescription,fontSize:t.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${q(t.controlOutlineWidth)} ${t.controlOutline}`},output:{display:"block",paddingTop:15,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight}}),P1=(t,e)=>{const{formItemCls:n}=t;return{[n]:{[`${n}-label > label`]:{height:e},[`${n}-control-input`]:{minHeight:e}}}},FB=t=>{const{componentCls:e}=t;return{[t.componentCls]:Object.assign(Object.assign(Object.assign({},wn(t)),WB(t)),{[`${e}-text`]:{display:"inline-block",paddingInlineEnd:t.paddingSM},"&-small":Object.assign({},P1(t,t.controlHeightSM)),"&-large":Object.assign({},P1(t,t.controlHeightLG))})}},VB=t=>{const{formItemCls:e,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:o,labelColor:a,labelFontSize:s,labelHeight:l,labelColonMarginInlineStart:c,labelColonMarginInlineEnd:u,itemMarginBottom:d}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{marginBottom:d,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, - &-hidden${i}-row`]:{display:"none"},"&-has-warning":{[`${e}-split`]:{color:t.colorError}},"&-has-error":{[`${e}-split`]:{color:t.colorWarning}},[`${e}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:t.lineHeight,whiteSpace:"unset","> label":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:l,color:a,fontSize:s,[`> ${n}`]:{fontSize:t.fontSize,verticalAlign:"top"},[`&${e}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:t.marginXXS,color:o,fontSize:t.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${e}-required-mark-hidden, &${e}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${e}-optional`]:{display:"inline-block",marginInlineStart:t.marginXXS,color:t.colorTextDescription,[`&${e}-required-mark-hidden`]:{display:"none"}},[`${e}-tooltip`]:{color:t.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:t.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:c,marginInlineEnd:u},[`&${e}-no-colon::after`]:{content:'"\\a0"'}}},[`${e}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:t.controlHeight,"&-content":{flex:"auto",maxWidth:"100%",[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:"flex",alignItems:"center"}}}},[e]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:t.colorTextDescription,fontSize:t.fontSize,lineHeight:t.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:t.controlHeightSM,transition:`color ${t.motionDurationMid} ${t.motionEaseOut}`},"&-explain":{"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning}}},[`&-with-help ${e}-explain`]:{height:"auto",opacity:1},[`${e}-feedback-icon`]:{fontSize:t.fontSize,textAlign:"center",visibility:"visible",animationName:qv,animationDuration:t.motionDurationMid,animationTimingFunction:t.motionEaseOutBack,pointerEvents:"none","&-success":{color:t.colorSuccess},"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning},"&-validating":{color:t.colorPrimary}}})}},ta=t=>({padding:t.verticalLabelPadding,margin:t.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),HB=t=>{const{antCls:e,formItemCls:n}=t;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:"unset"}},[`${e}-col-24${n}-label, - ${e}-col-xl-24${n}-label`]:ta(t)}}},XB=t=>{const{componentCls:e,formItemCls:n,inlineItemMarginBottom:r}=t;return{[`${e}-inline`]:{display:"flex",flexWrap:"wrap",[`${n}-inline`]:{flex:"none",marginInlineEnd:t.margin,marginBottom:r,"&-row":{flexWrap:"nowrap"},[`> ${n}-label, - > ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${e}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},ZB=t=>{const{componentCls:e,formItemCls:n,rootPrefixCls:r}=t;return{[`${n} ${n}-label`]:ta(t),[`${e}:not(${e}-inline)`]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},qB=t=>{const{componentCls:e,formItemCls:n,antCls:r}=t;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:"column"},[`${n}-label > label`]:{height:"auto"},[`${n}-control`]:{width:"100%"},[`${n}-label, + transform ${t.motionDurationFast} ${t.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${r}-leave-active`]:{transform:"translateY(-5px)"}}}}},n8=t=>({legend:{display:"block",width:"100%",marginBottom:t.marginLG,padding:0,color:t.colorTextDescription,fontSize:t.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${V(t.controlOutlineWidth)} ${t.controlOutline}`},output:{display:"block",paddingTop:15,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight}}),zS=(t,e)=>{const{formItemCls:n}=t;return{[n]:{[`${n}-label > label`]:{height:e},[`${n}-control-input`]:{minHeight:e}}}},r8=t=>{const{componentCls:e}=t;return{[t.componentCls]:Object.assign(Object.assign(Object.assign({},Sn(t)),n8(t)),{[`${e}-text`]:{display:"inline-block",paddingInlineEnd:t.paddingSM},"&-small":Object.assign({},zS(t,t.controlHeightSM)),"&-large":Object.assign({},zS(t,t.controlHeightLG))})}},i8=t=>{const{formItemCls:e,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:o,labelColor:a,labelFontSize:s,labelHeight:l,labelColonMarginInlineStart:c,labelColonMarginInlineEnd:u,itemMarginBottom:d}=t;return{[e]:Object.assign(Object.assign({},Sn(t)),{marginBottom:d,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, + &-hidden${i}-row`]:{display:"none"},"&-has-warning":{[`${e}-split`]:{color:t.colorError}},"&-has-error":{[`${e}-split`]:{color:t.colorWarning}},[`${e}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:t.lineHeight,whiteSpace:"unset","> label":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:l,color:a,fontSize:s,[`> ${n}`]:{fontSize:t.fontSize,verticalAlign:"top"},[`&${e}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:t.marginXXS,color:o,fontSize:t.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${e}-required-mark-hidden, &${e}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${e}-optional`]:{display:"inline-block",marginInlineStart:t.marginXXS,color:t.colorTextDescription,[`&${e}-required-mark-hidden`]:{display:"none"}},[`${e}-tooltip`]:{color:t.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:t.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:c,marginInlineEnd:u},[`&${e}-no-colon::after`]:{content:'"\\a0"'}}},[`${e}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:t.controlHeight,"&-content":{flex:"auto",maxWidth:"100%",[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:"flex",alignItems:"center"}}}},[e]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:t.colorTextDescription,fontSize:t.fontSize,lineHeight:t.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:t.controlHeightSM,transition:`color ${t.motionDurationMid} ${t.motionEaseOut}`},"&-explain":{"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning}}},[`&-with-help ${e}-explain`]:{height:"auto",opacity:1},[`${e}-feedback-icon`]:{fontSize:t.fontSize,textAlign:"center",visibility:"visible",animationName:r0,animationDuration:t.motionDurationMid,animationTimingFunction:t.motionEaseOutBack,pointerEvents:"none","&-success":{color:t.colorSuccess},"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning},"&-validating":{color:t.colorPrimary}}})}},ra=t=>({padding:t.verticalLabelPadding,margin:t.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),o8=t=>{const{antCls:e,formItemCls:n}=t;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:"unset"}},[`${e}-col-24${n}-label, + ${e}-col-xl-24${n}-label`]:ra(t)}}},a8=t=>{const{componentCls:e,formItemCls:n,inlineItemMarginBottom:r}=t;return{[`${e}-inline`]:{display:"flex",flexWrap:"wrap",[`${n}-inline`]:{flex:"none",marginInlineEnd:t.margin,marginBottom:r,"&-row":{flexWrap:"nowrap"},[`> ${n}-label, + > ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${e}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},s8=t=>{const{componentCls:e,formItemCls:n,rootPrefixCls:r}=t;return{[`${n} ${n}-label`]:ra(t),[`${e}:not(${e}-inline)`]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},l8=t=>{const{componentCls:e,formItemCls:n,antCls:r}=t;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:"column"},[`${n}-label > label`]:{height:"auto"},[`${n}-control`]:{width:"100%"},[`${n}-label, ${r}-col-24${n}-label, - ${r}-col-xl-24${n}-label`]:ta(t)},[`@media (max-width: ${q(t.screenXSMax)})`]:[ZB(t),{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:ta(t)}}}],[`@media (max-width: ${q(t.screenSMMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:ta(t)}}},[`@media (max-width: ${q(t.screenMDMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:ta(t)}}},[`@media (max-width: ${q(t.screenLGMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:ta(t)}}}}},GB=t=>({labelRequiredMarkColor:t.colorError,labelColor:t.colorTextHeading,labelFontSize:t.fontSize,labelHeight:t.controlHeight,labelColonMarginInlineStart:t.marginXXS/2,labelColonMarginInlineEnd:t.marginXS,itemMarginBottom:t.marginLG,verticalLabelPadding:`0 0 ${t.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),wP=(t,e)=>kt(t,{formItemCls:`${t.componentCls}-item`,rootPrefixCls:e}),P0=Zt("Form",(t,{rootPrefixCls:e})=>{const n=wP(t,e);return[FB(n),VB(n),BB(n),HB(n),XB(n),qB(n),Fv(n),qv]},GB,{order:-1e3}),_1=[];function Gh(t,e,n,r=0){return{key:typeof t=="string"?t:`${e}-${r}`,error:t,errorStatus:n}}const PP=({help:t,helpStatus:e,errors:n=_1,warnings:r=_1,className:i,fieldId:o,onVisibleChanged:a})=>{const{prefixCls:s}=fe(r0),l=`${s}-item-explain`,c=$r(s),[u,d,f]=P0(s,c),h=ge(()=>Sd(s),[s]),p=Md(n),m=Md(r),g=ge(()=>t!=null?[Gh(t,"help",e)]:[].concat($e(p.map((S,x)=>Gh(S,"error","error",x))),$e(m.map((S,x)=>Gh(S,"warning","warning",x)))),[t,e,p,m]),v=ge(()=>{const S={};return g.forEach(({key:x})=>{S[x]=(S[x]||0)+1}),g.map((x,b)=>Object.assign(Object.assign({},x),{key:S[x.key]>1?`${x.key}-fallback-${b}`:x.key}))},[g]),O={};return o&&(O.id=`${o}_help`),u(y(pi,{motionDeadline:h.motionDeadline,motionName:`${s}-show-help`,visible:!!v.length,onVisibleChanged:a},S=>{const{className:x,style:b}=S;return y("div",Object.assign({},O,{className:Z(l,x,f,c,i,d),style:b}),y(D$,Object.assign({keys:v},Sd(s),{motionName:`${s}-show-help-item`,component:!1}),C=>{const{key:$,error:w,errorStatus:P,className:_,style:T}=C;return y("div",{key:$,className:Z(_,{[`${l}-${P}`]:P}),style:T},w)}))}))};var YB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=fe(qi),{getPrefixCls:r,direction:i,requiredMark:o,colon:a,scrollToFirstError:s,className:l,style:c}=rr("form"),{prefixCls:u,className:d,rootClassName:f,size:h,disabled:p=n,form:m,colon:g,labelAlign:v,labelWrap:O,labelCol:S,wrapperCol:x,hideRequiredMark:b,layout:C="horizontal",scrollToFirstError:$,requiredMark:w,onFinishFailed:P,name:_,style:T,feedbackIcons:R,variant:k}=t,I=YB(t,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),Q=Dr(h),M=fe(h$),E=ge(()=>w!==void 0?w:b?!1:o!==void 0?o:!0,[b,w,o]),N=g??a,z=r("form",u),L=$r(z),[F,H,V]=P0(z,L),X=Z(z,`${z}-${C}`,{[`${z}-hide-required-mark`]:E===!1,[`${z}-rtl`]:i==="rtl",[`${z}-${Q}`]:Q},V,L,H,l,d,f),[B]=nP(m),{__INTERNAL__:G}=B;G.name=_;const se=ge(()=>({name:_,labelAlign:v,labelCol:S,labelWrap:O,wrapperCol:x,layout:C,colon:N,requiredMark:E,itemRef:G.itemRef,form:B,feedbackIcons:R}),[_,v,S,x,C,N,E,B,R]),re=U(null);Yt(e,()=>{var ie;return Object.assign(Object.assign({},B),{nativeElement:(ie=re.current)===null||ie===void 0?void 0:ie.nativeElement})});const le=(ie,ne)=>{if(ie){let ue={block:"nearest"};typeof ie=="object"&&(ue=Object.assign(Object.assign({},ue),ie)),B.scrollToField(ne,ue)}},me=ie=>{if(P==null||P(ie),ie.errorFields.length){const ne=ie.errorFields[0].name;if($!==void 0){le($,ne);return}s!==void 0&&le(s,ne)}};return F(y(Tw.Provider,{value:k},y(Av,{disabled:p},y(va.Provider,{value:Q},y(Pw,{validateMessages:M},y(uo.Provider,{value:se},y(_w,{status:!0},y(Ds,Object.assign({id:_},I,{name:_,onFinishFailed:me,form:B,ref:re,style:Object.assign(Object.assign({},c),T),className:X})))))))))},KB=Se(UB);function JB(t){if(typeof t=="function")return t;const e=nr(t);return e.length<=1?e[0]:e}const _P=()=>{const{status:t,errors:e=[],warnings:n=[]}=fe(Jr);return{status:t,errors:e,warnings:n}};_P.Context=Jr;function e8(t){const[e,n]=J(t),r=U(null),i=U([]),o=U(!1);be(()=>(o.current=!1,()=>{o.current=!0,Xt.cancel(r.current),r.current=null}),[]);function a(s){o.current||(r.current===null&&(i.current=[],r.current=Xt(()=>{r.current=null,n(l=>{let c=l;return i.current.forEach(u=>{c=u(c)}),c})})),i.current.push(s))}return[e,a]}function t8(){const{itemRef:t}=fe(uo),e=U({});function n(r,i){const o=i&&typeof i=="object"&&Ho(i),a=r.join("_");return(e.current.name!==a||e.current.originRef!==o)&&(e.current.name=a,e.current.originRef=o,e.current.ref=pr(t(r),o)),e.current.ref}return n}const n8=t=>{const{formItemCls:e}=t;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${e}-control`]:{display:"flex"}}}},r8=Qs(["Form","item-item"],(t,{rootPrefixCls:e})=>{const n=wP(t,e);return n8(n)});var i8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,status:n,labelCol:r,wrapperCol:i,children:o,errors:a,warnings:s,_internalItemRender:l,extra:c,help:u,fieldId:d,marginBottom:f,onErrorVisibleChanged:h,label:p}=t,m=`${e}-item`,g=fe(uo),v=ge(()=>{let I=Object.assign({},i||g.wrapperCol||{});return p===null&&!r&&!i&&g.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(M=>{const E=M?[M]:[],N=si(g.labelCol,E),z=typeof N=="object"?N:{},L=si(I,E),F=typeof L=="object"?L:{};"span"in z&&!("offset"in F)&&z.span{const{labelCol:I,wrapperCol:Q}=g;return i8(g,["labelCol","wrapperCol"])},[g]),x=U(null),[b,C]=J(0);Nt(()=>{c&&x.current?C(x.current.clientHeight):C(0)},[c]);const $=y("div",{className:`${m}-control-input`},y("div",{className:`${m}-control-input-content`},o)),w=ge(()=>({prefixCls:e,status:n}),[e,n]),P=f!==null||a.length||s.length?y(r0.Provider,{value:w},y(PP,{fieldId:d,errors:a,warnings:s,help:u,helpStatus:n,className:`${m}-explain-connected`,onVisibleChanged:h})):null,_={};d&&(_.id=`${d}_extra`);const T=c?y("div",Object.assign({},_,{className:`${m}-extra`,ref:x}),c):null,R=P||T?y("div",{className:`${m}-additional`,style:f?{minHeight:f+b}:{}},P,T):null,k=l&&l.mark==="pro_table_render"&&l.render?l.render(t,{input:$,errorList:P,extra:T}):y(At,null,$,R);return y(uo.Provider,{value:S},y(Mr,Object.assign({},v,{className:O}),k),y(r8,{prefixCls:e}))};var s8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},l8=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:s8}))},c8=Se(l8),u8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var u;const[d]=Ki("Form"),{labelAlign:f,labelCol:h,labelWrap:p,colon:m}=fe(uo);if(!e)return null;const g=r||h||{},v=i||f,O=`${t}-item-label`,S=Z(O,v==="left"&&`${O}-left`,g.className,{[`${O}-wrap`]:!!p});let x=e;const b=o===!0||m!==!1&&o!==!1;b&&!c&&typeof e=="string"&&e.trim()&&(x=e.replace(/[:|:]\s*$/,""));const $=zB(l);if($){const{icon:k=y(c8,null)}=$,I=u8($,["icon"]),Q=y(on,Object.assign({},I),Xn(k,{className:`${t}-item-tooltip`,title:"",onClick:M=>{M.preventDefault()},tabIndex:null}));x=y(At,null,x,Q)}const w=s==="optional",P=typeof s=="function",_=s===!1;P?x=s(x,{required:!!a}):w&&!a&&(x=y(At,null,x,y("span",{className:`${t}-item-optional`,title:""},(d==null?void 0:d.optional)||((u=Zi.Form)===null||u===void 0?void 0:u.optional))));let T;_?T="hidden":(w||P)&&(T="optional");const R=Z({[`${t}-item-required`]:a,[`${t}-item-required-mark-${T}`]:T,[`${t}-item-no-colon`]:!b});return y(Mr,Object.assign({},g,{className:S}),y("label",{htmlFor:n,className:R,title:typeof e=="string"?e:""},x))},f8={success:Pf,warning:Ls,error:zs,validating:yc};function TP({children:t,errors:e,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:o,meta:a,noStyle:s,name:l}){const c=`${o}-item`,{feedbackIcons:u}=fe(uo),d=tP(e,n,a,null,!!r,i),{isFormItemInput:f,status:h,hasFeedback:p,feedbackIcon:m,name:g}=fe(Jr),v=ge(()=>{var O;let S;if(r){const b=r!==!0&&r.icons||u,C=d&&((O=b==null?void 0:b({status:d,errors:e,warnings:n}))===null||O===void 0?void 0:O[d]),$=d&&f8[d];S=C!==!1&&$?y("span",{className:Z(`${c}-feedback-icon`,`${c}-feedback-icon-${d}`)},C||y($,null)):null}const x={status:d||"",errors:e,warnings:n,hasFeedback:!!r,feedbackIcon:S,isFormItemInput:!0,name:l};return s&&(x.status=(d??h)||"",x.isFormItemInput=f,x.hasFeedback=!!(r??p),x.feedbackIcon=r!==void 0?x.feedbackIcon:m,x.name=l??g),x},[d,r,s,f,h]);return y(Jr.Provider,{value:v},t)}var h8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{if(k&&P.current){const F=getComputedStyle(P.current);M(parseInt(F.marginBottom,10))}},[k,I]);const E=F=>{F||M(null)},z=((F=!1)=>{const H=F?_:c.errors,V=F?T:c.warnings;return tP(H,V,c,"",!!u,l)})(),L=Z(x,n,r,{[`${x}-with-help`]:R||_.length||T.length,[`${x}-has-feedback`]:z&&u,[`${x}-has-success`]:z==="success",[`${x}-has-warning`]:z==="warning",[`${x}-has-error`]:z==="error",[`${x}-is-validating`]:z==="validating",[`${x}-hidden`]:d,[`${x}-${$}`]:$});return y("div",{className:L,style:i,ref:P},y(xs,Object.assign({className:`${x}-row`},cn(S,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),y(d8,Object.assign({htmlFor:h},t,{requiredMark:b,required:p??m,prefixCls:e,vertical:w})),y(a8,Object.assign({},t,c,{errors:_,warnings:T,prefixCls:e,status:z,help:o,marginBottom:Q,onErrorVisibleChanged:E}),y(ww.Provider,{value:g},y(TP,{prefixCls:e,meta:c,errors:c.errors,warnings:c.warnings,hasFeedback:u,validateStatus:z,name:O},f)))),!!Q&&y("div",{className:`${x}-margin-offset`,style:{marginBottom:-Q}}))}const m8="__SPLIT__";function g8(t,e){const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(i=>{const o=t[i],a=e[i];return o===a||typeof o=="function"||typeof a=="function"})}const v8=Ta(({children:t})=>t,(t,e)=>g8(t.control,e.control)&&t.update===e.update&&t.childProps.length===e.childProps.length&&t.childProps.every((n,r)=>n===e.childProps[r]));function T1(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function O8(t){const{name:e,noStyle:n,className:r,dependencies:i,prefixCls:o,shouldUpdate:a,rules:s,children:l,required:c,label:u,messageVariables:d,trigger:f="onChange",validateTrigger:h,hidden:p,help:m,layout:g}=t,{getPrefixCls:v}=fe(it),{name:O}=fe(uo),S=JB(l),x=typeof S=="function",b=fe(ww),{validateTrigger:C}=fe(ya),$=h!==void 0?h:C,w=e!=null,P=v("form",o),_=$r(P),[T,R,k]=P0(P,_);bc();const I=fe(Hl),Q=U(null),[M,E]=e8({}),[N,z]=Oa(()=>T1()),L=se=>{const re=I==null?void 0:I.getKey(se.name);if(z(se.destroy?T1():se,!0),n&&m!==!1&&b){let le=se.name;if(se.destroy)le=Q.current||le;else if(re!==void 0){const[me,ie]=re;le=[me].concat($e(ie)),Q.current=le}b(se,le)}},F=(se,re)=>{E(le=>{const me=Object.assign({},le),ne=[].concat($e(se.name.slice(0,-1)),$e(re)).join(m8);return se.destroy?delete me[ne]:me[ne]=se,me})},[H,V]=ge(()=>{const se=$e(N.errors),re=$e(N.warnings);return Object.values(M).forEach(le=>{se.push.apply(se,$e(le.errors||[])),re.push.apply(re,$e(le.warnings||[]))}),[se,re]},[M,N.errors,N.warnings]),X=t8();function B(se,re,le){return n&&!p?y(TP,{prefixCls:P,hasFeedback:t.hasFeedback,validateStatus:t.validateStatus,meta:N,errors:H,warnings:V,noStyle:!0,name:e},se):y(p8,Object.assign({key:"row"},t,{className:Z(r,k,_,R),prefixCls:P,fieldId:re,isRequired:le,errors:H,warnings:V,meta:N,onSubItemMetaChange:F,layout:g,name:e}),se)}if(!w&&!x&&!i)return T(B(S));let G={};return typeof u=="string"?G.label=u:e&&(G.label=String(e)),d&&(G=Object.assign(Object.assign({},G),d)),T(y(t0,Object.assign({},t,{messageVariables:G,trigger:f,validateTrigger:$,onMetaChange:L}),(se,re,le)=>{const me=$l(e).length&&re?re.name:[],ie=eP(me,O),ne=c!==void 0?c:!!(s!=null&&s.some(j=>{if(j&&typeof j=="object"&&j.required&&!j.warningOnly)return!0;if(typeof j=="function"){const ee=j(le);return(ee==null?void 0:ee.required)&&!(ee!=null&&ee.warningOnly)}return!1})),ue=Object.assign({},se);let de=null;if(Array.isArray(S)&&w)de=S;else if(!(x&&(!(a||i)||w))){if(!(i&&!x&&!w))if(Kt(S)){const j=Object.assign(Object.assign({},S.props),ue);if(j.id||(j.id=ie),m||H.length>0||V.length>0||t.extra){const ve=[];(m||H.length>0)&&ve.push(`${ie}_help`),t.extra&&ve.push(`${ie}_extra`),j["aria-describedby"]=ve.join(" ")}H.length>0&&(j["aria-invalid"]="true"),ne&&(j["aria-required"]="true"),vo(S)&&(j.ref=X(me,S)),new Set([].concat($e($l(f)),$e($l($)))).forEach(ve=>{j[ve]=(...Y)=>{var ce,te,Oe,ye,pe;(Oe=ue[ve])===null||Oe===void 0||(ce=Oe).call.apply(ce,[ue].concat(Y)),(pe=(ye=S.props)[ve])===null||pe===void 0||(te=pe).call.apply(te,[ye].concat(Y))}});const he=[j["aria-required"],j["aria-invalid"],j["aria-describedby"]];de=y(v8,{control:ue,update:S,childProps:he},fr(S,j))}else x&&(a||i)&&!w?de=S(le):de=S}return B(de,ie,ne)}))}const kP=O8;kP.useStatus=_P;var b8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{prefixCls:e,children:n}=t,r=b8(t,["prefixCls","children"]);const{getPrefixCls:i}=fe(it),o=i("form",e),a=ge(()=>({prefixCls:o,status:"error"}),[o]);return y(Sw,Object.assign({},r),(s,l,c)=>y(r0.Provider,{value:a},n(s.map(u=>Object.assign(Object.assign({},u),{fieldKey:u.key})),l,{errors:c.errors,warnings:c.warnings})))};function S8(){const{form:t}=fe(uo);return t}const yr=KB;yr.Item=kP;yr.List=y8;yr.ErrorList=PP;yr.useForm=nP;yr.useFormInstance=S8;yr.useWatch=$w;yr.Provider=Pw;yr.create=()=>{};var x8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},C8=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:x8}))},$8=Se(C8);const w8=t=>{const{getPrefixCls:e,direction:n}=fe(it),{prefixCls:r,className:i}=t,o=e("input-group",r),a=e("input"),[s,l,c]=uP(a),u=Z(o,c,{[`${o}-lg`]:t.size==="large",[`${o}-sm`]:t.size==="small",[`${o}-compact`]:t.compact,[`${o}-rtl`]:n==="rtl"},l,i),d=fe(Jr),f=ge(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return s(y("span",{className:u,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},y(Jr.Provider,{value:f},t.children)))},P8=t=>{const{componentCls:e,paddingXS:n}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${e}-input-wrapper`]:{position:"relative",[`${e}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${e}-mask-input`]:{color:"transparent",caretColor:t.colorText},[`${e}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${e}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},_8=Zt(["Input","OTP"],t=>{const e=kt(t,Gf(t));return P8(e)},Yf);var T8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{className:n,value:r,onChange:i,onActiveChange:o,index:a,mask:s}=t,l=T8(t,["className","value","onChange","onActiveChange","index","mask"]),{getPrefixCls:c}=fe(it),u=c("otp"),d=typeof s=="string"?s:r,f=U(null);Yt(e,()=>f.current);const h=g=>{i(a,g.target.value)},p=()=>{Xt(()=>{var g;const v=(g=f.current)===null||g===void 0?void 0:g.input;document.activeElement===v&&v&&v.select()})},m=g=>{const{key:v,ctrlKey:O,metaKey:S}=g;v==="ArrowLeft"?o(a-1):v==="ArrowRight"?o(a+1):v==="z"&&(O||S)?g.preventDefault():v==="Backspace"&&!r&&o(a-1),p()};return y("span",{className:`${u}-input-wrapper`,role:"presentation"},s&&r!==""&&r!==void 0&&y("span",{className:`${u}-mask-icon`,"aria-hidden":"true"},d),y(Kf,Object.assign({"aria-label":`OTP Input ${a+1}`,type:s===!0?"password":"text"},l,{ref:f,value:r,onInput:h,onFocus:p,onKeyDown:m,onMouseDown:p,onMouseUp:p,className:Z(n,{[`${u}-mask-input`]:s})})))});var R8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{index:e,prefixCls:n,separator:r}=t,i=typeof r=="function"?r(e):r;return i?y("span",{className:`${n}-separator`},i):null},M8=Se((t,e)=>{const{prefixCls:n,length:r=6,size:i,defaultValue:o,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:h,mask:p,type:m,onInput:g,inputMode:v}=t,O=R8(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:S,direction:x}=fe(it),b=S("otp",n),C=$i(O,{aria:!0,data:!0,attr:!0}),[$,w,P]=_8(b),_=Dr(X=>i??X),T=fe(Jr),R=Wf(T.status,f),k=ge(()=>Object.assign(Object.assign({},T),{status:R,hasFeedback:!1,feedbackIcon:null}),[T,R]),I=U(null),Q=U({});Yt(e,()=>({focus:()=>{var X;(X=Q.current[0])===null||X===void 0||X.focus()},blur:()=>{var X;for(let B=0;Bl?l(X):X,[E,N]=J(()=>au(M(o||"")));be(()=>{a!==void 0&&N(au(a))},[a]);const z=pn(X=>{N(X),g&&g(X),s&&X.length===r&&X.every(B=>B)&&X.some((B,G)=>E[G]!==B)&&s(X.join(""))}),L=pn((X,B)=>{let G=$e(E);for(let re=0;re=0&&!G[re];re-=1)G.pop();const se=M(G.map(re=>re||" ").join(""));return G=au(se).map((re,le)=>re===" "&&!G[le]?G[le]:re),G}),F=(X,B)=>{var G;const se=L(X,B),re=Math.min(X+B.length,r-1);re!==X&&se[X]!==void 0&&((G=Q.current[re])===null||G===void 0||G.focus()),z(se)},H=X=>{var B;(B=Q.current[X])===null||B===void 0||B.focus()},V={variant:u,disabled:d,status:R,mask:p,type:m,inputMode:v};return $(y("div",Object.assign({},C,{ref:I,className:Z(b,{[`${b}-sm`]:_==="small",[`${b}-lg`]:_==="large",[`${b}-rtl`]:x==="rtl"},P,w),role:"group"}),y(Jr.Provider,{value:k},Array.from({length:r}).map((X,B)=>{const G=`otp-${B}`,se=E[B]||"";return y(At,{key:G},y(k8,Object.assign({ref:re=>{Q.current[B]=re},index:B,size:_,htmlSize:1,className:`${b}-input`,onChange:F,value:se,onActiveChange:H,autoFocus:B===0&&h},V)),By(t?$8:Q8,null),L8={click:"onClick",hover:"onMouseOver"},j8=Se((t,e)=>{const{disabled:n,action:r="click",visibilityToggle:i=!0,iconRender:o=z8,suffix:a}=t,s=fe(qi),l=n??s,c=typeof i=="object"&&i.visible!==void 0,[u,d]=J(()=>c?i.visible:!1),f=U(null);be(()=>{c&&d(i.visible)},[c,i]);const h=xP(f),p=()=>{var T;if(l)return;u&&h();const R=!u;d(R),typeof i=="object"&&((T=i.onVisibleChange)===null||T===void 0||T.call(i,R))},m=T=>{const R=L8[r]||"",k=o(u),I={[R]:p,className:`${T}-icon`,key:"passwordIcon",onMouseDown:Q=>{Q.preventDefault()},onMouseUp:Q=>{Q.preventDefault()}};return Xn(Kt(k)?k:y("span",null,k),I)},{className:g,prefixCls:v,inputPrefixCls:O,size:S}=t,x=N8(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:b}=fe(it),C=b("input",O),$=b("input-password",v),w=i&&m($),P=Z($,g,{[`${$}-${S}`]:!!S}),_=Object.assign(Object.assign({},cn(x,["suffix","iconRender","visibilityToggle"])),{type:u?"text":"password",className:P,prefixCls:C,suffix:y(At,null,w,a)});return S&&(_.size=S),y(Kf,Object.assign({ref:pr(e,f)},_))});var D8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,inputPrefixCls:r,className:i,size:o,suffix:a,enterButton:s=!1,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:f,onCompositionStart:h,onCompositionEnd:p,variant:m,onPressEnter:g}=t,v=D8(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant","onPressEnter"]),{getPrefixCls:O,direction:S}=fe(it),x=U(!1),b=O("input-search",n),C=O("input",r),{compactSize:$}=js(b,S),w=Dr(V=>{var X;return(X=o??$)!==null&&X!==void 0?X:V}),P=U(null),_=V=>{V!=null&&V.target&&V.type==="click"&&d&&d(V.target.value,V,{source:"clear"}),f==null||f(V)},T=V=>{var X;document.activeElement===((X=P.current)===null||X===void 0?void 0:X.input)&&V.preventDefault()},R=V=>{var X,B;d&&d((B=(X=P.current)===null||X===void 0?void 0:X.input)===null||B===void 0?void 0:B.value,V,{source:"input"})},k=V=>{x.current||c||(g==null||g(V),R(V))},I=typeof s=="boolean"?y(b2,null):null,Q=`${b}-button`;let M;const E=s||{},N=E.type&&E.type.__ANT_BUTTON===!0;N||E.type==="button"?M=fr(E,Object.assign({onMouseDown:T,onClick:V=>{var X,B;(B=(X=E==null?void 0:E.props)===null||X===void 0?void 0:X.onClick)===null||B===void 0||B.call(X,V),R(V)},key:"enterButton"},N?{className:Q,size:w}:{})):M=y(vt,{className:Q,color:s?"primary":"default",size:w,disabled:u,key:"enterButton",onMouseDown:T,onClick:R,loading:c,icon:I,variant:m==="borderless"||m==="filled"||m==="underlined"?"text":s?"solid":void 0},s),l&&(M=[M,fr(l,{key:"addonAfter"})]);const z=Z(b,{[`${b}-rtl`]:S==="rtl",[`${b}-${w}`]:!!w,[`${b}-with-button`]:!!s},i),L=V=>{x.current=!0,h==null||h(V)},F=V=>{x.current=!1,p==null||p(V)},H=Object.assign(Object.assign({},v),{className:z,prefixCls:C,type:"search",size:w,variant:m,onPressEnter:k,onCompositionStart:L,onCompositionEnd:F,addonAfter:M,suffix:a,onChange:_,disabled:u});return y(Kf,Object.assign({ref:pr(P,e)},H))});var W8=` + ${r}-col-xl-24${n}-label`]:ra(t)},[`@media (max-width: ${V(t.screenXSMax)})`]:[s8(t),{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:ra(t)}}}],[`@media (max-width: ${V(t.screenSMMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:ra(t)}}},[`@media (max-width: ${V(t.screenMDMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:ra(t)}}},[`@media (max-width: ${V(t.screenLGMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:ra(t)}}}}},c8=t=>({labelRequiredMarkColor:t.colorError,labelColor:t.colorTextHeading,labelFontSize:t.fontSize,labelHeight:t.controlHeight,labelColonMarginInlineStart:t.marginXXS/2,labelColonMarginInlineEnd:t.marginXS,itemMarginBottom:t.marginLG,verticalLabelPadding:`0 0 ${t.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),jP=(t,e)=>It(t,{formItemCls:`${t.componentCls}-item`,rootPrefixCls:e}),N0=Ft("Form",(t,{rootPrefixCls:e})=>{const n=jP(t,e);return[r8(n),i8(n),t8(n),o8(n),a8(n),l8(n),Kv(n),r0]},c8,{order:-1e3}),jS=[];function om(t,e,n,r=0){return{key:typeof t=="string"?t:`${e}-${r}`,error:t,errorStatus:n}}const LP=({help:t,helpStatus:e,errors:n=jS,warnings:r=jS,className:i,fieldId:o,onVisibleChanged:a})=>{const{prefixCls:s}=he(f0),l=`${s}-item-explain`,c=Tr(s),[u,d,f]=N0(s,c),h=ve(()=>Rd(s),[s]),m=Dd(n),p=Dd(r),g=ve(()=>t!=null?[om(t,"help",e)]:[].concat(Ce(m.map((y,S)=>om(y,"error","error",S))),Ce(p.map((y,S)=>om(y,"warning","warning",S)))),[t,e,m,p]),O=ve(()=>{const y={};return g.forEach(({key:S})=>{y[S]=(y[S]||0)+1}),g.map((S,x)=>Object.assign(Object.assign({},S),{key:y[S.key]>1?`${S.key}-fallback-${x}`:S.key}))},[g]),v={};return o&&(v.id=`${o}_help`),u(b(vi,{motionDeadline:h.motionDeadline,motionName:`${s}-show-help`,visible:!!O.length,onVisibleChanged:a},y=>{const{className:S,style:x}=y;return b("div",Object.assign({},v,{className:U(l,S,f,c,i,d),style:x}),b(nw,Object.assign({keys:O},Rd(s),{motionName:`${s}-show-help-item`,component:!1}),$=>{const{key:C,error:P,errorStatus:w,className:_,style:R}=$;return b("div",{key:C,className:U(_,{[`${l}-${w}`]:w}),style:R},P)}))}))};var u8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=he(Ui),{getPrefixCls:r,direction:i,requiredMark:o,colon:a,scrollToFirstError:s,className:l,style:c}=Zn("form"),{prefixCls:u,className:d,rootClassName:f,size:h,disabled:m=n,form:p,colon:g,labelAlign:O,labelWrap:v,labelCol:y,wrapperCol:S,hideRequiredMark:x,layout:$="horizontal",scrollToFirstError:C,requiredMark:P,onFinishFailed:w,name:_,style:R,feedbackIcons:I,variant:T}=t,M=u8(t,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),Q=br(h),E=he(TC),k=ve(()=>P!==void 0?P:x?!1:o!==void 0?o:!0,[x,P,o]),z=g??a,L=r("form",u),B=Tr(L),[F,H,X]=N0(L,B),q=U(L,`${L}-${$}`,{[`${L}-hide-required-mark`]:k===!1,[`${L}-rtl`]:i==="rtl",[`${L}-${Q}`]:Q},X,B,H,l,d,f),[N]=OP(p),{__INTERNAL__:j}=N;j.name=_;const oe=ve(()=>({name:_,labelAlign:O,labelCol:y,labelWrap:v,wrapperCol:S,layout:$,colon:z,requiredMark:k,itemRef:j.itemRef,form:N,feedbackIcons:I}),[_,O,y,S,$,z,k,N,I]),ee=ne(null);Jt(e,()=>{var re;return Object.assign(Object.assign({},N),{nativeElement:(re=ee.current)===null||re===void 0?void 0:re.nativeElement})});const se=(re,J)=>{if(re){let ue={block:"nearest"};typeof re=="object"&&(ue=Object.assign(Object.assign({},ue),re)),N.scrollToField(J,ue)}},fe=re=>{if(w==null||w(re),re.errorFields.length){const J=re.errorFields[0].name;if(C!==void 0){se(C,J);return}s!==void 0&&se(s,J)}};return F(b(Vw.Provider,{value:T},b(Hv,{disabled:m},b(ba.Provider,{value:Q},b(Ww,{validateMessages:E},b(ho.Provider,{value:oe},b(Hw,{status:!0},b(Ws,Object.assign({id:_},M,{name:_,onFinishFailed:fe,form:N,ref:ee,style:Object.assign(Object.assign({},c),R),className:q})))))))))},f8=Se(d8);function h8(t){if(typeof t=="function")return t;const e=sr(t);return e.length<=1?e[0]:e}const DP=()=>{const{status:t,errors:e=[],warnings:n=[]}=he(ei);return{status:t,errors:e,warnings:n}};DP.Context=ei;function m8(t){const[e,n]=te(t),r=ne(null),i=ne([]),o=ne(!1);ye(()=>(o.current=!1,()=>{o.current=!0,Yt.cancel(r.current),r.current=null}),[]);function a(s){o.current||(r.current===null&&(i.current=[],r.current=Yt(()=>{r.current=null,n(l=>{let c=l;return i.current.forEach(u=>{c=u(c)}),c})})),i.current.push(s))}return[e,a]}function p8(){const{itemRef:t}=he(ho),e=ne({});function n(r,i){const o=i&&typeof i=="object"&&Xo(i),a=r.join("_");return(e.current.name!==a||e.current.originRef!==o)&&(e.current.name=a,e.current.originRef=o,e.current.ref=vr(t(r),o)),e.current.ref}return n}const g8=t=>{const{formItemCls:e}=t;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${e}-control`]:{display:"flex"}}}},v8=Ea(["Form","item-item"],(t,{rootPrefixCls:e})=>{const n=jP(t,e);return g8(n)});var O8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,status:n,labelCol:r,wrapperCol:i,children:o,errors:a,warnings:s,_internalItemRender:l,extra:c,help:u,fieldId:d,marginBottom:f,onErrorVisibleChanged:h,label:m}=t,p=`${e}-item`,g=he(ho),O=ve(()=>{let M=Object.assign({},i||g.wrapperCol||{});return m===null&&!r&&!i&&g.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(E=>{const k=E?[E]:[],z=si(g.labelCol,k),L=typeof z=="object"?z:{},B=si(M,k),F=typeof B=="object"?B:{};"span"in L&&!("offset"in F)&&L.span{const{labelCol:M,wrapperCol:Q}=g;return O8(g,["labelCol","wrapperCol"])},[g]),S=ne(null),[x,$]=te(0);Lt(()=>{c&&S.current?$(S.current.clientHeight):$(0)},[c]);const C=b("div",{className:`${p}-control-input`},b("div",{className:`${p}-control-input-content`},o)),P=ve(()=>({prefixCls:e,status:n}),[e,n]),w=f!==null||a.length||s.length?b(f0.Provider,{value:P},b(LP,{fieldId:d,errors:a,warnings:s,help:u,helpStatus:n,className:`${p}-explain-connected`,onVisibleChanged:h})):null,_={};d&&(_.id=`${d}_extra`);const R=c?b("div",Object.assign({},_,{className:`${p}-extra`,ref:S}),c):null,I=w||R?b("div",{className:`${p}-additional`,style:f?{minHeight:f+x}:{}},w,R):null,T=l&&l.mark==="pro_table_render"&&l.render?l.render(t,{input:C,errorList:w,extra:R}):b(Qt,null,C,I);return b(ho.Provider,{value:y},b(Qr,Object.assign({},O,{className:v}),T),b(v8,{prefixCls:e}))};var S8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},x8=function(e,n){return b(Mt,xe({},e,{ref:n,icon:S8}))},$8=Se(x8),C8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var u;const[d]=Ii("Form"),{labelAlign:f,labelCol:h,labelWrap:m,colon:p}=he(ho);if(!e)return null;const g=r||h||{},O=i||f,v=`${t}-item-label`,y=U(v,O==="left"&&`${v}-left`,g.className,{[`${v}-wrap`]:!!m});let S=e;const x=o===!0||p!==!1&&o!==!1;x&&!c&&typeof e=="string"&&e.trim()&&(S=e.replace(/[:|:]\s*$/,""));const C=YB(l);if(C){const{icon:T=b($8,null)}=C,M=C8(C,["icon"]),Q=b(on,Object.assign({},M),Un(T,{className:`${t}-item-tooltip`,title:"",onClick:E=>{E.preventDefault()},tabIndex:null}));S=b(Qt,null,S,Q)}const P=s==="optional",w=typeof s=="function",_=s===!1;w?S=s(S,{required:!!a}):P&&!a&&(S=b(Qt,null,S,b("span",{className:`${t}-item-optional`,title:""},(d==null?void 0:d.optional)||((u=Gi.Form)===null||u===void 0?void 0:u.optional))));let R;_?R="hidden":(P||w)&&(R="optional");const I=U({[`${t}-item-required`]:a,[`${t}-item-required-mark-${R}`]:R,[`${t}-item-no-colon`]:!x});return b(Qr,Object.assign({},g,{className:y}),b("label",{htmlFor:n,className:I,title:typeof e=="string"?e:""},S))},P8={success:Qf,warning:Ds,error:Ls,validating:wc};function BP({children:t,errors:e,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:o,meta:a,noStyle:s,name:l}){const c=`${o}-item`,{feedbackIcons:u}=he(ho),d=vP(e,n,a,null,!!r,i),{isFormItemInput:f,status:h,hasFeedback:m,feedbackIcon:p,name:g}=he(ei),O=ve(()=>{var v;let y;if(r){const x=r!==!0&&r.icons||u,$=d&&((v=x==null?void 0:x({status:d,errors:e,warnings:n}))===null||v===void 0?void 0:v[d]),C=d&&P8[d];y=$!==!1&&C?b("span",{className:U(`${c}-feedback-icon`,`${c}-feedback-icon-${d}`)},$||b(C,null)):null}const S={status:d||"",errors:e,warnings:n,hasFeedback:!!r,feedbackIcon:y,isFormItemInput:!0,name:l};return s&&(S.status=(d??h)||"",S.isFormItemInput=f,S.hasFeedback=!!(r??m),S.feedbackIcon=r!==void 0?S.feedbackIcon:p,S.name=l??g),S},[d,r,s,f,h]);return b(ei.Provider,{value:O},t)}var _8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{if(T&&w.current){const F=getComputedStyle(w.current);E(parseInt(F.marginBottom,10))}},[T,M]);const k=F=>{F||E(null)},L=((F=!1)=>{const H=F?_:c.errors,X=F?R:c.warnings;return vP(H,X,c,"",!!u,l)})(),B=U(S,n,r,{[`${S}-with-help`]:I||_.length||R.length,[`${S}-has-feedback`]:L&&u,[`${S}-has-success`]:L==="success",[`${S}-has-warning`]:L==="warning",[`${S}-has-error`]:L==="error",[`${S}-is-validating`]:L==="validating",[`${S}-hidden`]:d,[`${S}-${C}`]:C});return b("div",{className:B,style:i,ref:w},b(Ca,Object.assign({className:`${S}-row`},pn(y,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),b(w8,Object.assign({htmlFor:h},t,{requiredMark:x,required:m??p,prefixCls:e,vertical:P})),b(y8,Object.assign({},t,c,{errors:_,warnings:R,prefixCls:e,status:L,help:o,marginBottom:Q,onErrorVisibleChanged:k}),b(Bw.Provider,{value:g},b(BP,{prefixCls:e,meta:c,errors:c.errors,warnings:c.warnings,hasFeedback:u,validateStatus:L,name:v},f)))),!!Q&&b("div",{className:`${S}-margin-offset`,style:{marginBottom:-Q}}))}const R8="__SPLIT__";function I8(t,e){const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(i=>{const o=t[i],a=e[i];return o===a||typeof o=="function"||typeof a=="function"})}const M8=Ma(({children:t})=>t,(t,e)=>I8(t.control,e.control)&&t.update===e.update&&t.childProps.length===e.childProps.length&&t.childProps.every((n,r)=>n===e.childProps[r]));function LS(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function E8(t){const{name:e,noStyle:n,className:r,dependencies:i,prefixCls:o,shouldUpdate:a,rules:s,children:l,required:c,label:u,messageVariables:d,trigger:f="onChange",validateTrigger:h,hidden:m,help:p,layout:g}=t,{getPrefixCls:O}=he(lt),{name:v}=he(ho),y=h8(l),S=typeof y=="function",x=he(Bw),{validateTrigger:$}=he(xa),C=h!==void 0?h:$,P=e!=null,w=O("form",o),_=Tr(w),[R,I,T]=N0(w,_);Cc();const M=he(Gl),Q=ne(null),[E,k]=m8({}),[z,L]=ya(()=>LS()),B=oe=>{const ee=M==null?void 0:M.getKey(oe.name);if(L(oe.destroy?LS():oe,!0),n&&p!==!1&&x){let se=oe.name;if(oe.destroy)se=Q.current||se;else if(ee!==void 0){const[fe,re]=ee;se=[fe].concat(Ce(re)),Q.current=se}x(oe,se)}},F=(oe,ee)=>{k(se=>{const fe=Object.assign({},se),J=[].concat(Ce(oe.name.slice(0,-1)),Ce(ee)).join(R8);return oe.destroy?delete fe[J]:fe[J]=oe,fe})},[H,X]=ve(()=>{const oe=Ce(z.errors),ee=Ce(z.warnings);return Object.values(E).forEach(se=>{oe.push.apply(oe,Ce(se.errors||[])),ee.push.apply(ee,Ce(se.warnings||[]))}),[oe,ee]},[E,z.errors,z.warnings]),q=p8();function N(oe,ee,se){return n&&!m?b(BP,{prefixCls:w,hasFeedback:t.hasFeedback,validateStatus:t.validateStatus,meta:z,errors:H,warnings:X,noStyle:!0,name:e},oe):b(T8,Object.assign({key:"row"},t,{className:U(r,T,_,I),prefixCls:w,fieldId:ee,isRequired:se,errors:H,warnings:X,meta:z,onSubItemMetaChange:F,layout:g,name:e}),oe)}if(!P&&!S&&!i)return R(N(y));let j={};return typeof u=="string"?j.label=u:e&&(j.label=String(e)),d&&(j=Object.assign(Object.assign({},j),d)),R(b(u0,Object.assign({},t,{messageVariables:j,trigger:f,validateTrigger:C,onMetaChange:B}),(oe,ee,se)=>{const fe=Tl(e).length&&ee?ee.name:[],re=gP(fe,v),J=c!==void 0?c:!!(s!=null&&s.some(D=>{if(D&&typeof D=="object"&&D.required&&!D.warningOnly)return!0;if(typeof D=="function"){const Y=D(se);return(Y==null?void 0:Y.required)&&!(Y!=null&&Y.warningOnly)}return!1})),ue=Object.assign({},oe);let de=null;if(Array.isArray(y)&&P)de=y;else if(!(S&&(!(a||i)||P))){if(!(i&&!S&&!P))if(en(y)){const D=Object.assign(Object.assign({},y.props),ue);if(D.id||(D.id=re),p||H.length>0||X.length>0||t.extra){const G=[];(p||H.length>0)&&G.push(`${re}_help`),t.extra&&G.push(`${re}_extra`),D["aria-describedby"]=G.join(" ")}H.length>0&&(D["aria-invalid"]="true"),J&&(D["aria-required"]="true"),bo(y)&&(D.ref=q(fe,y)),new Set([].concat(Ce(Tl(f)),Ce(Tl(C)))).forEach(G=>{D[G]=(...ce)=>{var ae,pe,Oe,be,ge;(Oe=ue[G])===null||Oe===void 0||(ae=Oe).call.apply(ae,[ue].concat(ce)),(ge=(be=y.props)[G])===null||ge===void 0||(pe=ge).call.apply(pe,[be].concat(ce))}});const me=[D["aria-required"],D["aria-invalid"],D["aria-describedby"]];de=b(M8,{control:ue,update:y,childProps:me},lr(y,D))}else S&&(a||i)&&!P?de=y(se):de=y}return N(de,re,J)}))}const WP=E8;WP.useStatus=DP;var k8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{prefixCls:e,children:n}=t,r=k8(t,["prefixCls","children"]);const{getPrefixCls:i}=he(lt),o=i("form",e),a=ve(()=>({prefixCls:o,status:"error"}),[o]);return b(zw,Object.assign({},r),(s,l,c)=>b(f0.Provider,{value:a},n(s.map(u=>Object.assign(Object.assign({},u),{fieldKey:u.key})),l,{errors:c.errors,warnings:c.warnings})))};function Q8(){const{form:t}=he(ho);return t}const wr=f8;wr.Item=WP;wr.List=A8;wr.ErrorList=LP;wr.useForm=OP;wr.useFormInstance=Q8;wr.useWatch=Dw;wr.Provider=Ww;wr.create=()=>{};var N8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},z8=function(e,n){return b(Mt,xe({},e,{ref:n,icon:N8}))},HP=Se(z8);const j8=t=>{const{getPrefixCls:e,direction:n}=he(lt),{prefixCls:r,className:i}=t,o=e("input-group",r),a=e("input"),[s,l,c]=$P(a),u=U(o,c,{[`${o}-lg`]:t.size==="large",[`${o}-sm`]:t.size==="small",[`${o}-compact`]:t.compact,[`${o}-rtl`]:n==="rtl"},l,i),d=he(ei),f=ve(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return s(b("span",{className:u,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},b(ei.Provider,{value:f},t.children)))},L8=t=>{const{componentCls:e,paddingXS:n}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${e}-input-wrapper`]:{position:"relative",[`${e}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${e}-mask-input`]:{color:"transparent",caretColor:t.colorText},[`${e}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${e}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},D8=Ft(["Input","OTP"],t=>{const e=It(t,Qc(t));return L8(e)},Nc);var B8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{className:n,value:r,onChange:i,onActiveChange:o,index:a,mask:s}=t,l=B8(t,["className","value","onChange","onActiveChange","index","mask"]),{getPrefixCls:c}=he(lt),u=c("otp"),d=typeof s=="string"?s:r,f=ne(null);Jt(e,()=>f.current);const h=g=>{i(a,g.target.value)},m=()=>{Yt(()=>{var g;const O=(g=f.current)===null||g===void 0?void 0:g.input;document.activeElement===O&&O&&O.select()})},p=g=>{const{key:O,ctrlKey:v,metaKey:y}=g;O==="ArrowLeft"?o(a-1):O==="ArrowRight"?o(a+1):O==="z"&&(v||y)?g.preventDefault():O==="Backspace"&&!r&&o(a-1),m()};return b("span",{className:`${u}-input-wrapper`,role:"presentation"},s&&r!==""&&r!==void 0&&b("span",{className:`${u}-mask-icon`,"aria-hidden":"true"},d),b(sh,Object.assign({"aria-label":`OTP Input ${a+1}`,type:s===!0?"password":"text"},l,{ref:f,value:r,onInput:h,onFocus:m,onKeyDown:p,onMouseDown:m,onMouseUp:m,className:U(n,{[`${u}-mask-input`]:s})})))});var H8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{index:e,prefixCls:n,separator:r}=t,i=typeof r=="function"?r(e):r;return i?b("span",{className:`${n}-separator`},i):null},F8=Se((t,e)=>{const{prefixCls:n,length:r=6,size:i,defaultValue:o,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:h,mask:m,type:p,onInput:g,inputMode:O}=t,v=H8(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:y,direction:S}=he(lt),x=y("otp",n),$=mi(v,{aria:!0,data:!0,attr:!0}),[C,P,w]=D8(x),_=br(q=>i??q),R=he(ei),I=Yf(R.status,f),T=ve(()=>Object.assign(Object.assign({},R),{status:I,hasFeedback:!1,feedbackIcon:null}),[R,I]),M=ne(null),Q=ne({});Jt(e,()=>({focus:()=>{var q;(q=Q.current[0])===null||q===void 0||q.focus()},blur:()=>{var q;for(let N=0;Nl?l(q):q,[k,z]=te(()=>hu(E(o||"")));ye(()=>{a!==void 0&&z(hu(a))},[a]);const L=bn(q=>{z(q),g&&g(q),s&&q.length===r&&q.every(N=>N)&&q.some((N,j)=>k[j]!==N)&&s(q.join(""))}),B=bn((q,N)=>{let j=Ce(k);for(let ee=0;ee=0&&!j[ee];ee-=1)j.pop();const oe=E(j.map(ee=>ee||" ").join(""));return j=hu(oe).map((ee,se)=>ee===" "&&!j[se]?j[se]:ee),j}),F=(q,N)=>{var j;const oe=B(q,N),ee=Math.min(q+N.length,r-1);ee!==q&&oe[q]!==void 0&&((j=Q.current[ee])===null||j===void 0||j.focus()),L(oe)},H=q=>{var N;(N=Q.current[q])===null||N===void 0||N.focus()},X={variant:u,disabled:d,status:I,mask:m,type:p,inputMode:O};return C(b("div",Object.assign({},$,{ref:M,className:U(x,{[`${x}-sm`]:_==="small",[`${x}-lg`]:_==="large",[`${x}-rtl`]:S==="rtl"},w,P),role:"group"}),b(ei.Provider,{value:T},Array.from({length:r}).map((q,N)=>{const j=`otp-${N}`,oe=k[N]||"";return b(Qt,{key:j},b(W8,Object.assign({ref:ee=>{Q.current[N]=ee},index:N,size:_,htmlSize:1,className:`${x}-input`,onChange:F,value:oe,onActiveChange:H,autoFocus:N===0&&h},X)),Nb(t?HP:q8,null),Y8={click:"onClick",hover:"onMouseOver"},K8=Se((t,e)=>{const{disabled:n,action:r="click",visibilityToggle:i=!0,iconRender:o=U8,suffix:a}=t,s=he(Ui),l=n??s,c=typeof i=="object"&&i.visible!==void 0,[u,d]=te(()=>c?i.visible:!1),f=ne(null);ye(()=>{c&&d(i.visible)},[c,i]);const h=QP(f),m=()=>{var R;if(l)return;u&&h();const I=!u;d(I),typeof i=="object"&&((R=i.onVisibleChange)===null||R===void 0||R.call(i,I))},p=R=>{const I=Y8[r]||"",T=o(u),M={[I]:m,className:`${R}-icon`,key:"passwordIcon",onMouseDown:Q=>{Q.preventDefault()},onMouseUp:Q=>{Q.preventDefault()}};return Un(en(T)?T:b("span",null,T),M)},{className:g,prefixCls:O,inputPrefixCls:v,size:y}=t,S=G8(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:x}=he(lt),$=x("input",v),C=x("input-password",O),P=i&&p(C),w=U(C,g,{[`${C}-${y}`]:!!y}),_=Object.assign(Object.assign({},pn(S,["suffix","iconRender","visibilityToggle"])),{type:u?"text":"password",className:w,prefixCls:$,suffix:b(Qt,null,P,a)});return y&&(_.size=y),b(sh,Object.assign({ref:vr(e,f)},_))});var J8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,inputPrefixCls:r,className:i,size:o,suffix:a,enterButton:s=!1,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:f,onCompositionStart:h,onCompositionEnd:m,variant:p,onPressEnter:g}=t,O=J8(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant","onPressEnter"]),{getPrefixCls:v,direction:y}=he(lt),S=ne(!1),x=v("input-search",n),$=v("input",r),{compactSize:C}=Bs(x,y),P=br(X=>{var q;return(q=o??C)!==null&&q!==void 0?q:X}),w=ne(null),_=X=>{X!=null&&X.target&&X.type==="click"&&d&&d(X.target.value,X,{source:"clear"}),f==null||f(X)},R=X=>{var q;document.activeElement===((q=w.current)===null||q===void 0?void 0:q.input)&&X.preventDefault()},I=X=>{var q,N;d&&d((N=(q=w.current)===null||q===void 0?void 0:q.input)===null||N===void 0?void 0:N.value,X,{source:"input"})},T=X=>{S.current||c||(g==null||g(X),I(X))},M=typeof s=="boolean"?b(N2,null):null,Q=`${x}-button`;let E;const k=s||{},z=k.type&&k.type.__ANT_BUTTON===!0;z||k.type==="button"?E=lr(k,Object.assign({onMouseDown:R,onClick:X=>{var q,N;(N=(q=k==null?void 0:k.props)===null||q===void 0?void 0:q.onClick)===null||N===void 0||N.call(q,X),I(X)},key:"enterButton"},z?{className:Q,size:P}:{})):E=b(wt,{className:Q,color:s?"primary":"default",size:P,disabled:u,key:"enterButton",onMouseDown:R,onClick:I,loading:c,icon:M,variant:p==="borderless"||p==="filled"||p==="underlined"?"text":s?"solid":void 0},s),l&&(E=[E,lr(l,{key:"addonAfter"})]);const L=U(x,{[`${x}-rtl`]:y==="rtl",[`${x}-${P}`]:!!P,[`${x}-with-button`]:!!s},i),B=X=>{S.current=!0,h==null||h(X)},F=X=>{S.current=!1,m==null||m(X)},H=Object.assign(Object.assign({},O),{className:L,prefixCls:$,type:"search",size:P,variant:p,onPressEnter:T,onCompositionStart:B,onCompositionEnd:F,addonAfter:E,suffix:a,onChange:_,disabled:u});return b(sh,Object.assign({ref:vr(w,e)},H))});var t7=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -272,49 +272,61 @@ html body { top:0 !important; right:0 !important; pointer-events: none !important; -`,F8=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Yh={},Vr;function V8(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&Yh[n])return Yh[n];var r=window.getComputedStyle(t),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=F8.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return e&&n&&(Yh[n]=l),l}function H8(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Vr||(Vr=document.createElement("textarea"),Vr.setAttribute("tab-index","-1"),Vr.setAttribute("aria-hidden","true"),Vr.setAttribute("name","hiddenTextarea"),document.body.appendChild(Vr)),t.getAttribute("wrap")?Vr.setAttribute("wrap",t.getAttribute("wrap")):Vr.removeAttribute("wrap");var i=V8(t,e),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;Vr.setAttribute("style","".concat(l,";").concat(W8)),Vr.value=t.value||t.placeholder||"";var c=void 0,u=void 0,d,f=Vr.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=o),n!==null||r!==null){Vr.value=" ";var h=Vr.scrollHeight-o;n!==null&&(c=h*n,s==="border-box"&&(c=c+o+a),f=Math.max(c,f)),r!==null&&(u=h*r,s==="border-box"&&(u=u+o+a),d=f>u?"":"hidden",f=Math.min(u,f))}var p={height:f,overflowY:d,resize:"none"};return c&&(p.minHeight=c),u&&(p.maxHeight=u),p}var X8=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Uh=0,Kh=1,Jh=2,Z8=Se(function(t,e){var n=t,r=n.prefixCls,i=n.defaultValue,o=n.value,a=n.autoSize,s=n.onResize,l=n.className,c=n.style,u=n.disabled,d=n.onChange;n.onInternalAutoSize;var f=ut(n,X8),h=_n(i,{value:o,postState:function(V){return V??""}}),p=ae(h,2),m=p[0],g=p[1],v=function(V){g(V.target.value),d==null||d(V)},O=U();Yt(e,function(){return{textArea:O.current}});var S=ge(function(){return a&&Je(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),x=ae(S,2),b=x[0],C=x[1],$=!!a,w=J(Jh),P=ae(w,2),_=P[0],T=P[1],R=J(),k=ae(R,2),I=k[0],Q=k[1],M=function(){T(Uh)};Nt(function(){$&&M()},[o,b,C,$]),Nt(function(){if(_===Uh)T(Kh);else if(_===Kh){var H=H8(O.current,!1,b,C);T(Jh),Q(H)}},[_]);var E=U(),N=function(){Xt.cancel(E.current)},z=function(V){_===Jh&&(s==null||s(V),a&&(N(),E.current=Xt(function(){M()})))};be(function(){return N},[]);var L=$?I:null,F=W(W({},c),L);return(_===Uh||_===Kh)&&(F.overflowY="hidden",F.overflowX="hidden"),y(Kr,{onResize:z,disabled:!(a||s)},y("textarea",Ce({},f,{ref:O,style:F,className:Z(r,l,D({},"".concat(r,"-disabled"),u)),disabled:u,value:m,onChange:v})))}),q8=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],G8=oe.forwardRef(function(t,e){var n,r=t.defaultValue,i=t.value,o=t.onFocus,a=t.onBlur,s=t.onChange,l=t.allowClear,c=t.maxLength,u=t.onCompositionStart,d=t.onCompositionEnd,f=t.suffix,h=t.prefixCls,p=h===void 0?"rc-textarea":h,m=t.showCount,g=t.count,v=t.className,O=t.style,S=t.disabled,x=t.hidden,b=t.classNames,C=t.styles,$=t.onResize,w=t.onClear,P=t.onPressEnter,_=t.readOnly,T=t.autoSize,R=t.onKeyDown,k=ut(t,q8),I=_n(r,{value:i,defaultValue:r}),Q=ae(I,2),M=Q[0],E=Q[1],N=M==null?"":String(M),z=oe.useState(!1),L=ae(z,2),F=L[0],H=L[1],V=oe.useRef(!1),X=oe.useState(null),B=ae(X,2),G=B[0],se=B[1],re=U(null),le=U(null),me=function(){var ke;return(ke=le.current)===null||ke===void 0?void 0:ke.textArea},ie=function(){me().focus()};Yt(e,function(){var Be;return{resizableTextArea:le.current,focus:ie,blur:function(){me().blur()},nativeElement:((Be=re.current)===null||Be===void 0?void 0:Be.nativeElement)||me()}}),be(function(){H(function(Be){return!S&&Be})},[S]);var ne=oe.useState(null),ue=ae(ne,2),de=ue[0],j=ue[1];oe.useEffect(function(){if(de){var Be;(Be=me()).setSelectionRange.apply(Be,$e(de))}},[de]);var ee=yP(g,m),he=(n=ee.max)!==null&&n!==void 0?n:c,ve=Number(he)>0,Y=ee.strategy(N),ce=!!he&&Y>he,te=function(ke,Xe){var _e=Xe;!V.current&&ee.exceedFormatter&&ee.max&&ee.strategy(Xe)>ee.max&&(_e=ee.exceedFormatter(Xe,{max:ee.max}),Xe!==_e&&j([me().selectionStart||0,me().selectionEnd||0])),E(_e),Id(ke.currentTarget,ke,s,_e)},Oe=function(ke){V.current=!0,u==null||u(ke)},ye=function(ke){V.current=!1,te(ke,ke.currentTarget.value),d==null||d(ke)},pe=function(ke){te(ke,ke.target.value)},Qe=function(ke){ke.key==="Enter"&&P&&P(ke),R==null||R(ke)},Me=function(ke){H(!0),o==null||o(ke)},De=function(ke){H(!1),a==null||a(ke)},we=function(ke){E(""),ie(),Id(me(),ke,s)},Ie=f,rt;ee.show&&(ee.showFormatter?rt=ee.showFormatter({value:N,count:Y,maxLength:he}):rt="".concat(Y).concat(ve?" / ".concat(he):""),Ie=oe.createElement(oe.Fragment,null,Ie,oe.createElement("span",{className:Z("".concat(p,"-data-count"),b==null?void 0:b.count),style:C==null?void 0:C.count},rt)));var Ye=function(ke){var Xe;$==null||$(ke),(Xe=me())!==null&&Xe!==void 0&&Xe.style.height&&se(!0)},lt=!T&&!m&&!l;return oe.createElement(bP,{ref:re,value:N,allowClear:l,handleReset:we,suffix:Ie,prefixCls:p,classNames:W(W({},b),{},{affixWrapper:Z(b==null?void 0:b.affixWrapper,D(D({},"".concat(p,"-show-count"),m),"".concat(p,"-textarea-allow-clear"),l))}),disabled:S,focused:F,className:Z(v,ce&&"".concat(p,"-out-of-range")),style:W(W({},O),G&&!lt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof rt=="string"?rt:void 0}},hidden:x,readOnly:_,onClear:w},oe.createElement(Z8,Ce({},k,{autoSize:T,maxLength:c,onKeyDown:Qe,onChange:pe,onFocus:Me,onBlur:De,onCompositionStart:Oe,onCompositionEnd:ye,className:Z(b==null?void 0:b.textarea),style:W(W({},C==null?void 0:C.textarea),{},{resize:O==null?void 0:O.resize}),disabled:S,prefixCls:p,onResize:Ye,ref:le,readOnly:_})))});const Y8=t=>{const{componentCls:e,paddingLG:n}=t,r=`${e}-textarea`;return{[`textarea${e}`]:{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}`,resize:"vertical",[`&${e}-mouse-active`]:{transition:`all ${t.motionDurationSlow}, height 0s, width 0s`}},[`${e}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[` +`,n7=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],am={},Fr;function r7(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&am[n])return am[n];var r=window.getComputedStyle(t),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=n7.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return e&&n&&(am[n]=l),l}function i7(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Fr||(Fr=document.createElement("textarea"),Fr.setAttribute("tab-index","-1"),Fr.setAttribute("aria-hidden","true"),Fr.setAttribute("name","hiddenTextarea"),document.body.appendChild(Fr)),t.getAttribute("wrap")?Fr.setAttribute("wrap",t.getAttribute("wrap")):Fr.removeAttribute("wrap");var i=r7(t,e),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;Fr.setAttribute("style","".concat(l,";").concat(t7)),Fr.value=t.value||t.placeholder||"";var c=void 0,u=void 0,d,f=Fr.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=o),n!==null||r!==null){Fr.value=" ";var h=Fr.scrollHeight-o;n!==null&&(c=h*n,s==="border-box"&&(c=c+o+a),f=Math.max(c,f)),r!==null&&(u=h*r,s==="border-box"&&(u=u+o+a),d=f>u?"":"hidden",f=Math.min(u,f))}var m={height:f,overflowY:d,resize:"none"};return c&&(m.minHeight=c),u&&(m.maxHeight=u),m}var o7=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],sm=0,lm=1,cm=2,a7=Se(function(t,e){var n=t,r=n.prefixCls,i=n.defaultValue,o=n.value,a=n.autoSize,s=n.onResize,l=n.className,c=n.style,u=n.disabled,d=n.onChange;n.onInternalAutoSize;var f=gt(n,o7),h=Pn(i,{value:o,postState:function(X){return X??""}}),m=le(h,2),p=m[0],g=m[1],O=function(X){g(X.target.value),d==null||d(X)},v=ne();Jt(e,function(){return{textArea:v.current}});var y=ve(function(){return a&&nt(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),S=le(y,2),x=S[0],$=S[1],C=!!a,P=te(cm),w=le(P,2),_=w[0],R=w[1],I=te(),T=le(I,2),M=T[0],Q=T[1],E=function(){R(sm)};Lt(function(){C&&E()},[o,x,$,C]),Lt(function(){if(_===sm)R(lm);else if(_===lm){var H=i7(v.current,!1,x,$);R(cm),Q(H)}},[_]);var k=ne(),z=function(){Yt.cancel(k.current)},L=function(X){_===cm&&(s==null||s(X),a&&(z(),k.current=Yt(function(){E()})))};ye(function(){return z},[]);var B=C?M:null,F=Z(Z({},c),B);return(_===sm||_===lm)&&(F.overflowY="hidden",F.overflowX="hidden"),b(Jr,{onResize:L,disabled:!(a||s)},b("textarea",xe({},f,{ref:v,style:F,className:U(r,l,W({},"".concat(r,"-disabled"),u)),disabled:u,value:p,onChange:O})))}),s7=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],l7=K.forwardRef(function(t,e){var n,r=t.defaultValue,i=t.value,o=t.onFocus,a=t.onBlur,s=t.onChange,l=t.allowClear,c=t.maxLength,u=t.onCompositionStart,d=t.onCompositionEnd,f=t.suffix,h=t.prefixCls,m=h===void 0?"rc-textarea":h,p=t.showCount,g=t.count,O=t.className,v=t.style,y=t.disabled,S=t.hidden,x=t.classNames,$=t.styles,C=t.onResize,P=t.onClear,w=t.onPressEnter,_=t.readOnly,R=t.autoSize,I=t.onKeyDown,T=gt(t,s7),M=Pn(r,{value:i,defaultValue:r}),Q=le(M,2),E=Q[0],k=Q[1],z=E==null?"":String(E),L=K.useState(!1),B=le(L,2),F=B[0],H=B[1],X=K.useRef(!1),q=K.useState(null),N=le(q,2),j=N[0],oe=N[1],ee=ne(null),se=ne(null),fe=function(){var Re;return(Re=se.current)===null||Re===void 0?void 0:Re.textArea},re=function(){fe().focus()};Jt(e,function(){var Be;return{resizableTextArea:se.current,focus:re,blur:function(){fe().blur()},nativeElement:((Be=ee.current)===null||Be===void 0?void 0:Be.nativeElement)||fe()}}),ye(function(){H(function(Be){return!y&&Be})},[y]);var J=K.useState(null),ue=le(J,2),de=ue[0],D=ue[1];K.useEffect(function(){if(de){var Be;(Be=fe()).setSelectionRange.apply(Be,Ce(de))}},[de]);var Y=kP(g,p),me=(n=Y.max)!==null&&n!==void 0?n:c,G=Number(me)>0,ce=Y.strategy(z),ae=!!me&&ce>me,pe=function(Re,Xe){var _e=Xe;!X.current&&Y.exceedFormatter&&Y.max&&Y.strategy(Xe)>Y.max&&(_e=Y.exceedFormatter(Xe,{max:Y.max}),Xe!==_e&&D([fe().selectionStart||0,fe().selectionEnd||0])),k(_e),Ld(Re.currentTarget,Re,s,_e)},Oe=function(Re){X.current=!0,u==null||u(Re)},be=function(Re){X.current=!1,pe(Re,Re.currentTarget.value),d==null||d(Re)},ge=function(Re){pe(Re,Re.target.value)},Me=function(Re){Re.key==="Enter"&&w&&w(Re),I==null||I(Re)},Ie=function(Re){H(!0),o==null||o(Re)},He=function(Re){H(!1),a==null||a(Re)},Ae=function(Re){k(""),re(),Ld(fe(),Re,s)},Ee=f,st;Y.show&&(Y.showFormatter?st=Y.showFormatter({value:z,count:ce,maxLength:me}):st="".concat(ce).concat(G?" / ".concat(me):""),Ee=K.createElement(K.Fragment,null,Ee,K.createElement("span",{className:U("".concat(m,"-data-count"),x==null?void 0:x.count),style:$==null?void 0:$.count},st)));var Ye=function(Re){var Xe;C==null||C(Re),(Xe=fe())!==null&&Xe!==void 0&&Xe.style.height&&oe(!0)},rt=!R&&!p&&!l;return K.createElement(EP,{ref:ee,value:z,allowClear:l,handleReset:Ae,suffix:Ee,prefixCls:m,classNames:Z(Z({},x),{},{affixWrapper:U(x==null?void 0:x.affixWrapper,W(W({},"".concat(m,"-show-count"),p),"".concat(m,"-textarea-allow-clear"),l))}),disabled:y,focused:F,className:U(O,ae&&"".concat(m,"-out-of-range")),style:Z(Z({},v),j&&!rt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof st=="string"?st:void 0}},hidden:S,readOnly:_,onClear:P},K.createElement(a7,xe({},T,{autoSize:R,maxLength:c,onKeyDown:Me,onChange:ge,onFocus:Ie,onBlur:He,onCompositionStart:Oe,onCompositionEnd:be,className:U(x==null?void 0:x.textarea),style:Z(Z({},$==null?void 0:$.textarea),{},{resize:v==null?void 0:v.resize}),disabled:y,prefixCls:m,onResize:Ye,ref:se,readOnly:_})))});const c7=t=>{const{componentCls:e,paddingLG:n}=t,r=`${e}-textarea`;return{[`textarea${e}`]:{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}`,resize:"vertical",[`&${e}-mouse-active`]:{transition:`all ${t.motionDurationSlow}, height 0s, width 0s`}},[`${e}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[` &-allow-clear > ${e}, &-affix-wrapper${r}-has-feedback ${e} - `]:{paddingInlineEnd:n},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-rtl`]:{[`${e}-suffix`]:{[`${e}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},U8=Zt(["Input","TextArea"],t=>{const e=kt(t,Gf(t));return Y8(e)},Yf,{resetFont:!1});var K8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const{prefixCls:r,bordered:i=!0,size:o,disabled:a,status:s,allowClear:l,classNames:c,rootClassName:u,className:d,style:f,styles:h,variant:p,showCount:m,onMouseDown:g,onResize:v}=t,O=K8(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:S,direction:x,allowClear:b,autoComplete:C,className:$,style:w,classNames:P,styles:_}=rr("textArea"),T=fe(qi),R=a??T,{status:k,hasFeedback:I,feedbackIcon:Q}=fe(Jr),M=Wf(k,s),E=U(null);Yt(e,()=>{var ee;return{resizableTextArea:(ee=E.current)===null||ee===void 0?void 0:ee.resizableTextArea,focus:he=>{var ve,Y;OP((Y=(ve=E.current)===null||ve===void 0?void 0:ve.resizableTextArea)===null||Y===void 0?void 0:Y.textArea,he)},blur:()=>{var he;return(he=E.current)===null||he===void 0?void 0:he.blur()}}});const N=S("input",r),z=$r(N),[L,F,H]=cP(N,u),[V]=U8(N,z),{compactSize:X,compactItemClassnames:B}=js(N,x),G=Dr(ee=>{var he;return(he=o??X)!==null&&he!==void 0?he:ee}),[se,re]=Ff("textArea",p,i),le=SP(l??b),[me,ie]=J(!1),[ne,ue]=J(!1),de=ee=>{ie(!0),g==null||g(ee);const he=()=>{ie(!1),document.removeEventListener("mouseup",he)};document.addEventListener("mouseup",he)},j=ee=>{var he,ve;if(v==null||v(ee),me&&typeof getComputedStyle=="function"){const Y=(ve=(he=E.current)===null||he===void 0?void 0:he.nativeElement)===null||ve===void 0?void 0:ve.querySelector("textarea");Y&&getComputedStyle(Y).resize==="both"&&ue(!0)}};return L(V(y(G8,Object.assign({autoComplete:C},O,{style:Object.assign(Object.assign({},w),f),styles:Object.assign(Object.assign({},_),h),disabled:R,allowClear:le,className:Z(H,z,d,u,B,$,ne&&`${N}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),P),{textarea:Z({[`${N}-sm`]:G==="small",[`${N}-lg`]:G==="large"},F,c==null?void 0:c.textarea,P.textarea,me&&`${N}-mouse-active`),variant:Z({[`${N}-${se}`]:re},Pd(N,M)),affixWrapper:Z(`${N}-textarea-affix-wrapper`,{[`${N}-affix-wrapper-rtl`]:x==="rtl",[`${N}-affix-wrapper-sm`]:G==="small",[`${N}-affix-wrapper-lg`]:G==="large",[`${N}-textarea-show-count`]:m||((n=t.count)===null||n===void 0?void 0:n.show)},F)}),prefixCls:N,suffix:I&&y("span",{className:`${N}-textarea-suffix`},Q),showCount:m,ref:E,onResize:j,onMouseDown:de}))))}),bi=Kf;bi.Group=w8;bi.Search=B8;bi.TextArea=RP;bi.Password=j8;bi.OTP=M8;function J8(t,e,n){return typeof n=="boolean"?n:t.length?!0:nr(e).some(i=>i.type===Y2)}var IP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);iSe((o,a)=>y(r,Object.assign({ref:a,suffixCls:t,tagName:e},o)))}const _0=Se((t,e)=>{const{prefixCls:n,suffixCls:r,className:i,tagName:o}=t,a=IP(t,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:s}=fe(it),l=s("layout",n),[c,u,d]=G2(l),f=r?`${l}-${r}`:l;return c(y(o,Object.assign({className:Z(n||f,i,u,d),ref:e},a)))}),e7=Se((t,e)=>{const{direction:n}=fe(it),[r,i]=J([]),{prefixCls:o,className:a,rootClassName:s,children:l,hasSider:c,tagName:u,style:d}=t,f=IP(t,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),h=cn(f,["suffixCls"]),{getPrefixCls:p,className:m,style:g}=rr("layout"),v=p("layout",o),O=J8(r,l,c),[S,x,b]=G2(v),C=Z(v,{[`${v}-has-sider`]:O,[`${v}-rtl`]:n==="rtl"},m,a,s,x,b),$=ge(()=>({siderHook:{addSider:w=>{i(P=>[].concat($e(P),[w]))},removeSider:w=>{i(P=>P.filter(_=>_!==w))}}}),[]);return S(y(X2.Provider,{value:$},y(u,Object.assign({ref:e,className:C,style:Object.assign(Object.assign({},g),d)},h),l)))}),t7=Jf({tagName:"div",displayName:"Layout"})(e7),n7=Jf({suffixCls:"header",tagName:"header",displayName:"Header"})(_0),r7=Jf({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(_0),i7=Jf({suffixCls:"content",tagName:"main",displayName:"Content"})(_0),Zr=t7;Zr.Header=n7;Zr.Footer=r7;Zr.Content=i7;Zr.Sider=Y2;Zr._InternalSiderContext=Zf;const Ed=100,MP=Ed/5,EP=Ed/2-MP/2,ep=EP*2*Math.PI,k1=50,R1=t=>{const{dotClassName:e,style:n,hasCircleCls:r}=t;return y("circle",{className:Z(`${e}-circle`,{[`${e}-circle-bg`]:r}),r:EP,cx:k1,cy:k1,strokeWidth:MP,style:n})},o7=({percent:t,prefixCls:e})=>{const n=`${e}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[o,a]=J(!1);Nt(()=>{t!==0&&a(!0)},[t!==0]);const s=Math.max(Math.min(t,100),0);if(!o)return null;const l={strokeDashoffset:`${ep/4}`,strokeDasharray:`${ep*s/100} ${ep*(100-s)/100}`};return y("span",{className:Z(r,`${n}-progress`,s<=0&&i)},y("svg",{viewBox:`0 0 ${Ed} ${Ed}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},y(R1,{dotClassName:n,hasCircleCls:!0}),y(R1,{dotClassName:n,style:l})))};function a7(t){const{prefixCls:e,percent:n=0}=t,r=`${e}-dot`,i=`${r}-holder`,o=`${i}-hidden`;return y(At,null,y("span",{className:Z(i,n>0&&o)},y("span",{className:Z(r,`${e}-dot-spin`)},[1,2,3,4].map(a=>y("i",{className:`${e}-dot-item`,key:a})))),y(o7,{prefixCls:e,percent:n}))}function s7(t){var e;const{prefixCls:n,indicator:r,percent:i}=t,o=`${n}-dot`;return r&&Kt(r)?fr(r,{className:Z((e=r.props)===null||e===void 0?void 0:e.className,o),percent:i}):y(a7,{prefixCls:n,percent:i})}const l7=new _t("antSpinMove",{to:{opacity:1}}),c7=new _t("antRotate",{to:{transform:"rotate(405deg)"}}),u7=t=>{const{componentCls:e,calc:n}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{position:"absolute",display:"none",color:t.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${e}-text`]:{fontSize:t.fontSize,paddingTop:n(n(t.dotSize).sub(t.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:t.colorBgMask,zIndex:t.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${t.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[e]:{[`${e}-dot-holder`]:{color:t.colorWhite},[`${e}-text`]:{color:t.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${e}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:t.contentHeight,[`${e}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(t.dotSize).mul(-1).div(2).equal()},[`${e}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${t.colorBgContainer}`},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${e}-dot`]:{margin:n(t.dotSizeSM).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:n(n(t.dotSizeSM).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${e}-dot`]:{margin:n(t.dotSizeLG).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:n(n(t.dotSizeLG).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${e}-container`]:{position:"relative",transition:`opacity ${t.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:t.colorBgContainer,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:t.spinDotDefault},[`${e}-dot-holder`]:{width:"1em",height:"1em",fontSize:t.dotSize,display:"inline-block",transition:`transform ${t.motionDurationSlow} ease, opacity ${t.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:t.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${e}-dot-progress`]:{position:"absolute",inset:0},[`${e}-dot`]:{position:"relative",display:"inline-block",fontSize:t.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(t.dotSize).sub(n(t.marginXXS).div(2)).div(2).equal(),height:n(t.dotSize).sub(n(t.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:l7,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:c7,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(r=>`${r} ${t.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:t.colorFillSecondary}},[`&-sm ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeSM}},[`&-sm ${e}-dot-holder`]:{i:{width:n(n(t.dotSizeSM).sub(n(t.marginXXS).div(2))).div(2).equal(),height:n(n(t.dotSizeSM).sub(n(t.marginXXS).div(2))).div(2).equal()}},[`&-lg ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeLG}},[`&-lg ${e}-dot-holder`]:{i:{width:n(n(t.dotSizeLG).sub(t.marginXXS)).div(2).equal(),height:n(n(t.dotSizeLG).sub(t.marginXXS)).div(2).equal()}},[`&${e}-show-text ${e}-text`]:{display:"block"}})}},d7=t=>{const{controlHeightLG:e,controlHeight:n}=t;return{contentHeight:400,dotSize:e/2,dotSizeSM:e*.35,dotSizeLG:n}},f7=Zt("Spin",t=>{const e=kt(t,{spinDotDefault:t.colorTextDescription});return u7(e)},d7),h7=200,I1=[[30,.05],[70,.03],[96,.01]];function p7(t,e){const[n,r]=J(0),i=U(null),o=e==="auto";return be(()=>(o&&t&&(r(0),i.current=setInterval(()=>{r(a=>{const s=100-a;for(let l=0;l{clearInterval(i.current)}),[o,t]),o?n:e}var m7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var e;const{prefixCls:n,spinning:r=!0,delay:i=0,className:o,rootClassName:a,size:s="default",tip:l,wrapperClassName:c,style:u,children:d,fullscreen:f=!1,indicator:h,percent:p}=t,m=m7(t,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:g,direction:v,className:O,style:S,indicator:x}=rr("spin"),b=g("spin",n),[C,$,w]=f7(b),[P,_]=J(()=>r&&!g7(r,i)),T=p7(P,p);be(()=>{if(r){const N=pB(i,()=>{_(!0)});return N(),()=>{var z;(z=N==null?void 0:N.cancel)===null||z===void 0||z.call(N)}}_(!1)},[i,r]);const R=ge(()=>typeof d<"u"&&!f,[d,f]),k=Z(b,O,{[`${b}-sm`]:s==="small",[`${b}-lg`]:s==="large",[`${b}-spinning`]:P,[`${b}-show-text`]:!!l,[`${b}-rtl`]:v==="rtl"},o,!f&&a,$,w),I=Z(`${b}-container`,{[`${b}-blur`]:P}),Q=(e=h??x)!==null&&e!==void 0?e:AP,M=Object.assign(Object.assign({},S),u),E=y("div",Object.assign({},m,{style:M,className:k,"aria-live":"polite","aria-busy":P}),y(s7,{prefixCls:b,indicator:Q,percent:T}),l&&(R||f)?y("div",{className:`${b}-text`},l):null);return C(R?y("div",Object.assign({},m,{className:Z(`${b}-nested-loading`,c,$,w)}),P&&y("div",{key:"loading"},E),y("div",{className:I,key:"container"},d)):f?y("div",{className:Z(`${b}-fullscreen`,{[`${b}-fullscreen-show`]:P},a,$,w)},E):E)};QP.setDefaultIndicator=t=>{AP=t};const v7=(t,e=!1)=>e&&t==null?[]:Array.isArray(t)?t:[t];var O7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,closeIcon:r,closable:i,type:o,title:a,children:s,footer:l}=t,c=O7(t,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=fe(it),d=u(),f=e||u("modal"),h=$r(d),[p,m,g]=Qw(f,h),v=`${f}-confirm`;let O={};return o?O={closable:i??!1,title:"",footer:"",children:y(zw,Object.assign({},t,{prefixCls:f,confirmPrefixCls:v,rootPrefixCls:d,content:s}))}:O={closable:i??!0,title:a,footer:l!==null&&y(Iw,Object.assign({},t)),children:s},p(y(mw,Object.assign({prefixCls:f,className:Z(m,`${f}-pure-panel`,o&&v,o&&`${v}-${o}`,n,g,h)},c,{closeIcon:Rw(f,r),closable:i},O)))},y7=Kw(b7);function NP(t){return Pc(Bw(t))}const ur=Nw;ur.useModal=dN;ur.info=function(e){return Pc(Ww(e))};ur.success=function(e){return Pc(Fw(e))};ur.error=function(e){return Pc(Vw(e))};ur.warning=NP;ur.warn=NP;ur.confirm=function(e){return Pc(Hw(e))};ur.destroyAll=function(){for(;sa.length;){const e=sa.pop();e&&e()}};ur.config=aN;ur._InternalPanelDoNotUseOrYouWillBeFired=y7;let vi=null,qu=t=>t(),Ad=[],ql={};function M1(){const{getContainer:t,rtl:e,maxCount:n,top:r,bottom:i,showProgress:o,pauseOnHover:a}=ql,s=(t==null?void 0:t())||document.body;return{getContainer:()=>s,rtl:e,maxCount:n,top:r,bottom:i,showProgress:o,pauseOnHover:a}}const S7=oe.forwardRef((t,e)=>{const{notificationConfig:n,sync:r}=t,{getPrefixCls:i}=fe(it),o=ql.prefixCls||i("notification"),a=fe(AN),[s,l]=Uw(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),a.notification));return oe.useEffect(r,[]),oe.useImperativeHandle(e,()=>{const c=Object.assign({},s);return Object.keys(c).forEach(u=>{c[u]=(...d)=>(r(),s[u].apply(s,d))}),{instance:c,sync:r}}),l}),x7=oe.forwardRef((t,e)=>{const[n,r]=oe.useState(M1),i=()=>{r(M1)};oe.useEffect(i,[]);const o=V$(),a=o.getRootPrefixCls(),s=o.getIconPrefixCls(),l=o.getTheme(),c=oe.createElement(S7,{ref:e,sync:i,notificationConfig:n});return oe.createElement(Gr,{prefixCls:a,iconPrefixCls:s,theme:l},o.holderRender?o.holderRender(c):c)}),T0=()=>{if(!vi){const t=document.createDocumentFragment(),e={fragment:t};vi=e,qu(()=>{jv()(oe.createElement(x7,{ref:r=>{const{instance:i,sync:o}=r||{};Promise.resolve().then(()=>{!e.instance&&i&&(e.instance=i,e.sync=o,T0())})}}),t)});return}vi.instance&&(Ad.forEach(t=>{switch(t.type){case"open":{qu(()=>{vi.instance.open(Object.assign(Object.assign({},ql),t.config))});break}case"destroy":qu(()=>{var e;(e=vi==null?void 0:vi.instance)===null||e===void 0||e.destroy(t.key)});break}}),Ad=[])};function C7(t){ql=Object.assign(Object.assign({},ql),t),qu(()=>{var e;(e=vi==null?void 0:vi.sync)===null||e===void 0||e.call(vi)})}function zP(t){Ad.push({type:"open",config:t}),T0()}const $7=t=>{Ad.push({type:"destroy",key:t}),T0()},w7=["success","info","warning","error"],P7={open:zP,destroy:$7,config:C7,useNotification:EN,_InternalPanelDoNotUseOrYouWillBeFired:CN},ar=P7;w7.forEach(t=>{ar[t]=e=>zP(Object.assign(Object.assign({},e),{type:t}))});const _7=t=>{const{componentCls:e,iconCls:n,antCls:r,zIndexPopup:i,colorText:o,colorWarning:a,marginXXS:s,marginXS:l,fontSize:c,fontWeightStrong:u,colorTextHeading:d}=t;return{[e]:{zIndex:i,[`&${r}-popover`]:{fontSize:c},[`${e}-message`]:{marginBottom:l,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e}-message-icon ${n}`]:{color:a,fontSize:c,lineHeight:1,marginInlineEnd:l},[`${e}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:"normal"}},[`${e}-description`]:{marginTop:s,color:o}},[`${e}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:l}}}}},T7=t=>{const{zIndexPopupBase:e}=t;return{zIndexPopup:e+60}},LP=Zt("Popconfirm",t=>_7(t),T7,{resetStyle:!1});var k7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,okButtonProps:n,cancelButtonProps:r,title:i,description:o,cancelText:a,okText:s,okType:l="primary",icon:c=y(Ls,null),showCancel:u=!0,close:d,onConfirm:f,onCancel:h,onPopupClick:p}=t,{getPrefixCls:m}=fe(it),[g]=Ki("Popconfirm",Zi.Popconfirm),v=Ss(i),O=Ss(o);return y("div",{className:`${e}-inner-content`,onClick:p},y("div",{className:`${e}-message`},c&&y("span",{className:`${e}-message-icon`},c),y("div",{className:`${e}-message-text`},v&&y("div",{className:`${e}-title`},v),O&&y("div",{className:`${e}-description`},O))),y("div",{className:`${e}-buttons`},u&&y(vt,Object.assign({onClick:h,size:"small"},r),a||(g==null?void 0:g.cancelText)),y(Uv,{buttonProps:Object.assign(Object.assign({size:"small"},Bv(l)),n),actionFn:f,close:d,prefixCls:m("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},s||(g==null?void 0:g.okText))))},R7=t=>{const{prefixCls:e,placement:n,className:r,style:i}=t,o=k7(t,["prefixCls","placement","className","style"]),{getPrefixCls:a}=fe(it),s=a("popconfirm",e),[l]=LP(s);return l(y(E2,{placement:n,className:Z(s,r),style:i,content:y(jP,Object.assign({prefixCls:s},o))}))};var I7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,placement:o="top",trigger:a="click",okType:s="primary",icon:l=y(Ls,null),children:c,overlayClassName:u,onOpenChange:d,onVisibleChange:f,overlayStyle:h,styles:p,classNames:m}=t,g=I7(t,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:v,className:O,style:S,classNames:x,styles:b}=rr("popconfirm"),[C,$]=_n(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),w=(E,N)=>{$(E,!0),f==null||f(E),d==null||d(E,N)},P=E=>{w(!1,E)},_=E=>{var N;return(N=t.onConfirm)===null||N===void 0?void 0:N.call(void 0,E)},T=E=>{var N;w(!1,E),(N=t.onCancel)===null||N===void 0||N.call(void 0,E)},R=(E,N)=>{const{disabled:z=!1}=t;z||w(E,N)},k=v("popconfirm",i),I=Z(k,O,u,x.root,m==null?void 0:m.root),Q=Z(x.body,m==null?void 0:m.body),[M]=LP(k);return M(y(h0,Object.assign({},cn(g,["title"]),{trigger:a,placement:o,onOpenChange:R,open:C,ref:e,classNames:{root:I,body:Q},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},b.root),S),h),p==null?void 0:p.root),body:Object.assign(Object.assign({},b.body),p==null?void 0:p.body)},content:y(jP,Object.assign({okType:s,icon:l},t,{prefixCls:k,close:P,onConfirm:_,onCancel:T})),"data-popover-inject":!0}),c))}),DP=M7;DP._InternalPanelDoNotUseOrYouWillBeFired=R7;var E7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},A7=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:E7}))},wl=Se(A7),Q7=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],BP=Se(function(t,e){var n,r=t.prefixCls,i=r===void 0?"rc-switch":r,o=t.className,a=t.checked,s=t.defaultChecked,l=t.disabled,c=t.loadingIcon,u=t.checkedChildren,d=t.unCheckedChildren,f=t.onClick,h=t.onChange,p=t.onKeyDown,m=ut(t,Q7),g=_n(!1,{value:a,defaultValue:s}),v=ae(g,2),O=v[0],S=v[1];function x(w,P){var _=O;return l||(_=w,S(_),h==null||h(_,P)),_}function b(w){w.which===je.LEFT?x(!1,w):w.which===je.RIGHT&&x(!0,w),p==null||p(w)}function C(w){var P=x(!O,w);f==null||f(P,w)}var $=Z(i,o,(n={},D(n,"".concat(i,"-checked"),O),D(n,"".concat(i,"-disabled"),l),n));return y("button",Ce({},m,{type:"button",role:"switch","aria-checked":O,disabled:l,className:$,ref:e,onKeyDown:b,onClick:C}),c,y("span",{className:"".concat(i,"-inner")},y("span",{className:"".concat(i,"-inner-checked")},u),y("span",{className:"".concat(i,"-inner-unchecked")},d)))});BP.displayName="Switch";const N7=t=>{const{componentCls:e,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:o,innerMaxMarginSM:a,handleSizeSM:s,calc:l}=t,c=`${e}-inner`,u=q(l(s).add(l(r).mul(2)).equal()),d=q(l(a).mul(2).equal());return{[e]:{[`&${e}-small`]:{minWidth:i,height:n,lineHeight:q(n),[`${e}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${c}-unchecked`]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${e}-handle`]:{width:s,height:s},[`${e}-loading-icon`]:{top:l(l(s).sub(t.switchLoadingIconSize)).div(2).equal(),fontSize:t.switchLoadingIconSize},[`&${e}-checked`]:{[`${e}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${e}-handle`]:{insetInlineStart:`calc(100% - ${q(l(s).add(r).equal())})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(t.marginXXS).div(2).equal(),marginInlineEnd:l(t.marginXXS).mul(-1).div(2).equal()}},[`&${e}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(t.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(t.marginXXS).div(2).equal()}}}}}}},z7=t=>{const{componentCls:e,handleSize:n,calc:r}=t;return{[e]:{[`${e}-loading-icon${t.iconCls}`]:{position:"relative",top:r(r(n).sub(t.fontSize)).div(2).equal(),color:t.switchLoadingIconColor,verticalAlign:"top"},[`&${e}-checked ${e}-loading-icon`]:{color:t.switchColor}}}},L7=t=>{const{componentCls:e,trackPadding:n,handleBg:r,handleShadow:i,handleSize:o,calc:a}=t,s=`${e}-handle`;return{[e]:{[s]:{position:"absolute",top:n,insetInlineStart:n,width:o,height:o,transition:`all ${t.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:a(o).div(2).equal(),boxShadow:i,transition:`all ${t.switchDuration} ease-in-out`,content:'""'}},[`&${e}-checked ${s}`]:{insetInlineStart:`calc(100% - ${q(a(o).add(n).equal())})`},[`&:not(${e}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:t.switchHandleActiveInset,insetInlineStart:0},[`&${e}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:t.switchHandleActiveInset}}}}},j7=t=>{const{componentCls:e,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:o,handleSize:a,calc:s}=t,l=`${e}-inner`,c=q(s(a).add(s(r).mul(2)).equal()),u=q(s(o).mul(2).equal());return{[e]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:i,transition:`padding-inline-start ${t.switchDuration} ease-in-out, padding-inline-end ${t.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:t.colorTextLightSolid,fontSize:t.fontSizeSM,transition:`margin-inline-start ${t.switchDuration} ease-in-out, margin-inline-end ${t.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${l}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${e}-checked ${l}`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:s(r).mul(2).equal(),marginInlineEnd:s(r).mul(-1).mul(2).equal()}},[`&${e}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:s(r).mul(-1).mul(2).equal(),marginInlineEnd:s(r).mul(2).equal()}}}}}},D7=t=>{const{componentCls:e,trackHeight:n,trackMinWidth:r}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:q(n),verticalAlign:"middle",background:t.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${t.motionDurationMid}`,userSelect:"none",[`&:hover:not(${e}-disabled)`]:{background:t.colorTextTertiary}}),Ci(t)),{[`&${e}-checked`]:{background:t.switchColor,[`&:hover:not(${e}-disabled)`]:{background:t.colorPrimaryHover}},[`&${e}-loading, &${e}-disabled`]:{cursor:"not-allowed",opacity:t.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${e}-rtl`]:{direction:"rtl"}})}},B7=t=>{const{fontSize:e,lineHeight:n,controlHeight:r,colorWhite:i}=t,o=e*n,a=r/2,s=2,l=o-s*2,c=a-s*2;return{trackHeight:o,trackHeightSM:a,trackMinWidth:l*2+s*4,trackMinWidthSM:c*2+s*2,trackPadding:s,handleBg:i,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new Dt("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+s+s*2,innerMinMarginSM:c/2,innerMaxMarginSM:c+s+s*2}},W7=Zt("Switch",t=>{const e=kt(t,{switchDuration:t.motionDurationMid,switchColor:t.colorPrimary,switchDisabledOpacity:t.opacityLoading,switchLoadingIconSize:t.calc(t.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${t.opacityLoading})`,switchHandleActiveInset:"-30%"});return[D7(e),j7(e),L7(e),z7(e),N7(e)]},B7);var F7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,size:r,disabled:i,loading:o,className:a,rootClassName:s,style:l,checked:c,value:u,defaultChecked:d,defaultValue:f,onChange:h}=t,p=F7(t,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[m,g]=_n(!1,{value:c??u,defaultValue:d??f}),{getPrefixCls:v,direction:O,switch:S}=fe(it),x=fe(qi),b=(i??x)||o,C=v("switch",n),$=y("div",{className:`${C}-handle`},o&&y(yc,{className:`${C}-loading-icon`})),[w,P,_]=W7(C),T=Dr(r),R=Z(S==null?void 0:S.className,{[`${C}-small`]:T==="small",[`${C}-loading`]:o,[`${C}-rtl`]:O==="rtl"},a,s,P,_),k=Object.assign(Object.assign({},S==null?void 0:S.style),l);return w(y(Dv,{component:"Switch",disabled:b},y(BP,Object.assign({},p,{checked:m,onChange:(...Q)=>{g(Q[0]),h==null||h.apply(void 0,Q)},prefixCls:C,className:R,style:k,disabled:b,ref:e,loadingIcon:$}))))}),Oi=V7;Oi.__ANT_SWITCH=!0;const H7=t=>{const{paddingXXS:e,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:o}=t,a=o(r).sub(n).equal(),s=o(e).sub(n).equal();return{[i]:Object.assign(Object.assign({},wn(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:a,fontSize:t.tagFontSize,lineHeight:t.tagLineHeight,whiteSpace:"nowrap",background:t.defaultBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,opacity:1,transition:`all ${t.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:t.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:t.tagIconSize,color:t.colorIcon,cursor:"pointer",transition:`all ${t.motionDurationMid}`,"&:hover":{color:t.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${t.iconCls}-close, ${t.iconCls}-close:hover`]:{color:t.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${t.iconCls} + span, > span + ${t.iconCls}`]:{marginInlineStart:a}}),[`${i}-borderless`]:{borderColor:"transparent",background:t.tagBorderlessBg}}},k0=t=>{const{lineWidth:e,fontSizeIcon:n,calc:r}=t,i=t.fontSizeSM;return kt(t,{tagFontSize:i,tagLineHeight:q(r(t.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(e).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:t.defaultBg})},R0=t=>({defaultBg:new Dt(t.colorFillQuaternary).onBackground(t.colorBgContainer).toHexString(),defaultColor:t.colorText}),WP=Zt("Tag",t=>{const e=k0(t);return H7(e)},R0);var X7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,style:r,className:i,checked:o,children:a,icon:s,onChange:l,onClick:c}=t,u=X7(t,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:d,tag:f}=fe(it),h=S=>{l==null||l(!o),c==null||c(S)},p=d("tag",n),[m,g,v]=WP(p),O=Z(p,`${p}-checkable`,{[`${p}-checkable-checked`]:o},f==null?void 0:f.className,i,g,v);return m(y("span",Object.assign({},u,{ref:e,style:Object.assign(Object.assign({},r),f==null?void 0:f.style),className:O,onClick:h}),s,y("span",null,a)))}),q7=t=>k$(t,(e,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:o})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:t.colorTextLightSolid,background:o,borderColor:o},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}})),G7=Qs(["Tag","preset"],t=>{const e=k0(t);return q7(e)},R0);function Y7(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1)}const su=(t,e,n)=>{const r=Y7(n);return{[`${t.componentCls}${t.componentCls}-${e}`]:{color:t[`color${n}`],background:t[`color${r}Bg`],borderColor:t[`color${r}Border`],[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}},U7=Qs(["Tag","status"],t=>{const e=k0(t);return[su(e,"success","Success"),su(e,"processing","Info"),su(e,"error","Error"),su(e,"warning","Warning")]},R0);var K7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,className:r,rootClassName:i,style:o,children:a,icon:s,color:l,onClose:c,bordered:u=!0,visible:d}=t,f=K7(t,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:h,direction:p,tag:m}=fe(it),[g,v]=J(!0),O=cn(f,["closeIcon","closable"]);be(()=>{d!==void 0&&v(d)},[d]);const S=k2(l),x=vL(l),b=S||x,C=Object.assign(Object.assign({backgroundColor:l&&!b?l:void 0},m==null?void 0:m.style),o),$=h("tag",n),[w,P,_]=WP($),T=Z($,m==null?void 0:m.className,{[`${$}-${l}`]:b,[`${$}-has-color`]:l&&!b,[`${$}-hidden`]:!g,[`${$}-rtl`]:p==="rtl",[`${$}-borderless`]:!u},r,i,P,_),R=N=>{N.stopPropagation(),c==null||c(N),!N.defaultPrevented&&v(!1)},[,k]=kw($d(t),$d(m),{closable:!1,closeIconRender:N=>{const z=y("span",{className:`${$}-close-icon`,onClick:R},N);return zv(N,z,L=>({onClick:F=>{var H;(H=L==null?void 0:L.onClick)===null||H===void 0||H.call(L,F),R(F)},className:Z(L==null?void 0:L.className,`${$}-close-icon`)}))}}),I=typeof f.onClick=="function"||a&&a.type==="a",Q=s||null,M=Q?y(At,null,Q,a&&y("span",null,a)):a,E=y("span",Object.assign({},O,{ref:e,className:T,style:C}),M,k,S&&y(G7,{key:"preset",prefixCls:$}),x&&y(U7,{key:"status",prefixCls:$}));return w(I?y(Dv,{component:"Tag"},E):E)}),Ka=J7;Ka.CheckableTag=Z7;const ii=(t,e)=>new Dt(t).setA(e).toRgbString(),Fa=(t,e)=>new Dt(t).lighten(e).toHexString(),e9=t=>{const e=ga(t,{theme:"dark"});return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[6],6:e[5],7:e[4],8:e[6],9:e[5],10:e[4]}},t9=(t,e)=>{const n=t||"#000",r=e||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:ii(r,.85),colorTextSecondary:ii(r,.65),colorTextTertiary:ii(r,.45),colorTextQuaternary:ii(r,.25),colorFill:ii(r,.18),colorFillSecondary:ii(r,.12),colorFillTertiary:ii(r,.08),colorFillQuaternary:ii(r,.04),colorBgSolid:ii(r,.95),colorBgSolidHover:ii(r,1),colorBgSolidActive:ii(r,.9),colorBgElevated:Fa(n,12),colorBgContainer:Fa(n,8),colorBgLayout:Fa(n,0),colorBgSpotlight:Fa(n,26),colorBgBlur:ii(r,.04),colorBorder:Fa(n,26),colorBorderSecondary:Fa(n,19)}},n9=(t,e)=>{const n=Object.keys(Mv).map(o=>{const a=ga(t[o],{theme:"dark"});return Array.from({length:10},()=>1).reduce((s,l,c)=>(s[`${o}-${c+1}`]=a[c],s[`${o}${c+1}`]=a[c],s),{})}).reduce((o,a)=>(o=Object.assign(Object.assign({},o),a),o),{}),r=e??Ev(t),i=O$(t,{generateColorPalettes:e9,generateNeutralColorPalettes:t9});return Object.assign(Object.assign(Object.assign(Object.assign({},r),n),i),{colorPrimaryBg:i.colorPrimaryBorder,colorPrimaryBgHover:i.colorPrimaryBorderHover})},E1={defaultSeed:gd.token,defaultAlgorithm:Ev,darkAlgorithm:n9};var r9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},i9=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:r9}))},Km=Se(i9),o9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},a9=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:o9}))},FP=Se(a9),s9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},l9=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:s9}))},c9=Se(l9);const u9=(t,e,n,r)=>{const{titleMarginBottom:i,fontWeightStrong:o}=r;return{marginBottom:i,color:n,fontWeight:o,fontSize:t,lineHeight:e}},d9=t=>{const e=[1,2,3,4,5],n={};return e.forEach(r=>{n[` + `]:{paddingInlineEnd:n},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-rtl`]:{[`${e}-suffix`]:{[`${e}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},u7=Ft(["Input","TextArea"],t=>{const e=It(t,Qc(t));return c7(e)},Nc,{resetFont:!1});var d7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const{prefixCls:r,bordered:i=!0,size:o,disabled:a,status:s,allowClear:l,classNames:c,rootClassName:u,className:d,style:f,styles:h,variant:m,showCount:p,onMouseDown:g,onResize:O}=t,v=d7(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:y,direction:S,allowClear:x,autoComplete:$,className:C,style:P,classNames:w,styles:_}=Zn("textArea"),R=he(Ui),I=a??R,{status:T,hasFeedback:M,feedbackIcon:Q}=he(ei),E=Yf(T,s),k=ne(null);Jt(e,()=>{var Y;return{resizableTextArea:(Y=k.current)===null||Y===void 0?void 0:Y.resizableTextArea,focus:me=>{var G,ce;MP((ce=(G=k.current)===null||G===void 0?void 0:G.resizableTextArea)===null||ce===void 0?void 0:ce.textArea,me)},blur:()=>{var me;return(me=k.current)===null||me===void 0?void 0:me.blur()}}});const z=y("input",r),L=Tr(z),[B,F,H]=xP(z,u),[X]=u7(z,L),{compactSize:q,compactItemClassnames:N}=Bs(z,S),j=br(Y=>{var me;return(me=o??q)!==null&&me!==void 0?me:Y}),[oe,ee]=Kf("textArea",m,i),se=AP(l??x),[fe,re]=te(!1),[J,ue]=te(!1),de=Y=>{re(!0),g==null||g(Y);const me=()=>{re(!1),document.removeEventListener("mouseup",me)};document.addEventListener("mouseup",me)},D=Y=>{var me,G;if(O==null||O(Y),fe&&typeof getComputedStyle=="function"){const ce=(G=(me=k.current)===null||me===void 0?void 0:me.nativeElement)===null||G===void 0?void 0:G.querySelector("textarea");ce&&getComputedStyle(ce).resize==="both"&&ue(!0)}};return B(X(b(l7,Object.assign({autoComplete:$},v,{style:Object.assign(Object.assign({},P),f),styles:Object.assign(Object.assign({},_),h),disabled:I,allowClear:se,className:U(H,L,d,u,N,C,J&&`${z}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),w),{textarea:U({[`${z}-sm`]:j==="small",[`${z}-lg`]:j==="large"},F,c==null?void 0:c.textarea,w.textarea,fe&&`${z}-mouse-active`),variant:U({[`${z}-${oe}`]:ee},kd(z,E)),affixWrapper:U(`${z}-textarea-affix-wrapper`,{[`${z}-affix-wrapper-rtl`]:S==="rtl",[`${z}-affix-wrapper-sm`]:j==="small",[`${z}-affix-wrapper-lg`]:j==="large",[`${z}-textarea-show-count`]:p||((n=t.count)===null||n===void 0?void 0:n.show)},F)}),prefixCls:z,suffix:M&&b("span",{className:`${z}-textarea-suffix`},Q),showCount:p,ref:k,onResize:D,onMouseDown:de}))))}),li=sh;li.Group=j8;li.Search=e7;li.TextArea=VP;li.Password=K8;li.OTP=F8;function f7(t,e,n){return typeof n=="boolean"?n:t.length?!0:sr(e).some(i=>i.type===fP)}var FP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);iSe((o,a)=>b(r,Object.assign({ref:a,suffixCls:t,tagName:e},o)))}const z0=Se((t,e)=>{const{prefixCls:n,suffixCls:r,className:i,tagName:o}=t,a=FP(t,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:s}=he(lt),l=s("layout",n),[c,u,d]=dP(l),f=r?`${l}-${r}`:l;return c(b(o,Object.assign({className:U(n||f,i,u,d),ref:e},a)))}),h7=Se((t,e)=>{const{direction:n}=he(lt),[r,i]=te([]),{prefixCls:o,className:a,rootClassName:s,children:l,hasSider:c,tagName:u,style:d}=t,f=FP(t,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),h=pn(f,["suffixCls"]),{getPrefixCls:m,className:p,style:g}=Zn("layout"),O=m("layout",o),v=f7(r,l,c),[y,S,x]=dP(O),$=U(O,{[`${O}-has-sider`]:v,[`${O}-rtl`]:n==="rtl"},p,a,s,S,x),C=ve(()=>({siderHook:{addSider:P=>{i(w=>[].concat(Ce(w),[P]))},removeSider:P=>{i(w=>w.filter(_=>_!==P))}}}),[]);return y(b(lP.Provider,{value:C},b(u,Object.assign({ref:e,className:$,style:Object.assign(Object.assign({},g),d)},h),l)))}),m7=lh({tagName:"div",displayName:"Layout"})(h7),p7=lh({suffixCls:"header",tagName:"header",displayName:"Header"})(z0),g7=lh({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(z0),v7=lh({suffixCls:"content",tagName:"main",displayName:"Content"})(z0),qr=m7;qr.Header=p7;qr.Footer=g7;qr.Content=v7;qr.Sider=fP;qr._InternalSiderContext=rh;var O7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},b7=function(e,n){return b(Mt,xe({},e,{ref:n,icon:O7}))},DS=Se(b7),y7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},S7=function(e,n){return b(Mt,xe({},e,{ref:n,icon:y7}))},BS=Se(S7),x7={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},$7=[10,20,50,100],C7=function(e){var n=e.pageSizeOptions,r=n===void 0?$7:n,i=e.locale,o=e.changeSize,a=e.pageSize,s=e.goButton,l=e.quickGo,c=e.rootPrefixCls,u=e.disabled,d=e.buildOptionText,f=e.showSizeChanger,h=e.sizeChangerRender,m=K.useState(""),p=le(m,2),g=p[0],O=p[1],v=function(){return!g||Number.isNaN(g)?void 0:Number(g)},y=typeof d=="function"?d:function(I){return"".concat(I," ").concat(i.items_per_page)},S=function(T){O(T.target.value)},x=function(T){s||g===""||(O(""),!(T.relatedTarget&&(T.relatedTarget.className.indexOf("".concat(c,"-item-link"))>=0||T.relatedTarget.className.indexOf("".concat(c,"-item"))>=0))&&(l==null||l(v())))},$=function(T){g!==""&&(T.keyCode===ze.ENTER||T.type==="click")&&(O(""),l==null||l(v()))},C=function(){return r.some(function(T){return T.toString()===a.toString()})?r:r.concat([a]).sort(function(T,M){var Q=Number.isNaN(Number(T))?0:Number(T),E=Number.isNaN(Number(M))?0:Number(M);return Q-E})},P="".concat(c,"-options");if(!f&&!l)return null;var w=null,_=null,R=null;return f&&h&&(w=h({disabled:u,size:a,onSizeChange:function(T){o==null||o(Number(T))},"aria-label":i.page_size,className:"".concat(P,"-size-changer"),options:C().map(function(I){return{label:y(I),value:I}})})),l&&(s&&(R=typeof s=="boolean"?K.createElement("button",{type:"button",onClick:$,onKeyUp:$,disabled:u,className:"".concat(P,"-quick-jumper-button")},i.jump_to_confirm):K.createElement("span",{onClick:$,onKeyUp:$},s)),_=K.createElement("div",{className:"".concat(P,"-quick-jumper")},i.jump_to,K.createElement("input",{disabled:u,type:"text",value:g,onChange:S,onKeyUp:$,onBlur:x,"aria-label":i.page}),i.page,R)),K.createElement("li",{className:P},w,_)},il=function(e){var n=e.rootPrefixCls,r=e.page,i=e.active,o=e.className,a=e.showTitle,s=e.onClick,l=e.onKeyPress,c=e.itemRender,u="".concat(n,"-item"),d=U(u,"".concat(u,"-").concat(r),W(W({},"".concat(u,"-active"),i),"".concat(u,"-disabled"),!r),o),f=function(){s(r)},h=function(g){l(g,s,r)},m=c(r,"page",K.createElement("a",{rel:"nofollow"},r));return m?K.createElement("li",{title:a?String(r):null,className:d,onClick:f,onKeyDown:h,tabIndex:0},m):null},w7=function(e,n,r){return r};function WS(){}function HS(t){var e=Number(t);return typeof e=="number"&&!Number.isNaN(e)&&isFinite(e)&&Math.floor(e)===e}function Yo(t,e,n){var r=typeof t>"u"?e:t;return Math.floor((n-1)/r)+1}var P7=function(e){var n=e.prefixCls,r=n===void 0?"rc-pagination":n,i=e.selectPrefixCls,o=i===void 0?"rc-select":i,a=e.className,s=e.current,l=e.defaultCurrent,c=l===void 0?1:l,u=e.total,d=u===void 0?0:u,f=e.pageSize,h=e.defaultPageSize,m=h===void 0?10:h,p=e.onChange,g=p===void 0?WS:p,O=e.hideOnSinglePage,v=e.align,y=e.showPrevNextJumpers,S=y===void 0?!0:y,x=e.showQuickJumper,$=e.showLessItems,C=e.showTitle,P=C===void 0?!0:C,w=e.onShowSizeChange,_=w===void 0?WS:w,R=e.locale,I=R===void 0?x7:R,T=e.style,M=e.totalBoundaryShowSizeChanger,Q=M===void 0?50:M,E=e.disabled,k=e.simple,z=e.showTotal,L=e.showSizeChanger,B=L===void 0?d>Q:L,F=e.sizeChangerRender,H=e.pageSizeOptions,X=e.itemRender,q=X===void 0?w7:X,N=e.jumpPrevIcon,j=e.jumpNextIcon,oe=e.prevIcon,ee=e.nextIcon,se=K.useRef(null),fe=Pn(10,{value:f,defaultValue:m}),re=le(fe,2),J=re[0],ue=re[1],de=Pn(1,{value:s,defaultValue:c,postState:function(ot){return Math.max(1,Math.min(ot,Yo(void 0,J,d)))}}),D=le(de,2),Y=D[0],me=D[1],G=K.useState(Y),ce=le(G,2),ae=ce[0],pe=ce[1];ye(function(){pe(Y)},[Y]);var Oe=Math.max(1,Y-($?3:5)),be=Math.min(Yo(void 0,J,d),Y+($?3:5));function ge(Ne,ot){var bt=Ne||K.createElement("button",{type:"button","aria-label":ot,className:"".concat(r,"-item-link")});return typeof Ne=="function"&&(bt=K.createElement(Ne,Z({},e))),bt}function Me(Ne){var ot=Ne.target.value,bt=Yo(void 0,J,d),Rn;return ot===""?Rn=ot:Number.isNaN(Number(ot))?Rn=ae:ot>=bt?Rn=bt:Rn=Number(ot),Rn}function Ie(Ne){return HS(Ne)&&Ne!==Y&&HS(d)&&d>0}var He=d>J?x:!1;function Ae(Ne){(Ne.keyCode===ze.UP||Ne.keyCode===ze.DOWN)&&Ne.preventDefault()}function Ee(Ne){var ot=Me(Ne);switch(ot!==ae&&pe(ot),Ne.keyCode){case ze.ENTER:rt(ot);break;case ze.UP:rt(ot-1);break;case ze.DOWN:rt(ot+1);break}}function st(Ne){rt(Me(Ne))}function Ye(Ne){var ot=Yo(Ne,J,d),bt=Y>ot&&ot!==0?ot:Y;ue(Ne),pe(bt),_==null||_(Y,Ne),me(bt),g==null||g(bt,Ne)}function rt(Ne){if(Ie(Ne)&&!E){var ot=Yo(void 0,J,d),bt=Ne;return Ne>ot?bt=ot:Ne<1&&(bt=1),bt!==ae&&pe(bt),me(bt),g==null||g(bt,J),bt}return Y}var Be=Y>1,Re=Y2?bt-2:0),Bn=2;Bnd?d:Y*J])),ct=null,Ke=Yo(void 0,J,d);if(O&&d<=J)return null;var we=[],We={rootPrefixCls:r,onClick:rt,onKeyPress:yt,showTitle:P,itemRender:q,page:-1},Qe=Y-1>0?Y-1:0,Ve=Y+1=vt*2&&Y!==3&&(we[0]=K.cloneElement(we[0],{className:U("".concat(r,"-item-after-jump-prev"),we[0].props.className)}),we.unshift(et)),Ke-Y>=vt*2&&Y!==Ke-2){var Le=we[we.length-1];we[we.length-1]=K.cloneElement(Le,{className:U("".concat(r,"-item-before-jump-next"),Le.props.className)}),we.push(ct)}Bt!==1&&we.unshift(K.createElement(il,xe({},We,{key:1,page:1}))),Gt!==Ke&&we.push(K.createElement(il,xe({},We,{key:Ke,page:Ke})))}var mt=Dt(Qe);if(mt){var xt=!Be||!Ke;mt=K.createElement("li",{title:P?I.prev_page:null,onClick:Xe,tabIndex:xt?null:0,onKeyDown:xn,className:U("".concat(r,"-prev"),W({},"".concat(r,"-disabled"),xt)),"aria-disabled":xt},mt)}var Ue=Ct(Ve);if(Ue){var Fe,pt;k?(Fe=!Re,pt=Be?0:null):(Fe=!Re||!Ke,pt=Fe?null:0),Ue=K.createElement("li",{title:P?I.next_page:null,onClick:_e,tabIndex:pt,onKeyDown:Xt,className:U("".concat(r,"-next"),W({},"".concat(r,"-disabled"),Fe)),"aria-disabled":Fe},Ue)}var Et=U(r,a,W(W(W(W(W({},"".concat(r,"-start"),v==="start"),"".concat(r,"-center"),v==="center"),"".concat(r,"-end"),v==="end"),"".concat(r,"-simple"),k),"".concat(r,"-disabled"),E));return K.createElement("ul",xe({className:Et,style:T,ref:se},it),ke,mt,k?Pt:we,Ue,K.createElement(C7,{locale:I,rootPrefixCls:r,disabled:E,selectPrefixCls:o,changeSize:Ye,pageSize:J,pageSizeOptions:H,quickGo:He?rt:null,goButton:St,showSizeChanger:B,sizeChangerRender:F}))};const _7=t=>{const{componentCls:e}=t;return{[`${e}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}},[`&${e}-disabled`]:{cursor:"not-allowed",[`${e}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:t.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:t.colorBorder,backgroundColor:t.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:t.itemActiveBgDisabled},a:{color:t.itemActiveColorDisabled}}},[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${e}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${e}-simple-pager`]:{color:t.colorTextDisabled},[`${e}-jump-prev, ${e}-jump-next`]:{[`${e}-item-link-icon`]:{opacity:0},[`${e}-item-ellipsis`]:{opacity:1}}}}},T7=t=>{const{componentCls:e}=t;return{[`&${e}-mini ${e}-total-text, &${e}-mini ${e}-simple-pager`]:{height:t.itemSizeSM,lineHeight:V(t.itemSizeSM)},[`&${e}-mini ${e}-item`]:{minWidth:t.itemSizeSM,height:t.itemSizeSM,margin:0,lineHeight:V(t.calc(t.itemSizeSM).sub(2).equal())},[`&${e}-mini ${e}-prev, &${e}-mini ${e}-next`]:{minWidth:t.itemSizeSM,height:t.itemSizeSM,margin:0,lineHeight:V(t.itemSizeSM)},[`&${e}-mini:not(${e}-disabled)`]:{[`${e}-prev, ${e}-next`]:{[`&:hover ${e}-item-link`]:{backgroundColor:t.colorBgTextHover},[`&:active ${e}-item-link`]:{backgroundColor:t.colorBgTextActive},[`&${e}-disabled:hover ${e}-item-link`]:{backgroundColor:"transparent"}}},[` + &${e}-mini ${e}-prev ${e}-item-link, + &${e}-mini ${e}-next ${e}-item-link + `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:t.itemSizeSM,lineHeight:V(t.itemSizeSM)}},[`&${e}-mini ${e}-jump-prev, &${e}-mini ${e}-jump-next`]:{height:t.itemSizeSM,marginInlineEnd:0,lineHeight:V(t.itemSizeSM)},[`&${e}-mini ${e}-options`]:{marginInlineStart:t.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:t.miniOptionsSizeChangerTop},"&-quick-jumper":{height:t.itemSizeSM,lineHeight:V(t.itemSizeSM),input:Object.assign(Object.assign({},E0(t)),{width:t.paginationMiniQuickJumperInputWidth,height:t.controlHeightSM})}}}},R7=t=>{const{componentCls:e}=t;return{[`&${e}-simple`]:{[`${e}-prev, ${e}-next`]:{height:t.itemSize,lineHeight:V(t.itemSize),verticalAlign:"top",[`${e}-item-link`]:{height:t.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive},"&::after":{height:t.itemSize,lineHeight:V(t.itemSize)}}},[`${e}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:t.itemSize,marginInlineEnd:t.marginXS,input:{boxSizing:"border-box",height:"100%",width:t.quickJumperInputWidth,padding:`0 ${V(t.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:t.itemInputBg,border:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadius,outline:"none",transition:`border-color ${t.motionDurationMid}`,color:"inherit","&:hover":{borderColor:t.colorPrimary},"&:focus":{borderColor:t.colorPrimaryHover,boxShadow:`${V(t.inputOutlineOffset)} 0 ${V(t.controlOutlineWidth)} ${t.controlOutline}`},"&[disabled]":{color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,cursor:"not-allowed"}}},[`&${e}-disabled`]:{[`${e}-prev, ${e}-next`]:{[`${e}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${e}-mini`]:{[`${e}-prev, ${e}-next`]:{height:t.itemSizeSM,lineHeight:V(t.itemSizeSM),[`${e}-item-link`]:{height:t.itemSizeSM,"&::after":{height:t.itemSizeSM,lineHeight:V(t.itemSizeSM)}}},[`${e}-simple-pager`]:{height:t.itemSizeSM,input:{width:t.paginationMiniQuickJumperInputWidth}}}}}},I7=t=>{const{componentCls:e}=t;return{[`${e}-jump-prev, ${e}-jump-next`]:{outline:0,[`${e}-item-container`]:{position:"relative",[`${e}-item-link-icon`]:{color:t.colorPrimary,fontSize:t.fontSizeSM,opacity:0,transition:`all ${t.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${e}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:t.colorTextDisabled,letterSpacing:t.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:t.paginationEllipsisTextIndent,opacity:1,transition:`all ${t.motionDurationMid}`}},"&:hover":{[`${e}-item-link-icon`]:{opacity:1},[`${e}-item-ellipsis`]:{opacity:0}}},[` + ${e}-prev, + ${e}-jump-prev, + ${e}-jump-next + `]:{marginInlineEnd:t.marginXS},[` + ${e}-prev, + ${e}-next, + ${e}-jump-prev, + ${e}-jump-next + `]:{display:"inline-block",minWidth:t.itemSize,height:t.itemSize,color:t.colorText,fontFamily:t.fontFamily,lineHeight:V(t.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}`},[`${e}-prev, ${e}-next`]:{outline:0,button:{color:t.colorText,cursor:"pointer",userSelect:"none"},[`${e}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:t.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${V(t.lineWidth)} ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:"none",transition:`all ${t.motionDurationMid}`},[`&:hover ${e}-item-link`]:{backgroundColor:t.colorBgTextHover},[`&:active ${e}-item-link`]:{backgroundColor:t.colorBgTextActive},[`&${e}-disabled:hover`]:{[`${e}-item-link`]:{backgroundColor:"transparent"}}},[`${e}-slash`]:{marginInlineEnd:t.paginationSlashMarginInlineEnd,marginInlineStart:t.paginationSlashMarginInlineStart},[`${e}-options`]:{display:"inline-block",marginInlineStart:t.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:t.controlHeight,marginInlineStart:t.marginXS,lineHeight:V(t.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},k0(t)),M0(t,{borderColor:t.colorBorder,hoverBorderColor:t.colorPrimaryHover,activeBorderColor:t.colorPrimary,activeShadow:t.activeShadow})),{"&[disabled]":Object.assign({},oh(t)),width:t.quickJumperInputWidth,height:t.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:t.marginXS,marginInlineEnd:t.marginXS})}}}},M7=t=>{const{componentCls:e}=t;return{[`${e}-item`]:{display:"inline-block",minWidth:t.itemSize,height:t.itemSize,marginInlineEnd:t.marginXS,fontFamily:t.fontFamily,lineHeight:V(t.calc(t.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:t.itemBg,border:`${V(t.lineWidth)} ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${V(t.paginationItemPaddingInline)}`,color:t.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${e}-item-active)`]:{"&:hover":{transition:`all ${t.motionDurationMid}`,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}},"&-active":{fontWeight:t.fontWeightStrong,backgroundColor:t.itemActiveBg,borderColor:t.colorPrimary,a:{color:t.colorPrimary},"&:hover":{borderColor:t.colorPrimaryHover},"&:hover a":{color:t.colorPrimaryHover}}}}},E7=t=>{const{componentCls:e}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Sn(t)),{display:"flex","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${e}-total-text`]:{display:"inline-block",height:t.itemSize,marginInlineEnd:t.marginXS,lineHeight:V(t.calc(t.itemSize).sub(2).equal()),verticalAlign:"middle"}}),M7(t)),I7(t)),R7(t)),T7(t)),_7(t)),{[`@media only screen and (max-width: ${t.screenLG}px)`]:{[`${e}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${t.screenSM}px)`]:{[`${e}-options`]:{display:"none"}}}),[`&${t.componentCls}-rtl`]:{direction:"rtl"}}},k7=t=>{const{componentCls:e}=t;return{[`${e}:not(${e}-disabled)`]:{[`${e}-item`]:Object.assign({},hi(t)),[`${e}-jump-prev, ${e}-jump-next`]:{"&:focus-visible":Object.assign({[`${e}-item-link-icon`]:{opacity:1},[`${e}-item-ellipsis`]:{opacity:0}},xs(t))},[`${e}-prev, ${e}-next`]:{[`&:focus-visible ${e}-item-link`]:xs(t)}}}},XP=t=>Object.assign({itemBg:t.colorBgContainer,itemSize:t.controlHeight,itemSizeSM:t.controlHeightSM,itemActiveBg:t.colorBgContainer,itemLinkBg:t.colorBgContainer,itemActiveColorDisabled:t.colorTextDisabled,itemActiveBgDisabled:t.controlItemBgActiveDisabled,itemInputBg:t.colorBgContainer,miniOptionsSizeChangerTop:0},Nc(t)),ZP=t=>It(t,{inputOutlineOffset:0,quickJumperInputWidth:t.calc(t.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:t.calc(t.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:t.calc(t.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:t.calc(t.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:t.calc(t.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:t.marginSM,paginationSlashMarginInlineEnd:t.marginSM,paginationEllipsisTextIndent:"0.13em"},Qc(t)),A7=Ft("Pagination",t=>{const e=ZP(t);return[E7(e),k7(e)]},XP),Q7=t=>{const{componentCls:e}=t;return{[`${e}${e}-bordered${e}-disabled:not(${e}-mini)`]:{"&, &:hover":{[`${e}-item-link`]:{borderColor:t.colorBorder}},"&:focus-visible":{[`${e}-item-link`]:{borderColor:t.colorBorder}},[`${e}-item, ${e}-item-link`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,[`&:hover:not(${e}-item-active)`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,a:{color:t.colorTextDisabled}},[`&${e}-item-active`]:{backgroundColor:t.itemActiveBgDisabled}},[`${e}-prev, ${e}-next`]:{"&:hover button":{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,color:t.colorTextDisabled},[`${e}-item-link`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder}}},[`${e}${e}-bordered:not(${e}-mini)`]:{[`${e}-prev, ${e}-next`]:{"&:hover button":{borderColor:t.colorPrimaryHover,backgroundColor:t.itemBg},[`${e}-item-link`]:{backgroundColor:t.itemLinkBg,borderColor:t.colorBorder},[`&:hover ${e}-item-link`]:{borderColor:t.colorPrimary,backgroundColor:t.itemBg,color:t.colorPrimary},[`&${e}-disabled`]:{[`${e}-item-link`]:{borderColor:t.colorBorder,color:t.colorTextDisabled}}},[`${e}-item`]:{backgroundColor:t.itemBg,border:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,[`&:hover:not(${e}-item-active)`]:{borderColor:t.colorPrimary,backgroundColor:t.itemBg,a:{color:t.colorPrimary}},"&-active":{borderColor:t.colorPrimary}}}}},N7=Ea(["Pagination","bordered"],t=>{const e=ZP(t);return Q7(e)},XP);function VS(t){return ve(()=>typeof t=="boolean"?[t,{}]:t&&typeof t=="object"?[!0,t]:[void 0,void 0],[t])}var z7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{align:e,prefixCls:n,selectPrefixCls:r,className:i,rootClassName:o,style:a,size:s,locale:l,responsive:c,showSizeChanger:u,selectComponentClass:d,pageSizeOptions:f}=t,h=z7(t,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:m}=Jf(c),[,p]=Or(),{getPrefixCls:g,direction:O,showSizeChanger:v,className:y,style:S}=Zn("pagination"),x=g("pagination",n),[$,C,P]=A7(x),w=br(s),_=w==="small"||!!(m&&!w&&c),[R]=Ii("Pagination",RC),I=Object.assign(Object.assign({},R),l),[T,M]=VS(u),[Q,E]=VS(v),k=T??Q,z=M??E,L=d||Nn,B=ve(()=>f?f.map(j=>Number(j)):void 0,[f]),F=j=>{var oe;const{disabled:ee,size:se,onSizeChange:fe,"aria-label":re,className:J,options:ue}=j,{className:de,onChange:D}=z||{},Y=(oe=ue.find(me=>String(me.value)===String(se)))===null||oe===void 0?void 0:oe.value;return b(L,Object.assign({disabled:ee,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:me=>me.parentNode,"aria-label":re,options:ue},z,{value:Y,onChange:(me,G)=>{fe==null||fe(me),D==null||D(me,G)},size:_?"small":"middle",className:U(J,de)}))},H=ve(()=>{const j=b("span",{className:`${x}-item-ellipsis`},"•••"),oe=b("button",{className:`${x}-item-link`,type:"button",tabIndex:-1},b(O==="rtl"?$s:Yl,null)),ee=b("button",{className:`${x}-item-link`,type:"button",tabIndex:-1},b(O==="rtl"?Yl:$s,null)),se=b("a",{className:`${x}-item-link`},b("div",{className:`${x}-item-container`},O==="rtl"?b(BS,{className:`${x}-item-link-icon`}):b(DS,{className:`${x}-item-link-icon`}),j)),fe=b("a",{className:`${x}-item-link`},b("div",{className:`${x}-item-container`},O==="rtl"?b(DS,{className:`${x}-item-link-icon`}):b(BS,{className:`${x}-item-link-icon`}),j));return{prevIcon:oe,nextIcon:ee,jumpPrevIcon:se,jumpNextIcon:fe}},[O,x]),X=g("select",r),q=U({[`${x}-${e}`]:!!e,[`${x}-mini`]:_,[`${x}-rtl`]:O==="rtl",[`${x}-bordered`]:p.wireframe},y,i,o,C,P),N=Object.assign(Object.assign({},S),a);return $(b(Qt,null,p.wireframe&&b(N7,{prefixCls:x}),b(P7,Object.assign({},H,h,{style:N,prefixCls:x,selectPrefixCls:X,className:q,locale:I,pageSizeOptions:B,showSizeChanger:k,sizeChangerRender:F}))))},Bd=100,GP=Bd/5,UP=Bd/2-GP/2,um=UP*2*Math.PI,FS=50,XS=t=>{const{dotClassName:e,style:n,hasCircleCls:r}=t;return b("circle",{className:U(`${e}-circle`,{[`${e}-circle-bg`]:r}),r:UP,cx:FS,cy:FS,strokeWidth:GP,style:n})},j7=({percent:t,prefixCls:e})=>{const n=`${e}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[o,a]=te(!1);Lt(()=>{t!==0&&a(!0)},[t!==0]);const s=Math.max(Math.min(t,100),0);if(!o)return null;const l={strokeDashoffset:`${um/4}`,strokeDasharray:`${um*s/100} ${um*(100-s)/100}`};return b("span",{className:U(r,`${n}-progress`,s<=0&&i)},b("svg",{viewBox:`0 0 ${Bd} ${Bd}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},b(XS,{dotClassName:n,hasCircleCls:!0}),b(XS,{dotClassName:n,style:l})))};function L7(t){const{prefixCls:e,percent:n=0}=t,r=`${e}-dot`,i=`${r}-holder`,o=`${i}-hidden`;return b(Qt,null,b("span",{className:U(i,n>0&&o)},b("span",{className:U(r,`${e}-dot-spin`)},[1,2,3,4].map(a=>b("i",{className:`${e}-dot-item`,key:a})))),b(j7,{prefixCls:e,percent:n}))}function D7(t){var e;const{prefixCls:n,indicator:r,percent:i}=t,o=`${n}-dot`;return r&&en(r)?lr(r,{className:U((e=r.props)===null||e===void 0?void 0:e.className,o),percent:i}):b(L7,{prefixCls:n,percent:i})}const B7=new At("antSpinMove",{to:{opacity:1}}),W7=new At("antRotate",{to:{transform:"rotate(405deg)"}}),H7=t=>{const{componentCls:e,calc:n}=t;return{[e]:Object.assign(Object.assign({},Sn(t)),{position:"absolute",display:"none",color:t.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${e}-text`]:{fontSize:t.fontSize,paddingTop:n(n(t.dotSize).sub(t.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:t.colorBgMask,zIndex:t.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${t.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[e]:{[`${e}-dot-holder`]:{color:t.colorWhite},[`${e}-text`]:{color:t.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${e}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:t.contentHeight,[`${e}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(t.dotSize).mul(-1).div(2).equal()},[`${e}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${t.colorBgContainer}`},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${e}-dot`]:{margin:n(t.dotSizeSM).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:n(n(t.dotSizeSM).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${e}-dot`]:{margin:n(t.dotSizeLG).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:n(n(t.dotSizeLG).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${e}-container`]:{position:"relative",transition:`opacity ${t.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:t.colorBgContainer,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:t.spinDotDefault},[`${e}-dot-holder`]:{width:"1em",height:"1em",fontSize:t.dotSize,display:"inline-block",transition:`transform ${t.motionDurationSlow} ease, opacity ${t.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:t.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${e}-dot-progress`]:{position:"absolute",inset:0},[`${e}-dot`]:{position:"relative",display:"inline-block",fontSize:t.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(t.dotSize).sub(n(t.marginXXS).div(2)).div(2).equal(),height:n(t.dotSize).sub(n(t.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:B7,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:W7,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(r=>`${r} ${t.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:t.colorFillSecondary}},[`&-sm ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeSM}},[`&-sm ${e}-dot-holder`]:{i:{width:n(n(t.dotSizeSM).sub(n(t.marginXXS).div(2))).div(2).equal(),height:n(n(t.dotSizeSM).sub(n(t.marginXXS).div(2))).div(2).equal()}},[`&-lg ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeLG}},[`&-lg ${e}-dot-holder`]:{i:{width:n(n(t.dotSizeLG).sub(t.marginXXS)).div(2).equal(),height:n(n(t.dotSizeLG).sub(t.marginXXS)).div(2).equal()}},[`&${e}-show-text ${e}-text`]:{display:"block"}})}},V7=t=>{const{controlHeightLG:e,controlHeight:n}=t;return{contentHeight:400,dotSize:e/2,dotSizeSM:e*.35,dotSizeLG:n}},F7=Ft("Spin",t=>{const e=It(t,{spinDotDefault:t.colorTextDescription});return H7(e)},V7),X7=200,ZS=[[30,.05],[70,.03],[96,.01]];function Z7(t,e){const[n,r]=te(0),i=ne(null),o=e==="auto";return ye(()=>(o&&t&&(r(0),i.current=setInterval(()=>{r(a=>{const s=100-a;for(let l=0;l{clearInterval(i.current)}),[o,t]),o?n:e}var q7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var e;const{prefixCls:n,spinning:r=!0,delay:i=0,className:o,rootClassName:a,size:s="default",tip:l,wrapperClassName:c,style:u,children:d,fullscreen:f=!1,indicator:h,percent:m}=t,p=q7(t,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:g,direction:O,className:v,style:y,indicator:S}=Zn("spin"),x=g("spin",n),[$,C,P]=F7(x),[w,_]=te(()=>r&&!G7(r,i)),R=Z7(w,m);ye(()=>{if(r){const z=TB(i,()=>{_(!0)});return z(),()=>{var L;(L=z==null?void 0:z.cancel)===null||L===void 0||L.call(z)}}_(!1)},[i,r]);const I=ve(()=>typeof d<"u"&&!f,[d,f]),T=U(x,v,{[`${x}-sm`]:s==="small",[`${x}-lg`]:s==="large",[`${x}-spinning`]:w,[`${x}-show-text`]:!!l,[`${x}-rtl`]:O==="rtl"},o,!f&&a,C,P),M=U(`${x}-container`,{[`${x}-blur`]:w}),Q=(e=h??S)!==null&&e!==void 0?e:YP,E=Object.assign(Object.assign({},y),u),k=b("div",Object.assign({},p,{style:E,className:T,"aria-live":"polite","aria-busy":w}),b(D7,{prefixCls:x,indicator:Q,percent:R}),l&&(I||f)?b("div",{className:`${x}-text`},l):null);return $(I?b("div",Object.assign({},p,{className:U(`${x}-nested-loading`,c,C,P)}),w&&b("div",{key:"loading"},k),b("div",{className:M,key:"container"},d)):f?b("div",{className:U(`${x}-fullscreen`,{[`${x}-fullscreen-show`]:w},a,C,P)},k):k)};ch.setDefaultIndicator=t=>{YP=t};const j0=K.createContext({});j0.Consumer;var KP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{prefixCls:e,className:n,avatar:r,title:i,description:o}=t,a=KP(t,["prefixCls","className","avatar","title","description"]);const{getPrefixCls:s}=he(lt),l=s("list",e),c=U(`${l}-item-meta`,n),u=K.createElement("div",{className:`${l}-item-meta-content`},i&&K.createElement("h4",{className:`${l}-item-meta-title`},i),o&&K.createElement("div",{className:`${l}-item-meta-description`},o));return K.createElement("div",Object.assign({},a,{className:c}),r&&K.createElement("div",{className:`${l}-item-meta-avatar`},r),(i||o)&&u)},Y7=K.forwardRef((t,e)=>{const{prefixCls:n,children:r,actions:i,extra:o,styles:a,className:s,classNames:l,colStyle:c}=t,u=KP(t,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:d,itemLayout:f}=he(j0),{getPrefixCls:h,list:m}=he(lt),p=C=>{var P,w;return U((w=(P=m==null?void 0:m.item)===null||P===void 0?void 0:P.classNames)===null||w===void 0?void 0:w[C],l==null?void 0:l[C])},g=C=>{var P,w;return Object.assign(Object.assign({},(w=(P=m==null?void 0:m.item)===null||P===void 0?void 0:P.styles)===null||w===void 0?void 0:w[C]),a==null?void 0:a[C])},O=()=>{let C=!1;return wi.forEach(r,P=>{typeof P=="string"&&(C=!0)}),C&&wi.count(r)>1},v=()=>f==="vertical"?!!o:!O(),y=h("list",n),S=i&&i.length>0&&K.createElement("ul",{className:U(`${y}-item-action`,p("actions")),key:"actions",style:g("actions")},i.map((C,P)=>K.createElement("li",{key:`${y}-item-action-${P}`},C,P!==i.length-1&&K.createElement("em",{className:`${y}-item-action-split`})))),x=d?"div":"li",$=K.createElement(x,Object.assign({},u,d?{}:{ref:e},{className:U(`${y}-item`,{[`${y}-item-no-flex`]:!v()},s)}),f==="vertical"&&o?[K.createElement("div",{className:`${y}-item-main`,key:"content"},r,S),K.createElement("div",{className:U(`${y}-item-extra`,p("extra")),key:"extra",style:g("extra")},o)]:[r,S,lr(o,{key:"extra"})]);return d?K.createElement(Qr,{ref:e,flex:1,style:c},$):$}),JP=Y7;JP.Meta=U7;const K7=t=>{const{listBorderedCls:e,componentCls:n,paddingLG:r,margin:i,itemPaddingSM:o,itemPaddingLG:a,marginLG:s,borderRadiusLG:l}=t;return{[e]:{border:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:l,[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:r},[`${n}-pagination`]:{margin:`${V(i)} ${V(s)}`}},[`${e}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:o}},[`${e}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}}}},J7=t=>{const{componentCls:e,screenSM:n,screenMD:r,marginLG:i,marginSM:o,margin:a}=t;return{[`@media screen and (max-width:${r}px)`]:{[e]:{[`${e}-item`]:{[`${e}-item-action`]:{marginInlineStart:i}}},[`${e}-vertical`]:{[`${e}-item`]:{[`${e}-item-extra`]:{marginInlineStart:i}}}},[`@media screen and (max-width: ${n}px)`]:{[e]:{[`${e}-item`]:{flexWrap:"wrap",[`${e}-action`]:{marginInlineStart:o}}},[`${e}-vertical`]:{[`${e}-item`]:{flexWrap:"wrap-reverse",[`${e}-item-main`]:{minWidth:t.contentWidth},[`${e}-item-extra`]:{margin:`auto auto ${V(a)}`}}}}}},e9=t=>{const{componentCls:e,antCls:n,controlHeight:r,minHeight:i,paddingSM:o,marginLG:a,padding:s,itemPadding:l,colorPrimary:c,itemPaddingSM:u,itemPaddingLG:d,paddingXS:f,margin:h,colorText:m,colorTextDescription:p,motionDurationSlow:g,lineWidth:O,headerBg:v,footerBg:y,emptyTextPadding:S,metaMarginBottom:x,avatarMarginRight:$,titleMarginBottom:C,descriptionFontSize:P}=t;return{[e]:Object.assign(Object.assign({},Sn(t)),{position:"relative","--rc-virtual-list-scrollbar-bg":t.colorSplit,"*":{outline:"none"},[`${e}-header`]:{background:v},[`${e}-footer`]:{background:y},[`${e}-header, ${e}-footer`]:{paddingBlock:o},[`${e}-pagination`]:{marginBlockStart:a,[`${n}-pagination-options`]:{textAlign:"start"}},[`${e}-spin`]:{minHeight:i,textAlign:"center"},[`${e}-items`]:{margin:0,padding:0,listStyle:"none"},[`${e}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:l,color:m,[`${e}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${e}-item-meta-avatar`]:{marginInlineEnd:$},[`${e}-item-meta-content`]:{flex:"1 0",width:0,color:m},[`${e}-item-meta-title`]:{margin:`0 0 ${V(t.marginXXS)} 0`,color:m,fontSize:t.fontSize,lineHeight:t.lineHeight,"> a":{color:m,transition:`all ${g}`,"&:hover":{color:c}}},[`${e}-item-meta-description`]:{color:p,fontSize:P,lineHeight:t.lineHeight}},[`${e}-item-action`]:{flex:"0 0 auto",marginInlineStart:t.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${V(f)}`,color:p,fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${e}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:O,height:t.calc(t.fontHeight).sub(t.calc(t.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:t.colorSplit}}},[`${e}-empty`]:{padding:`${V(s)} 0`,color:p,fontSize:t.fontSizeSM,textAlign:"center"},[`${e}-empty-text`]:{padding:S,color:t.colorTextDisabled,fontSize:t.fontSize,textAlign:"center"},[`${e}-item-no-flex`]:{display:"block"}}),[`${e}-grid ${n}-col > ${e}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:h,paddingBlock:0,borderBlockEnd:"none"},[`${e}-vertical ${e}-item`]:{alignItems:"initial",[`${e}-item-main`]:{display:"block",flex:1},[`${e}-item-extra`]:{marginInlineStart:a},[`${e}-item-meta`]:{marginBlockEnd:x,[`${e}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:C,color:m,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}},[`${e}-item-action`]:{marginBlockStart:s,marginInlineStart:"auto","> li":{padding:`0 ${V(s)}`,"&:first-child":{paddingInlineStart:0}}}},[`${e}-split ${e}-item`]:{borderBlockEnd:`${V(t.lineWidth)} ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${e}-split ${e}-header`]:{borderBlockEnd:`${V(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},[`${e}-split${e}-empty ${e}-footer`]:{borderTop:`${V(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},[`${e}-loading ${e}-spin-nested-loading`]:{minHeight:r},[`${e}-split${e}-something-after-last-item ${n}-spin-container > ${e}-items > ${e}-item:last-child`]:{borderBlockEnd:`${V(t.lineWidth)} ${t.lineType} ${t.colorSplit}`},[`${e}-lg ${e}-item`]:{padding:d},[`${e}-sm ${e}-item`]:{padding:u},[`${e}:not(${e}-vertical)`]:{[`${e}-item-no-flex`]:{[`${e}-item-action`]:{float:"right"}}}}},t9=t=>({contentWidth:220,itemPadding:`${V(t.paddingContentVertical)} 0`,itemPaddingSM:`${V(t.paddingContentVerticalSM)} ${V(t.paddingContentHorizontal)}`,itemPaddingLG:`${V(t.paddingContentVerticalLG)} ${V(t.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:t.padding,metaMarginBottom:t.padding,avatarMarginRight:t.padding,titleMarginBottom:t.paddingSM,descriptionFontSize:t.fontSize}),n9=Ft("List",t=>{const e=It(t,{listBorderedCls:`${t.componentCls}-bordered`,minHeight:t.controlHeightLG});return[e9(e),K7(e),J7(e)]},t9);var r9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i(be,ge)=>{var Me;P(be),_(ge),n&&((Me=n==null?void 0:n[Oe])===null||Me===void 0||Me.call(n,be,ge))},z=k("onChange"),L=k("onShowSizeChange"),B=(Oe,be)=>{if(!y)return null;let ge;return typeof v=="function"?ge=v(Oe):v?ge=Oe[v]:ge=Oe.key,ge||(ge=`list-item-${be}`),b(Qt,{key:ge},y(Oe,be))},F=!!(d||n||g),H=R("list",r),[X,q,N]=n9(H);let j=O;typeof j=="boolean"&&(j={spinning:j});const oe=!!(j!=null&&j.spinning),ee=br(m);let se="";switch(ee){case"large":se="lg";break;case"small":se="sm";break}const fe=U(H,{[`${H}-vertical`]:u==="vertical",[`${H}-${se}`]:se,[`${H}-split`]:o,[`${H}-bordered`]:i,[`${H}-loading`]:oe,[`${H}-grid`]:!!f,[`${H}-something-after-last-item`]:F,[`${H}-rtl`]:I==="rtl"},T,a,s,q,N),re=Zp(E,{total:h.length,current:C,pageSize:w},n||{}),J=Math.ceil(re.total/re.pageSize);re.current=Math.min(re.current,J);const ue=n&&b("div",{className:U(`${H}-pagination`)},b(qP,Object.assign({align:"end"},re,{onChange:z,onShowSizeChange:L})));let de=Ce(h);n&&h.length>(re.current-1)*re.pageSize&&(de=Ce(h).splice((re.current-1)*re.pageSize,re.pageSize));const D=Object.keys(f||{}).some(Oe=>["xs","sm","md","lg","xl","xxl"].includes(Oe)),Y=Jf(D),me=ve(()=>{for(let Oe=0;Oe{if(!f)return;const Oe=me&&f[me]?f[me]:f.column;if(Oe)return{width:`${100/Oe}%`,maxWidth:`${100/Oe}%`}},[JSON.stringify(f),me]);let ce=oe&&b("div",{style:{minHeight:53}});if(de.length>0){const Oe=de.map(B);ce=f?b(Ca,{gutter:f.gutter},wi.map(Oe,be=>b("div",{key:be==null?void 0:be.key,style:G},be))):b("ul",{className:`${H}-items`},Oe)}else!c&&!oe&&(ce=b("div",{className:`${H}-empty-text`},(S==null?void 0:S.emptyText)||(Q==null?void 0:Q("List"))||b(M2,{componentName:"List"})));const ae=re.position,pe=ve(()=>({grid:f,itemLayout:u}),[JSON.stringify(f),u]);return X(b(j0.Provider,{value:pe},b("div",Object.assign({ref:e,style:Object.assign(Object.assign({},M),l),className:fe},x),(ae==="top"||ae==="both")&&ue,p&&b("div",{className:`${H}-header`},p),b(ch,Object.assign({},j),ce,c),g&&b("div",{className:`${H}-footer`},g),d||(ae==="bottom"||ae==="both")&&ue)))}const o9=Se(i9),td=o9;td.Item=JP;const a9=(t,e=!1)=>e&&t==null?[]:Array.isArray(t)?t:[t];var s9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,closeIcon:r,closable:i,type:o,title:a,children:s,footer:l}=t,c=s9(t,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=he(lt),d=u(),f=e||u("modal"),h=Tr(d),[m,p,g]=Yw(f,h),O=`${f}-confirm`;let v={};return o?v={closable:i??!1,title:"",footer:"",children:b(Jw,Object.assign({},t,{prefixCls:f,confirmPrefixCls:O,rootPrefixCls:d,content:s}))}:v={closable:i??!0,title:a,footer:l!==null&&b(Zw,Object.assign({},t)),children:s},m(b(Mw,Object.assign({prefixCls:f,className:U(p,`${f}-pure-panel`,o&&O,o&&`${O}-${o}`,n,g,h)},c,{closeIcon:Xw(f,r),closable:i},v)))},c9=m2(l9);function e_(t){return Mc(r2(t))}const ar=Kw;ar.useModal=Pz;ar.info=function(e){return Mc(i2(e))};ar.success=function(e){return Mc(o2(e))};ar.error=function(e){return Mc(a2(e))};ar.warning=e_;ar.warn=e_;ar.confirm=function(e){return Mc(s2(e))};ar.destroyAll=function(){for(;ca.length;){const e=ca.pop();e&&e()}};ar.config=Sz;ar._InternalPanelDoNotUseOrYouWillBeFired=c9;let yi=null,nd=t=>t(),Wd=[],Jl={};function qS(){const{getContainer:t,rtl:e,maxCount:n,top:r,bottom:i,showProgress:o,pauseOnHover:a}=Jl,s=(t==null?void 0:t())||document.body;return{getContainer:()=>s,rtl:e,maxCount:n,top:r,bottom:i,showProgress:o,pauseOnHover:a}}const u9=K.forwardRef((t,e)=>{const{notificationConfig:n,sync:r}=t,{getPrefixCls:i}=he(lt),o=Jl.prefixCls||i("notification"),a=he(Gz),[s,l]=h2(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),a.notification));return K.useEffect(r,[]),K.useImperativeHandle(e,()=>{const c=Object.assign({},s);return Object.keys(c).forEach(u=>{c[u]=(...d)=>(r(),s[u].apply(s,d))}),{instance:c,sync:r}}),l}),d9=K.forwardRef((t,e)=>{const[n,r]=K.useState(qS),i=()=>{r(qS)};K.useEffect(i,[]);const o=aw(),a=o.getRootPrefixCls(),s=o.getIconPrefixCls(),l=o.getTheme(),c=K.createElement(u9,{ref:e,sync:i,notificationConfig:n});return K.createElement(Ur,{prefixCls:a,iconPrefixCls:s,theme:l},o.holderRender?o.holderRender(c):c)}),L0=()=>{if(!yi){const t=document.createDocumentFragment(),e={fragment:t};yi=e,nd(()=>{qv()(K.createElement(d9,{ref:r=>{const{instance:i,sync:o}=r||{};Promise.resolve().then(()=>{!e.instance&&i&&(e.instance=i,e.sync=o,L0())})}}),t)});return}yi.instance&&(Wd.forEach(t=>{switch(t.type){case"open":{nd(()=>{yi.instance.open(Object.assign(Object.assign({},Jl),t.config))});break}case"destroy":nd(()=>{var e;(e=yi==null?void 0:yi.instance)===null||e===void 0||e.destroy(t.key)});break}}),Wd=[])};function f9(t){Jl=Object.assign(Object.assign({},Jl),t),nd(()=>{var e;(e=yi==null?void 0:yi.sync)===null||e===void 0||e.call(yi)})}function t_(t){Wd.push({type:"open",config:t}),L0()}const h9=t=>{Wd.push({type:"destroy",key:t}),L0()},m9=["success","info","warning","error"],p9={open:t_,destroy:h9,config:f9,useNotification:qz,_InternalPanelDoNotUseOrYouWillBeFired:jz},dr=p9;m9.forEach(t=>{dr[t]=e=>t_(Object.assign(Object.assign({},e),{type:t}))});const g9=t=>{const{componentCls:e,iconCls:n,antCls:r,zIndexPopup:i,colorText:o,colorWarning:a,marginXXS:s,marginXS:l,fontSize:c,fontWeightStrong:u,colorTextHeading:d}=t;return{[e]:{zIndex:i,[`&${r}-popover`]:{fontSize:c},[`${e}-message`]:{marginBottom:l,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e}-message-icon ${n}`]:{color:a,fontSize:c,lineHeight:1,marginInlineEnd:l},[`${e}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:"normal"}},[`${e}-description`]:{marginTop:s,color:o}},[`${e}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:l}}}}},v9=t=>{const{zIndexPopupBase:e}=t;return{zIndexPopup:e+60}},n_=Ft("Popconfirm",t=>g9(t),v9,{resetStyle:!1});var O9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,okButtonProps:n,cancelButtonProps:r,title:i,description:o,cancelText:a,okText:s,okType:l="primary",icon:c=b(Ds,null),showCancel:u=!0,close:d,onConfirm:f,onCancel:h,onPopupClick:m}=t,{getPrefixCls:p}=he(lt),[g]=Ii("Popconfirm",Gi.Popconfirm),O=ws(i),v=ws(o);return b("div",{className:`${e}-inner-content`,onClick:m},b("div",{className:`${e}-message`},c&&b("span",{className:`${e}-message-icon`},c),b("div",{className:`${e}-message-text`},O&&b("div",{className:`${e}-title`},O),v&&b("div",{className:`${e}-description`},v))),b("div",{className:`${e}-buttons`},u&&b(wt,Object.assign({onClick:h,size:"small"},r),a||(g==null?void 0:g.cancelText)),b(a0,{buttonProps:Object.assign(Object.assign({size:"small"},Uv(l)),n),actionFn:f,close:d,prefixCls:p("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},s||(g==null?void 0:g.okText))))},b9=t=>{const{prefixCls:e,placement:n,className:r,style:i}=t,o=O9(t,["prefixCls","placement","className","style"]),{getPrefixCls:a}=he(lt),s=a("popconfirm",e),[l]=n_(s);return l(b(G2,{placement:n,className:U(s,r),style:i,content:b(r_,Object.assign({prefixCls:s},o))}))};var y9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,placement:o="top",trigger:a="click",okType:s="primary",icon:l=b(Ds,null),children:c,overlayClassName:u,onOpenChange:d,onVisibleChange:f,overlayStyle:h,styles:m,classNames:p}=t,g=y9(t,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:O,className:v,style:y,classNames:S,styles:x}=Zn("popconfirm"),[$,C]=Pn(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),P=(k,z)=>{C(k,!0),f==null||f(k),d==null||d(k,z)},w=k=>{P(!1,k)},_=k=>{var z;return(z=t.onConfirm)===null||z===void 0?void 0:z.call(void 0,k)},R=k=>{var z;P(!1,k),(z=t.onCancel)===null||z===void 0||z.call(void 0,k)},I=(k,z)=>{const{disabled:L=!1}=t;L||P(k,z)},T=O("popconfirm",i),M=U(T,v,u,S.root,p==null?void 0:p.root),Q=U(S.body,p==null?void 0:p.body),[E]=n_(T);return E(b(x0,Object.assign({},pn(g,["title"]),{trigger:a,placement:o,onOpenChange:I,open:$,ref:e,classNames:{root:M,body:Q},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},x.root),y),h),m==null?void 0:m.root),body:Object.assign(Object.assign({},x.body),m==null?void 0:m.body)},content:b(r_,Object.assign({okType:s,icon:l},t,{prefixCls:T,close:w,onConfirm:_,onCancel:R})),"data-popover-inject":!0}),c))}),i_=S9;i_._InternalPanelDoNotUseOrYouWillBeFired=b9;var x9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},$9=function(e,n){return b(Mt,xe({},e,{ref:n,icon:x9}))},Rl=Se($9),C9=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],o_=Se(function(t,e){var n,r=t.prefixCls,i=r===void 0?"rc-switch":r,o=t.className,a=t.checked,s=t.defaultChecked,l=t.disabled,c=t.loadingIcon,u=t.checkedChildren,d=t.unCheckedChildren,f=t.onClick,h=t.onChange,m=t.onKeyDown,p=gt(t,C9),g=Pn(!1,{value:a,defaultValue:s}),O=le(g,2),v=O[0],y=O[1];function S(P,w){var _=v;return l||(_=P,y(_),h==null||h(_,w)),_}function x(P){P.which===ze.LEFT?S(!1,P):P.which===ze.RIGHT&&S(!0,P),m==null||m(P)}function $(P){var w=S(!v,P);f==null||f(w,P)}var C=U(i,o,(n={},W(n,"".concat(i,"-checked"),v),W(n,"".concat(i,"-disabled"),l),n));return b("button",xe({},p,{type:"button",role:"switch","aria-checked":v,disabled:l,className:C,ref:e,onKeyDown:x,onClick:$}),c,b("span",{className:"".concat(i,"-inner")},b("span",{className:"".concat(i,"-inner-checked")},u),b("span",{className:"".concat(i,"-inner-unchecked")},d)))});o_.displayName="Switch";const w9=t=>{const{componentCls:e,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:o,innerMaxMarginSM:a,handleSizeSM:s,calc:l}=t,c=`${e}-inner`,u=V(l(s).add(l(r).mul(2)).equal()),d=V(l(a).mul(2).equal());return{[e]:{[`&${e}-small`]:{minWidth:i,height:n,lineHeight:V(n),[`${e}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${c}-unchecked`]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${e}-handle`]:{width:s,height:s},[`${e}-loading-icon`]:{top:l(l(s).sub(t.switchLoadingIconSize)).div(2).equal(),fontSize:t.switchLoadingIconSize},[`&${e}-checked`]:{[`${e}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${e}-handle`]:{insetInlineStart:`calc(100% - ${V(l(s).add(r).equal())})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(t.marginXXS).div(2).equal(),marginInlineEnd:l(t.marginXXS).mul(-1).div(2).equal()}},[`&${e}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(t.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(t.marginXXS).div(2).equal()}}}}}}},P9=t=>{const{componentCls:e,handleSize:n,calc:r}=t;return{[e]:{[`${e}-loading-icon${t.iconCls}`]:{position:"relative",top:r(r(n).sub(t.fontSize)).div(2).equal(),color:t.switchLoadingIconColor,verticalAlign:"top"},[`&${e}-checked ${e}-loading-icon`]:{color:t.switchColor}}}},_9=t=>{const{componentCls:e,trackPadding:n,handleBg:r,handleShadow:i,handleSize:o,calc:a}=t,s=`${e}-handle`;return{[e]:{[s]:{position:"absolute",top:n,insetInlineStart:n,width:o,height:o,transition:`all ${t.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:a(o).div(2).equal(),boxShadow:i,transition:`all ${t.switchDuration} ease-in-out`,content:'""'}},[`&${e}-checked ${s}`]:{insetInlineStart:`calc(100% - ${V(a(o).add(n).equal())})`},[`&:not(${e}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:t.switchHandleActiveInset,insetInlineStart:0},[`&${e}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:t.switchHandleActiveInset}}}}},T9=t=>{const{componentCls:e,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:o,handleSize:a,calc:s}=t,l=`${e}-inner`,c=V(s(a).add(s(r).mul(2)).equal()),u=V(s(o).mul(2).equal());return{[e]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:i,transition:`padding-inline-start ${t.switchDuration} ease-in-out, padding-inline-end ${t.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:t.colorTextLightSolid,fontSize:t.fontSizeSM,transition:`margin-inline-start ${t.switchDuration} ease-in-out, margin-inline-end ${t.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${l}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${e}-checked ${l}`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:s(r).mul(2).equal(),marginInlineEnd:s(r).mul(-1).mul(2).equal()}},[`&${e}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:s(r).mul(-1).mul(2).equal(),marginInlineEnd:s(r).mul(2).equal()}}}}}},R9=t=>{const{componentCls:e,trackHeight:n,trackMinWidth:r}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},Sn(t)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:V(n),verticalAlign:"middle",background:t.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${t.motionDurationMid}`,userSelect:"none",[`&:hover:not(${e}-disabled)`]:{background:t.colorTextTertiary}}),hi(t)),{[`&${e}-checked`]:{background:t.switchColor,[`&:hover:not(${e}-disabled)`]:{background:t.colorPrimaryHover}},[`&${e}-loading, &${e}-disabled`]:{cursor:"not-allowed",opacity:t.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${e}-rtl`]:{direction:"rtl"}})}},I9=t=>{const{fontSize:e,lineHeight:n,controlHeight:r,colorWhite:i}=t,o=e*n,a=r/2,s=2,l=o-s*2,c=a-s*2;return{trackHeight:o,trackHeightSM:a,trackMinWidth:l*2+s*4,trackMinWidthSM:c*2+s*2,trackPadding:s,handleBg:i,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new Vt("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+s+s*2,innerMinMarginSM:c/2,innerMaxMarginSM:c+s+s*2}},M9=Ft("Switch",t=>{const e=It(t,{switchDuration:t.motionDurationMid,switchColor:t.colorPrimary,switchDisabledOpacity:t.opacityLoading,switchLoadingIconSize:t.calc(t.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${t.opacityLoading})`,switchHandleActiveInset:"-30%"});return[R9(e),T9(e),_9(e),P9(e),w9(e)]},I9);var E9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,size:r,disabled:i,loading:o,className:a,rootClassName:s,style:l,checked:c,value:u,defaultChecked:d,defaultValue:f,onChange:h}=t,m=E9(t,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[p,g]=Pn(!1,{value:c??u,defaultValue:d??f}),{getPrefixCls:O,direction:v,switch:y}=he(lt),S=he(Ui),x=(i??S)||o,$=O("switch",n),C=b("div",{className:`${$}-handle`},o&&b(wc,{className:`${$}-loading-icon`})),[P,w,_]=M9($),R=br(r),I=U(y==null?void 0:y.className,{[`${$}-small`]:R==="small",[`${$}-loading`]:o,[`${$}-rtl`]:v==="rtl"},a,s,w,_),T=Object.assign(Object.assign({},y==null?void 0:y.style),l);return P(b(Gv,{component:"Switch",disabled:x},b(o_,Object.assign({},m,{checked:p,onChange:(...Q)=>{g(Q[0]),h==null||h.apply(void 0,Q)},prefixCls:$,className:I,style:T,disabled:x,ref:e,loadingIcon:C}))))}),Si=k9;Si.__ANT_SWITCH=!0;const A9=t=>{const{paddingXXS:e,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:o}=t,a=o(r).sub(n).equal(),s=o(e).sub(n).equal();return{[i]:Object.assign(Object.assign({},Sn(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:a,fontSize:t.tagFontSize,lineHeight:t.tagLineHeight,whiteSpace:"nowrap",background:t.defaultBg,border:`${V(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,opacity:1,transition:`all ${t.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:t.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:t.tagIconSize,color:t.colorIcon,cursor:"pointer",transition:`all ${t.motionDurationMid}`,"&:hover":{color:t.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${t.iconCls}-close, ${t.iconCls}-close:hover`]:{color:t.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${t.iconCls} + span, > span + ${t.iconCls}`]:{marginInlineStart:a}}),[`${i}-borderless`]:{borderColor:"transparent",background:t.tagBorderlessBg}}},D0=t=>{const{lineWidth:e,fontSizeIcon:n,calc:r}=t,i=t.fontSizeSM;return It(t,{tagFontSize:i,tagLineHeight:V(r(t.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(e).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:t.defaultBg})},B0=t=>({defaultBg:new Vt(t.colorFillQuaternary).onBackground(t.colorBgContainer).toHexString(),defaultColor:t.colorText}),a_=Ft("Tag",t=>{const e=D0(t);return A9(e)},B0);var Q9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,style:r,className:i,checked:o,children:a,icon:s,onChange:l,onClick:c}=t,u=Q9(t,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:d,tag:f}=he(lt),h=y=>{l==null||l(!o),c==null||c(y)},m=d("tag",n),[p,g,O]=a_(m),v=U(m,`${m}-checkable`,{[`${m}-checkable-checked`]:o},f==null?void 0:f.className,i,g,O);return p(b("span",Object.assign({},u,{ref:e,style:Object.assign(Object.assign({},r),f==null?void 0:f.style),className:v,onClick:h}),s,b("span",null,a)))}),z9=t=>FC(t,(e,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:o})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:t.colorTextLightSolid,background:o,borderColor:o},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}})),j9=Ea(["Tag","preset"],t=>{const e=D0(t);return z9(e)},B0);function L9(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1)}const mu=(t,e,n)=>{const r=L9(n);return{[`${t.componentCls}${t.componentCls}-${e}`]:{color:t[`color${n}`],background:t[`color${r}Bg`],borderColor:t[`color${r}Border`],[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}},D9=Ea(["Tag","status"],t=>{const e=D0(t);return[mu(e,"success","Success"),mu(e,"processing","Info"),mu(e,"error","Error"),mu(e,"warning","Warning")]},B0);var B9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,className:r,rootClassName:i,style:o,children:a,icon:s,color:l,onClose:c,bordered:u=!0,visible:d}=t,f=B9(t,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:h,direction:m,tag:p}=he(lt),[g,O]=te(!0),v=pn(f,["closeIcon","closable"]);ye(()=>{d!==void 0&&O(d)},[d]);const y=F2(l),S=Mj(l),x=y||S,$=Object.assign(Object.assign({backgroundColor:l&&!x?l:void 0},p==null?void 0:p.style),o),C=h("tag",n),[P,w,_]=a_(C),R=U(C,p==null?void 0:p.className,{[`${C}-${l}`]:x,[`${C}-has-color`]:l&&!x,[`${C}-hidden`]:!g,[`${C}-rtl`]:m==="rtl",[`${C}-borderless`]:!u},r,i,w,_),I=z=>{z.stopPropagation(),c==null||c(z),!z.defaultPrevented&&O(!1)},[,T]=Fw(Md(t),Md(p),{closable:!1,closeIconRender:z=>{const L=b("span",{className:`${C}-close-icon`,onClick:I},z);return Xv(z,L,B=>({onClick:F=>{var H;(H=B==null?void 0:B.onClick)===null||H===void 0||H.call(B,F),I(F)},className:U(B==null?void 0:B.className,`${C}-close-icon`)}))}}),M=typeof f.onClick=="function"||a&&a.type==="a",Q=s||null,E=Q?b(Qt,null,Q,a&&b("span",null,a)):a,k=b("span",Object.assign({},v,{ref:e,className:R,style:$}),E,T,y&&b(j9,{key:"preset",prefixCls:C}),S&&b(D9,{key:"status",prefixCls:C}));return P(M?b(Gv,{component:"Tag"},k):k)}),gl=W9;gl.CheckableTag=N9;const oi=(t,e)=>new Vt(t).setA(e).toRgbString(),Za=(t,e)=>new Vt(t).lighten(e).toHexString(),H9=t=>{const e=Oa(t,{theme:"dark"});return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[6],6:e[5],7:e[4],8:e[6],9:e[5],10:e[4]}},V9=(t,e)=>{const n=t||"#000",r=e||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:oi(r,.85),colorTextSecondary:oi(r,.65),colorTextTertiary:oi(r,.45),colorTextQuaternary:oi(r,.25),colorFill:oi(r,.18),colorFillSecondary:oi(r,.12),colorFillTertiary:oi(r,.08),colorFillQuaternary:oi(r,.04),colorBgSolid:oi(r,.95),colorBgSolidHover:oi(r,1),colorBgSolidActive:oi(r,.9),colorBgElevated:Za(n,12),colorBgContainer:Za(n,8),colorBgLayout:Za(n,0),colorBgSpotlight:Za(n,26),colorBgBlur:oi(r,.04),colorBorder:Za(n,26),colorBorderSecondary:Za(n,19)}},F9=(t,e)=>{const n=Object.keys(Bv).map(o=>{const a=Oa(t[o],{theme:"dark"});return Array.from({length:10},()=>1).reduce((s,l,c)=>(s[`${o}-${c+1}`]=a[c],s[`${o}${c+1}`]=a[c],s),{})}).reduce((o,a)=>(o=Object.assign(Object.assign({},o),a),o),{}),r=e??Wv(t),i=AC(t,{generateColorPalettes:H9,generateNeutralColorPalettes:V9});return Object.assign(Object.assign(Object.assign(Object.assign({},r),n),i),{colorPrimaryBg:i.colorPrimaryBorder,colorPrimaryBgHover:i.colorPrimaryBorderHover})},GS={defaultSeed:Cd.token,defaultAlgorithm:Wv,darkAlgorithm:F9};var X9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},Z9=function(e,n){return b(Mt,xe({},e,{ref:n,icon:X9}))},lg=Se(Z9),q9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},G9=function(e,n){return b(Mt,xe({},e,{ref:n,icon:q9}))},W0=Se(G9),U9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},Y9=function(e,n){return b(Mt,xe({},e,{ref:n,icon:U9}))},K9=Se(Y9);const J9=(t,e,n,r)=>{const{titleMarginBottom:i,fontWeightStrong:o}=r;return{marginBottom:i,color:n,fontWeight:o,fontSize:t,lineHeight:e}},eW=t=>{const e=[1,2,3,4,5],n={};return e.forEach(r=>{n[` h${r}&, div&-h${r}, div&-h${r} > textarea, h${r} - `]=u9(t[`fontSizeHeading${r}`],t[`lineHeightHeading${r}`],t.colorTextHeading,t)}),n},f9=t=>{const{componentCls:e}=t;return{"a&, a":Object.assign(Object.assign({},T$(t)),{userSelect:"text",[`&[disabled], &${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:t.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},h9=t=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:pd[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:t.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:t.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),p9=t=>{const{componentCls:e,paddingSM:n}=t,r=n;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:t.calc(t.paddingSM).mul(-1).equal(),insetBlockStart:t.calc(r).div(-2).add(1).equal(),marginBottom:t.calc(r).div(2).sub(2).equal()},[`${e}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:t.calc(t.marginXS).add(2).equal(),insetBlockEnd:t.marginXS,color:t.colorIcon,fontWeight:"normal",fontSize:t.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},m9=t=>({[`${t.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:t.colorSuccess}},[`${t.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),g9=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),v9=t=>{const{componentCls:e,titleMarginTop:n}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorText,wordBreak:"break-word",lineHeight:t.lineHeight,[`&${e}-secondary`]:{color:t.colorTextDescription},[`&${e}-success`]:{color:t.colorSuccessText},[`&${e}-warning`]:{color:t.colorWarningText},[`&${e}-danger`]:{color:t.colorErrorText,"a&:active, a&:focus":{color:t.colorErrorTextActive},"a&:hover":{color:t.colorErrorTextHover}},[`&${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},d9(t)),{[` + `]=J9(t[`fontSizeHeading${r}`],t[`lineHeightHeading${r}`],t.colorTextHeading,t)}),n},tW=t=>{const{componentCls:e}=t;return{"a&, a":Object.assign(Object.assign({},VC(t)),{userSelect:"text",[`&[disabled], &${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:t.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},nW=t=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:xd[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:t.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:t.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),rW=t=>{const{componentCls:e,paddingSM:n}=t,r=n;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:t.calc(t.paddingSM).mul(-1).equal(),insetBlockStart:t.calc(r).div(-2).add(1).equal(),marginBottom:t.calc(r).div(2).sub(2).equal()},[`${e}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:t.calc(t.marginXS).add(2).equal(),insetBlockEnd:t.marginXS,color:t.colorIcon,fontWeight:"normal",fontSize:t.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},iW=t=>({[`${t.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:t.colorSuccess}},[`${t.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),oW=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),aW=t=>{const{componentCls:e,titleMarginTop:n}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorText,wordBreak:"break-word",lineHeight:t.lineHeight,[`&${e}-secondary`]:{color:t.colorTextDescription},[`&${e}-success`]:{color:t.colorSuccessText},[`&${e}-warning`]:{color:t.colorWarningText},[`&${e}-danger`]:{color:t.colorErrorText,"a&:active, a&:focus":{color:t.colorErrorTextActive},"a&:hover":{color:t.colorErrorTextHover}},[`&${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},eW(t)),{[` & + h1${e}, & + h2${e}, & + h3${e}, & + h4${e}, & + h5${e} - `]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),h9(t)),f9(t)),{[` + `]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),nW(t)),tW(t)),{[` ${e}-expand, ${e}-collapse, ${e}-edit, ${e}-copy - `]:Object.assign(Object.assign({},T$(t)),{marginInlineStart:t.marginXXS})}),p9(t)),m9(t)),g9()),{"&-rtl":{direction:"rtl"}})}},O9=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),VP=Zt("Typography",v9,O9),b9=t=>{const{prefixCls:e,"aria-label":n,className:r,style:i,direction:o,maxLength:a,autoSize:s=!0,value:l,onSave:c,onCancel:u,onEnd:d,component:f,enterIcon:h=y(c9,null)}=t,p=U(null),m=U(!1),g=U(null),[v,O]=J(l);be(()=>{O(l)},[l]),be(()=>{var I;if(!((I=p.current)===null||I===void 0)&&I.resizableTextArea){const{textArea:Q}=p.current.resizableTextArea;Q.focus();const{length:M}=Q.value;Q.setSelectionRange(M,M)}},[]);const S=({target:I})=>{O(I.value.replace(/[\n\r]/g,""))},x=()=>{m.current=!0},b=()=>{m.current=!1},C=({keyCode:I})=>{m.current||(g.current=I)},$=()=>{c(v.trim())},w=({keyCode:I,ctrlKey:Q,altKey:M,metaKey:E,shiftKey:N})=>{g.current!==I||m.current||Q||M||E||N||(I===je.ENTER?($(),d==null||d()):I===je.ESC&&u())},P=()=>{$()},[_,T,R]=VP(e),k=Z(e,`${e}-edit-content`,{[`${e}-rtl`]:o==="rtl",[`${e}-${f}`]:!!f},r,T,R);return _(y("div",{className:k,style:i},y(RP,{ref:p,maxLength:a,value:v,onChange:S,onKeyDown:C,onKeyUp:w,onCompositionStart:x,onCompositionEnd:b,onBlur:P,"aria-label":n,rows:1,autoSize:s}),h!==null?fr(h,{className:`${e}-edit-content-confirm`}):null))};var y9=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=A1[e.format]||A1.default;window.clipboardData.setData(d,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=C9("message"in e?e.message:x9),window.prompt(r,t)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var w9=$9;const P9=wC(w9);var _9=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})};const T9=({copyConfig:t,children:e})=>{const[n,r]=J(!1),[i,o]=J(!1),a=U(null),s=()=>{a.current&&clearTimeout(a.current)},l={};t.format&&(l.format=t.format),be(()=>s,[]);const c=pn(u=>_9(void 0,void 0,void 0,function*(){var d;u==null||u.preventDefault(),u==null||u.stopPropagation(),o(!0);try{const f=typeof t.text=="function"?yield t.text():t.text;P9(f||v7(e,!0).join("")||"",l),o(!1),r(!0),s(),a.current=setTimeout(()=>{r(!1)},3e3),(d=t.onCopy)===null||d===void 0||d.call(t,u)}catch(f){throw o(!1),f}}));return{copied:n,copyLoading:i,onClick:c}};function tp(t,e){return ge(()=>{const n=!!t;return[n,Object.assign(Object.assign({},e),n&&typeof t=="object"?t:null)]},[t])}const k9=t=>{const e=U(void 0);return be(()=>{e.current=t}),e.current},R9=(t,e,n)=>ge(()=>t===!0?{title:e??n}:Kt(t)?{title:t}:typeof t=="object"?Object.assign({title:e??n},t):{title:t},[t,e,n]);var I9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,component:r="article",className:i,rootClassName:o,setContentRef:a,children:s,direction:l,style:c}=t,u=I9(t,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:d,direction:f,className:h,style:p}=rr("typography"),m=l??f,g=a?pr(e,a):e,v=d("typography",n),[O,S,x]=VP(v),b=Z(v,h,{[`${v}-rtl`]:m==="rtl"},i,o,S,x),C=Object.assign(Object.assign({},p),c);return O(y(r,Object.assign({className:b,style:C,ref:g},u),s))});var M9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},E9=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:M9}))},A9=Se(E9);function Q1(t){return t===!1?[!1,!1]:Array.isArray(t)?t:[t]}function np(t,e,n){return t===!0||t===void 0?e:t||n&&e}function Q9(t){const e=document.createElement("em");t.appendChild(e);const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return t.removeChild(e),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const I0=t=>["string","number"].includes(typeof t),N9=({prefixCls:t,copied:e,locale:n,iconOnly:r,tooltips:i,icon:o,tabIndex:a,onCopy:s,loading:l})=>{const c=Q1(i),u=Q1(o),{copied:d,copy:f}=n??{},h=e?d:f,p=np(c[e?1:0],h),m=typeof p=="string"?p:h;return y(on,{title:p},y("button",{type:"button",className:Z(`${t}-copy`,{[`${t}-copy-success`]:e,[`${t}-copy-icon-only`]:r}),onClick:s,"aria-label":m,tabIndex:a},e?np(u[1],y(_d,null),!0):np(u[0],y(l?yc:A9,null),!0)))},lu=Se(({style:t,children:e},n)=>{const r=U(null);return Yt(n,()=>({isExceed:()=>{const i=r.current;return i.scrollHeight>i.clientHeight},getHeight:()=>r.current.clientHeight})),y("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},t)},e)}),z9=t=>t.reduce((e,n)=>e+(I0(n)?String(n).length:1),0);function N1(t,e){let n=0;const r=[];for(let i=0;ie){const c=e-n;return r.push(String(o).slice(0,c)),r}r.push(o),n=l}return t}const rp=0,ip=1,op=2,ap=3,z1=4,cu={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function L9(t){const{enableMeasure:e,width:n,text:r,children:i,rows:o,expanded:a,miscDeps:s,onEllipsis:l}=t,c=ge(()=>nr(r),[r]),u=ge(()=>z9(c),[r]),d=ge(()=>i(c,!1),[r]),[f,h]=J(null),p=U(null),m=U(null),g=U(null),v=U(null),O=U(null),[S,x]=J(!1),[b,C]=J(rp),[$,w]=J(0),[P,_]=J(null);Nt(()=>{C(e&&n&&u?ip:rp)},[n,r,o,e,c]),Nt(()=>{var I,Q,M,E;if(b===ip){C(op);const N=m.current&&getComputedStyle(m.current).whiteSpace;_(N)}else if(b===op){const N=!!(!((I=g.current)===null||I===void 0)&&I.isExceed());C(N?ap:z1),h(N?[0,u]:null),x(N);const z=((Q=g.current)===null||Q===void 0?void 0:Q.getHeight())||0,L=o===1?0:((M=v.current)===null||M===void 0?void 0:M.getHeight())||0,F=((E=O.current)===null||E===void 0?void 0:E.getHeight())||0,H=Math.max(z,L+F);w(H+1),l(N)}},[b]);const T=f?Math.ceil((f[0]+f[1])/2):0;Nt(()=>{var I;const[Q,M]=f||[0,0];if(Q!==M){const N=(((I=p.current)===null||I===void 0?void 0:I.getHeight())||0)>$;let z=T;M-Q===1&&(z=N?Q:M),h(N?[Q,z]:[z,M])}},[f,T]);const R=ge(()=>{if(!e)return i(c,!1);if(b!==ap||!f||f[0]!==f[1]){const I=i(c,!1);return[z1,rp].includes(b)?I:y("span",{style:Object.assign(Object.assign({},cu),{WebkitLineClamp:o})},I)}return i(a?c:N1(c,f[0]),S)},[a,b,f,c].concat($e(s))),k={width:n,margin:0,padding:0,whiteSpace:P==="nowrap"?"normal":"inherit"};return y(At,null,R,b===op&&y(At,null,y(lu,{style:Object.assign(Object.assign(Object.assign({},k),cu),{WebkitLineClamp:o}),ref:g},d),y(lu,{style:Object.assign(Object.assign(Object.assign({},k),cu),{WebkitLineClamp:o-1}),ref:v},d),y(lu,{style:Object.assign(Object.assign(Object.assign({},k),cu),{WebkitLineClamp:1}),ref:O},i([],!0))),b===ap&&f&&f[0]!==f[1]&&y(lu,{style:Object.assign(Object.assign({},k),{top:400}),ref:p},i(N1(c,T),!0)),b===ip&&y("span",{style:{whiteSpace:"inherit"},ref:m}))}const j9=({enableEllipsis:t,isEllipsis:e,children:n,tooltipProps:r})=>!(r!=null&&r.title)||!t?n:y(on,Object.assign({open:e?void 0:!1},r),n);var D9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const{prefixCls:r,className:i,style:o,type:a,disabled:s,children:l,ellipsis:c,editable:u,copyable:d,component:f,title:h}=t,p=D9(t,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:m,direction:g}=fe(it),[v]=Ki("Text"),O=U(null),S=U(null),x=m("typography",r),b=cn(p,L1),[C,$]=tp(u),[w,P]=_n(!1,{value:$.editing}),{triggerType:_=["icon"]}=$,T=_e=>{var Pe;_e&&((Pe=$.onStart)===null||Pe===void 0||Pe.call($)),P(_e)},R=k9(w);Nt(()=>{var _e;!w&&R&&((_e=S.current)===null||_e===void 0||_e.focus())},[w]);const k=_e=>{_e==null||_e.preventDefault(),T(!0)},I=_e=>{var Pe;(Pe=$.onChange)===null||Pe===void 0||Pe.call($,_e),T(!1)},Q=()=>{var _e;(_e=$.onCancel)===null||_e===void 0||_e.call($),T(!1)},[M,E]=tp(d),{copied:N,copyLoading:z,onClick:L}=T9({copyConfig:E,children:l}),[F,H]=J(!1),[V,X]=J(!1),[B,G]=J(!1),[se,re]=J(!1),[le,me]=J(!0),[ie,ne]=tp(c,{expandable:!1,symbol:_e=>_e?v==null?void 0:v.collapse:v==null?void 0:v.expand}),[ue,de]=_n(ne.defaultExpanded||!1,{value:ne.expanded}),j=ie&&(!ue||ne.expandable==="collapsible"),{rows:ee=1}=ne,he=ge(()=>j&&(ne.suffix!==void 0||ne.onEllipsis||ne.expandable||C||M),[j,ne,C,M]);Nt(()=>{ie&&!he&&(H(hy("webkitLineClamp")),X(hy("textOverflow")))},[he,ie]);const[ve,Y]=J(j),ce=ge(()=>he?!1:ee===1?V:F,[he,V,F]);Nt(()=>{Y(ce&&j)},[ce,j]);const te=j&&(ve?se:B),Oe=j&&ee===1&&ve,ye=j&&ee>1&&ve,pe=(_e,Pe)=>{var ct;de(Pe.expanded),(ct=ne.onExpand)===null||ct===void 0||ct.call(ne,_e,Pe)},[Qe,Me]=J(0),De=({offsetWidth:_e})=>{Me(_e)},we=_e=>{var Pe;G(_e),B!==_e&&((Pe=ne.onEllipsis)===null||Pe===void 0||Pe.call(ne,_e))};be(()=>{const _e=O.current;if(ie&&ve&&_e){const Pe=Q9(_e);se!==Pe&&re(Pe)}},[ie,ve,l,ye,le,Qe]),be(()=>{const _e=O.current;if(typeof IntersectionObserver>"u"||!_e||!ve||!j)return;const Pe=new IntersectionObserver(()=>{me(!!_e.offsetParent)});return Pe.observe(_e),()=>{Pe.disconnect()}},[ve,j]);const Ie=R9(ne.tooltip,$.text,l),rt=ge(()=>{if(!(!ie||ve))return[$.text,l,h,Ie.title].find(I0)},[ie,ve,h,Ie.title,te]);if(w)return y(b9,{value:(n=$.text)!==null&&n!==void 0?n:typeof l=="string"?l:"",onSave:I,onCancel:Q,onEnd:$.onEnd,prefixCls:x,className:i,style:o,direction:g,component:f,maxLength:$.maxLength,autoSize:$.autoSize,enterIcon:$.enterIcon});const Ye=()=>{const{expandable:_e,symbol:Pe}=ne;return _e?y("button",{type:"button",key:"expand",className:`${x}-${ue?"collapse":"expand"}`,onClick:ct=>pe(ct,{expanded:!ue}),"aria-label":ue?v.collapse:v==null?void 0:v.expand},typeof Pe=="function"?Pe(ue):Pe):null},lt=()=>{if(!C)return;const{icon:_e,tooltip:Pe,tabIndex:ct}=$,xt=nr(Pe)[0]||(v==null?void 0:v.edit),Pn=typeof xt=="string"?xt:"";return _.includes("icon")?y(on,{key:"edit",title:Pe===!1?"":xt},y("button",{type:"button",ref:S,className:`${x}-edit`,onClick:k,"aria-label":Pn,tabIndex:ct},_e||y(FP,{role:"button"}))):null},Be=()=>M?y(N9,Object.assign({key:"copy"},E,{prefixCls:x,copied:N,locale:v,onCopy:L,loading:z,iconOnly:l==null})):null,ke=_e=>[_e&&Ye(),lt(),Be()],Xe=_e=>[_e&&!ue&&y("span",{"aria-hidden":!0,key:"ellipsis"},W9),ne.suffix,ke(_e)];return y(Kr,{onResize:De,disabled:!j},_e=>y(j9,{tooltipProps:Ie,enableEllipsis:j,isEllipsis:te},y(HP,Object.assign({className:Z({[`${x}-${a}`]:a,[`${x}-disabled`]:s,[`${x}-ellipsis`]:ie,[`${x}-ellipsis-single-line`]:Oe,[`${x}-ellipsis-multiple-line`]:ye},i),prefixCls:r,style:Object.assign(Object.assign({},o),{WebkitLineClamp:ye?ee:void 0}),component:f,ref:pr(_e,O,e),direction:g,onClick:_.includes("text")?k:void 0,"aria-label":rt==null?void 0:rt.toString(),title:h},b),y(L9,{enableMeasure:j&&!ve,text:l,rows:ee,width:Qe,onEllipsis:we,expanded:ue,miscDeps:[N,ue,z,C,M,v].concat($e(L1.map(Pe=>t[Pe])))},(Pe,ct)=>B9(t,y(At,null,Pe.length>0&&ct&&!ue&&rt?y("span",{key:"show-content","aria-hidden":!0},Pe):Pe,Xe(ct)))))))});var F9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{ellipsis:n,rel:r}=t,i=F9(t,["ellipsis","rel"]);const o=Object.assign(Object.assign({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,y(eh,Object.assign({},o,{ref:e,ellipsis:!!n,component:"a"}))}),H9=Se((t,e)=>y(eh,Object.assign({ref:e},t,{component:"div"})));var X9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{ellipsis:n}=t,r=X9(t,["ellipsis"]);const i=ge(()=>n&&typeof n=="object"?cn(n,["expandable","rows"]):n,[n]);return y(eh,Object.assign({ref:e},r,{ellipsis:i,component:"span"}))},q9=Se(Z9);var G9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{level:n=1}=t,r=G9(t,["level"]),i=Y9.includes(n)?`h${n}`:"h1";return y(eh,Object.assign({ref:e},r,{component:i}))}),yn=HP;yn.Text=q9;yn.Link=V9;yn.Title=U9;yn.Paragraph=H9;var K9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},J9=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:K9}))},eW=Se(J9),tW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},nW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:tW}))},Gu=Se(nW),rW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},iW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:rW}))},Yu=Se(iW),oW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M448 804a64 64 0 10128 0 64 64 0 10-128 0zm32-168h64c4.4 0 8-3.6 8-8V164c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"exclamation",theme:"outlined"},aW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:oW}))},sW=Se(aW),lW={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},cW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:lW}))},uW=Se(cW),dW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"},fW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:dW}))},hW=Se(fW),pW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"},mW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:pW}))},gW=Se(mW),vW={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M489.5 111.66c30.65-1.8 45.98 36.44 22.58 56.33A243.35 243.35 0 00426 354c0 134.76 109.24 244 244 244 72.58 0 139.9-31.83 186.01-86.08 19.87-23.38 58.07-8.1 56.34 22.53C900.4 745.82 725.15 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.29-386.02 374.2-399.65l.2-.01zm-81.15 79.75l-4.11 1.36C271.1 237.94 176 364.09 176 511.5 176 697.34 326.66 848 512.5 848c148.28 0 274.94-96.2 319.45-230.41l.63-1.93-.11.07a307.06 307.06 0 01-159.73 46.26L670 662c-170.1 0-308-137.9-308-308 0-58.6 16.48-114.54 46.27-162.47z"}}]},name:"moon",theme:"outlined"},OW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:vW}))},bW=Se(OW),yW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},SW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:yW}))},xW=Se(SW),CW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},$W=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:CW}))},XP=Se($W),wW={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M548 818v126a16 16 0 01-16 16h-40a16 16 0 01-16-16V818c15.85 1.64 27.84 2.46 36 2.46 8.15 0 20.16-.82 36-2.46m205.25-115.66l89.1 89.1a16 16 0 010 22.62l-28.29 28.29a16 16 0 01-22.62 0l-89.1-89.1c12.37-10.04 21.43-17.95 27.2-23.71 5.76-5.77 13.67-14.84 23.71-27.2m-482.5 0c10.04 12.36 17.95 21.43 23.71 27.2 5.77 5.76 14.84 13.67 27.2 23.71l-89.1 89.1a16 16 0 01-22.62 0l-28.29-28.29a16 16 0 010-22.63zM512 278c129.24 0 234 104.77 234 234S641.24 746 512 746 278 641.24 278 512s104.77-234 234-234m0 72c-89.47 0-162 72.53-162 162s72.53 162 162 162 162-72.53 162-162-72.53-162-162-162M206 476c-1.64 15.85-2.46 27.84-2.46 36 0 8.15.82 20.16 2.46 36H80a16 16 0 01-16-16v-40a16 16 0 0116-16zm738 0a16 16 0 0116 16v40a16 16 0 01-16 16H818c1.64-15.85 2.46-27.84 2.46-36 0-8.15-.82-20.16-2.46-36zM814.06 180.65l28.29 28.29a16 16 0 010 22.63l-89.1 89.09c-10.04-12.37-17.95-21.43-23.71-27.2-5.77-5.76-14.84-13.67-27.2-23.71l89.1-89.1a16 16 0 0122.62 0m-581.5 0l89.1 89.1c-12.37 10.04-21.43 17.95-27.2 23.71-5.76 5.77-13.67 14.84-23.71 27.2l-89.1-89.1a16 16 0 010-22.62l28.29-28.29a16 16 0 0122.62 0M532 64a16 16 0 0116 16v126c-15.85-1.64-27.84-2.46-36-2.46-8.15 0-20.16.82-36 2.46V80a16 16 0 0116-16z"}}]},name:"sun",theme:"outlined"},PW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:wW}))},_W=Se(PW),TW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},kW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:TW}))},RW=Se(kW);function uu({currentUser:t=null,isDarkMode:e=!1,onThemeToggle:n}){const[r,i]=J(!1),o=()=>{try{return window.self!==window.top}catch{return!0}},a=p=>{if(console.log("Header getUserPicture called with user:",p),p!=null&&p.entity_picture)return console.log("Using entity_picture:",p.entity_picture),p.entity_picture;if(p!=null&&p.id){const m=`/api/image/serve/${p.id}/512x512`;return console.log("Using fallback URL:",m),m}return console.log("No picture available for user"),null},s=p=>(p==null?void 0:p.name)||"Unknown User",l=()=>{const p=window.location.href,m=new URL(p);window.location.href=`${m.protocol}//${m.hostname}${m.port?":"+m.port:""}/`},c=()=>{const p=window.location.href,m=new URL(p),g=m.hostname,v=m.protocol,O=m.port?`:${m.port}`:"",S=`${v}//${g}${O}/config/integrations/integration/rbac`;o()?window.open(S,"_blank"):window.location.href=S},u=()=>{const p=window.location.href,m=new URL(p),g=`${m.protocol}//${m.hostname}${m.port?":"+m.port:""}/api/rbac/static/config.html`;window.open(g,"_blank")},d=()=>{localStorage.removeItem("hassTokens"),sessionStorage.removeItem("hassTokens");const p=window.location.href,m=new URL(p);window.location.href=`${m.protocol}//${m.hostname}${m.port?":"+m.port:""}/auth/authorize`},f=()=>{i(!0),n()},h=[...o()?[{key:"newTab",label:"Open in New Tab",icon:A(uW,{}),onClick:u}]:[],...o()?[]:[{key:"home",label:"Return to Home Assistant",icon:A(hW,{}),onClick:l}],{key:"integration",label:"RBAC Integration",icon:A(XP,{}),onClick:c},{key:"logout",label:"Log Out",icon:A(gW,{}),onClick:d}];return A("div",{style:{background:e?"#1f1f1f":"white",padding:"20px",borderRadius:"8px",boxShadow:e?"0 2px 4px rgba(255,255,255,0.1)":"0 2px 4px rgba(0,0,0,0.1)",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px",border:e?"1px solid #424242":"none"},children:[A("div",{children:[A("h1",{style:{margin:0,color:e?"#ffffff":"#1976d2"},children:"🔐 RBAC Configuration"}),A("p",{style:{margin:0,color:e?"#d9d9d9":"#666"},children:"Manage role-based access control for your Home Assistant instance"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"16px"},children:[A(on,{title:e?"Switch to light mode":"Switch to dark mode",children:A(vt,{type:"text",icon:e?A(_W,{className:r?"theme-toggle-spin":""}):A(bW,{className:r?"theme-toggle-spin":""}),onClick:f,style:{fontSize:"16px",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid #d9d9d9",backgroundColor:"transparent",transition:"all 0.3s ease"},onMouseEnter:p=>{p.currentTarget.style.backgroundColor="#f5f5f5",p.currentTarget.style.borderColor="#1890ff"},onMouseLeave:p=>{p.currentTarget.style.backgroundColor="transparent",p.currentTarget.style.borderColor="#d9d9d9"}})}),t&&A(w0,{menu:{items:h},trigger:["click"],placement:"bottomRight",children:A("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"8px 12px",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.2s ease"},onMouseEnter:p=>{p.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:p=>{p.currentTarget.style.backgroundColor="transparent"},children:[A(p0,{src:a(t),size:48,children:s(t).charAt(0).toUpperCase()}),A("div",{children:[A(yn.Text,{strong:!0,style:{fontSize:"16px"},children:s(t)}),A("br",{}),A(yn.Text,{type:"secondary",style:{fontSize:"12px"},children:t.role||"No role assigned"})]})]})})]})]})}const{Option:IW}=jn;function j1({options:t,selectedValues:e,onSelectionChange:n,placeholder:r="Select items...",disabled:i=!1}){return A(jn,{mode:"multiple",placeholder:r,value:e,onChange:s=>{n(s||[])},disabled:i,tagRender:s=>{const{label:l,closable:c,onClose:u}=s;return A(Ka,{color:"blue",closable:c,onClose:u,style:{marginRight:3},children:l})},style:{width:"100%"},showSearch:!0,filterOption:(s,l)=>{var c;return((c=l==null?void 0:l.children)==null?void 0:c.toLowerCase().indexOf(s.toLowerCase()))>=0},children:t.map(s=>A(IW,{value:s,children:s},s))})}function MW({data:t,onSuccess:e,onError:n}){const[r,i]=J(!1),[o,a]=J({domains:[],entities:[]});be(()=>{var u;if((u=t.config)!=null&&u.default_restrictions){const d=t.config.default_restrictions;a({domains:Object.keys(d.domains||{}),entities:Object.keys(d.entities||{})})}},[t.config]);const s=async()=>{i(!0);try{const u=await l();if(!u)throw new Error("Not authenticated with Home Assistant");const d={domains:{},entities:{},services:{}};if(o.domains.forEach(h=>{d.domains[h]={hide:!0,services:[]}}),o.entities.forEach(h=>{d.entities[h]={hide:!0,services:[]}}),!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${u.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"update_default_restrictions",restrictions:d})})).ok)throw new Error("Failed to save default restrictions");e("Default restrictions saved successfully!")}catch(u){console.error("Error saving default restrictions:",u),n(u.message)}finally{i(!1)}},l=async()=>{try{const u=c();if(u&&u.auth){if(u.auth.data&&u.auth.data.access_token)return{access_token:u.auth.data.access_token,token_type:"Bearer"};if(u.auth.access_token)return{access_token:u.auth.access_token,token_type:"Bearer"}}const d=localStorage.getItem("hassTokens")||sessionStorage.getItem("hassTokens");return d?{access_token:JSON.parse(d).access_token,token_type:"Bearer"}:null}catch(u){return console.error("Auth error:",u),null}},c=()=>{try{const u=document.querySelector("home-assistant");return u&&u.hass?u.hass:window.hass?window.hass:window.parent&&window.parent!==window&&window.parent.hass?window.parent.hass:null}catch(u){return console.error("Error getting hass object:",u),null}};return A("div",{children:[A(yn.Paragraph,{type:"secondary",style:{marginBottom:24},children:"Configure global restrictions applied to all users."}),A(xs,{gutter:[16,16],style:{marginBottom:24},children:[A(Mr,{xs:24,md:12,children:A(j1,{options:t.domains||[],selectedValues:o.domains,onSelectionChange:u=>a(d=>({...d,domains:u})),placeholder:"Select domains to restrict...",disabled:r})}),A(Mr,{xs:24,md:12,children:A(j1,{options:t.entities||[],selectedValues:o.entities,onSelectionChange:u=>a(d=>({...d,entities:u})),placeholder:"Select entities to restrict...",disabled:r})})]}),A(jo,{style:{justifyContent:"flex-end",display:"flex",width:"100%",marginTop:24},children:A(vt,{type:"primary",onClick:s,disabled:r,loading:r,size:"large",children:"Save Default Restrictions"})})]})}let Jm=[],ZP=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e>1;if(t=ZP[r])e=r+1;else return!0;if(e==n)return!1}}function D1(t){return t>=127462&&t<=127487}const B1=8205;function AW(t,e,n=!0,r=!0){return(n?qP:QW)(t,e,r)}function qP(t,e,n){if(e==t.length)return e;e&&GP(t.charCodeAt(e))&&YP(t.charCodeAt(e-1))&&e--;let r=sp(t,e);for(e+=W1(r);e=0&&D1(sp(t,a));)o++,a-=2;if(o%2==0)break;e+=2}else break}return e}function QW(t,e,n){for(;e>0;){let r=qP(t,e-2,n);if(r=56320&&t<57344}function YP(t){return t>=55296&&t<56320}function W1(t){return t<65536?1:2}let Ft=class UP{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Cs(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),zi.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Cs(this,e,n);let r=[];return this.decompose(e,n,r,0),zi.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Pl(this),o=new Pl(e);for(let a=n,s=n;;){if(i.next(a),o.next(a),a=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(s+=i.value.length,i.done||s>=r)return!0}}iter(e=1){return new Pl(this,e)}iterRange(e,n=this.length){return new KP(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new JP(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?UP.empty:e.length<=32?new Rn(e):zi.from(Rn.split(e,[]))}};class Rn extends Ft{constructor(e,n=NW(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.text[o],s=i+a.length;if((n?r:s)>=e)return new zW(i,s,r,a);i=s+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new Rn(F1(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let a=r.pop(),s=Uu(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new Rn(s,a.length+o.length));else{let l=s.length>>1;r.push(new Rn(s.slice(0,l)),new Rn(s.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof Rn))return super.replace(e,n,r);[e,n]=Cs(this,e,n);let i=Uu(this.text,Uu(r.text,F1(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new Rn(i,o):zi.from(Rn.split(i,[]),o)}sliceString(e,n=this.length,r=` -`){[e,n]=Cs(this,e,n);let i="";for(let o=0,a=0;o<=n&&ae&&a&&(i+=r),eo&&(i+=s.slice(Math.max(0,e-o),n-o)),o=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new Rn(r,i)),r=[],i=-1);return i>-1&&n.push(new Rn(r,i)),n}}class zi extends Ft{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.children[o],s=i+a.length,l=r+a.lines-1;if((n?l:s)>=e)return a.lineInner(e,n,r,i);i=s+1,r=l+1}}decompose(e,n,r,i){for(let o=0,a=0;a<=n&&o=a){let c=i&((a<=e?1:0)|(l>=n?2:0));a>=e&&l<=n&&!c?r.push(s):s.decompose(e-a,n-a,r,c)}a=l+1}}replace(e,n,r){if([e,n]=Cs(this,e,n),r.lines=o&&n<=s){let l=a.replace(e-o,n-o,r),c=this.lines-a.lines+l.lines;if(l.lines>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new zi(u,this.length-(n-e)+r.length)}return super.replace(o,s,l)}o=s+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=` -`){[e,n]=Cs(this,e,n);let i="";for(let o=0,a=0;oe&&o&&(i+=r),ea&&(i+=s.sliceString(e-a,n-a,r)),a=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof zi))return 0;let r=0,[i,o,a,s]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==a||o==s)return r;let l=this.children[i],c=e.children[o];if(l!=c)return r+l.scanIdentical(c,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let p of e)p.flatten(h);return new Rn(h,n)}let i=Math.max(32,r>>5),o=i<<1,a=i>>1,s=[],l=0,c=-1,u=[];function d(h){let p;if(h.lines>o&&h instanceof zi)for(let m of h.children)d(m);else h.lines>a&&(l>a||!l)?(f(),s.push(h)):h instanceof Rn&&l&&(p=u[u.length-1])instanceof Rn&&h.lines+p.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new Rn(p.text.concat(h.text),p.length+1+h.length)):(l+h.lines>i&&f(),l+=h.lines,c+=h.length+1,u.push(h))}function f(){l!=0&&(s.push(u.length==1?u[0]:zi.from(u,c)),c=-1,l=u.length=0)}for(let h of e)d(h);return f(),s.length==1?s[0]:new zi(s,n)}}Ft.empty=new Rn([""],0);function NW(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Uu(t,e,n=0,r=1e9){for(let i=0,o=0,a=!0;o=n&&(l>r&&(s=s.slice(0,r-i)),i0?1:(e instanceof Rn?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],a=o>>1,s=i instanceof Rn?i.text.length:i.children.length;if(a==(n>0?s:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(i instanceof Rn){let l=i.text[a+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[a+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Rn?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class KP{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Pl(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class JP{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ft.prototype[Symbol.iterator]=function(){return this.iter()},Pl.prototype[Symbol.iterator]=KP.prototype[Symbol.iterator]=JP.prototype[Symbol.iterator]=function(){return this});class zW{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Cs(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Jn(t,e,n=!0,r=!0){return AW(t,e,n,r)}function LW(t){return t>=56320&&t<57344}function jW(t){return t>=55296&&t<56320}function Er(t,e){let n=t.charCodeAt(e);if(!jW(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return LW(r)?(n-55296<<10)+(r-56320)+65536:n}function M0(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Li(t){return t<65536?1:2}const eg=/\r\n?|\n/;var Kn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Kn||(Kn={}));class Xi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return o+(e-i);o+=s}else{if(r!=Kn.Simple&&c>=e&&(r==Kn.TrackDel&&ie||r==Kn.TrackBefore&&ie))return null;if(c>e||c==e&&n<0&&!s)return e==i||n<0?o:o+l;o+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r=0&&i<=n&&s>=e)return in?"cover":!0;i=s}return!1}toString(){let e="";for(let n=0;n=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Xi(e)}static create(e){return new Xi(e)}}class Dn extends Xi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return tg(this,(n,r,i,o,a)=>e=e.replace(i,i+(r-n),a),!1),e}mapDesc(e,n=!1){return ng(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i=0){n[i]=s,n[i+1]=a;let l=i>>1;for(;r.length0&&Ro(r,n,o.text),o.forward(u),s+=u}let c=e[a++];for(;s>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],a=0,s=null;function l(u=!1){if(!u&&!i.length)return;af||d<0||f>n)throw new RangeError(`Invalid change range ${d} to ${f} (in doc of length ${n})`);let p=h?typeof h=="string"?Ft.of(h.split(r||eg)):h:Ft.empty,m=p.length;if(d==f&&m==0)return;da&&lr(i,d-a,-1),lr(i,f-d,m),Ro(o,i,p),a=f}}return c(e),l(!s),s}static empty(e){return new Dn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;is&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Ro(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(i,c,o,u,d),i=c,o=u}}}function ng(t,e,n,r=!1){let i=[],o=r?[]:null,a=new Gl(t),s=new Gl(e);for(let l=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&s.ins==-1){let c=Math.min(a.len,s.len);lr(i,c,-1),a.forward(c),s.forward(c)}else if(s.ins>=0&&(a.ins<0||l==a.i||a.off==0&&(s.len=0&&l=0){let c=0,u=a.len;for(;u;)if(s.ins==-1){let d=Math.min(u,s.len);c+=d,u-=d,s.forward(d)}else if(s.ins==0&&s.lenl||a.ins>=0&&a.len>l)&&(s||r.length>c),o.forward2(l),a.forward(l)}}}}class Gl{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Ft.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Ft.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class la{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new la(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return xe.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return xe.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return xe.range(e.anchor,e.head)}static create(e,n,r){return new la(e,n,r)}}class xe{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:xe.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new xe(e.ranges.map(n=>la.fromJSON(n)),e.main)}static single(e,n=e){return new xe([xe.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;io.head?xe.range(l,s):xe.range(s,l))}}return new xe(e,n)}}function t_(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let E0=0;class He{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=E0++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new He(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:A0),!!e.static,e.enables)}of(e){return new Ku([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ku(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ku(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function A0(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Ku{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=E0++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,a=e[o]>>1,s=this.type==2,l=!1,c=!1,u=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?c=!0:((n=e[d.id])!==null&&n!==void 0?n:1)&1||u.push(e[d.id]);return{create(d){return d.values[a]=r(d),1},update(d,f){if(l&&f.docChanged||c&&(f.docChanged||f.selection)||rg(d,u)){let h=r(d);if(s?!V1(h,d.values[a],i):!i(h,d.values[a]))return d.values[a]=h,1}return 0},reconfigure:(d,f)=>{let h,p=f.config.address[o];if(p!=null){let m=Nd(f,p);if(this.dependencies.every(g=>g instanceof He?f.facet(g)===d.facet(g):g instanceof Zn?f.field(g,!1)==d.field(g,!1):!0)||(s?V1(h=r(d),m,i):i(h=r(d),m)))return d.values[a]=m,0}else h=r(d);return d.values[a]=h,1}}}}function V1(t,e,n){if(t.length!=e.length)return!1;for(let r=0;rt[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),a=t[e.id]>>1;function s(l){let c=[];for(let u=0;ur===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(du).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],a=this.updateF(o,i);return this.compareF(o,a)?0:(r.values[n]=a,1)},reconfigure:(r,i)=>{let o=r.facet(du),a=i.facet(du),s;return(s=o.find(l=>l.field==this))&&s!=a.find(l=>l.field==this)?(r.values[n]=s.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,du.of({field:this,create:e})]}get extension(){return this}}const na={lowest:4,low:3,default:2,high:1,highest:0};function nl(t){return e=>new n_(e,t)}const Xo={highest:nl(na.highest),high:nl(na.high),default:nl(na.default),low:nl(na.low),lowest:nl(na.lowest)};class n_{constructor(e,n){this.inner=e,this.prec=n}}class th{of(e){return new ig(this,e)}reconfigure(e){return th.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class ig{constructor(e,n){this.compartment=e,this.inner=n}}class Qd{constructor(e,n,r,i,o,a){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,r){let i=[],o=Object.create(null),a=new Map;for(let f of BW(e,n,a))f instanceof Zn?i.push(f):(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let s=Object.create(null),l=[],c=[];for(let f of i)s[f.id]=c.length<<1,c.push(h=>f.slot(h));let u=r==null?void 0:r.config.facets;for(let f in o){let h=o[f],p=h[0].facet,m=u&&u[f]||[];if(h.every(g=>g.type==0))if(s[p.id]=l.length<<1|1,A0(m,h))l.push(r.facet(p));else{let g=p.combine(h.map(v=>v.value));l.push(r&&p.compare(g,r.facet(p))?r.facet(p):g)}else{for(let g of h)g.type==0?(s[g.id]=l.length<<1|1,l.push(g.value)):(s[g.id]=c.length<<1,c.push(v=>g.dynamicSlot(v)));s[p.id]=c.length<<1,c.push(g=>DW(g,p,h))}}let d=c.map(f=>f(s));return new Qd(e,a,d,s,l,o)}}function BW(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(a,s){let l=i.get(a);if(l!=null){if(l<=s)return;let c=r[l].indexOf(a);c>-1&&r[l].splice(c,1),a instanceof ig&&n.delete(a.compartment)}if(i.set(a,s),Array.isArray(a))for(let c of a)o(c,s);else if(a instanceof ig){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(a.compartment)||a.inner;n.set(a.compartment,c),o(c,s)}else if(a instanceof n_)o(a.inner,a.prec);else if(a instanceof Zn)r[s].push(a),a.provides&&o(a.provides,s);else if(a instanceof Ku)r[s].push(a),a.facet.extensions&&o(a.facet.extensions,na.default);else{let c=a.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(c,s)}}return o(t,na.default),r.reduce((a,s)=>a.concat(s))}function _l(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function Nd(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const r_=He.define(),og=He.define({combine:t=>t.some(e=>e),static:!0}),i_=He.define({combine:t=>t.length?t[0]:void 0,static:!0}),o_=He.define(),a_=He.define(),s_=He.define(),l_=He.define({combine:t=>t.length?t[0]:!1});class Ji{constructor(e,n){this.type=e,this.value=n}static define(){return new WW}}class WW{of(e){return new Ji(this,e)}}class FW{constructor(e){this.map=e}of(e){return new gt(this,e)}}class gt{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new gt(this.type,n)}is(e){return this.type==e}static define(e={}){return new FW(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}gt.reconfigure=gt.define();gt.appendConfig=gt.define();class Nn{constructor(e,n,r,i,o,a){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,r&&t_(r,n.newLength),o.some(s=>s.type==Nn.time)||(this.annotations=o.concat(Nn.time.of(Date.now())))}static create(e,n,r,i,o,a){return new Nn(e,n,r,i,o,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Nn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Nn.time=Ji.define();Nn.userEvent=Ji.define();Nn.addToHistory=Ji.define();Nn.remote=Ji.define();function VW(t,e){let n=[];for(let r=0,i=0;;){let o,a;if(r=t[r]))o=t[r++],a=t[r++];else if(i=0;i--){let o=r[i](t);o instanceof Nn?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Nn?t=o[0]:t=u_(e,as(o),!1)}return t}function XW(t){let e=t.startState,n=e.facet(s_),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=c_(r,ag(e,o,t.changes.newLength),!0))}return r==t?t:Nn.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const ZW=[];function as(t){return t==null?ZW:Array.isArray(t)?t:[t]}var Sn=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Sn||(Sn={}));const qW=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let sg;try{sg=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function GW(t){if(sg)return sg.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||qW.test(n)))return!0}return!1}function YW(t){return e=>{if(!/\S/.test(e))return Sn.Space;if(GW(e))return Sn.Word;for(let n=0;n-1)return Sn.Word;return Sn.Other}}class Qt{constructor(e,n,r,i,o,a){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(let s=0;si.set(c,l)),n=null),i.set(s.value.compartment,s.value.extension)):s.is(gt.reconfigure)?(n=null,r=s.value):s.is(gt.appendConfig)&&(n=null,r=as(r).concat(s.value));let o;n?o=e.startState.values.slice():(n=Qd.resolve(r,i,this),o=new Qt(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let a=e.startState.facet(og)?e.newSelection:e.newSelection.asSingle();new Qt(n,e.newDoc,a,o,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:xe.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],a=as(r.effects);for(let s=1;sa.spec.fromJSON(s,l)))}}return Qt.create({doc:e.doc,selection:xe.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Qd.resolve(e.extensions||[],new Map),r=e.doc instanceof Ft?e.doc:Ft.of((e.doc||"").split(n.staticFacet(Qt.lineSeparator)||eg)),i=e.selection?e.selection instanceof xe?e.selection:xe.single(e.selection.anchor,e.selection.head):xe.single(0);return t_(i,r.length),n.staticFacet(og)||(i=i.asSingle()),new Qt(n,r,i,n.dynamicSlots.map(()=>null),(o,a)=>a.create(o),null)}get tabSize(){return this.facet(Qt.tabSize)}get lineBreak(){return this.facet(Qt.lineSeparator)||` -`}get readOnly(){return this.facet(l_)}phrase(e,...n){for(let r of this.facet(Qt.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(r_))for(let a of o(this,n,r))Object.prototype.hasOwnProperty.call(a,e)&&i.push(a[e]);return i}charCategorizer(e){return YW(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),a=e-r,s=e-r;for(;a>0;){let l=Jn(n,a,!1);if(o(n.slice(l,a))!=Sn.Word)break;a=l}for(;st.length?t[0]:4});Qt.lineSeparator=i_;Qt.readOnly=l_;Qt.phrases=He.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});Qt.languageData=r_;Qt.changeFilter=o_;Qt.transactionFilter=a_;Qt.transactionExtender=s_;th.reconfigure=gt.define();function eo(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let a=i[o],s=r[o];if(s===void 0)r[o]=a;else if(!(s===a||a===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](s,a);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class xa{eq(e){return this==e}range(e,n=e){return lg.create(e,n,this)}}xa.prototype.startSide=xa.prototype.endSide=0;xa.prototype.point=!1;xa.prototype.mapMode=Kn.TrackDel;let lg=class d_{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new d_(e,n,r)}};function cg(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Q0{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let a=i,s=o.length;;){if(a==s)return a;let l=a+s>>1,c=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==a)return c>=0?a:s;c>=0?s=l:a=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),a=this.findIndex(r,1e9,!1,o);oh||f==h&&c.startSide>0&&c.endSide<=0)continue;(h-f||c.endSide-c.startSide)<0||(a<0&&(a=f),c.point&&(s=Math.max(s,h-f)),r.push(c),i.push(f-a),o.push(h-a))}return{mapped:r.length?new Q0(i,o,r,s):null,pos:a}}}class jt{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new jt(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(r&&(n=n.slice().sort(cg)),this.isEmpty)return n.length?jt.of(n):this;let s=new f_(this,null,-1).goto(0),l=0,c=[],u=new fo;for(;s.value||l=0){let d=n[l++];u.addInner(d.from,d.to,d.value)||c.push(d)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||os.to||o=o&&e<=o+a.length&&a.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Yl.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Yl.from(e).goto(n)}static compare(e,n,r,i,o=-1){let a=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),s=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),l=H1(a,s,r),c=new rl(a,l,o),u=new rl(s,l,o);r.iterGaps((d,f,h)=>X1(c,d,u,f,h,i)),r.empty&&r.length==0&&X1(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let o=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),a=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(o.length!=a.length)return!1;if(!o.length)return!0;let s=H1(o,a),l=new rl(o,s,0).goto(r),c=new rl(a,s,0).goto(r);for(;;){if(l.to!=c.to||!ug(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,n,r,i,o=-1){let a=new rl(e,null,o).goto(n),s=n,l=a.openStart;for(;;){let c=Math.min(a.to,r);if(a.point){let u=a.activeForPoint(a.to),d=a.pointFroms&&(i.span(s,c,a.active,l),l=a.openEnd(c));if(a.to>r)return l+(a.point&&a.to>r?1:0);s=a.to,a.next()}}static of(e,n=!1){let r=new fo;for(let i of e instanceof lg?[e]:n?UW(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return jt.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=jt.empty;i=i.nextLayer)n=new jt(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}jt.empty=new jt([],[],null,-1);function UW(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(cg);e=r}return t}jt.empty.nextLayer=jt.empty;class fo{finishChunk(e){this.chunks.push(new Q0(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new fo)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(jt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=jt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function H1(t,e,n){let r=new Map;for(let o of t)for(let a=0;a=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new f_(a,n,r,o));return i.length==1?i[0]:new Yl(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)lp(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)lp(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),lp(this.heap,0)}}}function lp(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class rl{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Yl.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){fu(this.active,e),fu(this.activeTo,e),fu(this.activeRank,e),this.minActive=Z1(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n0;)n++;hu(this.active,n,r),hu(this.activeTo,n,i),hu(this.activeRank,n,o),e&&hu(e,n,this.cursor.from),this.minActive=Z1(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&fu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function X1(t,e,n,r,i,o){t.goto(e),n.goto(r);let a=r+i,s=r,l=r-e;for(;;){let c=t.to+l-n.to,u=c||t.endSide-n.endSide,d=u<0?t.to+l:n.to,f=Math.min(d,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&ug(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(s,f,t.point,n.point):f>s&&!ug(t.active,n.active)&&o.compareRange(s,f,t.active,n.active),d>a)break;(c||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(d),s=d,u<=0&&t.next(),u>=0&&n.next()}}function ug(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;r--)t[r+1]=t[r];t[e]=n}function Z1(t,e){let n=-1,r=1e9;for(let i=0;i=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=Jn(t,i)}return r===!0?-1:t.length}const fg="ͼ",q1=typeof Symbol>"u"?"__"+fg:Symbol.for(fg),hg=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),G1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Do{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,s,l,c){let u=[],d=/^@(\w+)\b/.exec(a[0]),f=d&&d[1]=="keyframes";if(d&&s==null)return l.push(a[0]+";");for(let h in s){let p=s[h];if(/&/.test(h))o(h.split(/,\s*/).map(m=>a.map(g=>m.replace(/&/,g))).reduce((m,g)=>m.concat(g)),p,l);else if(p&&typeof p=="object"){if(!d)throw new RangeError("The value of a property ("+h+") should be a primitive value.");o(i(h),p,u,f)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+p+";")}(u.length||f)&&l.push((r&&!d&&!c?a.map(r):a).join(", ")+" {"+u.join(" ")+"}")}for(let a in e)o(i(a),e[a],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=G1[q1]||1;return G1[q1]=e+1,fg+e.toString(36)}static mount(e,n,r){let i=e[hg],o=r&&r.nonce;i?o&&i.setNonce(o):i=new KW(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let Y1=new Map;class KW{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=Y1.get(r);if(o)return e[hg]=o;this.sheet=new i.CSSStyleSheet,Y1.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[hg]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let a=0;a-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,s),r)for(let c=0;c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},JW=typeof navigator<"u"&&/Mac/.test(navigator.platform),eF=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Un=0;Un<10;Un++)Bo[48+Un]=Bo[96+Un]=String(Un);for(var Un=1;Un<=24;Un++)Bo[Un+111]="F"+Un;for(var Un=65;Un<=90;Un++)Bo[Un]=String.fromCharCode(Un+32),Ul[Un]=String.fromCharCode(Un);for(var cp in Bo)Ul.hasOwnProperty(cp)||(Ul[cp]=Bo[cp]);function tF(t){var e=JW&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||eF&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ul:Bo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function rn(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function rF(t,e,n,r,i,o,a,s){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,d=!1;u&&!d;)if(u.nodeType==1){let f,h=u==l.body,p=1,m=1;if(h)f=nF(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let O=u.getBoundingClientRect();({scaleX:p,scaleY:m}=p_(u,O)),f={left:O.left,right:O.left+u.clientWidth*p,top:O.top,bottom:O.top+u.clientHeight*m}}let g=0,v=0;if(i=="nearest")e.top0&&e.bottom>f.bottom+v&&(v=e.bottom-f.bottom+a)):e.bottom>f.bottom&&(v=e.bottom-f.bottom+a,n<0&&e.top-v0&&e.right>f.right+g&&(g=e.right-f.right+o)):e.right>f.right&&(g=e.right-f.right+o,n<0&&e.leftf.bottom||e.leftf.right)&&(e={left:Math.max(e.left,f.left),right:Math.min(e.right,f.right),top:Math.max(e.top,f.top),bottom:Math.min(e.bottom,f.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function iF(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class oF{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Yi(n):0),r,Math.min(e.focusOffset,r?Yi(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Va=null;function m_(t){if(t.setActive)return t.setActive();if(Va)return t.focus(Va);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Va==null?{get preventScroll(){return Va={preventScroll:!0},!0}}:void 0),!Va){Va=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function O_(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Yi(n)}else if(n.parentNode&&!zd(n))r=Ca(n),n=n.parentNode;else return null}}function b_(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&rn)return d.domBoundsAround(e,n,c);if(f>=e&&i==-1&&(i=l,o=c),c>n&&d.dom.parentNode==this.dom){a=l,s=u;break}u=f,c=f+d.breakAfter}return{from:o,to:s<0?r+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=N0){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function S_(t,e,n,r,i,o,a,s,l){let{children:c}=t,u=c.length?c[e]:null,d=o.length?o[o.length-1]:null,f=d?d.breakAfter:a;if(!(e==r&&u&&!a&&!f&&o.length<2&&u.merge(n,i,o.length?d:null,n==0,s,l))){if(r0&&(!a&&o.length&&u.merge(n,u.length,o[0],!1,s,0)?u.breakAfter=o.shift().breakAfter:(n2);var Ve={mac:tS||/Mac/.test(Ar.platform),windows:/Win/.test(Ar.platform),linux:/Linux|X11/.test(Ar.platform),ie:nh,ie_version:C_?mg.documentMode||6:vg?+vg[1]:gg?+gg[1]:0,gecko:eS,gecko_version:eS?+(/Firefox\/(\d+)/.exec(Ar.userAgent)||[0,0])[1]:0,chrome:!!up,chrome_version:up?+up[1]:0,ios:tS,android:/Android\b/.test(Ar.userAgent),safari:$_,webkit_version:lF?+(/\bAppleWebKit\/(\d+)/.exec(Ar.userAgent)||[0,0])[1]:0,tabSize:mg.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const cF=256;class Pi extends ln{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof Pi)||this.length-(n-e)+r.length>cF||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Pi(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new cr(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return uF(this.dom,e,n)}}class ho extends ln{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(g_(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,a){return r&&(!(r instanceof ho&&r.mark.eq(this.mark))||e&&o<=0||ne&&n.push(r=e&&(i=o),r=l,o++}let a=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ho(this.mark,n,a)}domAtPos(e){return w_(this,e)}coordsAt(e,n){return __(this,e,n)}}function uF(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,a=0;e==0&&n<0||e==r&&n>=0?Ve.chrome||Ve.gecko||(e?(i--,a=1):o=0)?0:s.length-1];return Ve.safari&&!a&&l.width==0&&(l=Array.prototype.find.call(s,c=>c.width)||l),a?Rc(l,a<0):l||null}class Io extends ln{static create(e,n,r){return new Io(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Io.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,o,a){return r&&(!(r instanceof Io)||!this.widget.compare(r.widget)||e>0&&o<=0||n0)?cr.before(this.dom):cr.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let a=this.side?this.side<0:e>0;for(let s=a?i.length-1:0;o=i[s],!(e>0?s==0:s==i.length-1||o.top0?cr.before(this.dom):cr.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ft.empty}get isHidden(){return!0}}Pi.prototype.children=Io.prototype.children=ws.prototype.children=N0;function w_(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;io&&e0;o--){let a=r[o-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let o=i;o0&&e instanceof ho&&i.length&&(r=i[i.length-1])instanceof ho&&r.mark.eq(e.mark)?P_(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function __(t,e,n){let r=null,i=-1,o=null,a=-1;function s(c,u){for(let d=0,f=0;d=u&&(h.children.length?s(h,u-f):(!o||o.isHidden&&(n>0||fF(o,h)))&&(p>u||f==p&&h.getSide()>0)?(o=h,a=u-f):(f-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function bg(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function hF(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new Wo(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:a}=T_(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(a?n?2e8:1:-6e8)+1}return new Wo(e,r,i,n,e.widget||null,!0)}static line(e){return new Mc(e)}static set(e,n=!1){return jt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}at.none=jt.empty;class Ic extends at{constructor(e){let{start:n,end:r}=T_(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof Ic&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Ld(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Ic.prototype.point=!1;class Mc extends at{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Mc&&this.spec.class==e.spec.class&&Ld(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Mc.prototype.mapMode=Kn.TrackBefore;Mc.prototype.point=!0;class Wo extends at{constructor(e,n,r,i,o,a){super(n,r,o,e),this.block=i,this.isReplace=a,this.mapMode=i?n<=0?Kn.TrackBefore:Kn.TrackAfter:Kn.TrackDel}get type(){return this.startSide!=this.endSide?Sr.WidgetRange:this.startSide<=0?Sr.WidgetBefore:Sr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Wo&&pF(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Wo.prototype.point=!0;function T_(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function pF(t,e){return t==e||!!(t&&e&&t.compare(e))}function ed(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class An extends ln{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,a){if(r){if(!(r instanceof An))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),x_(this,e,n,r?r.children.slice():[],o,a),!0}split(e){let n=new An;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Ld(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){P_(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=Og(n,this.attrs||{})),r&&(this.attrs=Og({class:r},this.attrs||{}))}domAtPos(e){return w_(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(g_(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(bg(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&ln.get(i)instanceof ho;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=ln.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Ve.ios||!this.children.some(o=>o instanceof Pi))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof Pi)||/[^ -~]/.test(r.text))return null;let i=$s(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=__(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight=n){if(o instanceof An)return o;if(a>n)break}i=a+o.breakAfter}return null}}class lo extends ln{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,a){return r&&(!(r instanceof lo)||!this.widget.compare(r.widget)||e>0&&o<=0||n0}}class yg extends to{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class kl{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof lo&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new An),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(pu(new ws(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof lo)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:a,lineBreak:s,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=a,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e),o=Math.min(i,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(pu(new Pi(this.text.slice(this.textOff,this.textOff+o)),n),r),this.atCursorPos=!0,this.textOff+=o,e-=o,r=i<=o?0:n.length}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,a){if(this.disallowBlockEffectsFor[a]&&r instanceof Wo){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=n-e;if(r instanceof Wo)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new lo(r.widget||Ps.block,s,r));else{let l=Io.create(r.widget||Ps.inline,s,s?0:r.startSide),c=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e0),u=!l.isEditable&&(ei.length||r.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),c&&(d.append(pu(new ws(1),i),o),o=i.length+Math.max(0,o-i.length)),d.append(pu(l,i),o),this.atCursorPos=u,this.pendingBuffer=u?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let a=new kl(e,n,r,o);return a.openEnd=jt.spans(i,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function pu(t,e){for(let n of e)t=new ho(n,[t],t.length);return t}class Ps extends to{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ps.inline=new Ps("span");Ps.block=new Ps("div");var mn=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(mn||(mn={}));const wa=mn.LTR,z0=mn.RTL;function k_(t){let e=[];for(let n=0;n=n){if(s.level==r)return a;(o<0||(i!=0?i<0?s.fromn:e[o].level>s.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}}function I_(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;m-=3)if(Mi[m+1]==-h){let g=Mi[m+2],v=g&2?i:g&4?g&1?o:i:0;v&&(an[d]=an[Mi[m]]=v),s=m;break}}else{if(Mi.length==189)break;Mi[s++]=d,Mi[s++]=f,Mi[s++]=l}else if((p=an[d])==2||p==1){let m=p==i;l=m?0:1;for(let g=s-3;g>=0;g-=3){let v=Mi[g+2];if(v&2)break;if(m)Mi[g+2]|=2;else{if(v&4)break;Mi[g+2]|=4}}}}}function yF(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let a=i?n[i-1].to:t,s=il;)p==g&&(p=n[--m].from,g=m?n[m-1].to:t),an[--p]=h;l=u}else o=c,l++}}}function xg(t,e,n,r,i,o,a){let s=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;ll&&a.push(new Mo(l,m.from,h));let g=m.direction==wa!=!(h%2);Cg(t,g?r+1:r,i,m.inner,m.from,m.to,a),l=m.to}p=m.to}else{if(p==n||(u?an[p]!=s:an[p]==s))break;p++}f?xg(t,l,p,r+1,i,f,a):le;){let u=!0,d=!1;if(!c||l>o[c-1].to){let m=an[l-1];m!=s&&(u=!1,d=m==16)}let f=!u&&s==1?[]:null,h=u?r:r+1,p=l;e:for(;;)if(c&&p==o[c-1].to){if(d)break e;let m=o[--c];if(!u)for(let g=m.from,v=c;;){if(g==e)break e;if(v&&o[v-1].to==g)g=o[--v].from;else{if(an[g-1]==s)break e;break}}if(f)f.push(m);else{m.toan.length;)an[an.length]=256;let r=[],i=e==wa?0:1;return Cg(t,i,i,n,0,t.length,r),r}function M_(t){return[new Mo(0,t,0)]}let E_="";function xF(t,e,n,r,i){var o;let a=r.head-t.from,s=Mo.find(e,a,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),l=e[s],c=l.side(i,n);if(a==c){let f=s+=i?1:-1;if(f<0||f>=e.length)return null;l=e[s=f],a=l.side(!i,n),c=l.side(i,n)}let u=Jn(t.text,a,l.forward(i,n));(ul.to)&&(u=c),E_=t.text.slice(Math.min(a,u),Math.max(a,u));let d=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return d&&u==c&&d.level+(i?0:1)t.some(e=>e)}),B_=He.define({combine:t=>t.some(e=>e)}),W_=He.define();class ls{constructor(e,n="nearest",r="nearest",i=5,o=5,a=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=a}map(e){return e.empty?this:new ls(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new ls(xe.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const mu=gt.define({map:(t,e)=>t.map(e)}),F_=gt.define();function Nr(t,e,n){let r=t.facet(z_);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const oo=He.define({combine:t=>t.length?t[0]:!0});let $F=0;const Ja=He.define({combine(t){return t.filter((e,n)=>{for(let r=0;r{let l=[];return a&&l.push(Jl.of(c=>{let u=c.plugin(s);return u?a(u):at.none})),o&&l.push(o(s)),l})}static fromClass(e,n){return In.define((r,i)=>new e(r,i),n)}}class dp{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Nr(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){Nr(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Nr(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const V_=He.define(),D0=He.define(),Jl=He.define(),H_=He.define(),Ec=He.define(),X_=He.define();function rS(t,e){let n=t.state.facet(X_);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return jt.spans(r,e.from,e.to,{point(){},span(o,a,s,l){let c=o-e.from,u=a-e.from,d=i;for(let f=s.length-1;f>=0;f--,l--){let h=s[f].spec.bidiIsolate,p;if(h==null&&(h=CF(e.text,c,u)),l>0&&d.length&&(p=d[d.length-1]).to==c&&p.direction==h)p.to=u,d=p.inner;else{let m={from:c,to:u,direction:h,inner:[]};d.push(m),d=m.inner}}}}),i}const Z_=He.define();function B0(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(Z_)){let a=o(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(r=Math.max(r,a.top)),a.bottom!=null&&(i=Math.max(i,a.bottom)))}return{left:e,right:n,top:r,bottom:i}}const hl=He.define();class ui{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new ui(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toAu)break;o+=2}if(!l)return r;new ui(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),a=l.toA,s=l.toB}}}class jd{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Dn.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,a,s,l)=>i.push(new ui(o,a,s,l))),this.changedRanges=i}static create(e,n,r){return new jd(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class iS extends ln{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=at.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new An],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ui(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:c,toA:u})=>uthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!IF(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?PF(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;r=new ui(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Ve.ie||Ve.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.updateDeco(),l=kF(a,s,e.changes);return r=ui.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=Ve.chrome||Ve.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||i.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?i[a]:null;if(!s)break;let{fromA:l,toA:c,fromB:u,toB:d}=s,f,h,p,m;if(r&&r.range.fromBu){let x=kl.build(this.view.state.doc,u,r.range.fromB,this.decorations,this.dynamicDecorationMap),b=kl.build(this.view.state.doc,r.range.toB,d,this.decorations,this.dynamicDecorationMap);h=x.breakAtStart,p=x.openStart,m=b.openEnd;let C=this.compositionView(r);b.breakAtStart?C.breakAfter=1:b.content.length&&C.merge(C.length,C.length,b.content[0],!1,b.openStart,0)&&(C.breakAfter=b.content[0].breakAfter,b.content.shift()),x.content.length&&C.merge(0,0,x.content[x.content.length-1],!0,0,x.openEnd)&&x.content.pop(),f=x.content.concat(C).concat(b.content)}else({content:f,breakAtStart:h,openStart:p,openEnd:m}=kl.build(this.view.state.doc,u,d,this.decorations,this.dynamicDecorationMap));let{i:g,off:v}=o.findPos(c,1),{i:O,off:S}=o.findPos(l,-1);S_(this,O,S,g,v,f,h,p,m)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(F_)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new Pi(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new ho(i,[n],n.length);let r=new An;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,a)=>{a.flags|=8|(a.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(a);let s=ln.get(o);s&&s!=a&&(s.dom=null),a.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&!(this.view.state.facet(oo)||this.dom.tabIndex>-1)&&Ju(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),c=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(Ve.gecko&&s.empty&&!this.hasComposition&&wF(l)){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=c=new cr(d,0),a=!0}let u=this.view.observer.selectionRange;(a||!u.focusNode||(!Tl(l.node,l.offset,u.anchorNode,u.anchorOffset)||!Tl(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{Ve.android&&Ve.chrome&&this.dom.contains(u.focusNode)&&RF(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=Kl(this.view.root);if(d)if(s.empty){if(Ve.gecko){let f=_F(l.node,l.offset);if(f&&f!=3){let h=(f==1?O_:b_)(l.node,l.offset);h&&(l=new cr(h.node,h.offset))}}d.collapse(l.node,l.offset),s.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=s.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(c.node,c.offset)}catch{}}else{let f=document.createRange();s.anchor>s.head&&([l,c]=[c,l]),f.setEnd(c.node,c.offset),f.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(f)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new cr(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new cr(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Tl(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Kl(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let a=An.find(this,n.head);if(!a)return;let s=a.posAtStart;if(n.head==s||n.head==s+a.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i=0;i--){let o=ln.get(n.childNodes[i]);o instanceof An&&(r=o.domAtPos(o.length))}return r?new cr(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=ln.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n=0;a--){let s=this.children[a],l=o-s.breakAfter,c=l-s.length;if(le||s.covers(1))&&(!r||s instanceof An&&!(r instanceof An&&n>=0)))r=s,i=c;else if(r&&c==e&&l==e&&s instanceof lo&&Math.abs(n)<2){if(s.deco.startSide<0)break;a&&(r=null)}o=c}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof An))return null;for(;i.children.length;){let{i:s,off:l}=i.childPos(r,1);for(;;s++){if(s==i.children.length)return null;if((i=i.children[s]).length)break}r=l}if(!(i instanceof Pi))return null;let o=Jn(i.text,r);if(o==r)return null;let a=$a(i.dom,r,o).getClientRects();for(let s=0;sMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==mn.LTR;for(let c=0,u=0;ui)break;if(c>=r){let h=d.dom.getBoundingClientRect();if(n.push(h.height),a){let p=d.dom.lastChild,m=p?$s(p):[];if(m.length){let g=m[m.length-1],v=l?g.right-h.left:h.right-g.left;v>s&&(s=v,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=f)}}}c=f+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?mn.RTL:mn.LTR}measureTextSize(){for(let o of this.children)if(o instanceof An){let a=o.measureTextSize();if(a)return a}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=$s(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new y_(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],a=o?o.from-1:this.length;if(a>r){let s=(n.lineBlockAt(a).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(at.replace({widget:new yg(s),block:!0,inclusive:!0,isBlockGap:!0}).range(r,a))}if(!o)break;r=o.to+1}return at.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Jl).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet(H_).map((o,a)=>{let s=typeof o=="function";return s&&(r=!0),s?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(jt.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=B0(this.view),a={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:s,offsetHeight:l}=this.view.scrollDOM;rF(this.view.scrollDOM,a,n.head{re.from&&(n=!0)}),n}function MF(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return xe.cursor(e);o==0?n=1:o==i.length&&(n=-1);let a=o,s=o;n<0?a=Jn(i.text,o,!1):s=Jn(i.text,o);let l=r(i.text.slice(a,s));for(;a>0;){let c=Jn(i.text,a,!1);if(r(i.text.slice(c,a))!=l)break;a=c}for(;st?e.left-t:Math.max(0,t-e.right)}function AF(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function fp(t,e){return t.tope.top+1}function oS(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function wg(t,e,n){let r,i,o,a,s=!1,l,c,u,d;for(let p=t.firstChild;p;p=p.nextSibling){let m=$s(p);for(let g=0;gS||a==S&&o>O)&&(r=p,i=v,o=O,a=S,s=O?e0:gv.bottom&&(!u||u.bottomv.top)&&(c=p,d=v):u&&fp(u,v)?u=aS(u,v.bottom):d&&fp(d,v)&&(d=oS(d,v.top))}}if(u&&u.bottom>=n?(r=l,i=u):d&&d.top<=n&&(r=c,i=d),!r)return{node:t,offset:0};let f=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return sS(r,f,n);if(s&&r.contentEditable!="false")return wg(r,f,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:h}}function sS(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,a=0;for(let s=0;sn?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&d=(u.left+u.right)/2,h=f;if((Ve.chrome||Ve.gecko)&&$a(t,s).getBoundingClientRect().left==u.right&&(h=!f),d<=0)return{node:t,offset:s+(h?1:0)};i=s+(h?1:0),o=d}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function G_(t,e,n,r=-1){var i,o;let a=t.contentDOM.getBoundingClientRect(),s=a.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:d}=e,f=d-s;if(f<0)return 0;if(f>c)return t.state.doc.length;for(let x=t.viewState.heightOracle.textHeight/2,b=!1;l=t.elementAtHeight(f),l.type!=Sr.Text;)for(;f=r>0?l.bottom+x:l.top-x,!(f>=0&&f<=c);){if(b)return n?null:0;b=!0,r=-r}d=s+f;let h=l.from;if(ht.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:lS(t,a,l,u,d);let p=t.dom.ownerDocument,m=t.root.elementFromPoint?t.root:p,g=m.elementFromPoint(u,d);g&&!t.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,d),g&&!t.contentDOM.contains(g)&&(g=null));let v,O=-1;if(g&&((i=t.docView.nearest(g))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let x=p.caretPositionFromPoint(u,d);x&&({offsetNode:v,offset:O}=x)}else if(p.caretRangeFromPoint){let x=p.caretRangeFromPoint(u,d);x&&({startContainer:v,startOffset:O}=x)}v&&(!t.contentDOM.contains(v)||Ve.safari&&QF(v,O,u)||Ve.chrome&&NF(v,O,u))&&(v=void 0),v&&(O=Math.min(Yi(v),O))}if(!v||!t.docView.dom.contains(v)){let x=An.find(t.docView,h);if(!x)return f>l.top+l.height/2?l.to:l.from;({node:v,offset:O}=wg(x.dom,u,d))}let S=t.docView.nearest(v);if(!S)return null;if(S.isWidget&&((o=S.dom)===null||o===void 0?void 0:o.nodeType)==1){let x=S.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let s=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-s)*.5)/s);o+=l*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+dg(a,o,t.state.tabSize)}function Y_(t,e,n){let r,i=t;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(;;){let o=i.nextSibling;if(o){if(o.nodeName=="BR")break;return!1}else{let a=i.parentNode;if(!a||a.nodeName=="DIV")break;i=a}}return $a(t,r-1,r).getBoundingClientRect().right>n}function QF(t,e,n){return Y_(t,e,n)}function NF(t,e,n){if(e!=0)return Y_(t,e,n);for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():$a(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function Pg(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let o of r.type){if(o.from>e)break;if(!(o.toe)return o;(!i||o.type==Sr.Text&&(i.type!=o.type||(n<0?o.frome)))&&(i=o)}}return i||r}return r}function zF(t,e,n,r){let i=Pg(t,e.head,e.assoc||-1),o=!r||i.type!=Sr.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let a=t.dom.getBoundingClientRect(),s=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(s==mn.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(l!=null)return xe.cursor(l,n?-1:1)}return xe.cursor(n?i.to:i.from,n?-1:1)}function cS(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),a=t.textDirectionAt(i.from);for(let s=e,l=null;;){let c=xF(i,o,a,s,n),u=E_;if(!c){if(i.number==(n?t.state.doc.lines:1))return s;u=` -`,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),c=t.visualLineSide(i,!n)}if(l){if(!l(u))return s}else{if(!r)return c;l=r(u)}s=c}}function LF(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let a=r(o);return i==Sn.Space&&(i=a),i==a}}function jF(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return xe.cursor(i,e.assoc);let a=e.goalColumn,s,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,e.assoc||-1),u=t.documentTop;if(c)a==null&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let h=t.viewState.lineBlockAt(i);a==null&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-h.from))),s=(o<0?h.top:h.bottom)+u}let d=l.left+a,f=r??t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let p=s+(f+h)*o,m=G_(t,{x:d,y:p},!1,o);if(pl.bottom||(o<0?mi)){let g=t.docView.coordsForChar(m),v=!g||p{if(e>o&&ei(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:xe.cursor(r,ro)&&this.lineBreak(),i=a}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,a=1,s;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),a=this.lineSeparator.length):(s=i.exec(n))&&(o=s.index,a=s[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);r=o+a}}readNode(e){if(e.cmIgnore)return;let n=ln.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(BF(e,r.node,r.offset)?n:0))}}function BF(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:o,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let s=o||a?[]:HF(e),l=new DF(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=XF(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=o&&o.node==s.focusNode&&o.offset==s.focusOffset||!pg(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),c=a&&a.node==s.anchorNode&&a.offset==s.anchorOffset||!pg(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset),u=e.viewport;if((Ve.ios||Ve.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:s}=e.bounds,l=i.from,c=null;(o===8||Ve.android&&e.text.length=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:Ve.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==` - `&&t.lineWrapping&&(r&&(r=xe.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ft.of([" "])}),n)return W0(t,n,r,o);if(r&&!r.main.eq(i)){let a=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),s=t.inputState.lastSelectionOrigin,s=="select.pointer"&&(r=U_(t.state.facet(Ec).map(l=>l(t)),r))),t.dispatch({selection:r,scrollIntoView:a,userEvent:s}),!0}else return!1}function W0(t,e,n,r=-1){if(Ve.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(Ve.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ss(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&ss(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&ss(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,s=()=>a||(a=FF(t,e,n));return t.state.facet(L_).some(l=>l(t,e.from,e.to,o,s))||t.dispatch(s()),!0}function FF(t,e,n){let r,i=t.state,o=i.selection.main,a=-1;if(e.from==e.to&&e.fromo.to){let l=e.fromd(t)),c,l);e.from==u&&(a=u)}if(a>-1)r={changes:e,selection:xe.cursor(e.from+e.insert.length,-1)};else if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=o.frome.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let l=i.changes(e),c=n&&n.main.to<=l.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),d,f=n&&q_(t,n.main.head);if(f){let m=e.insert.length-(e.to-e.from);d={from:f.from,to:f.to-m}}else d=t.state.doc.lineAt(o.head);let h=o.to-e.to,p=o.to-o.from;r=i.changeByRange(m=>{if(m.from==o.from&&m.to==o.to)return{changes:l,range:c||m.map(l)};let g=m.to-h,v=g-u.length;if(m.to-m.from!=p||t.state.sliceDoc(v,g)!=u||m.to>=d.from&&m.from<=d.to)return{range:m};let O=i.changes({from:v,to:g,insert:e.insert}),S=m.to-o.to;return{changes:O,range:c?xe.range(Math.max(0,c.anchor+S),Math.max(0,c.head+S)):m.map(O)}})}else r={changes:l,selection:c&&i.selection.replaceRange(c)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function VF(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if(r=="end"){let l=Math.max(0,o-Math.min(a,s));n-=a+l-o}if(a=a?o-n:0;o-=l,s=o+(s-a),a=o}else if(s=s?o-n:0;o-=l,a=o+(a-s),s=o}return{from:o,toA:a,toB:s}}function HF(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new uS(n,r)),(i!=n||o!=r)&&e.push(new uS(i,o))),e}function XF(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?xe.single(n+e,r+e):null}class ZF{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Ve.safari&&e.contentDOM.addEventListener("input",()=>null),Ve.gecko&&cV(e.contentDOM.ownerDocument)}handleEvent(e){!tV(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=qF(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let a=!n[o].handlers.length,s=r[o];s&&a!=!s.handlers.length&&(i.removeEventListener(o,this.handleEvent),s=null),s||i.addEventListener(o,this.handleEvent,{passive:a})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&eT.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Ve.android&&Ve.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return Ve.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=J_.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||GF.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:Ve.safari&&!Ve.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function dS(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Nr(n.state,i)}}}function qF(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,o=i&&i.plugin.domEventHandlers,a=i&&i.plugin.domEventObservers;if(o)for(let s in o){let l=o[s];l&&n(s).handlers.push(dS(r.value,l))}if(a)for(let s in a){let l=a[s];l&&n(s).observers.push(dS(r.value,l))}}for(let r in _i)n(r).handlers.push(_i[r]);for(let r in fi)n(r).observers.push(fi[r]);return e}const J_=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],GF="dthko",eT=[16,17,18,20,91,92,224,225],gu=6;function vu(t){return Math.max(0,t)*.7+8}function YF(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class UF{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=iF(e.contentDOM),this.atoms=e.state.facet(Ec).map(a=>a(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Qt.allowMultipleSelections)&&KF(e,n),this.dragging=eV(e,n)&&rT(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&YF(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=B0(this.view);e.clientX-l.left<=i+gu?n=-vu(i-e.clientX):e.clientX+l.right>=a-gu&&(n=vu(e.clientX-a)),e.clientY-l.top<=o+gu?r=-vu(o-e.clientY):e.clientY+l.bottom>=s-gu&&(r=vu(e.clientY-s)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=U_(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function KF(t,e){let n=t.state.facet(A_);return n.length?n[0](e):Ve.mac?e.metaKey:e.ctrlKey}function JF(t,e){let n=t.state.facet(Q_);return n.length?n[0](e):Ve.mac?!e.altKey:!e.ctrlKey}function eV(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Kl(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function tV(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=ln.get(n))&&r.ignoreEvent(e))return!1;return!0}const _i=Object.create(null),fi=Object.create(null),tT=Ve.ie&&Ve.ie_version<15||Ve.ios&&Ve.webkit_version<604;function nV(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),nT(t,n.value)},50)}function rh(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function nT(t,e){e=rh(t.state,L0,e);let{state:n}=t,r,i=1,o=n.toText(e),a=o.lines==n.selection.ranges.length;if(_g!=null&&n.selection.ranges.every(l=>l.empty)&&_g==o.toString()){let l=-1;r=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let d=n.toText((a?o.line(i++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:d},range:xe.cursor(c.from+d.length)}})}else a?r=n.changeByRange(l=>{let c=o.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:xe.cursor(l.from+c.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}fi.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};_i.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);fi.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};fi.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};_i.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(N_))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=oV(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new UF(t,e,n,r)),r&&t.observer.ignore(()=>{m_(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function fS(t,e,n,r){if(r==1)return xe.cursor(e,n);if(r==2)return MF(t.state,e,n);{let i=An.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),a=i?i.posAtStart:o.from,s=i?i.posAtEnd:o.to;return se>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function rV(t,e,n,r){let i=An.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let a=i.coordsAt(o,-1);if(a&&hS(n,r,a))return-1;let s=i.coordsAt(o,1);return s&&hS(n,r,s)?1:a&&a.bottom>=r?-1:1}function pS(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:rV(t,n,e.clientX,e.clientY)}}const iV=Ve.ie&&Ve.ie_version<=11;let mS=null,gS=0,vS=0;function rT(t){if(!iV)return t.detail;let e=mS,n=vS;return mS=t,vS=Date.now(),gS=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(gS+1)%3:1}function oV(t,e){let n=pS(t,e),r=rT(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,a,s){let l=pS(t,o),c,u=fS(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!a){let d=fS(t,n.pos,n.bias,r),f=Math.min(d.from,u.from),h=Math.max(d.to,u.to);u=f1&&(c=aV(i,l.pos))?c:s?i.addRange(u):xe.create([u])}}}function aV(t,e){for(let n=0;n=e)return xe.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}_i.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,a=o+i.length;(o>=n.to||a<=n.from)&&(n=xe.range(o,a))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",rh(t.state,j0,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};_i.dragend=t=>(t.inputState.draggedContent=null,!1);function OS(t,e,n,r){if(n=rh(t.state,L0,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,a=r&&o&&JF(t,e)?{from:o.from,to:o.to}:null,s={from:i,insert:n},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}_i.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&OS(t,e,r.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(r[a]=s.result),o()},s.readAsText(n[a])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return OS(t,e,r,!0),!0}return!1};_i.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=tT?null:e.clipboardData;return n?(nT(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(nV(t),!1)};function sV(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function lV(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let a=t.doc.lineAt(o);a.number>i&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),i=a.number}r=!0}return{text:rh(t,j0,e.join(t.lineBreak)),ranges:n,linewise:r}}let _g=null;_i.copy=_i.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=lV(t.state);if(!n&&!i)return!1;_g=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=tT?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(sV(t,n),!1)};const iT=Ji.define();function oT(t,e){let n=[];for(let r of t.facet(j_)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:iT.of(!0)}):null}function aT(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=oT(t.state,e);n?t.dispatch(n):t.update([])}},10)}fi.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),aT(t)};fi.blur=t=>{t.observer.clearSelectionRange(),aT(t)};fi.compositionstart=fi.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};fi.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Ve.chrome&&Ve.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};fi.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};_i.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let o=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(o&&a.length){let s=a[0],l=t.posAtDOM(s.startContainer,s.startOffset),c=t.posAtDOM(s.endContainer,s.endOffset);return W0(t,{from:l,to:c,insert:t.state.toText(o)},null),!0}}let i;if(Ve.chrome&&Ve.android&&(i=J_.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Ve.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Ve.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>fi.compositionend(t,e),20),!1};const bS=new Set;function cV(t){bS.has(t)||(bS.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const yS=["pre-wrap","normal","pre-line","break-spaces"];let _s=!1;function SS(){_s=!1}class uV{constructor(e){this.lineWrapping=e,this.doc=Ft.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return yS.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>td&&(_s=!0),this.height=e)}replace(e,n,r){return xr.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,a=r.doc;for(let s=i.length-1;s>=0;s--){let{fromA:l,toA:c,fromB:u,toB:d}=i[s],f=o.lineAt(l,hn.ByPosNoHeight,r.setDoc(n),0,0),h=f.to>=c?f:o.lineAt(c,hn.ByPosNoHeight,r,0,0);for(d+=h.to-c,c=h.to;s>0&&f.from<=i[s-1].toA;)l=i[s-1].fromA,u=i[s-1].fromB,s--,lo*2){let s=e[n-1];s.break?e.splice(--n,1,s.left,null,s.right):e.splice(--n,1,s.left,s.right),r+=1+s.break,i-=s.size}else if(o>i*2){let s=e[r];s.break?e.splice(r,1,s.left,null,s.right):e.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else break;else if(i=o&&a(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class qr extends sT{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new ji(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof qr||i instanceof Yn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Yn?i=new qr(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):xr.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Yn extends xr{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,a,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);a=l/o,this.length>o+1&&(s=(this.height-l)/(this.length-o-1))}else a=this.height/o;return{firstLine:r,lastLine:i,perLine:a,perChar:s}}blockAt(e,n,r,i){let{firstLine:o,lastLine:a,perLine:s,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e0){let o=r[r.length-1];o instanceof Yn?r[r.length-1]=new Yn(o.length+i):r.push(null,new Yn(i-1))}if(e>0){let o=r[0];o instanceof Yn?r[0]=new Yn(e+o.length):r.unshift(new Yn(e-1),null)}return xr.of(r)}decomposeLeft(e,n){n.push(new Yn(e-1),null)}decomposeRight(e,n){n.push(null,new Yn(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let a=[],s=Math.max(n,i.from),l=-1;for(i.from>n&&a.push(new Yn(i.from-n-1).updateHeight(e,n));s<=o&&i.more;){let u=e.doc.lineAt(s).length;a.length&&a.push(null);let d=i.heights[i.index++];l==-1?l=d:Math.abs(d-l)>=td&&(l=-2);let f=new qr(u,d);f.outdated=!1,a.push(f),s+=u+1}s<=o&&a.push(null,new Yn(o-s).updateHeight(e,s));let c=xr.of(a);return(l<0||Math.abs(c.height-this.height)>=td||Math.abs(l-this.heightMetrics(e,n).perLine)>=td)&&(_s=!0),Dd(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class fV extends xr{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return es))return c;let u=n==hn.ByPosNoHeight?hn.ByPosNoHeight:hn.ByPos;return l?c.join(this.right.lineAt(s,u,r,a,s)):this.left.lineAt(s,u,r,i,o).join(c)}forEachLine(e,n,r,i,o,a){let s=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,r,s,l,a);else{let c=this.lineAt(l,hn.ByPos,r,i,o);e=e&&c.from<=n&&a(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,s,l,a)}}replace(e,n,r){let i=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let a=o.length;for(let s of r)o.push(s);if(e>0&&xS(o,a-1),n=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e2*n.size||n.size>2*e.size?xr.of(this.break?[e,null,n]:[e,n]):(this.left=Dd(this.left,e),this.right=Dd(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:a}=this,s=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=s+a.length&&i.more?l=a=a.updateHeight(e,s,r,i):a.updateHeight(e,s,r),l?this.balanced(o,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function xS(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Yn&&(r=t[e+1])instanceof Yn&&t.splice(e-1,3,new Yn(n.length+1+r.length))}const hV=5;class F0{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof qr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new qr(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e=hV)&&this.addLineDeco(i,o,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new qr(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Yn(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof qr)return e;let n=new qr(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof qr)&&!this.isCovered?this.nodes.push(new qr(0,-1)):(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&d.overflow!="visible"){let f=u.getBoundingClientRect();o=Math.max(o,f.left),a=Math.min(a,f.right),s=Math.max(s,f.top),l=Math.min(c==t.parentNode?i.innerHeight:l,f.bottom)}c=d.position=="absolute"||d.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}}function vV(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left0&&e.top0}function OV(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class pp{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new uV(n),this.stateDeco=e.facet(Jl).filter(r=>typeof r!="function"),this.heightMap=xr.empty().applyChanges(this.stateDeco,Ft.empty,this.heightOracle.setDoc(e.doc),[new ui(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=at.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:a})=>i>=o&&i<=a)){let{from:o,to:a}=this.lineBlockAt(i);e.push(new Ou(o,a))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?$S:new V0(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(ml(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Jl).filter(u=>typeof u!="function");let i=e.changedRanges,o=ui.extendWithRanges(i,pV(r,this.stateDeco,e?e.changes:Dn.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);SS(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=a||_s)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(B_)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?mn.RTL:mn.LTR;let a=this.heightOracle.mustRefreshForWrapping(o),s=n.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let c=0,u=0;if(s.width&&s.height){let{scaleX:x,scaleY:b}=p_(n,s);(x>.005&&Math.abs(this.scaleX-x)>.005||b>.005&&Math.abs(this.scaleY-b)>.005)&&(this.scaleX=x,this.scaleY=b,c|=16,a=l=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=f)&&(this.paddingTop=d,this.paddingBottom=f,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=v_(e.scrollDOM);let p=(this.printing?OV:gV)(n,this.paddingTop),m=p.top-this.pixelViewport.top,g=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(l=!0)),!this.inView&&!this.scrollTarget&&!vV(e.dom))return 0;let O=s.width;if((this.contentDOMWidth!=O||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let x=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(x)&&(a=!0),a||i.lineWrapping&&Math.abs(O-this.contentDOMWidth)>i.charWidth){let{lineHeight:b,charWidth:C,textHeight:$}=e.docView.measureTextSize();a=b>0&&i.refresh(o,b,C,$,Math.max(5,O/C),x),a&&(e.docView.minWidth=0,c|=16)}m>0&&g>0?u=Math.max(m,g):m<0&&g<0&&(u=Math.min(m,g)),SS();for(let b of this.viewports){let C=b.from==this.viewport.from?x:e.docView.measureVisibleLineHeights(b);this.heightMap=(a?xr.empty().applyChanges(this.stateDeco,Ft.empty,this.heightOracle,[new ui(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,a,new dV(b.from,C))}_s&&(c|=2)}let S=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return S&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new Ou(i.lineAt(a-r*1e3,hn.ByHeight,o,0,0).from,i.lineAt(s+(1-r)*1e3,hn.ByHeight,o,0,0).to);if(n){let{head:c}=n.range;if(cl.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=i.lineAt(c,hn.ByPos,o,0,0),f;n.y=="center"?f=(d.top+d.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c=s+Math.max(10,Math.min(r,250)))&&i>a-2*1e3&&o>1,a=i<<1;if(this.defaultTextDirection!=mn.LTR&&!r)return[];let s=[],l=(u,d,f,h)=>{if(d-uu&&vv.from>=f.from&&v.to<=f.to&&Math.abs(v.from-u)v.fromO));if(!g){if(dS.from<=d&&S.to>=d)){let S=n.moveToLineBoundary(xe.cursor(d),!1,!0).head;S>u&&(d=S)}let v=this.gapSize(f,u,d,h),O=r||v<2e6?v:2e6;g=new pp(u,d,v,O)}s.push(g)},c=u=>{if(u.length2e6)for(let C of e)C.from>=u.from&&C.fromu.from&&l(u.from,h,u,d),pn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];jt.spans(n,this.viewport.from,this.viewport.to,{span(o,a){r.push({from:o,to:a})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let o=0;o=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||ml(this.heightMap.lineAt(e,hn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||ml(this.heightMap.lineAt(this.scaler.fromDOM(e),hn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return ml(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Ou{constructor(e,n){this.from=e,this.to=n}}function yV(t,e,n){let r=[],i=t,o=0;return jt.spans(n,t,e,{span(){},point(a,s){a>i&&(r.push({from:i,to:a}),o+=a-i),i=s}},20),i=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:a}=e[i],s=a-o;if(r<=s)return o+r;r-=s}}function yu(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function SV(t,e){for(let n of t)if(e(n))return n}const $S={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class V0{constructor(e,n,r){let i=0,o=0,a=0;this.viewports=r.map(({from:s,to:l})=>{let c=n.lineAt(s,hn.ByPos,e,0,0).top,u=n.lineAt(l,hn.ByPos,e,0,0).bottom;return i+=u-c,{from:s,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let s of this.viewports)s.domTop=a+(s.top-o)*this.scale,a=s.domBottom=s.domTop+(s.bottom-s.top),o=s.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=nn.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function ml(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new ji(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>ml(i,e)):t._content)}const Su=He.define({combine:t=>t.join(" ")}),Tg=He.define({combine:t=>t.indexOf(!0)>-1}),kg=Do.newName(),lT=Do.newName(),cT=Do.newName(),uT={"&light":"."+lT,"&dark":"."+cT};function Rg(t,e,n){return new Do(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const xV=Rg("."+kg,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},uT),CV={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},mp=Ve.ie&&Ve.ie_version<=11;class $V{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new oF,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(Ve.ie&&Ve.ie_version<=11||Ve.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Ve.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Ve.chrome&&Ve.chrome_version<126)&&(this.editContext=new PV(e),e.state.facet(oo)&&(e.contentDOM.editContext=this.editContext.editContext)),mp&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(oo)?r.root.activeElement!=this.dom:!Ju(this.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Ve.ie&&Ve.ie_version<=11||Ve.android&&Ve.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Tl(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Kl(e.root);if(!n)return!1;let r=Ve.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&wV(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=Ju(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&ss(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let a=this.readMutation(o);a&&(a.typeOver&&(i=!0),n==-1?{from:n,to:r}=a:(n=Math.min(a.from,n),r=Math.max(a.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Ju(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new WF(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=K_(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=wS(n,e.previousSibling||e.target.previousSibling,-1),i=wS(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(oo)!=e.state.facet(oo)&&(e.view.contentDOM.editContext=e.state.facet(oo)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function wS(t,e,n){for(;e;){let r=ln.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function PS(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return Tl(a.node,a.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function wV(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return PS(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?PS(t,n):null}class PV{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:o,head:a}=i,s=this.toEditorPos(r.updateRangeStart),l=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:s,drifted:!1});let c={from:s,to:l,insert:Ft.of(r.text.split(` -`))};if(c.from==this.from&&othis.to&&(c.to=o),c.from==c.to&&!c.insert.length){let u=xe.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));u.main.eq(i)||e.dispatch({selection:u,userEvent:"select"});return}if((Ve.mac||Ve.android)&&c.from==a-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(c={from:s,to:l,insert:Ft.of([r.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let u=this.to-this.from+(c.to-c.from+c.insert.length);W0(e,c,xe.single(this.toEditorPos(r.selectionStart,u),this.toEditorPos(r.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),c.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],o=null;for(let a=this.toEditorPos(r.rangeStart),s=this.toEditorPos(r.rangeEnd);a{let i=[];for(let o of r.getTextFormats()){let a=o.underlineStyle,s=o.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(s)){let l=this.toEditorPos(o.rangeStart),c=this.toEditorPos(o.rangeEnd);if(l{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Kl(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,a,s,l,c)=>{if(r)return;let u=c.length-(a-o);if(i&&a>=i.to)if(i.from==o&&i.to==a&&i.insert.eq(c)){i=this.pendingContextChange=null,n+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(o+=n,a+=n,a<=this.from)this.from+=u,this.to+=u;else if(othis.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(a),c.toString()),this.to+=u}n+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class ze{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(o=>r(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||aF(e.parent)||document,this.viewState=new CS(e.state||Qt.create(e)),e.scrollTo&&e.scrollTo.is(mu)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ja).map(i=>new dp(i));for(let i of this.plugins)i.update(this);this.observer=new $V(this),this.inputState=new ZF(this),this.inputState.ensureHandlers(this.plugins),this.docView=new iS(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Nn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let f of e){if(f.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let a=this.hasFocus,s=0,l=null;e.some(f=>f.annotation(iT))?(this.inputState.notifiedFocused=a,s=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,l=oT(o,a),l||(s=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(Qt.phrases)!=this.state.facet(Qt.phrases))return this.setState(o);i=jd.create(this,o,e),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(d&&(d=d.map(f.changes)),f.scrollIntoView){let{main:h}=f.state.selection;d=new ls(h.empty?h:xe.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of f.effects)h.is(mu)&&(d=h.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Bd.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(hl)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Su)!=i.state.facet(Su)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let f of this.state.facet($g))try{f(i)}catch(h){Nr(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!K_(this,u)&&c.force&&ss(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new CS(e),this.plugins=e.facet(Ja).map(r=>new dp(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new iS(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Ja),r=e.state.facet(Ja);if(n!=r){let i=[];for(let o of r){let a=n.indexOf(o);if(a<0)i.push(new dp(o));else{let s=this.plugins[a];s.mustUpdate=e,i.push(s)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:a}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(a<0)if(v_(r))o=-1,a=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);o=h.from,a=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(p){return Nr(this.state,p),_S}}),d=jd.create(this,this.state,[]),f=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),f=this.docView.update(d),f&&this.docViewUpdate());for(let h=0;h1||p<-1){i=i+p,r.scrollTop=i/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let s of this.state.facet($g))s(n)}get themeClasses(){return kg+" "+(this.state.facet(Tg)?cT:lT)+" "+this.state.facet(Su)}updateAttrs(){let e=TS(this,V_,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(oo)?"true":"false",class:"cm-content",style:`${Ve.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),TS(this,D0,n);let r=this.observer.ignore(()=>{let i=bg(this.contentDOM,this.contentAttrs,n),o=bg(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(ze.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(hl);let e=this.state.facet(ze.cspNonce);Do.mount(this.root,this.styleModules.concat(xV).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;nr.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return hp(this,e,cS(this,e,n,r))}moveByGroup(e,n){return hp(this,e,cS(this,e,n,r=>LF(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return xe.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return zF(this,e,n,r)}moveVertically(e,n,r){return hp(this,e,jF(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),G_(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),a=o[Mo.find(o,e-i.from,-1,n)];return Rc(r,a.dir==mn.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(D_)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>_V)return M_(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||I_(o.isolates,r=rS(this,e))))return o.order;r||(r=rS(this,e));let i=SF(e.text,n,r);return this.bidiCache.push(new Bd(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Ve.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{m_(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return mu.of(new ls(typeof e=="number"?xe.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return mu.of(new ls(xe.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return In.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return In.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Do.newName(),i=[Su.of(r),hl.of(Rg(`.${r}`,e))];return n&&n.dark&&i.push(Tg.of(!0)),i}static baseTheme(e){return Xo.lowest(hl.of(Rg("."+kg,e,uT)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&ln.get(r)||ln.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}ze.styleModule=hl;ze.inputHandler=L_;ze.clipboardInputFilter=L0;ze.clipboardOutputFilter=j0;ze.scrollHandler=W_;ze.focusChangeEffect=j_;ze.perLineTextDirection=D_;ze.exceptionSink=z_;ze.updateListener=$g;ze.editable=oo;ze.mouseSelectionStyle=N_;ze.dragMovesSelection=Q_;ze.clickAddsSelectionRange=A_;ze.decorations=Jl;ze.outerDecorations=H_;ze.atomicRanges=Ec;ze.bidiIsolatedRanges=X_;ze.scrollMargins=Z_;ze.darkTheme=Tg;ze.cspNonce=He.define({combine:t=>t.length?t[0]:""});ze.contentAttributes=D0;ze.editorAttributes=V_;ze.lineWrapping=ze.contentAttributes.of({class:"cm-lineWrapping"});ze.announce=gt.define();const _V=4096,_S={};class Bd{constructor(e,n,r,i,o,a){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=a}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:mn.LTR;for(let o=Math.max(0,e.length-10);o=0;i--){let o=r[i],a=typeof o=="function"?o(t):o;a&&Og(a,n)}return n}const TV=Ve.mac?"mac":Ve.windows?"win":Ve.linux?"linux":"key";function kV(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,a,s;for(let l=0;lr.concat(i),[]))),n}function IV(t,e,n){return fT(dT(t.state),e,t,n)}let Po=null;const MV=4e3;function EV(t,e=TV){let n=Object.create(null),r=Object.create(null),i=(a,s)=>{let l=r[a];if(l==null)r[a]=s;else if(l!=s)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},o=(a,s,l,c,u)=>{var d,f;let h=n[a]||(n[a]=Object.create(null)),p=s.split(/ (?!$)/).map(v=>kV(v,e));for(let v=1;v{let x=Po={view:S,prefix:O,scope:a};return setTimeout(()=>{Po==x&&(Po=null)},MV),!0}]})}let m=p.join(" ");i(m,!1);let g=h[m]||(h[m]={preventDefault:!1,stopPropagation:!1,run:((f=(d=h._any)===null||d===void 0?void 0:d.run)===null||f===void 0?void 0:f.slice())||[]});l&&g.run.push(l),c&&(g.preventDefault=!0),u&&(g.stopPropagation=!0)};for(let a of t){let s=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let c of s){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:d}=a;for(let f in u)u[f].run.push(h=>d(h,Ig))}let l=a[e]||a.key;if(l)for(let c of s)o(c,l,a.run,a.preventDefault,a.stopPropagation),a.shift&&o(c,"Shift-"+l,a.shift,a.preventDefault,a.stopPropagation)}return n}let Ig=null;function fT(t,e,n,r){Ig=e;let i=tF(e),o=Er(i,0),a=Li(o)==i.length&&i!=" ",s="",l=!1,c=!1,u=!1;Po&&Po.view==n&&Po.scope==r&&(s=Po.prefix+" ",eT.indexOf(e.keyCode)<0&&(c=!0,Po=null));let d=new Set,f=g=>{if(g){for(let v of g.run)if(!d.has(v)&&(d.add(v),v(n)))return g.stopPropagation&&(u=!0),!0;g.preventDefault&&(g.stopPropagation&&(u=!0),c=!0)}return!1},h=t[r],p,m;return h&&(f(h[s+xu(i,e,!a)])?l=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Ve.windows&&e.ctrlKey&&e.altKey)&&!(Ve.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(p=Bo[e.keyCode])&&p!=i?(f(h[s+xu(p,e,!0)])||e.shiftKey&&(m=Ul[e.keyCode])!=i&&m!=p&&f(h[s+xu(m,e,!1)]))&&(l=!0):a&&e.shiftKey&&f(h[s+xu(i,e,!0)])&&(l=!0),!l&&f(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),Ig=null,l}class Qc{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=hT(e);return[new Qc(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return AV(e,n,r)}}function hT(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==mn.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function RS(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let o=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:o.left+1,y:a}),l=t.posAtCoords({x:o.right-1,y:a});return s==null||l==null?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}function AV(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==mn.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=hT(t),c=a.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=s.right-(u?parseInt(u.paddingRight):0),h=Pg(t,r,1),p=Pg(t,i,-1),m=h.type==Sr.Text?h:null,g=p.type==Sr.Text?p:null;if(m&&(t.lineWrapping||h.widgetLineBreaks)&&(m=RS(t,r,1,m)),g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=RS(t,i,-1,g)),m&&g&&m.from==g.from&&m.to==g.to)return O(S(n.from,n.to,m));{let b=m?S(n.from,null,m):x(h,!1),C=g?S(null,n.to,g):x(p,!0),$=[];return(m||h).to<(g||p).from-(m&&g?1:0)||h.widgetLineBreaks>1&&b.bottom+t.defaultLineHeight/2R&&I.from=M)break;L>Q&&T(Math.max(z,Q),b==null&&z<=R,Math.min(L,M),C==null&&L>=k,N.dir)}if(Q=E.to+1,Q>=M)break}return _.length==0&&T(R,b==null,k,C==null,t.textDirection),{top:w,bottom:P,horizontal:_}}function x(b,C){let $=s.top+(C?b.top:b.bottom);return{top:$,bottom:$,horizontal:[]}}}function QV(t,e){return t.constructor==e.constructor&&t.eq(e)}class NV{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(nd)!=e.state.facet(nd)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(nd);for(;n!QV(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e,Ve.ios&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const nd=He.define();function pT(t){return[In.define(e=>new NV(e,t)),nd.of(t)]}const ec=He.define({combine(t){return eo(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function zV(t={}){return[ec.of(t),LV,jV,DV,B_.of(!0)]}function mT(t){return t.startState.facet(ec)!=t.state.facet(ec)}const LV=pT({above:!0,markers(t){let{state:e}=t,n=e.facet(ec),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty||n.drawRangeCursor){let a=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=i.empty?i:xe.cursor(i.head,i.head>i.anchor?-1:1);for(let l of Qc.forRange(t,a,s))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=mT(t);return n&&IS(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){IS(e.state,t)},class:"cm-cursorLayer"});function IS(t,e){e.style.animationDuration=t.facet(ec).cursorBlinkRate+"ms"}const jV=pT({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Qc.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||mT(t)},class:"cm-selectionLayer"}),DV=Xo.highest(ze.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),gT=gt.define({map(t,e){return t==null?null:e.mapPos(t)}}),gl=Zn.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(gT)?r.value:n,t)}}),BV=In.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(gl);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(gl)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(gl),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(gl)!=t&&this.view.dispatch({effects:gT.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function WV(){return[gl,BV]}function MS(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=e.exec(o.value);)i(a+s.index,s)}function FV(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class VV{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(s,l,c,u)=>i(u,c,c+s[0].length,s,l);else if(typeof r=="function")this.addMatch=(s,l,c,u)=>{let d=r(s,l,c);d&&u(c,c+s[0].length,d)};else if(r)this.addMatch=(s,l,c,u)=>u(c,c+s[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=a}createDeco(e){let n=new fo,r=n.add.bind(n);for(let{from:i,to:o}of FV(e,this.maxLength))MS(e.state.doc,this.regexp,i,o,(a,s)=>this.addMatch(s,e,a,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,a,s,l)=>{l>=e.view.viewport.from&&s<=e.view.viewport.to&&(r=Math.min(s,r),i=Math.max(l,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let a=Math.max(o.from,r),s=Math.min(o.to,i);if(s>=a){let l=e.state.doc.lineAt(a),c=l.tol.from;a--)if(this.boundary.test(l.text[a-1-l.from])){u=a;break}for(;sf.push(v.range(m,g));if(l==c)for(this.regexp.lastIndex=u-l.from;(h=this.regexp.exec(l.text))&&h.indexthis.addMatch(g,e,m,p));n=n.update({filterFrom:u,filterTo:d,filter:(m,g)=>md,add:f})}}return n}}const Mg=/x/.unicode!=null?"gu":"g",HV=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Mg),XV={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let gp=null;function ZV(){var t;if(gp==null&&typeof document<"u"&&document.body){let e=document.body.style;gp=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return gp||!1}const rd=He.define({combine(t){let e=eo(t,{render:null,specialChars:HV,addSpecialChars:null});return(e.replaceTabs=!ZV())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Mg)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Mg)),e}});function qV(t={}){return[rd.of(t),GV()]}let ES=null;function GV(){return ES||(ES=In.fromClass(class{constructor(t){this.view=t,this.decorations=at.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(rd)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new VV({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=Er(e[0],0);if(o==9){let a=i.lineAt(r),s=n.state.tabSize,l=Vs(a.text,s,r-a.from);return at.replace({widget:new JV((s-l%s)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=at.replace({widget:new KV(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(rd);t.startState.facet(rd)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const YV="•";function UV(t){return t>=32?YV:t==10?"␤":String.fromCharCode(9216+t)}class KV extends to{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=UV(this.code),r=e.state.phrase("Control character")+" "+(XV[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class JV extends to{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function eH(){return nH}const tH=at.line({class:"cm-activeLine"}),nH=In.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(tH.range(i.from)),e=i.from)}return at.set(n)}},{decorations:t=>t.decorations});class rH extends to{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?$s(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=Rc(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}}function iH(t){let e=In.fromClass(class{constructor(n){this.view=n,this.placeholder=t?at.set([at.widget({widget:new rH(t),side:1}).range(0)]):at.none}get decorations(){return this.view.state.doc.length?at.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,ze.contentAttributes.of({"aria-placeholder":t})]:e}const Eg=2e3;function oH(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>Eg||n.off>Eg||e.col<0||n.col<0){let a=Math.min(e.off,n.off),s=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let c=t.doc.line(l);c.length<=s&&o.push(xe.range(c.from+a,c.to+s))}}else{let a=Math.min(e.col,n.col),s=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let c=t.doc.line(l),u=dg(c.text,a,t.tabSize,!0);if(u<0)o.push(xe.cursor(c.to));else{let d=dg(c.text,s,t.tabSize);o.push(xe.range(c.from+u,c.from+d))}}}return o}function aH(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function AS(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>Eg?-1:i==r.length?aH(t,e.clientX):Vs(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function sH(t,e){let n=AS(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),a=i.state.doc.lineAt(o);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},r=r.map(i.changes)}},get(i,o,a){let s=AS(t,i);if(!s)return r;let l=oH(t.state,n,s);return l.length?a?xe.create(l.concat(r.ranges)):xe.create(l):r}}:null}function lH(t){let e=n=>n.altKey&&n.button==0;return ze.mouseSelectionStyle.of((n,r)=>e(r)?sH(n,r):null)}const cH={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},uH={style:"cursor: crosshair"};function dH(t={}){let[e,n]=cH[t.key||"Alt"],r=In.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,ze.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?uH:null})]}const il="-10000px";class vT{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let o=null;this.tooltipViews=this.tooltips.map(a=>o=r(a,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let a=[],s=n?[]:null;for(let l=0;ln[c]=l),n.length=s.length),this.input=i,this.tooltips=o,this.tooltipViews=a,!0}}function fH(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const vp=He.define({combine:t=>{var e,n,r;return{position:Ve.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||fH}}}),QS=new WeakMap,H0=In.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(vp);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new vT(t,X0,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(vp);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=il,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(Ve.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==il&&o.style.left=="0px"){let a=o.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=B0(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((o,a)=>{let s=this.manager.tooltipViews[a];return s.getCoords?s.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(vp).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:o}=t,a=[];for(let s=0;s=Math.min(n.bottom,r.bottom)||d.rightMath.min(n.right,r.right)+.1)){u.style.top=il;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=h?7:0,m=f.right-f.left,g=(e=QS.get(c))!==null&&e!==void 0?e:f.bottom-f.top,v=c.offset||pH,O=this.view.textDirection==mn.LTR,S=f.width>r.right-r.left?O?r.left:r.right-f.width:O?Math.max(r.left,Math.min(d.left-(h?14:0)+v.x,r.right-m)):Math.min(Math.max(r.left,d.left-m+(h?14:0)-v.x),r.right-m),x=this.above[s];!l.strictSide&&(x?d.top-g-p-v.yr.bottom)&&x==r.bottom-d.bottom>d.top-r.top&&(x=this.above[s]=!x);let b=(x?d.top-r.top:r.bottom-d.bottom)-p;if(bS&&w.topC&&(C=x?w.top-g-2-p:w.bottom+p+2);if(this.position=="absolute"?(u.style.top=(C-t.parent.top)/o+"px",NS(u,(S-t.parent.left)/i)):(u.style.top=C/o+"px",NS(u,S/i)),h){let w=d.left+(O?v.x:-v.x)-(S+14-7);h.style.left=w/i+"px"}c.overlap!==!0&&a.push({left:S,top:C,right:$,bottom:C+g}),u.classList.toggle("cm-tooltip-above",x),u.classList.toggle("cm-tooltip-below",!x),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=il}},{eventObservers:{scroll(){this.maybeMeasure()}}});function NS(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const hH=ze.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),pH={x:0,y:0},X0=He.define({enables:[H0,hH]}),Wd=He.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class ih{static create(e){return new ih(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new vT(e,Wd,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const mH=X0.compute([Wd],t=>{let e=t.facet(Wd);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:ih.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class gH{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;es.bottom||n.xs.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=l&&l.dir==mn.RTL?-1:1;o=n.x{this.pending==s&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Nr(e.state,l,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(H0),n=e?e.manager.tooltips.findIndex(r=>r.create==ih.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!vH(o.dom,e)||this.pending){let{pos:a}=i[0]||this.pending,s=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:a;(a==s?this.view.posAtCoords(this.lastMove)!=a:!OH(this.view,a,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Cu=4;function vH(t,e){let{left:n,right:r,top:i,bottom:o}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let s=a.getBoundingClientRect();i=Math.min(s.top,i),o=Math.max(s.bottom,o)}return e.clientX>=n-Cu&&e.clientX<=r+Cu&&e.clientY>=i-Cu&&e.clientY<=o+Cu}function OH(t,e,n,r,i,o){let a=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>r||a.righti||Math.min(a.bottom,s)=e&&l<=n}function bH(t,e={}){let n=gt.define(),r=Zn.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(a=>!e.hideOn(o,a))),o.docChanged)){let a=[];for(let s of i){let l=o.changes.mapPos(s.pos,-1,Kn.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),s);c.pos=l,c.end!=null&&(c.end=o.changes.mapPos(c.end)),a.push(c)}}i=a}for(let a of o.effects)a.is(n)&&(i=a.value),a.is(yH)&&(i=[]);return i},provide:i=>Wd.from(i)});return{active:r,extension:[r,In.define(i=>new gH(i,t,r,n,e.hoverTime||300)),mH]}}function OT(t,e){let n=t.plugin(H0);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const yH=gt.define(),zS=He.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function tc(t,e){let n=t.plugin(bT),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const bT=In.fromClass(class{constructor(t){this.input=t.state.facet(nc),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(zS);this.top=new $u(t,!0,e.topContainer),this.bottom=new $u(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(zS);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new $u(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new $u(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(nc);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],a=[],s=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),s.push(u)):(u=this.panels[c],u.update&&u.update(t)),i.push(u),(u.top?o:a).push(u)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(a);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ze.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class $u{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=LS(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=LS(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function LS(t){let e=t.nextSibling;return t.remove(),e}const nc=He.define({enables:bT});class po extends xa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}po.prototype.elementClass="";po.prototype.toDOM=void 0;po.prototype.mapMode=Kn.TrackBefore;po.prototype.startSide=po.prototype.endSide=-1;po.prototype.point=!0;const id=He.define(),SH=He.define(),xH={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>jt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Il=He.define();function CH(t){return[yT(),Il.of({...xH,...t})]}const jS=He.define({combine:t=>t.some(e=>e)});function yT(t){return[$H]}const $H=In.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Il).map(e=>new BS(t,e)),this.fixed=!t.state.facet(jS);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(jS)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=jt.iter(this.view.state.facet(id),this.view.viewport.from),r=[],i=this.gutters.map(o=>new wH(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let a=!0;for(let s of o.type)if(s.type==Sr.Text&&a){Ag(n,r,s.from);for(let l of i)l.line(this.view,s,r);a=!1}else if(s.widget)for(let l of i)l.widget(this.view,s)}else if(o.type==Sr.Text){Ag(n,r,o.from);for(let a of i)a.line(this.view,o,r)}else if(o.widget)for(let a of i)a.widget(this.view,o);for(let o of i)o.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Il),n=t.state.facet(Il),r=t.docChanged||t.heightChanged||t.viewportChanged||!jt.eq(t.startState.facet(id),t.state.facet(id),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let a=e.indexOf(o);a<0?i.push(new BS(this.view,o)):(this.gutters[a].update(t),i.push(this.gutters[a]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)o.config.side=="after"?this.getDOMAfter().appendChild(o.dom):this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>ze.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==mn.LTR?{left:r,right:i}:{right:r,left:i}})});function DS(t){return Array.isArray(t)?t:[t]}function Ag(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class wH{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=jt.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==i.elements.length){let s=new ST(e,a,o,r);i.elements.push(s),i.dom.appendChild(s.dom)}else i.elements[this.i].update(e,a,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];Ag(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let a=this.gutter;i.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let o of e.state.facet(SH)){let a=o(e,n.widget,n);a&&(i||(i=[])).push(a)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class BS{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,a;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=i.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[r](e,s,i)&&i.preventDefault()});this.markers=DS(n.markers(e)),n.initialSpacer&&(this.spacer=new ST(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=DS(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!jt.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class ST{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),PH(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,a=0;;){let s=a,l=oo(s,l,c)||a(s,l,c):a}return r}})}});class Op extends po{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function bp(t,e){return t.state.facet(es).formatNumber(e,t.state)}const kH=Il.compute([es],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(_H)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new Op(bp(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(TH)){let o=i(e,n,r);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(es)!=e.state.facet(es),initialSpacer(e){return new Op(bp(e,WS(e.state.doc.lines)))},updateSpacer(e,n){let r=bp(n.view,WS(n.view.state.doc.lines));return r==e.number?e:new Op(r)},domEventHandlers:t.facet(es).domEventHandlers,side:"before"}));function RH(t={}){return[es.of(t),yT(),kH]}function WS(t){let e=9;for(;e{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(IH.range(i)))}return jt.of(e)});function EH(){return MH}const xT=1024;let AH=0;class yp{constructor(e,n){this.from=e,this.to=n}}class Tt{constructor(e={}){this.id=AH++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=jr.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Tt.closedBy=new Tt({deserialize:t=>t.split(" ")});Tt.openedBy=new Tt({deserialize:t=>t.split(" ")});Tt.group=new Tt({deserialize:t=>t.split(" ")});Tt.isolate=new Tt({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Tt.contextHash=new Tt({perNode:!0});Tt.lookAhead=new Tt({perNode:!0});Tt.mounted=new Tt({perNode:!0});class Fd{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Tt.mounted.id]}}const QH=Object.create(null);class jr{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):QH,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new jr(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Tt.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Tt.group),o=-1;o<(i?i.length:0);o++){let a=n[o<0?r.name:i[o]];if(a)return a}}}}jr.none=new jr("",Object.create(null),0,8);class Z0{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(a|Bn.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!s&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(s||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Y0(jr.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new zn(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new zn(jr.none,n,r,i)))}static build(e){return jH(e)}}zn.empty=new zn(jr.none,[],[],0);class q0{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new q0(this.buffer,this.index)}}class Fo{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return jr.none}toString(){let e=[];for(let n=0;n0));l=a[l+3]);return s}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),a=0;for(let s=e,l=0;s=e&&ne;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function rc(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?s.length:-1;e!=c;e+=n){let u=s[e],d=l[e]+a.from;if(CT(i,r,d,d+u.length)){if(u instanceof Fo){if(o&Bn.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,n,r-d,i);if(f>-1)return new Bi(new NH(a,u,e,d),null,f)}else if(o&Bn.IncludeAnonymous||!u.type.isAnonymous||G0(u)){let f;if(!(o&Bn.IgnoreMounts)&&(f=Fd.get(u))&&!f.overlay)return new Lr(f.tree,d,e,a);let h=new Lr(u,d,e,a);return o&Bn.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?u.children.length-1:0,n,r,i)}}}if(o&Bn.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&Bn.IgnoreOverlays)&&(i=Fd.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:a,to:s}of i.overlay)if((n>0?a<=o:a=o:s>o))return new Lr(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function VS(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let a=!1;!a;)if(a=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function Qg(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class NH{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Bi extends $T{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new Bi(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&Bn.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Bi(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Bi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Bi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let a=r.buffer[this.index+1];e.push(r.slice(i,o,a)),n.push(0)}return new zn(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function wT(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;on.from||a.to=e){let s=new Lr(a.tree,a.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(rc(s,e,n,!1))}}return i?wT(i):r}class Ng{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Lr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Lr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Bn.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Bn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Bn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let o=n+e,a=e<0?-1:r._tree.children.length;o!=a;o+=e){let s=r._tree.children[o];if(this.mode&Bn.IncludeAnonymous||s instanceof Fo||!s.type.isAnonymous||G0(s))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let a=e;a;a=a._parent)if(a.index==i){if(i==this.index)return a;n=a,r=o+1;break e}i=this.stack[--o]}for(let i=r;i=0;o--){if(o<0)return Qg(this._tree,e,i);let a=r[n.buffer[this.stack[o]]];if(!a.isAnonymous){if(e[i]&&e[i]!=a.name)return!1;i--}}return!0}}function G0(t){return t.children.some(e=>e instanceof Fo||!e.type.isAnonymous||G0(e))}function jH(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=xT,reused:o=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(n)?new q0(n,n.length):n,l=r.types,c=0,u=0;function d(b,C,$,w,P,_){let{id:T,start:R,end:k,size:I}=s,Q=u,M=c;for(;I<0;)if(s.next(),I==-1){let F=o[T];$.push(F),w.push(R-b);return}else if(I==-3){c=T;return}else if(I==-4){u=T;return}else throw new RangeError(`Unrecognized record size: ${I}`);let E=l[T],N,z,L=R-b;if(k-R<=i&&(z=g(s.pos-C,P))){let F=new Uint16Array(z.size-z.skip),H=s.pos-z.size,V=F.length;for(;s.pos>H;)V=v(z.start,F,V);N=new Fo(F,k-z.start,r),L=z.start-b}else{let F=s.pos-I;s.next();let H=[],V=[],X=T>=a?T:-1,B=0,G=k;for(;s.pos>F;)X>=0&&s.id==X&&s.size>=0?(s.end<=G-i&&(p(H,V,R,B,s.end,G,X,Q,M),B=H.length,G=s.end),s.next()):_>2500?f(R,F,H,V):d(R,F,H,V,X,_+1);if(X>=0&&B>0&&B-1&&B>0){let se=h(E,M);N=Y0(E,H,V,0,H.length,0,k-R,se,se)}else N=m(E,H,V,k-R,Q-k,M)}$.push(N),w.push(L)}function f(b,C,$,w){let P=[],_=0,T=-1;for(;s.pos>C;){let{id:R,start:k,end:I,size:Q}=s;if(Q>4)s.next();else{if(T>-1&&k=0;I-=3)R[Q++]=P[I],R[Q++]=P[I+1]-k,R[Q++]=P[I+2]-k,R[Q++]=Q;$.push(new Fo(R,P[2]-k,r)),w.push(k-b)}}function h(b,C){return($,w,P)=>{let _=0,T=$.length-1,R,k;if(T>=0&&(R=$[T])instanceof zn){if(!T&&R.type==b&&R.length==P)return R;(k=R.prop(Tt.lookAhead))&&(_=w[T]+R.length+k)}return m(b,$,w,P,_,C)}}function p(b,C,$,w,P,_,T,R,k){let I=[],Q=[];for(;b.length>w;)I.push(b.pop()),Q.push(C.pop()+$-P);b.push(m(r.types[T],I,Q,_-P,R-_,k)),C.push(P-$)}function m(b,C,$,w,P,_,T){if(_){let R=[Tt.contextHash,_];T=T?[R].concat(T):[R]}if(P>25){let R=[Tt.lookAhead,P];T=T?[R].concat(T):[R]}return new zn(b,C,$,w,T)}function g(b,C){let $=s.fork(),w=0,P=0,_=0,T=$.end-i,R={size:0,start:0,skip:0};e:for(let k=$.pos-b;$.pos>k;){let I=$.size;if($.id==C&&I>=0){R.size=w,R.start=P,R.skip=_,_+=4,w+=4,$.next();continue}let Q=$.pos-I;if(I<0||Q=a?4:0,E=$.start;for($.next();$.pos>Q;){if($.size<0)if($.size==-3)M+=4;else break e;else $.id>=a&&(M+=4);$.next()}P=E,w+=I,_+=M}return(C<0||w==b)&&(R.size=w,R.start=P,R.skip=_),R.size>4?R:void 0}function v(b,C,$){let{id:w,start:P,end:_,size:T}=s;if(s.next(),T>=0&&w4){let k=s.pos-(T-4);for(;s.pos>k;)$=v(b,C,$)}C[--$]=R,C[--$]=_-b,C[--$]=P-b,C[--$]=w}else T==-3?c=w:T==-4&&(u=w);return $}let O=[],S=[];for(;s.pos>0;)d(t.start||0,t.bufferStart||0,O,S,-1,0);let x=(e=t.length)!==null&&e!==void 0?e:O.length?S[0]+O[0].length:0;return new zn(l[t.topID],O.reverse(),S.reverse(),x)}const HS=new WeakMap;function od(t,e){if(!t.isAnonymous||e instanceof Fo||e.type!=t)return 1;let n=HS.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof zn)){n=1;break}n+=od(t,r)}HS.set(e,n)}return n}function Y0(t,e,n,r,i,o,a,s,l){let c=0;for(let p=r;p=u)break;C+=$}if(S==x+1){if(C>u){let $=p[x];h($.children,$.positions,0,$.children.length,m[x]+O);continue}d.push(p[x])}else{let $=m[S-1]+p[S-1].length-b;d.push(Y0(t,p,m,x,S,b,$,null,l))}f.push(b+O-o)}}return h(e,n,r,i,0),(s||l)(d,f,a)}class DH{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof Bi?this.setBuffer(e.context.buffer,e.index,n):e instanceof Lr&&this.map.set(e.tree,n)}get(e){return e instanceof Bi?this.getBuffer(e.context.buffer,e.index):e instanceof Lr?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class fa{constructor(e,n,r,i,o=!1,a=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new fa(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,a=e.length?e[0]:null;for(let s=0,l=0,c=0;;s++){let u=s=r)for(;a&&a.from=f.from||d<=f.to||c){let h=Math.max(f.from,l)-c,p=Math.min(f.to,d)-c;f=h>=p?null:new fa(h,p,f.tree,f.offset+c,s>0,!!u)}if(f&&i.push(f),a.to>d)break;a=onew yp(i.from,i.to)):[new yp(0,0)]:[new yp(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class BH{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new Tt({perNode:!0});let WH=0,ro=class zg{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=WH++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof zg&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new zg(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new Vd(e);return r=>r.modified.indexOf(n)>-1?r:Vd.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}},FH=0;class Vd{constructor(e){this.name=e,this.instances=[],this.id=FH++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(s=>s.base==e&&VH(n,s.modified));if(r)return r;let i=[],o=new ro(e.name,i,e,n);for(let s of n)s.instances.push(o);let a=HH(n);for(let s of e.set)if(!s.modified.length)for(let l of a)i.push(Vd.get(s,l));return o}}function VH(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function HH(t){let e=[[]];for(let n=0;nr.length-n.length)}function U0(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],a=2,s=i;for(let d=0;;){if(s=="..."&&d>0&&d+3==i.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!f)throw new RangeError("Invalid path: "+i);if(o.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),d+=f[0].length,d==i.length)break;let h=i[d++];if(d==i.length&&h=="!"){a=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);s=i.slice(d)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new Hd(r,a,l>0?o.slice(0,l):null);e[c]=u.sort(e[c])}}return _T.add(e)}const _T=new Tt;class Hd{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let a=i;for(let s of o)for(let l of s.set){let c=n[l.id];if(c){a=a?a+" "+c:c;break}}return a},scope:r}}function XH(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function ZH(t,e,n,r=0,i=t.length){let o=new qH(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class qH{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:a,from:s,to:l}=e;if(s>=r||l<=n)return;a.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(a)));let c=i,u=GH(e)||Hd.empty,d=XH(o,u.tags);if(d&&(c&&(c+=" "),c+=d,u.mode==1&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(n,s),c),u.opaque)return;let f=e.tree&&e.tree.prop(Tt.mounted);if(f&&f.overlay){let h=e.node.enter(f.overlay[0].from+s,1),p=this.highlighters.filter(g=>!g.scope||g.scope(f.tree.type)),m=e.firstChild();for(let g=0,v=s;;g++){let O=g=S||!e.nextSibling())););if(!O||S>r)break;v=O.to+s,v>n&&(this.highlightRange(h.cursor(),Math.max(n,O.from+s),Math.min(r,v),"",p),this.startSpan(Math.min(r,v),c))}m&&e.parent()}else if(e.firstChild()){f&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function GH(t){let e=t.type.prop(_T);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Ne=ro.define,Pu=Ne(),$o=Ne(),XS=Ne($o),ZS=Ne($o),wo=Ne(),_u=Ne(wo),Sp=Ne(wo),Qi=Ne(),Yo=Ne(Qi),Ei=Ne(),Ai=Ne(),Lg=Ne(),ol=Ne(Lg),Tu=Ne(),K={comment:Pu,lineComment:Ne(Pu),blockComment:Ne(Pu),docComment:Ne(Pu),name:$o,variableName:Ne($o),typeName:XS,tagName:Ne(XS),propertyName:ZS,attributeName:Ne(ZS),className:Ne($o),labelName:Ne($o),namespace:Ne($o),macroName:Ne($o),literal:wo,string:_u,docString:Ne(_u),character:Ne(_u),attributeValue:Ne(_u),number:Sp,integer:Ne(Sp),float:Ne(Sp),bool:Ne(wo),regexp:Ne(wo),escape:Ne(wo),color:Ne(wo),url:Ne(wo),keyword:Ei,self:Ne(Ei),null:Ne(Ei),atom:Ne(Ei),unit:Ne(Ei),modifier:Ne(Ei),operatorKeyword:Ne(Ei),controlKeyword:Ne(Ei),definitionKeyword:Ne(Ei),moduleKeyword:Ne(Ei),operator:Ai,derefOperator:Ne(Ai),arithmeticOperator:Ne(Ai),logicOperator:Ne(Ai),bitwiseOperator:Ne(Ai),compareOperator:Ne(Ai),updateOperator:Ne(Ai),definitionOperator:Ne(Ai),typeOperator:Ne(Ai),controlOperator:Ne(Ai),punctuation:Lg,separator:Ne(Lg),bracket:ol,angleBracket:Ne(ol),squareBracket:Ne(ol),paren:Ne(ol),brace:Ne(ol),content:Qi,heading:Yo,heading1:Ne(Yo),heading2:Ne(Yo),heading3:Ne(Yo),heading4:Ne(Yo),heading5:Ne(Yo),heading6:Ne(Yo),contentSeparator:Ne(Qi),list:Ne(Qi),quote:Ne(Qi),emphasis:Ne(Qi),strong:Ne(Qi),link:Ne(Qi),monospace:Ne(Qi),strikethrough:Ne(Qi),inserted:Ne(),deleted:Ne(),changed:Ne(),invalid:Ne(),meta:Tu,documentMeta:Ne(Tu),annotation:Ne(Tu),processingInstruction:Ne(Tu),definition:ro.defineModifier("definition"),constant:ro.defineModifier("constant"),function:ro.defineModifier("function"),standard:ro.defineModifier("standard"),local:ro.defineModifier("local"),special:ro.defineModifier("special")};for(let t in K){let e=K[t];e instanceof ro&&(e.name=t)}TT([{tag:K.link,class:"tok-link"},{tag:K.heading,class:"tok-heading"},{tag:K.emphasis,class:"tok-emphasis"},{tag:K.strong,class:"tok-strong"},{tag:K.keyword,class:"tok-keyword"},{tag:K.atom,class:"tok-atom"},{tag:K.bool,class:"tok-bool"},{tag:K.url,class:"tok-url"},{tag:K.labelName,class:"tok-labelName"},{tag:K.inserted,class:"tok-inserted"},{tag:K.deleted,class:"tok-deleted"},{tag:K.literal,class:"tok-literal"},{tag:K.string,class:"tok-string"},{tag:K.number,class:"tok-number"},{tag:[K.regexp,K.escape,K.special(K.string)],class:"tok-string2"},{tag:K.variableName,class:"tok-variableName"},{tag:K.local(K.variableName),class:"tok-variableName tok-local"},{tag:K.definition(K.variableName),class:"tok-variableName tok-definition"},{tag:K.special(K.variableName),class:"tok-variableName2"},{tag:K.definition(K.propertyName),class:"tok-propertyName tok-definition"},{tag:K.typeName,class:"tok-typeName"},{tag:K.namespace,class:"tok-namespace"},{tag:K.className,class:"tok-className"},{tag:K.macroName,class:"tok-macroName"},{tag:K.propertyName,class:"tok-propertyName"},{tag:K.operator,class:"tok-operator"},{tag:K.comment,class:"tok-comment"},{tag:K.meta,class:"tok-meta"},{tag:K.invalid,class:"tok-invalid"},{tag:K.punctuation,class:"tok-punctuation"}]);var xp;const ts=new Tt;function kT(t){return He.define({combine:t?e=>e.concat(t):void 0})}const K0=new Tt;class yi{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Qt.prototype.hasOwnProperty("tree")||Object.defineProperty(Qt.prototype,"tree",{get(){return Fn(this)}}),this.parser=n,this.extension=[Vo.of(this),Qt.languageData.of((o,a,s)=>{let l=qS(o,a,s),c=l.type.prop(ts);if(!c)return[];let u=o.facet(c),d=l.type.prop(K0);if(d){let f=l.resolve(a-l.from,s);for(let h of d)if(h.test(f,o)){let p=o.facet(h.facet);return h.type=="replace"?p:p.concat(u)}}return u})].concat(r)}isActiveAt(e,n,r=-1){return qS(e,n,r).type.prop(ts)==this.data}findRegions(e){let n=e.facet(Vo);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,a)=>{if(o.prop(ts)==this.data){r.push({from:a,to:a+o.length});return}let s=o.prop(Tt.mounted);if(s){if(s.tree.prop(ts)==this.data){if(s.overlay)for(let l of s.overlay)r.push({from:l.from+a,to:l.to+a});else r.push({from:a,to:a+o.length});return}else if(s.overlay){let l=r.length;if(i(s.tree,s.overlay[0].from+a),r.length>l)return}}for(let l=0;lr.isTop?n:void 0)]}),e.name)}configure(e,n){return new ic(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Fn(t){let e=t.field(yi.state,!1);return e?e.tree:zn.empty}class YH{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let al=null;class Xd{constructor(e,n,r=[],i,o,a,s,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Xd(e,n,[],zn.empty,0,r,[],null)}startParse(){return this.parser.startParse(new YH(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=zn.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(fa.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=al;al=this;try{return e()}finally{al=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=GS(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:a,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,d,f)=>l.push({fromA:c,toA:u,fromB:d,toB:f})),r=fa.applyChanges(r,l),i=zn.empty,o=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){s=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),d=e.mapPos(c.to,-1);ue.from&&(this.fragments=GS(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends PT{createParse(n,r,i){let o=i[0].from,a=i[i.length-1].to;return{parsedPos:o,advance(){let l=al;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=a,new zn(jr.none,[],[],a-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return al}}function GS(t,e,n){return fa.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Ts{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Ts(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Xd.create(e.facet(Vo).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Ts(r)}}yi.state=Zn.define({create:Ts.init,update(t,e){for(let n of e.effects)if(n.is(yi.setState))return n.value;return e.startState.facet(Vo)!=e.state.facet(Vo)?Ts.init(e.state):t.apply(e)}});let RT=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(RT=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Cp=typeof navigator<"u"&&(!((xp=navigator.scheduling)===null||xp===void 0)&&xp.isInputPending)?()=>navigator.scheduling.isInputPending():null,UH=In.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(yi.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(yi.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=RT(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndi+1e3,l=o.context.work(()=>Cp&&Cp()||Date.now()>a,i+(s?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:yi.setState.of(new Ts(o.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Nr(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Vo=He.define({combine(t){return t.length?t[0]:null},enables:t=>[yi.state,UH,ze.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class IT{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const KH=He.define(),Nc=He.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Zd(t){let e=t.facet(Nc);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function oc(t,e){let n="",r=t.tabSize,i=t.facet(Nc)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o=e?JH(t,n,e):null}class oh{constructor(e,n={}){this.state=e,this.options=n,this.unit=Zd(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return Vs(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const eO=new Tt;function JH(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let a=i;a&&!(a.fromr.node.to||a.from==r.node.from&&a.type==r.node.type);a=a.parent)o.push(a);for(let a=o.length-1;a>=0;a--)r={node:o[a],next:r}}return MT(r,t,n)}function MT(t,e,n){for(let r=t;r;r=r.next){let i=tX(r.node);if(i)return i(tO.create(e,n,r))}return 0}function eX(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function tX(t){let e=t.type.prop(eO);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Tt.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return a=>ET(a,!0,1,void 0,o&&!eX(a)?i.from:void 0)}return t.parent==null?nX:null}function nX(){return 0}class tO extends oh{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new tO(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(rX(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return MT(this.context.next,this.base,this.pos)}}function rX(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function iX(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let s=n.to;;){let l=e.childAfter(s);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=a)return null;let c=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+c}}s=l.to}}function jg({closing:t,align:e=!0,units:n=1}){return r=>ET(r,e,n,t)}function ET(t,e,n,r,i){let o=t.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==t.pos+a,l=e?iX(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}const oX=t=>t.baseIndent;function $p({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const aX=200;function sX(){return Qt.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+aX)return t;let o=n.sliceString(i.from,r);if(!e.some(c=>c.test(o)))return t;let{state:a}=t,s=-1,l=[];for(let{head:c}of a.selection.ranges){let u=a.doc.lineAt(c);if(u.from==s)continue;s=u.from;let d=J0(a,u.from);if(d==null)continue;let f=/^\s*/.exec(u.text)[0],h=oc(a,d);f!=h&&l.push({from:u.from,to:u.from+f.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const lX=He.define(),nO=new Tt;function AT(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(o&&s.from=e&&c.to>n&&(o=c)}}return o}function uX(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function qd(t,e,n){for(let r of t.facet(lX)){let i=r(t,e,n);if(i)return i}return cX(t,e,n)}function QT(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const ah=gt.define({map:QT}),zc=gt.define({map:QT});function NT(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const Pa=Zn.define({create(){return at.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=YS(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(ah)&&!dX(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(jT),i=r?at.replace({widget:new OX(r(e.state,n.value))}):US;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(zc)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=YS(t,e.selection.main.head)),t},provide:t=>ze.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{ie&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,o)=>i>=n||o<=e}):t}function Gd(t,e,n){var r;let i=null;return(r=t.field(Pa,!1))===null||r===void 0||r.between(e,n,(o,a)=>{(!i||i.from>o)&&(i={from:o,to:a})}),i}function dX(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function zT(t,e){return t.field(Pa,!1)?e:e.concat(gt.appendConfig.of(DT()))}const fX=t=>{for(let e of NT(t)){let n=qd(t.state,e.from,e.to);if(n)return t.dispatch({effects:zT(t.state,[ah.of(n),LT(t,n)])}),!0}return!1},hX=t=>{if(!t.state.field(Pa,!1))return!1;let e=[];for(let n of NT(t)){let r=Gd(t.state,n.from,n.to);r&&e.push(zc.of(r),LT(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function LT(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return ze.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const pX=t=>{let{state:e}=t,n=[];for(let r=0;r{let e=t.state.field(Pa,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(zc.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},gX=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:fX},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:hX},{key:"Ctrl-Alt-[",run:pX},{key:"Ctrl-Alt-]",run:mX}],vX={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},jT=He.define({combine(t){return eo(t,vX)}});function DT(t){return[Pa,SX]}function BT(t,e){let{state:n}=t,r=n.facet(jT),i=a=>{let s=t.lineBlockAt(t.posAtDOM(a.target)),l=Gd(t.state,s.from,s.to);l&&t.dispatch({effects:zc.of(l)}),a.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const US=at.replace({widget:new class extends to{toDOM(t){return BT(t,null)}}});class OX extends to{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return BT(e,this.value)}}const bX={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class wp extends po{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function yX(t={}){let e={...bX,...t},n=new wp(e,!0),r=new wp(e,!1),i=In.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Vo)!=a.state.facet(Vo)||a.startState.field(Pa,!1)!=a.state.field(Pa,!1)||Fn(a.startState)!=Fn(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let s=new fo;for(let l of a.viewportLineBlocks){let c=Gd(a.state,l.from,l.to)?r:qd(a.state,l.from,l.to)?n:null;c&&s.add(l.from,l.from,c)}return s.finish()}}),{domEventHandlers:o}=e;return[i,CH({class:"cm-foldGutter",markers(a){var s;return((s=a.plugin(i))===null||s===void 0?void 0:s.markers)||jt.empty},initialSpacer(){return new wp(e,!1)},domEventHandlers:{...o,click:(a,s,l)=>{if(o.click&&o.click(a,s,l))return!0;let c=Gd(a.state,s.from,s.to);if(c)return a.dispatch({effects:zc.of(c)}),!0;let u=qd(a.state,s.from,s.to);return u?(a.dispatch({effects:ah.of(u)}),!0):!1}}}),DT()]}const SX=ze.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Lc{constructor(e,n){this.specs=e;let r;function i(s){let l=Do.newName();return(r||(r=Object.create(null)))["."+l]=s,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof yi?s=>s.prop(ts)==a.data:a?s=>s==a:void 0,this.style=TT(e.map(s=>({tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))})),{all:o}).style,this.module=r?new Do(r):null,this.themeType=n.themeType}static define(e,n){return new Lc(e,n||{})}}const Dg=He.define(),WT=He.define({combine(t){return t.length?[t[0]]:null}});function Pp(t){let e=t.facet(Dg);return e.length?e:t.facet(WT)}function FT(t,e){let n=[CX],r;return t instanceof Lc&&(t.module&&n.push(ze.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(WT.of(t)):r?n.push(Dg.computeN([ze.darkTheme],i=>i.facet(ze.darkTheme)==(r=="dark")?[t]:[])):n.push(Dg.of(t)),n}class xX{constructor(e){this.markCache=Object.create(null),this.tree=Fn(e.state),this.decorations=this.buildDeco(e,Pp(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Fn(e.state),r=Pp(e.state),i=r!=Pp(e.startState),{viewport:o}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return at.none;let r=new fo;for(let{from:i,to:o}of e.visibleRanges)ZH(this.tree,n,(a,s,l)=>{r.add(a,s,this.markCache[l]||(this.markCache[l]=at.mark({class:l})))},i,o);return r.finish()}}const CX=Xo.high(In.fromClass(xX,{decorations:t=>t.decorations})),$X=Lc.define([{tag:K.meta,color:"#404740"},{tag:K.link,textDecoration:"underline"},{tag:K.heading,textDecoration:"underline",fontWeight:"bold"},{tag:K.emphasis,fontStyle:"italic"},{tag:K.strong,fontWeight:"bold"},{tag:K.strikethrough,textDecoration:"line-through"},{tag:K.keyword,color:"#708"},{tag:[K.atom,K.bool,K.url,K.contentSeparator,K.labelName],color:"#219"},{tag:[K.literal,K.inserted],color:"#164"},{tag:[K.string,K.deleted],color:"#a11"},{tag:[K.regexp,K.escape,K.special(K.string)],color:"#e40"},{tag:K.definition(K.variableName),color:"#00f"},{tag:K.local(K.variableName),color:"#30a"},{tag:[K.typeName,K.namespace],color:"#085"},{tag:K.className,color:"#167"},{tag:[K.special(K.variableName),K.macroName],color:"#256"},{tag:K.definition(K.propertyName),color:"#00c"},{tag:K.comment,color:"#940"},{tag:K.invalid,color:"#f00"}]),wX=ze.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),VT=1e4,HT="()[]{}",XT=He.define({combine(t){return eo(t,{afterCursor:!0,brackets:HT,maxScanDistance:VT,renderMatch:TX})}}),PX=at.mark({class:"cm-matchingBracket"}),_X=at.mark({class:"cm-nonmatchingBracket"});function TX(t){let e=[],n=t.matched?PX:_X;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const kX=Zn.define({create(){return at.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(XT);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=Wi(e.state,i.head,-1,r)||i.head>0&&Wi(e.state,i.head-1,1,r)||r.afterCursor&&(Wi(e.state,i.head,1,r)||i.headze.decorations.from(t)}),RX=[kX,wX];function IX(t={}){return[XT.of(t),RX]}const MX=new Tt;function Bg(t,e,n){let r=t.prop(e<0?Tt.openedBy:Tt.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function Wg(t){let e=t.type.prop(MX);return e?e(t.node):t}function Wi(t,e,n,r={}){let i=r.maxScanDistance||VT,o=r.brackets||HT,a=Fn(t),s=a.resolveInner(e,n);for(let l=s;l;l=l.parent){let c=Bg(l.type,n,o);if(c&&l.from0?e>=u.from&&eu.from&&e<=u.to))return EX(t,e,n,l,u,c,o)}}return AX(t,e,n,a,s.type,i,o)}function EX(t,e,n,r,i,o,a){let s=r.parent,l={from:i.from,to:i.to},c=0,u=s==null?void 0:s.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&o.indexOf(u.type.name)>-1&&u.from0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let f=0;!u.next().done&&f<=o;){let h=u.value;n<0&&(f+=h.length);let p=e+f*n;for(let m=n>0?0:h.length-1,g=n>0?h.length:-1;m!=g;m+=n){let v=a.indexOf(h[m]);if(!(v<0||r.resolveInner(p+m,1).type!=i))if(v%2==0==n>0)d++;else{if(d==1)return{start:c,end:{from:p+m,to:p+m+1},matched:v>>1==l>>1};d--}}n>0&&(f+=h.length)}return u.done?{start:c,matched:!1}:null}const QX=Object.create(null),KS=[jr.none],JS=[],ex=Object.create(null),NX=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])NX[t]=zX(QX,e);function _p(t,e){JS.indexOf(t)>-1||(JS.push(t),console.warn(e))}function zX(t,e){let n=[];for(let s of e.split(" ")){let l=[];for(let c of s.split(".")){let u=t[c]||K[c];u?typeof u=="function"?l.length?l=l.map(u):_p(c,`Modifier ${c} used at start of tag`):l.length?_p(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:_p(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(s=>s.id),o=ex[i];if(o)return o.id;let a=ex[i]=jr.define({id:KS.length,name:r,props:[U0({[r]:n})]});return KS.push(a),a.id}mn.RTL,mn.LTR;const LX=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=iO(t.state,n.from);return r.line?jX(t):r.block?BX(t):!1};function rO(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const jX=rO(VX,0),DX=rO(ZT,0),BX=rO((t,e)=>ZT(t,e,FX(e)),0);function iO(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const sl=50;function WX(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-sl,r),a=t.sliceDoc(i,i+sl),s=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(a)[0].length,c=o.length-s;if(o.slice(c-e.length,c)==e&&a.slice(l,l+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+l,margin:l&&1}};let u,d;i-r<=2*sl?u=d=t.sliceDoc(r,i):(u=t.sliceDoc(r,r+sl),d=t.sliceDoc(i-sl,i));let f=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(d)[0].length,p=d.length-h-n.length;return u.slice(f,f+e.length)==e&&d.slice(p,p+n.length)==n?{open:{pos:r+f+e.length,margin:/\s/.test(u.charAt(f+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(d.charAt(p-1))?1:0}}:null}function FX(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function ZT(t,e,n=e.selection.ranges){let r=n.map(o=>iO(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,a)=>WX(e,r[a],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,a)=>i[a]?[]:[{from:o.from,insert:r[a].open+" "},{from:o.to,insert:" "+r[a].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let a=0,s;ai&&(o==a||a>d.from)){i=d.from;let f=/^\s*/.exec(d.text)[0].length,h=f==d.length,p=d.text.slice(f,f+c.length)==c?f:-1;fo.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:s,token:l,indent:c,empty:u,single:d}of r)(d||!u)&&o.push({from:s.from+c,insert:l+" "});let a=e.changes(o);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:a,comment:s,token:l}of r)if(s>=0){let c=a.from+s,u=c+l.length;a.text[u-a.from]==" "&&u++,o.push({from:c,to:u})}return{changes:o}}return null}const Fg=Ji.define(),HX=Ji.define(),XX=He.define(),qT=He.define({combine(t){return eo(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),GT=Zn.define({create(){return Fi.empty},update(t,e){let n=e.state.facet(qT),r=e.annotation(Fg);if(r){let l=zr.fromTransaction(e,r.selection),c=r.side,u=c==0?t.undone:t.done;return l?u=Yd(u,u.length,n.minDepth,l):u=KT(u,e.startState.selection),new Fi(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(HX);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Nn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=zr.fromTransaction(e),a=e.annotation(Nn.time),s=e.annotation(Nn.userEvent);return o?t=t.addChanges(o,a,s,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Fi(t.done.map(zr.fromJSON),t.undone.map(zr.fromJSON))}});function ZX(t={}){return[GT,qT.of(t),ze.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?YT:e.inputType=="historyRedo"?Vg:null;return r?(e.preventDefault(),r(n)):!1}})]}function sh(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(GT,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const YT=sh(0,!1),Vg=sh(1,!1),qX=sh(0,!0),GX=sh(1,!0);class zr{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new zr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new zr(e.changes&&Dn.fromJSON(e.changes),[],e.mapped&&Xi.fromJSON(e.mapped),e.startSelection&&xe.fromJSON(e.startSelection),e.selectionsAfter.map(xe.fromJSON))}static fromTransaction(e,n){let r=li;for(let i of e.startState.facet(XX)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new zr(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,li)}static selection(e){return new zr(void 0,li,void 0,void 0,e)}}function Yd(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function YX(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,a,s)=>{for(let l=0;l=c&&a<=u&&(r=!0)}}),r}function UX(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function UT(t,e){return t.length?e.length?t.concat(e):t:e}const li=[],KX=200;function KT(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-KX));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Yd(t,t.length-1,1e9,n.setSelAfter(r)))}else return[zr.selection([e])]}function JX(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Tp(t,e){if(!t.length)return t;let n=t.length,r=li;for(;n;){let i=eZ(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[zr.selection(r)]:li}function eZ(t,e,n){let r=UT(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(e)):li,n);if(!t.changes)return zr.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(o):o;return new zr(i,gt.mapEffects(t.effects,e),a,t.startSelection.map(o),r)}const tZ=/^(input\.type|delete)($|\.)/;class Fi{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Fi(this.done,this.undone):this}addChanges(e,n,r,i,o){let a=this.done,s=a[a.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!r||tZ.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):lh(n,e))}function mr(t){return t.textDirectionAt(t.state.selection.main.head)==mn.LTR}const ek=t=>JT(t,!mr(t)),tk=t=>JT(t,mr(t));function nk(t,e){return ki(t,n=>n.empty?t.moveByGroup(n,e):lh(n,e))}const rZ=t=>nk(t,!mr(t)),iZ=t=>nk(t,mr(t));function oZ(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function ch(t,e,n){let r=Fn(t).resolveInner(e.head),i=n?Tt.closedBy:Tt.openedBy;for(let l=e.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;oZ(t,c,i)?r=c:l=n?c.to:c.from}let o=r.type.prop(i),a,s;return o&&(a=n?Wi(t,r.from,1):Wi(t,r.to,-1))&&a.matched?s=n?a.end.to:a.end.from:s=n?r.to:r.from,xe.cursor(s,n?-1:1)}const aZ=t=>ki(t,e=>ch(t.state,e,!mr(t))),sZ=t=>ki(t,e=>ch(t.state,e,mr(t)));function rk(t,e){return ki(t,n=>{if(!n.empty)return lh(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const ik=t=>rk(t,!1),ok=t=>rk(t,!0);function ak(t){let e=t.scrollDOM.clientHeighta.empty?t.moveVertically(a,e,n.height):lh(a,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let a=t.coordsAtPos(r.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,c=s.bottom-n.marginBottom;a&&a.top>l&&a.bottomsk(t,!1),Hg=t=>sk(t,!0);function Zo(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=xe.cursor(r.from+o))}return i}const lZ=t=>ki(t,e=>Zo(t,e,!0)),cZ=t=>ki(t,e=>Zo(t,e,!1)),uZ=t=>ki(t,e=>Zo(t,e,!mr(t))),dZ=t=>ki(t,e=>Zo(t,e,mr(t))),fZ=t=>ki(t,e=>xe.cursor(t.lineBlockAt(e.head).from,1)),hZ=t=>ki(t,e=>xe.cursor(t.lineBlockAt(e.head).to,-1));function pZ(t,e,n){let r=!1,i=Hs(t.selection,o=>{let a=Wi(t,o.head,-1)||Wi(t,o.head,1)||o.head>0&&Wi(t,o.head-1,1)||o.headpZ(t,e);function mi(t,e){let n=Hs(t.state.selection,r=>{let i=e(r);return xe.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(no(t.state,n)),!0)}function lk(t,e){return mi(t,n=>t.moveByChar(n,e))}const ck=t=>lk(t,!mr(t)),uk=t=>lk(t,mr(t));function dk(t,e){return mi(t,n=>t.moveByGroup(n,e))}const gZ=t=>dk(t,!mr(t)),vZ=t=>dk(t,mr(t)),OZ=t=>mi(t,e=>ch(t.state,e,!mr(t))),bZ=t=>mi(t,e=>ch(t.state,e,mr(t)));function fk(t,e){return mi(t,n=>t.moveVertically(n,e))}const hk=t=>fk(t,!1),pk=t=>fk(t,!0);function mk(t,e){return mi(t,n=>t.moveVertically(n,e,ak(t).height))}const nx=t=>mk(t,!1),rx=t=>mk(t,!0),yZ=t=>mi(t,e=>Zo(t,e,!0)),SZ=t=>mi(t,e=>Zo(t,e,!1)),xZ=t=>mi(t,e=>Zo(t,e,!mr(t))),CZ=t=>mi(t,e=>Zo(t,e,mr(t))),$Z=t=>mi(t,e=>xe.cursor(t.lineBlockAt(e.head).from)),wZ=t=>mi(t,e=>xe.cursor(t.lineBlockAt(e.head).to)),ix=({state:t,dispatch:e})=>(e(no(t,{anchor:0})),!0),ox=({state:t,dispatch:e})=>(e(no(t,{anchor:t.doc.length})),!0),ax=({state:t,dispatch:e})=>(e(no(t,{anchor:t.selection.main.anchor,head:0})),!0),sx=({state:t,dispatch:e})=>(e(no(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),PZ=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),_Z=({state:t,dispatch:e})=>{let n=uh(t).map(({from:r,to:i})=>xe.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:xe.create(n),userEvent:"select"})),!0},TZ=({state:t,dispatch:e})=>{let n=Hs(t.selection,r=>{let i=Fn(t),o=i.resolveStack(r.from,1);if(r.empty){let a=i.resolveStack(r.from,-1);a.node.from>=o.node.from&&a.node.to<=o.node.to&&(o=a)}for(let a=o;a;a=a.next){let{node:s}=a;if((s.from=r.to||s.to>r.to&&s.from<=r.from)&&a.next)return xe.range(s.to,s.from)}return r});return n.eq(t.selection)?!1:(e(no(t,n)),!0)},kZ=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=xe.create([n.main]):n.main.empty||(r=xe.create([xe.cursor(n.main.head)])),r?(e(no(t,r)),!0):!1};function jc(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:a,to:s}=o;if(a==s){let l=e(o);la&&(n="delete.forward",l=ku(t,l,!0)),a=Math.min(a,l),s=Math.max(s,l)}else a=ku(t,a,!1),s=ku(t,s,!0);return a==s?{range:o}:{changes:{from:a,to:s},range:xe.cursor(a,ai(t)))r.between(e,e,(i,o)=>{ie&&(e=n?o:i)});return e}const gk=(t,e,n)=>jc(t,r=>{let i=r.from,{state:o}=t,a=o.doc.lineAt(i),s,l;if(n&&!e&&i>a.from&&igk(t,!1,!0),vk=t=>gk(t,!0,!1),Ok=(t,e)=>jc(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),a=i.charCategorizer(r);for(let s=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=Jn(o.text,r-o.from,e)+o.from,c=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),u=a(c);if(s!=null&&u!=s)break;(c!=" "||r!=n.head)&&(s=u),r=l}return r}),bk=t=>Ok(t,!1),RZ=t=>Ok(t,!0),IZ=t=>jc(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headjc(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),EZ=t=>jc(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ft.of(["",""])},range:xe.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},QZ=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),a=i==o.from?i-1:Jn(o.text,i-o.from,!1)+o.from,s=i==o.to?i+1:Jn(o.text,i-o.from,!0)+o.from;return{changes:{from:a,to:s,insert:t.doc.slice(i,s).append(t.doc.slice(a,i))},range:xe.cursor(s)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function uh(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let a=e[e.length-1];a.to=o.to,a.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function yk(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of uh(t)){if(n?o.to==t.doc.length:o.from==0)continue;let a=t.doc.lineAt(n?o.to+1:o.from-1),s=a.length+1;if(n){r.push({from:o.to,to:a.to},{from:o.from,insert:a.text+t.lineBreak});for(let l of o.ranges)i.push(xe.range(Math.min(t.doc.length,l.anchor+s),Math.min(t.doc.length,l.head+s)))}else{r.push({from:a.from,to:o.from},{from:o.to,insert:t.lineBreak+a.text});for(let l of o.ranges)i.push(xe.range(l.anchor-s,l.head-s))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:xe.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const NZ=({state:t,dispatch:e})=>yk(t,e,!1),zZ=({state:t,dispatch:e})=>yk(t,e,!0);function Sk(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of uh(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const LZ=({state:t,dispatch:e})=>Sk(t,e,!1),jZ=({state:t,dispatch:e})=>Sk(t,e,!0),DZ=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(uh(e).map(({from:i,to:o})=>(i>0?i--:o{let o;if(t.lineWrapping){let a=t.lineBlockAt(i.head),s=t.coordsAtPos(i.head,i.assoc||1);s&&(o=a.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,o)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function BZ(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Fn(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(Tt.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const lx=xk(!1),WZ=xk(!0);function xk(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:a}=i,s=e.doc.lineAt(o),l=!t&&o==a&&BZ(e,o);t&&(o=a=(a<=s.to?s:e.doc.lineAt(a)).to);let c=new oh(e,{simulateBreak:o,simulateDoubleBreak:!!l}),u=J0(c,o);for(u==null&&(u=Vs(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));as.from&&o{let i=[];for(let a=r.from;a<=r.to;){let s=t.doc.lineAt(a);s.number>n&&(r.empty||r.to>s.from)&&(e(s,i,r),n=s.number),a=s.to+1}let o=t.changes(i);return{changes:i,range:xe.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const FZ=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new oh(t,{overrideIndentation:o=>{let a=n[o];return a??-1}}),i=oO(t,(o,a,s)=>{let l=J0(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let c=/^\s*/.exec(o.text)[0],u=oc(t,l);(c!=u||s.fromt.readOnly?!1:(e(t.update(oO(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Nc)})}),{userEvent:"input.indent"})),!0),$k=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(oO(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=Vs(i,t.tabSize),a=0,s=oc(t,Math.max(0,o-Zd(t)));for(;a(t.setTabFocusMode(),!0),HZ=[{key:"Ctrl-b",run:ek,shift:ck,preventDefault:!0},{key:"Ctrl-f",run:tk,shift:uk},{key:"Ctrl-p",run:ik,shift:hk},{key:"Ctrl-n",run:ok,shift:pk},{key:"Ctrl-a",run:fZ,shift:$Z},{key:"Ctrl-e",run:hZ,shift:wZ},{key:"Ctrl-d",run:vk},{key:"Ctrl-h",run:Xg},{key:"Ctrl-k",run:IZ},{key:"Ctrl-Alt-h",run:bk},{key:"Ctrl-o",run:AZ},{key:"Ctrl-t",run:QZ},{key:"Ctrl-v",run:Hg}],XZ=[{key:"ArrowLeft",run:ek,shift:ck,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:rZ,shift:gZ,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:uZ,shift:xZ,preventDefault:!0},{key:"ArrowRight",run:tk,shift:uk,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:iZ,shift:vZ,preventDefault:!0},{mac:"Cmd-ArrowRight",run:dZ,shift:CZ,preventDefault:!0},{key:"ArrowUp",run:ik,shift:hk,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ix,shift:ax},{mac:"Ctrl-ArrowUp",run:tx,shift:nx},{key:"ArrowDown",run:ok,shift:pk,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ox,shift:sx},{mac:"Ctrl-ArrowDown",run:Hg,shift:rx},{key:"PageUp",run:tx,shift:nx},{key:"PageDown",run:Hg,shift:rx},{key:"Home",run:cZ,shift:SZ,preventDefault:!0},{key:"Mod-Home",run:ix,shift:ax},{key:"End",run:lZ,shift:yZ,preventDefault:!0},{key:"Mod-End",run:ox,shift:sx},{key:"Enter",run:lx,shift:lx},{key:"Mod-a",run:PZ},{key:"Backspace",run:Xg,shift:Xg},{key:"Delete",run:vk},{key:"Mod-Backspace",mac:"Alt-Backspace",run:bk},{key:"Mod-Delete",mac:"Alt-Delete",run:RZ},{mac:"Mod-Backspace",run:MZ},{mac:"Mod-Delete",run:EZ}].concat(HZ.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),ZZ=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:aZ,shift:OZ},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:sZ,shift:bZ},{key:"Alt-ArrowUp",run:NZ},{key:"Shift-Alt-ArrowUp",run:LZ},{key:"Alt-ArrowDown",run:zZ},{key:"Shift-Alt-ArrowDown",run:jZ},{key:"Escape",run:kZ},{key:"Mod-Enter",run:WZ},{key:"Alt-l",mac:"Ctrl-l",run:_Z},{key:"Mod-i",run:TZ,preventDefault:!0},{key:"Mod-[",run:$k},{key:"Mod-]",run:Ck},{key:"Mod-Alt-\\",run:FZ},{key:"Shift-Mod-k",run:DZ},{key:"Shift-Mod-\\",run:mZ},{key:"Mod-/",run:LX},{key:"Alt-A",run:DX},{key:"Ctrl-m",mac:"Shift-Alt-m",run:VZ}].concat(XZ),qZ={key:"Tab",run:Ck,shift:$k},cx=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class ks{constructor(e,n,r=0,i=e.length,o,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?s=>o(cx(s)):cx,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Er(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=M0(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Li(e);let i=this.normalize(n);if(i.length)for(let o=0,a=r;;o++){let s=i.charCodeAt(o),l=this.match(s,a,this.bufferPos+this.bufferStart);if(o==i.length-1){if(l)return this.value=l,this;break}a==r&&othis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=Ud(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=n){let s=new cs(n,e.sliceString(n,r));return kp.set(e,s),s}if(i.from==n&&i.to==r)return i;let{text:o,from:a}=i;return a>n&&(o=e.sliceString(n,a)+o,a=n),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=Ud(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=cs.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Pk.prototype[Symbol.iterator]=_k.prototype[Symbol.iterator]=function(){return this});function GZ(t){try{return new RegExp(t,aO),!0}catch{return!1}}function Ud(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function Zg(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=rn("input",{class:"cm-textfield",name:"line",value:e}),r=rn("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:Ml.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},rn("label",t.state.phrase("Go to line"),": ",n)," ",rn("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),rn("button",{name:"close",onclick:()=>{t.dispatch({effects:Ml.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:a}=t,s=a.doc.lineAt(a.selection.main.head),[,l,c,u,d]=o,f=u?+u.slice(1):0,h=c?+c:s.number;if(c&&d){let g=h/100;l&&(g=g*(l=="-"?-1:1)+s.number/a.doc.lines),h=Math.round(a.doc.lines*g)}else c&&l&&(h=h*(l=="-"?-1:1)+s.number);let p=a.doc.line(Math.max(1,Math.min(a.doc.lines,h))),m=xe.cursor(p.from+Math.max(0,Math.min(f,p.length)));t.dispatch({effects:[Ml.of(!1),ze.scrollIntoView(m.from,{y:"center"})],selection:m}),t.focus()}return{dom:r}}const Ml=gt.define(),ux=Zn.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Ml)&&(t=n.value);return t},provide:t=>nc.from(t,e=>e?Zg:null)}),YZ=t=>{let e=tc(t,Zg);if(!e){let n=[Ml.of(!0)];t.state.field(ux,!1)==null&&n.push(gt.appendConfig.of([ux,UZ])),t.dispatch({effects:n}),e=tc(t,Zg)}return e&&e.dom.querySelector("input").select(),!0},UZ=ze.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),KZ={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},JZ=He.define({combine(t){return eo(t,KZ,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function eq(t){return[oq,iq]}const tq=at.mark({class:"cm-selectionMatch"}),nq=at.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function dx(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Sn.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Sn.Word)}function rq(t,e,n,r){return t(e.sliceDoc(n,n+1))==Sn.Word&&t(e.sliceDoc(r-1,r))==Sn.Word}const iq=In.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(JZ),{state:n}=t,r=n.selection;if(r.ranges.length>1)return at.none;let i=r.main,o,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return at.none;let l=n.wordAt(i.head);if(!l)return at.none;a=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l200)return at.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!(dx(a,n,i.from,i.to)&&rq(a,n,i.from,i.to)))return at.none}else if(o=n.sliceDoc(i.from,i.to),!o)return at.none}let s=[];for(let l of t.visibleRanges){let c=new ks(n.doc,o,l.from,l.to);for(;!c.next().done;){let{from:u,to:d}=c.value;if((!a||dx(a,n,u,d))&&(i.empty&&u<=i.from&&d>=i.to?s.push(nq.range(u,d)):(u>=i.to||d<=i.from)&&s.push(tq.range(u,d)),s.length>e.maxMatches))return at.none}}return at.set(s)}},{decorations:t=>t.decorations}),oq=ze.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),aq=({state:t,dispatch:e})=>{let{selection:n}=t,r=xe.create(n.ranges.map(i=>t.wordAt(i.head)||xe.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function sq(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let a=!1,s=new ks(t.doc,e,r[r.length-1].to);;)if(s.next(),s.done){if(a)return null;s=new ks(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),a=!0}else{if(a&&r.some(l=>l.from==s.value.from))continue;if(o){let l=t.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}const lq=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return aq({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=sq(t,r);return i?(e(t.update({selection:t.selection.addRange(xe.range(i.from,i.to),!1),effects:ze.scrollIntoView(i.to)})),!0):!1},Xs=He.define({combine(t){return eo(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new yq(e),scrollToMatch:e=>ze.scrollIntoView(e)})}});class Tk{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||GZ(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?` -`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new fq(this):new uq(this)}getCursor(e,n=0,r){let i=e.doc?e:Qt.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Xa(this,i,n,r):Ha(this,i,n,r)}}class kk{constructor(e){this.spec=e}}function Ha(t,e,n,r){return new ks(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?cq(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function cq(t,e){return(n,r,i,o)=>((o>n||o+i.length=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Ha(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function Xa(t,e,n,r){return new Pk(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?dq(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function Kd(t,e){return t.slice(Jn(t,e,!1),e)}function Jd(t,e){return t.slice(e,Jn(t,e))}function dq(t){return(e,n,r)=>!r[0].length||(t(Kd(r.input,r.index))!=Sn.Word||t(Jd(r.input,r.index))!=Sn.Word)&&(t(Jd(r.input,r.index+r[0].length))!=Sn.Word||t(Kd(r.input,r.index+r[0].length))!=Sn.Word)}class fq extends kk{nextMatch(e,n,r){let i=Xa(this.spec,e,r,e.doc.length).next();return i.done&&(i=Xa(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),a=Xa(this.spec,e,o,r),s=null;for(;!a.next().done;)s=a.value;if(s&&(o==n||s.from>o+10))return s;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let o=+r.slice(0,i);if(o>0&&o=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Xa(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const ac=gt.define(),sO=gt.define(),Eo=Zn.define({create(t){return new Rp(qg(t).create(),null)},update(t,e){for(let n of e.effects)n.is(ac)?t=new Rp(n.value.create(),t.panel):n.is(sO)&&(t=new Rp(t.query,n.value?lO:null));return t},provide:t=>nc.from(t,e=>e.panel)});class Rp{constructor(e,n){this.query=e,this.panel=n}}const hq=at.mark({class:"cm-searchMatch"}),pq=at.mark({class:"cm-searchMatch cm-searchMatch-selected"}),mq=In.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Eo))}update(t){let e=t.state.field(Eo);(e!=t.startState.field(Eo)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return at.none;let{view:n}=this,r=new fo;for(let i=0,o=n.visibleRanges,a=o.length;io[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,s,l,(c,u)=>{let d=n.state.selection.ranges.some(f=>f.from==c&&f.to==u);r.add(c,u,d?pq:hq)})}return r.finish()}},{decorations:t=>t.decorations});function Dc(t){return e=>{let n=e.state.field(Eo,!1);return n&&n.query.spec.valid?t(e,n):Mk(e)}}const ef=Dc((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=xe.single(r.from,r.to),o=t.state.facet(Xs);return t.dispatch({selection:i,effects:[cO(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),Ik(t),!0}),tf=Dc((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=xe.single(i.from,i.to),a=t.state.facet(Xs);return t.dispatch({selection:o,effects:[cO(t,i),a.scrollToMatch(o.main,t)],userEvent:"select.search"}),Ik(t),!0}),gq=Dc((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:xe.create(n.map(r=>xe.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),vq=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],a=0;for(let s=new ks(t.doc,t.sliceDoc(r,i));!s.next().done;){if(o.length>1e3)return!1;s.value.from==r&&(a=o.length),o.push(xe.range(s.value.from,s.value.to))}return e(t.update({selection:xe.create(o,a),userEvent:"select.search.matches"})),!0},fx=Dc((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let a=o,s=[],l,c,u=[];a.from==r&&a.to==i&&(c=n.toText(e.getReplacement(a)),s.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(n,a.from,a.to),u.push(ze.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let d=t.state.changes(s);return a&&(l=xe.single(a.from,a.to).map(d),u.push(cO(t,a)),u.push(n.facet(Xs).scrollToMatch(l.main,t))),t.dispatch({changes:d,selection:l,effects:u,userEvent:"input.replace"}),!0}),Oq=Dc((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:a}=i;return{from:o,to:a,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ze.announce.of(r),userEvent:"input.replace.all"}),!0});function lO(t){return t.state.facet(Xs).createPanel(t)}function qg(t,e){var n,r,i,o,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let c=t.facet(Xs);return new Tk({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:c.wholeWord})}function Rk(t){let e=tc(t,lO);return e&&e.dom.querySelector("[main-field]")}function Ik(t){let e=Rk(t);e&&e==t.root.activeElement&&e.select()}const Mk=t=>{let e=t.state.field(Eo,!1);if(e&&e.panel){let n=Rk(t);if(n&&n!=t.root.activeElement){let r=qg(t.state,e.query.spec);r.valid&&t.dispatch({effects:ac.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[sO.of(!0),e?ac.of(qg(t.state,e.query.spec)):gt.appendConfig.of(xq)]});return!0},Ek=t=>{let e=t.state.field(Eo,!1);if(!e||!e.panel)return!1;let n=tc(t,lO);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:sO.of(!1)}),!0},bq=[{key:"Mod-f",run:Mk,scope:"editor search-panel"},{key:"F3",run:ef,shift:tf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ef,shift:tf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Ek,scope:"editor search-panel"},{key:"Mod-Shift-l",run:vq},{key:"Mod-Alt-g",run:YZ},{key:"Mod-d",run:lq,preventDefault:!0}];class yq{constructor(e){this.view=e;let n=this.query=e.state.field(Eo).query.spec;this.commit=this.commit.bind(this),this.searchField=rn("input",{value:n.search,placeholder:Hr(e,"Find"),"aria-label":Hr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=rn("input",{value:n.replace,placeholder:Hr(e,"Replace"),"aria-label":Hr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=rn("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=rn("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=rn("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,a){return rn("button",{class:"cm-button",name:i,onclick:o,type:"button"},a)}this.dom=rn("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>ef(e),[Hr(e,"next")]),r("prev",()=>tf(e),[Hr(e,"previous")]),r("select",()=>gq(e),[Hr(e,"all")]),rn("label",null,[this.caseField,Hr(e,"match case")]),rn("label",null,[this.reField,Hr(e,"regexp")]),rn("label",null,[this.wordField,Hr(e,"by word")]),...e.state.readOnly?[]:[rn("br"),this.replaceField,r("replace",()=>fx(e),[Hr(e,"replace")]),r("replaceAll",()=>Oq(e),[Hr(e,"replace all")])],rn("button",{name:"close",onclick:()=>Ek(e),"aria-label":Hr(e,"close"),type:"button"},["×"])])}commit(){let e=new Tk({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ac.of(e)}))}keydown(e){IV(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?tf:ef)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),fx(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(ac)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Xs).top}}function Hr(t,e){return t.state.phrase(e)}const Ru=30,Iu=/[\s\.,:;?!]/;function cO(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-Ru),a=Math.min(i,n+Ru),s=t.state.sliceDoc(o,a);if(o!=r.from){for(let l=0;ls.length-Ru;l--)if(!Iu.test(s[l-1])&&Iu.test(s[l])){s=s.slice(0,l);break}}return ze.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const Sq=ze.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),xq=[Eo,Xo.low(mq),Sq];class Ak{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Fn(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(Nk(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function hx(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Cq(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;otypeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:Cq(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function $q(t,e){return n=>{for(let r=Fn(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class px{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function ha(t){return t.selection.main.from}function Nk(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const uO=Ji.define();function wq(t,e,n,r){let{main:i}=t.selection,o=n-i.from,a=r-i.from;return{...t.changeByRange(s=>{if(s!=i&&n!=r&&t.sliceDoc(s.from+o,s.from+a)!=t.sliceDoc(n,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:l},range:xe.cursor(s.from+o+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const mx=new WeakMap;function Pq(t){if(!Array.isArray(t))return t;let e=mx.get(t);return e||mx.set(t,e=Qk(t)),e}const nf=gt.define(),sc=gt.define();class _q{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&b<=57||b>=97&&b<=122?2:b>=65&&b<=90?1:0:(C=M0(b))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!O||$==1&&g||x==0&&$!=0)&&(n[d]==b||r[d]==b&&(f=!0)?a[d++]=O:a.length&&(v=!1)),x=$,O+=Li(b)}return d==l&&a[0]==0&&v?this.result(-100+(f?-200:0),a,e):h==l&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):h==l?this.ret(-900-e.length,[p,m]):d==l?this.result(-100+(f?-200:0)+-700+(v?0:-1100),a,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let a of n){let s=a+(this.astral?Li(Er(r,a)):1);o&&i[o-1]==a?i[o-1]=s:(i[o++]=a,i[o++]=s)}return this.ret(e-r.length,i)}}class Tq{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:kq,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>gx(e(r),n(r)),optionClass:(e,n)=>r=>gx(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function gx(t,e){return t?e?t+" "+e:t:e}function kq(t,e,n,r,i,o){let a=t.textDirection==mn.RTL,s=a,l=!1,c="top",u,d,f=e.left-i.left,h=i.right-e.right,p=r.right-r.left,m=r.bottom-r.top;if(s&&f=m||O>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let g=(e.bottom-e.top)/o.offsetHeight,v=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${u/g}px; max-width: ${d/v}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function Rq(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let a=document.createElement("span");a.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let c=0;cl&&a.appendChild(document.createTextNode(s.slice(l,u)));let f=a.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(s.slice(u,d))),f.className="cm-completionMatchedText",l=d}return ln.position-r.position).map(n=>n.render)}function Ip(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class Iq{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:a}=i.open,s=e.state.facet(Hn);this.optionContent=Rq(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=Ip(o.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let u=l.target,d;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(d=/-(\d+)$/.exec(u.id))&&+d[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Hn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:sc.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:a,disabled:s}=r.open;(!i.open||i.open.options!=o)&&(this.range=Ip(o.length,a,e.state.facet(Hn).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),s!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=Ip(n.options.length,n.selected,this.view.state.facet(Hn).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>Nr(this.view.state,a,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&Eq(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let a=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom{a.target==i&&a.preventDefault()});let o=null;for(let a=r.from;ar.from||r.from==0))if(o=f,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=f}}const u=i.appendChild(document.createElement("li"));u.id=n+"-"+a,u.setAttribute("role","option");let d=this.optionClass(s);d&&(u.className=d);for(let f of this.optionContent){let h=f(s,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew Iq(n,t,e)}function Eq(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.topn.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function vx(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Aq(t,e){let n=[],r=null,i=null,o=u=>{n.push(u);let{section:d}=u.completion;if(d){r||(r=[]);let f=typeof d=="string"?d:d.name;r.some(h=>h.name==f)||r.push(typeof d=="string"?{name:f}:d)}},a=e.facet(Hn);for(let u of t)if(u.hasResult()){let d=u.result.getMatch;if(u.result.filter===!1)for(let f of u.result.options)o(new px(f,u.source,d?d(f):[],1e9-n.length));else{let f=e.sliceDoc(u.from,u.to),h,p=a.filterStrict?new Tq(f):new _q(f);for(let m of u.result.options)if(h=p.match(m.label)){let g=m.displayLabel?d?d(m,h.matched):[]:h.matched,v=h.score+(m.boost||0);if(o(new px(m,u.source,g,v)),typeof m.section=="object"&&m.section.rank==="dynamic"){let{name:O}=m.section;i||(i=Object.create(null)),i[O]=Math.max(v,i[O]||-1e9)}}}}if(r){let u=Object.create(null),d=0,f=(h,p)=>(h.rank==="dynamic"&&p.rank==="dynamic"?i[p.name]-i[h.name]:0)||(typeof h.rank=="number"?h.rank:1e9)-(typeof p.rank=="number"?p.rank:1e9)||(h.namef.score-d.score||c(d.completion,f.completion))){let d=u.completion;!l||l.label!=d.label||l.detail!=d.detail||l.type!=null&&d.type!=null&&l.type!=d.type||l.apply!=d.apply||l.boost!=d.boost?s.push(u):vx(u.completion)>vx(l)&&(s[s.length-1]=u),l=u.completion}return s}class ns{constructor(e,n,r,i,o,a){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new ns(this.options,Ox(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o,a){if(i&&!a&&e.some(c=>c.isPending))return i.setDisabled();let s=Aq(e,n);if(!s.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let l=n.facet(Hn).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;uu.hasResult()?Math.min(c,u.from):c,1e8),create:Dq,above:o.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new ns(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new ns(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class rf{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new rf(Lq,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Hn),o=(r.override||n.languageDataAt("autocomplete",ha(n)).map(Pq)).map(l=>(this.active.find(u=>u.source==l)||new ci(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((l,c)=>l==this.active[c])&&(o=this.active);let a=this.open,s=e.effects.some(l=>l.is(dO));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||o.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!Qq(o,this.active)||s?a=ns.build(o,n,this.id,a,r,s):a&&a.disabled&&!o.some(l=>l.isPending)&&(a=null),!a&&o.every(l=>!l.isPending)&&o.some(l=>l.hasResult())&&(o=o.map(l=>l.hasResult()?new ci(l.source,0):l));for(let l of e.effects)l.is(Lk)&&(a=a&&a.setSelected(l.value,this.id));return o==this.active&&a==this.open?this:new rf(o,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Nq:zq}}function Qq(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Lq=[];function zk(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(uO);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class ci{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=zk(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new ci(i.source,0)),r&4&&i.state==0&&(i=new ci(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(nf))i=new ci(i.source,1,o.value);else if(o.is(sc))i=new ci(i.source,0);else if(o.is(dO))for(let a of o.value)a.source==i.source&&(i=a);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(ha(e.state))}}class us extends ci{constructor(e,n,r,i,o,a){super(e,3,n),this.limit=r,this.result=i,this.from=o,this.to=a}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=ha(e.state);if(s>a||!i||n&2&&(ha(e.startState)==this.from||sn.map(e))}}),Lk=gt.define(),Qr=Zn.define({create(){return rf.start()},update(t,e){return t.update(e)},provide:t=>[X0.from(t,e=>e.tooltip),ze.contentAttributes.from(t,e=>e.attrs)]});function fO(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Qr).active.find(i=>i.source==e.source);return r instanceof us?(typeof n=="string"?t.dispatch({...wq(t.state,n,r.from,r.to),annotations:uO.of(e.completion)}):n(t,e.completion,r.from,r.to),!0):!1}const Dq=Mq(Qr,fO);function Mu(t,e="option"){return n=>{let r=n.state.field(Qr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(t?1:-1):t?0:a-1;return s<0?s=e=="page"?0:a-1:s>=a&&(s=e=="page"?a-1:0),n.dispatch({effects:Lk.of(s)}),!0}}const Bq=t=>{let e=t.state.field(Qr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Qr,!1)?(t.dispatch({effects:nf.of(!0)}),!0):!1,Wq=t=>{let e=t.state.field(Qr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:sc.of(null)}),!0)};class Fq{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Vq=50,Hq=1e3,Xq=In.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Qr).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Qr),n=t.state.facet(Hn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Qr)==e)return;let r=t.transactions.some(o=>{let a=zk(o,n);return a&8||(o.selection||o.docChanged)&&!(a&3)});for(let o=0;oVq&&Date.now()-a.time>Hq){for(let s of a.context.abortListeners)try{s()}catch(l){Nr(this.view.state,l)}a.context.abortListeners=null,this.running.splice(o--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(a=>a.is(nf)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(a=>a.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Qr);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Hn).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=ha(e),r=new Ak(e,n,t.explicit,this.view),i=new Fq(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:sc.of(null)}),Nr(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Hn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Hn),r=this.view.state.field(Qr);for(let i=0;is.source==o.active.source);if(a&&a.isPending)if(o.done==null){let s=new ci(o.active.source,0);for(let l of o.updates)s=s.update(l,n);s.isPending||e.push(s)}else this.startQuery(a)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:dO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Qr,!1);if(e&&e.tooltip&&this.view.state.facet(Hn).closeOnBlur){let n=e.open&&OT(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:sc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:nf.of(!1)}),20),this.composing=0}}}),Zq=typeof navigator=="object"&&/Win/.test(navigator.platform),qq=Xo.highest(ze.domEventHandlers({keydown(t,e){let n=e.state.field(Qr,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Zq&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(a=>a.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&fO(e,r),!1}})),jk=ze.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Gq{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class hO{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,Kn.TrackDel),r=e.mapPos(this.to,1,Kn.TrackDel);return n==null||r==null?null:new hO(this.field,n,r)}}class pO{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),a=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(r.length){let c=a,u=/^\t*/.exec(l)[0].length;for(let d=0;dnew hO(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:s}}static parse(e){let n=[],r=[],i=[],o;for(let a of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let s=o[1]?+o[1]:null,l=o[2]||o[3]||"",c=-1,u=l.replace(/\\[{}]/g,d=>d[1]);for(let d=0;d=c&&f.field++}for(let d of i)if(d.line==r.length&&d.from>o.index){let f=o[2]?3+(o[1]||"").length:2;d.from-=f,d.to-=f}i.push(new Gq(c,r.length,o.index,o.index+u.length)),a=a.slice(0,o.index)+l+a.slice(o.index+o[0].length)}a=a.replace(/\\([{}])/g,(s,l,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return l}),r.push(a)}return new pO(r,i)}}let Yq=at.widget({widget:new class extends to{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Uq=at.mark({class:"cm-snippetField"});class Zs{constructor(e,n){this.ranges=e,this.active=n,this.deco=at.set(e.map(r=>(r.from==r.to?Yq:Uq).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new Zs(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const Bc=gt.define({map(t,e){return t&&t.map(e)}}),Kq=gt.define(),lc=Zn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Bc))return n.value;if(n.is(Kq)&&t)return new Zs(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ze.decorations.from(t,e=>e?e.deco:at.none)});function mO(t,e){return xe.create(t.filter(n=>n.field==e).map(n=>xe.range(n.from,n.to)))}function Jq(t){let e=pO.parse(t);return(n,r,i,o)=>{let{text:a,ranges:s}=e.instantiate(n.state,i),{main:l}=n.state.selection,c={changes:{from:i,to:o==l.from?l.to:o,insert:Ft.of(a)},scrollIntoView:!0,annotations:r?[uO.of(r),Nn.userEvent.of("input.complete")]:void 0};if(s.length&&(c.selection=mO(s,0)),s.some(u=>u.field>0)){let u=new Zs(s,0),d=c.effects=[Bc.of(u)];n.state.field(lc,!1)===void 0&&d.push(gt.appendConfig.of([lc,iG,oG,jk]))}n.dispatch(n.state.update(c))}}function Dk(t){return({state:e,dispatch:n})=>{let r=e.field(lc,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(a=>a.field==i+t);return n(e.update({selection:mO(r.ranges,i),effects:Bc.of(o?null:new Zs(r.ranges,i)),scrollIntoView:!0})),!0}}const eG=({state:t,dispatch:e})=>t.field(lc,!1)?(e(t.update({effects:Bc.of(null)})),!0):!1,tG=Dk(1),nG=Dk(-1),rG=[{key:"Tab",run:tG,shift:nG},{key:"Escape",run:eG}],bx=He.define({combine(t){return t.length?t[0]:rG}}),iG=Xo.highest(Ac.compute([bx],t=>t.facet(bx)));function Ir(t,e){return{...e,apply:Jq(t)}}const oG=ze.domEventHandlers({mousedown(t,e){let n=e.state.field(lc,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:mO(n.ranges,i.field),effects:Bc.of(n.ranges.some(o=>o.field>i.field)?new Zs(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),cc={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ca=gt.define({map(t,e){let n=e.mapPos(t,-1,Kn.TrackAfter);return n??void 0}}),gO=new class extends xa{};gO.startSide=1;gO.endSide=-1;const Bk=Zn.define({create(){return jt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(ca)&&(t=t.update({add:[gO.range(n.value,n.value+1)]}));return t}});function aG(){return[lG,Bk]}const Ep="()[]{}<>«»»«[]{}";function Wk(t){for(let e=0;e{if((sG?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Li(Er(r,0))==1||e!=i.from||n!=i.to)return!1;let o=dG(t.state,r);return o?(t.dispatch(o),!0):!1}),cG=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=Fk(t,t.selection.main.head).brackets||cc.brackets,i=null,o=t.changeByRange(a=>{if(a.empty){let s=fG(t.doc,a.head);for(let l of r)if(l==s&&dh(t.doc,a.head)==Wk(Er(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:xe.cursor(a.head-l.length)}}return{range:i=a}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},uG=[{key:"Backspace",run:cG}];function dG(t,e){let n=Fk(t,t.selection.main.head),r=n.brackets||cc.brackets;for(let i of r){let o=Wk(Er(i,0));if(e==i)return o==i?mG(t,i,r.indexOf(i+i+i)>-1,n):hG(t,i,o,n.before||cc.before);if(e==o&&Vk(t,t.selection.main.from))return pG(t,i,o)}return null}function Vk(t,e){let n=!1;return t.field(Bk).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function dh(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Li(Er(n,0)))}function fG(t,e){let n=t.sliceString(e-2,e);return Li(Er(n,0))==n.length?n:n.slice(1)}function hG(t,e,n,r){let i=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:ca.of(a.to+e.length),range:xe.range(a.anchor+e.length,a.head+e.length)};let s=dh(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:ca.of(a.head+e.length),range:xe.cursor(a.head+e.length)}:{range:i=a}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function pG(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&dh(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:xe.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function mG(t,e,n,r){let i=r.stringPrefixes||cc.stringPrefixes,o=null,a=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:ca.of(s.to+e.length),range:xe.range(s.anchor+e.length,s.head+e.length)};let l=s.head,c=dh(t.doc,l),u;if(c==e){if(yx(t,l))return{changes:{insert:e+e,from:l},effects:ca.of(l+e.length),range:xe.cursor(l+e.length)};if(Vk(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:xe.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=Sx(t,l-2*e.length,i))>-1&&yx(t,u))return{changes:{insert:e+e+e+e,from:l},effects:ca.of(l+e.length),range:xe.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=Sn.Word&&Sx(t,l,i)>-1&&!gG(t,l,e,i))return{changes:{insert:e+e,from:l},effects:ca.of(l+e.length),range:xe.cursor(l+e.length)}}return{range:o=s}});return o?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function yx(t,e){let n=Fn(t).resolveInner(e+1);return n.parent&&n.from==e}function gG(t,e,n,r){let i=Fn(t).resolveInner(e,-1),o=r.reduce((a,s)=>Math.max(a,s.length),0);for(let a=0;a<5;a++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function Sx(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Sn.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=Sn.Word)return o}return-1}function vG(t={}){return[qq,Qr,Hn.of(t),Xq,OG,jk]}const Hk=[{key:"Ctrl-Space",run:Mp},{mac:"Alt-`",run:Mp},{mac:"Alt-i",run:Mp},{key:"Escape",run:Wq},{key:"ArrowDown",run:Mu(!0)},{key:"ArrowUp",run:Mu(!1)},{key:"PageDown",run:Mu(!0,"page")},{key:"PageUp",run:Mu(!1,"page")},{key:"Enter",run:Bq}],OG=Xo.highest(Ac.computeN([Hn],t=>t.facet(Hn).defaultKeymap?[Hk]:[]));class xx{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class ra{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(uc).markerFilter;i&&(e=i(e,r));let o=e.slice().sort((u,d)=>u.from-d.from||u.to-d.to),a=new fo,s=[],l=0;for(let u=0;;){let d=u==o.length?null:o[u];if(!d&&!s.length)break;let f,h;for(s.length?(f=l,h=s.reduce((m,g)=>Math.min(m,g.to),d&&d.from>f?d.from:1e8)):(f=d.from,h=d.to,s.push(d),u++);um.from||m.to==f))s.push(m),u++,h=Math.min(m.to,h);else{h=Math.min(m.from,h);break}}let p=IG(s);if(s.some(m=>m.from==m.to||m.from==m.to-1&&r.doc.lineAt(m.from).to==m.from))a.add(f,f,at.widget({widget:new _G(p),diagnostics:s.slice()}));else{let m=s.reduce((g,v)=>v.markClass?g+" "+v.markClass:g,"");a.add(f,h,at.mark({class:"cm-lintRange cm-lintRange-"+p+m,diagnostics:s.slice(),inclusiveEnd:s.some(g=>g.to>h)}))}l=h;for(let m=0;m{if(!(e&&a.diagnostics.indexOf(e)<0))if(!r)r=new xx(i,o,e||a.diagnostics[0]);else{if(a.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new xx(r.from,o,r.diagnostic)}}),r}function bG(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(uc).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(Xk))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function yG(t,e){return t.field(Ur,!1)?e:e.concat(gt.appendConfig.of(MG))}const Xk=gt.define(),vO=gt.define(),Zk=gt.define(),Ur=Zn.define({create(){return new ra(at.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=Rs(n,t.selected.diagnostic,o)||Rs(n,null,o)}!n.size&&i&&e.state.facet(uc).autoPanel&&(i=null),t=new ra(n,i,r)}for(let n of e.effects)if(n.is(Xk)){let r=e.state.facet(uc).autoPanel?n.value.length?dc.open:null:t.panel;t=ra.init(n.value,r,e.state)}else n.is(vO)?t=new ra(t.diagnostics,n.value?dc.open:null,t.selected):n.is(Zk)&&(t=new ra(t.diagnostics,t.panel,n.value));return t},provide:t=>[nc.from(t,e=>e.panel),ze.decorations.from(t,e=>e.diagnostics)]}),SG=at.mark({class:"cm-lintRange cm-lintRange-active"});function xG(t,e,n){let{diagnostics:r}=t.state.field(Ur),i,o=-1,a=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{if(e>=l&&e<=c&&(l==c||(e>l||n>0)&&(eGk(t,n,!1)))}const $G=t=>{let e=t.state.field(Ur,!1);(!e||!e.panel)&&t.dispatch({effects:yG(t.state,[vO.of(!0)])});let n=tc(t,dc.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},Cx=t=>{let e=t.state.field(Ur,!1);return!e||!e.panel?!1:(t.dispatch({effects:vO.of(!1)}),!0)},wG=t=>{let e=t.state.field(Ur,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},PG=[{key:"Mod-Shift-m",run:$G,preventDefault:!0},{key:"F8",run:wG}],uc=He.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},eo(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function qk(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;ro.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function Gk(t,e,n){var r;let i=n?qk(e.actions):[];return rn("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},rn("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,a)=>{let s=!1,l=f=>{if(f.preventDefault(),s)return;s=!0;let h=Rs(t.state.field(Ur).diagnostics,e);h&&o.apply(t,h.from,h.to)},{name:c}=o,u=i[a]?c.indexOf(i[a]):-1,d=u<0?c:[c.slice(0,u),rn("u",c.slice(u,u+1)),c.slice(u+1)];return rn("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[a]})"`}.`},d)}),e.source&&rn("div",{class:"cm-diagnosticSource"},e.source))}class _G extends to{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return rn("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class $x{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Gk(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class dc{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)Cx(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],a=qk(o.actions);for(let s=0;s{for(let o=0;oCx(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Ur).selected;if(!e)return-1;for(let n=0;n{for(let u of c.diagnostics){if(a.has(u))continue;a.add(u);let d=-1,f;for(let h=r;hr&&(this.items.splice(r,d-r),i=!0)),n&&f.diagnostic==n.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),o=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),r++}});r({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{let c=l.height/this.list.offsetHeight;s.topl.bottom&&(this.list.scrollTop+=(s.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Ur),r=Rs(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:Zk.of(r)})}static open(e){return new dc(e)}}function TG(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function Eu(t){return TG(``,'width="6" height="3"')}const kG=ze.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Eu("#d11")},".cm-lintRange-warning":{backgroundImage:Eu("orange")},".cm-lintRange-info":{backgroundImage:Eu("#999")},".cm-lintRange-hint":{backgroundImage:Eu("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function RG(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function IG(t){let e="hint",n=1;for(let r of t){let i=RG(r.severity);i>n&&(n=i,e=r.severity)}return e}const MG=[Ur,ze.decorations.compute([Ur],t=>{let{selected:e,panel:n}=t.field(Ur);return!e||!n||e.from==e.to?at.none:at.set([SG.range(e.from,e.to)])}),bH(xG,{hideOn:bG}),kG];var wx=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(uG)),e.defaultKeymap!==!1&&(r=r.concat(ZZ)),e.searchKeymap!==!1&&(r=r.concat(bq)),e.historyKeymap!==!1&&(r=r.concat(nZ)),e.foldKeymap!==!1&&(r=r.concat(gX)),e.completionKeymap!==!1&&(r=r.concat(Hk)),e.lintKeymap!==!1&&(r=r.concat(PG));var i=[];return e.lineNumbers!==!1&&i.push(RH()),e.highlightActiveLineGutter!==!1&&i.push(EH()),e.highlightSpecialChars!==!1&&i.push(qV()),e.history!==!1&&i.push(ZX()),e.foldGutter!==!1&&i.push(yX()),e.drawSelection!==!1&&i.push(zV()),e.dropCursor!==!1&&i.push(WV()),e.allowMultipleSelections!==!1&&i.push(Qt.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(sX()),e.syntaxHighlighting!==!1&&i.push(FT($X,{fallback:!0})),e.bracketMatching!==!1&&i.push(IX()),e.closeBrackets!==!1&&i.push(aG()),e.autocompletion!==!1&&i.push(vG()),e.rectangularSelection!==!1&&i.push(lH()),n!==!1&&i.push(dH()),e.highlightActiveLine!==!1&&i.push(eH()),e.highlightSelectionMatches!==!1&&i.push(eq()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Nc.of(" ".repeat(e.tabSize))),i.concat([Ac.of(r.flat())]).filter(Boolean)};const EG="#e5c07b",Px="#e06c75",AG="#56b6c2",QG="#ffffff",ad="#abb2bf",Gg="#7d8799",NG="#61afef",zG="#98c379",_x="#d19a66",LG="#c678dd",jG="#21252b",Tx="#2c313a",kx="#282c34",Ap="#353a42",DG="#3E4451",Rx="#528bff",BG=ze.theme({"&":{color:ad,backgroundColor:kx},".cm-content":{caretColor:Rx},".cm-cursor, .cm-dropCursor":{borderLeftColor:Rx},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:DG},".cm-panels":{backgroundColor:jG,color:ad},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:kx,color:Gg,border:"none"},".cm-activeLineGutter":{backgroundColor:Tx},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Ap},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Ap,borderBottomColor:Ap},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Tx,color:ad}}},{dark:!0}),WG=Lc.define([{tag:K.keyword,color:LG},{tag:[K.name,K.deleted,K.character,K.propertyName,K.macroName],color:Px},{tag:[K.function(K.variableName),K.labelName],color:NG},{tag:[K.color,K.constant(K.name),K.standard(K.name)],color:_x},{tag:[K.definition(K.name),K.separator],color:ad},{tag:[K.typeName,K.className,K.number,K.changed,K.annotation,K.modifier,K.self,K.namespace],color:EG},{tag:[K.operator,K.operatorKeyword,K.url,K.escape,K.regexp,K.link,K.special(K.string)],color:AG},{tag:[K.meta,K.comment],color:Gg},{tag:K.strong,fontWeight:"bold"},{tag:K.emphasis,fontStyle:"italic"},{tag:K.strikethrough,textDecoration:"line-through"},{tag:K.link,color:Gg,textDecoration:"underline"},{tag:K.heading,fontWeight:"bold",color:Px},{tag:[K.atom,K.bool,K.special(K.variableName)],color:_x},{tag:[K.processingInstruction,K.string,K.inserted],color:zG},{tag:K.invalid,color:QG}]),FG=[BG,FT(WG)];var VG=ze.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),HG=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:a="",basicSetup:s=!0}=e,l=[];switch(n&&l.unshift(Ac.of([qZ])),s&&(typeof s=="boolean"?l.unshift(wx()):l.unshift(wx(s))),a&&l.unshift(iH(a)),o){case"light":l.push(VG);break;case"dark":l.push(FG);break;case"none":break;default:l.push(o);break}return r===!1&&l.push(ze.editable.of(!1)),i&&l.push(Qt.readOnly.of(!0)),[...l]},XG=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class ZG{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(r){console.error("TimeoutLatch callback error:",r)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class Ix{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var Qp=null,qG=()=>typeof window>"u"?new Ix:(Qp||(Qp=new Ix),Qp),Mx=Ji.define(),GG=200,YG=[];function UG(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:a,extensions:s=YG,autoFocus:l,theme:c="light",height:u=null,minHeight:d=null,maxHeight:f=null,width:h=null,minWidth:p=null,maxWidth:m=null,placeholder:g="",editable:v=!0,readOnly:O=!1,indentWithTab:S=!0,basicSetup:x=!0,root:b,initialState:C}=t,[$,w]=J(),[P,_]=J(),[T,R]=J(),k=J(()=>({current:null}))[0],I=J(()=>({current:null}))[0],Q=ze.theme({"&":{height:u,minHeight:d,maxHeight:f,width:h,minWidth:p,maxWidth:m},"& .cm-scroller":{height:"100% !important"}}),M=ze.updateListener.of(z=>{if(z.docChanged&&typeof r=="function"&&!z.transactions.some(H=>H.annotation(Mx))){k.current?k.current.reset():(k.current=new ZG(()=>{if(I.current){var H=I.current;I.current=null,H()}k.current=null},GG),qG().add(k.current));var L=z.state.doc,F=L.toString();r(F,z)}i&&i(XG(z))}),E=HG({theme:c,editable:v,readOnly:O,placeholder:g,indentWithTab:S,basicSetup:x}),N=[M,Q,...E];return a&&typeof a=="function"&&N.push(ze.updateListener.of(a)),N=N.concat(s),Ti(()=>{if($&&!T){var z={doc:e,selection:n,extensions:N},L=C?Qt.fromJSON(C.json,z,C.fields):Qt.create(z);if(R(L),!P){var F=new ze({state:L,parent:$,root:b});_(F),o&&o(F,L)}}return()=>{P&&(R(void 0),_(void 0))}},[$,T]),be(()=>{t.container&&w(t.container)},[t.container]),be(()=>()=>{P&&(P.destroy(),_(void 0)),k.current&&(k.current.cancel(),k.current=null)},[P]),be(()=>{l&&P&&P.focus()},[l,P]),be(()=>{P&&P.dispatch({effects:gt.reconfigure.of(N)})},[c,s,u,d,f,h,p,m,g,v,O,S,x,r,a]),be(()=>{if(e!==void 0){var z=P?P.state.doc.toString():"";if(P&&e!==z){var L=k.current&&!k.current.isDone,F=()=>{P&&e!==P.state.doc.toString()&&P.dispatch({changes:{from:0,to:P.state.doc.toString().length,insert:e||""},annotations:[Mx.of(!0)]})};L?I.current=F:F()}}},[e,P]),{state:T,setState:R,view:P,setView:_,container:$,setContainer:w}}var KG=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],OO=Se((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:d="light",height:f,minHeight:h,maxHeight:p,width:m,minWidth:g,maxWidth:v,basicSetup:O,placeholder:S,indentWithTab:x,editable:b,readOnly:C,root:$,initialState:w}=t,P=GC(t,KG),_=U(null),{state:T,view:R,container:k,setContainer:I}=UG({root:$,value:r,autoFocus:u,theme:d,height:f,minHeight:h,maxHeight:p,width:m,minWidth:g,maxWidth:v,basicSetup:O,placeholder:S,indentWithTab:x,editable:b,readOnly:C,selection:i,onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,extensions:o,initialState:w});Yt(e,()=>({editor:_.current,state:T,view:R}),[_,k,T,R]);var Q=Ht(E=>{_.current=E,I(E)},[I]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var M=typeof d=="string"?"cm-theme-"+d:"cm-theme";return A("div",Ce({ref:Q,className:""+M+(n?" "+n:"")},P))});OO.displayName="CodeMirror";var Ex={};class of{constructor(e,n,r,i,o,a,s,l,c,u=0,d){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new of(e,[],n,r,r,0,[],0,i?new Ax(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,a=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==r)return;if(a.buffer[s-2]>=n){a.buffer[s-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let s=!1;for(let l=a;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;a>0&&this.buffer[a-2]>r;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=r,this.buffer[a+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:a}=this.p;(i>this.pos||n<=a.maxNode)&&(this.pos=i,a.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=a.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new of(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new JG(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,a;ol&1&&s==a)||i.push(n[o],a)}n=i}let r=[];for(let i=0;i>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let s=(a>>19)-o;if(s>1){let l=a&65535,c=this.stack.length-s*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return s<<19|65536|l}}else{let s=r(a,o+1);if(s!=null)return s}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ax{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class JG{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class af{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new af(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new af(this.stack,this.pos,this.index)}}function vl(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,s=!0),o+=l,s)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class sd{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Qx=new sd;class eY{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Qx,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;or.to:o>=r.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];o+=a.from-r.to,r=a}return o}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n=this.chunk2Pos&&rs.to&&(this.chunk2=this.chunk2.slice(0,s.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Qx,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class ds{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;Yk(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}ds.prototype.contextual=ds.prototype.fallback=ds.prototype.extend=!1;class Yg{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?vl(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,a=e.resolveOffset(1,1);if(Yk(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}Yg.prototype.contextual=ds.prototype.fallback=ds.prototype.extend=!1;class bo{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function Yk(t,e,n,r,i,o){let a=0,s=1<0){let p=t[h];if(l.allows(p)&&(e.token.value==-1||e.token.value==p||tY(p,e.token.value,i,o))){e.acceptToken(p);break}}let u=e.next,d=0,f=t[a+2];if(e.next<0&&f>d&&t[c+f*3-3]==65535){a=t[c+f*3-1];continue e}for(;d>1,p=c+h+(h<<1),m=t[p],g=t[p+1]||65536;if(u=g)d=h+1;else{a=t[p+2],e.advance();continue e}}break}}function Nx(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function tY(t,e,n,r){let i=Nx(n,r,e);return i<0||Nx(n,r,t)e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class nY{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?zx(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?zx(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(o instanceof zn){if(a==e){if(a=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+o.length}}}class rY{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new sd)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,a=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let f=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!u.extend&&(r=d,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new sd,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new sd,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let a=0;a=0&&r.p.parser.dialect.allows(s>>1)){s&1?e.extended=s>>1:e.value=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;oe.bufferLength*4?new nY(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;an)r.push(s);else{if(this.advanceStack(s,r,e))continue;{i||(i=[],o=[]),i.push(s);let l=this.tokens.getMainToken(s);o.push(l.value,l.end)}}break}}if(!r.length){let a=i&&aY(i);if(a)return Xr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Xr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(a)return Xr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(r.length>a)for(r.sort((s,l)=>l.score-s.score);r.length>a;)r.pop();r.some(s=>s.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let a=0;a500&&c.buffer.length>500)if((s.score-c.score||s.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(a--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let a=1;a ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let d=this.fragments.nodeAt(i);d;){let f=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(f>-1&&d.length&&(!c||(d.prop(Tt.contextHash)||0)==u))return e.useNode(d,f),Xr&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof zn)||d.children.length==0||d.positions[0]>0)break;let h=d.children[0];if(h instanceof zn&&d.positions[0]==0)d=h;else break}}let s=o.stateSlot(e.state,4);if(s>0)return e.reduce(s),Xr&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;ci?n.push(p):r.push(p)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Lx(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let a=0;a ":"";if(s.deadEnd&&(o||(o=!0,s.restart(),Xr&&console.log(u+this.stackID(s)+" (restarted)"),this.advanceFully(s,r))))continue;let d=s.split(),f=u;for(let h=0;d.forceReduce()&&h<10&&(Xr&&console.log(f+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));h++)Xr&&(f=this.stackID(d)+" -> ");for(let h of s.recoverByInsert(l))Xr&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>s.pos?(c==s.pos&&(c++,l=0),s.recoverByDelete(l,c),Xr&&console.log(u+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),Lx(s,r)):(!i||i.scoret;class Uk{constructor(e){this.start=e.start,this.shift=e.shift||zp,this.reduce=e.reduce||zp,this.reuse=e.reuse||zp,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class fc extends PT{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;se.topRules[s][1]),i=[];for(let s=0;s=0)o(u,l,s[c++]);else{let d=s[c+-u];for(let f=-u;f>0;f--)o(s[c++],l,d);c++}}}this.nodeSet=new Z0(n.map((s,l)=>jr.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=xT;let a=vl(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new ds(a,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new iY(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let a=i[o++],s=a&1,l=i[o++];if(s&&r)return l;for(let c=o+(a>>1);o0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=io(this.data,o+2);else break;i=n(io(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=io(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,a)=>a&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(fc.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(s=>s.from==r.external);if(!o)return r;let a=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=jx(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let a=n.indexOf(o);a>=0&&(r[a]=!0)}let i=null;for(let o=0;or)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,r)<<1|e}return t.get}const sY=316,lY=317,Dx=1,cY=2,uY=3,dY=4,fY=318,hY=320,pY=321,mY=5,gY=6,vY=0,Ug=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Kk=125,OY=59,Kg=47,bY=42,yY=43,SY=45,xY=60,CY=44,$Y=63,wY=46,PY=91,_Y=new Uk({start:!1,shift(t,e){return e==mY||e==gY||e==hY?t:e==pY},strict:!1}),TY=new bo((t,e)=>{let{next:n}=t;(n==Kk||n==-1||e.context)&&t.acceptToken(fY)},{contextual:!0,fallback:!0}),kY=new bo((t,e)=>{let{next:n}=t,r;Ug.indexOf(n)>-1||n==Kg&&((r=t.peek(1))==Kg||r==bY)||n!=Kk&&n!=OY&&n!=-1&&!e.context&&t.acceptToken(sY)},{contextual:!0}),RY=new bo((t,e)=>{t.next==PY&&!e.context&&t.acceptToken(lY)},{contextual:!0}),IY=new bo((t,e)=>{let{next:n}=t;if(n==yY||n==SY){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(Dx);t.acceptToken(r?Dx:cY)}}else n==$Y&&t.peek(1)==wY&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(uY))},{contextual:!0});function Lp(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const MY=new bo((t,e)=>{if(t.next!=xY||!e.dialectEnabled(vY)||(t.advance(),t.next==Kg))return;let n=0;for(;Ug.indexOf(t.next)>-1;)t.advance(),n++;if(Lp(t.next,!0)){for(t.advance(),n++;Lp(t.next,!1);)t.advance(),n++;for(;Ug.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==CY)return;for(let r=0;;r++){if(r==7){if(!Lp(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(dY,-n)}),EY=U0({"get set async static":K.modifier,"for while do if else switch try catch finally return throw break continue default case defer":K.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":K.operatorKeyword,"let var const using function class extends":K.definitionKeyword,"import export from":K.moduleKeyword,"with debugger new":K.keyword,TemplateString:K.special(K.string),super:K.atom,BooleanLiteral:K.bool,this:K.self,null:K.null,Star:K.modifier,VariableName:K.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":K.function(K.variableName),VariableDefinition:K.definition(K.variableName),Label:K.labelName,PropertyName:K.propertyName,PrivatePropertyName:K.special(K.propertyName),"CallExpression/MemberExpression/PropertyName":K.function(K.propertyName),"FunctionDeclaration/VariableDefinition":K.function(K.definition(K.variableName)),"ClassDeclaration/VariableDefinition":K.definition(K.className),"NewExpression/VariableName":K.className,PropertyDefinition:K.definition(K.propertyName),PrivatePropertyDefinition:K.definition(K.special(K.propertyName)),UpdateOp:K.updateOperator,"LineComment Hashbang":K.lineComment,BlockComment:K.blockComment,Number:K.number,String:K.string,Escape:K.escape,ArithOp:K.arithmeticOperator,LogicOp:K.logicOperator,BitOp:K.bitwiseOperator,CompareOp:K.compareOperator,RegExp:K.regexp,Equals:K.definitionOperator,Arrow:K.function(K.punctuation),": Spread":K.punctuation,"( )":K.paren,"[ ]":K.squareBracket,"{ }":K.brace,"InterpolationStart InterpolationEnd":K.special(K.brace),".":K.derefOperator,", ;":K.separator,"@":K.meta,TypeName:K.typeName,TypeDefinition:K.definition(K.typeName),"type enum interface implements namespace module declare":K.definitionKeyword,"abstract global Privacy readonly override":K.modifier,"is keyof unique infer asserts":K.operatorKeyword,JSXAttributeValue:K.attributeValue,JSXText:K.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":K.angleBracket,"JSXIdentifier JSXNameSpacedName":K.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":K.attributeName,"JSXBuiltin/JSXIdentifier":K.standard(K.tagName)}),AY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},QY={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},NY={__proto__:null,"<":193},zY=fc.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jv'#JvO%[QlO'#JvOOQO'#Jy'#JyOOQO'#Ih'#IhOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J}'#J}OC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jx'#JxODlQpO'#JyOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CD})CD}OOOO'#I`'#I`OFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ia'#IaOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Ic'#IcOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IdOGyQ`O'#JtOIxQ!fO'#JtO+}QlO'#JtOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KTOKPQ`O'#KSOKPQ`O'#KSOKXQ`O,5;^OK^Q`O'#KROOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KQONtQ`O'#KPO9eQ`O'#KPO! YQ`O'#KPO! bQ`O,5;]O! gQ`O'#KPO!#lQ!fO'#JsOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#Jz'#JzOOQO-EtOOQ['#Jh'#JhOOQ[,5>u,5>uOOQ[-E<]-E<]O!TO`QlO,5>VO!LOQ`O,5>XO`QlO,5>ZO!LTQ`O,5>^O!LYQlO,5>dOOQ[,5>j,5>jO%[QlO,5>jO9uQ!0LrO,5>lOOQ[,5>n,5>nO#!dQ`O,5>nOOQ[,5>p,5>pO#!dQ`O,5>pOOQ[,5>r,5>rO##QQpO'#D_O%[QlO'#JvO##sQpO'#JvO##}QpO'#DmO#$`QpO'#DmO#&qQlO'#DmO#&xQ`O'#JuO#'QQ`O,5:WO#'VQ`O'#EtO#'eQ`O'#KUO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CUQpO,5;YO!C^QMhO,5;YO:dQMhO,5;YO#(`Q`O,5@bO#(eQ07dO,5:sOOQO-EPO$6^Q`O,5>POOQ[1G3i1G3iO`QlO1G3iOOQ[1G3o1G3oOOQ[1G3q1G3qO?TQ`O1G3sO$6cQlO1G3uO$:gQlO'#HtOOQ[1G3x1G3xO$:tQ`O'#HzO?YQ`O'#H|OOQ[1G4O1G4OO$:|QlO1G4OO9uQ!0LrO1G4UOOQ[1G4W1G4WOOQ!0Lb'#G_'#G_O9uQ!0LrO1G4YO9uQ!0LrO1G4[O$?TQ`O,5@bO!)[QlO,5;`O9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CUQpO,5:XO$?YQ?MtO,5:XOOQO,5;`,5;`O$?dQpO'#IeO$?zQ`O,5@aOOQ!0Lf1G/r1G/rO$@SQpO'#IkO$@^Q`O,5@pOOQ!0Lb1G0y1G0yO#$`QpO,5:XOOQO'#Ig'#IgO$@fQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CUQpO1G0tO!C^QMhO1G0tOOQ!0Lb1G5|1G5|O!ByQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@mQ!0LrO1G0mO$@xQ!0LrO1G0mO!CUQpO1G0^ODWQpO1G0^O$AWQ!0LrO1G0mOOQO1G0^1G0^O$AlQ!0MxO1G0mPOOO-E<[-E<[POOO1G.h1G.hOOOO1G/i1G/iO$AvQ!bO,5QQpO,5@}OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>]Q`O7+$VO%[QlO1G6lO%[QlO1G6mO%>bQ!0LrO1G6lO%>lQlO1G3kO%>sQ`O1G3kO%>xQlO1G3kOOQ[7+)T7+)TO9uQ!0LrO7+)_O`QlO7+)aOOQ['#Kh'#KhOOQ['#JS'#JSO%?PQlO,5>`OOQ[,5>`,5>`O%[QlO'#HuO%?^Q`O'#HwOOQ[,5>f,5>fO9eQ`O,5>fOOQ[,5>h,5>hOOQ[7+)j7+)jOOQ[7+)p7+)pOOQ[7+)t7+)tOOQ[7+)v7+)vO%?cQpO1G5|O%?}Q?MtO1G0zO%@XQ`O1G0zOOQO1G/s1G/sO%@dQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?P,5?POOQO-ERQ`O7+,WO&>WQ`O7+,XO%[QlO7+,WO%[QlO7+,XOOQ[7+)V7+)VO&>]Q`O7+)VO&>bQlO7+)VO&>iQ`O7+)VOOQ[<nQ`O,5>aOOQ[,5>c,5>cO&>sQ`O1G4QO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&>xQ?MtO1G6ZO?YQ`O7+%_OOQ!0Lf<yQ?MvO,5?aO'@|Q?MvO,5?cO'CPQ?MvO7+'|O'DuQMjOG27TOOQO<VO!l$xO#jROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]$_Oa$qa'z$qa'w$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)dO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Og(pP~P!,TO!Q)iO!g)hO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)hO!_({X$Z({X$]({X$_({X$f({X~O!Q)iO~P!.^O!Q)iO!_({X$Z({X$]({X$_({X$f({X~O!_)kO$Z)oO$])jO$_)jO$f)pO~O![)sO~P!)[O$]$hO$_$gO$f)wO~On$zX!Q$zX#S$zX'y$zX(y$zX(z$zX~OgmXg$zXnmX!]mX#`mX~P!0SOx)yO(b)zO(c)|O~On*VO!Q*OO'y*PO(y$}O(z%PO~Og)}O~P!1WOg*WO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!OVO!l$xO#jVO!l$xO#jROe!iOpkOrPO(VTO(YUO(aVO(o[O~O(T=QO~P#$qO!]-]O!^(iX~O!^-_O~O!g-VO#`-UO!]#hX!^#hX~O!]-`O!^(xX~O!^-bO~O!c-cO!d-cO(U!lO~P#$`O!^-fO~P'_On-iO!_'`O~O!Y-nO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(U!{a(V!{a(Y!{a(e!{a(o!{a~P!#vO!p-sO#`-qO~PChO!c-uO!d-uO(U!lO~PDWOa%nO#`-qO'z%nO~Oa%nO!g#vO#`-qO'z%nO~Oa%nO!g#vO!p-sO#`-qO'z%nO(r'pO~O(P'xO(Q'xO(R-zO~Ov-{O~O!Y'Wa!]'Wa~P!:tO![.PO!Y'WX!]'WX~P%[O!](VO!Y(ha~O!Y(ha~PHRO!](^O!Y(va~O!S%hO![.TO!_%iO(T%gO!Y'^X!]'^X~O#`.VO!](ta!k(taa(ta'z(ta~O!g#vO~P#,wO!](jO!k(sa~O!S%hO!_%iO#j.ZO(T%gO~Op.`O!S%hO![.]O!_%iO!|]O#i._O#j.]O(T%gO!]'aX!k'aX~OR.dO!l#xO~Oh%VOn.gO!_'`O%i.fO~Oa#ci!]#ci'z#ci'w#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:tOn>]O!Q*OO'y*PO(y$}O(z%PO~O#k#_aa#_a#`#_a'z#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#k(`XP(`XR(`X[(`Xa(`Xj(`Xr(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X'z(`X(a(`X(r(`X!k(`X!Y(`X'w(`Xv(`X!_(`X%i(`X!g(`X~P!6kO!].tO!k(kX~P!:tO!k.wO~O!Y.yO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#3cO#n$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#6QO#r$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(aVOa#mi!]#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(aVO(z#}Oa#mi!]#mi#z#mi#{#mi'z#mi(r#mi(y#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#;VO#x#mi~P#;VO#v$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(aVO(y#|O(z#}Oa#mi!]#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#={O#z$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X!]]X!^]X~O$O]X~P#@jOP$[OR#zO[]O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P#EyO!]/POg(pX~P!1WOg/RO~Oa$Pi!]$Pi'z$Pi'w$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:tO$]/SO$_/SO~O$]/TO$_/TO~O!g)hO#`/UO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/VO~O!_)kO$Z/XO$])jO$_)jO$f/YO~O!]VO!l$xO#j^O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P&,QO#S$dOP(`XR(`X[(`Xj(`Xn(`Xr(`X!Q(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X$O(`X'y(`X(a(`X(r(`X(y(`X(z(`X!](`X!^(`X~O$O$Pi!]$Pi!^$Pi~P#BwO$O!ri!^!ri~P$+oOg']a!]']a~P!1WO!^7nO~O!]'da!^'da~P#BwO!Y7oO~P#/sO!g#vO(r'pO!]'ea!k'ea~O!]/pO!k)Oi~O!]/pO!g#vO!k)Oi~Og$|q!]$|q#`$|q$O$|q~P!1WO!Y'ga!]'ga~P#/sO!g7vO~O!]/yO!Y)Pi~P#/sO!]/yO!Y)Pi~O!Y7yO~Oh%VOr8OO!l%eO(r'pO~Oj8QO!g#vO~Or8TO!g#vO(r'pO~O!Q*OO'y*PO(z%POn'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P&5RO!Q*OO'y*POn'la(y'la(z'la!]'la#`'la~Og'la$O'la~P&5tOg(_q!](_q~P!1WO#`8VOg(_q!](_q~P!1WO!Y8WO~Og%Oq!]%Oq#`%Oq$O%Oq~P!1WOa$oy!]$oy'z$oy'w$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:tO!g6rO~O!]5[O!_)Qa~O!_'`OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(a$Ta(r$Ta(y$Ta(z$Ta~O%i7WO~P&8fO%^8[Oa%[i!_%[i'z%[i!]%[i~Oa#cy!]#cy'z#cy'w#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:tO[8^O~Ob8`O(T+qO(VTO(YUO~O!]1TO!^)Xi~O`8dO~O(e(|O!]'pX!^'pX~O!]5uO!^)Ua~O!^8nO~P%;eO(o!sO~P$&YO#[8oO~O!_1oO~O!_1oO%i8qO~On8tO!_1oO%i8qO~O[8yO!]'sa!^'sa~O!]1zO!^)Vi~O!k8}O~O!k9OO~O!k9RO~O!k9RO~P%[Oa9TO~O!g9UO~O!k9VO~O!](wi!^(wi~P#BwOa%nO#`9_O'z%nO~O!](ty!k(tya(ty'z(ty~P!:tO!](jO!k(sy~O%i9bO~P&8fO!_'`O%i9bO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'z$|q(a$|q(r$|q!k$|q!Y$|q'w$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/sO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'z'ja(a'ja(r'ja!k'ja!Y'ja'w'jav'ja!_'ja%i'ja!g'ja~P&5RO#k'laP'laR'la['laa'laj'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la'z'la(a'la(r'la!k'la!Y'la'w'lav'la!_'la%i'la!g'la~P&5tO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'z%Oq(a%Oq(r%Oq!k%Oq!Y%Oq'w%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/sO!]'Yi!k'Yi~P!:tO$O#cq!]#cq!^#cq~P#BwO(y$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(a%aa(r%aa!]%aa!^%aa~On%aa!Q%aa'y%aa(z%aa~P&IyO(z%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(a%ca(r%ca!]%ca!^%ca~On%ca!Q%ca'y%ca(y%ca~P&LQOn>^O!Q*OO'y*PO(z%PO~P&IyOn>^O!Q*OO'y*PO(y$}O~P&LQOR0kO!Q0kO!S0lO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'y}a(a}a(r}a(y}a(z}a!]}a!^}a~O!Q*OO'y*POP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(a$sa(r$sa(y$sa(z$sa!]$sa!^$sa~O!Q*OO'y*POP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(a$ua(r$ua(y$ua(z$ua!]$ua!^$ua~On>^O!Q*OO'y*PO(y$}O(z%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(a%Ta(r%Ta!]%Ta!^%Ta~P''VO$O$mq!]$mq!^$mq~P#BwO$O$oq!]$oq!^$oq~P#BwO!^9oO~O$O9pO~P!1WO!g#vO!]'ei!k'ei~O!g#vO(r'pO!]'ei!k'ei~O!]/pO!k)Oq~O!Y'gi!]'gi~P#/sO!]/yO!Y)Pq~Or9wO!g#vO(r'pO~O[9yO!Y9xO~P#/sO!Y9xO~Oj:PO!g#vO~Og(_y!](_y~P!1WO!]'na!_'na~P#/sOa%[q!_%[q'z%[q!]%[q~P#/sO[:UO~O!]1TO!^)Xq~O`:YO~O#`:ZO!]'pa!^'pa~O!]5uO!^)Ui~P#BwO!S:]O~O!_1oO%i:`O~O(VTO(YUO(e:eO~O!]1zO!^)Vq~O!k:hO~O!k:iO~O!k:jO~O!k:jO~P%[O#`:mO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%i:rO~P&8fO!_'`O%i:rO~O$O#|y!]#|y!^#|y~P#BwOP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(a$|i(r$|i!]$|i!^$|i~P''VO!Q*OO'y*PO(z%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(a'ia(r'ia(y'ia!]'ia!^'ia~O!Q*OO'y*POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(a'ka(r'ka(y'ka(z'ka!]'ka!^'ka~O(y$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'y%ai(a%ai(r%ai(z%ai!]%ai!^%ai~O(z%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'y%ci(a%ci(r%ci(y%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#BwO$O#cy!]#cy!^#cy~P#BwO!g#vO!]'eq!k'eq~O!]/pO!k)Oy~O!Y'gq!]'gq~P#/sOr:|O!g#vO(r'pO~O[;QO!Y;PO~P#/sO!Y;PO~Og(_!R!](_!R~P!1WOa%[y!_%[y'z%[y!]%[y~P#/sO!]1TO!^)Xy~O!]5uO!^)Uq~O(T;XO~O!_1oO%i;[O~O!k;_O~O%i;dO~P&8fOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(a$|q(r$|q!]$|q!^$|q~P''VO!Q*OO'y*PO(z%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(a'ja(r'ja(y'ja!]'ja!^'ja~O!Q*OO'y*POP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la$O'la(a'la(r'la(y'la(z'la!]'la!^'la~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(a%Oq(r%Oq!]%Oq!^%Oq~P''VOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!1WO!Y;hO~P#/sOr;iO!g#vO(r'pO~O[;kO!Y;hO~P#/sO!]'pq!^'pq~P#BwO!]#h!Z!^#h!Z~P#BwO#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'z%e!Z(a%e!Z(r%e!Z!k%e!Z!Y%e!Z'w%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/sOr;tO!g#vO(r'pO~O!Y;uO~P#/sOr;|O!g#vO(r'pO~O!Y;}O~P#/sOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(a%e!Z(r%e!Z!]%e!Z!^%e!Z~P''VOrROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]WO!l$xO#jgPPP!>oI[PPPPPPPPP!BOP!C]PPI[!DnPI[PI[I[I[I[I[PI[!FQP!I[P!LbP!Lf!Lp!Lt!LtP!IXP!Lx!LxP#!OP#!SI[PI[#!Y#%_CjA^PA^PA^A^P#&lA^A^#)OA^#+vA^#.SA^A^#.r#1W#1W#1]#1f#1W#1qPP#1WPA^#2ZA^#6YA^A^6mPPP#:_PPP#:x#:xP#:xP#;`#:xPP#;fP#;]P#;]#;y#;]#P#>V#>]#>k#>q#>{#?R#?]#?c#?s#?y#@k#@}#AT#AZ#Ai#BO#Cs#DR#DY#Et#FS#Gt#HS#HY#H`#Hf#Hp#Hv#H|#IW#Ij#IpPPPPPPPPPPP#IvPPPPPPP#Jk#Mx$ b$ i$ qPPP$']P$'f$*_$0x$0{$1O$1}$2Q$2X$2aP$2g$2jP$3W$3[$4S$5b$5g$5}PP$6S$6Y$6^$6a$6e$6i$7e$7|$8e$8i$8l$8o$8y$8|$9Q$9UR!|RoqOXst!Z#d%m&r&t&u&w,s,x2[2_Y!vQ'`-e1o5{Q%tvQ%|yQ&T|Q&j!VS'W!e-]Q'f!iS'l!r!yU*k$|*Z*oQ+o%}S+|&V&WQ,d&dQ-c'_Q-m'gQ-u'mQ0[*qQ1b,OQ1y,eR<{SU+P%]S!S!nQ!r!v!y!z$|'W'_'`'l'm'n*k*o*q*r-]-c-e-u0[0_1o5{5}%[$ti#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^Q&X|Q'U!eS'[%i-`Q+t&PQ,P&WQ,f&gQ0n+SQ1Y+uQ1_+{Q2Q,jQ2R,kQ5f1TQ5o1aQ6[1zQ6_1|Q6`2PQ8`5gQ8c5lQ8|6bQ:X8dQ:f8yQ;V:YR<}*ZrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R,h&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'b'r(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mR>S[#]WZ#W#Z'X(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ%wxQ%{yW&Q|&V&W,OQ&_!TQ'c!hQ'e!iQ(q#sS+n%|%}Q+r&PQ,_&bQ,c&dS-l'f'gQ.i(rQ1R+oQ1X+uQ1Z+vQ1^+zQ1t,`S1x,d,eQ2|-mQ5e1TQ5i1WQ5n1`Q6Z1yQ8_5gQ8b5kQ8f5pQ:T8^R;T:U!U$zi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y!^%yy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{Q+h%wQ,T&[Q,W&]Q,b&dQ.h(qQ1s,_U1w,c,d,eQ3e.iQ6U1tS6Y1x1yQ8x6Z#f>T#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o>UPS&[!Q&iQ&]!RQ&^!SU*}%[%d=sR,R&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^T)z$u){V+P%]S$i$^c#Y#e%q%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.|.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SQ'Y!eR2q-]!W!nQ!e!r!v!y!z$|'W'_'`'l'm'n*Z*k*o*q*r-]-c-e-u0[0_1o5{5}R1l,ZnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&y!^Q'v!xS(s#u<^Q+l%zQ,]&_Q,^&aQ-j'dQ-w'oS.r(x=PS0q+X=ZQ1P+mQ1n,[Q2c,zQ2e,{Q2m-WQ2z-kQ2}-oS5Y0r=eQ5a1QS5d1S=fQ6t2oQ6x2{Q6}3SQ8]5bQ9Y6vQ9Z6yQ9^7OR:l9V$d$]c#Y#e%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SS#q]SU$fd)_,mS(p#p'iU*v%R(w4OU0m+O.n7gQ5^0xQ7V3`Q9d7YR:s9em!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}Q't!uS(f#g2US-s'k'wQ/s*]Q0R*jQ3U-vQ4f/tQ4r0TQ4s0UQ4x0^Q7r4`S7}4t4vS8R4y4{Q9r7sQ9v7yQ9{8OQ:Q8TS:{9w9xS;g:|;PS;s;h;iS;{;t;uSSR=o>R%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Q%fj!^%xy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{S&Oz!jQ+k%yQ,a&dW1v,b,c,d,eU6X1w1x1yS8w6Y6ZQ:d8x!r=j$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ=t>QR=u>R%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Y#bWZ#W#Z(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ,n&o!p=k$Z$n)s-U-X/V2p4T5w6s:Z:mSR=n'XU']!e%i*ZR2s-`%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ,m&oQ0x+gQ3`.gQ7Y3dR9e7[!b$Tc#Y%q(S(Y(t(y)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:oS)^)q-Z.|2k2n3p4P4X6u7b7k7l8k9X9g9m9n;W;`=vQ>X>ZR>Y>['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mSS$oh$pR4U/U'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$kf$qQ$ifS)j$l)nR)v$qT$jf$qT)l$l)n'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$oh$pQ$rhR)u$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_!s>Q$Z$n'X)s-U-X/V2p4T5w6s:Z:mS#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'b)O)s*i+]+g,p,s,x-i.g/V/n0]0l1r2S2T2V2X2[2_2a3d4T4z6T6e6f6i7[8t9T!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^Q+T%aQ/c*Oo4OP>X>YQ*c$zU*l$|*Z*oQ+U%bQ0W*m#f=q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^n=rTQ=x>UQ=y>VR=z>W!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o4OP>X>Y>]>^Q,U&]Q1h,WQ5s1gR8h5tV*n$|*Z*oU*n$|*Z*oT5z1o5{S0P*i/nQ4w0]T8S4z:]Q+j%xQ0V*lQ1O+kQ1u,aQ6W1vQ8v6XQ:c8wR;^:d!U%Oi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Yx*R$v)e*S*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>OS0`*t0a#f]>^nZ>[`=T3}7c7f7j9h:t:w;yS=_.l3iT=`7e9k!U%Qi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y|*T$v)e*U*t+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>OS0b*u0c#f]>^nZ>[d=V3}7d7e7j9h9i:t:u:w;yS=a.m3jT=b7f9lrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q&f!UR,p&ornOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R&f!UQ,Y&^R1d,RsnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q1p,_S6R1s1tU8p6P6Q6US:_8r8sS;Y:^:aQ;m;ZR;w;nQ&m!VR,i&iR6_1|R:f8yW&Q|&V&W,OR1Z+vQ&r!WR,s&sR,y&xT2],x2_R,}&yQ,|&yR2f,}Q'y!{R-y'ySsOtQ#dXT%ps#dQ#OTR'{#OQ#RUR'}#RQ){$uR/`){Q#UVR(Q#UQ#XWU(W#X(X.QQ(X#YR.Q(YQ-^'YR2r-^Q.u(yS3m.u3nR3n.vQ-e'`R2v-eY!rQ'`-e1o5{R'j!rQ/Q)eR4S/QU#_W%h*YU(_#_(`.RQ(`#`R.R(ZQ-a']R2t-at`OXst!V!Z#d%m&i&k&r&t&u&w,s,x2[2_S#hZ%eU#r`#h.[R.[(jQ(k#jQ.X(gW.a(k.X3X7RQ3X.YR7R3YQ)n$lR/W)nQ$phR)t$pQ$`cU)a$`-|O>Z>[Q/z*eU4k/z4m7xQ4m/|R7x4lS*o$|*ZR0Y*ox*S$v)e*t*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>O!d.j(u)c*[*e.l.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/h*S.j7ca7c3}7e7f7j9h:t:w;yQ0a*tQ3i.lU4}0a3i9kR9k7e|*U$v)e*t*u+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>O!h.k(u)c*[*e.l.m.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/j*U.k7de7d3}7e7f7j9h9i:t:u:w;yQ0c*uQ3j.mU5P0c3j9lR9l7fQ*z%UR0g*zQ5]0vR8Y5]Q+_%kR0u+_Q5v1jS8j5v:[R:[8kQ,[&_R1m,[Q5{1oR8m5{Q1{,fS6]1{8zR8z6_Q1U+rW5h1U5j8a:VQ5j1XQ8a5iR:V8bQ+w&QR1[+wQ2_,xR6m2_YrOXst#dQ&v!ZQ+a%mQ,r&rQ,t&tQ,u&uQ,w&wQ2Y,sS2],x2_R6l2[Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'q!uQ+`%lQ+l%zQ,Q&XQ,h&mQ-P&|W-p'k's't'wQ-w'oQ0X*nQ1P+mQ1c,PS2O,i,lQ2g-OQ2h-RQ2i-SQ2}-oW3P-r-s-v-xQ5a1QQ5m1_Q5q1eQ6V1uQ6a2QQ6k2ZU6z3O3R3UQ6}3SQ8]5bQ8e5oQ8g5rQ8l5zQ8u6WQ8{6`S9[6{7PQ9^7OQ:W8cQ:b8vQ:g8|Q:n9]Q;U:XQ;]:cQ;a:oQ;l;VR;o;^Q%zyQ'd!iQ'o!uU+m%{%|%}Q-W'VU-k'e'f'gS-o'k'uQ0Q*jS1Q+n+oQ2o-YS2{-l-mQ3S-tS4p0R0UQ5b1RQ6v2uQ6y2|Q7O3TU7{4r4s4vQ9z7}R;O9{S$wi>PR*{%VU%Ui%V>PR0f*yQ$viS(u#v+iS)c$b$cQ)e$dQ*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.lPQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.nSR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:_Y,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[EY],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Wp(Z!b'|0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(X#S$i&j'}0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Wp(Z!b'}0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(V':f$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Wp(Z!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Z!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(WpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(WpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Wp(Z!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$i&j(Z!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Z!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Z!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Z!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Z!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-v$?V_!^(CdvBr$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Wp(Z!b'|0/l$]#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[kY,RY,IY,MY,2,3,4,5,6,7,8,9,10,11,12,13,14,TY,new Yg("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Yg("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>AY[t]||-1},{term:343,get:t=>QY[t]||-1},{term:95,get:t=>NY[t]||-1}],tokenPrec:15201}),Jk=[Ir("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ir("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ir("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ir("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Ir("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Ir(`try { + `]:Object.assign(Object.assign({},VC(t)),{marginInlineStart:t.marginXXS})}),rW(t)),iW(t)),oW()),{"&-rtl":{direction:"rtl"}})}},sW=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),s_=Ft("Typography",aW,sW),lW=t=>{const{prefixCls:e,"aria-label":n,className:r,style:i,direction:o,maxLength:a,autoSize:s=!0,value:l,onSave:c,onCancel:u,onEnd:d,component:f,enterIcon:h=b(K9,null)}=t,m=ne(null),p=ne(!1),g=ne(null),[O,v]=te(l);ye(()=>{v(l)},[l]),ye(()=>{var M;if(!((M=m.current)===null||M===void 0)&&M.resizableTextArea){const{textArea:Q}=m.current.resizableTextArea;Q.focus();const{length:E}=Q.value;Q.setSelectionRange(E,E)}},[]);const y=({target:M})=>{v(M.value.replace(/[\n\r]/g,""))},S=()=>{p.current=!0},x=()=>{p.current=!1},$=({keyCode:M})=>{p.current||(g.current=M)},C=()=>{c(O.trim())},P=({keyCode:M,ctrlKey:Q,altKey:E,metaKey:k,shiftKey:z})=>{g.current!==M||p.current||Q||E||k||z||(M===ze.ENTER?(C(),d==null||d()):M===ze.ESC&&u())},w=()=>{C()},[_,R,I]=s_(e),T=U(e,`${e}-edit-content`,{[`${e}-rtl`]:o==="rtl",[`${e}-${f}`]:!!f},r,R,I);return _(b("div",{className:T,style:i},b(VP,{ref:m,maxLength:a,value:O,onChange:y,onKeyDown:$,onKeyUp:P,onCompositionStart:S,onCompositionEnd:x,onBlur:w,"aria-label":n,rows:1,autoSize:s}),h!==null?lr(h,{className:`${e}-edit-content-confirm`}):null))};var cW=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=US[e.format]||US.default;window.clipboardData.setData(d,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=fW("message"in e?e.message:dW),window.prompt(r,t)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var mW=hW;const pW=D$(mW);var gW=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})};const vW=({copyConfig:t,children:e})=>{const[n,r]=te(!1),[i,o]=te(!1),a=ne(null),s=()=>{a.current&&clearTimeout(a.current)},l={};t.format&&(l.format=t.format),ye(()=>s,[]);const c=bn(u=>gW(void 0,void 0,void 0,function*(){var d;u==null||u.preventDefault(),u==null||u.stopPropagation(),o(!0);try{const f=typeof t.text=="function"?yield t.text():t.text;pW(f||a9(e,!0).join("")||"",l),o(!1),r(!0),s(),a.current=setTimeout(()=>{r(!1)},3e3),(d=t.onCopy)===null||d===void 0||d.call(t,u)}catch(f){throw o(!1),f}}));return{copied:n,copyLoading:i,onClick:c}};function dm(t,e){return ve(()=>{const n=!!t;return[n,Object.assign(Object.assign({},e),n&&typeof t=="object"?t:null)]},[t])}const OW=t=>{const e=ne(void 0);return ye(()=>{e.current=t}),e.current},bW=(t,e,n)=>ve(()=>t===!0?{title:e??n}:en(t)?{title:t}:typeof t=="object"?Object.assign({title:e??n},t):{title:t},[t,e,n]);var yW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,component:r="article",className:i,rootClassName:o,setContentRef:a,children:s,direction:l,style:c}=t,u=yW(t,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:d,direction:f,className:h,style:m}=Zn("typography"),p=l??f,g=a?vr(e,a):e,O=d("typography",n),[v,y,S]=s_(O),x=U(O,h,{[`${O}-rtl`]:p==="rtl"},i,o,y,S),$=Object.assign(Object.assign({},m),c);return v(b(r,Object.assign({className:x,style:$,ref:g},u),s))});var SW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},xW=function(e,n){return b(Mt,xe({},e,{ref:n,icon:SW}))},$W=Se(xW);function YS(t){return t===!1?[!1,!1]:Array.isArray(t)?t:[t]}function fm(t,e,n){return t===!0||t===void 0?e:t||n&&e}function CW(t){const e=document.createElement("em");t.appendChild(e);const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return t.removeChild(e),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const H0=t=>["string","number"].includes(typeof t),wW=({prefixCls:t,copied:e,locale:n,iconOnly:r,tooltips:i,icon:o,tabIndex:a,onCopy:s,loading:l})=>{const c=YS(i),u=YS(o),{copied:d,copy:f}=n??{},h=e?d:f,m=fm(c[e?1:0],h),p=typeof m=="string"?m:h;return b(on,{title:m},b("button",{type:"button",className:U(`${t}-copy`,{[`${t}-copy-success`]:e,[`${t}-copy-icon-only`]:r}),onClick:s,"aria-label":p,tabIndex:a},e?fm(u[1],b(Ad,null),!0):fm(u[0],b(l?wc:$W,null),!0)))},pu=Se(({style:t,children:e},n)=>{const r=ne(null);return Jt(n,()=>({isExceed:()=>{const i=r.current;return i.scrollHeight>i.clientHeight},getHeight:()=>r.current.clientHeight})),b("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},t)},e)}),PW=t=>t.reduce((e,n)=>e+(H0(n)?String(n).length:1),0);function KS(t,e){let n=0;const r=[];for(let i=0;ie){const c=e-n;return r.push(String(o).slice(0,c)),r}r.push(o),n=l}return t}const hm=0,mm=1,pm=2,gm=3,JS=4,gu={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function _W(t){const{enableMeasure:e,width:n,text:r,children:i,rows:o,expanded:a,miscDeps:s,onEllipsis:l}=t,c=ve(()=>sr(r),[r]),u=ve(()=>PW(c),[r]),d=ve(()=>i(c,!1),[r]),[f,h]=te(null),m=ne(null),p=ne(null),g=ne(null),O=ne(null),v=ne(null),[y,S]=te(!1),[x,$]=te(hm),[C,P]=te(0),[w,_]=te(null);Lt(()=>{$(e&&n&&u?mm:hm)},[n,r,o,e,c]),Lt(()=>{var M,Q,E,k;if(x===mm){$(pm);const z=p.current&&getComputedStyle(p.current).whiteSpace;_(z)}else if(x===pm){const z=!!(!((M=g.current)===null||M===void 0)&&M.isExceed());$(z?gm:JS),h(z?[0,u]:null),S(z);const L=((Q=g.current)===null||Q===void 0?void 0:Q.getHeight())||0,B=o===1?0:((E=O.current)===null||E===void 0?void 0:E.getHeight())||0,F=((k=v.current)===null||k===void 0?void 0:k.getHeight())||0,H=Math.max(L,B+F);P(H+1),l(z)}},[x]);const R=f?Math.ceil((f[0]+f[1])/2):0;Lt(()=>{var M;const[Q,E]=f||[0,0];if(Q!==E){const z=(((M=m.current)===null||M===void 0?void 0:M.getHeight())||0)>C;let L=R;E-Q===1&&(L=z?Q:E),h(z?[Q,L]:[L,E])}},[f,R]);const I=ve(()=>{if(!e)return i(c,!1);if(x!==gm||!f||f[0]!==f[1]){const M=i(c,!1);return[JS,hm].includes(x)?M:b("span",{style:Object.assign(Object.assign({},gu),{WebkitLineClamp:o})},M)}return i(a?c:KS(c,f[0]),y)},[a,x,f,c].concat(Ce(s))),T={width:n,margin:0,padding:0,whiteSpace:w==="nowrap"?"normal":"inherit"};return b(Qt,null,I,x===pm&&b(Qt,null,b(pu,{style:Object.assign(Object.assign(Object.assign({},T),gu),{WebkitLineClamp:o}),ref:g},d),b(pu,{style:Object.assign(Object.assign(Object.assign({},T),gu),{WebkitLineClamp:o-1}),ref:O},d),b(pu,{style:Object.assign(Object.assign(Object.assign({},T),gu),{WebkitLineClamp:1}),ref:v},i([],!0))),x===gm&&f&&f[0]!==f[1]&&b(pu,{style:Object.assign(Object.assign({},T),{top:400}),ref:m},i(KS(c,R),!0)),x===mm&&b("span",{style:{whiteSpace:"inherit"},ref:p}))}const TW=({enableEllipsis:t,isEllipsis:e,children:n,tooltipProps:r})=>!(r!=null&&r.title)||!t?n:b(on,Object.assign({open:e?void 0:!1},r),n);var RW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const{prefixCls:r,className:i,style:o,type:a,disabled:s,children:l,ellipsis:c,editable:u,copyable:d,component:f,title:h}=t,m=RW(t,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:p,direction:g}=he(lt),[O]=Ii("Text"),v=ne(null),y=ne(null),S=p("typography",r),x=pn(m,e1),[$,C]=dm(u),[P,w]=Pn(!1,{value:C.editing}),{triggerType:_=["icon"]}=C,R=_e=>{var Pe;_e&&((Pe=C.onStart)===null||Pe===void 0||Pe.call(C)),w(_e)},I=OW(P);Lt(()=>{var _e;!P&&I&&((_e=y.current)===null||_e===void 0||_e.focus())},[P]);const T=_e=>{_e==null||_e.preventDefault(),R(!0)},M=_e=>{var Pe;(Pe=C.onChange)===null||Pe===void 0||Pe.call(C,_e),R(!1)},Q=()=>{var _e;(_e=C.onCancel)===null||_e===void 0||_e.call(C),R(!1)},[E,k]=dm(d),{copied:z,copyLoading:L,onClick:B}=vW({copyConfig:k,children:l}),[F,H]=te(!1),[X,q]=te(!1),[N,j]=te(!1),[oe,ee]=te(!1),[se,fe]=te(!0),[re,J]=dm(c,{expandable:!1,symbol:_e=>_e?O==null?void 0:O.collapse:O==null?void 0:O.expand}),[ue,de]=Pn(J.defaultExpanded||!1,{value:J.expanded}),D=re&&(!ue||J.expandable==="collapsible"),{rows:Y=1}=J,me=ve(()=>D&&(J.suffix!==void 0||J.onEllipsis||J.expandable||$||E),[D,J,$,E]);Lt(()=>{re&&!me&&(H(Cy("webkitLineClamp")),q(Cy("textOverflow")))},[me,re]);const[G,ce]=te(D),ae=ve(()=>me?!1:Y===1?X:F,[me,X,F]);Lt(()=>{ce(ae&&D)},[ae,D]);const pe=D&&(G?oe:N),Oe=D&&Y===1&&G,be=D&&Y>1&&G,ge=(_e,Pe)=>{var ft;de(Pe.expanded),(ft=J.onExpand)===null||ft===void 0||ft.call(J,_e,Pe)},[Me,Ie]=te(0),He=({offsetWidth:_e})=>{Ie(_e)},Ae=_e=>{var Pe;j(_e),N!==_e&&((Pe=J.onEllipsis)===null||Pe===void 0||Pe.call(J,_e))};ye(()=>{const _e=v.current;if(re&&G&&_e){const Pe=CW(_e);oe!==Pe&&ee(Pe)}},[re,G,l,be,se,Me]),ye(()=>{const _e=v.current;if(typeof IntersectionObserver>"u"||!_e||!G||!D)return;const Pe=new IntersectionObserver(()=>{fe(!!_e.offsetParent)});return Pe.observe(_e),()=>{Pe.disconnect()}},[G,D]);const Ee=bW(J.tooltip,C.text,l),st=ve(()=>{if(!(!re||G))return[C.text,l,h,Ee.title].find(H0)},[re,G,h,Ee.title,pe]);if(P)return b(lW,{value:(n=C.text)!==null&&n!==void 0?n:typeof l=="string"?l:"",onSave:M,onCancel:Q,onEnd:C.onEnd,prefixCls:S,className:i,style:o,direction:g,component:f,maxLength:C.maxLength,autoSize:C.autoSize,enterIcon:C.enterIcon});const Ye=()=>{const{expandable:_e,symbol:Pe}=J;return _e?b("button",{type:"button",key:"expand",className:`${S}-${ue?"collapse":"expand"}`,onClick:ft=>ge(ft,{expanded:!ue}),"aria-label":ue?O.collapse:O==null?void 0:O.expand},typeof Pe=="function"?Pe(ue):Pe):null},rt=()=>{if(!$)return;const{icon:_e,tooltip:Pe,tabIndex:ft}=C,yt=sr(Pe)[0]||(O==null?void 0:O.edit),xn=typeof yt=="string"?yt:"";return _.includes("icon")?b(on,{key:"edit",title:Pe===!1?"":yt},b("button",{type:"button",ref:y,className:`${S}-edit`,onClick:T,"aria-label":xn,tabIndex:ft},_e||b(W0,{role:"button"}))):null},Be=()=>E?b(wW,Object.assign({key:"copy"},k,{prefixCls:S,copied:z,locale:O,onCopy:B,loading:L,iconOnly:l==null})):null,Re=_e=>[_e&&Ye(),rt(),Be()],Xe=_e=>[_e&&!ue&&b("span",{"aria-hidden":!0,key:"ellipsis"},MW),J.suffix,Re(_e)];return b(Jr,{onResize:He,disabled:!D},_e=>b(TW,{tooltipProps:Ee,enableEllipsis:D,isEllipsis:pe},b(l_,Object.assign({className:U({[`${S}-${a}`]:a,[`${S}-disabled`]:s,[`${S}-ellipsis`]:re,[`${S}-ellipsis-single-line`]:Oe,[`${S}-ellipsis-multiple-line`]:be},i),prefixCls:r,style:Object.assign(Object.assign({},o),{WebkitLineClamp:be?Y:void 0}),component:f,ref:vr(_e,v,e),direction:g,onClick:_.includes("text")?T:void 0,"aria-label":st==null?void 0:st.toString(),title:h},x),b(_W,{enableMeasure:D&&!G,text:l,rows:Y,width:Me,onEllipsis:Ae,expanded:ue,miscDeps:[z,ue,L,$,E,O].concat(Ce(e1.map(Pe=>t[Pe])))},(Pe,ft)=>IW(t,b(Qt,null,Pe.length>0&&ft&&!ue&&st?b("span",{key:"show-content","aria-hidden":!0},Pe):Pe,Xe(ft)))))))});var EW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{ellipsis:n,rel:r}=t,i=EW(t,["ellipsis","rel"]);const o=Object.assign(Object.assign({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,b(uh,Object.assign({},o,{ref:e,ellipsis:!!n,component:"a"}))}),AW=Se((t,e)=>b(uh,Object.assign({ref:e},t,{component:"div"})));var QW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{ellipsis:n}=t,r=QW(t,["ellipsis"]);const i=ve(()=>n&&typeof n=="object"?pn(n,["expandable","rows"]):n,[n]);return b(uh,Object.assign({ref:e},r,{ellipsis:i,component:"span"}))},zW=Se(NW);var jW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{level:n=1}=t,r=jW(t,["level"]),i=LW.includes(n)?`h${n}`:"h1";return b(uh,Object.assign({ref:e},r,{component:i}))}),an=l_;an.Text=zW;an.Link=kW;an.Title=DW;an.Paragraph=AW;var BW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},WW=function(e,n){return b(Mt,xe({},e,{ref:n,icon:BW}))},HW=Se(WW),VW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},FW=function(e,n){return b(Mt,xe({},e,{ref:n,icon:VW}))},rd=Se(FW),XW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},ZW=function(e,n){return b(Mt,xe({},e,{ref:n,icon:XW}))},id=Se(ZW),qW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M448 804a64 64 0 10128 0 64 64 0 10-128 0zm32-168h64c4.4 0 8-3.6 8-8V164c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"exclamation",theme:"outlined"},GW=function(e,n){return b(Mt,xe({},e,{ref:n,icon:qW}))},UW=Se(GW),YW={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},KW=function(e,n){return b(Mt,xe({},e,{ref:n,icon:YW}))},JW=Se(KW),eH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"},tH=function(e,n){return b(Mt,xe({},e,{ref:n,icon:eH}))},nH=Se(tH),rH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"},iH=function(e,n){return b(Mt,xe({},e,{ref:n,icon:rH}))},oH=Se(iH),aH={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M489.5 111.66c30.65-1.8 45.98 36.44 22.58 56.33A243.35 243.35 0 00426 354c0 134.76 109.24 244 244 244 72.58 0 139.9-31.83 186.01-86.08 19.87-23.38 58.07-8.1 56.34 22.53C900.4 745.82 725.15 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.29-386.02 374.2-399.65l.2-.01zm-81.15 79.75l-4.11 1.36C271.1 237.94 176 364.09 176 511.5 176 697.34 326.66 848 512.5 848c148.28 0 274.94-96.2 319.45-230.41l.63-1.93-.11.07a307.06 307.06 0 01-159.73 46.26L670 662c-170.1 0-308-137.9-308-308 0-58.6 16.48-114.54 46.27-162.47z"}}]},name:"moon",theme:"outlined"},sH=function(e,n){return b(Mt,xe({},e,{ref:n,icon:aH}))},lH=Se(sH),cH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},uH=function(e,n){return b(Mt,xe({},e,{ref:n,icon:cH}))},dH=Se(uH),fH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},hH=function(e,n){return b(Mt,xe({},e,{ref:n,icon:fH}))},c_=Se(hH),mH={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M548 818v126a16 16 0 01-16 16h-40a16 16 0 01-16-16V818c15.85 1.64 27.84 2.46 36 2.46 8.15 0 20.16-.82 36-2.46m205.25-115.66l89.1 89.1a16 16 0 010 22.62l-28.29 28.29a16 16 0 01-22.62 0l-89.1-89.1c12.37-10.04 21.43-17.95 27.2-23.71 5.76-5.77 13.67-14.84 23.71-27.2m-482.5 0c10.04 12.36 17.95 21.43 23.71 27.2 5.77 5.76 14.84 13.67 27.2 23.71l-89.1 89.1a16 16 0 01-22.62 0l-28.29-28.29a16 16 0 010-22.63zM512 278c129.24 0 234 104.77 234 234S641.24 746 512 746 278 641.24 278 512s104.77-234 234-234m0 72c-89.47 0-162 72.53-162 162s72.53 162 162 162 162-72.53 162-162-72.53-162-162-162M206 476c-1.64 15.85-2.46 27.84-2.46 36 0 8.15.82 20.16 2.46 36H80a16 16 0 01-16-16v-40a16 16 0 0116-16zm738 0a16 16 0 0116 16v40a16 16 0 01-16 16H818c1.64-15.85 2.46-27.84 2.46-36 0-8.15-.82-20.16-2.46-36zM814.06 180.65l28.29 28.29a16 16 0 010 22.63l-89.1 89.09c-10.04-12.37-17.95-21.43-23.71-27.2-5.77-5.76-14.84-13.67-27.2-23.71l89.1-89.1a16 16 0 0122.62 0m-581.5 0l89.1 89.1c-12.37 10.04-21.43 17.95-27.2 23.71-5.76 5.77-13.67 14.84-23.71 27.2l-89.1-89.1a16 16 0 010-22.62l28.29-28.29a16 16 0 0122.62 0M532 64a16 16 0 0116 16v126c-15.85-1.64-27.84-2.46-36-2.46-8.15 0-20.16.82-36 2.46V80a16 16 0 0116-16z"}}]},name:"sun",theme:"outlined"},pH=function(e,n){return b(Mt,xe({},e,{ref:n,icon:mH}))},gH=Se(pH),vH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},OH=function(e,n){return b(Mt,xe({},e,{ref:n,icon:vH}))},bH=Se(OH);function vu({currentUser:t=null,isDarkMode:e=!1,onThemeToggle:n}){const[r,i]=te(!1),o=()=>{try{return window.self!==window.top}catch{return!0}},a=m=>m!=null&&m.entity_picture?m.entity_picture:m!=null&&m.id?`/api/image/serve/${m.id}/512x512`:null,s=m=>(m==null?void 0:m.name)||"Unknown User",l=()=>{const m=window.location.href,p=new URL(m);window.location.href=`${p.protocol}//${p.hostname}${p.port?":"+p.port:""}/`},c=()=>{const m=window.location.href,p=new URL(m),g=p.hostname,O=p.protocol,v=p.port?`:${p.port}`:"",y=`${O}//${g}${v}/config/integrations/integration/rbac`;o()?window.open(y,"_blank"):window.location.href=y},u=()=>{const m=window.location.href,p=new URL(m),g=`${p.protocol}//${p.hostname}${p.port?":"+p.port:""}/api/rbac/static/config.html`;window.open(g,"_blank")},d=()=>{localStorage.removeItem("hassTokens"),sessionStorage.removeItem("hassTokens");const m=window.location.href,p=new URL(m);window.location.href=`${p.protocol}//${p.hostname}${p.port?":"+p.port:""}/auth/authorize`},f=()=>{i(!0),n()},h=[...o()?[{key:"newTab",label:"Open in New Tab",icon:A(JW,{}),onClick:u}]:[],...o()?[]:[{key:"home",label:"Return to Home Assistant",icon:A(nH,{}),onClick:l}],{key:"integration",label:"RBAC Integration",icon:A(c_,{}),onClick:c},{key:"logout",label:"Log Out",icon:A(oH,{}),onClick:d}];return A("div",{style:{background:e?"#1f1f1f":"white",padding:"20px",borderRadius:"8px",boxShadow:e?"0 2px 4px rgba(255,255,255,0.1)":"0 2px 4px rgba(0,0,0,0.1)",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px",border:e?"1px solid #424242":"none"},children:[A("div",{children:[A("h1",{style:{margin:0,color:e?"#ffffff":"#1976d2"},children:"🔐 RBAC Configuration"}),A("p",{style:{margin:0,color:e?"#d9d9d9":"#666"},children:"Manage role-based access control for your Home Assistant instance"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"16px"},children:[A(on,{title:e?"Switch to light mode":"Switch to dark mode",children:A(wt,{type:"text",icon:e?A(gH,{className:r?"theme-toggle-spin":""}):A(lH,{className:r?"theme-toggle-spin":""}),onClick:f,style:{fontSize:"16px",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid #d9d9d9",backgroundColor:"transparent",transition:"all 0.3s ease"},onMouseEnter:m=>{m.currentTarget.style.backgroundColor="#f5f5f5",m.currentTarget.style.borderColor="#1890ff"},onMouseLeave:m=>{m.currentTarget.style.backgroundColor="transparent",m.currentTarget.style.borderColor="#d9d9d9"}})}),t&&A(Q0,{menu:{items:h},trigger:["click"],placement:"bottomRight",children:A("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"8px 12px",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.2s ease"},onMouseEnter:m=>{m.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:m=>{m.currentTarget.style.backgroundColor="transparent"},children:[A(Qd,{src:a(t),size:48,children:s(t).charAt(0).toUpperCase()}),A("div",{children:[A(an.Text,{strong:!0,style:{fontSize:"16px"},children:s(t)}),A("br",{}),A(an.Text,{type:"secondary",style:{fontSize:"12px"},children:t.role||"No role assigned"})]})]})})]})]})}const yH=()=>{try{const t=document.querySelector("home-assistant");return t&&t.hass?t.hass:window.hass?window.hass:window.parent&&window.parent!==window&&window.parent.hass?window.parent.hass:null}catch(t){return console.error("Error getting hass object:",t),null}},Hd=async()=>{try{const t=yH();if(t&&t.auth){if(t.auth.data&&t.auth.data.access_token)return{access_token:t.auth.data.access_token,token_type:"Bearer"};if(t.auth.access_token)return{access_token:t.auth.access_token,token_type:"Bearer"}}const e=localStorage.getItem("hassTokens");if(e)return{access_token:JSON.parse(e).access_token,token_type:"Bearer"};const n=sessionStorage.getItem("hassTokens");if(n)return{access_token:JSON.parse(n).access_token,token_type:"Bearer"};const r=await fetch("/auth/token");if(!r.ok)throw new Error("Not authenticated");return await r.json()}catch(t){return console.error("Error getting HA auth:",t),null}},Wn=async(t,e={})=>{const n=await Hd();if(!n)throw new Error("Not authenticated with Home Assistant");const r={headers:{Authorization:`Bearer ${n.access_token}`,"Content-Type":"application/json",...e.headers}};return fetch(t,{...r,...e})};let cg=[],u_=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e>1;if(t=u_[r])e=r+1;else return!0;if(e==n)return!1}}function t1(t){return t>=127462&&t<=127487}const n1=8205;function xH(t,e,n=!0,r=!0){return(n?d_:$H)(t,e,r)}function d_(t,e,n){if(e==t.length)return e;e&&f_(t.charCodeAt(e))&&h_(t.charCodeAt(e-1))&&e--;let r=vm(t,e);for(e+=r1(r);e=0&&t1(vm(t,a));)o++,a-=2;if(o%2==0)break;e+=2}else break}return e}function $H(t,e,n){for(;e>0;){let r=d_(t,e-2,n);if(r=56320&&t<57344}function h_(t){return t>=55296&&t<56320}function r1(t){return t<65536?1:2}let qt=class m_{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Ps(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),Li.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Ps(this,e,n);let r=[];return this.decompose(e,n,r,0),Li.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Il(this),o=new Il(e);for(let a=n,s=n;;){if(i.next(a),o.next(a),a=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(s+=i.value.length,i.done||s>=r)return!0}}iter(e=1){return new Il(this,e)}iterRange(e,n=this.length){return new p_(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new g_(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?m_.empty:e.length<=32?new En(e):Li.from(En.split(e,[]))}};class En extends qt{constructor(e,n=CH(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.text[o],s=i+a.length;if((n?r:s)>=e)return new wH(i,s,r,a);i=s+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new En(i1(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let a=r.pop(),s=od(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new En(s,a.length+o.length));else{let l=s.length>>1;r.push(new En(s.slice(0,l)),new En(s.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof En))return super.replace(e,n,r);[e,n]=Ps(this,e,n);let i=od(this.text,od(r.text,i1(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new En(i,o):Li.from(En.split(i,[]),o)}sliceString(e,n=this.length,r=` +`){[e,n]=Ps(this,e,n);let i="";for(let o=0,a=0;o<=n&&ae&&a&&(i+=r),eo&&(i+=s.slice(Math.max(0,e-o),n-o)),o=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new En(r,i)),r=[],i=-1);return i>-1&&n.push(new En(r,i)),n}}class Li extends qt{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.children[o],s=i+a.length,l=r+a.lines-1;if((n?l:s)>=e)return a.lineInner(e,n,r,i);i=s+1,r=l+1}}decompose(e,n,r,i){for(let o=0,a=0;a<=n&&o=a){let c=i&((a<=e?1:0)|(l>=n?2:0));a>=e&&l<=n&&!c?r.push(s):s.decompose(e-a,n-a,r,c)}a=l+1}}replace(e,n,r){if([e,n]=Ps(this,e,n),r.lines=o&&n<=s){let l=a.replace(e-o,n-o,r),c=this.lines-a.lines+l.lines;if(l.lines>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new Li(u,this.length-(n-e)+r.length)}return super.replace(o,s,l)}o=s+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=` +`){[e,n]=Ps(this,e,n);let i="";for(let o=0,a=0;oe&&o&&(i+=r),ea&&(i+=s.sliceString(e-a,n-a,r)),a=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Li))return 0;let r=0,[i,o,a,s]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==a||o==s)return r;let l=this.children[i],c=e.children[o];if(l!=c)return r+l.scanIdentical(c,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let m of e)m.flatten(h);return new En(h,n)}let i=Math.max(32,r>>5),o=i<<1,a=i>>1,s=[],l=0,c=-1,u=[];function d(h){let m;if(h.lines>o&&h instanceof Li)for(let p of h.children)d(p);else h.lines>a&&(l>a||!l)?(f(),s.push(h)):h instanceof En&&l&&(m=u[u.length-1])instanceof En&&h.lines+m.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new En(m.text.concat(h.text),m.length+1+h.length)):(l+h.lines>i&&f(),l+=h.lines,c+=h.length+1,u.push(h))}function f(){l!=0&&(s.push(u.length==1?u[0]:Li.from(u,c)),c=-1,l=u.length=0)}for(let h of e)d(h);return f(),s.length==1?s[0]:new Li(s,n)}}qt.empty=new En([""],0);function CH(t){let e=-1;for(let n of t)e+=n.length+1;return e}function od(t,e,n=0,r=1e9){for(let i=0,o=0,a=!0;o=n&&(l>r&&(s=s.slice(0,r-i)),i0?1:(e instanceof En?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],a=o>>1,s=i instanceof En?i.text.length:i.children.length;if(a==(n>0?s:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof En){let l=i.text[a+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[a+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof En?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class p_{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Il(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class g_{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(qt.prototype[Symbol.iterator]=function(){return this.iter()},Il.prototype[Symbol.iterator]=p_.prototype[Symbol.iterator]=g_.prototype[Symbol.iterator]=function(){return this});class wH{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Ps(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function rr(t,e,n=!0,r=!0){return xH(t,e,n,r)}function PH(t){return t>=56320&&t<57344}function _H(t){return t>=55296&&t<56320}function Nr(t,e){let n=t.charCodeAt(e);if(!_H(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return PH(r)?(n-55296<<10)+(r-56320)+65536:n}function V0(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Di(t){return t<65536?1:2}const ug=/\r\n?|\n/;var nr=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(nr||(nr={}));class qi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return o+(e-i);o+=s}else{if(r!=nr.Simple&&c>=e&&(r==nr.TrackDel&&ie||r==nr.TrackBefore&&ie))return null;if(c>e||c==e&&n<0&&!s)return e==i||n<0?o:o+l;o+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r=0&&i<=n&&s>=e)return in?"cover":!0;i=s}return!1}toString(){let e="";for(let n=0;n=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new qi(e)}static create(e){return new qi(e)}}class Hn extends qi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return dg(this,(n,r,i,o,a)=>e=e.replace(i,i+(r-n),a),!1),e}mapDesc(e,n=!1){return fg(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i=0){n[i]=s,n[i+1]=a;let l=i>>1;for(;r.length0&&Eo(r,n,o.text),o.forward(u),s+=u}let c=e[a++];for(;s>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],a=0,s=null;function l(u=!1){if(!u&&!i.length)return;af||d<0||f>n)throw new RangeError(`Invalid change range ${d} to ${f} (in doc of length ${n})`);let m=h?typeof h=="string"?qt.of(h.split(r||ug)):h:qt.empty,p=m.length;if(d==f&&p==0)return;da&&hr(i,d-a,-1),hr(i,f-d,p),Eo(o,i,m),a=f}}return c(e),l(!s),s}static empty(e){return new Hn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;is&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Eo(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(i,c,o,u,d),i=c,o=u}}}function fg(t,e,n,r=!1){let i=[],o=r?[]:null,a=new ec(t),s=new ec(e);for(let l=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&s.ins==-1){let c=Math.min(a.len,s.len);hr(i,c,-1),a.forward(c),s.forward(c)}else if(s.ins>=0&&(a.ins<0||l==a.i||a.off==0&&(s.len=0&&l=0){let c=0,u=a.len;for(;u;)if(s.ins==-1){let d=Math.min(u,s.len);c+=d,u-=d,s.forward(d)}else if(s.ins==0&&s.lenl||a.ins>=0&&a.len>l)&&(s||r.length>c),o.forward2(l),a.forward(l)}}}}class ec{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?qt.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?qt.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ua{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ua(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return $e.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return $e.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return $e.range(e.anchor,e.head)}static create(e,n,r){return new ua(e,n,r)}}class $e{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:$e.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new $e(e.ranges.map(n=>ua.fromJSON(n)),e.main)}static single(e,n=e){return new $e([$e.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;io.head?$e.range(l,s):$e.range(s,l))}}return new $e(e,n)}}function O_(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let F0=0;class Ge{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=F0++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new Ge(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:X0),!!e.static,e.enables)}of(e){return new ad([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new ad(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new ad(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function X0(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class ad{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=F0++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,a=e[o]>>1,s=this.type==2,l=!1,c=!1,u=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?c=!0:((n=e[d.id])!==null&&n!==void 0?n:1)&1||u.push(e[d.id]);return{create(d){return d.values[a]=r(d),1},update(d,f){if(l&&f.docChanged||c&&(f.docChanged||f.selection)||hg(d,u)){let h=r(d);if(s?!o1(h,d.values[a],i):!i(h,d.values[a]))return d.values[a]=h,1}return 0},reconfigure:(d,f)=>{let h,m=f.config.address[o];if(m!=null){let p=Fd(f,m);if(this.dependencies.every(g=>g instanceof Ge?f.facet(g)===d.facet(g):g instanceof Yn?f.field(g,!1)==d.field(g,!1):!0)||(s?o1(h=r(d),p,i):i(h=r(d),p)))return d.values[a]=p,0}else h=r(d);return d.values[a]=h,1}}}}function o1(t,e,n){if(t.length!=e.length)return!1;for(let r=0;rt[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),a=t[e.id]>>1;function s(l){let c=[];for(let u=0;ur===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Ou).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],a=this.updateF(o,i);return this.compareF(o,a)?0:(r.values[n]=a,1)},reconfigure:(r,i)=>{let o=r.facet(Ou),a=i.facet(Ou),s;return(s=o.find(l=>l.field==this))&&s!=a.find(l=>l.field==this)?(r.values[n]=s.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,Ou.of({field:this,create:e})]}get extension(){return this}}const ia={lowest:4,low:3,default:2,high:1,highest:0};function ol(t){return e=>new b_(e,t)}const Zo={highest:ol(ia.highest),high:ol(ia.high),default:ol(ia.default),low:ol(ia.low),lowest:ol(ia.lowest)};class b_{constructor(e,n){this.inner=e,this.prec=n}}class dh{of(e){return new mg(this,e)}reconfigure(e){return dh.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class mg{constructor(e,n){this.compartment=e,this.inner=n}}class Vd{constructor(e,n,r,i,o,a){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,r){let i=[],o=Object.create(null),a=new Map;for(let f of RH(e,n,a))f instanceof Yn?i.push(f):(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let s=Object.create(null),l=[],c=[];for(let f of i)s[f.id]=c.length<<1,c.push(h=>f.slot(h));let u=r==null?void 0:r.config.facets;for(let f in o){let h=o[f],m=h[0].facet,p=u&&u[f]||[];if(h.every(g=>g.type==0))if(s[m.id]=l.length<<1|1,X0(p,h))l.push(r.facet(m));else{let g=m.combine(h.map(O=>O.value));l.push(r&&m.compare(g,r.facet(m))?r.facet(m):g)}else{for(let g of h)g.type==0?(s[g.id]=l.length<<1|1,l.push(g.value)):(s[g.id]=c.length<<1,c.push(O=>g.dynamicSlot(O)));s[m.id]=c.length<<1,c.push(g=>TH(g,m,h))}}let d=c.map(f=>f(s));return new Vd(e,a,d,s,l,o)}}function RH(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(a,s){let l=i.get(a);if(l!=null){if(l<=s)return;let c=r[l].indexOf(a);c>-1&&r[l].splice(c,1),a instanceof mg&&n.delete(a.compartment)}if(i.set(a,s),Array.isArray(a))for(let c of a)o(c,s);else if(a instanceof mg){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(a.compartment)||a.inner;n.set(a.compartment,c),o(c,s)}else if(a instanceof b_)o(a.inner,a.prec);else if(a instanceof Yn)r[s].push(a),a.provides&&o(a.provides,s);else if(a instanceof ad)r[s].push(a),a.facet.extensions&&o(a.facet.extensions,ia.default);else{let c=a.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(c,s)}}return o(t,ia.default),r.reduce((a,s)=>a.concat(s))}function Ml(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function Fd(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const y_=Ge.define(),pg=Ge.define({combine:t=>t.some(e=>e),static:!0}),S_=Ge.define({combine:t=>t.length?t[0]:void 0,static:!0}),x_=Ge.define(),$_=Ge.define(),C_=Ge.define(),w_=Ge.define({combine:t=>t.length?t[0]:!1});class eo{constructor(e,n){this.type=e,this.value=n}static define(){return new IH}}class IH{of(e){return new eo(this,e)}}class MH{constructor(e){this.map=e}of(e){return new $t(this,e)}}class $t{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new $t(this.type,n)}is(e){return this.type==e}static define(e={}){return new MH(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}$t.reconfigure=$t.define();$t.appendConfig=$t.define();class Ln{constructor(e,n,r,i,o,a){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,r&&O_(r,n.newLength),o.some(s=>s.type==Ln.time)||(this.annotations=o.concat(Ln.time.of(Date.now())))}static create(e,n,r,i,o,a){return new Ln(e,n,r,i,o,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Ln.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Ln.time=eo.define();Ln.userEvent=eo.define();Ln.addToHistory=eo.define();Ln.remote=eo.define();function EH(t,e){let n=[];for(let r=0,i=0;;){let o,a;if(r=t[r]))o=t[r++],a=t[r++];else if(i=0;i--){let o=r[i](t);o instanceof Ln?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Ln?t=o[0]:t=__(e,cs(o),!1)}return t}function AH(t){let e=t.startState,n=e.facet(C_),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=P_(r,gg(e,o,t.changes.newLength),!0))}return r==t?t:Ln.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const QH=[];function cs(t){return t==null?QH:Array.isArray(t)?t:[t]}var wn=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(wn||(wn={}));const NH=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let vg;try{vg=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function zH(t){if(vg)return vg.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||NH.test(n)))return!0}return!1}function jH(t){return e=>{if(!/\S/.test(e))return wn.Space;if(zH(e))return wn.Word;for(let n=0;n-1)return wn.Word;return wn.Other}}class jt{constructor(e,n,r,i,o,a){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(let s=0;si.set(c,l)),n=null),i.set(s.value.compartment,s.value.extension)):s.is($t.reconfigure)?(n=null,r=s.value):s.is($t.appendConfig)&&(n=null,r=cs(r).concat(s.value));let o;n?o=e.startState.values.slice():(n=Vd.resolve(r,i,this),o=new jt(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let a=e.startState.facet(pg)?e.newSelection:e.newSelection.asSingle();new jt(n,e.newDoc,a,o,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:$e.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],a=cs(r.effects);for(let s=1;sa.spec.fromJSON(s,l)))}}return jt.create({doc:e.doc,selection:$e.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Vd.resolve(e.extensions||[],new Map),r=e.doc instanceof qt?e.doc:qt.of((e.doc||"").split(n.staticFacet(jt.lineSeparator)||ug)),i=e.selection?e.selection instanceof $e?e.selection:$e.single(e.selection.anchor,e.selection.head):$e.single(0);return O_(i,r.length),n.staticFacet(pg)||(i=i.asSingle()),new jt(n,r,i,n.dynamicSlots.map(()=>null),(o,a)=>a.create(o),null)}get tabSize(){return this.facet(jt.tabSize)}get lineBreak(){return this.facet(jt.lineSeparator)||` +`}get readOnly(){return this.facet(w_)}phrase(e,...n){for(let r of this.facet(jt.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(y_))for(let a of o(this,n,r))Object.prototype.hasOwnProperty.call(a,e)&&i.push(a[e]);return i}charCategorizer(e){return jH(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),a=e-r,s=e-r;for(;a>0;){let l=rr(n,a,!1);if(o(n.slice(l,a))!=wn.Word)break;a=l}for(;st.length?t[0]:4});jt.lineSeparator=S_;jt.readOnly=w_;jt.phrases=Ge.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});jt.languageData=y_;jt.changeFilter=x_;jt.transactionFilter=$_;jt.transactionExtender=C_;dh.reconfigure=$t.define();function to(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let a=i[o],s=r[o];if(s===void 0)r[o]=a;else if(!(s===a||a===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](s,a);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class wa{eq(e){return this==e}range(e,n=e){return Og.create(e,n,this)}}wa.prototype.startSide=wa.prototype.endSide=0;wa.prototype.point=!1;wa.prototype.mapMode=nr.TrackDel;let Og=class T_{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new T_(e,n,r)}};function bg(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Z0{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let a=i,s=o.length;;){if(a==s)return a;let l=a+s>>1,c=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==a)return c>=0?a:s;c>=0?s=l:a=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),a=this.findIndex(r,1e9,!1,o);oh||f==h&&c.startSide>0&&c.endSide<=0)continue;(h-f||c.endSide-c.startSide)<0||(a<0&&(a=f),c.point&&(s=Math.max(s,h-f)),r.push(c),i.push(f-a),o.push(h-a))}return{mapped:r.length?new Z0(i,o,r,s):null,pos:a}}}class Ht{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Ht(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(r&&(n=n.slice().sort(bg)),this.isEmpty)return n.length?Ht.of(n):this;let s=new R_(this,null,-1).goto(0),l=0,c=[],u=new mo;for(;s.value||l=0){let d=n[l++];u.addInner(d.from,d.to,d.value)||c.push(d)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||os.to||o=o&&e<=o+a.length&&a.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return tc.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return tc.from(e).goto(n)}static compare(e,n,r,i,o=-1){let a=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),s=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),l=a1(a,s,r),c=new al(a,l,o),u=new al(s,l,o);r.iterGaps((d,f,h)=>s1(c,d,u,f,h,i)),r.empty&&r.length==0&&s1(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let o=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),a=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(o.length!=a.length)return!1;if(!o.length)return!0;let s=a1(o,a),l=new al(o,s,0).goto(r),c=new al(a,s,0).goto(r);for(;;){if(l.to!=c.to||!yg(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,n,r,i,o=-1){let a=new al(e,null,o).goto(n),s=n,l=a.openStart;for(;;){let c=Math.min(a.to,r);if(a.point){let u=a.activeForPoint(a.to),d=a.pointFroms&&(i.span(s,c,a.active,l),l=a.openEnd(c));if(a.to>r)return l+(a.point&&a.to>r?1:0);s=a.to,a.next()}}static of(e,n=!1){let r=new mo;for(let i of e instanceof Og?[e]:n?LH(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Ht.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Ht.empty;i=i.nextLayer)n=new Ht(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Ht.empty=new Ht([],[],null,-1);function LH(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(bg);e=r}return t}Ht.empty.nextLayer=Ht.empty;class mo{finishChunk(e){this.chunks.push(new Z0(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new mo)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Ht.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ht.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function a1(t,e,n){let r=new Map;for(let o of t)for(let a=0;a=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new R_(a,n,r,o));return i.length==1?i[0]:new tc(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)Om(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)Om(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Om(this.heap,0)}}}function Om(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class al{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=tc.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){bu(this.active,e),bu(this.activeTo,e),bu(this.activeRank,e),this.minActive=l1(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n0;)n++;yu(this.active,n,r),yu(this.activeTo,n,i),yu(this.activeRank,n,o),e&&yu(e,n,this.cursor.from),this.minActive=l1(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&bu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function s1(t,e,n,r,i,o){t.goto(e),n.goto(r);let a=r+i,s=r,l=r-e;for(;;){let c=t.to+l-n.to,u=c||t.endSide-n.endSide,d=u<0?t.to+l:n.to,f=Math.min(d,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&yg(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(s,f,t.point,n.point):f>s&&!yg(t.active,n.active)&&o.compareRange(s,f,t.active,n.active),d>a)break;(c||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(d),s=d,u<=0&&t.next(),u>=0&&n.next()}}function yg(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;r--)t[r+1]=t[r];t[e]=n}function l1(t,e){let n=-1,r=1e9;for(let i=0;i=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=rr(t,i)}return r===!0?-1:t.length}const xg="ͼ",c1=typeof Symbol>"u"?"__"+xg:Symbol.for(xg),$g=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),u1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Bo{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,s,l,c){let u=[],d=/^@(\w+)\b/.exec(a[0]),f=d&&d[1]=="keyframes";if(d&&s==null)return l.push(a[0]+";");for(let h in s){let m=s[h];if(/&/.test(h))o(h.split(/,\s*/).map(p=>a.map(g=>p.replace(/&/,g))).reduce((p,g)=>p.concat(g)),m,l);else if(m&&typeof m=="object"){if(!d)throw new RangeError("The value of a property ("+h+") should be a primitive value.");o(i(h),m,u,f)}else m!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,p=>"-"+p.toLowerCase())+": "+m+";")}(u.length||f)&&l.push((r&&!d&&!c?a.map(r):a).join(", ")+" {"+u.join(" ")+"}")}for(let a in e)o(i(a),e[a],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=u1[c1]||1;return u1[c1]=e+1,xg+e.toString(36)}static mount(e,n,r){let i=e[$g],o=r&&r.nonce;i?o&&i.setNonce(o):i=new DH(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let d1=new Map;class DH{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=d1.get(r);if(o)return e[$g]=o;this.sheet=new i.CSSStyleSheet,d1.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[$g]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let a=0;a-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,s),r)for(let c=0;c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},BH=typeof navigator<"u"&&/Mac/.test(navigator.platform),WH=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var tr=0;tr<10;tr++)Wo[48+tr]=Wo[96+tr]=String(tr);for(var tr=1;tr<=24;tr++)Wo[tr+111]="F"+tr;for(var tr=65;tr<=90;tr++)Wo[tr]=String.fromCharCode(tr+32),nc[tr]=String.fromCharCode(tr);for(var bm in Wo)nc.hasOwnProperty(bm)||(nc[bm]=Wo[bm]);function HH(t){var e=BH&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||WH&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?nc:Wo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function ln(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function FH(t,e,n,r,i,o,a,s){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,d=!1;u&&!d;)if(u.nodeType==1){let f,h=u==l.body,m=1,p=1;if(h)f=VH(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let v=u.getBoundingClientRect();({scaleX:m,scaleY:p}=M_(u,v)),f={left:v.left,right:v.left+u.clientWidth*m,top:v.top,bottom:v.top+u.clientHeight*p}}let g=0,O=0;if(i=="nearest")e.top0&&e.bottom>f.bottom+O&&(O=e.bottom-f.bottom+a)):e.bottom>f.bottom&&(O=e.bottom-f.bottom+a,n<0&&e.top-O0&&e.right>f.right+g&&(g=e.right-f.right+o)):e.right>f.right&&(g=e.right-f.right+o,n<0&&e.leftf.bottom||e.leftf.right)&&(e={left:Math.max(e.left,f.left),right:Math.min(e.right,f.right),top:Math.max(e.top,f.top),bottom:Math.min(e.bottom,f.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function XH(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class ZH{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Ki(n):0),r,Math.min(e.focusOffset,r?Ki(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let qa=null;function E_(t){if(t.setActive)return t.setActive();if(qa)return t.focus(qa);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(qa==null?{get preventScroll(){return qa={preventScroll:!0},!0}}:void 0),!qa){qa=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function Q_(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Ki(n)}else if(n.parentNode&&!Xd(n))r=Pa(n),n=n.parentNode;else return null}}function N_(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&rn)return d.domBoundsAround(e,n,c);if(f>=e&&i==-1&&(i=l,o=c),c>n&&d.dom.parentNode==this.dom){a=l,s=u;break}u=f,c=f+d.breakAfter}return{from:o,to:s<0?r+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=q0){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function j_(t,e,n,r,i,o,a,s,l){let{children:c}=t,u=c.length?c[e]:null,d=o.length?o[o.length-1]:null,f=d?d.breakAfter:a;if(!(e==r&&u&&!a&&!f&&o.length<2&&u.merge(n,i,o.length?d:null,n==0,s,l))){if(r0&&(!a&&o.length&&u.merge(n,u.length,o[0],!1,s,0)?u.breakAfter=o.shift().breakAfter:(n2);var qe={mac:g1||/Mac/.test(zr.platform),windows:/Win/.test(zr.platform),linux:/Linux|X11/.test(zr.platform),ie:fh,ie_version:D_?wg.documentMode||6:_g?+_g[1]:Pg?+Pg[1]:0,gecko:p1,gecko_version:p1?+(/Firefox\/(\d+)/.exec(zr.userAgent)||[0,0])[1]:0,chrome:!!ym,chrome_version:ym?+ym[1]:0,ios:g1,android:/Android\b/.test(zr.userAgent),safari:B_,webkit_version:UH?+(/\bAppleWebKit\/(\d+)/.exec(zr.userAgent)||[0,0])[1]:0,tabSize:wg.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const YH=256;class _i extends dn{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof _i)||this.length-(n-e)+r.length>YH||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new _i(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new mr(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return KH(this.dom,e,n)}}class po extends dn{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(k_(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,a){return r&&(!(r instanceof po&&r.mark.eq(this.mark))||e&&o<=0||ne&&n.push(r=e&&(i=o),r=l,o++}let a=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new po(this.mark,n,a)}domAtPos(e){return W_(this,e)}coordsAt(e,n){return V_(this,e,n)}}function KH(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,a=0;e==0&&n<0||e==r&&n>=0?qe.chrome||qe.gecko||(e?(i--,a=1):o=0)?0:s.length-1];return qe.safari&&!a&&l.width==0&&(l=Array.prototype.find.call(s,c=>c.width)||l),a?zc(l,a<0):l||null}class ko extends dn{static create(e,n,r){return new ko(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=ko.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,o,a){return r&&(!(r instanceof ko)||!this.widget.compare(r.widget)||e>0&&o<=0||n0)?mr.before(this.dom):mr.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let a=this.side?this.side<0:e>0;for(let s=a?i.length-1:0;o=i[s],!(e>0?s==0:s==i.length-1||o.top0?mr.before(this.dom):mr.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return qt.empty}get isHidden(){return!0}}_i.prototype.children=ko.prototype.children=Ts.prototype.children=q0;function W_(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;io&&e0;o--){let a=r[o-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let o=i;o0&&e instanceof po&&i.length&&(r=i[i.length-1])instanceof po&&r.mark.eq(e.mark)?H_(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function V_(t,e,n){let r=null,i=-1,o=null,a=-1;function s(c,u){for(let d=0,f=0;d=u&&(h.children.length?s(h,u-f):(!o||o.isHidden&&(n>0||eV(o,h)))&&(m>u||f==m&&h.getSide()>0)?(o=h,a=u-f):(f-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function Rg(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function tV(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new Ho(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:a}=F_(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(a?n?2e8:1:-6e8)+1}return new Ho(e,r,i,n,e.widget||null,!0)}static line(e){return new Lc(e)}static set(e,n=!1){return Ht.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}dt.none=Ht.empty;class jc extends dt{constructor(e){let{start:n,end:r}=F_(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof jc&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Zd(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}jc.prototype.point=!1;class Lc extends dt{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Lc&&this.spec.class==e.spec.class&&Zd(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Lc.prototype.mapMode=nr.TrackBefore;Lc.prototype.point=!0;class Ho extends dt{constructor(e,n,r,i,o,a){super(n,r,o,e),this.block=i,this.isReplace=a,this.mapMode=i?n<=0?nr.TrackBefore:nr.TrackAfter:nr.TrackDel}get type(){return this.startSide!=this.endSide?Pr.WidgetRange:this.startSide<=0?Pr.WidgetBefore:Pr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ho&&nV(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Ho.prototype.point=!0;function F_(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function nV(t,e){return t==e||!!(t&&e&&t.compare(e))}function ld(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class zn extends dn{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,a){if(r){if(!(r instanceof zn))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),L_(this,e,n,r?r.children.slice():[],o,a),!0}split(e){let n=new zn;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Zd(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){H_(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=Tg(n,this.attrs||{})),r&&(this.attrs=Tg({class:r},this.attrs||{}))}domAtPos(e){return W_(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(k_(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Rg(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&dn.get(i)instanceof po;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=dn.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!qe.ios||!this.children.some(o=>o instanceof _i))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof _i)||/[^ -~]/.test(r.text))return null;let i=_s(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=V_(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight=n){if(o instanceof zn)return o;if(a>n)break}i=a+o.breakAfter}return null}}class uo extends dn{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,a){return r&&(!(r instanceof uo)||!this.widget.compare(r.widget)||e>0&&o<=0||n0}}class Ig extends no{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class kl{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof uo&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new zn),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Su(new Ts(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof uo)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:a,lineBreak:s,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=a,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e),o=Math.min(i,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(Su(new _i(this.text.slice(this.textOff,this.textOff+o)),n),r),this.atCursorPos=!0,this.textOff+=o,e-=o,r=i<=o?0:n.length}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,a){if(this.disallowBlockEffectsFor[a]&&r instanceof Ho){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=n-e;if(r instanceof Ho)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new uo(r.widget||Rs.block,s,r));else{let l=ko.create(r.widget||Rs.inline,s,s?0:r.startSide),c=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e0),u=!l.isEditable&&(ei.length||r.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),c&&(d.append(Su(new Ts(1),i),o),o=i.length+Math.max(0,o-i.length)),d.append(Su(l,i),o),this.atCursorPos=u,this.pendingBuffer=u?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let a=new kl(e,n,r,o);return a.openEnd=Ht.spans(i,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function Su(t,e){for(let n of e)t=new po(n,[t],t.length);return t}class Rs extends no{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Rs.inline=new Rs("span");Rs.block=new Rs("div");var yn=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(yn||(yn={}));const Ta=yn.LTR,G0=yn.RTL;function X_(t){let e=[];for(let n=0;n=n){if(s.level==r)return a;(o<0||(i!=0?i<0?s.fromn:e[o].level>s.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}}function q_(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;p-=3)if(Ai[p+1]==-h){let g=Ai[p+2],O=g&2?i:g&4?g&1?o:i:0;O&&(cn[d]=cn[Ai[p]]=O),s=p;break}}else{if(Ai.length==189)break;Ai[s++]=d,Ai[s++]=f,Ai[s++]=l}else if((m=cn[d])==2||m==1){let p=m==i;l=p?0:1;for(let g=s-3;g>=0;g-=3){let O=Ai[g+2];if(O&2)break;if(p)Ai[g+2]|=2;else{if(O&4)break;Ai[g+2]|=4}}}}}function lV(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let a=i?n[i-1].to:t,s=il;)m==g&&(m=n[--p].from,g=p?n[p-1].to:t),cn[--m]=h;l=u}else o=c,l++}}}function Eg(t,e,n,r,i,o,a){let s=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;ll&&a.push(new Ao(l,p.from,h));let g=p.direction==Ta!=!(h%2);kg(t,g?r+1:r,i,p.inner,p.from,p.to,a),l=p.to}m=p.to}else{if(m==n||(u?cn[m]!=s:cn[m]==s))break;m++}f?Eg(t,l,m,r+1,i,f,a):le;){let u=!0,d=!1;if(!c||l>o[c-1].to){let p=cn[l-1];p!=s&&(u=!1,d=p==16)}let f=!u&&s==1?[]:null,h=u?r:r+1,m=l;e:for(;;)if(c&&m==o[c-1].to){if(d)break e;let p=o[--c];if(!u)for(let g=p.from,O=c;;){if(g==e)break e;if(O&&o[O-1].to==g)g=o[--O].from;else{if(cn[g-1]==s)break e;break}}if(f)f.push(p);else{p.tocn.length;)cn[cn.length]=256;let r=[],i=e==Ta?0:1;return kg(t,i,i,n,0,t.length,r),r}function G_(t){return[new Ao(0,t,0)]}let U_="";function uV(t,e,n,r,i){var o;let a=r.head-t.from,s=Ao.find(e,a,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),l=e[s],c=l.side(i,n);if(a==c){let f=s+=i?1:-1;if(f<0||f>=e.length)return null;l=e[s=f],a=l.side(!i,n),c=l.side(i,n)}let u=rr(t.text,a,l.forward(i,n));(ul.to)&&(u=c),U_=t.text.slice(Math.min(a,u),Math.max(a,u));let d=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return d&&u==c&&d.level+(i?0:1)t.some(e=>e)}),iT=Ge.define({combine:t=>t.some(e=>e)}),oT=Ge.define();class ds{constructor(e,n="nearest",r="nearest",i=5,o=5,a=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=a}map(e){return e.empty?this:new ds(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new ds($e.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const xu=$t.define({map:(t,e)=>t.map(e)}),aT=$t.define();function Lr(t,e,n){let r=t.facet(eT);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const ao=Ge.define({combine:t=>t.length?t[0]:!0});let fV=0;const ns=Ge.define({combine(t){return t.filter((e,n)=>{for(let r=0;r{let l=[];return a&&l.push(ic.of(c=>{let u=c.plugin(s);return u?a(u):dt.none})),o&&l.push(o(s)),l})}static fromClass(e,n){return kn.define((r,i)=>new e(r,i),n)}}class Sm{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Lr(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){Lr(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Lr(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const sT=Ge.define(),K0=Ge.define(),ic=Ge.define(),lT=Ge.define(),Dc=Ge.define(),cT=Ge.define();function O1(t,e){let n=t.state.facet(cT);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return Ht.spans(r,e.from,e.to,{point(){},span(o,a,s,l){let c=o-e.from,u=a-e.from,d=i;for(let f=s.length-1;f>=0;f--,l--){let h=s[f].spec.bidiIsolate,m;if(h==null&&(h=dV(e.text,c,u)),l>0&&d.length&&(m=d[d.length-1]).to==c&&m.direction==h)m.to=u,d=m.inner;else{let p={from:c,to:u,direction:h,inner:[]};d.push(p),d=p.inner}}}}),i}const uT=Ge.define();function J0(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(uT)){let a=o(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(r=Math.max(r,a.top)),a.bottom!=null&&(i=Math.max(i,a.bottom)))}return{left:e,right:n,top:r,bottom:i}}const vl=Ge.define();class di{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new di(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toAu)break;o+=2}if(!l)return r;new di(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),a=l.toA,s=l.toB}}}class qd{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Hn.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,a,s,l)=>i.push(new di(o,a,s,l))),this.changedRanges=i}static create(e,n,r){return new qd(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class b1 extends dn{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=dt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new zn],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new di(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:c,toA:u})=>uthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!bV(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?mV(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;r=new di(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(qe.ie||qe.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.updateDeco(),l=vV(a,s,e.changes);return r=di.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=qe.chrome||qe.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||i.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?i[a]:null;if(!s)break;let{fromA:l,toA:c,fromB:u,toB:d}=s,f,h,m,p;if(r&&r.range.fromBu){let S=kl.build(this.view.state.doc,u,r.range.fromB,this.decorations,this.dynamicDecorationMap),x=kl.build(this.view.state.doc,r.range.toB,d,this.decorations,this.dynamicDecorationMap);h=S.breakAtStart,m=S.openStart,p=x.openEnd;let $=this.compositionView(r);x.breakAtStart?$.breakAfter=1:x.content.length&&$.merge($.length,$.length,x.content[0],!1,x.openStart,0)&&($.breakAfter=x.content[0].breakAfter,x.content.shift()),S.content.length&&$.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),f=S.content.concat($).concat(x.content)}else({content:f,breakAtStart:h,openStart:m,openEnd:p}=kl.build(this.view.state.doc,u,d,this.decorations,this.dynamicDecorationMap));let{i:g,off:O}=o.findPos(c,1),{i:v,off:y}=o.findPos(l,-1);j_(this,v,y,g,O,f,h,m,p)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(aT)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new _i(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new po(i,[n],n.length);let r=new zn;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,a)=>{a.flags|=8|(a.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(a);let s=dn.get(o);s&&s!=a&&(s.dom=null),a.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&!(this.view.state.facet(ao)||this.dom.tabIndex>-1)&&sd(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),c=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(qe.gecko&&s.empty&&!this.hasComposition&&hV(l)){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=c=new mr(d,0),a=!0}let u=this.view.observer.selectionRange;(a||!u.focusNode||(!El(l.node,l.offset,u.anchorNode,u.anchorOffset)||!El(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{qe.android&&qe.chrome&&this.dom.contains(u.focusNode)&&OV(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=rc(this.view.root);if(d)if(s.empty){if(qe.gecko){let f=pV(l.node,l.offset);if(f&&f!=3){let h=(f==1?Q_:N_)(l.node,l.offset);h&&(l=new mr(h.node,h.offset))}}d.collapse(l.node,l.offset),s.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=s.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(c.node,c.offset)}catch{}}else{let f=document.createRange();s.anchor>s.head&&([l,c]=[c,l]),f.setEnd(c.node,c.offset),f.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(f)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new mr(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new mr(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&El(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=rc(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let a=zn.find(this,n.head);if(!a)return;let s=a.posAtStart;if(n.head==s||n.head==s+a.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i=0;i--){let o=dn.get(n.childNodes[i]);o instanceof zn&&(r=o.domAtPos(o.length))}return r?new mr(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=dn.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n=0;a--){let s=this.children[a],l=o-s.breakAfter,c=l-s.length;if(le||s.covers(1))&&(!r||s instanceof zn&&!(r instanceof zn&&n>=0)))r=s,i=c;else if(r&&c==e&&l==e&&s instanceof uo&&Math.abs(n)<2){if(s.deco.startSide<0)break;a&&(r=null)}o=c}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof zn))return null;for(;i.children.length;){let{i:s,off:l}=i.childPos(r,1);for(;;s++){if(s==i.children.length)return null;if((i=i.children[s]).length)break}r=l}if(!(i instanceof _i))return null;let o=rr(i.text,r);if(o==r)return null;let a=_a(i.dom,r,o).getClientRects();for(let s=0;sMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==yn.LTR;for(let c=0,u=0;ui)break;if(c>=r){let h=d.dom.getBoundingClientRect();if(n.push(h.height),a){let m=d.dom.lastChild,p=m?_s(m):[];if(p.length){let g=p[p.length-1],O=l?g.right-h.left:h.right-g.left;O>s&&(s=O,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=f)}}}c=f+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?yn.RTL:yn.LTR}measureTextSize(){for(let o of this.children)if(o instanceof zn){let a=o.measureTextSize();if(a)return a}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=_s(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new z_(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],a=o?o.from-1:this.length;if(a>r){let s=(n.lineBlockAt(a).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(dt.replace({widget:new Ig(s),block:!0,inclusive:!0,isBlockGap:!0}).range(r,a))}if(!o)break;r=o.to+1}return dt.set(e)}updateDeco(){let e=1,n=this.view.state.facet(ic).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet(lT).map((o,a)=>{let s=typeof o=="function";return s&&(r=!0),s?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Ht.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=J0(this.view),a={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:s,offsetHeight:l}=this.view.scrollDOM;FH(this.view.scrollDOM,a,n.head{re.from&&(n=!0)}),n}function yV(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return $e.cursor(e);o==0?n=1:o==i.length&&(n=-1);let a=o,s=o;n<0?a=rr(i.text,o,!1):s=rr(i.text,o);let l=r(i.text.slice(a,s));for(;a>0;){let c=rr(i.text,a,!1);if(r(i.text.slice(c,a))!=l)break;a=c}for(;st?e.left-t:Math.max(0,t-e.right)}function xV(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function xm(t,e){return t.tope.top+1}function y1(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Qg(t,e,n){let r,i,o,a,s=!1,l,c,u,d;for(let m=t.firstChild;m;m=m.nextSibling){let p=_s(m);for(let g=0;gy||a==y&&o>v)&&(r=m,i=O,o=v,a=y,s=v?e0:gO.bottom&&(!u||u.bottomO.top)&&(c=m,d=O):u&&xm(u,O)?u=S1(u,O.bottom):d&&xm(d,O)&&(d=y1(d,O.top))}}if(u&&u.bottom>=n?(r=l,i=u):d&&d.top<=n&&(r=c,i=d),!r)return{node:t,offset:0};let f=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return x1(r,f,n);if(s&&r.contentEditable!="false")return Qg(r,f,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:h}}function x1(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,a=0;for(let s=0;sn?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&d=(u.left+u.right)/2,h=f;if((qe.chrome||qe.gecko)&&_a(t,s).getBoundingClientRect().left==u.right&&(h=!f),d<=0)return{node:t,offset:s+(h?1:0)};i=s+(h?1:0),o=d}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function fT(t,e,n,r=-1){var i,o;let a=t.contentDOM.getBoundingClientRect(),s=a.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:d}=e,f=d-s;if(f<0)return 0;if(f>c)return t.state.doc.length;for(let S=t.viewState.heightOracle.textHeight/2,x=!1;l=t.elementAtHeight(f),l.type!=Pr.Text;)for(;f=r>0?l.bottom+S:l.top-S,!(f>=0&&f<=c);){if(x)return n?null:0;x=!0,r=-r}d=s+f;let h=l.from;if(ht.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:$1(t,a,l,u,d);let m=t.dom.ownerDocument,p=t.root.elementFromPoint?t.root:m,g=p.elementFromPoint(u,d);g&&!t.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=p.elementFromPoint(u,d),g&&!t.contentDOM.contains(g)&&(g=null));let O,v=-1;if(g&&((i=t.docView.nearest(g))===null||i===void 0?void 0:i.isEditable)!=!1){if(m.caretPositionFromPoint){let S=m.caretPositionFromPoint(u,d);S&&({offsetNode:O,offset:v}=S)}else if(m.caretRangeFromPoint){let S=m.caretRangeFromPoint(u,d);S&&({startContainer:O,startOffset:v}=S)}O&&(!t.contentDOM.contains(O)||qe.safari&&$V(O,v,u)||qe.chrome&&CV(O,v,u))&&(O=void 0),O&&(v=Math.min(Ki(O),v))}if(!O||!t.docView.dom.contains(O)){let S=zn.find(t.docView,h);if(!S)return f>l.top+l.height/2?l.to:l.from;({node:O,offset:v}=Qg(S.dom,u,d))}let y=t.docView.nearest(O);if(!y)return null;if(y.isWidget&&((o=y.dom)===null||o===void 0?void 0:o.nodeType)==1){let S=y.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let s=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-s)*.5)/s);o+=l*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+Sg(a,o,t.state.tabSize)}function hT(t,e,n){let r,i=t;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(;;){let o=i.nextSibling;if(o){if(o.nodeName=="BR")break;return!1}else{let a=i.parentNode;if(!a||a.nodeName=="DIV")break;i=a}}return _a(t,r-1,r).getBoundingClientRect().right>n}function $V(t,e,n){return hT(t,e,n)}function CV(t,e,n){if(e!=0)return hT(t,e,n);for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():_a(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function Ng(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let o of r.type){if(o.from>e)break;if(!(o.toe)return o;(!i||o.type==Pr.Text&&(i.type!=o.type||(n<0?o.frome)))&&(i=o)}}return i||r}return r}function wV(t,e,n,r){let i=Ng(t,e.head,e.assoc||-1),o=!r||i.type!=Pr.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let a=t.dom.getBoundingClientRect(),s=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(s==yn.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(l!=null)return $e.cursor(l,n?-1:1)}return $e.cursor(n?i.to:i.from,n?-1:1)}function C1(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),a=t.textDirectionAt(i.from);for(let s=e,l=null;;){let c=uV(i,o,a,s,n),u=U_;if(!c){if(i.number==(n?t.state.doc.lines:1))return s;u=` +`,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),c=t.visualLineSide(i,!n)}if(l){if(!l(u))return s}else{if(!r)return c;l=r(u)}s=c}}function PV(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let a=r(o);return i==wn.Space&&(i=a),i==a}}function _V(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return $e.cursor(i,e.assoc);let a=e.goalColumn,s,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,e.assoc||-1),u=t.documentTop;if(c)a==null&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let h=t.viewState.lineBlockAt(i);a==null&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-h.from))),s=(o<0?h.top:h.bottom)+u}let d=l.left+a,f=r??t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let m=s+(f+h)*o,p=fT(t,{x:d,y:m},!1,o);if(ml.bottom||(o<0?pi)){let g=t.docView.coordsForChar(p),O=!g||m{if(e>o&&ei(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:$e.cursor(r,ro)&&this.lineBreak(),i=a}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,a=1,s;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),a=this.lineSeparator.length):(s=i.exec(n))&&(o=s.index,a=s[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);r=o+a}}readNode(e){if(e.cmIgnore)return;let n=dn.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(RV(e,r.node,r.offset)?n:0))}}function RV(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:o,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let s=o||a?[]:kV(e),l=new TV(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=AV(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=o&&o.node==s.focusNode&&o.offset==s.focusOffset||!Cg(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),c=a&&a.node==s.anchorNode&&a.offset==s.anchorOffset||!Cg(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset),u=e.viewport;if((qe.ios||qe.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:s}=e.bounds,l=i.from,c=null;(o===8||qe.android&&e.text.length=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:qe.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==` + `&&t.lineWrapping&&(r&&(r=$e.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:qt.of([" "])}),n)return eO(t,n,r,o);if(r&&!r.main.eq(i)){let a=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),s=t.inputState.lastSelectionOrigin,s=="select.pointer"&&(r=mT(t.state.facet(Dc).map(l=>l(t)),r))),t.dispatch({selection:r,scrollIntoView:a,userEvent:s}),!0}else return!1}function eO(t,e,n,r=-1){if(qe.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(qe.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&us(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&us(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&us(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,s=()=>a||(a=MV(t,e,n));return t.state.facet(tT).some(l=>l(t,e.from,e.to,o,s))||t.dispatch(s()),!0}function MV(t,e,n){let r,i=t.state,o=i.selection.main,a=-1;if(e.from==e.to&&e.fromo.to){let l=e.fromd(t)),c,l);e.from==u&&(a=u)}if(a>-1)r={changes:e,selection:$e.cursor(e.from+e.insert.length,-1)};else if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=o.frome.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let l=i.changes(e),c=n&&n.main.to<=l.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),d,f=n&&dT(t,n.main.head);if(f){let p=e.insert.length-(e.to-e.from);d={from:f.from,to:f.to-p}}else d=t.state.doc.lineAt(o.head);let h=o.to-e.to,m=o.to-o.from;r=i.changeByRange(p=>{if(p.from==o.from&&p.to==o.to)return{changes:l,range:c||p.map(l)};let g=p.to-h,O=g-u.length;if(p.to-p.from!=m||t.state.sliceDoc(O,g)!=u||p.to>=d.from&&p.from<=d.to)return{range:p};let v=i.changes({from:O,to:g,insert:e.insert}),y=p.to-o.to;return{changes:v,range:c?$e.range(Math.max(0,c.anchor+y),Math.max(0,c.head+y)):p.map(v)}})}else r={changes:l,selection:c&&i.selection.replaceRange(c)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function EV(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if(r=="end"){let l=Math.max(0,o-Math.min(a,s));n-=a+l-o}if(a=a?o-n:0;o-=l,s=o+(s-a),a=o}else if(s=s?o-n:0;o-=l,a=o+(a-s),s=o}return{from:o,toA:a,toB:s}}function kV(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new w1(n,r)),(i!=n||o!=r)&&e.push(new w1(i,o))),e}function AV(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?$e.single(n+e,r+e):null}class QV{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,qe.safari&&e.contentDOM.addEventListener("input",()=>null),qe.gecko&&YV(e.contentDOM.ownerDocument)}handleEvent(e){!HV(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=NV(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let a=!n[o].handlers.length,s=r[o];s&&a!=!s.handlers.length&&(i.removeEventListener(o,this.handleEvent),s=null),s||i.addEventListener(o,this.handleEvent,{passive:a})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&vT.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),qe.android&&qe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return qe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=gT.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||zV.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:qe.safari&&!qe.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function P1(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Lr(n.state,i)}}}function NV(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,o=i&&i.plugin.domEventHandlers,a=i&&i.plugin.domEventObservers;if(o)for(let s in o){let l=o[s];l&&n(s).handlers.push(P1(r.value,l))}if(a)for(let s in a){let l=a[s];l&&n(s).observers.push(P1(r.value,l))}}for(let r in Ti)n(r).handlers.push(Ti[r]);for(let r in pi)n(r).observers.push(pi[r]);return e}const gT=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],zV="dthko",vT=[16,17,18,20,91,92,224,225],$u=6;function Cu(t){return Math.max(0,t)*.7+8}function jV(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class LV{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=XH(e.contentDOM),this.atoms=e.state.facet(Dc).map(a=>a(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(jt.allowMultipleSelections)&&DV(e,n),this.dragging=WV(e,n)&&yT(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&jV(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=J0(this.view);e.clientX-l.left<=i+$u?n=-Cu(i-e.clientX):e.clientX+l.right>=a-$u&&(n=Cu(e.clientX-a)),e.clientY-l.top<=o+$u?r=-Cu(o-e.clientY):e.clientY+l.bottom>=s-$u&&(r=Cu(e.clientY-s)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=mT(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function DV(t,e){let n=t.state.facet(Y_);return n.length?n[0](e):qe.mac?e.metaKey:e.ctrlKey}function BV(t,e){let n=t.state.facet(K_);return n.length?n[0](e):qe.mac?!e.altKey:!e.ctrlKey}function WV(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=rc(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function HV(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=dn.get(n))&&r.ignoreEvent(e))return!1;return!0}const Ti=Object.create(null),pi=Object.create(null),OT=qe.ie&&qe.ie_version<15||qe.ios&&qe.webkit_version<604;function VV(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),bT(t,n.value)},50)}function hh(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function bT(t,e){e=hh(t.state,U0,e);let{state:n}=t,r,i=1,o=n.toText(e),a=o.lines==n.selection.ranges.length;if(zg!=null&&n.selection.ranges.every(l=>l.empty)&&zg==o.toString()){let l=-1;r=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let d=n.toText((a?o.line(i++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:d},range:$e.cursor(c.from+d.length)}})}else a?r=n.changeByRange(l=>{let c=o.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:$e.cursor(l.from+c.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}pi.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Ti.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);pi.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};pi.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Ti.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(J_))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=ZV(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new LV(t,e,n,r)),r&&t.observer.ignore(()=>{E_(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function _1(t,e,n,r){if(r==1)return $e.cursor(e,n);if(r==2)return yV(t.state,e,n);{let i=zn.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),a=i?i.posAtStart:o.from,s=i?i.posAtEnd:o.to;return se>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function FV(t,e,n,r){let i=zn.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let a=i.coordsAt(o,-1);if(a&&T1(n,r,a))return-1;let s=i.coordsAt(o,1);return s&&T1(n,r,s)?1:a&&a.bottom>=r?-1:1}function R1(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:FV(t,n,e.clientX,e.clientY)}}const XV=qe.ie&&qe.ie_version<=11;let I1=null,M1=0,E1=0;function yT(t){if(!XV)return t.detail;let e=I1,n=E1;return I1=t,E1=Date.now(),M1=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(M1+1)%3:1}function ZV(t,e){let n=R1(t,e),r=yT(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,a,s){let l=R1(t,o),c,u=_1(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!a){let d=_1(t,n.pos,n.bias,r),f=Math.min(d.from,u.from),h=Math.max(d.to,u.to);u=f1&&(c=qV(i,l.pos))?c:s?i.addRange(u):$e.create([u])}}}function qV(t,e){for(let n=0;n=e)return $e.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Ti.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,a=o+i.length;(o>=n.to||a<=n.from)&&(n=$e.range(o,a))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",hh(t.state,Y0,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Ti.dragend=t=>(t.inputState.draggedContent=null,!1);function k1(t,e,n,r){if(n=hh(t.state,U0,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,a=r&&o&&BV(t,e)?{from:o.from,to:o.to}:null,s={from:i,insert:n},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Ti.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&k1(t,e,r.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(r[a]=s.result),o()},s.readAsText(n[a])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return k1(t,e,r,!0),!0}return!1};Ti.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=OT?null:e.clipboardData;return n?(bT(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(VV(t),!1)};function GV(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function UV(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let a=t.doc.lineAt(o);a.number>i&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),i=a.number}r=!0}return{text:hh(t,Y0,e.join(t.lineBreak)),ranges:n,linewise:r}}let zg=null;Ti.copy=Ti.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=UV(t.state);if(!n&&!i)return!1;zg=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=OT?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(GV(t,n),!1)};const ST=eo.define();function xT(t,e){let n=[];for(let r of t.facet(nT)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:ST.of(!0)}):null}function $T(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=xT(t.state,e);n?t.dispatch(n):t.update([])}},10)}pi.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),$T(t)};pi.blur=t=>{t.observer.clearSelectionRange(),$T(t)};pi.compositionstart=pi.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};pi.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,qe.chrome&&qe.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};pi.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Ti.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let o=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(o&&a.length){let s=a[0],l=t.posAtDOM(s.startContainer,s.startOffset),c=t.posAtDOM(s.endContainer,s.endOffset);return eO(t,{from:l,to:c,insert:t.state.toText(o)},null),!0}}let i;if(qe.chrome&&qe.android&&(i=gT.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return qe.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),qe.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>pi.compositionend(t,e),20),!1};const A1=new Set;function YV(t){A1.has(t)||(A1.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Q1=["pre-wrap","normal","pre-line","break-spaces"];let Is=!1;function N1(){Is=!1}class KV{constructor(e){this.lineWrapping=e,this.doc=qt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Q1.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>cd&&(Is=!0),this.height=e)}replace(e,n,r){return _r.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,a=r.doc;for(let s=i.length-1;s>=0;s--){let{fromA:l,toA:c,fromB:u,toB:d}=i[s],f=o.lineAt(l,On.ByPosNoHeight,r.setDoc(n),0,0),h=f.to>=c?f:o.lineAt(c,On.ByPosNoHeight,r,0,0);for(d+=h.to-c,c=h.to;s>0&&f.from<=i[s-1].toA;)l=i[s-1].fromA,u=i[s-1].fromB,s--,lo*2){let s=e[n-1];s.break?e.splice(--n,1,s.left,null,s.right):e.splice(--n,1,s.left,s.right),r+=1+s.break,i-=s.size}else if(o>i*2){let s=e[r];s.break?e.splice(r,1,s.left,null,s.right):e.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else break;else if(i=o&&a(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Gr extends CT{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new Bi(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Gr||i instanceof er&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof er?i=new Gr(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):_r.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class er extends _r{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,a,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);a=l/o,this.length>o+1&&(s=(this.height-l)/(this.length-o-1))}else a=this.height/o;return{firstLine:r,lastLine:i,perLine:a,perChar:s}}blockAt(e,n,r,i){let{firstLine:o,lastLine:a,perLine:s,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e0){let o=r[r.length-1];o instanceof er?r[r.length-1]=new er(o.length+i):r.push(null,new er(i-1))}if(e>0){let o=r[0];o instanceof er?r[0]=new er(e+o.length):r.unshift(new er(e-1),null)}return _r.of(r)}decomposeLeft(e,n){n.push(new er(e-1),null)}decomposeRight(e,n){n.push(null,new er(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let a=[],s=Math.max(n,i.from),l=-1;for(i.from>n&&a.push(new er(i.from-n-1).updateHeight(e,n));s<=o&&i.more;){let u=e.doc.lineAt(s).length;a.length&&a.push(null);let d=i.heights[i.index++];l==-1?l=d:Math.abs(d-l)>=cd&&(l=-2);let f=new Gr(u,d);f.outdated=!1,a.push(f),s+=u+1}s<=o&&a.push(null,new er(o-s).updateHeight(e,s));let c=_r.of(a);return(l<0||Math.abs(c.height-this.height)>=cd||Math.abs(l-this.heightMetrics(e,n).perLine)>=cd)&&(Is=!0),Gd(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class eF extends _r{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return es))return c;let u=n==On.ByPosNoHeight?On.ByPosNoHeight:On.ByPos;return l?c.join(this.right.lineAt(s,u,r,a,s)):this.left.lineAt(s,u,r,i,o).join(c)}forEachLine(e,n,r,i,o,a){let s=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,r,s,l,a);else{let c=this.lineAt(l,On.ByPos,r,i,o);e=e&&c.from<=n&&a(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,s,l,a)}}replace(e,n,r){let i=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let a=o.length;for(let s of r)o.push(s);if(e>0&&z1(o,a-1),n=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e2*n.size||n.size>2*e.size?_r.of(this.break?[e,null,n]:[e,n]):(this.left=Gd(this.left,e),this.right=Gd(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:a}=this,s=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=s+a.length&&i.more?l=a=a.updateHeight(e,s,r,i):a.updateHeight(e,s,r),l?this.balanced(o,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function z1(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof er&&(r=t[e+1])instanceof er&&t.splice(e-1,3,new er(n.length+1+r.length))}const tF=5;class tO{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Gr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Gr(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e=tF)&&this.addLineDeco(i,o,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Gr(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new er(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Gr)return e;let n=new Gr(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Gr)&&!this.isCovered?this.nodes.push(new Gr(0,-1)):(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&d.overflow!="visible"){let f=u.getBoundingClientRect();o=Math.max(o,f.left),a=Math.min(a,f.right),s=Math.max(s,f.top),l=Math.min(c==t.parentNode?i.innerHeight:l,f.bottom)}c=d.position=="absolute"||d.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}}function oF(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left0&&e.top0}function aF(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Cm{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new KV(n),this.stateDeco=e.facet(ic).filter(r=>typeof r!="function"),this.heightMap=_r.empty().applyChanges(this.stateDeco,qt.empty,this.heightOracle.setDoc(e.doc),[new di(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=dt.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:a})=>i>=o&&i<=a)){let{from:o,to:a}=this.lineBlockAt(i);e.push(new wu(o,a))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?L1:new nO(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(bl(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(ic).filter(u=>typeof u!="function");let i=e.changedRanges,o=di.extendWithRanges(i,nF(r,this.stateDeco,e?e.changes:Hn.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);N1(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=a||Is)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(iT)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?yn.RTL:yn.LTR;let a=this.heightOracle.mustRefreshForWrapping(o),s=n.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let c=0,u=0;if(s.width&&s.height){let{scaleX:S,scaleY:x}=M_(n,s);(S>.005&&Math.abs(this.scaleX-S)>.005||x>.005&&Math.abs(this.scaleY-x)>.005)&&(this.scaleX=S,this.scaleY=x,c|=16,a=l=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=f)&&(this.paddingTop=d,this.paddingBottom=f,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=A_(e.scrollDOM);let m=(this.printing?aF:iF)(n,this.paddingTop),p=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let O=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(O!=this.inView&&(this.inView=O,O&&(l=!0)),!this.inView&&!this.scrollTarget&&!oF(e.dom))return 0;let v=s.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(S)&&(a=!0),a||i.lineWrapping&&Math.abs(v-this.contentDOMWidth)>i.charWidth){let{lineHeight:x,charWidth:$,textHeight:C}=e.docView.measureTextSize();a=x>0&&i.refresh(o,x,$,C,Math.max(5,v/$),S),a&&(e.docView.minWidth=0,c|=16)}p>0&&g>0?u=Math.max(p,g):p<0&&g<0&&(u=Math.min(p,g)),N1();for(let x of this.viewports){let $=x.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(x);this.heightMap=(a?_r.empty().applyChanges(this.stateDeco,qt.empty,this.heightOracle,[new di(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,a,new JV(x.from,$))}Is&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new wu(i.lineAt(a-r*1e3,On.ByHeight,o,0,0).from,i.lineAt(s+(1-r)*1e3,On.ByHeight,o,0,0).to);if(n){let{head:c}=n.range;if(cl.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=i.lineAt(c,On.ByPos,o,0,0),f;n.y=="center"?f=(d.top+d.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c=s+Math.max(10,Math.min(r,250)))&&i>a-2*1e3&&o>1,a=i<<1;if(this.defaultTextDirection!=yn.LTR&&!r)return[];let s=[],l=(u,d,f,h)=>{if(d-uu&&OO.from>=f.from&&O.to<=f.to&&Math.abs(O.from-u)O.fromv));if(!g){if(dy.from<=d&&y.to>=d)){let y=n.moveToLineBoundary($e.cursor(d),!1,!0).head;y>u&&(d=y)}let O=this.gapSize(f,u,d,h),v=r||O<2e6?O:2e6;g=new Cm(u,d,O,v)}s.push(g)},c=u=>{if(u.length2e6)for(let $ of e)$.from>=u.from&&$.fromu.from&&l(u.from,h,u,d),mn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];Ht.spans(n,this.viewport.from,this.viewport.to,{span(o,a){r.push({from:o,to:a})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let o=0;o=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||bl(this.heightMap.lineAt(e,On.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||bl(this.heightMap.lineAt(this.scaler.fromDOM(e),On.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return bl(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class wu{constructor(e,n){this.from=e,this.to=n}}function lF(t,e,n){let r=[],i=t,o=0;return Ht.spans(n,t,e,{span(){},point(a,s){a>i&&(r.push({from:i,to:a}),o+=a-i),i=s}},20),i=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:a}=e[i],s=a-o;if(r<=s)return o+r;r-=s}}function _u(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function cF(t,e){for(let n of t)if(e(n))return n}const L1={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class nO{constructor(e,n,r){let i=0,o=0,a=0;this.viewports=r.map(({from:s,to:l})=>{let c=n.lineAt(s,On.ByPos,e,0,0).top,u=n.lineAt(l,On.ByPos,e,0,0).bottom;return i+=u-c,{from:s,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let s of this.viewports)s.domTop=a+(s.top-o)*this.scale,a=s.domBottom=s.domTop+(s.bottom-s.top),o=s.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=nn.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function bl(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Bi(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>bl(i,e)):t._content)}const Tu=Ge.define({combine:t=>t.join(" ")}),jg=Ge.define({combine:t=>t.indexOf(!0)>-1}),Lg=Bo.newName(),wT=Bo.newName(),PT=Bo.newName(),_T={"&light":"."+wT,"&dark":"."+PT};function Dg(t,e,n){return new Bo(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const uF=Dg("."+Lg,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},_T),dF={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},wm=qe.ie&&qe.ie_version<=11;class fF{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new ZH,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(qe.ie&&qe.ie_version<=11||qe.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&qe.android&&e.constructor.EDIT_CONTEXT!==!1&&!(qe.chrome&&qe.chrome_version<126)&&(this.editContext=new mF(e),e.state.facet(ao)&&(e.contentDOM.editContext=this.editContext.editContext)),wm&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(ao)?r.root.activeElement!=this.dom:!sd(this.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(qe.ie&&qe.ie_version<=11||qe.android&&qe.chrome)&&!r.state.selection.main.empty&&i.focusNode&&El(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=rc(e.root);if(!n)return!1;let r=qe.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&hF(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=sd(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&us(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let a=this.readMutation(o);a&&(a.typeOver&&(i=!0),n==-1?{from:n,to:r}=a:(n=Math.min(a.from,n),r=Math.max(a.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&sd(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new IV(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=pT(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=D1(n,e.previousSibling||e.target.previousSibling,-1),i=D1(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(ao)!=e.state.facet(ao)&&(e.view.contentDOM.editContext=e.state.facet(ao)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function D1(t,e,n){for(;e;){let r=dn.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function B1(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return El(a.node,a.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function hF(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return B1(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?B1(t,n):null}class mF{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:o,head:a}=i,s=this.toEditorPos(r.updateRangeStart),l=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:s,drifted:!1});let c={from:s,to:l,insert:qt.of(r.text.split(` +`))};if(c.from==this.from&&othis.to&&(c.to=o),c.from==c.to&&!c.insert.length){let u=$e.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));u.main.eq(i)||e.dispatch({selection:u,userEvent:"select"});return}if((qe.mac||qe.android)&&c.from==a-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(c={from:s,to:l,insert:qt.of([r.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let u=this.to-this.from+(c.to-c.from+c.insert.length);eO(e,c,$e.single(this.toEditorPos(r.selectionStart,u),this.toEditorPos(r.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),c.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],o=null;for(let a=this.toEditorPos(r.rangeStart),s=this.toEditorPos(r.rangeEnd);a{let i=[];for(let o of r.getTextFormats()){let a=o.underlineStyle,s=o.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(s)){let l=this.toEditorPos(o.rangeStart),c=this.toEditorPos(o.rangeEnd);if(l{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=rc(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,a,s,l,c)=>{if(r)return;let u=c.length-(a-o);if(i&&a>=i.to)if(i.from==o&&i.to==a&&i.insert.eq(c)){i=this.pendingContextChange=null,n+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(o+=n,a+=n,a<=this.from)this.from+=u,this.to+=u;else if(othis.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(a),c.toString()),this.to+=u}n+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class De{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(o=>r(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||qH(e.parent)||document,this.viewState=new j1(e.state||jt.create(e)),e.scrollTo&&e.scrollTo.is(xu)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(ns).map(i=>new Sm(i));for(let i of this.plugins)i.update(this);this.observer=new fF(this),this.inputState=new QV(this),this.inputState.ensureHandlers(this.plugins),this.docView=new b1(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Ln?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let f of e){if(f.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let a=this.hasFocus,s=0,l=null;e.some(f=>f.annotation(ST))?(this.inputState.notifiedFocused=a,s=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,l=xT(o,a),l||(s=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(jt.phrases)!=this.state.facet(jt.phrases))return this.setState(o);i=qd.create(this,o,e),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(d&&(d=d.map(f.changes)),f.scrollIntoView){let{main:h}=f.state.selection;d=new ds(h.empty?h:$e.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of f.effects)h.is(xu)&&(d=h.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Ud.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(vl)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Tu)!=i.state.facet(Tu)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let f of this.state.facet(Ag))try{f(i)}catch(h){Lr(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!pT(this,u)&&c.force&&us(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new j1(e),this.plugins=e.facet(ns).map(r=>new Sm(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new b1(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(ns),r=e.state.facet(ns);if(n!=r){let i=[];for(let o of r){let a=n.indexOf(o);if(a<0)i.push(new Sm(o));else{let s=this.plugins[a];s.mustUpdate=e,i.push(s)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:a}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(a<0)if(A_(r))o=-1,a=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);o=h.from,a=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(m){return Lr(this.state,m),W1}}),d=qd.create(this,this.state,[]),f=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),f=this.docView.update(d),f&&this.docViewUpdate());for(let h=0;h1||m<-1){i=i+m,r.scrollTop=i/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let s of this.state.facet(Ag))s(n)}get themeClasses(){return Lg+" "+(this.state.facet(jg)?PT:wT)+" "+this.state.facet(Tu)}updateAttrs(){let e=H1(this,sT,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(ao)?"true":"false",class:"cm-content",style:`${qe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),H1(this,K0,n);let r=this.observer.ignore(()=>{let i=Rg(this.contentDOM,this.contentAttrs,n),o=Rg(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(De.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(vl);let e=this.state.facet(De.cspNonce);Bo.mount(this.root,this.styleModules.concat(uF).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;nr.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return $m(this,e,C1(this,e,n,r))}moveByGroup(e,n){return $m(this,e,C1(this,e,n,r=>PV(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return $e.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return wV(this,e,n,r)}moveVertically(e,n,r){return $m(this,e,_V(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),fT(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),a=o[Ao.find(o,e-i.from,-1,n)];return zc(r,a.dir==yn.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(rT)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>pF)return G_(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||q_(o.isolates,r=O1(this,e))))return o.order;r||(r=O1(this,e));let i=cV(e.text,n,r);return this.bidiCache.push(new Ud(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||qe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{E_(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return xu.of(new ds(typeof e=="number"?$e.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return xu.of(new ds($e.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return kn.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return kn.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Bo.newName(),i=[Tu.of(r),vl.of(Dg(`.${r}`,e))];return n&&n.dark&&i.push(jg.of(!0)),i}static baseTheme(e){return Zo.lowest(vl.of(Dg("."+Lg,e,_T)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&dn.get(r)||dn.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}De.styleModule=vl;De.inputHandler=tT;De.clipboardInputFilter=U0;De.clipboardOutputFilter=Y0;De.scrollHandler=oT;De.focusChangeEffect=nT;De.perLineTextDirection=rT;De.exceptionSink=eT;De.updateListener=Ag;De.editable=ao;De.mouseSelectionStyle=J_;De.dragMovesSelection=K_;De.clickAddsSelectionRange=Y_;De.decorations=ic;De.outerDecorations=lT;De.atomicRanges=Dc;De.bidiIsolatedRanges=cT;De.scrollMargins=uT;De.darkTheme=jg;De.cspNonce=Ge.define({combine:t=>t.length?t[0]:""});De.contentAttributes=K0;De.editorAttributes=sT;De.lineWrapping=De.contentAttributes.of({class:"cm-lineWrapping"});De.announce=$t.define();const pF=4096,W1={};class Ud{constructor(e,n,r,i,o,a){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=a}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:yn.LTR;for(let o=Math.max(0,e.length-10);o=0;i--){let o=r[i],a=typeof o=="function"?o(t):o;a&&Tg(a,n)}return n}const gF=qe.mac?"mac":qe.windows?"win":qe.linux?"linux":"key";function vF(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,a,s;for(let l=0;lr.concat(i),[]))),n}function bF(t,e,n){return RT(TT(t.state),e,t,n)}let To=null;const yF=4e3;function SF(t,e=gF){let n=Object.create(null),r=Object.create(null),i=(a,s)=>{let l=r[a];if(l==null)r[a]=s;else if(l!=s)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},o=(a,s,l,c,u)=>{var d,f;let h=n[a]||(n[a]=Object.create(null)),m=s.split(/ (?!$)/).map(O=>vF(O,e));for(let O=1;O{let S=To={view:y,prefix:v,scope:a};return setTimeout(()=>{To==S&&(To=null)},yF),!0}]})}let p=m.join(" ");i(p,!1);let g=h[p]||(h[p]={preventDefault:!1,stopPropagation:!1,run:((f=(d=h._any)===null||d===void 0?void 0:d.run)===null||f===void 0?void 0:f.slice())||[]});l&&g.run.push(l),c&&(g.preventDefault=!0),u&&(g.stopPropagation=!0)};for(let a of t){let s=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let c of s){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:d}=a;for(let f in u)u[f].run.push(h=>d(h,Bg))}let l=a[e]||a.key;if(l)for(let c of s)o(c,l,a.run,a.preventDefault,a.stopPropagation),a.shift&&o(c,"Shift-"+l,a.shift,a.preventDefault,a.stopPropagation)}return n}let Bg=null;function RT(t,e,n,r){Bg=e;let i=HH(e),o=Nr(i,0),a=Di(o)==i.length&&i!=" ",s="",l=!1,c=!1,u=!1;To&&To.view==n&&To.scope==r&&(s=To.prefix+" ",vT.indexOf(e.keyCode)<0&&(c=!0,To=null));let d=new Set,f=g=>{if(g){for(let O of g.run)if(!d.has(O)&&(d.add(O),O(n)))return g.stopPropagation&&(u=!0),!0;g.preventDefault&&(g.stopPropagation&&(u=!0),c=!0)}return!1},h=t[r],m,p;return h&&(f(h[s+Ru(i,e,!a)])?l=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(qe.windows&&e.ctrlKey&&e.altKey)&&!(qe.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(m=Wo[e.keyCode])&&m!=i?(f(h[s+Ru(m,e,!0)])||e.shiftKey&&(p=nc[e.keyCode])!=i&&p!=m&&f(h[s+Ru(p,e,!1)]))&&(l=!0):a&&e.shiftKey&&f(h[s+Ru(i,e,!0)])&&(l=!0),!l&&f(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),Bg=null,l}class Wc{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=IT(e);return[new Wc(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return xF(e,n,r)}}function IT(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==yn.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function F1(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let o=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:o.left+1,y:a}),l=t.posAtCoords({x:o.right-1,y:a});return s==null||l==null?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}function xF(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==yn.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=IT(t),c=a.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=s.right-(u?parseInt(u.paddingRight):0),h=Ng(t,r,1),m=Ng(t,i,-1),p=h.type==Pr.Text?h:null,g=m.type==Pr.Text?m:null;if(p&&(t.lineWrapping||h.widgetLineBreaks)&&(p=F1(t,r,1,p)),g&&(t.lineWrapping||m.widgetLineBreaks)&&(g=F1(t,i,-1,g)),p&&g&&p.from==g.from&&p.to==g.to)return v(y(n.from,n.to,p));{let x=p?y(n.from,null,p):S(h,!1),$=g?y(null,n.to,g):S(m,!0),C=[];return(p||h).to<(g||m).from-(p&&g?1:0)||h.widgetLineBreaks>1&&x.bottom+t.defaultLineHeight/2<$.top?C.push(O(d,x.bottom,f,$.top)):x.bottom<$.top&&t.elementAtHeight((x.bottom+$.top)/2).type==Pr.Text&&(x.bottom=$.top=(x.bottom+$.top)/2),v(x).concat(C).concat(v($))}function O(x,$,C,P){return new Wc(e,x-l.left,$-l.top,C-x,P-$)}function v({top:x,bottom:$,horizontal:C}){let P=[];for(let w=0;wI&&M.from=E)break;B>Q&&R(Math.max(L,Q),x==null&&L<=I,Math.min(B,E),$==null&&B>=T,z.dir)}if(Q=k.to+1,Q>=E)break}return _.length==0&&R(I,x==null,T,$==null,t.textDirection),{top:P,bottom:w,horizontal:_}}function S(x,$){let C=s.top+($?x.top:x.bottom);return{top:C,bottom:C,horizontal:[]}}}function $F(t,e){return t.constructor==e.constructor&&t.eq(e)}class CF{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(ud)!=e.state.facet(ud)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(ud);for(;n!$F(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e,qe.ios&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const ud=Ge.define();function MT(t){return[kn.define(e=>new CF(e,t)),ud.of(t)]}const oc=Ge.define({combine(t){return to(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function wF(t={}){return[oc.of(t),PF,_F,TF,iT.of(!0)]}function ET(t){return t.startState.facet(oc)!=t.state.facet(oc)}const PF=MT({above:!0,markers(t){let{state:e}=t,n=e.facet(oc),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty||n.drawRangeCursor){let a=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=i.empty?i:$e.cursor(i.head,i.head>i.anchor?-1:1);for(let l of Wc.forRange(t,a,s))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=ET(t);return n&&X1(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){X1(e.state,t)},class:"cm-cursorLayer"});function X1(t,e){e.style.animationDuration=t.facet(oc).cursorBlinkRate+"ms"}const _F=MT({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Wc.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||ET(t)},class:"cm-selectionLayer"}),TF=Zo.highest(De.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),kT=$t.define({map(t,e){return t==null?null:e.mapPos(t)}}),yl=Yn.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(kT)?r.value:n,t)}}),RF=kn.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(yl);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(yl)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(yl),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(yl)!=t&&this.view.dispatch({effects:kT.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function IF(){return[yl,RF]}function Z1(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=e.exec(o.value);)i(a+s.index,s)}function MF(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class EF{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(s,l,c,u)=>i(u,c,c+s[0].length,s,l);else if(typeof r=="function")this.addMatch=(s,l,c,u)=>{let d=r(s,l,c);d&&u(c,c+s[0].length,d)};else if(r)this.addMatch=(s,l,c,u)=>u(c,c+s[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=a}createDeco(e){let n=new mo,r=n.add.bind(n);for(let{from:i,to:o}of MF(e,this.maxLength))Z1(e.state.doc,this.regexp,i,o,(a,s)=>this.addMatch(s,e,a,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,a,s,l)=>{l>=e.view.viewport.from&&s<=e.view.viewport.to&&(r=Math.min(s,r),i=Math.max(l,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let a=Math.max(o.from,r),s=Math.min(o.to,i);if(s>=a){let l=e.state.doc.lineAt(a),c=l.tol.from;a--)if(this.boundary.test(l.text[a-1-l.from])){u=a;break}for(;sf.push(O.range(p,g));if(l==c)for(this.regexp.lastIndex=u-l.from;(h=this.regexp.exec(l.text))&&h.indexthis.addMatch(g,e,p,m));n=n.update({filterFrom:u,filterTo:d,filter:(p,g)=>pd,add:f})}}return n}}const Wg=/x/.unicode!=null?"gu":"g",kF=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Wg),AF={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Pm=null;function QF(){var t;if(Pm==null&&typeof document<"u"&&document.body){let e=document.body.style;Pm=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Pm||!1}const dd=Ge.define({combine(t){let e=to(t,{render:null,specialChars:kF,addSpecialChars:null});return(e.replaceTabs=!QF())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Wg)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Wg)),e}});function NF(t={}){return[dd.of(t),zF()]}let q1=null;function zF(){return q1||(q1=kn.fromClass(class{constructor(t){this.view=t,this.decorations=dt.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(dd)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new EF({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=Nr(e[0],0);if(o==9){let a=i.lineAt(r),s=n.state.tabSize,l=Xs(a.text,s,r-a.from);return dt.replace({widget:new BF((s-l%s)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=dt.replace({widget:new DF(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(dd);t.startState.facet(dd)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const jF="•";function LF(t){return t>=32?jF:t==10?"␤":String.fromCharCode(9216+t)}class DF extends no{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=LF(this.code),r=e.state.phrase("Control character")+" "+(AF[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class BF extends no{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function WF(){return VF}const HF=dt.line({class:"cm-activeLine"}),VF=kn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(HF.range(i.from)),e=i.from)}return dt.set(n)}},{decorations:t=>t.decorations});class FF extends no{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?_s(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=zc(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}}function XF(t){let e=kn.fromClass(class{constructor(n){this.view=n,this.placeholder=t?dt.set([dt.widget({widget:new FF(t),side:1}).range(0)]):dt.none}get decorations(){return this.view.state.doc.length?dt.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,De.contentAttributes.of({"aria-placeholder":t})]:e}const Hg=2e3;function ZF(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>Hg||n.off>Hg||e.col<0||n.col<0){let a=Math.min(e.off,n.off),s=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let c=t.doc.line(l);c.length<=s&&o.push($e.range(c.from+a,c.to+s))}}else{let a=Math.min(e.col,n.col),s=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let c=t.doc.line(l),u=Sg(c.text,a,t.tabSize,!0);if(u<0)o.push($e.cursor(c.to));else{let d=Sg(c.text,s,t.tabSize);o.push($e.range(c.from+u,c.from+d))}}}return o}function qF(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function G1(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>Hg?-1:i==r.length?qF(t,e.clientX):Xs(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function GF(t,e){let n=G1(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),a=i.state.doc.lineAt(o);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},r=r.map(i.changes)}},get(i,o,a){let s=G1(t,i);if(!s)return r;let l=ZF(t.state,n,s);return l.length?a?$e.create(l.concat(r.ranges)):$e.create(l):r}}:null}function UF(t){let e=n=>n.altKey&&n.button==0;return De.mouseSelectionStyle.of((n,r)=>e(r)?GF(n,r):null)}const YF={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},KF={style:"cursor: crosshair"};function JF(t={}){let[e,n]=YF[t.key||"Alt"],r=kn.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,De.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?KF:null})]}const sl="-10000px";class AT{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let o=null;this.tooltipViews=this.tooltips.map(a=>o=r(a,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let a=[],s=n?[]:null;for(let l=0;ln[c]=l),n.length=s.length),this.input=i,this.tooltips=o,this.tooltipViews=a,!0}}function eX(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const _m=Ge.define({combine:t=>{var e,n,r;return{position:qe.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||eX}}}),U1=new WeakMap,rO=kn.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(_m);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new AT(t,iO,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(_m);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=sl,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(qe.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==sl&&o.style.left=="0px"){let a=o.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=J0(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((o,a)=>{let s=this.manager.tooltipViews[a];return s.getCoords?s.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(_m).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:o}=t,a=[];for(let s=0;s=Math.min(n.bottom,r.bottom)||d.rightMath.min(n.right,r.right)+.1)){u.style.top=sl;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,m=h?7:0,p=f.right-f.left,g=(e=U1.get(c))!==null&&e!==void 0?e:f.bottom-f.top,O=c.offset||nX,v=this.view.textDirection==yn.LTR,y=f.width>r.right-r.left?v?r.left:r.right-f.width:v?Math.max(r.left,Math.min(d.left-(h?14:0)+O.x,r.right-p)):Math.min(Math.max(r.left,d.left-p+(h?14:0)-O.x),r.right-p),S=this.above[s];!l.strictSide&&(S?d.top-g-m-O.yr.bottom)&&S==r.bottom-d.bottom>d.top-r.top&&(S=this.above[s]=!S);let x=(S?d.top-r.top:r.bottom-d.bottom)-m;if(xy&&P.top<$+g&&P.bottom>$&&($=S?P.top-g-2-m:P.bottom+m+2);if(this.position=="absolute"?(u.style.top=($-t.parent.top)/o+"px",Y1(u,(y-t.parent.left)/i)):(u.style.top=$/o+"px",Y1(u,y/i)),h){let P=d.left+(v?O.x:-O.x)-(y+14-7);h.style.left=P/i+"px"}c.overlap!==!0&&a.push({left:y,top:$,right:C,bottom:$+g}),u.classList.toggle("cm-tooltip-above",S),u.classList.toggle("cm-tooltip-below",!S),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=sl}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Y1(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const tX=De.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),nX={x:0,y:0},iO=Ge.define({enables:[rO,tX]}),Yd=Ge.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class mh{static create(e){return new mh(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new AT(e,Yd,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const rX=iO.compute([Yd],t=>{let e=t.facet(Yd);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:mh.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class iX{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;es.bottom||n.xs.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=l&&l.dir==yn.RTL?-1:1;o=n.x{this.pending==s&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Lr(e.state,l,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(rO),n=e?e.manager.tooltips.findIndex(r=>r.create==mh.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!oX(o.dom,e)||this.pending){let{pos:a}=i[0]||this.pending,s=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:a;(a==s?this.view.posAtCoords(this.lastMove)!=a:!aX(this.view,a,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Iu=4;function oX(t,e){let{left:n,right:r,top:i,bottom:o}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let s=a.getBoundingClientRect();i=Math.min(s.top,i),o=Math.max(s.bottom,o)}return e.clientX>=n-Iu&&e.clientX<=r+Iu&&e.clientY>=i-Iu&&e.clientY<=o+Iu}function aX(t,e,n,r,i,o){let a=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>r||a.righti||Math.min(a.bottom,s)=e&&l<=n}function sX(t,e={}){let n=$t.define(),r=Yn.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(a=>!e.hideOn(o,a))),o.docChanged)){let a=[];for(let s of i){let l=o.changes.mapPos(s.pos,-1,nr.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),s);c.pos=l,c.end!=null&&(c.end=o.changes.mapPos(c.end)),a.push(c)}}i=a}for(let a of o.effects)a.is(n)&&(i=a.value),a.is(lX)&&(i=[]);return i},provide:i=>Yd.from(i)});return{active:r,extension:[r,kn.define(i=>new iX(i,t,r,n,e.hoverTime||300)),rX]}}function QT(t,e){let n=t.plugin(rO);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const lX=$t.define(),K1=Ge.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function ac(t,e){let n=t.plugin(NT),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const NT=kn.fromClass(class{constructor(t){this.input=t.state.facet(sc),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(K1);this.top=new Mu(t,!0,e.topContainer),this.bottom=new Mu(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(K1);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Mu(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Mu(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(sc);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],a=[],s=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),s.push(u)):(u=this.panels[c],u.update&&u.update(t)),i.push(u),(u.top?o:a).push(u)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(a);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>De.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Mu{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=J1(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=J1(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function J1(t){let e=t.nextSibling;return t.remove(),e}const sc=Ge.define({enables:NT});class go extends wa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}go.prototype.elementClass="";go.prototype.toDOM=void 0;go.prototype.mapMode=nr.TrackBefore;go.prototype.startSide=go.prototype.endSide=-1;go.prototype.point=!0;const fd=Ge.define(),cX=Ge.define(),uX={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ht.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Ql=Ge.define();function dX(t){return[zT(),Ql.of({...uX,...t})]}const ex=Ge.define({combine:t=>t.some(e=>e)});function zT(t){return[fX]}const fX=kn.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Ql).map(e=>new nx(t,e)),this.fixed=!t.state.facet(ex);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(ex)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Ht.iter(this.view.state.facet(fd),this.view.viewport.from),r=[],i=this.gutters.map(o=>new hX(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let a=!0;for(let s of o.type)if(s.type==Pr.Text&&a){Vg(n,r,s.from);for(let l of i)l.line(this.view,s,r);a=!1}else if(s.widget)for(let l of i)l.widget(this.view,s)}else if(o.type==Pr.Text){Vg(n,r,o.from);for(let a of i)a.line(this.view,o,r)}else if(o.widget)for(let a of i)a.widget(this.view,o);for(let o of i)o.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Ql),n=t.state.facet(Ql),r=t.docChanged||t.heightChanged||t.viewportChanged||!Ht.eq(t.startState.facet(fd),t.state.facet(fd),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let a=e.indexOf(o);a<0?i.push(new nx(this.view,o)):(this.gutters[a].update(t),i.push(this.gutters[a]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)o.config.side=="after"?this.getDOMAfter().appendChild(o.dom):this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>De.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==yn.LTR?{left:r,right:i}:{right:r,left:i}})});function tx(t){return Array.isArray(t)?t:[t]}function Vg(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class hX{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Ht.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==i.elements.length){let s=new jT(e,a,o,r);i.elements.push(s),i.dom.appendChild(s.dom)}else i.elements[this.i].update(e,a,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];Vg(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let a=this.gutter;i.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let o of e.state.facet(cX)){let a=o(e,n.widget,n);a&&(i||(i=[])).push(a)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class nx{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,a;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=i.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[r](e,s,i)&&i.preventDefault()});this.markers=tx(n.markers(e)),n.initialSpacer&&(this.spacer=new jT(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=tx(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Ht.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class jT{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),mX(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,a=0;;){let s=a,l=oo(s,l,c)||a(s,l,c):a}return r}})}});class Tm extends go{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Rm(t,e){return t.state.facet(rs).formatNumber(e,t.state)}const vX=Ql.compute([rs],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(pX)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new Tm(Rm(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(gX)){let o=i(e,n,r);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(rs)!=e.state.facet(rs),initialSpacer(e){return new Tm(Rm(e,rx(e.state.doc.lines)))},updateSpacer(e,n){let r=Rm(n.view,rx(n.view.state.doc.lines));return r==e.number?e:new Tm(r)},domEventHandlers:t.facet(rs).domEventHandlers,side:"before"}));function OX(t={}){return[rs.of(t),zT(),vX]}function rx(t){let e=9;for(;e{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(bX.range(i)))}return Ht.of(e)});function SX(){return yX}const LT=1024;let xX=0;class Im{constructor(e,n){this.from=e,this.to=n}}class Nt{constructor(e={}){this.id=xX++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Wr.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Nt.closedBy=new Nt({deserialize:t=>t.split(" ")});Nt.openedBy=new Nt({deserialize:t=>t.split(" ")});Nt.group=new Nt({deserialize:t=>t.split(" ")});Nt.isolate=new Nt({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Nt.contextHash=new Nt({perNode:!0});Nt.lookAhead=new Nt({perNode:!0});Nt.mounted=new Nt({perNode:!0});class Kd{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Nt.mounted.id]}}const $X=Object.create(null);class Wr{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):$X,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Wr(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Nt.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Nt.group),o=-1;o<(i?i.length:0);o++){let a=n[o<0?r.name:i[o]];if(a)return a}}}}Wr.none=new Wr("",Object.create(null),0,8);class oO{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(a|Vn.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!s&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(s||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:lO(Wr.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Dn(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Dn(Wr.none,n,r,i)))}static build(e){return _X(e)}}Dn.empty=new Dn(Wr.none,[],[],0);class aO{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new aO(this.buffer,this.index)}}class Vo{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return Wr.none}toString(){let e=[];for(let n=0;n0));l=a[l+3]);return s}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),a=0;for(let s=e,l=0;s=e&&ne;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function lc(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?s.length:-1;e!=c;e+=n){let u=s[e],d=l[e]+a.from;if(DT(i,r,d,d+u.length)){if(u instanceof Vo){if(o&Vn.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,n,r-d,i);if(f>-1)return new Hi(new CX(a,u,e,d),null,f)}else if(o&Vn.IncludeAnonymous||!u.type.isAnonymous||sO(u)){let f;if(!(o&Vn.IgnoreMounts)&&(f=Kd.get(u))&&!f.overlay)return new Br(f.tree,d,e,a);let h=new Br(u,d,e,a);return o&Vn.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?u.children.length-1:0,n,r,i)}}}if(o&Vn.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&Vn.IgnoreOverlays)&&(i=Kd.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:a,to:s}of i.overlay)if((n>0?a<=o:a=o:s>o))return new Br(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function ox(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let a=!1;!a;)if(a=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function Fg(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class CX{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Hi extends BT{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new Hi(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&Vn.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Hi(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Hi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Hi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let a=r.buffer[this.index+1];e.push(r.slice(i,o,a)),n.push(0)}return new Dn(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function WT(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;on.from||a.to=e){let s=new Br(a.tree,a.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(lc(s,e,n,!1))}}return i?WT(i):r}class Xg{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Br)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Br?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Vn.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Vn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Vn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let o=n+e,a=e<0?-1:r._tree.children.length;o!=a;o+=e){let s=r._tree.children[o];if(this.mode&Vn.IncludeAnonymous||s instanceof Vo||!s.type.isAnonymous||sO(s))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let a=e;a;a=a._parent)if(a.index==i){if(i==this.index)return a;n=a,r=o+1;break e}i=this.stack[--o]}for(let i=r;i=0;o--){if(o<0)return Fg(this._tree,e,i);let a=r[n.buffer[this.stack[o]]];if(!a.isAnonymous){if(e[i]&&e[i]!=a.name)return!1;i--}}return!0}}function sO(t){return t.children.some(e=>e instanceof Vo||!e.type.isAnonymous||sO(e))}function _X(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=LT,reused:o=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(n)?new aO(n,n.length):n,l=r.types,c=0,u=0;function d(x,$,C,P,w,_){let{id:R,start:I,end:T,size:M}=s,Q=u,E=c;for(;M<0;)if(s.next(),M==-1){let F=o[R];C.push(F),P.push(I-x);return}else if(M==-3){c=R;return}else if(M==-4){u=R;return}else throw new RangeError(`Unrecognized record size: ${M}`);let k=l[R],z,L,B=I-x;if(T-I<=i&&(L=g(s.pos-$,w))){let F=new Uint16Array(L.size-L.skip),H=s.pos-L.size,X=F.length;for(;s.pos>H;)X=O(L.start,F,X);z=new Vo(F,T-L.start,r),B=L.start-x}else{let F=s.pos-M;s.next();let H=[],X=[],q=R>=a?R:-1,N=0,j=T;for(;s.pos>F;)q>=0&&s.id==q&&s.size>=0?(s.end<=j-i&&(m(H,X,I,N,s.end,j,q,Q,E),N=H.length,j=s.end),s.next()):_>2500?f(I,F,H,X):d(I,F,H,X,q,_+1);if(q>=0&&N>0&&N-1&&N>0){let oe=h(k,E);z=lO(k,H,X,0,H.length,0,T-I,oe,oe)}else z=p(k,H,X,T-I,Q-T,E)}C.push(z),P.push(B)}function f(x,$,C,P){let w=[],_=0,R=-1;for(;s.pos>$;){let{id:I,start:T,end:M,size:Q}=s;if(Q>4)s.next();else{if(R>-1&&T=0;M-=3)I[Q++]=w[M],I[Q++]=w[M+1]-T,I[Q++]=w[M+2]-T,I[Q++]=Q;C.push(new Vo(I,w[2]-T,r)),P.push(T-x)}}function h(x,$){return(C,P,w)=>{let _=0,R=C.length-1,I,T;if(R>=0&&(I=C[R])instanceof Dn){if(!R&&I.type==x&&I.length==w)return I;(T=I.prop(Nt.lookAhead))&&(_=P[R]+I.length+T)}return p(x,C,P,w,_,$)}}function m(x,$,C,P,w,_,R,I,T){let M=[],Q=[];for(;x.length>P;)M.push(x.pop()),Q.push($.pop()+C-w);x.push(p(r.types[R],M,Q,_-w,I-_,T)),$.push(w-C)}function p(x,$,C,P,w,_,R){if(_){let I=[Nt.contextHash,_];R=R?[I].concat(R):[I]}if(w>25){let I=[Nt.lookAhead,w];R=R?[I].concat(R):[I]}return new Dn(x,$,C,P,R)}function g(x,$){let C=s.fork(),P=0,w=0,_=0,R=C.end-i,I={size:0,start:0,skip:0};e:for(let T=C.pos-x;C.pos>T;){let M=C.size;if(C.id==$&&M>=0){I.size=P,I.start=w,I.skip=_,_+=4,P+=4,C.next();continue}let Q=C.pos-M;if(M<0||Q=a?4:0,k=C.start;for(C.next();C.pos>Q;){if(C.size<0)if(C.size==-3)E+=4;else break e;else C.id>=a&&(E+=4);C.next()}w=k,P+=M,_+=E}return($<0||P==x)&&(I.size=P,I.start=w,I.skip=_),I.size>4?I:void 0}function O(x,$,C){let{id:P,start:w,end:_,size:R}=s;if(s.next(),R>=0&&P4){let T=s.pos-(R-4);for(;s.pos>T;)C=O(x,$,C)}$[--C]=I,$[--C]=_-x,$[--C]=w-x,$[--C]=P}else R==-3?c=P:R==-4&&(u=P);return C}let v=[],y=[];for(;s.pos>0;)d(t.start||0,t.bufferStart||0,v,y,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:v.length?y[0]+v[0].length:0;return new Dn(l[t.topID],v.reverse(),y.reverse(),S)}const ax=new WeakMap;function hd(t,e){if(!t.isAnonymous||e instanceof Vo||e.type!=t)return 1;let n=ax.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Dn)){n=1;break}n+=hd(t,r)}ax.set(e,n)}return n}function lO(t,e,n,r,i,o,a,s,l){let c=0;for(let m=r;m=u)break;$+=C}if(y==S+1){if($>u){let C=m[S];h(C.children,C.positions,0,C.children.length,p[S]+v);continue}d.push(m[S])}else{let C=p[y-1]+m[y-1].length-x;d.push(lO(t,m,p,S,y,x,C,null,l))}f.push(x+v-o)}}return h(e,n,r,i,0),(s||l)(d,f,a)}class TX{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof Hi?this.setBuffer(e.context.buffer,e.index,n):e instanceof Br&&this.map.set(e.tree,n)}get(e){return e instanceof Hi?this.getBuffer(e.context.buffer,e.index):e instanceof Br?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class ma{constructor(e,n,r,i,o=!1,a=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new ma(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,a=e.length?e[0]:null;for(let s=0,l=0,c=0;;s++){let u=s=r)for(;a&&a.from=f.from||d<=f.to||c){let h=Math.max(f.from,l)-c,m=Math.min(f.to,d)-c;f=h>=m?null:new ma(h,m,f.tree,f.offset+c,s>0,!!u)}if(f&&i.push(f),a.to>d)break;a=onew Im(i.from,i.to)):[new Im(0,0)]:[new Im(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class RX{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new Nt({perNode:!0});let IX=0,io=class Zg{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=IX++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof Zg&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new Zg(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new Jd(e);return r=>r.modified.indexOf(n)>-1?r:Jd.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}},MX=0;class Jd{constructor(e){this.name=e,this.instances=[],this.id=MX++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(s=>s.base==e&&EX(n,s.modified));if(r)return r;let i=[],o=new io(e.name,i,e,n);for(let s of n)s.instances.push(o);let a=kX(n);for(let s of e.set)if(!s.modified.length)for(let l of a)i.push(Jd.get(s,l));return o}}function EX(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function kX(t){let e=[[]];for(let n=0;nr.length-n.length)}function cO(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],a=2,s=i;for(let d=0;;){if(s=="..."&&d>0&&d+3==i.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!f)throw new RangeError("Invalid path: "+i);if(o.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),d+=f[0].length,d==i.length)break;let h=i[d++];if(d==i.length&&h=="!"){a=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);s=i.slice(d)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new ef(r,a,l>0?o.slice(0,l):null);e[c]=u.sort(e[c])}}return VT.add(e)}const VT=new Nt;class ef{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let a=i;for(let s of o)for(let l of s.set){let c=n[l.id];if(c){a=a?a+" "+c:c;break}}return a},scope:r}}function AX(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function QX(t,e,n,r=0,i=t.length){let o=new NX(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class NX{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:a,from:s,to:l}=e;if(s>=r||l<=n)return;a.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(a)));let c=i,u=zX(e)||ef.empty,d=AX(o,u.tags);if(d&&(c&&(c+=" "),c+=d,u.mode==1&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(n,s),c),u.opaque)return;let f=e.tree&&e.tree.prop(Nt.mounted);if(f&&f.overlay){let h=e.node.enter(f.overlay[0].from+s,1),m=this.highlighters.filter(g=>!g.scope||g.scope(f.tree.type)),p=e.firstChild();for(let g=0,O=s;;g++){let v=g=y||!e.nextSibling())););if(!v||y>r)break;O=v.to+s,O>n&&(this.highlightRange(h.cursor(),Math.max(n,v.from+s),Math.min(r,O),"",m),this.startSpan(Math.min(r,O),c))}p&&e.parent()}else if(e.firstChild()){f&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function zX(t){let e=t.type.prop(VT);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const je=io.define,ku=je(),Po=je(),sx=je(Po),lx=je(Po),_o=je(),Au=je(_o),Mm=je(_o),zi=je(),Ko=je(zi),Qi=je(),Ni=je(),qg=je(),ll=je(qg),Qu=je(),ie={comment:ku,lineComment:je(ku),blockComment:je(ku),docComment:je(ku),name:Po,variableName:je(Po),typeName:sx,tagName:je(sx),propertyName:lx,attributeName:je(lx),className:je(Po),labelName:je(Po),namespace:je(Po),macroName:je(Po),literal:_o,string:Au,docString:je(Au),character:je(Au),attributeValue:je(Au),number:Mm,integer:je(Mm),float:je(Mm),bool:je(_o),regexp:je(_o),escape:je(_o),color:je(_o),url:je(_o),keyword:Qi,self:je(Qi),null:je(Qi),atom:je(Qi),unit:je(Qi),modifier:je(Qi),operatorKeyword:je(Qi),controlKeyword:je(Qi),definitionKeyword:je(Qi),moduleKeyword:je(Qi),operator:Ni,derefOperator:je(Ni),arithmeticOperator:je(Ni),logicOperator:je(Ni),bitwiseOperator:je(Ni),compareOperator:je(Ni),updateOperator:je(Ni),definitionOperator:je(Ni),typeOperator:je(Ni),controlOperator:je(Ni),punctuation:qg,separator:je(qg),bracket:ll,angleBracket:je(ll),squareBracket:je(ll),paren:je(ll),brace:je(ll),content:zi,heading:Ko,heading1:je(Ko),heading2:je(Ko),heading3:je(Ko),heading4:je(Ko),heading5:je(Ko),heading6:je(Ko),contentSeparator:je(zi),list:je(zi),quote:je(zi),emphasis:je(zi),strong:je(zi),link:je(zi),monospace:je(zi),strikethrough:je(zi),inserted:je(),deleted:je(),changed:je(),invalid:je(),meta:Qu,documentMeta:je(Qu),annotation:je(Qu),processingInstruction:je(Qu),definition:io.defineModifier("definition"),constant:io.defineModifier("constant"),function:io.defineModifier("function"),standard:io.defineModifier("standard"),local:io.defineModifier("local"),special:io.defineModifier("special")};for(let t in ie){let e=ie[t];e instanceof io&&(e.name=t)}FT([{tag:ie.link,class:"tok-link"},{tag:ie.heading,class:"tok-heading"},{tag:ie.emphasis,class:"tok-emphasis"},{tag:ie.strong,class:"tok-strong"},{tag:ie.keyword,class:"tok-keyword"},{tag:ie.atom,class:"tok-atom"},{tag:ie.bool,class:"tok-bool"},{tag:ie.url,class:"tok-url"},{tag:ie.labelName,class:"tok-labelName"},{tag:ie.inserted,class:"tok-inserted"},{tag:ie.deleted,class:"tok-deleted"},{tag:ie.literal,class:"tok-literal"},{tag:ie.string,class:"tok-string"},{tag:ie.number,class:"tok-number"},{tag:[ie.regexp,ie.escape,ie.special(ie.string)],class:"tok-string2"},{tag:ie.variableName,class:"tok-variableName"},{tag:ie.local(ie.variableName),class:"tok-variableName tok-local"},{tag:ie.definition(ie.variableName),class:"tok-variableName tok-definition"},{tag:ie.special(ie.variableName),class:"tok-variableName2"},{tag:ie.definition(ie.propertyName),class:"tok-propertyName tok-definition"},{tag:ie.typeName,class:"tok-typeName"},{tag:ie.namespace,class:"tok-namespace"},{tag:ie.className,class:"tok-className"},{tag:ie.macroName,class:"tok-macroName"},{tag:ie.propertyName,class:"tok-propertyName"},{tag:ie.operator,class:"tok-operator"},{tag:ie.comment,class:"tok-comment"},{tag:ie.meta,class:"tok-meta"},{tag:ie.invalid,class:"tok-invalid"},{tag:ie.punctuation,class:"tok-punctuation"}]);var Em;const is=new Nt;function XT(t){return Ge.define({combine:t?e=>e.concat(t):void 0})}const uO=new Nt;class xi{constructor(e,n,r=[],i=""){this.data=e,this.name=i,jt.prototype.hasOwnProperty("tree")||Object.defineProperty(jt.prototype,"tree",{get(){return Xn(this)}}),this.parser=n,this.extension=[Fo.of(this),jt.languageData.of((o,a,s)=>{let l=cx(o,a,s),c=l.type.prop(is);if(!c)return[];let u=o.facet(c),d=l.type.prop(uO);if(d){let f=l.resolve(a-l.from,s);for(let h of d)if(h.test(f,o)){let m=o.facet(h.facet);return h.type=="replace"?m:m.concat(u)}}return u})].concat(r)}isActiveAt(e,n,r=-1){return cx(e,n,r).type.prop(is)==this.data}findRegions(e){let n=e.facet(Fo);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,a)=>{if(o.prop(is)==this.data){r.push({from:a,to:a+o.length});return}let s=o.prop(Nt.mounted);if(s){if(s.tree.prop(is)==this.data){if(s.overlay)for(let l of s.overlay)r.push({from:l.from+a,to:l.to+a});else r.push({from:a,to:a+o.length});return}else if(s.overlay){let l=r.length;if(i(s.tree,s.overlay[0].from+a),r.length>l)return}}for(let l=0;lr.isTop?n:void 0)]}),e.name)}configure(e,n){return new cc(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Xn(t){let e=t.field(xi.state,!1);return e?e.tree:Dn.empty}class jX{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let cl=null;class tf{constructor(e,n,r=[],i,o,a,s,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new tf(e,n,[],Dn.empty,0,r,[],null)}startParse(){return this.parser.startParse(new jX(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Dn.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(ma.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=cl;cl=this;try{return e()}finally{cl=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=ux(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:a,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,d,f)=>l.push({fromA:c,toA:u,fromB:d,toB:f})),r=ma.applyChanges(r,l),i=Dn.empty,o=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){s=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),d=e.mapPos(c.to,-1);ue.from&&(this.fragments=ux(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends HT{createParse(n,r,i){let o=i[0].from,a=i[i.length-1].to;return{parsedPos:o,advance(){let l=cl;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=a,new Dn(Wr.none,[],[],a-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return cl}}function ux(t,e,n){return ma.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Ms{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Ms(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=tf.create(e.facet(Fo).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Ms(r)}}xi.state=Yn.define({create:Ms.init,update(t,e){for(let n of e.effects)if(n.is(xi.setState))return n.value;return e.startState.facet(Fo)!=e.state.facet(Fo)?Ms.init(e.state):t.apply(e)}});let ZT=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(ZT=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const km=typeof navigator<"u"&&(!((Em=navigator.scheduling)===null||Em===void 0)&&Em.isInputPending)?()=>navigator.scheduling.isInputPending():null,LX=kn.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(xi.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(xi.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=ZT(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndi+1e3,l=o.context.work(()=>km&&km()||Date.now()>a,i+(s?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:xi.setState.of(new Ms(o.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Lr(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Fo=Ge.define({combine(t){return t.length?t[0]:null},enables:t=>[xi.state,LX,De.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class qT{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const DX=Ge.define(),Hc=Ge.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function nf(t){let e=t.facet(Hc);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function uc(t,e){let n="",r=t.tabSize,i=t.facet(Hc)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o=e?BX(t,n,e):null}class ph{constructor(e,n={}){this.state=e,this.options=n,this.unit=nf(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return Xs(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const fO=new Nt;function BX(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let a=i;a&&!(a.fromr.node.to||a.from==r.node.from&&a.type==r.node.type);a=a.parent)o.push(a);for(let a=o.length-1;a>=0;a--)r={node:o[a],next:r}}return GT(r,t,n)}function GT(t,e,n){for(let r=t;r;r=r.next){let i=HX(r.node);if(i)return i(hO.create(e,n,r))}return 0}function WX(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function HX(t){let e=t.type.prop(fO);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Nt.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return a=>UT(a,!0,1,void 0,o&&!WX(a)?i.from:void 0)}return t.parent==null?VX:null}function VX(){return 0}class hO extends ph{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new hO(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(FX(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return GT(this.context.next,this.base,this.pos)}}function FX(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function XX(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let s=n.to;;){let l=e.childAfter(s);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=a)return null;let c=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+c}}s=l.to}}function Gg({closing:t,align:e=!0,units:n=1}){return r=>UT(r,e,n,t)}function UT(t,e,n,r,i){let o=t.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==t.pos+a,l=e?XX(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}const ZX=t=>t.baseIndent;function Am({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const qX=200;function GX(){return jt.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+qX)return t;let o=n.sliceString(i.from,r);if(!e.some(c=>c.test(o)))return t;let{state:a}=t,s=-1,l=[];for(let{head:c}of a.selection.ranges){let u=a.doc.lineAt(c);if(u.from==s)continue;s=u.from;let d=dO(a,u.from);if(d==null)continue;let f=/^\s*/.exec(u.text)[0],h=uc(a,d);f!=h&&l.push({from:u.from,to:u.from+f.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const UX=Ge.define(),mO=new Nt;function YT(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(o&&s.from=e&&c.to>n&&(o=c)}}return o}function KX(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function rf(t,e,n){for(let r of t.facet(UX)){let i=r(t,e,n);if(i)return i}return YX(t,e,n)}function KT(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const gh=$t.define({map:KT}),Vc=$t.define({map:KT});function JT(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const Ra=Yn.define({create(){return dt.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=dx(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(gh)&&!JX(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(nR),i=r?dt.replace({widget:new aZ(r(e.state,n.value))}):fx;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(Vc)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=dx(t,e.selection.main.head)),t},provide:t=>De.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{ie&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,o)=>i>=n||o<=e}):t}function of(t,e,n){var r;let i=null;return(r=t.field(Ra,!1))===null||r===void 0||r.between(e,n,(o,a)=>{(!i||i.from>o)&&(i={from:o,to:a})}),i}function JX(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function eR(t,e){return t.field(Ra,!1)?e:e.concat($t.appendConfig.of(rR()))}const eZ=t=>{for(let e of JT(t)){let n=rf(t.state,e.from,e.to);if(n)return t.dispatch({effects:eR(t.state,[gh.of(n),tR(t,n)])}),!0}return!1},tZ=t=>{if(!t.state.field(Ra,!1))return!1;let e=[];for(let n of JT(t)){let r=of(t.state,n.from,n.to);r&&e.push(Vc.of(r),tR(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function tR(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return De.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const nZ=t=>{let{state:e}=t,n=[];for(let r=0;r{let e=t.state.field(Ra,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(Vc.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},iZ=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:eZ},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:tZ},{key:"Ctrl-Alt-[",run:nZ},{key:"Ctrl-Alt-]",run:rZ}],oZ={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},nR=Ge.define({combine(t){return to(t,oZ)}});function rR(t){return[Ra,cZ]}function iR(t,e){let{state:n}=t,r=n.facet(nR),i=a=>{let s=t.lineBlockAt(t.posAtDOM(a.target)),l=of(t.state,s.from,s.to);l&&t.dispatch({effects:Vc.of(l)}),a.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const fx=dt.replace({widget:new class extends no{toDOM(t){return iR(t,null)}}});class aZ extends no{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return iR(e,this.value)}}const sZ={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Qm extends go{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function lZ(t={}){let e={...sZ,...t},n=new Qm(e,!0),r=new Qm(e,!1),i=kn.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Fo)!=a.state.facet(Fo)||a.startState.field(Ra,!1)!=a.state.field(Ra,!1)||Xn(a.startState)!=Xn(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let s=new mo;for(let l of a.viewportLineBlocks){let c=of(a.state,l.from,l.to)?r:rf(a.state,l.from,l.to)?n:null;c&&s.add(l.from,l.from,c)}return s.finish()}}),{domEventHandlers:o}=e;return[i,dX({class:"cm-foldGutter",markers(a){var s;return((s=a.plugin(i))===null||s===void 0?void 0:s.markers)||Ht.empty},initialSpacer(){return new Qm(e,!1)},domEventHandlers:{...o,click:(a,s,l)=>{if(o.click&&o.click(a,s,l))return!0;let c=of(a.state,s.from,s.to);if(c)return a.dispatch({effects:Vc.of(c)}),!0;let u=rf(a.state,s.from,s.to);return u?(a.dispatch({effects:gh.of(u)}),!0):!1}}}),rR()]}const cZ=De.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Fc{constructor(e,n){this.specs=e;let r;function i(s){let l=Bo.newName();return(r||(r=Object.create(null)))["."+l]=s,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof xi?s=>s.prop(is)==a.data:a?s=>s==a:void 0,this.style=FT(e.map(s=>({tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))})),{all:o}).style,this.module=r?new Bo(r):null,this.themeType=n.themeType}static define(e,n){return new Fc(e,n||{})}}const Ug=Ge.define(),oR=Ge.define({combine(t){return t.length?[t[0]]:null}});function Nm(t){let e=t.facet(Ug);return e.length?e:t.facet(oR)}function aR(t,e){let n=[dZ],r;return t instanceof Fc&&(t.module&&n.push(De.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(oR.of(t)):r?n.push(Ug.computeN([De.darkTheme],i=>i.facet(De.darkTheme)==(r=="dark")?[t]:[])):n.push(Ug.of(t)),n}class uZ{constructor(e){this.markCache=Object.create(null),this.tree=Xn(e.state),this.decorations=this.buildDeco(e,Nm(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Xn(e.state),r=Nm(e.state),i=r!=Nm(e.startState),{viewport:o}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return dt.none;let r=new mo;for(let{from:i,to:o}of e.visibleRanges)QX(this.tree,n,(a,s,l)=>{r.add(a,s,this.markCache[l]||(this.markCache[l]=dt.mark({class:l})))},i,o);return r.finish()}}const dZ=Zo.high(kn.fromClass(uZ,{decorations:t=>t.decorations})),fZ=Fc.define([{tag:ie.meta,color:"#404740"},{tag:ie.link,textDecoration:"underline"},{tag:ie.heading,textDecoration:"underline",fontWeight:"bold"},{tag:ie.emphasis,fontStyle:"italic"},{tag:ie.strong,fontWeight:"bold"},{tag:ie.strikethrough,textDecoration:"line-through"},{tag:ie.keyword,color:"#708"},{tag:[ie.atom,ie.bool,ie.url,ie.contentSeparator,ie.labelName],color:"#219"},{tag:[ie.literal,ie.inserted],color:"#164"},{tag:[ie.string,ie.deleted],color:"#a11"},{tag:[ie.regexp,ie.escape,ie.special(ie.string)],color:"#e40"},{tag:ie.definition(ie.variableName),color:"#00f"},{tag:ie.local(ie.variableName),color:"#30a"},{tag:[ie.typeName,ie.namespace],color:"#085"},{tag:ie.className,color:"#167"},{tag:[ie.special(ie.variableName),ie.macroName],color:"#256"},{tag:ie.definition(ie.propertyName),color:"#00c"},{tag:ie.comment,color:"#940"},{tag:ie.invalid,color:"#f00"}]),hZ=De.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),sR=1e4,lR="()[]{}",cR=Ge.define({combine(t){return to(t,{afterCursor:!0,brackets:lR,maxScanDistance:sR,renderMatch:gZ})}}),mZ=dt.mark({class:"cm-matchingBracket"}),pZ=dt.mark({class:"cm-nonmatchingBracket"});function gZ(t){let e=[],n=t.matched?mZ:pZ;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const vZ=Yn.define({create(){return dt.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(cR);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=Vi(e.state,i.head,-1,r)||i.head>0&&Vi(e.state,i.head-1,1,r)||r.afterCursor&&(Vi(e.state,i.head,1,r)||i.headDe.decorations.from(t)}),OZ=[vZ,hZ];function bZ(t={}){return[cR.of(t),OZ]}const yZ=new Nt;function Yg(t,e,n){let r=t.prop(e<0?Nt.openedBy:Nt.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function Kg(t){let e=t.type.prop(yZ);return e?e(t.node):t}function Vi(t,e,n,r={}){let i=r.maxScanDistance||sR,o=r.brackets||lR,a=Xn(t),s=a.resolveInner(e,n);for(let l=s;l;l=l.parent){let c=Yg(l.type,n,o);if(c&&l.from0?e>=u.from&&eu.from&&e<=u.to))return SZ(t,e,n,l,u,c,o)}}return xZ(t,e,n,a,s.type,i,o)}function SZ(t,e,n,r,i,o,a){let s=r.parent,l={from:i.from,to:i.to},c=0,u=s==null?void 0:s.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&o.indexOf(u.type.name)>-1&&u.from0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let f=0;!u.next().done&&f<=o;){let h=u.value;n<0&&(f+=h.length);let m=e+f*n;for(let p=n>0?0:h.length-1,g=n>0?h.length:-1;p!=g;p+=n){let O=a.indexOf(h[p]);if(!(O<0||r.resolveInner(m+p,1).type!=i))if(O%2==0==n>0)d++;else{if(d==1)return{start:c,end:{from:m+p,to:m+p+1},matched:O>>1==l>>1};d--}}n>0&&(f+=h.length)}return u.done?{start:c,matched:!1}:null}const $Z=Object.create(null),hx=[Wr.none],mx=[],px=Object.create(null),CZ=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])CZ[t]=wZ($Z,e);function zm(t,e){mx.indexOf(t)>-1||(mx.push(t),console.warn(e))}function wZ(t,e){let n=[];for(let s of e.split(" ")){let l=[];for(let c of s.split(".")){let u=t[c]||ie[c];u?typeof u=="function"?l.length?l=l.map(u):zm(c,`Modifier ${c} used at start of tag`):l.length?zm(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:zm(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(s=>s.id),o=px[i];if(o)return o.id;let a=px[i]=Wr.define({id:hx.length,name:r,props:[cO({[r]:n})]});return hx.push(a),a.id}yn.RTL,yn.LTR;const PZ=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=gO(t.state,n.from);return r.line?_Z(t):r.block?RZ(t):!1};function pO(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const _Z=pO(EZ,0),TZ=pO(uR,0),RZ=pO((t,e)=>uR(t,e,MZ(e)),0);function gO(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const ul=50;function IZ(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-ul,r),a=t.sliceDoc(i,i+ul),s=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(a)[0].length,c=o.length-s;if(o.slice(c-e.length,c)==e&&a.slice(l,l+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+l,margin:l&&1}};let u,d;i-r<=2*ul?u=d=t.sliceDoc(r,i):(u=t.sliceDoc(r,r+ul),d=t.sliceDoc(i-ul,i));let f=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(d)[0].length,m=d.length-h-n.length;return u.slice(f,f+e.length)==e&&d.slice(m,m+n.length)==n?{open:{pos:r+f+e.length,margin:/\s/.test(u.charAt(f+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(d.charAt(m-1))?1:0}}:null}function MZ(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function uR(t,e,n=e.selection.ranges){let r=n.map(o=>gO(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,a)=>IZ(e,r[a],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,a)=>i[a]?[]:[{from:o.from,insert:r[a].open+" "},{from:o.to,insert:" "+r[a].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let a=0,s;ai&&(o==a||a>d.from)){i=d.from;let f=/^\s*/.exec(d.text)[0].length,h=f==d.length,m=d.text.slice(f,f+c.length)==c?f:-1;fo.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:s,token:l,indent:c,empty:u,single:d}of r)(d||!u)&&o.push({from:s.from+c,insert:l+" "});let a=e.changes(o);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:a,comment:s,token:l}of r)if(s>=0){let c=a.from+s,u=c+l.length;a.text[u-a.from]==" "&&u++,o.push({from:c,to:u})}return{changes:o}}return null}const Jg=eo.define(),kZ=eo.define(),AZ=Ge.define(),dR=Ge.define({combine(t){return to(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),fR=Yn.define({create(){return Fi.empty},update(t,e){let n=e.state.facet(dR),r=e.annotation(Jg);if(r){let l=Dr.fromTransaction(e,r.selection),c=r.side,u=c==0?t.undone:t.done;return l?u=af(u,u.length,n.minDepth,l):u=pR(u,e.startState.selection),new Fi(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(kZ);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Ln.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=Dr.fromTransaction(e),a=e.annotation(Ln.time),s=e.annotation(Ln.userEvent);return o?t=t.addChanges(o,a,s,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Fi(t.done.map(Dr.fromJSON),t.undone.map(Dr.fromJSON))}});function QZ(t={}){return[fR,dR.of(t),De.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?hR:e.inputType=="historyRedo"?ev:null;return r?(e.preventDefault(),r(n)):!1}})]}function vh(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(fR,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const hR=vh(0,!1),ev=vh(1,!1),NZ=vh(0,!0),zZ=vh(1,!0);class Dr{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new Dr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Dr(e.changes&&Hn.fromJSON(e.changes),[],e.mapped&&qi.fromJSON(e.mapped),e.startSelection&&$e.fromJSON(e.startSelection),e.selectionsAfter.map($e.fromJSON))}static fromTransaction(e,n){let r=ci;for(let i of e.startState.facet(AZ)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new Dr(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,ci)}static selection(e){return new Dr(void 0,ci,void 0,void 0,e)}}function af(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function jZ(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,a,s)=>{for(let l=0;l=c&&a<=u&&(r=!0)}}),r}function LZ(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function mR(t,e){return t.length?e.length?t.concat(e):t:e}const ci=[],DZ=200;function pR(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-DZ));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),af(t,t.length-1,1e9,n.setSelAfter(r)))}else return[Dr.selection([e])]}function BZ(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function jm(t,e){if(!t.length)return t;let n=t.length,r=ci;for(;n;){let i=WZ(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[Dr.selection(r)]:ci}function WZ(t,e,n){let r=mR(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(e)):ci,n);if(!t.changes)return Dr.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(o):o;return new Dr(i,$t.mapEffects(t.effects,e),a,t.startSelection.map(o),r)}const HZ=/^(input\.type|delete)($|\.)/;class Fi{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Fi(this.done,this.undone):this}addChanges(e,n,r,i,o){let a=this.done,s=a[a.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!r||HZ.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):Oh(n,e))}function yr(t){return t.textDirectionAt(t.state.selection.main.head)==yn.LTR}const vR=t=>gR(t,!yr(t)),OR=t=>gR(t,yr(t));function bR(t,e){return Mi(t,n=>n.empty?t.moveByGroup(n,e):Oh(n,e))}const FZ=t=>bR(t,!yr(t)),XZ=t=>bR(t,yr(t));function ZZ(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function bh(t,e,n){let r=Xn(t).resolveInner(e.head),i=n?Nt.closedBy:Nt.openedBy;for(let l=e.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;ZZ(t,c,i)?r=c:l=n?c.to:c.from}let o=r.type.prop(i),a,s;return o&&(a=n?Vi(t,r.from,1):Vi(t,r.to,-1))&&a.matched?s=n?a.end.to:a.end.from:s=n?r.to:r.from,$e.cursor(s,n?-1:1)}const qZ=t=>Mi(t,e=>bh(t.state,e,!yr(t))),GZ=t=>Mi(t,e=>bh(t.state,e,yr(t)));function yR(t,e){return Mi(t,n=>{if(!n.empty)return Oh(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const SR=t=>yR(t,!1),xR=t=>yR(t,!0);function $R(t){let e=t.scrollDOM.clientHeighta.empty?t.moveVertically(a,e,n.height):Oh(a,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let a=t.coordsAtPos(r.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,c=s.bottom-n.marginBottom;a&&a.top>l&&a.bottomCR(t,!1),tv=t=>CR(t,!0);function qo(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=$e.cursor(r.from+o))}return i}const UZ=t=>Mi(t,e=>qo(t,e,!0)),YZ=t=>Mi(t,e=>qo(t,e,!1)),KZ=t=>Mi(t,e=>qo(t,e,!yr(t))),JZ=t=>Mi(t,e=>qo(t,e,yr(t))),eq=t=>Mi(t,e=>$e.cursor(t.lineBlockAt(e.head).from,1)),tq=t=>Mi(t,e=>$e.cursor(t.lineBlockAt(e.head).to,-1));function nq(t,e,n){let r=!1,i=Zs(t.selection,o=>{let a=Vi(t,o.head,-1)||Vi(t,o.head,1)||o.head>0&&Vi(t,o.head-1,1)||o.headnq(t,e);function Oi(t,e){let n=Zs(t.state.selection,r=>{let i=e(r);return $e.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(ro(t.state,n)),!0)}function wR(t,e){return Oi(t,n=>t.moveByChar(n,e))}const PR=t=>wR(t,!yr(t)),_R=t=>wR(t,yr(t));function TR(t,e){return Oi(t,n=>t.moveByGroup(n,e))}const iq=t=>TR(t,!yr(t)),oq=t=>TR(t,yr(t)),aq=t=>Oi(t,e=>bh(t.state,e,!yr(t))),sq=t=>Oi(t,e=>bh(t.state,e,yr(t)));function RR(t,e){return Oi(t,n=>t.moveVertically(n,e))}const IR=t=>RR(t,!1),MR=t=>RR(t,!0);function ER(t,e){return Oi(t,n=>t.moveVertically(n,e,$R(t).height))}const vx=t=>ER(t,!1),Ox=t=>ER(t,!0),lq=t=>Oi(t,e=>qo(t,e,!0)),cq=t=>Oi(t,e=>qo(t,e,!1)),uq=t=>Oi(t,e=>qo(t,e,!yr(t))),dq=t=>Oi(t,e=>qo(t,e,yr(t))),fq=t=>Oi(t,e=>$e.cursor(t.lineBlockAt(e.head).from)),hq=t=>Oi(t,e=>$e.cursor(t.lineBlockAt(e.head).to)),bx=({state:t,dispatch:e})=>(e(ro(t,{anchor:0})),!0),yx=({state:t,dispatch:e})=>(e(ro(t,{anchor:t.doc.length})),!0),Sx=({state:t,dispatch:e})=>(e(ro(t,{anchor:t.selection.main.anchor,head:0})),!0),xx=({state:t,dispatch:e})=>(e(ro(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),mq=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),pq=({state:t,dispatch:e})=>{let n=yh(t).map(({from:r,to:i})=>$e.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:$e.create(n),userEvent:"select"})),!0},gq=({state:t,dispatch:e})=>{let n=Zs(t.selection,r=>{let i=Xn(t),o=i.resolveStack(r.from,1);if(r.empty){let a=i.resolveStack(r.from,-1);a.node.from>=o.node.from&&a.node.to<=o.node.to&&(o=a)}for(let a=o;a;a=a.next){let{node:s}=a;if((s.from=r.to||s.to>r.to&&s.from<=r.from)&&a.next)return $e.range(s.to,s.from)}return r});return n.eq(t.selection)?!1:(e(ro(t,n)),!0)},vq=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=$e.create([n.main]):n.main.empty||(r=$e.create([$e.cursor(n.main.head)])),r?(e(ro(t,r)),!0):!1};function Xc(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:a,to:s}=o;if(a==s){let l=e(o);la&&(n="delete.forward",l=Nu(t,l,!0)),a=Math.min(a,l),s=Math.max(s,l)}else a=Nu(t,a,!1),s=Nu(t,s,!0);return a==s?{range:o}:{changes:{from:a,to:s},range:$e.cursor(a,ai(t)))r.between(e,e,(i,o)=>{ie&&(e=n?o:i)});return e}const kR=(t,e,n)=>Xc(t,r=>{let i=r.from,{state:o}=t,a=o.doc.lineAt(i),s,l;if(n&&!e&&i>a.from&&ikR(t,!1,!0),AR=t=>kR(t,!0,!1),QR=(t,e)=>Xc(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),a=i.charCategorizer(r);for(let s=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=rr(o.text,r-o.from,e)+o.from,c=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),u=a(c);if(s!=null&&u!=s)break;(c!=" "||r!=n.head)&&(s=u),r=l}return r}),NR=t=>QR(t,!1),Oq=t=>QR(t,!0),bq=t=>Xc(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headXc(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Sq=t=>Xc(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:qt.of(["",""])},range:$e.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},$q=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),a=i==o.from?i-1:rr(o.text,i-o.from,!1)+o.from,s=i==o.to?i+1:rr(o.text,i-o.from,!0)+o.from;return{changes:{from:a,to:s,insert:t.doc.slice(i,s).append(t.doc.slice(a,i))},range:$e.cursor(s)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function yh(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let a=e[e.length-1];a.to=o.to,a.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function zR(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of yh(t)){if(n?o.to==t.doc.length:o.from==0)continue;let a=t.doc.lineAt(n?o.to+1:o.from-1),s=a.length+1;if(n){r.push({from:o.to,to:a.to},{from:o.from,insert:a.text+t.lineBreak});for(let l of o.ranges)i.push($e.range(Math.min(t.doc.length,l.anchor+s),Math.min(t.doc.length,l.head+s)))}else{r.push({from:a.from,to:o.from},{from:o.to,insert:t.lineBreak+a.text});for(let l of o.ranges)i.push($e.range(l.anchor-s,l.head-s))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:$e.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Cq=({state:t,dispatch:e})=>zR(t,e,!1),wq=({state:t,dispatch:e})=>zR(t,e,!0);function jR(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of yh(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Pq=({state:t,dispatch:e})=>jR(t,e,!1),_q=({state:t,dispatch:e})=>jR(t,e,!0),Tq=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(yh(e).map(({from:i,to:o})=>(i>0?i--:o{let o;if(t.lineWrapping){let a=t.lineBlockAt(i.head),s=t.coordsAtPos(i.head,i.assoc||1);s&&(o=a.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,o)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Rq(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Xn(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(Nt.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const $x=LR(!1),Iq=LR(!0);function LR(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:a}=i,s=e.doc.lineAt(o),l=!t&&o==a&&Rq(e,o);t&&(o=a=(a<=s.to?s:e.doc.lineAt(a)).to);let c=new ph(e,{simulateBreak:o,simulateDoubleBreak:!!l}),u=dO(c,o);for(u==null&&(u=Xs(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));as.from&&o{let i=[];for(let a=r.from;a<=r.to;){let s=t.doc.lineAt(a);s.number>n&&(r.empty||r.to>s.from)&&(e(s,i,r),n=s.number),a=s.to+1}let o=t.changes(i);return{changes:i,range:$e.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const Mq=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new ph(t,{overrideIndentation:o=>{let a=n[o];return a??-1}}),i=vO(t,(o,a,s)=>{let l=dO(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let c=/^\s*/.exec(o.text)[0],u=uc(t,l);(c!=u||s.fromt.readOnly?!1:(e(t.update(vO(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Hc)})}),{userEvent:"input.indent"})),!0),BR=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(vO(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=Xs(i,t.tabSize),a=0,s=uc(t,Math.max(0,o-nf(t)));for(;a(t.setTabFocusMode(),!0),kq=[{key:"Ctrl-b",run:vR,shift:PR,preventDefault:!0},{key:"Ctrl-f",run:OR,shift:_R},{key:"Ctrl-p",run:SR,shift:IR},{key:"Ctrl-n",run:xR,shift:MR},{key:"Ctrl-a",run:eq,shift:fq},{key:"Ctrl-e",run:tq,shift:hq},{key:"Ctrl-d",run:AR},{key:"Ctrl-h",run:nv},{key:"Ctrl-k",run:bq},{key:"Ctrl-Alt-h",run:NR},{key:"Ctrl-o",run:xq},{key:"Ctrl-t",run:$q},{key:"Ctrl-v",run:tv}],Aq=[{key:"ArrowLeft",run:vR,shift:PR,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:FZ,shift:iq,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:KZ,shift:uq,preventDefault:!0},{key:"ArrowRight",run:OR,shift:_R,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:XZ,shift:oq,preventDefault:!0},{mac:"Cmd-ArrowRight",run:JZ,shift:dq,preventDefault:!0},{key:"ArrowUp",run:SR,shift:IR,preventDefault:!0},{mac:"Cmd-ArrowUp",run:bx,shift:Sx},{mac:"Ctrl-ArrowUp",run:gx,shift:vx},{key:"ArrowDown",run:xR,shift:MR,preventDefault:!0},{mac:"Cmd-ArrowDown",run:yx,shift:xx},{mac:"Ctrl-ArrowDown",run:tv,shift:Ox},{key:"PageUp",run:gx,shift:vx},{key:"PageDown",run:tv,shift:Ox},{key:"Home",run:YZ,shift:cq,preventDefault:!0},{key:"Mod-Home",run:bx,shift:Sx},{key:"End",run:UZ,shift:lq,preventDefault:!0},{key:"Mod-End",run:yx,shift:xx},{key:"Enter",run:$x,shift:$x},{key:"Mod-a",run:mq},{key:"Backspace",run:nv,shift:nv},{key:"Delete",run:AR},{key:"Mod-Backspace",mac:"Alt-Backspace",run:NR},{key:"Mod-Delete",mac:"Alt-Delete",run:Oq},{mac:"Mod-Backspace",run:yq},{mac:"Mod-Delete",run:Sq}].concat(kq.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),Qq=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:qZ,shift:aq},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:GZ,shift:sq},{key:"Alt-ArrowUp",run:Cq},{key:"Shift-Alt-ArrowUp",run:Pq},{key:"Alt-ArrowDown",run:wq},{key:"Shift-Alt-ArrowDown",run:_q},{key:"Escape",run:vq},{key:"Mod-Enter",run:Iq},{key:"Alt-l",mac:"Ctrl-l",run:pq},{key:"Mod-i",run:gq,preventDefault:!0},{key:"Mod-[",run:BR},{key:"Mod-]",run:DR},{key:"Mod-Alt-\\",run:Mq},{key:"Shift-Mod-k",run:Tq},{key:"Shift-Mod-\\",run:rq},{key:"Mod-/",run:PZ},{key:"Alt-A",run:TZ},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Eq}].concat(Aq),Nq={key:"Tab",run:DR,shift:BR},Cx=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class Es{constructor(e,n,r=0,i=e.length,o,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?s=>o(Cx(s)):Cx,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Nr(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=V0(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Di(e);let i=this.normalize(n);if(i.length)for(let o=0,a=r;;o++){let s=i.charCodeAt(o),l=this.match(s,a,this.bufferPos+this.bufferStart);if(o==i.length-1){if(l)return this.value=l,this;break}a==r&&othis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=sf(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=n){let s=new fs(n,e.sliceString(n,r));return Lm.set(e,s),s}if(i.from==n&&i.to==r)return i;let{text:o,from:a}=i;return a>n&&(o=e.sliceString(n,a)+o,a=n),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=sf(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=fs.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(HR.prototype[Symbol.iterator]=VR.prototype[Symbol.iterator]=function(){return this});function zq(t){try{return new RegExp(t,OO),!0}catch{return!1}}function sf(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function rv(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=ln("input",{class:"cm-textfield",name:"line",value:e}),r=ln("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:Nl.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},ln("label",t.state.phrase("Go to line"),": ",n)," ",ln("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),ln("button",{name:"close",onclick:()=>{t.dispatch({effects:Nl.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:a}=t,s=a.doc.lineAt(a.selection.main.head),[,l,c,u,d]=o,f=u?+u.slice(1):0,h=c?+c:s.number;if(c&&d){let g=h/100;l&&(g=g*(l=="-"?-1:1)+s.number/a.doc.lines),h=Math.round(a.doc.lines*g)}else c&&l&&(h=h*(l=="-"?-1:1)+s.number);let m=a.doc.line(Math.max(1,Math.min(a.doc.lines,h))),p=$e.cursor(m.from+Math.max(0,Math.min(f,m.length)));t.dispatch({effects:[Nl.of(!1),De.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:r}}const Nl=$t.define(),wx=Yn.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Nl)&&(t=n.value);return t},provide:t=>sc.from(t,e=>e?rv:null)}),jq=t=>{let e=ac(t,rv);if(!e){let n=[Nl.of(!0)];t.state.field(wx,!1)==null&&n.push($t.appendConfig.of([wx,Lq])),t.dispatch({effects:n}),e=ac(t,rv)}return e&&e.dom.querySelector("input").select(),!0},Lq=De.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),Dq={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Bq=Ge.define({combine(t){return to(t,Dq,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Wq(t){return[Zq,Xq]}const Hq=dt.mark({class:"cm-selectionMatch"}),Vq=dt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Px(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=wn.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=wn.Word)}function Fq(t,e,n,r){return t(e.sliceDoc(n,n+1))==wn.Word&&t(e.sliceDoc(r-1,r))==wn.Word}const Xq=kn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Bq),{state:n}=t,r=n.selection;if(r.ranges.length>1)return dt.none;let i=r.main,o,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return dt.none;let l=n.wordAt(i.head);if(!l)return dt.none;a=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l200)return dt.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!(Px(a,n,i.from,i.to)&&Fq(a,n,i.from,i.to)))return dt.none}else if(o=n.sliceDoc(i.from,i.to),!o)return dt.none}let s=[];for(let l of t.visibleRanges){let c=new Es(n.doc,o,l.from,l.to);for(;!c.next().done;){let{from:u,to:d}=c.value;if((!a||Px(a,n,u,d))&&(i.empty&&u<=i.from&&d>=i.to?s.push(Vq.range(u,d)):(u>=i.to||d<=i.from)&&s.push(Hq.range(u,d)),s.length>e.maxMatches))return dt.none}}return dt.set(s)}},{decorations:t=>t.decorations}),Zq=De.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),qq=({state:t,dispatch:e})=>{let{selection:n}=t,r=$e.create(n.ranges.map(i=>t.wordAt(i.head)||$e.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function Gq(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let a=!1,s=new Es(t.doc,e,r[r.length-1].to);;)if(s.next(),s.done){if(a)return null;s=new Es(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),a=!0}else{if(a&&r.some(l=>l.from==s.value.from))continue;if(o){let l=t.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}const Uq=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return qq({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=Gq(t,r);return i?(e(t.update({selection:t.selection.addRange($e.range(i.from,i.to),!1),effects:De.scrollIntoView(i.to)})),!0):!1},qs=Ge.define({combine(t){return to(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new lG(e),scrollToMatch:e=>De.scrollIntoView(e)})}});class FR{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||zq(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new eG(this):new Kq(this)}getCursor(e,n=0,r){let i=e.doc?e:jt.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Ua(this,i,n,r):Ga(this,i,n,r)}}class XR{constructor(e){this.spec=e}}function Ga(t,e,n,r){return new Es(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?Yq(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Yq(t,e){return(n,r,i,o)=>((o>n||o+i.length=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Ga(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function Ua(t,e,n,r){return new HR(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?Jq(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function lf(t,e){return t.slice(rr(t,e,!1),e)}function cf(t,e){return t.slice(e,rr(t,e))}function Jq(t){return(e,n,r)=>!r[0].length||(t(lf(r.input,r.index))!=wn.Word||t(cf(r.input,r.index))!=wn.Word)&&(t(cf(r.input,r.index+r[0].length))!=wn.Word||t(lf(r.input,r.index+r[0].length))!=wn.Word)}class eG extends XR{nextMatch(e,n,r){let i=Ua(this.spec,e,r,e.doc.length).next();return i.done&&(i=Ua(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),a=Ua(this.spec,e,o,r),s=null;for(;!a.next().done;)s=a.value;if(s&&(o==n||s.from>o+10))return s;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let o=+r.slice(0,i);if(o>0&&o=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Ua(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const dc=$t.define(),bO=$t.define(),Qo=Yn.define({create(t){return new Dm(iv(t).create(),null)},update(t,e){for(let n of e.effects)n.is(dc)?t=new Dm(n.value.create(),t.panel):n.is(bO)&&(t=new Dm(t.query,n.value?yO:null));return t},provide:t=>sc.from(t,e=>e.panel)});class Dm{constructor(e,n){this.query=e,this.panel=n}}const tG=dt.mark({class:"cm-searchMatch"}),nG=dt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),rG=kn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Qo))}update(t){let e=t.state.field(Qo);(e!=t.startState.field(Qo)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return dt.none;let{view:n}=this,r=new mo;for(let i=0,o=n.visibleRanges,a=o.length;io[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,s,l,(c,u)=>{let d=n.state.selection.ranges.some(f=>f.from==c&&f.to==u);r.add(c,u,d?nG:tG)})}return r.finish()}},{decorations:t=>t.decorations});function Zc(t){return e=>{let n=e.state.field(Qo,!1);return n&&n.query.spec.valid?t(e,n):GR(e)}}const uf=Zc((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=$e.single(r.from,r.to),o=t.state.facet(qs);return t.dispatch({selection:i,effects:[SO(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),qR(t),!0}),df=Zc((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=$e.single(i.from,i.to),a=t.state.facet(qs);return t.dispatch({selection:o,effects:[SO(t,i),a.scrollToMatch(o.main,t)],userEvent:"select.search"}),qR(t),!0}),iG=Zc((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:$e.create(n.map(r=>$e.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),oG=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],a=0;for(let s=new Es(t.doc,t.sliceDoc(r,i));!s.next().done;){if(o.length>1e3)return!1;s.value.from==r&&(a=o.length),o.push($e.range(s.value.from,s.value.to))}return e(t.update({selection:$e.create(o,a),userEvent:"select.search.matches"})),!0},_x=Zc((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let a=o,s=[],l,c,u=[];a.from==r&&a.to==i&&(c=n.toText(e.getReplacement(a)),s.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(n,a.from,a.to),u.push(De.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let d=t.state.changes(s);return a&&(l=$e.single(a.from,a.to).map(d),u.push(SO(t,a)),u.push(n.facet(qs).scrollToMatch(l.main,t))),t.dispatch({changes:d,selection:l,effects:u,userEvent:"input.replace"}),!0}),aG=Zc((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:a}=i;return{from:o,to:a,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:De.announce.of(r),userEvent:"input.replace.all"}),!0});function yO(t){return t.state.facet(qs).createPanel(t)}function iv(t,e){var n,r,i,o,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let c=t.facet(qs);return new FR({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:c.wholeWord})}function ZR(t){let e=ac(t,yO);return e&&e.dom.querySelector("[main-field]")}function qR(t){let e=ZR(t);e&&e==t.root.activeElement&&e.select()}const GR=t=>{let e=t.state.field(Qo,!1);if(e&&e.panel){let n=ZR(t);if(n&&n!=t.root.activeElement){let r=iv(t.state,e.query.spec);r.valid&&t.dispatch({effects:dc.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[bO.of(!0),e?dc.of(iv(t.state,e.query.spec)):$t.appendConfig.of(uG)]});return!0},UR=t=>{let e=t.state.field(Qo,!1);if(!e||!e.panel)return!1;let n=ac(t,yO);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:bO.of(!1)}),!0},sG=[{key:"Mod-f",run:GR,scope:"editor search-panel"},{key:"F3",run:uf,shift:df,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:uf,shift:df,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:UR,scope:"editor search-panel"},{key:"Mod-Shift-l",run:oG},{key:"Mod-Alt-g",run:jq},{key:"Mod-d",run:Uq,preventDefault:!0}];class lG{constructor(e){this.view=e;let n=this.query=e.state.field(Qo).query.spec;this.commit=this.commit.bind(this),this.searchField=ln("input",{value:n.search,placeholder:Xr(e,"Find"),"aria-label":Xr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ln("input",{value:n.replace,placeholder:Xr(e,"Replace"),"aria-label":Xr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ln("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=ln("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=ln("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,a){return ln("button",{class:"cm-button",name:i,onclick:o,type:"button"},a)}this.dom=ln("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>uf(e),[Xr(e,"next")]),r("prev",()=>df(e),[Xr(e,"previous")]),r("select",()=>iG(e),[Xr(e,"all")]),ln("label",null,[this.caseField,Xr(e,"match case")]),ln("label",null,[this.reField,Xr(e,"regexp")]),ln("label",null,[this.wordField,Xr(e,"by word")]),...e.state.readOnly?[]:[ln("br"),this.replaceField,r("replace",()=>_x(e),[Xr(e,"replace")]),r("replaceAll",()=>aG(e),[Xr(e,"replace all")])],ln("button",{name:"close",onclick:()=>UR(e),"aria-label":Xr(e,"close"),type:"button"},["×"])])}commit(){let e=new FR({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:dc.of(e)}))}keydown(e){bF(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?df:uf)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),_x(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(dc)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(qs).top}}function Xr(t,e){return t.state.phrase(e)}const zu=30,ju=/[\s\.,:;?!]/;function SO(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-zu),a=Math.min(i,n+zu),s=t.state.sliceDoc(o,a);if(o!=r.from){for(let l=0;ls.length-zu;l--)if(!ju.test(s[l-1])&&ju.test(s[l])){s=s.slice(0,l);break}}return De.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const cG=De.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),uG=[Qo,Zo.low(rG),cG];class YR{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Xn(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(JR(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function Tx(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function dG(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;otypeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:dG(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function fG(t,e){return n=>{for(let r=Xn(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class Rx{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function pa(t){return t.selection.main.from}function JR(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const xO=eo.define();function hG(t,e,n,r){let{main:i}=t.selection,o=n-i.from,a=r-i.from;return{...t.changeByRange(s=>{if(s!=i&&n!=r&&t.sliceDoc(s.from+o,s.from+a)!=t.sliceDoc(n,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:l},range:$e.cursor(s.from+o+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const Ix=new WeakMap;function mG(t){if(!Array.isArray(t))return t;let e=Ix.get(t);return e||Ix.set(t,e=KR(t)),e}const ff=$t.define(),fc=$t.define();class pG{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&x<=57||x>=97&&x<=122?2:x>=65&&x<=90?1:0:($=V0(x))!=$.toLowerCase()?1:$!=$.toUpperCase()?2:0;(!v||C==1&&g||S==0&&C!=0)&&(n[d]==x||r[d]==x&&(f=!0)?a[d++]=v:a.length&&(O=!1)),S=C,v+=Di(x)}return d==l&&a[0]==0&&O?this.result(-100+(f?-200:0),a,e):h==l&&m==0?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):h==l?this.ret(-900-e.length,[m,p]):d==l?this.result(-100+(f?-200:0)+-700+(O?0:-1100),a,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let a of n){let s=a+(this.astral?Di(Nr(r,a)):1);o&&i[o-1]==a?i[o-1]=s:(i[o++]=a,i[o++]=s)}return this.ret(e-r.length,i)}}class gG{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:vG,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>Mx(e(r),n(r)),optionClass:(e,n)=>r=>Mx(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function Mx(t,e){return t?e?t+" "+e:t:e}function vG(t,e,n,r,i,o){let a=t.textDirection==yn.RTL,s=a,l=!1,c="top",u,d,f=e.left-i.left,h=i.right-e.right,m=r.right-r.left,p=r.bottom-r.top;if(s&&f=p||v>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let g=(e.bottom-e.top)/o.offsetHeight,O=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${u/g}px; max-width: ${d/O}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function OG(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let a=document.createElement("span");a.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let c=0;cl&&a.appendChild(document.createTextNode(s.slice(l,u)));let f=a.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(s.slice(u,d))),f.className="cm-completionMatchedText",l=d}return ln.position-r.position).map(n=>n.render)}function Bm(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class bG{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:a}=i.open,s=e.state.facet(Gn);this.optionContent=OG(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=Bm(o.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let u=l.target,d;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(d=/-(\d+)$/.exec(u.id))&&+d[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Gn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:fc.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:a,disabled:s}=r.open;(!i.open||i.open.options!=o)&&(this.range=Bm(o.length,a,e.state.facet(Gn).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),s!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=Bm(n.options.length,n.selected,this.view.state.facet(Gn).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>Lr(this.view.state,a,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&SG(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let a=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom{a.target==i&&a.preventDefault()});let o=null;for(let a=r.from;ar.from||r.from==0))if(o=f,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=f}}const u=i.appendChild(document.createElement("li"));u.id=n+"-"+a,u.setAttribute("role","option");let d=this.optionClass(s);d&&(u.className=d);for(let f of this.optionContent){let h=f(s,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew bG(n,t,e)}function SG(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.topn.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function Ex(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function xG(t,e){let n=[],r=null,i=null,o=u=>{n.push(u);let{section:d}=u.completion;if(d){r||(r=[]);let f=typeof d=="string"?d:d.name;r.some(h=>h.name==f)||r.push(typeof d=="string"?{name:f}:d)}},a=e.facet(Gn);for(let u of t)if(u.hasResult()){let d=u.result.getMatch;if(u.result.filter===!1)for(let f of u.result.options)o(new Rx(f,u.source,d?d(f):[],1e9-n.length));else{let f=e.sliceDoc(u.from,u.to),h,m=a.filterStrict?new gG(f):new pG(f);for(let p of u.result.options)if(h=m.match(p.label)){let g=p.displayLabel?d?d(p,h.matched):[]:h.matched,O=h.score+(p.boost||0);if(o(new Rx(p,u.source,g,O)),typeof p.section=="object"&&p.section.rank==="dynamic"){let{name:v}=p.section;i||(i=Object.create(null)),i[v]=Math.max(O,i[v]||-1e9)}}}}if(r){let u=Object.create(null),d=0,f=(h,m)=>(h.rank==="dynamic"&&m.rank==="dynamic"?i[m.name]-i[h.name]:0)||(typeof h.rank=="number"?h.rank:1e9)-(typeof m.rank=="number"?m.rank:1e9)||(h.namef.score-d.score||c(d.completion,f.completion))){let d=u.completion;!l||l.label!=d.label||l.detail!=d.detail||l.type!=null&&d.type!=null&&l.type!=d.type||l.apply!=d.apply||l.boost!=d.boost?s.push(u):Ex(u.completion)>Ex(l)&&(s[s.length-1]=u),l=u.completion}return s}class os{constructor(e,n,r,i,o,a){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new os(this.options,kx(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o,a){if(i&&!a&&e.some(c=>c.isPending))return i.setDisabled();let s=xG(e,n);if(!s.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let l=n.facet(Gn).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;uu.hasResult()?Math.min(c,u.from):c,1e8),create:TG,above:o.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new os(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new os(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class hf{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new hf(PG,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Gn),o=(r.override||n.languageDataAt("autocomplete",pa(n)).map(mG)).map(l=>(this.active.find(u=>u.source==l)||new ui(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((l,c)=>l==this.active[c])&&(o=this.active);let a=this.open,s=e.effects.some(l=>l.is($O));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||o.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!$G(o,this.active)||s?a=os.build(o,n,this.id,a,r,s):a&&a.disabled&&!o.some(l=>l.isPending)&&(a=null),!a&&o.every(l=>!l.isPending)&&o.some(l=>l.hasResult())&&(o=o.map(l=>l.hasResult()?new ui(l.source,0):l));for(let l of e.effects)l.is(tI)&&(a=a&&a.setSelected(l.value,this.id));return o==this.active&&a==this.open?this:new hf(o,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?CG:wG}}function $G(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const PG=[];function eI(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(xO);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class ui{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=eI(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new ui(i.source,0)),r&4&&i.state==0&&(i=new ui(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(ff))i=new ui(i.source,1,o.value);else if(o.is(fc))i=new ui(i.source,0);else if(o.is($O))for(let a of o.value)a.source==i.source&&(i=a);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(pa(e.state))}}class hs extends ui{constructor(e,n,r,i,o,a){super(e,3,n),this.limit=r,this.result=i,this.from=o,this.to=a}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=pa(e.state);if(s>a||!i||n&2&&(pa(e.startState)==this.from||sn.map(e))}}),tI=$t.define(),jr=Yn.define({create(){return hf.start()},update(t,e){return t.update(e)},provide:t=>[iO.from(t,e=>e.tooltip),De.contentAttributes.from(t,e=>e.attrs)]});function CO(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(jr).active.find(i=>i.source==e.source);return r instanceof hs?(typeof n=="string"?t.dispatch({...hG(t.state,n,r.from,r.to),annotations:xO.of(e.completion)}):n(t,e.completion,r.from,r.to),!0):!1}const TG=yG(jr,CO);function Lu(t,e="option"){return n=>{let r=n.state.field(jr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(t?1:-1):t?0:a-1;return s<0?s=e=="page"?0:a-1:s>=a&&(s=e=="page"?a-1:0),n.dispatch({effects:tI.of(s)}),!0}}const RG=t=>{let e=t.state.field(jr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(jr,!1)?(t.dispatch({effects:ff.of(!0)}),!0):!1,IG=t=>{let e=t.state.field(jr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:fc.of(null)}),!0)};class MG{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const EG=50,kG=1e3,AG=kn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(jr).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(jr),n=t.state.facet(Gn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(jr)==e)return;let r=t.transactions.some(o=>{let a=eI(o,n);return a&8||(o.selection||o.docChanged)&&!(a&3)});for(let o=0;oEG&&Date.now()-a.time>kG){for(let s of a.context.abortListeners)try{s()}catch(l){Lr(this.view.state,l)}a.context.abortListeners=null,this.running.splice(o--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(a=>a.is(ff)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(a=>a.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(jr);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Gn).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=pa(e),r=new YR(e,n,t.explicit,this.view),i=new MG(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:fc.of(null)}),Lr(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Gn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Gn),r=this.view.state.field(jr);for(let i=0;is.source==o.active.source);if(a&&a.isPending)if(o.done==null){let s=new ui(o.active.source,0);for(let l of o.updates)s=s.update(l,n);s.isPending||e.push(s)}else this.startQuery(a)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:$O.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(jr,!1);if(e&&e.tooltip&&this.view.state.facet(Gn).closeOnBlur){let n=e.open&&QT(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:fc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:ff.of(!1)}),20),this.composing=0}}}),QG=typeof navigator=="object"&&/Win/.test(navigator.platform),NG=Zo.highest(De.domEventHandlers({keydown(t,e){let n=e.state.field(jr,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(QG&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(a=>a.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&CO(e,r),!1}})),nI=De.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class zG{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class wO{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,nr.TrackDel),r=e.mapPos(this.to,1,nr.TrackDel);return n==null||r==null?null:new wO(this.field,n,r)}}class PO{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),a=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(r.length){let c=a,u=/^\t*/.exec(l)[0].length;for(let d=0;dnew wO(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:s}}static parse(e){let n=[],r=[],i=[],o;for(let a of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let s=o[1]?+o[1]:null,l=o[2]||o[3]||"",c=-1,u=l.replace(/\\[{}]/g,d=>d[1]);for(let d=0;d=c&&f.field++}for(let d of i)if(d.line==r.length&&d.from>o.index){let f=o[2]?3+(o[1]||"").length:2;d.from-=f,d.to-=f}i.push(new zG(c,r.length,o.index,o.index+u.length)),a=a.slice(0,o.index)+l+a.slice(o.index+o[0].length)}a=a.replace(/\\([{}])/g,(s,l,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return l}),r.push(a)}return new PO(r,i)}}let jG=dt.widget({widget:new class extends no{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),LG=dt.mark({class:"cm-snippetField"});class Gs{constructor(e,n){this.ranges=e,this.active=n,this.deco=dt.set(e.map(r=>(r.from==r.to?jG:LG).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new Gs(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const qc=$t.define({map(t,e){return t&&t.map(e)}}),DG=$t.define(),hc=Yn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(qc))return n.value;if(n.is(DG)&&t)return new Gs(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>De.decorations.from(t,e=>e?e.deco:dt.none)});function _O(t,e){return $e.create(t.filter(n=>n.field==e).map(n=>$e.range(n.from,n.to)))}function BG(t){let e=PO.parse(t);return(n,r,i,o)=>{let{text:a,ranges:s}=e.instantiate(n.state,i),{main:l}=n.state.selection,c={changes:{from:i,to:o==l.from?l.to:o,insert:qt.of(a)},scrollIntoView:!0,annotations:r?[xO.of(r),Ln.userEvent.of("input.complete")]:void 0};if(s.length&&(c.selection=_O(s,0)),s.some(u=>u.field>0)){let u=new Gs(s,0),d=c.effects=[qc.of(u)];n.state.field(hc,!1)===void 0&&d.push($t.appendConfig.of([hc,XG,ZG,nI]))}n.dispatch(n.state.update(c))}}function rI(t){return({state:e,dispatch:n})=>{let r=e.field(hc,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(a=>a.field==i+t);return n(e.update({selection:_O(r.ranges,i),effects:qc.of(o?null:new Gs(r.ranges,i)),scrollIntoView:!0})),!0}}const WG=({state:t,dispatch:e})=>t.field(hc,!1)?(e(t.update({effects:qc.of(null)})),!0):!1,HG=rI(1),VG=rI(-1),FG=[{key:"Tab",run:HG,shift:VG},{key:"Escape",run:WG}],Ax=Ge.define({combine(t){return t.length?t[0]:FG}}),XG=Zo.highest(Bc.compute([Ax],t=>t.facet(Ax)));function Ar(t,e){return{...e,apply:BG(t)}}const ZG=De.domEventHandlers({mousedown(t,e){let n=e.state.field(hc,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:_O(n.ranges,i.field),effects:qc.of(n.ranges.some(o=>o.field>i.field)?new Gs(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),mc={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},da=$t.define({map(t,e){let n=e.mapPos(t,-1,nr.TrackAfter);return n??void 0}}),TO=new class extends wa{};TO.startSide=1;TO.endSide=-1;const iI=Yn.define({create(){return Ht.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(da)&&(t=t.update({add:[TO.range(n.value,n.value+1)]}));return t}});function qG(){return[UG,iI]}const Hm="()[]{}<>«»»«[]{}";function oI(t){for(let e=0;e{if((GG?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Di(Nr(r,0))==1||e!=i.from||n!=i.to)return!1;let o=JG(t.state,r);return o?(t.dispatch(o),!0):!1}),YG=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=aI(t,t.selection.main.head).brackets||mc.brackets,i=null,o=t.changeByRange(a=>{if(a.empty){let s=eU(t.doc,a.head);for(let l of r)if(l==s&&Sh(t.doc,a.head)==oI(Nr(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:$e.cursor(a.head-l.length)}}return{range:i=a}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},KG=[{key:"Backspace",run:YG}];function JG(t,e){let n=aI(t,t.selection.main.head),r=n.brackets||mc.brackets;for(let i of r){let o=oI(Nr(i,0));if(e==i)return o==i?rU(t,i,r.indexOf(i+i+i)>-1,n):tU(t,i,o,n.before||mc.before);if(e==o&&sI(t,t.selection.main.from))return nU(t,i,o)}return null}function sI(t,e){let n=!1;return t.field(iI).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function Sh(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Di(Nr(n,0)))}function eU(t,e){let n=t.sliceString(e-2,e);return Di(Nr(n,0))==n.length?n:n.slice(1)}function tU(t,e,n,r){let i=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:da.of(a.to+e.length),range:$e.range(a.anchor+e.length,a.head+e.length)};let s=Sh(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:da.of(a.head+e.length),range:$e.cursor(a.head+e.length)}:{range:i=a}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function nU(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&Sh(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:$e.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function rU(t,e,n,r){let i=r.stringPrefixes||mc.stringPrefixes,o=null,a=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:da.of(s.to+e.length),range:$e.range(s.anchor+e.length,s.head+e.length)};let l=s.head,c=Sh(t.doc,l),u;if(c==e){if(Qx(t,l))return{changes:{insert:e+e,from:l},effects:da.of(l+e.length),range:$e.cursor(l+e.length)};if(sI(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:$e.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=Nx(t,l-2*e.length,i))>-1&&Qx(t,u))return{changes:{insert:e+e+e+e,from:l},effects:da.of(l+e.length),range:$e.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=wn.Word&&Nx(t,l,i)>-1&&!iU(t,l,e,i))return{changes:{insert:e+e,from:l},effects:da.of(l+e.length),range:$e.cursor(l+e.length)}}return{range:o=s}});return o?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function Qx(t,e){let n=Xn(t).resolveInner(e+1);return n.parent&&n.from==e}function iU(t,e,n,r){let i=Xn(t).resolveInner(e,-1),o=r.reduce((a,s)=>Math.max(a,s.length),0);for(let a=0;a<5;a++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function Nx(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=wn.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=wn.Word)return o}return-1}function oU(t={}){return[NG,jr,Gn.of(t),AG,aU,nI]}const lI=[{key:"Ctrl-Space",run:Wm},{mac:"Alt-`",run:Wm},{mac:"Alt-i",run:Wm},{key:"Escape",run:IG},{key:"ArrowDown",run:Lu(!0)},{key:"ArrowUp",run:Lu(!1)},{key:"PageDown",run:Lu(!0,"page")},{key:"PageUp",run:Lu(!1,"page")},{key:"Enter",run:RG}],aU=Zo.highest(Bc.computeN([Gn],t=>t.facet(Gn).defaultKeymap?[lI]:[]));class zx{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class oa{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(pc).markerFilter;i&&(e=i(e,r));let o=e.slice().sort((u,d)=>u.from-d.from||u.to-d.to),a=new mo,s=[],l=0;for(let u=0;;){let d=u==o.length?null:o[u];if(!d&&!s.length)break;let f,h;for(s.length?(f=l,h=s.reduce((p,g)=>Math.min(p,g.to),d&&d.from>f?d.from:1e8)):(f=d.from,h=d.to,s.push(d),u++);up.from||p.to==f))s.push(p),u++,h=Math.min(p.to,h);else{h=Math.min(p.from,h);break}}let m=bU(s);if(s.some(p=>p.from==p.to||p.from==p.to-1&&r.doc.lineAt(p.from).to==p.from))a.add(f,f,dt.widget({widget:new pU(m),diagnostics:s.slice()}));else{let p=s.reduce((g,O)=>O.markClass?g+" "+O.markClass:g,"");a.add(f,h,dt.mark({class:"cm-lintRange cm-lintRange-"+m+p,diagnostics:s.slice(),inclusiveEnd:s.some(g=>g.to>h)}))}l=h;for(let p=0;p{if(!(e&&a.diagnostics.indexOf(e)<0))if(!r)r=new zx(i,o,e||a.diagnostics[0]);else{if(a.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new zx(r.from,o,r.diagnostic)}}),r}function sU(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(pc).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(cI))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function lU(t,e){return t.field(Kr,!1)?e:e.concat($t.appendConfig.of(yU))}const cI=$t.define(),RO=$t.define(),uI=$t.define(),Kr=Yn.define({create(){return new oa(dt.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=ks(n,t.selected.diagnostic,o)||ks(n,null,o)}!n.size&&i&&e.state.facet(pc).autoPanel&&(i=null),t=new oa(n,i,r)}for(let n of e.effects)if(n.is(cI)){let r=e.state.facet(pc).autoPanel?n.value.length?gc.open:null:t.panel;t=oa.init(n.value,r,e.state)}else n.is(RO)?t=new oa(t.diagnostics,n.value?gc.open:null,t.selected):n.is(uI)&&(t=new oa(t.diagnostics,t.panel,n.value));return t},provide:t=>[sc.from(t,e=>e.panel),De.decorations.from(t,e=>e.diagnostics)]}),cU=dt.mark({class:"cm-lintRange cm-lintRange-active"});function uU(t,e,n){let{diagnostics:r}=t.state.field(Kr),i,o=-1,a=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{if(e>=l&&e<=c&&(l==c||(e>l||n>0)&&(efI(t,n,!1)))}const fU=t=>{let e=t.state.field(Kr,!1);(!e||!e.panel)&&t.dispatch({effects:lU(t.state,[RO.of(!0)])});let n=ac(t,gc.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},jx=t=>{let e=t.state.field(Kr,!1);return!e||!e.panel?!1:(t.dispatch({effects:RO.of(!1)}),!0)},hU=t=>{let e=t.state.field(Kr,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},mU=[{key:"Mod-Shift-m",run:fU,preventDefault:!0},{key:"F8",run:hU}],pc=Ge.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},to(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function dI(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;ro.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function fI(t,e,n){var r;let i=n?dI(e.actions):[];return ln("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ln("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,a)=>{let s=!1,l=f=>{if(f.preventDefault(),s)return;s=!0;let h=ks(t.state.field(Kr).diagnostics,e);h&&o.apply(t,h.from,h.to)},{name:c}=o,u=i[a]?c.indexOf(i[a]):-1,d=u<0?c:[c.slice(0,u),ln("u",c.slice(u,u+1)),c.slice(u+1)];return ln("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[a]})"`}.`},d)}),e.source&&ln("div",{class:"cm-diagnosticSource"},e.source))}class pU extends no{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return ln("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Lx{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=fI(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class gc{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)jx(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],a=dI(o.actions);for(let s=0;s{for(let o=0;ojx(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Kr).selected;if(!e)return-1;for(let n=0;n{for(let u of c.diagnostics){if(a.has(u))continue;a.add(u);let d=-1,f;for(let h=r;hr&&(this.items.splice(r,d-r),i=!0)),n&&f.diagnostic==n.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),o=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),r++}});r({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{let c=l.height/this.list.offsetHeight;s.topl.bottom&&(this.list.scrollTop+=(s.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Kr),r=ks(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:uI.of(r)})}static open(e){return new gc(e)}}function gU(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function Du(t){return gU(``,'width="6" height="3"')}const vU=De.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Du("#d11")},".cm-lintRange-warning":{backgroundImage:Du("orange")},".cm-lintRange-info":{backgroundImage:Du("#999")},".cm-lintRange-hint":{backgroundImage:Du("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function OU(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function bU(t){let e="hint",n=1;for(let r of t){let i=OU(r.severity);i>n&&(n=i,e=r.severity)}return e}const yU=[Kr,De.decorations.compute([Kr],t=>{let{selected:e,panel:n}=t.field(Kr);return!e||!n||e.from==e.to?dt.none:dt.set([cU.range(e.from,e.to)])}),sX(uU,{hideOn:sU}),vU];var Dx=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(KG)),e.defaultKeymap!==!1&&(r=r.concat(Qq)),e.searchKeymap!==!1&&(r=r.concat(sG)),e.historyKeymap!==!1&&(r=r.concat(VZ)),e.foldKeymap!==!1&&(r=r.concat(iZ)),e.completionKeymap!==!1&&(r=r.concat(lI)),e.lintKeymap!==!1&&(r=r.concat(mU));var i=[];return e.lineNumbers!==!1&&i.push(OX()),e.highlightActiveLineGutter!==!1&&i.push(SX()),e.highlightSpecialChars!==!1&&i.push(NF()),e.history!==!1&&i.push(QZ()),e.foldGutter!==!1&&i.push(lZ()),e.drawSelection!==!1&&i.push(wF()),e.dropCursor!==!1&&i.push(IF()),e.allowMultipleSelections!==!1&&i.push(jt.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(GX()),e.syntaxHighlighting!==!1&&i.push(aR(fZ,{fallback:!0})),e.bracketMatching!==!1&&i.push(bZ()),e.closeBrackets!==!1&&i.push(qG()),e.autocompletion!==!1&&i.push(oU()),e.rectangularSelection!==!1&&i.push(UF()),n!==!1&&i.push(JF()),e.highlightActiveLine!==!1&&i.push(WF()),e.highlightSelectionMatches!==!1&&i.push(Wq()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Hc.of(" ".repeat(e.tabSize))),i.concat([Bc.of(r.flat())]).filter(Boolean)};const SU="#e5c07b",Bx="#e06c75",xU="#56b6c2",$U="#ffffff",md="#abb2bf",ov="#7d8799",CU="#61afef",wU="#98c379",Wx="#d19a66",PU="#c678dd",_U="#21252b",Hx="#2c313a",Vx="#282c34",Vm="#353a42",TU="#3E4451",Fx="#528bff",RU=De.theme({"&":{color:md,backgroundColor:Vx},".cm-content":{caretColor:Fx},".cm-cursor, .cm-dropCursor":{borderLeftColor:Fx},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:TU},".cm-panels":{backgroundColor:_U,color:md},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Vx,color:ov,border:"none"},".cm-activeLineGutter":{backgroundColor:Hx},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Vm},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Vm,borderBottomColor:Vm},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Hx,color:md}}},{dark:!0}),IU=Fc.define([{tag:ie.keyword,color:PU},{tag:[ie.name,ie.deleted,ie.character,ie.propertyName,ie.macroName],color:Bx},{tag:[ie.function(ie.variableName),ie.labelName],color:CU},{tag:[ie.color,ie.constant(ie.name),ie.standard(ie.name)],color:Wx},{tag:[ie.definition(ie.name),ie.separator],color:md},{tag:[ie.typeName,ie.className,ie.number,ie.changed,ie.annotation,ie.modifier,ie.self,ie.namespace],color:SU},{tag:[ie.operator,ie.operatorKeyword,ie.url,ie.escape,ie.regexp,ie.link,ie.special(ie.string)],color:xU},{tag:[ie.meta,ie.comment],color:ov},{tag:ie.strong,fontWeight:"bold"},{tag:ie.emphasis,fontStyle:"italic"},{tag:ie.strikethrough,textDecoration:"line-through"},{tag:ie.link,color:ov,textDecoration:"underline"},{tag:ie.heading,fontWeight:"bold",color:Bx},{tag:[ie.atom,ie.bool,ie.special(ie.variableName)],color:Wx},{tag:[ie.processingInstruction,ie.string,ie.inserted],color:wU},{tag:ie.invalid,color:$U}]),MU=[RU,aR(IU)];var EU=De.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),kU=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:a="",basicSetup:s=!0}=e,l=[];switch(n&&l.unshift(Bc.of([Nq])),s&&(typeof s=="boolean"?l.unshift(Dx()):l.unshift(Dx(s))),a&&l.unshift(XF(a)),o){case"light":l.push(EU);break;case"dark":l.push(MU);break;case"none":break;default:l.push(o);break}return r===!1&&l.push(De.editable.of(!1)),i&&l.push(jt.readOnly.of(!0)),[...l]},AU=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class QU{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(r){console.error("TimeoutLatch callback error:",r)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class Xx{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var Fm=null,NU=()=>typeof window>"u"?new Xx:(Fm||(Fm=new Xx),Fm),Zx=eo.define(),zU=200,jU=[];function LU(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:a,extensions:s=jU,autoFocus:l,theme:c="light",height:u=null,minHeight:d=null,maxHeight:f=null,width:h=null,minWidth:m=null,maxWidth:p=null,placeholder:g="",editable:O=!0,readOnly:v=!1,indentWithTab:y=!0,basicSetup:S=!0,root:x,initialState:$}=t,[C,P]=te(),[w,_]=te(),[R,I]=te(),T=te(()=>({current:null}))[0],M=te(()=>({current:null}))[0],Q=De.theme({"&":{height:u,minHeight:d,maxHeight:f,width:h,minWidth:m,maxWidth:p},"& .cm-scroller":{height:"100% !important"}}),E=De.updateListener.of(L=>{if(L.docChanged&&typeof r=="function"&&!L.transactions.some(H=>H.annotation(Zx))){T.current?T.current.reset():(T.current=new QU(()=>{if(M.current){var H=M.current;M.current=null,H()}T.current=null},zU),NU().add(T.current));var B=L.state.doc,F=B.toString();r(F,L)}i&&i(AU(L))}),k=kU({theme:c,editable:O,readOnly:v,placeholder:g,indentWithTab:y,basicSetup:S}),z=[E,Q,...k];return a&&typeof a=="function"&&z.push(De.updateListener.of(a)),z=z.concat(s),Ri(()=>{if(C&&!R){var L={doc:e,selection:n,extensions:z},B=$?jt.fromJSON($.json,L,$.fields):jt.create(L);if(I(B),!w){var F=new De({state:B,parent:C,root:x});_(F),o&&o(F,B)}}return()=>{w&&(I(void 0),_(void 0))}},[C,R]),ye(()=>{t.container&&P(t.container)},[t.container]),ye(()=>()=>{w&&(w.destroy(),_(void 0)),T.current&&(T.current.cancel(),T.current=null)},[w]),ye(()=>{l&&w&&w.focus()},[l,w]),ye(()=>{w&&w.dispatch({effects:$t.reconfigure.of(z)})},[c,s,u,d,f,h,m,p,g,O,v,y,S,r,a]),ye(()=>{if(e!==void 0){var L=w?w.state.doc.toString():"";if(w&&e!==L){var B=T.current&&!T.current.isDone,F=()=>{w&&e!==w.state.doc.toString()&&w.dispatch({changes:{from:0,to:w.state.doc.toString().length,insert:e||""},annotations:[Zx.of(!0)]})};B?M.current=F:F()}}},[e,w]),{state:R,setState:I,view:w,setView:_,container:C,setContainer:P}}var DU=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],IO=Se((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:d="light",height:f,minHeight:h,maxHeight:m,width:p,minWidth:g,maxWidth:O,basicSetup:v,placeholder:y,indentWithTab:S,editable:x,readOnly:$,root:C,initialState:P}=t,w=uC(t,DU),_=ne(null),{state:R,view:I,container:T,setContainer:M}=LU({root:C,value:r,autoFocus:u,theme:d,height:f,minHeight:h,maxHeight:m,width:p,minWidth:g,maxWidth:O,basicSetup:v,placeholder:y,indentWithTab:S,editable:x,readOnly:$,selection:i,onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,extensions:o,initialState:P});Jt(e,()=>({editor:_.current,state:R,view:I}),[_,T,R,I]);var Q=Ut(k=>{_.current=k,M(k)},[M]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var E=typeof d=="string"?"cm-theme-"+d:"cm-theme";return A("div",xe({ref:Q,className:""+E+(n?" "+n:"")},w))});IO.displayName="CodeMirror";var qx={};class mf{constructor(e,n,r,i,o,a,s,l,c,u=0,d){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new mf(e,[],n,r,r,0,[],0,i?new Gx(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,a=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==r)return;if(a.buffer[s-2]>=n){a.buffer[s-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let s=!1;for(let l=a;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;a>0&&this.buffer[a-2]>r;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=r,this.buffer[a+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:a}=this.p;(i>this.pos||n<=a.maxNode)&&(this.pos=i,a.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=a.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new mf(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new BU(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,a;ol&1&&s==a)||i.push(n[o],a)}n=i}let r=[];for(let i=0;i>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let s=(a>>19)-o;if(s>1){let l=a&65535,c=this.stack.length-s*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return s<<19|65536|l}}else{let s=r(a,o+1);if(s!=null)return s}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Gx{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class BU{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class pf{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new pf(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new pf(this.stack,this.pos,this.index)}}function Sl(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,s=!0),o+=l,s)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class pd{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Ux=new pd;class WU{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Ux,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;or.to:o>=r.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];o+=a.from-r.to,r=a}return o}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n=this.chunk2Pos&&rs.to&&(this.chunk2=this.chunk2.slice(0,s.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Ux,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class ms{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;hI(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}ms.prototype.contextual=ms.prototype.fallback=ms.prototype.extend=!1;class av{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?Sl(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,a=e.resolveOffset(1,1);if(hI(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}av.prototype.contextual=ms.prototype.fallback=ms.prototype.extend=!1;class So{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function hI(t,e,n,r,i,o){let a=0,s=1<0){let m=t[h];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||HU(m,e.token.value,i,o))){e.acceptToken(m);break}}let u=e.next,d=0,f=t[a+2];if(e.next<0&&f>d&&t[c+f*3-3]==65535){a=t[c+f*3-1];continue e}for(;d>1,m=c+h+(h<<1),p=t[m],g=t[m+1]||65536;if(u=g)d=h+1;else{a=t[m+2],e.advance();continue e}}break}}function Yx(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function HU(t,e,n,r){let i=Yx(n,r,e);return i<0||Yx(n,r,t)e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class VU{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Kx(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Kx(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(o instanceof Dn){if(a==e){if(a=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+o.length}}}class FU{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new pd)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,a=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let f=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!u.extend&&(r=d,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new pd,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new pd,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let a=0;a=0&&r.p.parser.dialect.allows(s>>1)){s&1?e.extended=s>>1:e.value=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;oe.bufferLength*4?new VU(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;an)r.push(s);else{if(this.advanceStack(s,r,e))continue;{i||(i=[],o=[]),i.push(s);let l=this.tokens.getMainToken(s);o.push(l.value,l.end)}}break}}if(!r.length){let a=i&&qU(i);if(a)return Zr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Zr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(a)return Zr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(r.length>a)for(r.sort((s,l)=>l.score-s.score);r.length>a;)r.pop();r.some(s=>s.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let a=0;a500&&c.buffer.length>500)if((s.score-c.score||s.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(a--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let a=1;a ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let d=this.fragments.nodeAt(i);d;){let f=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(f>-1&&d.length&&(!c||(d.prop(Nt.contextHash)||0)==u))return e.useNode(d,f),Zr&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof Dn)||d.children.length==0||d.positions[0]>0)break;let h=d.children[0];if(h instanceof Dn&&d.positions[0]==0)d=h;else break}}let s=o.stateSlot(e.state,4);if(s>0)return e.reduce(s),Zr&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;ci?n.push(m):r.push(m)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Jx(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let a=0;a ":"";if(s.deadEnd&&(o||(o=!0,s.restart(),Zr&&console.log(u+this.stackID(s)+" (restarted)"),this.advanceFully(s,r))))continue;let d=s.split(),f=u;for(let h=0;d.forceReduce()&&h<10&&(Zr&&console.log(f+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));h++)Zr&&(f=this.stackID(d)+" -> ");for(let h of s.recoverByInsert(l))Zr&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>s.pos?(c==s.pos&&(c++,l=0),s.recoverByDelete(l,c),Zr&&console.log(u+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),Jx(s,r)):(!i||i.scoret;class mI{constructor(e){this.start=e.start,this.shift=e.shift||Zm,this.reduce=e.reduce||Zm,this.reuse=e.reuse||Zm,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class vc extends HT{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;se.topRules[s][1]),i=[];for(let s=0;s=0)o(u,l,s[c++]);else{let d=s[c+-u];for(let f=-u;f>0;f--)o(s[c++],l,d);c++}}}this.nodeSet=new oO(n.map((s,l)=>Wr.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=LT;let a=Sl(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new ms(a,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new XU(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let a=i[o++],s=a&1,l=i[o++];if(s&&r)return l;for(let c=o+(a>>1);o0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=oo(this.data,o+2);else break;i=n(oo(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=oo(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,a)=>a&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(vc.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(s=>s.from==r.external);if(!o)return r;let a=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=e$(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let a=n.indexOf(o);a>=0&&(r[a]=!0)}let i=null;for(let o=0;or)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,r)<<1|e}return t.get}const GU=316,UU=317,t$=1,YU=2,KU=3,JU=4,eY=318,tY=320,nY=321,rY=5,iY=6,oY=0,sv=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],pI=125,aY=59,lv=47,sY=42,lY=43,cY=45,uY=60,dY=44,fY=63,hY=46,mY=91,pY=new mI({start:!1,shift(t,e){return e==rY||e==iY||e==tY?t:e==nY},strict:!1}),gY=new So((t,e)=>{let{next:n}=t;(n==pI||n==-1||e.context)&&t.acceptToken(eY)},{contextual:!0,fallback:!0}),vY=new So((t,e)=>{let{next:n}=t,r;sv.indexOf(n)>-1||n==lv&&((r=t.peek(1))==lv||r==sY)||n!=pI&&n!=aY&&n!=-1&&!e.context&&t.acceptToken(GU)},{contextual:!0}),OY=new So((t,e)=>{t.next==mY&&!e.context&&t.acceptToken(UU)},{contextual:!0}),bY=new So((t,e)=>{let{next:n}=t;if(n==lY||n==cY){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(t$);t.acceptToken(r?t$:YU)}}else n==fY&&t.peek(1)==hY&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(KU))},{contextual:!0});function qm(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const yY=new So((t,e)=>{if(t.next!=uY||!e.dialectEnabled(oY)||(t.advance(),t.next==lv))return;let n=0;for(;sv.indexOf(t.next)>-1;)t.advance(),n++;if(qm(t.next,!0)){for(t.advance(),n++;qm(t.next,!1);)t.advance(),n++;for(;sv.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==dY)return;for(let r=0;;r++){if(r==7){if(!qm(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(JU,-n)}),SY=cO({"get set async static":ie.modifier,"for while do if else switch try catch finally return throw break continue default case defer":ie.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":ie.operatorKeyword,"let var const using function class extends":ie.definitionKeyword,"import export from":ie.moduleKeyword,"with debugger new":ie.keyword,TemplateString:ie.special(ie.string),super:ie.atom,BooleanLiteral:ie.bool,this:ie.self,null:ie.null,Star:ie.modifier,VariableName:ie.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":ie.function(ie.variableName),VariableDefinition:ie.definition(ie.variableName),Label:ie.labelName,PropertyName:ie.propertyName,PrivatePropertyName:ie.special(ie.propertyName),"CallExpression/MemberExpression/PropertyName":ie.function(ie.propertyName),"FunctionDeclaration/VariableDefinition":ie.function(ie.definition(ie.variableName)),"ClassDeclaration/VariableDefinition":ie.definition(ie.className),"NewExpression/VariableName":ie.className,PropertyDefinition:ie.definition(ie.propertyName),PrivatePropertyDefinition:ie.definition(ie.special(ie.propertyName)),UpdateOp:ie.updateOperator,"LineComment Hashbang":ie.lineComment,BlockComment:ie.blockComment,Number:ie.number,String:ie.string,Escape:ie.escape,ArithOp:ie.arithmeticOperator,LogicOp:ie.logicOperator,BitOp:ie.bitwiseOperator,CompareOp:ie.compareOperator,RegExp:ie.regexp,Equals:ie.definitionOperator,Arrow:ie.function(ie.punctuation),": Spread":ie.punctuation,"( )":ie.paren,"[ ]":ie.squareBracket,"{ }":ie.brace,"InterpolationStart InterpolationEnd":ie.special(ie.brace),".":ie.derefOperator,", ;":ie.separator,"@":ie.meta,TypeName:ie.typeName,TypeDefinition:ie.definition(ie.typeName),"type enum interface implements namespace module declare":ie.definitionKeyword,"abstract global Privacy readonly override":ie.modifier,"is keyof unique infer asserts":ie.operatorKeyword,JSXAttributeValue:ie.attributeValue,JSXText:ie.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":ie.angleBracket,"JSXIdentifier JSXNameSpacedName":ie.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":ie.attributeName,"JSXBuiltin/JSXIdentifier":ie.standard(ie.tagName)}),xY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},$Y={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},CY={__proto__:null,"<":193},wY=vc.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jv'#JvO%[QlO'#JvOOQO'#Jy'#JyOOQO'#Ih'#IhOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J}'#J}OC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jx'#JxODlQpO'#JyOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CD})CD}OOOO'#I`'#I`OFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ia'#IaOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Ic'#IcOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IdOGyQ`O'#JtOIxQ!fO'#JtO+}QlO'#JtOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KTOKPQ`O'#KSOKPQ`O'#KSOKXQ`O,5;^OK^Q`O'#KROOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KQONtQ`O'#KPO9eQ`O'#KPO! YQ`O'#KPO! bQ`O,5;]O! gQ`O'#KPO!#lQ!fO'#JsOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#Jz'#JzOOQO-EtOOQ['#Jh'#JhOOQ[,5>u,5>uOOQ[-E<]-E<]O!TO`QlO,5>VO!LOQ`O,5>XO`QlO,5>ZO!LTQ`O,5>^O!LYQlO,5>dOOQ[,5>j,5>jO%[QlO,5>jO9uQ!0LrO,5>lOOQ[,5>n,5>nO#!dQ`O,5>nOOQ[,5>p,5>pO#!dQ`O,5>pOOQ[,5>r,5>rO##QQpO'#D_O%[QlO'#JvO##sQpO'#JvO##}QpO'#DmO#$`QpO'#DmO#&qQlO'#DmO#&xQ`O'#JuO#'QQ`O,5:WO#'VQ`O'#EtO#'eQ`O'#KUO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CUQpO,5;YO!C^QMhO,5;YO:dQMhO,5;YO#(`Q`O,5@bO#(eQ07dO,5:sOOQO-EPO$6^Q`O,5>POOQ[1G3i1G3iO`QlO1G3iOOQ[1G3o1G3oOOQ[1G3q1G3qO?TQ`O1G3sO$6cQlO1G3uO$:gQlO'#HtOOQ[1G3x1G3xO$:tQ`O'#HzO?YQ`O'#H|OOQ[1G4O1G4OO$:|QlO1G4OO9uQ!0LrO1G4UOOQ[1G4W1G4WOOQ!0Lb'#G_'#G_O9uQ!0LrO1G4YO9uQ!0LrO1G4[O$?TQ`O,5@bO!)[QlO,5;`O9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CUQpO,5:XO$?YQ?MtO,5:XOOQO,5;`,5;`O$?dQpO'#IeO$?zQ`O,5@aOOQ!0Lf1G/r1G/rO$@SQpO'#IkO$@^Q`O,5@pOOQ!0Lb1G0y1G0yO#$`QpO,5:XOOQO'#Ig'#IgO$@fQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CUQpO1G0tO!C^QMhO1G0tOOQ!0Lb1G5|1G5|O!ByQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@mQ!0LrO1G0mO$@xQ!0LrO1G0mO!CUQpO1G0^ODWQpO1G0^O$AWQ!0LrO1G0mOOQO1G0^1G0^O$AlQ!0MxO1G0mPOOO-E<[-E<[POOO1G.h1G.hOOOO1G/i1G/iO$AvQ!bO,5QQpO,5@}OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>]Q`O7+$VO%[QlO1G6lO%[QlO1G6mO%>bQ!0LrO1G6lO%>lQlO1G3kO%>sQ`O1G3kO%>xQlO1G3kOOQ[7+)T7+)TO9uQ!0LrO7+)_O`QlO7+)aOOQ['#Kh'#KhOOQ['#JS'#JSO%?PQlO,5>`OOQ[,5>`,5>`O%[QlO'#HuO%?^Q`O'#HwOOQ[,5>f,5>fO9eQ`O,5>fOOQ[,5>h,5>hOOQ[7+)j7+)jOOQ[7+)p7+)pOOQ[7+)t7+)tOOQ[7+)v7+)vO%?cQpO1G5|O%?}Q?MtO1G0zO%@XQ`O1G0zOOQO1G/s1G/sO%@dQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?P,5?POOQO-ERQ`O7+,WO&>WQ`O7+,XO%[QlO7+,WO%[QlO7+,XOOQ[7+)V7+)VO&>]Q`O7+)VO&>bQlO7+)VO&>iQ`O7+)VOOQ[<nQ`O,5>aOOQ[,5>c,5>cO&>sQ`O1G4QO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&>xQ?MtO1G6ZO?YQ`O7+%_OOQ!0Lf<yQ?MvO,5?aO'@|Q?MvO,5?cO'CPQ?MvO7+'|O'DuQMjOG27TOOQO<VO!l$xO#jROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]$_Oa$qa'z$qa'w$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)dO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Og(pP~P!,TO!Q)iO!g)hO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)hO!_({X$Z({X$]({X$_({X$f({X~O!Q)iO~P!.^O!Q)iO!_({X$Z({X$]({X$_({X$f({X~O!_)kO$Z)oO$])jO$_)jO$f)pO~O![)sO~P!)[O$]$hO$_$gO$f)wO~On$zX!Q$zX#S$zX'y$zX(y$zX(z$zX~OgmXg$zXnmX!]mX#`mX~P!0SOx)yO(b)zO(c)|O~On*VO!Q*OO'y*PO(y$}O(z%PO~Og)}O~P!1WOg*WO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!OVO!l$xO#jVO!l$xO#jROe!iOpkOrPO(VTO(YUO(aVO(o[O~O(T=QO~P#$qO!]-]O!^(iX~O!^-_O~O!g-VO#`-UO!]#hX!^#hX~O!]-`O!^(xX~O!^-bO~O!c-cO!d-cO(U!lO~P#$`O!^-fO~P'_On-iO!_'`O~O!Y-nO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(U!{a(V!{a(Y!{a(e!{a(o!{a~P!#vO!p-sO#`-qO~PChO!c-uO!d-uO(U!lO~PDWOa%nO#`-qO'z%nO~Oa%nO!g#vO#`-qO'z%nO~Oa%nO!g#vO!p-sO#`-qO'z%nO(r'pO~O(P'xO(Q'xO(R-zO~Ov-{O~O!Y'Wa!]'Wa~P!:tO![.PO!Y'WX!]'WX~P%[O!](VO!Y(ha~O!Y(ha~PHRO!](^O!Y(va~O!S%hO![.TO!_%iO(T%gO!Y'^X!]'^X~O#`.VO!](ta!k(taa(ta'z(ta~O!g#vO~P#,wO!](jO!k(sa~O!S%hO!_%iO#j.ZO(T%gO~Op.`O!S%hO![.]O!_%iO!|]O#i._O#j.]O(T%gO!]'aX!k'aX~OR.dO!l#xO~Oh%VOn.gO!_'`O%i.fO~Oa#ci!]#ci'z#ci'w#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:tOn>]O!Q*OO'y*PO(y$}O(z%PO~O#k#_aa#_a#`#_a'z#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#k(`XP(`XR(`X[(`Xa(`Xj(`Xr(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X'z(`X(a(`X(r(`X!k(`X!Y(`X'w(`Xv(`X!_(`X%i(`X!g(`X~P!6kO!].tO!k(kX~P!:tO!k.wO~O!Y.yO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#3cO#n$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#6QO#r$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(aVOa#mi!]#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(aVO(z#}Oa#mi!]#mi#z#mi#{#mi'z#mi(r#mi(y#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#;VO#x#mi~P#;VO#v$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(aVO(y#|O(z#}Oa#mi!]#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#={O#z$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X!]]X!^]X~O$O]X~P#@jOP$[OR#zO[]O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P#EyO!]/POg(pX~P!1WOg/RO~Oa$Pi!]$Pi'z$Pi'w$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:tO$]/SO$_/SO~O$]/TO$_/TO~O!g)hO#`/UO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/VO~O!_)kO$Z/XO$])jO$_)jO$f/YO~O!]VO!l$xO#j^O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P&,QO#S$dOP(`XR(`X[(`Xj(`Xn(`Xr(`X!Q(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X$O(`X'y(`X(a(`X(r(`X(y(`X(z(`X!](`X!^(`X~O$O$Pi!]$Pi!^$Pi~P#BwO$O!ri!^!ri~P$+oOg']a!]']a~P!1WO!^7nO~O!]'da!^'da~P#BwO!Y7oO~P#/sO!g#vO(r'pO!]'ea!k'ea~O!]/pO!k)Oi~O!]/pO!g#vO!k)Oi~Og$|q!]$|q#`$|q$O$|q~P!1WO!Y'ga!]'ga~P#/sO!g7vO~O!]/yO!Y)Pi~P#/sO!]/yO!Y)Pi~O!Y7yO~Oh%VOr8OO!l%eO(r'pO~Oj8QO!g#vO~Or8TO!g#vO(r'pO~O!Q*OO'y*PO(z%POn'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P&5RO!Q*OO'y*POn'la(y'la(z'la!]'la#`'la~Og'la$O'la~P&5tOg(_q!](_q~P!1WO#`8VOg(_q!](_q~P!1WO!Y8WO~Og%Oq!]%Oq#`%Oq$O%Oq~P!1WOa$oy!]$oy'z$oy'w$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:tO!g6rO~O!]5[O!_)Qa~O!_'`OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(a$Ta(r$Ta(y$Ta(z$Ta~O%i7WO~P&8fO%^8[Oa%[i!_%[i'z%[i!]%[i~Oa#cy!]#cy'z#cy'w#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:tO[8^O~Ob8`O(T+qO(VTO(YUO~O!]1TO!^)Xi~O`8dO~O(e(|O!]'pX!^'pX~O!]5uO!^)Ua~O!^8nO~P%;eO(o!sO~P$&YO#[8oO~O!_1oO~O!_1oO%i8qO~On8tO!_1oO%i8qO~O[8yO!]'sa!^'sa~O!]1zO!^)Vi~O!k8}O~O!k9OO~O!k9RO~O!k9RO~P%[Oa9TO~O!g9UO~O!k9VO~O!](wi!^(wi~P#BwOa%nO#`9_O'z%nO~O!](ty!k(tya(ty'z(ty~P!:tO!](jO!k(sy~O%i9bO~P&8fO!_'`O%i9bO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'z$|q(a$|q(r$|q!k$|q!Y$|q'w$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/sO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'z'ja(a'ja(r'ja!k'ja!Y'ja'w'jav'ja!_'ja%i'ja!g'ja~P&5RO#k'laP'laR'la['laa'laj'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la'z'la(a'la(r'la!k'la!Y'la'w'lav'la!_'la%i'la!g'la~P&5tO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'z%Oq(a%Oq(r%Oq!k%Oq!Y%Oq'w%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/sO!]'Yi!k'Yi~P!:tO$O#cq!]#cq!^#cq~P#BwO(y$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(a%aa(r%aa!]%aa!^%aa~On%aa!Q%aa'y%aa(z%aa~P&IyO(z%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(a%ca(r%ca!]%ca!^%ca~On%ca!Q%ca'y%ca(y%ca~P&LQOn>^O!Q*OO'y*PO(z%PO~P&IyOn>^O!Q*OO'y*PO(y$}O~P&LQOR0kO!Q0kO!S0lO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'y}a(a}a(r}a(y}a(z}a!]}a!^}a~O!Q*OO'y*POP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(a$sa(r$sa(y$sa(z$sa!]$sa!^$sa~O!Q*OO'y*POP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(a$ua(r$ua(y$ua(z$ua!]$ua!^$ua~On>^O!Q*OO'y*PO(y$}O(z%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(a%Ta(r%Ta!]%Ta!^%Ta~P''VO$O$mq!]$mq!^$mq~P#BwO$O$oq!]$oq!^$oq~P#BwO!^9oO~O$O9pO~P!1WO!g#vO!]'ei!k'ei~O!g#vO(r'pO!]'ei!k'ei~O!]/pO!k)Oq~O!Y'gi!]'gi~P#/sO!]/yO!Y)Pq~Or9wO!g#vO(r'pO~O[9yO!Y9xO~P#/sO!Y9xO~Oj:PO!g#vO~Og(_y!](_y~P!1WO!]'na!_'na~P#/sOa%[q!_%[q'z%[q!]%[q~P#/sO[:UO~O!]1TO!^)Xq~O`:YO~O#`:ZO!]'pa!^'pa~O!]5uO!^)Ui~P#BwO!S:]O~O!_1oO%i:`O~O(VTO(YUO(e:eO~O!]1zO!^)Vq~O!k:hO~O!k:iO~O!k:jO~O!k:jO~P%[O#`:mO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%i:rO~P&8fO!_'`O%i:rO~O$O#|y!]#|y!^#|y~P#BwOP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(a$|i(r$|i!]$|i!^$|i~P''VO!Q*OO'y*PO(z%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(a'ia(r'ia(y'ia!]'ia!^'ia~O!Q*OO'y*POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(a'ka(r'ka(y'ka(z'ka!]'ka!^'ka~O(y$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'y%ai(a%ai(r%ai(z%ai!]%ai!^%ai~O(z%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'y%ci(a%ci(r%ci(y%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#BwO$O#cy!]#cy!^#cy~P#BwO!g#vO!]'eq!k'eq~O!]/pO!k)Oy~O!Y'gq!]'gq~P#/sOr:|O!g#vO(r'pO~O[;QO!Y;PO~P#/sO!Y;PO~Og(_!R!](_!R~P!1WOa%[y!_%[y'z%[y!]%[y~P#/sO!]1TO!^)Xy~O!]5uO!^)Uq~O(T;XO~O!_1oO%i;[O~O!k;_O~O%i;dO~P&8fOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(a$|q(r$|q!]$|q!^$|q~P''VO!Q*OO'y*PO(z%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(a'ja(r'ja(y'ja!]'ja!^'ja~O!Q*OO'y*POP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la$O'la(a'la(r'la(y'la(z'la!]'la!^'la~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(a%Oq(r%Oq!]%Oq!^%Oq~P''VOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!1WO!Y;hO~P#/sOr;iO!g#vO(r'pO~O[;kO!Y;hO~P#/sO!]'pq!^'pq~P#BwO!]#h!Z!^#h!Z~P#BwO#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'z%e!Z(a%e!Z(r%e!Z!k%e!Z!Y%e!Z'w%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/sOr;tO!g#vO(r'pO~O!Y;uO~P#/sOr;|O!g#vO(r'pO~O!Y;}O~P#/sOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(a%e!Z(r%e!Z!]%e!Z!^%e!Z~P''VOrROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]WO!l$xO#jgPPP!>oI[PPPPPPPPP!BOP!C]PPI[!DnPI[PI[I[I[I[I[PI[!FQP!I[P!LbP!Lf!Lp!Lt!LtP!IXP!Lx!LxP#!OP#!SI[PI[#!Y#%_CjA^PA^PA^A^P#&lA^A^#)OA^#+vA^#.SA^A^#.r#1W#1W#1]#1f#1W#1qPP#1WPA^#2ZA^#6YA^A^6mPPP#:_PPP#:x#:xP#:xP#;`#:xPP#;fP#;]P#;]#;y#;]#P#>V#>]#>k#>q#>{#?R#?]#?c#?s#?y#@k#@}#AT#AZ#Ai#BO#Cs#DR#DY#Et#FS#Gt#HS#HY#H`#Hf#Hp#Hv#H|#IW#Ij#IpPPPPPPPPPPP#IvPPPPPPP#Jk#Mx$ b$ i$ qPPP$']P$'f$*_$0x$0{$1O$1}$2Q$2X$2aP$2g$2jP$3W$3[$4S$5b$5g$5}PP$6S$6Y$6^$6a$6e$6i$7e$7|$8e$8i$8l$8o$8y$8|$9Q$9UR!|RoqOXst!Z#d%m&r&t&u&w,s,x2[2_Y!vQ'`-e1o5{Q%tvQ%|yQ&T|Q&j!VS'W!e-]Q'f!iS'l!r!yU*k$|*Z*oQ+o%}S+|&V&WQ,d&dQ-c'_Q-m'gQ-u'mQ0[*qQ1b,OQ1y,eR<{SU+P%]S!S!nQ!r!v!y!z$|'W'_'`'l'm'n*k*o*q*r-]-c-e-u0[0_1o5{5}%[$ti#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^Q&X|Q'U!eS'[%i-`Q+t&PQ,P&WQ,f&gQ0n+SQ1Y+uQ1_+{Q2Q,jQ2R,kQ5f1TQ5o1aQ6[1zQ6_1|Q6`2PQ8`5gQ8c5lQ8|6bQ:X8dQ:f8yQ;V:YR<}*ZrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R,h&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'b'r(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mR>S[#]WZ#W#Z'X(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ%wxQ%{yW&Q|&V&W,OQ&_!TQ'c!hQ'e!iQ(q#sS+n%|%}Q+r&PQ,_&bQ,c&dS-l'f'gQ.i(rQ1R+oQ1X+uQ1Z+vQ1^+zQ1t,`S1x,d,eQ2|-mQ5e1TQ5i1WQ5n1`Q6Z1yQ8_5gQ8b5kQ8f5pQ:T8^R;T:U!U$zi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y!^%yy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{Q+h%wQ,T&[Q,W&]Q,b&dQ.h(qQ1s,_U1w,c,d,eQ3e.iQ6U1tS6Y1x1yQ8x6Z#f>T#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o>UPS&[!Q&iQ&]!RQ&^!SU*}%[%d=sR,R&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^T)z$u){V+P%]S$i$^c#Y#e%q%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.|.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SQ'Y!eR2q-]!W!nQ!e!r!v!y!z$|'W'_'`'l'm'n*Z*k*o*q*r-]-c-e-u0[0_1o5{5}R1l,ZnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&y!^Q'v!xS(s#u<^Q+l%zQ,]&_Q,^&aQ-j'dQ-w'oS.r(x=PS0q+X=ZQ1P+mQ1n,[Q2c,zQ2e,{Q2m-WQ2z-kQ2}-oS5Y0r=eQ5a1QS5d1S=fQ6t2oQ6x2{Q6}3SQ8]5bQ9Y6vQ9Z6yQ9^7OR:l9V$d$]c#Y#e%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SS#q]SU$fd)_,mS(p#p'iU*v%R(w4OU0m+O.n7gQ5^0xQ7V3`Q9d7YR:s9em!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}Q't!uS(f#g2US-s'k'wQ/s*]Q0R*jQ3U-vQ4f/tQ4r0TQ4s0UQ4x0^Q7r4`S7}4t4vS8R4y4{Q9r7sQ9v7yQ9{8OQ:Q8TS:{9w9xS;g:|;PS;s;h;iS;{;t;uSSR=o>R%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Q%fj!^%xy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{S&Oz!jQ+k%yQ,a&dW1v,b,c,d,eU6X1w1x1yS8w6Y6ZQ:d8x!r=j$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ=t>QR=u>R%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Y#bWZ#W#Z(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ,n&o!p=k$Z$n)s-U-X/V2p4T5w6s:Z:mSR=n'XU']!e%i*ZR2s-`%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ,m&oQ0x+gQ3`.gQ7Y3dR9e7[!b$Tc#Y%q(S(Y(t(y)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:oS)^)q-Z.|2k2n3p4P4X6u7b7k7l8k9X9g9m9n;W;`=vQ>X>ZR>Y>['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mSS$oh$pR4U/U'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$kf$qQ$ifS)j$l)nR)v$qT$jf$qT)l$l)n'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$oh$pQ$rhR)u$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_!s>Q$Z$n'X)s-U-X/V2p4T5w6s:Z:mS#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'b)O)s*i+]+g,p,s,x-i.g/V/n0]0l1r2S2T2V2X2[2_2a3d4T4z6T6e6f6i7[8t9T!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^Q+T%aQ/c*Oo4OP>X>YQ*c$zU*l$|*Z*oQ+U%bQ0W*m#f=q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^n=rTQ=x>UQ=y>VR=z>W!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o4OP>X>Y>]>^Q,U&]Q1h,WQ5s1gR8h5tV*n$|*Z*oU*n$|*Z*oT5z1o5{S0P*i/nQ4w0]T8S4z:]Q+j%xQ0V*lQ1O+kQ1u,aQ6W1vQ8v6XQ:c8wR;^:d!U%Oi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Yx*R$v)e*S*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>OS0`*t0a#f]>^nZ>[`=T3}7c7f7j9h:t:w;yS=_.l3iT=`7e9k!U%Qi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y|*T$v)e*U*t+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>OS0b*u0c#f]>^nZ>[d=V3}7d7e7j9h9i:t:u:w;yS=a.m3jT=b7f9lrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q&f!UR,p&ornOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R&f!UQ,Y&^R1d,RsnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q1p,_S6R1s1tU8p6P6Q6US:_8r8sS;Y:^:aQ;m;ZR;w;nQ&m!VR,i&iR6_1|R:f8yW&Q|&V&W,OR1Z+vQ&r!WR,s&sR,y&xT2],x2_R,}&yQ,|&yR2f,}Q'y!{R-y'ySsOtQ#dXT%ps#dQ#OTR'{#OQ#RUR'}#RQ){$uR/`){Q#UVR(Q#UQ#XWU(W#X(X.QQ(X#YR.Q(YQ-^'YR2r-^Q.u(yS3m.u3nR3n.vQ-e'`R2v-eY!rQ'`-e1o5{R'j!rQ/Q)eR4S/QU#_W%h*YU(_#_(`.RQ(`#`R.R(ZQ-a']R2t-at`OXst!V!Z#d%m&i&k&r&t&u&w,s,x2[2_S#hZ%eU#r`#h.[R.[(jQ(k#jQ.X(gW.a(k.X3X7RQ3X.YR7R3YQ)n$lR/W)nQ$phR)t$pQ$`cU)a$`-|O>Z>[Q/z*eU4k/z4m7xQ4m/|R7x4lS*o$|*ZR0Y*ox*S$v)e*t*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>O!d.j(u)c*[*e.l.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/h*S.j7ca7c3}7e7f7j9h:t:w;yQ0a*tQ3i.lU4}0a3i9kR9k7e|*U$v)e*t*u+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>O!h.k(u)c*[*e.l.m.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/j*U.k7de7d3}7e7f7j9h9i:t:u:w;yQ0c*uQ3j.mU5P0c3j9lR9l7fQ*z%UR0g*zQ5]0vR8Y5]Q+_%kR0u+_Q5v1jS8j5v:[R:[8kQ,[&_R1m,[Q5{1oR8m5{Q1{,fS6]1{8zR8z6_Q1U+rW5h1U5j8a:VQ5j1XQ8a5iR:V8bQ+w&QR1[+wQ2_,xR6m2_YrOXst#dQ&v!ZQ+a%mQ,r&rQ,t&tQ,u&uQ,w&wQ2Y,sS2],x2_R6l2[Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'q!uQ+`%lQ+l%zQ,Q&XQ,h&mQ-P&|W-p'k's't'wQ-w'oQ0X*nQ1P+mQ1c,PS2O,i,lQ2g-OQ2h-RQ2i-SQ2}-oW3P-r-s-v-xQ5a1QQ5m1_Q5q1eQ6V1uQ6a2QQ6k2ZU6z3O3R3UQ6}3SQ8]5bQ8e5oQ8g5rQ8l5zQ8u6WQ8{6`S9[6{7PQ9^7OQ:W8cQ:b8vQ:g8|Q:n9]Q;U:XQ;]:cQ;a:oQ;l;VR;o;^Q%zyQ'd!iQ'o!uU+m%{%|%}Q-W'VU-k'e'f'gS-o'k'uQ0Q*jS1Q+n+oQ2o-YS2{-l-mQ3S-tS4p0R0UQ5b1RQ6v2uQ6y2|Q7O3TU7{4r4s4vQ9z7}R;O9{S$wi>PR*{%VU%Ui%V>PR0f*yQ$viS(u#v+iS)c$b$cQ)e$dQ*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.lPQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.nSR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:pY,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[SY],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Wp(Z!b'|0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(X#S$i&j'}0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Wp(Z!b'}0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(V':f$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Wp(Z!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Z!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(WpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(WpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Wp(Z!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$i&j(Z!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Z!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Z!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Z!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Z!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-v$?V_!^(CdvBr$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Wp(Z!b'|0/l$]#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[vY,OY,bY,yY,2,3,4,5,6,7,8,9,10,11,12,13,14,gY,new av("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new av("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>xY[t]||-1},{term:343,get:t=>$Y[t]||-1},{term:95,get:t=>CY[t]||-1}],tokenPrec:15201}),gI=[Ar("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ar("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ar("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ar("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Ar("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Ar(`try { \${} } catch (\${error}) { \${} -}`,{label:"try",detail:"/ catch block",type:"keyword"}),Ir("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Ir(`if (\${}) { +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Ar("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Ar(`if (\${}) { \${} } else { \${} -}`,{label:"if",detail:"/ else block",type:"keyword"}),Ir(`class \${name} { +}`,{label:"if",detail:"/ else block",type:"keyword"}),Ar(`class \${name} { constructor(\${params}) { \${} } -}`,{label:"class",detail:"definition",type:"keyword"}),Ir('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ir('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],LY=Jk.concat([Ir("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Ir("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Ir("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Bx=new DH,eR=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function ll(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const jY=["FunctionDeclaration"],DY={FunctionDeclaration:ll("function"),ClassDeclaration:ll("class"),ClassExpression:()=>!0,EnumDeclaration:ll("constant"),TypeAliasDeclaration:ll("type"),NamespaceDeclaration:ll("namespace"),VariableDefinition(t,e){t.matchContext(jY)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function tR(t,e){let n=Bx.get(e);if(n)return n;let r=[],i=!0;function o(a,s){let l=t.sliceString(a.from,a.to);r.push({label:l,type:s})}return e.cursor(Bn.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let s=DY[a.name];if(s&&s(a,o)||eR.has(a.name))return!1}else if(a.to-a.from>8192){for(let s of tR(t,a.node))r.push(s);return!1}}),Bx.set(e,r),r}const Wx=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,nR=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function BY(t){let e=Fn(t.state).resolveInner(t.pos,-1);if(nR.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Wx.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)eR.has(i.name)&&(r=r.concat(tR(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:Wx}}const pa=ic.define({name:"javascript",parser:zY.configure({props:[eO.add({IfStatement:$p({except:/^\s*({|else\b)/}),TryStatement:$p({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:oX,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:jg({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":$p({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),nO.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":AT,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),rR={test:t=>/^JSX/.test(t.name),facet:kT({commentTokens:{block:{open:"{/*",close:"*/}"}}})},WY=pa.configure({dialect:"ts"},"typescript"),FY=pa.configure({dialect:"jsx",props:[K0.add(t=>t.isTop?[rR]:void 0)]}),VY=pa.configure({dialect:"jsx ts",props:[K0.add(t=>t.isTop?[rR]:void 0)]},"typescript");let iR=t=>({label:t,type:"keyword"});const oR="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(iR),HY=oR.concat(["declare","implements","private","protected","public"].map(iR));function XY(t={}){let e=t.jsx?t.typescript?VY:FY:t.typescript?WY:pa,n=t.typescript?LY.concat(HY):Jk.concat(oR);return new IT(e,[pa.data.of({autocomplete:$q(nR,Qk(n))}),pa.data.of({autocomplete:BY}),t.jsx?GY:[]])}function ZY(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function Fx(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const qY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),GY=ze.inputHandler.of((t,e,n,r,i)=>{if((qY?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!pa.isActiveAt(t.state,e,-1))return!1;let o=i(),{state:a}=o,s=a.changeByRange(l=>{var c;let{head:u}=l,d=Fn(a).resolveInner(u-1,-1),f;if(d.name=="JSXStartTag"&&(d=d.parent),!(a.doc.sliceString(u-1,u)!=r||d.name=="JSXAttributeValue"&&d.to>u)){if(r==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:""}};if(r=="/"&&d.name=="JSXStartCloseTag"){let h=d.parent,p=h.parent;if(p&&h.from==u-2&&((f=Fx(a.doc,p.firstChild,u))||((c=p.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let m=`${f}>`;return{range:xe.cursor(u+m.length,-1),changes:{from:u,insert:m}}}}else if(r==">"){let h=ZY(d);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(u,u+2))&&(f=Fx(a.doc,h,u)))return{range:l,changes:{from:u,insert:``}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([o,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),{TextArea:BU}=bi,{Text:cl}=yn;function Jg({visible:t,onCancel:e,onSave:n,roleName:r,roleConfig:i,availableRoles:o=[],domains:a=[],entities:s=[],services:l={}}){const[c]=yr.useForm(),[u,d]=J(!1),[f,h]=J([]),[p,m]=J([]),[g,v]=J(!1),[O,S]=J(!1),[x,b]=J(null),[C,$]=J(""),[w,P]=J(""),[_,T]=J(null),[R,k]=J(null),[I,Q]=J({}),[M,E]=J({});be(()=>{var Y,ce,te,Oe;if(t&&i){c.setFieldsValue({description:i.description||"",admin:i.admin||!1,deny_all:i.deny_all||!1,fallbackRole:i.fallbackRole||"",domains:((Y=i.permissions)==null?void 0:Y.domains)||{},entities:((ce=i.permissions)==null?void 0:ce.entities)||{}});const ye=[],pe=[];(te=i.permissions)!=null&&te.domains&&Object.entries(i.permissions.domains).forEach(([De,we])=>{ye.push({domain:De,services:we.services||[],allow:we.allow||!1})}),(Oe=i.permissions)!=null&&Oe.entities&&Object.entries(i.permissions.entities).forEach(([De,we])=>{pe.push({entity:De,services:we.services||[],allow:we.allow||!1})}),h(ye),m(pe),d(!!i.template),v(i.admin||!1),S(i.deny_all||!1),b(null),$(""),P(i.template||""),T(null);const Qe={},Me={};ye.forEach((De,we)=>{Qe[we]=De.services.length>0}),pe.forEach((De,we)=>{Me[we]=De.services.length>0}),Q(Qe),E(Me)}else t&&(c.resetFields(),h([]),m([]),d(!1),v(!1),S(!1),z(!1),b(null),$(""),P(""),T(null),Q({}),E({}))},[t,i,c]),be(()=>{t&&ee().then(Y=>{k(Y)})},[t]);const[N,z]=J(!1),L=()=>{z(!0)},F=Y=>{if(z(!1),Y==="convert"){const ce=f.map(Oe=>({...Oe,allow:!0})),te=p.map(Oe=>({...Oe,allow:!0}));h(ce),m(te)}else Y==="clear"?(h([]),m([])):Y==="cancel"&&(S(!1),c.setFieldsValue({deny_all:!1}))},H=async()=>{try{const Y=await c.validateFields(),ce={},te={};f.forEach(pe=>{ce[pe.domain]={services:pe.services,allow:pe.allow||!1}}),p.forEach(pe=>{te[pe.entity]={services:pe.services,allow:pe.allow||!1}});const Oe={description:Y.description,admin:Y.admin||!1,deny_all:Y.deny_all||!1,permissions:{domains:ce,entities:te}};u&&w&&(Oe.template=w,Y.fallbackRole&&(Oe.fallbackRole=Y.fallbackRole));const ye={roleData:Oe,roleName:r||Y.roleName};n(ye)}catch(Y){console.error("Form validation failed:",Y)}},V=()=>{const Y=f.length;h([...f,{domain:"",services:[],allow:O}]),Q({...I,[Y]:!1})},X=Y=>{h(f.filter((Oe,ye)=>ye!==Y));const ce={...I};delete ce[Y];const te={};Object.keys(ce).forEach(Oe=>{const ye=parseInt(Oe);ye>Y?te[ye-1]=ce[Oe]:ye{const Oe=[...f];Oe[Y]={...Oe[Y],[ce]:te},h(Oe)},G=()=>{const Y=p.length;m([...p,{entity:"",services:[],allow:O}]),E({...M,[Y]:!1})},se=Y=>{m(p.filter((Oe,ye)=>ye!==Y));const ce={...M};delete ce[Y];const te={};Object.keys(ce).forEach(Oe=>{const ye=parseInt(Oe);ye>Y?te[ye-1]=ce[Oe]:ye{const Oe=[...p];Oe[Y]={...Oe[Y],[ce]:te},m(Oe)},le=Y=>{Q({...I,[Y]:!0})},me=Y=>{E({...M,[Y]:!0})},ie=Y=>{var ce;return((ce=l.domains)==null?void 0:ce[Y])||[]},ne=Y=>{var ce;return((ce=l.entities)==null?void 0:ce[Y])||[]},ue=async()=>{var Y,ce,te;try{const Oe=document.querySelector("home-assistant");if(Oe&&Oe.hass){const pe=Oe.hass;if((ce=(Y=pe.auth)==null?void 0:Y.data)!=null&&ce.access_token)return{access_token:pe.auth.data.access_token};if((te=pe.auth)!=null&&te.access_token)return{access_token:pe.auth.access_token}}const ye=localStorage.getItem("hassTokens")||sessionStorage.getItem("hassTokens");return ye?{access_token:JSON.parse(ye).access_token}:null}catch(Oe){return console.error("Auth error:",Oe),null}},de=()=>{const Y=window.location.href,ce=new URL(Y),te=ce.hostname,Oe=ce.protocol,ye=ce.port?`:${ce.port}`:"",pe=`${Oe}//${te}${ye}/developer-tools/template`;window.open(pe,"_blank")},j=()=>{P(""),b(null),T(null),$(""),c.setFieldsValue({fallbackRole:""}),d(!1)},ee=async()=>{try{const Y=await ue();if(!Y)return null;const ce=await fetch("/api/rbac/current-user",{headers:{Authorization:`Bearer ${Y.access_token}`}});return ce.ok?(await ce.json()).person_entity_id:null}catch(Y){return console.error("Error getting current user entity:",Y),null}},he=(Y="variable")=>{if(R){let ce="";switch(Y){case"variable":ce="current_user_str";break;case"home":ce="states[current_user_str].state == 'home'";break;case"away":ce="states[current_user_str].state != 'home'";break;default:ce="{{ states(current_user_str) }}"}const te=w+ce;P(te),b(null),T(null)}},ve=async()=>{try{if(b("loading"),$(""),!w){b("error"),$("No template to test"),ar.error({message:"Template Test Failed",description:"Please enter a template first",placement:"bottomRight",duration:3});return}const Y=await ue();if(!Y)throw new Error("Not authenticated with Home Assistant");const te=await(await fetch("/api/rbac/evaluate-template",{method:"POST",headers:{Authorization:`Bearer ${Y.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({template:w})})).json();te.success?(b(te.result?"true":"false"),T(te.evaluated_value)):(b("error"),$(te.error),T(null),ar.error({message:"Template Evaluation Error",description:te.error,placement:"bottomRight",duration:5}))}catch(Y){console.error("Error testing template:",Y),b("error"),$(Y.message),T(null),ar.error({message:"Template Test Failed",description:Y.message,placement:"bottomRight",duration:5})}};return A(At,{children:[A(ur,{title:A("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:"40px"},children:[A("span",{children:r?`Edit Role: ${r}`:"Create New Role"}),A("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"4px"},children:[A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(cl,{style:{fontSize:"14px"},children:"Admin Role"}),A(Oi,{checked:g,onChange:Y=>{v(Y),c.setFieldsValue({admin:Y})}})]}),!g&&A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(cl,{style:{fontSize:"14px"},children:O?"Deny All":"Allow All"}),A(on,{title:O?"Switch to Allow All (permit by default)":"Switch to Deny All (block by default)",children:A(Oi,{checked:O,checkedChildren:"✗",unCheckedChildren:"✓",style:{backgroundColor:O?"#ff4d4f":"#52c41a"},onChange:Y=>{S(Y),c.setFieldsValue({deny_all:Y}),Y&&(f.some(te=>!te.allow)||p.some(te=>!te.allow))&&L()}})})]})]})]}),open:t,onCancel:e,onOk:H,width:800,okText:"Save Role",cancelText:"Cancel",children:A(yr,{form:c,layout:"vertical",children:[!r&&A(yr.Item,{name:"roleName",label:"Role Name",rules:[{required:!0,message:"Please enter a role name"},{pattern:/^[a-z0-9_]+$/,message:"Role name must be lowercase letters, numbers, and underscores only"}],help:"Use lowercase letters, numbers, and underscores (e.g., 'power_user', 'guest', 'moderator')",children:A(bi,{placeholder:"Enter role name (e.g., 'power_user')"})}),A(yr.Item,{name:"description",label:"Description",rules:[{required:!0,message:"Please enter a description"}],children:A(bi,{placeholder:"Enter role description"})}),A(yr.Item,{name:"admin",hidden:!0,children:A(bi,{})}),A(yr.Item,{name:"deny_all",hidden:!0,children:A(bi,{})}),!g&&A(At,{children:[A(qh,{children:"Template Configuration"}),u?A("div",{children:[A("div",{style:{marginBottom:24},children:[A("div",{style:{marginBottom:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(vt,{size:"small",type:"text",icon:A(Vi,{}),onClick:j,style:{color:"#ff4d4f",border:"none",padding:"4px",minWidth:"auto",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:Y=>{Y.currentTarget.style.backgroundColor="#ff4d4f",Y.currentTarget.style.color="white"},onMouseLeave:Y=>{Y.currentTarget.style.backgroundColor="transparent",Y.currentTarget.style.color="#ff4d4f"},title:"Clear template settings"}),A(cl,{strong:!0,children:"Template"})]}),A("div",{style:{display:"flex",gap:"8px"},children:[A(vt,{size:"small",icon:A(RW,{}),onClick:de,title:"Open Home Assistant Template Editor",children:"HA Editor"}),A(vt,{size:"small",loading:x==="loading",onClick:ve,type:x==="true"?"primary":"default",style:{backgroundColor:x==="true"?"#52c41a":x==="false"?"#ff4d4f":x==="error"?"#faad14":void 0,color:x?"white":void 0,borderColor:x==="true"?"#52c41a":x==="false"?"#ff4d4f":x==="error"?"#faad14":void 0,minWidth:"100px"},icon:x==="true"?A(_d,{}):x==="false"?A(Vi,{}):x==="error"?A(sW,{}):A(Gu,{}),children:x==="true"?"True":x==="false"?"False":x==="error"?"Error":"Test"})]})]}),A("div",{style:{position:"relative"},children:[A(OO,{value:w,height:"150px",extensions:[XY({jsx:!0})],onChange:Y=>{P(Y),b(null),T(null)},placeholder:"Enter Jinja2 template (e.g., {{ states(current_user_str) == 'home' }})",theme:"light",basicSetup:{lineNumbers:!0,highlightActiveLineGutter:!0,highlightSpecialChars:!0,foldGutter:!0,drawSelection:!0,dropCursor:!0,allowMultipleSelections:!0,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!0,rectangularSelection:!0,crosshairCursor:!0,highlightActiveLine:!0,highlightSelectionMatches:!0,closeBracketsKeymap:!0,searchKeymap:!0,foldKeymap:!0,completionKeymap:!0,lintKeymap:!0},style:{border:"1px solid #d9d9d9",borderRadius:"6px",overflow:"hidden"}}),R&&A(w0,{menu:{items:[{key:"variable",label:"Insert user variable",icon:A(Gu,{}),onClick:()=>he("variable")},{key:"home",label:"Check if home",icon:A(_d,{}),onClick:()=>he("home")},{key:"away",label:"Check if away",icon:A(Vi,{}),onClick:()=>he("away")}]},trigger:["click"],placement:"topRight",children:A(vt,{type:"primary",size:"small",icon:A(Gu,{}),style:{position:"absolute",bottom:"8px",right:"8px",zIndex:10,fontSize:"12px",height:"28px",padding:"0 8px"},title:"Insert user template snippets",children:["Insert User ",A(O2,{})]})})]}),A(cl,{type:"secondary",style:{fontSize:"12px"},children:x&&_!==null?A(At,{children:[A("strong",{children:"Evaluated result:"})," ",String(_)]}):"Jinja2 template that determines when this role should be active. If false, the fallback role will be used."})]}),A(yr.Item,{name:"fallbackRole",label:"Fallback Role",help:"Role to use when template evaluates to false",children:A(jn,{showSearch:!0,placeholder:"Select fallback role",filterOption:(Y,ce)=>ce.children.toLowerCase().indexOf(Y.toLowerCase())>=0,children:o.filter(Y=>Y!==r).map(Y=>A(jn.Option,{value:Y,children:Y},Y))})}),A(cl,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"When the template evaluates to false, users with this role will automatically be assigned the fallback role instead."})]}):A(vt,{type:"dashed",icon:A(ea,{}),onClick:()=>d(!0),style:{width:"100%",marginBottom:16},children:"Add Template"}),A(qh,{children:"Domains"}),f.map((Y,ce)=>A("div",{style:{marginBottom:16,padding:16,border:"1px solid #f0f0f0",borderRadius:6},"data-restriction-index":ce,children:A(xs,{gutter:16,align:"middle",children:[A(Mr,{span:10,children:A(jn,{showSearch:!0,placeholder:"Select domain",value:Y.domain,onChange:te=>B(ce,"domain",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:a.map(te=>A(jn.Option,{value:te,children:te},te))})}),A(Mr,{span:10,children:I[ce]?A(jn,{mode:"multiple",showSearch:!0,placeholder:Y.allow?"Select services to allow (empty = allow all)":"Select services (empty = block all)",value:Y.services,onChange:te=>B(ce,"services",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:ie(Y.domain).map(te=>A(jn.Option,{value:te,children:te},te))}):A(on,{title:Y.allow?"Add specific services to allow":"Add specific services",children:A(vt,{type:"dashed",icon:A(ea,{}),onClick:()=>le(ce),style:{width:"100%",height:"32px",border:"2px dashed #d9d9d9",background:"transparent",color:"#999",opacity:.6,transition:"all 0.3s ease"},onMouseEnter:te=>{te.currentTarget.style.opacity="1",te.currentTarget.style.borderColor="#1890ff",te.currentTarget.style.color="#1890ff"},onMouseLeave:te=>{te.currentTarget.style.opacity="0.6",te.currentTarget.style.borderColor="#d9d9d9",te.currentTarget.style.color="#999"},children:Y.allow?"Allow Services":"Services"})})}),A(Mr,{span:2,children:A(on,{title:Y.allow?"Allow this domain/services":"Block this domain/services",children:A(Oi,{size:"small",checked:Y.allow,onChange:te=>B(ce,"allow",te),checkedChildren:"✓",unCheckedChildren:"✗",disabled:O&&Y.allow,style:{backgroundColor:Y.allow?"#52c41a":"#ff4d4f"}})})}),A(Mr,{span:2,children:A(vt,{type:"text",danger:!0,icon:A(Km,{}),onClick:()=>X(ce)})})]})},ce)),A(vt,{type:"dashed",icon:A(ea,{}),onClick:V,style:{width:"100%",marginBottom:16},children:"Add Domain"}),A(qh,{children:"Entities"}),p.map((Y,ce)=>A("div",{style:{marginBottom:16,padding:16,border:"1px solid #f0f0f0",borderRadius:6},"data-restriction-index":ce,children:A(xs,{gutter:16,align:"middle",children:[A(Mr,{span:10,children:A(jn,{showSearch:!0,placeholder:"Select entity",value:Y.entity,onChange:te=>re(ce,"entity",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:s.map(te=>A(jn.Option,{value:te,children:te},te))})}),A(Mr,{span:10,children:M[ce]?A(jn,{mode:"multiple",showSearch:!0,placeholder:Y.allow?"Select services to allow (empty = allow all)":"Select services (empty = block all)",value:Y.services,onChange:te=>re(ce,"services",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:ne(Y.entity).map(te=>A(jn.Option,{value:te,children:te},te))}):A(on,{title:Y.allow?"Add specific services to allow":"Add specific services",children:A(vt,{type:"dashed",icon:A(ea,{}),onClick:()=>me(ce),style:{width:"100%",height:"32px",border:"2px dashed #d9d9d9",background:"transparent",color:"#999",opacity:.6,transition:"all 0.3s ease"},onMouseEnter:te=>{te.currentTarget.style.opacity="1",te.currentTarget.style.borderColor="#1890ff",te.currentTarget.style.color="#1890ff"},onMouseLeave:te=>{te.currentTarget.style.opacity="0.6",te.currentTarget.style.borderColor="#d9d9d9",te.currentTarget.style.color="#999"},children:Y.allow?"Allow Services":"Services"})})}),A(Mr,{span:2,children:A(on,{title:Y.allow?"Allow this entity/services":"Block this entity/services",children:A(Oi,{size:"small",checked:Y.allow,onChange:te=>re(ce,"allow",te),checkedChildren:"✓",unCheckedChildren:"✗",disabled:O&&Y.allow,style:{backgroundColor:Y.allow?"#52c41a":"#ff4d4f"}})})}),A(Mr,{span:2,children:A(vt,{type:"text",danger:!0,icon:A(Km,{}),onClick:()=>se(ce)})})]})},ce)),A(vt,{type:"dashed",icon:A(ea,{}),onClick:G,style:{width:"100%"},children:"Add Entity"})]})]})}),A(ur,{title:"Convert Existing Restrictions?",open:N,onCancel:()=>F("cancel"),footer:[A(vt,{onClick:()=>F("cancel"),children:"Cancel"},"cancel"),A(vt,{onClick:()=>F("clear"),children:"Clear All"},"clear"),A(vt,{type:"primary",onClick:()=>F("convert"),children:"Convert to Allow"},"convert")],children:A("div",{children:A("p",{children:"You have blocking restrictions configured. What would you like to do?"})})})]})}function YY({data:t,onSuccess:e,onError:n,onDataChange:r}){const[i,o]=J(!1),[a,s]=J({}),[l,c]=J(null),[u,d]=J(null),[f,h]=J(!1);be(()=>{var $;($=t.config)!=null&&$.roles&&s(t.config.roles)},[t.config]);const p=async()=>{try{const $=m();if($&&$.auth){if($.auth.data&&$.auth.data.access_token)return{access_token:$.auth.data.access_token,token_type:"Bearer"};if($.auth.access_token)return{access_token:$.auth.access_token,token_type:"Bearer"}}const w=localStorage.getItem("hassTokens")||sessionStorage.getItem("hassTokens");return w?{access_token:JSON.parse(w).access_token,token_type:"Bearer"}:null}catch($){return console.error("Auth error:",$),null}},m=()=>{try{const $=document.querySelector("home-assistant");return $&&$.hass?$.hass:window.hass?window.hass:window.parent&&window.parent!==window&&window.parent.hass?window.parent.hass:null}catch($){return console.error("Error getting hass object:",$),null}},g=()=>{h(!0)},v=async $=>{o(!0);try{const w=await p();if(!w)throw new Error("Not authenticated with Home Assistant");if(!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${w.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"delete_role",roleName:$})})).ok)throw new Error("Failed to delete role");const _={...a};delete _[$],s(_),r({...t,config:{...t.config,roles:_}}),e(`Role "${$}" deleted successfully!`)}catch(w){console.error("Error deleting role:",w),n(w.message)}finally{o(!1)}},O=$=>{const w=a[$];w&&(c($),d(w))},S=()=>{c(null),d(null)},x=()=>{h(!1)},b=async $=>{o(!0);try{const w=await p();if(!w)throw new Error("Not authenticated with Home Assistant");const{roleName:P,roleData:_}=$,T=P||l;if(!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${w.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"update_role",roleName:T,roleConfig:_})})).ok)throw new Error("Failed to update role");const k={...a};k[l]=_,s(k),r({...t,config:{...t.config,roles:k}}),e(`Role "${l}" updated successfully!`),S()}catch(w){console.error("Error updating role:",w),n(w.message)}finally{o(!1)}},C=async $=>{o(!0);try{const w=await p();if(!w)throw new Error("Not authenticated with Home Assistant");const{roleName:P,roleData:_}=$;if(!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${w.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"update_role",roleName:P,roleConfig:_})})).ok)throw new Error("Failed to create role");const R={...a};R[P]=_,s(R),r({...t,config:{...t.config,roles:R}}),e(`Role "${P}" created successfully!`),x()}catch(w){console.error("Error creating role:",w),n(w.message)}finally{o(!1)}};return A("div",{children:[A(yn.Paragraph,{type:"secondary",style:{marginBottom:24},children:"Create and manage roles with specific permissions."}),A(yn.Title,{level:4,children:"Existing Roles"}),Object.keys(a).length===0?A(yn.Text,{type:"secondary",italic:!0,children:"No roles created yet."}):A(xs,{gutter:[16,16],children:Object.entries(a).map(([$,w])=>{var P,_;return A(Mr,{xs:24,sm:12,children:A(Sa,{size:"small",style:{height:"100%"},actions:[A("div",{style:{padding:"8px 16px",margin:"4px",borderRadius:"4px",transition:"all 0.2s ease",cursor:"pointer",backgroundColor:"transparent",color:"#1890ff"},onMouseEnter:T=>{T.currentTarget.style.backgroundColor="#1890ff",T.currentTarget.style.color="black"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="transparent",T.currentTarget.style.color="#1890ff"},onClick:()=>O($),children:A(vt,{type:"link",icon:A(FP,{}),disabled:i,style:{color:"inherit",padding:0,height:"auto",border:"none",background:"transparent"},children:"Edit"})},"edit"),A(DP,{title:"Are you sure you want to delete this role?",onConfirm:()=>v($),okText:"Yes",cancelText:"No",children:A("div",{style:{padding:"8px 16px",margin:"4px",borderRadius:"4px",transition:"all 0.2s ease",cursor:"pointer",backgroundColor:"transparent",color:"#ff4d4f"},onMouseEnter:T=>{T.currentTarget.style.backgroundColor="#ff4d4f",T.currentTarget.style.color="black"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="transparent",T.currentTarget.style.color="#ff4d4f"},children:A(vt,{type:"link",danger:!0,icon:A(Km,{}),disabled:i,style:{color:"inherit",padding:0,height:"auto",border:"none",background:"transparent"},children:"Delete"})})},"delete")],children:A("div",{style:{height:"120px",display:"flex",flexDirection:"column"},children:[A(Sa.Meta,{title:$,description:w.description||"No description"}),A(jo,{wrap:!0,style:{marginTop:"auto"},children:[w.template&&A(on,{title:`Template: ${w.template}`,children:A(Ka,{color:"purple",icon:A(Gu,{}),children:"Template"})}),w.deny_all&&A(on,{title:"Deny All mode enabled - blocks by default",children:A(Ka,{color:"red",children:"Deny All"})}),Object.keys(((P=w.permissions)==null?void 0:P.domains)||{}).length>0&&A(on,{title:A("div",{children:[A("div",{style:{fontWeight:"bold",marginBottom:"4px"},children:"Domains:"}),Object.keys(w.permissions.domains).map(T=>A("div",{style:{fontSize:"12px"},children:["• ",T]},T))]}),placement:"top",children:A(Ka,{color:"blue",children:[Object.keys(w.permissions.domains).length," domains"]})}),Object.keys(((_=w.permissions)==null?void 0:_.entities)||{}).length>0&&A(on,{title:A("div",{children:[A("div",{style:{fontWeight:"bold",marginBottom:"4px"},children:"Entities:"}),Object.keys(w.permissions.entities).map(T=>A("div",{style:{fontSize:"12px"},children:["• ",T]},T))]}),placement:"top",children:A(Ka,{color:"green",children:[Object.keys(w.permissions.entities).length," entities"]})})]})]})})},$)})}),A(vt,{type:"dashed",icon:A(ea,{}),onClick:g,disabled:i,style:{width:"100%",marginTop:16},children:"Add Role"}),A(Jg,{visible:!!l,onCancel:S,onSave:b,roleName:l,roleConfig:u,availableRoles:Object.keys(a),domains:t.domains,entities:t.entities,services:t.services}),A(Jg,{visible:f,onCancel:x,onSave:C,roleName:null,roleConfig:null,availableRoles:Object.keys(a),domains:t.domains,entities:t.entities,services:t.services})]})}const UY=()=>{try{const t=document.querySelector("home-assistant");return t&&t.hass?t.hass:window.hass?window.hass:window.parent&&window.parent!==window&&window.parent.hass?window.parent.hass:null}catch(t){return console.error("Error getting hass object:",t),null}},aR=async()=>{try{const t=UY();if(t&&t.auth){if(t.auth.data&&t.auth.data.access_token)return{access_token:t.auth.data.access_token,token_type:"Bearer"};if(t.auth.access_token)return{access_token:t.auth.access_token,token_type:"Bearer"}}const e=localStorage.getItem("hassTokens");if(e)return{access_token:JSON.parse(e).access_token,token_type:"Bearer"};const n=sessionStorage.getItem("hassTokens");if(n)return{access_token:JSON.parse(n).access_token,token_type:"Bearer"};const r=await fetch("/auth/token");if(!r.ok)throw new Error("Not authenticated");return await r.json()}catch(t){return console.error("Error getting HA auth:",t),null}},oi=async(t,e={})=>{const n=await aR();if(!n)throw new Error("Not authenticated with Home Assistant");const r={headers:{Authorization:`Bearer ${n.access_token}`,"Content-Type":"application/json",...e.headers}};return fetch(t,{...r,...e})};function KY({data:t,onSuccess:e,onError:n,onDataChange:r,isDarkMode:i=!1}){const[o,a]=J(!1),[s,l]=J({}),[c,u]=J(null),[d,f]=J(null);be(()=>{var b;if((b=t.config)!=null&&b.users){const C={};Object.entries(t.config.users).forEach(([$,w])=>{C[$]=w.role||"user"}),l(C)}},[t.config]);const h=b=>{var w;const C=s[b.id];if(!C||!((w=t.config)!=null&&w.roles))return!1;const $=t.config.roles[C];return($==null?void 0:$.admin)===!0},p=b=>{if(!b)return{};const C=i?"#262626":"white";return{border:"2px solid transparent",background:`linear-gradient(${C}, ${C}) padding-box, linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57) border-box`,animation:"adminGlow 2s ease-in-out infinite alternate",boxShadow:"0 0 20px rgba(255, 107, 107, 0.3)"}},m=async(b,C)=>{var $;a(!0);try{if(!(await oi("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"assign_user_role",userId:b,roleName:C})})).ok)throw new Error("Failed to assign role");const P={...s,[b]:C};l(P);const _={...(($=t.config)==null?void 0:$.users)||{}};_[b]||(_[b]={}),_[b].role=C,r({...t,config:{...t.config,users:_}});const T=t.users.find(k=>k.id===b),R=T?T.name:b;e(`Role "${C}" assigned to ${R} successfully!`)}catch(w){console.error("Error assigning role:",w),n(w.message)}finally{a(!1)}},g=()=>{var C;const b=Object.keys(((C=t.config)==null?void 0:C.roles)||{});return b.includes("admin")||b.unshift("admin"),b.includes("user")||b.push("user"),b.includes("guest")||b.push("guest"),b},v=b=>{const C=s[b];return g().includes(C)},O=b=>b.name||b.username||b.id,S=b=>b.entity_picture?b.entity_picture:b.id?`/api/image/serve/${b.id}/512x512`:null,x=()=>{u(null),f(null)};return A("div",{children:[A("style",{children:` +}`,{label:"class",detail:"definition",type:"keyword"}),Ar('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ar('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],PY=gI.concat([Ar("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Ar("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Ar("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),n$=new TX,vI=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function dl(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const _Y=["FunctionDeclaration"],TY={FunctionDeclaration:dl("function"),ClassDeclaration:dl("class"),ClassExpression:()=>!0,EnumDeclaration:dl("constant"),TypeAliasDeclaration:dl("type"),NamespaceDeclaration:dl("namespace"),VariableDefinition(t,e){t.matchContext(_Y)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function OI(t,e){let n=n$.get(e);if(n)return n;let r=[],i=!0;function o(a,s){let l=t.sliceString(a.from,a.to);r.push({label:l,type:s})}return e.cursor(Vn.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let s=TY[a.name];if(s&&s(a,o)||vI.has(a.name))return!1}else if(a.to-a.from>8192){for(let s of OI(t,a.node))r.push(s);return!1}}),n$.set(e,r),r}const r$=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,bI=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function RY(t){let e=Xn(t.state).resolveInner(t.pos,-1);if(bI.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&r$.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)vI.has(i.name)&&(r=r.concat(OI(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:r$}}const ga=cc.define({name:"javascript",parser:wY.configure({props:[fO.add({IfStatement:Am({except:/^\s*({|else\b)/}),TryStatement:Am({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:ZX,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:Gg({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Am({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),mO.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":YT,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),yI={test:t=>/^JSX/.test(t.name),facet:XT({commentTokens:{block:{open:"{/*",close:"*/}"}}})},IY=ga.configure({dialect:"ts"},"typescript"),MY=ga.configure({dialect:"jsx",props:[uO.add(t=>t.isTop?[yI]:void 0)]}),EY=ga.configure({dialect:"jsx ts",props:[uO.add(t=>t.isTop?[yI]:void 0)]},"typescript");let SI=t=>({label:t,type:"keyword"});const xI="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(SI),kY=xI.concat(["declare","implements","private","protected","public"].map(SI));function AY(t={}){let e=t.jsx?t.typescript?EY:MY:t.typescript?IY:ga,n=t.typescript?PY.concat(kY):gI.concat(xI);return new qT(e,[ga.data.of({autocomplete:fG(bI,KR(n))}),ga.data.of({autocomplete:RY}),t.jsx?zY:[]])}function QY(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function i$(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const NY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),zY=De.inputHandler.of((t,e,n,r,i)=>{if((NY?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!ga.isActiveAt(t.state,e,-1))return!1;let o=i(),{state:a}=o,s=a.changeByRange(l=>{var c;let{head:u}=l,d=Xn(a).resolveInner(u-1,-1),f;if(d.name=="JSXStartTag"&&(d=d.parent),!(a.doc.sliceString(u-1,u)!=r||d.name=="JSXAttributeValue"&&d.to>u)){if(r==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:""}};if(r=="/"&&d.name=="JSXStartCloseTag"){let h=d.parent,m=h.parent;if(m&&h.from==u-2&&((f=i$(a.doc,m.firstChild,u))||((c=m.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let p=`${f}>`;return{range:$e.cursor(u+p.length,-1),changes:{from:u,insert:p}}}}else if(r==">"){let h=QY(d);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(u,u+2))&&(f=i$(a.doc,h,u)))return{range:l,changes:{from:u,insert:``}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([o,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),{TextArea:RK}=li,{Text:fl}=an;function gf({visible:t,onCancel:e,onSave:n,roleName:r,roleConfig:i,availableRoles:o=[],domains:a=[],entities:s=[],services:l={}}){const[c]=wr.useForm(),[u,d]=te(!1),[f,h]=te([]),[m,p]=te([]),[g,O]=te(!1),[v,y]=te(!1),[S,x]=te(null),[$,C]=te(""),[P,w]=te(""),[_,R]=te(null),[I,T]=te(null),[M,Q]=te({}),[E,k]=te({});ye(()=>{var G,ce,ae,pe;if(t&&i){c.setFieldsValue({description:i.description||"",admin:i.admin||!1,deny_all:i.deny_all||!1,fallbackRole:i.fallbackRole||"",domains:((G=i.permissions)==null?void 0:G.domains)||{},entities:((ce=i.permissions)==null?void 0:ce.entities)||{}});const Oe=[],be=[];(ae=i.permissions)!=null&&ae.domains&&Object.entries(i.permissions.domains).forEach(([Ie,He])=>{Oe.push({domain:Ie,services:He.services||[],allow:He.allow||!1})}),(pe=i.permissions)!=null&&pe.entities&&Object.entries(i.permissions.entities).forEach(([Ie,He])=>{be.push({entity:Ie,services:He.services||[],allow:He.allow||!1})}),h(Oe),p(be),d(!!i.template),O(i.admin||!1),y(i.deny_all||!1),x(null),C(""),w(i.template||""),R(null);const ge={},Me={};Oe.forEach((Ie,He)=>{ge[He]=Ie.services.length>0}),be.forEach((Ie,He)=>{Me[He]=Ie.services.length>0}),Q(ge),k(Me)}else t&&(c.resetFields(),h([]),p([]),d(!1),O(!1),y(!1),L(!1),x(null),C(""),w(""),R(null),Q({}),k({}))},[t,i,c]),ye(()=>{t&&D().then(G=>{T(G)})},[t]);const[z,L]=te(!1),B=()=>{L(!0)},F=G=>{if(L(!1),G==="convert"){const ce=f.map(pe=>({...pe,allow:!0})),ae=m.map(pe=>({...pe,allow:!0}));h(ce),p(ae)}else G==="clear"?(h([]),p([])):G==="cancel"&&(y(!1),c.setFieldsValue({deny_all:!1}))},H=async()=>{try{const G=await c.validateFields(),ce={},ae={};f.forEach(be=>{ce[be.domain]={services:be.services,allow:be.allow||!1}}),m.forEach(be=>{ae[be.entity]={services:be.services,allow:be.allow||!1}});const pe={description:G.description,admin:G.admin||!1,deny_all:G.deny_all||!1,permissions:{domains:ce,entities:ae}};u&&P&&(pe.template=P,G.fallbackRole&&(pe.fallbackRole=G.fallbackRole));const Oe={roleData:pe,roleName:r||G.roleName};n(Oe)}catch(G){console.error("Form validation failed:",G)}},X=()=>{const G=f.length;h([...f,{domain:"",services:[],allow:v}]),Q({...M,[G]:!1})},q=G=>{h(f.filter((pe,Oe)=>Oe!==G));const ce={...M};delete ce[G];const ae={};Object.keys(ce).forEach(pe=>{const Oe=parseInt(pe);Oe>G?ae[Oe-1]=ce[pe]:Oe{const pe=[...f];pe[G]={...pe[G],[ce]:ae},h(pe)},j=()=>{const G=m.length;p([...m,{entity:"",services:[],allow:v}]),k({...E,[G]:!1})},oe=G=>{p(m.filter((pe,Oe)=>Oe!==G));const ce={...E};delete ce[G];const ae={};Object.keys(ce).forEach(pe=>{const Oe=parseInt(pe);Oe>G?ae[Oe-1]=ce[pe]:Oe{const pe=[...m];pe[G]={...pe[G],[ce]:ae},p(pe)},se=G=>{Q({...M,[G]:!0})},fe=G=>{k({...E,[G]:!0})},re=G=>{var ce;return((ce=l.domains)==null?void 0:ce[G])||[]},J=G=>{var ce;return((ce=l.entities)==null?void 0:ce[G])||[]},ue=()=>{const G=window.location.href,ce=new URL(G),ae=ce.hostname,pe=ce.protocol,Oe=ce.port?`:${ce.port}`:"",be=`${pe}//${ae}${Oe}/developer-tools/template`;window.open(be,"_blank")},de=()=>{w(""),x(null),R(null),C(""),c.setFieldsValue({fallbackRole:""}),d(!1)},D=async()=>{try{const G=await Hd();if(!G)return null;const ce=await fetch("/api/rbac/current-user",{headers:{Authorization:`Bearer ${G.access_token}`}});return ce.ok?(await ce.json()).person_entity_id:null}catch(G){return console.error("Error getting current user entity:",G),null}},Y=(G="variable")=>{if(I){let ce="";switch(G){case"variable":ce="current_user_str";break;case"home":ce="states[current_user_str].state == 'home'";break;case"away":ce="states[current_user_str].state != 'home'";break;default:ce="{{ states(current_user_str) }}"}const ae=P+ce;w(ae),x(null),R(null)}},me=async()=>{try{if(x("loading"),C(""),!P){x("error"),C("No template to test"),dr.error({message:"Template Test Failed",description:"Please enter a template first",placement:"bottomRight",duration:3});return}const G=await Hd();if(!G)throw new Error("Not authenticated with Home Assistant");const ae=await(await fetch("/api/rbac/evaluate-template",{method:"POST",headers:{Authorization:`Bearer ${G.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({template:P})})).json();ae.success?(x(ae.result?"true":"false"),R(ae.evaluated_value)):(x("error"),C(ae.error),R(null),dr.error({message:"Template Evaluation Error",description:ae.error,placement:"bottomRight",duration:5}))}catch(G){console.error("Error testing template:",G),x("error"),C(G.message),R(null),dr.error({message:"Template Test Failed",description:G.message,placement:"bottomRight",duration:5})}};return A(Qt,{children:[A(ar,{title:A("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:"40px"},children:[A("span",{children:r?`Edit Role: ${r}`:"Create New Role"}),A("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"4px"},children:[A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(fl,{style:{fontSize:"14px"},children:"Admin Role"}),A(Si,{checked:g,onChange:G=>{O(G),c.setFieldsValue({admin:G})}})]}),!g&&A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(fl,{style:{fontSize:"14px"},children:v?"Deny All":"Allow All"}),A(on,{title:v?"Switch to Allow All (permit by default)":"Switch to Deny All (block by default)",children:A(Si,{checked:v,checkedChildren:"✗",unCheckedChildren:"✓",style:{backgroundColor:v?"#ff4d4f":"#52c41a"},onChange:G=>{y(G),c.setFieldsValue({deny_all:G}),G&&(f.some(ae=>!ae.allow)||m.some(ae=>!ae.allow))&&B()}})})]})]})]}),open:t,onCancel:e,onOk:H,width:800,okText:"Save Role",cancelText:"Cancel",children:A(wr,{form:c,layout:"vertical",children:[!r&&A(wr.Item,{name:"roleName",label:"Role Name",rules:[{required:!0,message:"Please enter a role name"},{pattern:/^[a-z0-9_]+$/,message:"Role name must be lowercase letters, numbers, and underscores only"}],help:"Use lowercase letters, numbers, and underscores (e.g., 'power_user', 'guest', 'moderator')",children:A(li,{placeholder:"Enter role name (e.g., 'power_user')"})}),A(wr.Item,{name:"description",label:"Description",rules:[{required:!0,message:"Please enter a description"}],children:A(li,{placeholder:"Enter role description"})}),A(wr.Item,{name:"admin",hidden:!0,children:A(li,{})}),A(wr.Item,{name:"deny_all",hidden:!0,children:A(li,{})}),!g&&A(Qt,{children:[A(im,{children:"Template Configuration"}),u?A("div",{children:[A("div",{style:{marginBottom:24},children:[A("div",{style:{marginBottom:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(wt,{size:"small",type:"text",icon:A(Xi,{}),onClick:de,style:{color:"#ff4d4f",border:"none",padding:"4px",minWidth:"auto",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:G=>{G.currentTarget.style.backgroundColor="#ff4d4f",G.currentTarget.style.color="white"},onMouseLeave:G=>{G.currentTarget.style.backgroundColor="transparent",G.currentTarget.style.color="#ff4d4f"},title:"Clear template settings"}),A(fl,{strong:!0,children:"Template"})]}),A("div",{style:{display:"flex",gap:"8px"},children:[A(wt,{size:"small",icon:A(bH,{}),onClick:ue,title:"Open Home Assistant Template Editor",children:"HA Editor"}),A(wt,{size:"small",loading:S==="loading",onClick:me,type:S==="true"?"primary":"default",style:{backgroundColor:S==="true"?"#52c41a":S==="false"?"#ff4d4f":S==="error"?"#faad14":void 0,color:S?"white":void 0,borderColor:S==="true"?"#52c41a":S==="false"?"#ff4d4f":S==="error"?"#faad14":void 0,minWidth:"100px"},icon:S==="true"?A(Ad,{}):S==="false"?A(Xi,{}):S==="error"?A(UW,{}):A(rd,{}),children:S==="true"?"True":S==="false"?"False":S==="error"?"Error":"Test"})]})]}),A("div",{style:{position:"relative"},children:[A(IO,{value:P,height:"150px",extensions:[AY({jsx:!0})],onChange:G=>{w(G),x(null),R(null)},placeholder:"Enter Jinja2 template (e.g., {{ states(current_user_str) == 'home' }})",theme:"light",basicSetup:{lineNumbers:!0,highlightActiveLineGutter:!0,highlightSpecialChars:!0,foldGutter:!0,drawSelection:!0,dropCursor:!0,allowMultipleSelections:!0,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!0,rectangularSelection:!0,crosshairCursor:!0,highlightActiveLine:!0,highlightSelectionMatches:!0,closeBracketsKeymap:!0,searchKeymap:!0,foldKeymap:!0,completionKeymap:!0,lintKeymap:!0},style:{border:"1px solid #d9d9d9",borderRadius:"6px",overflow:"hidden"}}),I&&A(Q0,{menu:{items:[{key:"variable",label:"Insert user variable",icon:A(rd,{}),onClick:()=>Y("variable")},{key:"home",label:"Check if home",icon:A(Ad,{}),onClick:()=>Y("home")},{key:"away",label:"Check if away",icon:A(Xi,{}),onClick:()=>Y("away")}]},trigger:["click"],placement:"topRight",children:A(wt,{type:"primary",size:"small",icon:A(rd,{}),style:{position:"absolute",bottom:"8px",right:"8px",zIndex:10,fontSize:"12px",height:"28px",padding:"0 8px"},title:"Insert user template snippets",children:["Insert User ",A(Q2,{})]})})]}),A(fl,{type:"secondary",style:{fontSize:"12px"},children:S&&_!==null?A(Qt,{children:[A("strong",{children:"Evaluated result:"})," ",String(_)]}):"Jinja2 template that determines when this role should be active. If false, the fallback role will be used."})]}),A(wr.Item,{name:"fallbackRole",label:"Fallback Role",help:"Role to use when template evaluates to false",children:A(Nn,{showSearch:!0,placeholder:"Select fallback role",filterOption:(G,ce)=>ce.children.toLowerCase().indexOf(G.toLowerCase())>=0,children:o.filter(G=>G!==r).map(G=>A(Nn.Option,{value:G,children:G},G))})}),A(fl,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"When the template evaluates to false, users with this role will automatically be assigned the fallback role instead."})]}):A(wt,{type:"dashed",icon:A(na,{}),onClick:()=>d(!0),style:{width:"100%",marginBottom:16},children:"Add Template"}),A(im,{children:"Domains"}),f.map((G,ce)=>A("div",{style:{marginBottom:16,padding:16,border:"1px solid #f0f0f0",borderRadius:6},"data-restriction-index":ce,children:A(Ca,{gutter:16,align:"middle",children:[A(Qr,{span:10,children:A(Nn,{showSearch:!0,placeholder:"Select domain",value:G.domain,onChange:ae=>N(ce,"domain",ae),style:{width:"100%"},filterOption:(ae,pe)=>pe.children.toLowerCase().indexOf(ae.toLowerCase())>=0,children:a.map(ae=>A(Nn.Option,{value:ae,children:ae},ae))})}),A(Qr,{span:10,children:M[ce]?A(Nn,{mode:"multiple",showSearch:!0,placeholder:G.allow?"Select services to allow (empty = allow all)":"Select services (empty = block all)",value:G.services,onChange:ae=>N(ce,"services",ae),style:{width:"100%"},filterOption:(ae,pe)=>pe.children.toLowerCase().indexOf(ae.toLowerCase())>=0,children:re(G.domain).map(ae=>A(Nn.Option,{value:ae,children:ae},ae))}):A(on,{title:G.allow?"Add specific services to allow":"Add specific services",children:A(wt,{type:"dashed",icon:A(na,{}),onClick:()=>se(ce),style:{width:"100%",height:"32px",border:"2px dashed #d9d9d9",background:"transparent",color:"#999",opacity:.6,transition:"all 0.3s ease"},onMouseEnter:ae=>{ae.currentTarget.style.opacity="1",ae.currentTarget.style.borderColor="#1890ff",ae.currentTarget.style.color="#1890ff"},onMouseLeave:ae=>{ae.currentTarget.style.opacity="0.6",ae.currentTarget.style.borderColor="#d9d9d9",ae.currentTarget.style.color="#999"},children:G.allow?"Allow Services":"Services"})})}),A(Qr,{span:2,children:A(on,{title:G.allow?"Allow this domain/services":"Block this domain/services",children:A(Si,{size:"small",checked:G.allow,onChange:ae=>N(ce,"allow",ae),checkedChildren:"✓",unCheckedChildren:"✗",disabled:v&&G.allow,style:{backgroundColor:G.allow?"#52c41a":"#ff4d4f"}})})}),A(Qr,{span:2,children:A(wt,{type:"text",danger:!0,icon:A(lg,{}),onClick:()=>q(ce)})})]})},ce)),A(wt,{type:"dashed",icon:A(na,{}),onClick:X,style:{width:"100%",marginBottom:16},children:"Add Domain"}),A(im,{children:"Entities"}),m.map((G,ce)=>A("div",{style:{marginBottom:16,padding:16,border:"1px solid #f0f0f0",borderRadius:6},"data-restriction-index":ce,children:A(Ca,{gutter:16,align:"middle",children:[A(Qr,{span:10,children:A(Nn,{showSearch:!0,placeholder:"Select entity",value:G.entity,onChange:ae=>ee(ce,"entity",ae),style:{width:"100%"},filterOption:(ae,pe)=>pe.children.toLowerCase().indexOf(ae.toLowerCase())>=0,children:s.map(ae=>A(Nn.Option,{value:ae,children:ae},ae))})}),A(Qr,{span:10,children:E[ce]?A(Nn,{mode:"multiple",showSearch:!0,placeholder:G.allow?"Select services to allow (empty = allow all)":"Select services (empty = block all)",value:G.services,onChange:ae=>ee(ce,"services",ae),style:{width:"100%"},filterOption:(ae,pe)=>pe.children.toLowerCase().indexOf(ae.toLowerCase())>=0,children:J(G.entity).map(ae=>A(Nn.Option,{value:ae,children:ae},ae))}):A(on,{title:G.allow?"Add specific services to allow":"Add specific services",children:A(wt,{type:"dashed",icon:A(na,{}),onClick:()=>fe(ce),style:{width:"100%",height:"32px",border:"2px dashed #d9d9d9",background:"transparent",color:"#999",opacity:.6,transition:"all 0.3s ease"},onMouseEnter:ae=>{ae.currentTarget.style.opacity="1",ae.currentTarget.style.borderColor="#1890ff",ae.currentTarget.style.color="#1890ff"},onMouseLeave:ae=>{ae.currentTarget.style.opacity="0.6",ae.currentTarget.style.borderColor="#d9d9d9",ae.currentTarget.style.color="#999"},children:G.allow?"Allow Services":"Services"})})}),A(Qr,{span:2,children:A(on,{title:G.allow?"Allow this entity/services":"Block this entity/services",children:A(Si,{size:"small",checked:G.allow,onChange:ae=>ee(ce,"allow",ae),checkedChildren:"✓",unCheckedChildren:"✗",disabled:v&&G.allow,style:{backgroundColor:G.allow?"#52c41a":"#ff4d4f"}})})}),A(Qr,{span:2,children:A(wt,{type:"text",danger:!0,icon:A(lg,{}),onClick:()=>oe(ce)})})]})},ce)),A(wt,{type:"dashed",icon:A(na,{}),onClick:j,style:{width:"100%"},children:"Add Entity"})]})]})}),A(ar,{title:"Convert Existing Restrictions?",open:z,onCancel:()=>F("cancel"),footer:[A(wt,{onClick:()=>F("cancel"),children:"Cancel"},"cancel"),A(wt,{onClick:()=>F("clear"),children:"Clear All"},"clear"),A(wt,{type:"primary",onClick:()=>F("convert"),children:"Convert to Allow"},"convert")],children:A("div",{children:A("p",{children:"You have blocking restrictions configured. What would you like to do?"})})})]})}function jY({data:t,onSuccess:e,onError:n,onDataChange:r}){var O;const[i,o]=te(!1),[a,s]=te("none"),[l,c]=te(null),[u,d]=te(null);ye(()=>{var v;((v=t.config)==null?void 0:v.default_role)!==void 0&&s(t.config.default_role||"none")},[t.config]);const f=async v=>{const y=v===void 0?"none":v;o(!0);try{if(!(await Wn("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_default_role",default_role:y})})).ok)throw new Error("Failed to save default role");s(y),e("Default role saved successfully!")}catch(S){console.error("Error saving default role:",S),n(S.message)}finally{o(!1)}},h=()=>{var y;const v=Object.keys(((y=t.config)==null?void 0:y.roles)||{});return v.includes("admin")||v.unshift("admin"),v.includes("user")||v.push("user"),v.includes("guest")||v.push("guest"),v.unshift("none"),v},m=()=>{var v,y;if(a&&a!=="none"){const S=(y=(v=t.config)==null?void 0:v.roles)==null?void 0:y[a];S&&(c(a),d(S))}},p=()=>{c(null),d(null)},g=async v=>{o(!0);try{if(!(await Wn("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_role",roleName:v.roleName,roleConfig:v.roleData})})).ok)throw new Error("Failed to save role");const S={...t.config};S.roles||(S.roles={}),S.roles[v.roleName]=v.roleData,r({...t,config:S}),p(),e(`Role "${v.roleName}" updated successfully!`)}catch(y){console.error("Error saving role:",y),n(y.message)}finally{o(!1)}};return A("div",{children:[A(an.Paragraph,{type:"secondary",style:{marginBottom:24},children:'Configure the default role that will be applied to users who have no specific role assigned or have the "Default" role assigned.'}),A(Ca,{gutter:[16,16],style:{marginBottom:24},children:A(Qr,{xs:24,md:12,children:[A(an.Text,{strong:!0,style:{display:"block",marginBottom:8},children:"Default Role"}),A(co.Compact,{style:{width:"100%"},children:[A(Nn,{value:a,onChange:f,placeholder:"Select default role (None = no restrictions)",style:{flex:1},allowClear:!0,disabled:i,children:h().map(v=>A(Nn.Option,{value:v,children:v==="none"?"None":v.charAt(0).toUpperCase()+v.slice(1)},v))}),a&&a!=="none"&&A(wt,{icon:A(W0,{}),onClick:m,disabled:i,title:`Edit ${a.charAt(0).toUpperCase()+a.slice(1)} role`})]}),A(an.Text,{type:"secondary",style:{fontSize:"12px",display:"block",marginTop:4},children:"Select Default Role to be used"})]})}),A(gf,{visible:!!l,onCancel:p,onSave:g,roleName:l,roleConfig:u,availableRoles:Object.keys(((O=t.config)==null?void 0:O.roles)||{}),domains:t.domains,entities:t.entities,services:t.services})]})}function LY({data:t,onSuccess:e,onError:n,onDataChange:r}){const[i,o]=te(!1),[a,s]=te({}),[l,c]=te(null),[u,d]=te(null),[f,h]=te(!1);ye(()=>{var x;(x=t.config)!=null&&x.roles&&s(t.config.roles)},[t.config]);const m=()=>{h(!0)},p=async x=>{o(!0);try{if(!(await Wn("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"delete_role",roleName:x})})).ok)throw new Error("Failed to delete role");const C={...a};delete C[x],s(C),r({...t,config:{...t.config,roles:C}}),e(`Role "${x}" deleted successfully!`)}catch($){console.error("Error deleting role:",$),n($.message)}finally{o(!1)}},g=x=>{const $=a[x];$&&(c(x),d($))},O=()=>{c(null),d(null)},v=()=>{h(!1)},y=async x=>{o(!0);try{const{roleName:$,roleData:C}=x;if(!(await Wn("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_role",roleName:$||l,roleConfig:C})})).ok)throw new Error("Failed to update role");const _={...a};_[l]=C,s(_),r({...t,config:{...t.config,roles:_}}),e(`Role "${l}" updated successfully!`),O()}catch($){console.error("Error updating role:",$),n($.message)}finally{o(!1)}},S=async x=>{o(!0);try{const{roleName:$,roleData:C}=x;if(!(await Wn("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_role",roleName:$,roleConfig:C})})).ok)throw new Error("Failed to create role");const w={...a};w[$]=C,s(w),r({...t,config:{...t.config,roles:w}}),e(`Role "${$}" created successfully!`),v()}catch($){console.error("Error creating role:",$),n($.message)}finally{o(!1)}};return A("div",{children:[A(an.Paragraph,{type:"secondary",style:{marginBottom:24},children:"Create and manage roles with specific permissions."}),A(an.Title,{level:4,children:"Existing Roles"}),Object.keys(a).length===0?A(an.Text,{type:"secondary",italic:!0,children:"No roles created yet."}):A(Ca,{gutter:[16,16],children:Object.entries(a).map(([x,$])=>{var C,P;return A(Qr,{xs:24,sm:12,children:A($a,{size:"small",style:{height:"100%"},actions:[A("div",{style:{padding:"8px 16px",margin:"4px",borderRadius:"4px",transition:"all 0.2s ease",cursor:"pointer",backgroundColor:"transparent",color:"#1890ff"},onMouseEnter:w=>{w.currentTarget.style.backgroundColor="#1890ff",w.currentTarget.style.color="black"},onMouseLeave:w=>{w.currentTarget.style.backgroundColor="transparent",w.currentTarget.style.color="#1890ff"},onClick:()=>g(x),children:A(wt,{type:"link",icon:A(W0,{}),disabled:i,style:{color:"inherit",padding:0,height:"auto",border:"none",background:"transparent"},children:"Edit"})},"edit"),A(i_,{title:"Are you sure you want to delete this role?",onConfirm:()=>p(x),okText:"Yes",cancelText:"No",children:A("div",{style:{padding:"8px 16px",margin:"4px",borderRadius:"4px",transition:"all 0.2s ease",cursor:"pointer",backgroundColor:"transparent",color:"#ff4d4f"},onMouseEnter:w=>{w.currentTarget.style.backgroundColor="#ff4d4f",w.currentTarget.style.color="black"},onMouseLeave:w=>{w.currentTarget.style.backgroundColor="transparent",w.currentTarget.style.color="#ff4d4f"},children:A(wt,{type:"link",danger:!0,icon:A(lg,{}),disabled:i,style:{color:"inherit",padding:0,height:"auto",border:"none",background:"transparent"},children:"Delete"})})},"delete")],children:A("div",{style:{height:"120px",display:"flex",flexDirection:"column"},children:[A($a.Meta,{title:x,description:$.description||"No description"}),A(co,{wrap:!0,style:{marginTop:"auto"},children:[$.template&&A(on,{title:`Template: ${$.template}`,children:A(gl,{color:"purple",icon:A(rd,{}),children:"Template"})}),$.deny_all&&A(on,{title:"Deny All mode enabled - blocks by default",children:A(gl,{color:"red",children:"Deny All"})}),Object.keys(((C=$.permissions)==null?void 0:C.domains)||{}).length>0&&A(on,{title:A("div",{children:[A("div",{style:{fontWeight:"bold",marginBottom:"4px"},children:"Domains:"}),Object.keys($.permissions.domains).map(w=>A("div",{style:{fontSize:"12px"},children:["• ",w]},w))]}),placement:"top",children:A(gl,{color:"blue",children:[Object.keys($.permissions.domains).length," domains"]})}),Object.keys(((P=$.permissions)==null?void 0:P.entities)||{}).length>0&&A(on,{title:A("div",{children:[A("div",{style:{fontWeight:"bold",marginBottom:"4px"},children:"Entities:"}),Object.keys($.permissions.entities).map(w=>A("div",{style:{fontSize:"12px"},children:["• ",w]},w))]}),placement:"top",children:A(gl,{color:"green",children:[Object.keys($.permissions.entities).length," entities"]})})]})]})})},x)})}),A(wt,{type:"dashed",icon:A(na,{}),onClick:m,disabled:i,style:{width:"100%",marginTop:16},children:"Add Role"}),A(gf,{visible:!!l,onCancel:O,onSave:y,roleName:l,roleConfig:u,availableRoles:Object.keys(a),domains:t.domains,entities:t.entities,services:t.services}),A(gf,{visible:f,onCancel:v,onSave:S,roleName:null,roleConfig:null,availableRoles:Object.keys(a),domains:t.domains,entities:t.entities,services:t.services})]})}function DY({data:t,onSuccess:e,onError:n,onDataChange:r,isDarkMode:i=!1}){const[o,a]=te(!1),[s,l]=te({}),[c,u]=te(null),[d,f]=te(null),[h,m]=te(!1),[p,g]=te(null),[O,v]=te([]),[y,S]=te([]),[x,$]=te(""),[C,P]=te(!1),[w,_]=te(1),[R]=te(15);ye(()=>{var N;if((N=t.config)!=null&&N.users){const j={};Object.entries(t.config.users).forEach(([oe,ee])=>{j[oe]=ee.role||"user"}),l(j)}},[t.config]);const I=N=>{var ee;const j=s[N.id];if(!j||!((ee=t.config)!=null&&ee.roles))return!1;const oe=t.config.roles[j];return(oe==null?void 0:oe.admin)===!0},T=N=>{if(!N)return{};const j=i?"#262626":"white";return{border:"2px solid transparent",background:`linear-gradient(${j}, ${j}) padding-box, linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57) border-box`,animation:"adminGlow 2s ease-in-out infinite alternate",boxShadow:"0 0 20px rgba(255, 107, 107, 0.3)"}},M=async(N,j)=>{var oe;a(!0);try{if(!(await Wn("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"assign_user_role",userId:N,roleName:j})})).ok)throw new Error("Failed to assign role");const se={...s,[N]:j};l(se);const fe={...((oe=t.config)==null?void 0:oe.users)||{}};fe[N]||(fe[N]={}),fe[N].role=j,r({...t,config:{...t.config,users:fe}});const re=t.users.find(ue=>ue.id===N),J=re?re.name:N;e(`Role "${j}" assigned to ${J} successfully!`)}catch(ee){console.error("Error assigning role:",ee),n(ee.message)}finally{a(!1)}},Q=()=>{var j;const N=Object.keys(((j=t.config)==null?void 0:j.roles)||{});return N.includes("admin")||N.unshift("admin"),N.includes("user")||N.push("user"),N.includes("guest")||N.push("guest"),N.unshift("default"),N},E=N=>{const j=s[N];return Q().includes(j)},k=N=>N.name||N.username||N.id,z=N=>N.entity_picture?N.entity_picture:N.id?`/api/image/serve/${N.id}/512x512`:null,L=()=>{u(null),f(null)},B=async N=>{g(N),m(!0),P(!0),$("");try{const j=await Wn(`/api/rbac/frontend-blocking?user_id=${N.id}`,{method:"GET"});if(!j.ok)throw new Error("Failed to fetch accessible entities");const oe=await j.json(),ee=await Wn("/api/states",{method:"GET"});if(!ee.ok)throw new Error("Failed to fetch entities");const se=await ee.json();let fe=[];oe.enabled?fe=se.filter(re=>{const J=re.entity_id,ue=J.split(".")[0];return oe.entities&&oe.entities.includes(J)?!1:(oe.allowed_entities&&oe.allowed_entities.includes(J)||oe.allowed_domains&&oe.allowed_domains.includes(ue),!0)}):fe=se,v(fe),S(fe)}catch(j){console.error("Error fetching accessible entities:",j),n("Failed to load accessible entities"),v([]),S([])}finally{P(!1)}},F=N=>{const j=N.target.value.toLowerCase();if($(j),_(1),!j)S(O);else{const oe=O.filter(ee=>{var se;return((se=ee.attributes.friendly_name)==null?void 0:se.toLowerCase().includes(j))||ee.entity_id.toLowerCase().includes(j)});S(oe)}},H=N=>{_(N)},X=()=>{const N=(w-1)*R,j=N+R;return y.slice(N,j)},q=()=>{m(!1),g(null),v([]),S([]),$(""),_(1)};return A("div",{children:[A("style",{children:` @keyframes adminGlow { 0% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.3); @@ -327,9 +339,9 @@ html body { .role-selector-container .ant-space-item:last-child { margin-left: auto !important; } - `}),A(yn.Paragraph,{type:"secondary",style:{marginBottom:24},children:"Assign roles to users to control their access permissions."}),t.users&&t.users.length>0?A(xs,{gutter:[16,16],children:t.users.map(b=>A(Mr,{xs:24,sm:12,children:A(Sa,{size:"small",style:{height:"100%",...p(h(b))},children:A(jo,{align:"center",style:{width:"100%",height:"80px"},className:"role-selector-container",children:[A(p0,{src:S(b),size:48,children:O(b).charAt(0).toUpperCase()}),A(jo,{direction:"vertical",style:{flex:1},children:[A(yn.Text,{strong:!0,children:O(b)}),A(yn.Text,{type:"secondary",style:{fontSize:"12px"},children:["ID: ",b.id]})]}),A("div",{children:A(jn,{value:v(b.id)?s[b.id]||"user":void 0,onChange:C=>m(b.id,C),disabled:o,style:{minWidth:120},size:"small",status:v(b.id)?"":"error",placeholder:v(b.id)?void 0:"Select Role...",children:g().map(C=>A(jn.Option,{value:C,children:C.charAt(0).toUpperCase()+C.slice(1)},C))})})]})})},b.id))}):A(yn.Text,{type:"secondary",style:{textAlign:"center",display:"block",padding:"40px 0"},children:"No users found."}),A(Jg,{isOpen:!!c,onClose:x,roleName:c,roleData:d,data:t,onSuccess:e,onError:n,onDataChange:r})]})}const{TextArea:JY}=bi,{Title:WU,Text:eU}=yn;function tU({visible:t,onClose:e}){const[n,r]=J(!1),[i,o]=J(""),[a,s]=J(null),l=U(!0);be(()=>()=>{l.current=!1},[]);const c=async()=>{try{const h=localStorage.getItem("hassTokens");if(h)return JSON.parse(h).access_token;const p=sessionStorage.getItem("hassTokens");return p?JSON.parse(p).access_token:null}catch(h){return console.error("Auth error:",h),null}},u=async()=>{try{r(!0),s(null);const h=await c();if(!h)throw new Error("Not authenticated");const p=await fetch("/api/rbac/deny-log",{headers:{Authorization:`Bearer ${h}`,"Content-Type":"application/json"}});if(!p.ok){const g=await p.json();throw new Error(g.message||"Failed to fetch deny log")}const m=await p.json();if(m.success)l.current&&o(m.contents);else throw new Error(m.error||"Failed to fetch deny log")}catch(h){console.error("Error fetching deny log:",h),l.current&&(s(h.message),o(""))}finally{l.current&&r(!1)}};return be(()=>{t&&(l.current=!0,u())},[t]),A(ur,{title:A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(DB,{}),A("span",{children:"Access Denial Log"})]}),open:t,onCancel:e,width:800,footer:[A(vt,{danger:!0,icon:A(eW,{}),onClick:()=>{ur.confirm({title:"Clear Deny Log",content:"Are you sure you want to clear the deny log? This action cannot be undone.",okText:"Clear",okType:"danger",cancelText:"Cancel",onOk:async()=>{try{if(!l.current)return;r(!0),s(null);const h=await c();if(!h)throw new Error("Not authenticated");const p=await fetch("/api/rbac/deny-log",{method:"DELETE",headers:{Authorization:`Bearer ${h}`,"Content-Type":"application/json"}});if(!p.ok){const g=await p.json();throw new Error(g.message||"Failed to clear deny log")}const m=await p.json();if(m.success)l.current&&o("");else throw new Error(m.error||"Failed to clear deny log")}catch(h){console.error("Error clearing deny log:",h),l.current&&(s(h.message),ur.error({title:"Clear Failed",content:`Failed to clear deny log: ${h.message}`,getContainer:!1}))}finally{l.current&&r(!1)}}})},children:"Clear Log"},"clear"),A(vt,{icon:A(wl,{}),onClick:u,loading:n,children:"Refresh"},"refresh"),A(vt,{type:"primary",onClick:e,children:"Close"},"close")],style:{top:20},children:[A("div",{style:{marginBottom:"16px"},children:A(oa,{message:"Deny Log Information",description:"This log shows all access denials when deny list logging is enabled. Entries are shown with newest first.",type:"info",showIcon:!0,style:{marginBottom:"16px"}})}),a&&A(oa,{message:"Error Loading Log",description:a,type:"error",showIcon:!0,style:{marginBottom:"16px"}}),A("div",{style:{position:"relative"},children:[n&&A("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:10},children:A(QP,{size:"large"})}),A(JY,{value:(h=>!h||h.trim()===""?"No deny log entries found.":h.trim().split(` + `}),A(an.Paragraph,{type:"secondary",style:{marginBottom:24},children:"Assign roles to users to control their access permissions."}),t.users&&t.users.length>0?A(Ca,{gutter:[16,16],children:t.users.map(N=>A(Qr,{xs:24,sm:12,children:A($a,{size:"small",style:{height:"100%",...T(I(N))},children:A(co,{align:"center",style:{width:"100%",height:"80px"},className:"role-selector-container",children:[A(Qd,{src:z(N),size:48,children:k(N).charAt(0).toUpperCase()}),A(co,{direction:"vertical",style:{flex:1},children:[A(an.Text,{strong:!0,children:k(N)}),A(an.Text,{type:"secondary",style:{fontSize:"12px"},children:["ID: ",N.id]})]}),A(co,{children:[A(on,{title:`View accessible entities for ${k(N)}`,children:A(wt,{icon:A(HP,{}),size:"small",onClick:()=>B(N),disabled:o,style:{border:"1px dashed #1890ff",color:"#1890ff"}})}),A(Nn,{value:E(N.id)?s[N.id]||"user":void 0,onChange:j=>M(N.id,j),disabled:o,style:{minWidth:120},size:"small",status:E(N.id)?"":"error",placeholder:E(N.id)?void 0:"Select Role...",children:Q().map(j=>A(Nn.Option,{value:j,children:j==="default"?"Default":j.charAt(0).toUpperCase()+j.slice(1)},j))})]})]})})},N.id))}):A(an.Text,{type:"secondary",style:{textAlign:"center",display:"block",padding:"40px 0"},children:"No users found."}),A(gf,{isOpen:!!c,onClose:L,roleName:c,roleData:d,data:t,onSuccess:e,onError:n,onDataChange:r}),A(ar,{title:`Accessible Entities - ${p?k(p):""}`,open:h,onCancel:q,footer:null,width:500,style:{top:20},bodyStyle:{maxHeight:"calc(100vh - 200px)",overflow:"hidden",padding:"16px 0"},children:[A("div",{style:{marginBottom:12},children:A(li,{placeholder:"Search entities...",value:x,onChange:F,allowClear:!0,size:"small"})}),A(ch,{spinning:C,children:A("div",{style:{maxHeight:"calc(100vh - 350px)",display:"flex",flexDirection:"column"},children:[A("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden"},children:A(td,{dataSource:X(),renderItem:N=>A(td.Item,{style:{padding:"8px 0"},children:A(td.Item.Meta,{avatar:A(Qd,{size:24,style:{backgroundColor:"#f0f0f0",fontSize:"12px",fontWeight:"bold"},children:N.entity_id.split(".")[0].charAt(0).toUpperCase()}),title:A(an.Text,{strong:!0,style:{fontSize:"14px"},children:N.attributes.friendly_name||N.entity_id}),description:A(an.Text,{type:"secondary",style:{fontSize:"11px"},children:N.entity_id})})}),pagination:!1,locale:{emptyText:"No accessible entities found"}})}),A("div",{style:{flexShrink:0,borderTop:"1px solid #f0f0f0",paddingTop:12,textAlign:"right",backgroundColor:"white"},children:A(qP,{current:w,pageSize:R,total:y.length,onChange:H,showSizeChanger:!1,showQuickJumper:!1,showTotal:(N,j)=>`${j[0]}-${j[1]} of ${N}`,size:"small",simple:!0})})]})})]})]})}const{TextArea:BY}=li,{Title:IK,Text:WY}=an;function HY({visible:t,onClose:e}){const[n,r]=te(!1),[i,o]=te(""),[a,s]=te(null),l=ne(!0);ye(()=>()=>{l.current=!1},[]);const c=async()=>{try{const h=localStorage.getItem("hassTokens");if(h)return JSON.parse(h).access_token;const m=sessionStorage.getItem("hassTokens");return m?JSON.parse(m).access_token:null}catch(h){return console.error("Auth error:",h),null}},u=async()=>{try{r(!0),s(null);const h=await c();if(!h)throw new Error("Not authenticated");const m=await fetch("/api/rbac/deny-log",{headers:{Authorization:`Bearer ${h}`,"Content-Type":"application/json"}});if(!m.ok){const g=await m.json();throw new Error(g.message||"Failed to fetch deny log")}const p=await m.json();if(p.success)l.current&&o(p.contents);else throw new Error(p.error||"Failed to fetch deny log")}catch(h){console.error("Error fetching deny log:",h),l.current&&(s(h.message),o(""))}finally{l.current&&r(!1)}};return ye(()=>{t&&(l.current=!0,u())},[t]),A(ar,{title:A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(e8,{}),A("span",{children:"Access Denial Log"})]}),open:t,onCancel:e,width:800,footer:[A(wt,{danger:!0,icon:A(HW,{}),onClick:()=>{ar.confirm({title:"Clear Deny Log",content:"Are you sure you want to clear the deny log? This action cannot be undone.",okText:"Clear",okType:"danger",cancelText:"Cancel",onOk:async()=>{try{if(!l.current)return;r(!0),s(null);const h=await c();if(!h)throw new Error("Not authenticated");const m=await fetch("/api/rbac/deny-log",{method:"DELETE",headers:{Authorization:`Bearer ${h}`,"Content-Type":"application/json"}});if(!m.ok){const g=await m.json();throw new Error(g.message||"Failed to clear deny log")}const p=await m.json();if(p.success)l.current&&o("");else throw new Error(p.error||"Failed to clear deny log")}catch(h){console.error("Error clearing deny log:",h),l.current&&(s(h.message),ar.error({title:"Clear Failed",content:`Failed to clear deny log: ${h.message}`,getContainer:!1}))}finally{l.current&&r(!1)}}})},children:"Clear Log"},"clear"),A(wt,{icon:A(Rl,{}),onClick:u,loading:n,children:"Refresh"},"refresh"),A(wt,{type:"primary",onClick:e,children:"Close"},"close")],style:{top:20},children:[A("div",{style:{marginBottom:"16px"},children:A(sa,{message:"Deny Log Information",description:"This log shows all access denials when deny list logging is enabled. Entries are shown with newest first.",type:"info",showIcon:!0,style:{marginBottom:"16px"}})}),a&&A(sa,{message:"Error Loading Log",description:a,type:"error",showIcon:!0,style:{marginBottom:"16px"}}),A("div",{style:{position:"relative"},children:[n&&A("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:10},children:A(ch,{size:"large"})}),A(BY,{value:(h=>!h||h.trim()===""?"No deny log entries found.":h.trim().split(` `).reverse().join(` -`))(i),readOnly:!0,rows:20,style:{fontFamily:'Monaco, Consolas, "Courier New", monospace',fontSize:"12px",lineHeight:"1.4",backgroundColor:"#f5f5f5",opacity:n?.5:1},placeholder:"No deny log entries found. Access denials will appear here when deny list logging is enabled."})]}),A("div",{style:{marginTop:"12px",fontSize:"12px",color:"#666"},children:A(eU,{type:"secondary",children:"Log file location: custom_components/rbac/deny_list.log"})})]})}const Za=63,Vx=64,nU=1,rU=2,sR=3,iU=4,lR=5,oU=6,aU=7,cR=65,sU=66,lU=8,cU=9,uU=10,dU=11,fU=12,uR=13,hU=19,pU=20,mU=29,gU=33,vU=34,OU=47,bU=0,bO=1,ev=2,hc=3,tv=4;class ia{constructor(e,n,r){this.parent=e,this.depth=n,this.type=r,this.hash=(e?e.hash+e.hash<<8:0)+n+(n<<4)+r}}ia.top=new ia(null,-1,bU);function El(t,e){for(let n=0,r=e-t.pos-1;;r--,n++){let i=t.peek(r);if(mo(i)||i==-1)return n}}function nv(t){return t==32||t==9}function mo(t){return t==10||t==13}function dR(t){return nv(t)||mo(t)}function ua(t){return t<0||dR(t)}const yU=new Uk({start:ia.top,reduce(t,e){return t.type==hc&&(e==pU||e==vU)?t.parent:t},shift(t,e,n,r){if(e==sR)return new ia(t,El(r,r.pos),bO);if(e==cR||e==lR)return new ia(t,El(r,r.pos),ev);if(e==Za)return t.parent;if(e==hU||e==gU)return new ia(t,0,hc);if(e==uR&&t.type==tv)return t.parent;if(e==OU){let i=/[1-9]/.exec(r.read(r.pos,n.pos));if(i)return new ia(t,t.depth+ +i[0],tv)}return t},hash(t){return t.hash}});function Is(t,e,n=0){return t.peek(n)==e&&t.peek(n+1)==e&&t.peek(n+2)==e&&ua(t.peek(n+3))}const SU=new bo((t,e)=>{if(t.next==-1&&e.canShift(Vx))return t.acceptToken(Vx);let n=t.peek(-1);if((mo(n)||n<0)&&e.context.type!=hc){if(Is(t,45))if(e.canShift(Za))t.acceptToken(Za);else return t.acceptToken(nU,3);if(Is(t,46))if(e.canShift(Za))t.acceptToken(Za);else return t.acceptToken(rU,3);let r=0;for(;t.next==32;)r++,t.advance();(r{if(e.context.type==hc){t.next==63&&(t.advance(),ua(t.next)&&t.acceptToken(aU));return}if(t.next==45)t.advance(),ua(t.next)&&t.acceptToken(e.context.type==bO&&e.context.depth==El(t,t.pos-1)?iU:sR);else if(t.next==63)t.advance(),ua(t.next)&&t.acceptToken(e.context.type==ev&&e.context.depth==El(t,t.pos-1)?oU:lR);else{let n=t.pos;for(;;)if(nv(t.next)){if(t.pos==n)return;t.advance()}else if(t.next==33)fR(t);else if(t.next==38)rv(t);else if(t.next==42){rv(t);break}else if(t.next==39||t.next==34){if(yO(t,!0))break;return}else if(t.next==91||t.next==123){if(!$U(t))return;break}else{hR(t,!0,!1,0);break}for(;nv(t.next);)t.advance();if(t.next==58){if(t.pos==n&&e.canShift(mU))return;let r=t.peek(1);ua(r)&&t.acceptTokenTo(e.context.type==ev&&e.context.depth==El(t,n)?sU:cR,n)}}},{contextual:!0});function CU(t){return t>32&&t<127&&t!=34&&t!=37&&t!=44&&t!=60&&t!=62&&t!=92&&t!=94&&t!=96&&t!=123&&t!=124&&t!=125}function Hx(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function Xx(t,e){return t.next==37?(t.advance(),Hx(t.next)&&t.advance(),Hx(t.next)&&t.advance(),!0):CU(t.next)||e&&t.next==44?(t.advance(),!0):!1}function fR(t){if(t.advance(),t.next==60){for(t.advance();;)if(!Xx(t,!0)){t.next==62&&t.advance();break}}else for(;Xx(t,!1););}function rv(t){for(t.advance();!ua(t.next)&&sf(t.tag)!="f";)t.advance()}function yO(t,e){let n=t.next,r=!1,i=t.pos;for(t.advance();;){let o=t.next;if(o<0)break;if(t.advance(),o==n)if(o==39)if(t.next==39)t.advance();else break;else break;else if(o==92&&n==34)t.next>=0&&t.advance();else if(mo(o)){if(e)return!1;r=!0}else if(e&&t.pos>=i+1024)return!1}return!r}function $U(t){for(let e=[],n=t.pos+1024;;)if(t.next==91||t.next==123)e.push(t.next),t.advance();else if(t.next==39||t.next==34){if(!yO(t,!0))return!1}else if(t.next==93||t.next==125){if(e[e.length-1]!=t.next-2)return!1;if(e.pop(),t.advance(),!e.length)return!0}else{if(t.next<0||t.pos>n||mo(t.next))return!1;t.advance()}}const wU="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function sf(t){return t<33?"u":t>125?"s":wU[t-33]}function jp(t,e){let n=sf(t);return n!="u"&&!(e&&n=="f")}function hR(t,e,n,r){if(sf(t.next)=="s"||(t.next==63||t.next==58||t.next==45)&&jp(t.peek(1),n))t.advance();else return!1;let i=t.pos;for(;;){let o=t.next,a=0,s=r+1;for(;dR(o);){if(mo(o)){if(e)return!1;s=0}else s++;o=t.peek(++a)}if(!(o>=0&&(o==58?jp(t.peek(a+1),n):o==35?t.peek(a-1)!=32:jp(o,n)))||!n&&s<=r||s==0&&!n&&(Is(t,45,a)||Is(t,46,a)))break;if(e&&sf(o)=="f")return!1;for(let c=a;c>=0;c--)t.advance();if(e&&t.pos>i+1024)return!1}return!0}const PU=new bo((t,e)=>{if(t.next==33)fR(t),t.acceptToken(fU);else if(t.next==38||t.next==42){let n=t.next==38?uU:dU;rv(t),t.acceptToken(n)}else t.next==39||t.next==34?(yO(t,!1),t.acceptToken(cU)):hR(t,!1,e.context.type==hc,e.context.depth)&&t.acceptToken(lU)}),_U=new bo((t,e)=>{let n=e.context.type==tv?e.context.depth:-1,r=t.pos;e:for(;;){let i=0,o=t.next;for(;o==32;)o=t.peek(++i);if(!i&&(Is(t,45,i)||Is(t,46,i))||!mo(o)&&(n<0&&(n=Math.max(e.context.depth+1,i)),iYAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:yU,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[TU],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[SU,xU,PU,_U,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),RU=ic.define({name:"yaml",parser:kU.configure({props:[eO.add({Stream:t=>{for(let e=t.node.resolve(t.pos,-1);e&&e.to>=t.pos;e=e.parent){if(e.name=="BlockLiteralContent"&&e.fromt.pos)return null}}return null},FlowMapping:jg({closing:"}"}),FlowSequence:jg({closing:"]"})}),nO.add({"FlowMapping FlowSequence":AT,"Item Pair BlockLiteral":(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function IU(){return new IT(RU)}const{Text:MU}=yn;function EU({visible:t,onClose:e,onSuccess:n}){const[r,i]=J(""),[o,a]=J(!1),[s,l]=J(!1);be(()=>{t&&c()},[t]);const c=async()=>{a(!0);try{const f=await oi("/api/rbac/yaml-editor",{method:"GET"});if(!f.ok){const p=await f.json();throw new Error(p.error||"Failed to load YAML content")}const h=await f.json();i(h.yaml_content||"")}catch(f){console.error("Error loading YAML content:",f),ar.error({message:"Error Loading YAML",description:f.message,placement:"bottomRight",duration:5})}finally{a(!1)}},u=async()=>{l(!0);try{const f=await oi("/api/rbac/yaml-editor",{method:"POST",body:JSON.stringify({yaml_content:r})}),h=await f.json();if(!f.ok)throw new Error(h.error||"Failed to save YAML content");ar.success({message:"YAML Updated Successfully",description:h.message||"Configuration has been saved",placement:"bottomRight",duration:3}),n==null||n(),e()}catch(f){console.error("Error saving YAML content:",f),ar.error({message:"Error Saving YAML",description:f.message,placement:"bottomRight",duration:5})}finally{l(!1)}},d=()=>{e()};return A(ur,{title:A(jo,{children:[A(Yu,{style:{color:"#1890ff"}}),A("span",{children:"Edit YAML Configuration"})]}),open:t,onCancel:d,width:"90%",style:{maxWidth:"1200px"},footer:A(jo,{children:[A(vt,{icon:A(wl,{}),onClick:c,loading:o,disabled:s,children:"Reload"}),A(vt,{onClick:d,disabled:s,children:"Cancel"}),A(vt,{type:"primary",icon:A(xW,{}),onClick:u,loading:s,disabled:o,children:"Save Changes"})]}),children:[A("div",{style:{marginBottom:16},children:A(MU,{type:"secondary",children:"Edit the access_control.yaml configuration directly. Changes will be validated before saving."})}),A("div",{style:{border:"1px solid #d9d9d9",borderRadius:"6px",overflow:"hidden"},children:A(OO,{value:r,height:"calc(100vh - 300px)",onChange:f=>{i(f)},editable:!o,extensions:[IU()],basicSetup:{lineNumbers:!0,foldGutter:!0,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!0,highlightSelectionMatches:!1,searchKeymap:!0}})})]})}function AU(){return A("div",{class:"loading",children:[A("h2",{children:"Loading RBAC Configuration..."}),A("p",{children:"Please wait while we load your access control settings."})]})}let ld=!1;function pR(){return ld=localStorage.getItem("rbac-theme")==="dark",mR(ld),ld}function mR(t){ld=t;const e=document.documentElement;t?(e.classList.add("dark-theme"),e.classList.remove("light-theme")):(e.classList.add("light-theme"),e.classList.remove("dark-theme")),NU(t)}function QU(t){localStorage.setItem("rbac-theme",t?"dark":"light")}function NU(t){let e=document.querySelector('meta[name="theme-color"]');e||(e=document.createElement("meta"),e.name="theme-color",document.head.appendChild(e)),e.content=t?"#2a2a2a":"#ffffff"}pR();function zU(){var ue,de;const[t,e]=J(!0),[n,r]=J(!1),[i,o]=J(!0),[a,s]=J(null),[l,c]=J(!0),[u,d]=J(!0),[f,h]=J(!1),[p,m]=J(!1),[g,v]=J(!1),[O,S]=J(!1),[x,b]=J(!1),[C,$]=J(!1),[w,P]=J(!1),[_,T]=J(null),[R,k]=J(!1),[I,Q]=J({last_rejection:null,last_user_rejected:null}),[M,E]=J({users:[],domains:[],entities:[],services:[],config:null}),[N,z]=J({settings:!1,defaultRestrictions:!1,rolesManagement:!1,userAssignments:!1}),L={algorithm:w?E1.darkAlgorithm:E1.defaultAlgorithm,token:{colorPrimary:"#1890ff",borderRadius:6}};be(()=>{B(),V(),F()},[]);const F=()=>{try{const j=pR();P(j)}catch(j){console.warn("Could not load theme:",j)}},H=()=>{const j=!w;P(j),mR(j),QU(j)},V=()=>{try{const j=localStorage.getItem("rbac-collapsed-sections");if(j){const ee=JSON.parse(j);z({...{settings:!1,defaultRestrictions:!1,rolesManagement:!1,userAssignments:!1},...ee})}}catch(j){console.warn("Could not load collapsed state from localStorage:",j)}},X=j=>{try{localStorage.setItem("rbac-collapsed-sections",JSON.stringify(j))}catch(ee){console.warn("Could not save collapsed state to localStorage:",ee)}},B=async(j=!1)=>{try{s(null),j?r(!0):e(!0),console.log("Starting to load data...");const ee=await aR();if(console.log("Auth result:",ee),!ee)throw k(!1),new Error("Not authenticated with Home Assistant");k(!0);const he=await le(ee);T(he);const ve=await me(ee);ve&&Q(ve),console.log("Making API calls...");const[Y,ce,te,Oe,ye]=await Promise.all([oi("/api/rbac/users"),oi("/api/rbac/domains"),oi("/api/rbac/entities"),oi("/api/rbac/services"),oi("/api/rbac/config")]);if(console.log("API responses:",{usersRes:Y,domainsRes:ce,entitiesRes:te,servicesRes:Oe,configRes:ye}),Y.status===403||ce.status===403||te.status===403||Oe.status===403||ye.status===403){const Ie=await ye.json();s("Admin access required"),ar.error({message:"Access Denied",description:"Only administrators can access RBAC configuration. You will be redirected to the main page.",placement:"bottomRight",duration:5}),setTimeout(()=>{window.location.href=Ie.redirect_url||"/"},5e3);return}if(Y.status===404||ce.status===404||te.status===404||Oe.status===404||ye.status===404){o(!1),j?r(!1):e(!1);return}if(!Y.ok||!ce.ok||!te.ok||!Oe.ok||!ye.ok)throw new Error("Failed to load data from API");const[pe,Qe,Me,De,we]=await Promise.all([Y.json(),ce.json(),te.json(),Oe.json(),ye.json()]);console.log("Loaded data:",{users:pe,domains:Qe,entities:Me,services:De,config:we}),E({users:pe,domains:Qe,entities:Me,services:De,config:we}),o(!0),we&&we.enabled!==void 0&&c(we.enabled),we&&(d(we.show_notifications!==void 0?we.show_notifications:!0),h(we.send_event!==void 0?we.send_event:!1),m(we.frontend_blocking_enabled!==void 0?we.frontend_blocking_enabled:!1),v(we.log_deny_list!==void 0?we.log_deny_list:!1),S(we.allow_chained_actions!==void 0?we.allow_chained_actions:!1)),j&&ar.success({message:"Data Reloaded",description:"RBAC configuration has been refreshed successfully.",placement:"bottomRight",duration:2})}catch(ee){console.error("Error loading data:",ee),ee.message.includes("404")||ee.message.includes("Not Found")?o(!1):(s(ee.message),ar.error({message:"Error Loading Data",description:ee.message,placement:"bottomRight",duration:5}))}finally{j?r(!1):e(!1)}},G=()=>{B(!0)},se=async j=>{try{if(!(await oi("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_settings",enabled:j})})).ok)throw new Error("Failed to update enabled state");c(j),ar.success({message:"Settings Updated",description:`RBAC is now ${j?"enabled":"disabled"}`,placement:"bottomRight",duration:3})}catch(ee){console.error("Error updating enabled state:",ee),ar.error({message:"Error",description:ee.message,placement:"bottomRight",duration:5})}},re=async j=>{try{if(!(await oi("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_settings",...j})})).ok)throw new Error("Failed to update settings");j.show_notifications!==void 0&&d(j.show_notifications),j.send_event!==void 0&&h(j.send_event),j.frontend_blocking_enabled!==void 0&&m(j.frontend_blocking_enabled),j.log_deny_list!==void 0&&v(j.log_deny_list),j.allow_chained_actions!==void 0&&S(j.allow_chained_actions),ar.success({message:"Settings Updated",description:"RBAC settings have been updated",placement:"bottomRight",duration:3})}catch(ee){console.error("Error updating settings:",ee),ar.error({message:"Error",description:ee.message,placement:"bottomRight",duration:5})}},le=async j=>{try{const ee=await oi("/api/rbac/current-user");if(ee.ok){const he=await ee.json();return console.log("Current user data received:",he),he}return null}catch(ee){return console.error("Error fetching current user:",ee),null}},me=async j=>{try{const ee=await oi("/api/rbac/sensors");return ee.ok?await ee.json():null}catch(ee){return console.error("Error fetching sensors:",ee),null}},ie=j=>{ar.success({message:"Success",description:j,placement:"bottomRight",duration:3}),setTimeout(()=>{B(!0)},500)},ne=j=>{ar.error({message:"Error",description:j,placement:"bottomRight",duration:5})};if(t)return A(AU,{});if(!R)return A(Gr,{theme:L,children:A(Zr,{style:{minHeight:"100vh",background:w?"#141414":"#f0f2f5"},children:A(Zr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(uu,{currentUser:_}),A("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:A(oa,{message:A("div",{style:{textAlign:"center"},children:"Authentication Required"}),description:A("div",{style:{textAlign:"center"},children:[A("p",{style:{marginBottom:"24px"},children:"You must be logged into Home Assistant to access RBAC configuration."}),A(vt,{type:"primary",onClick:()=>window.location.href="/",style:{marginRight:"12px"},children:"Go to Home Assistant Login"}),A(vt,{onClick:()=>B(),icon:A(wl,{}),children:"Retry Authentication"})]}),type:"warning",showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})});if(!i)return A(Gr,{theme:L,children:A(Zr,{style:{minHeight:"100vh",background:w?"#141414":"#f0f2f5"},children:A(Zr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(uu,{currentUser:_}),A("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:A(oa,{message:A("div",{style:{textAlign:"center"},children:"RBAC Integration Required"}),description:A("div",{style:{textAlign:"center"},children:[A("p",{style:{marginBottom:"24px"},children:"Please configure the RBAC integration first."}),A(vt,{type:"primary",icon:A(XP,{}),size:"large",onClick:()=>{const j=window.location.hostname,ee=window.location.protocol,he=window.location.port?`:${window.location.port}`:"",ve=`${ee}//${j}${he}/config/integrations/integration/rbac`;window.open(ve,"_blank")},children:"Configure Integration"})]}),type:"error",icon:A(Yu,{}),showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})});if(a){const j=a==="Admin access required";return A(Gr,{theme:L,children:A(Zr,{style:{minHeight:"100vh",background:w?"#141414":"#f0f2f5"},children:A(Zr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(uu,{currentUser:_}),A("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:A(oa,{message:A("div",{style:{textAlign:"center"},children:j?"Admin Access Required":"Failed to Load RBAC Data"}),description:A("div",{style:{textAlign:"center"},children:[A("p",{style:{marginBottom:"24px"},children:j?"Only administrators can access RBAC configuration. Please contact your system administrator or log in with an admin account.":a}),j?A(vt,{type:"primary",onClick:()=>window.location.href="/",style:{marginRight:"12px"},children:"Go to Home Assistant"}):A(vt,{type:"primary",icon:A(wl,{}),size:"large",onClick:()=>B(!0),children:"Retry Loading"})]}),type:"error",icon:A(Yu,{}),showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})})}return A(Gr,{theme:L,children:[A("style",{children:` +`))(i),readOnly:!0,rows:20,style:{fontFamily:'Monaco, Consolas, "Courier New", monospace',fontSize:"12px",lineHeight:"1.4",backgroundColor:"#f5f5f5",opacity:n?.5:1},placeholder:"No deny log entries found. Access denials will appear here when deny list logging is enabled."})]}),A("div",{style:{marginTop:"12px",fontSize:"12px",color:"#666"},children:A(WY,{type:"secondary",children:"Log file location: custom_components/rbac/deny_list.log"})})]})}const Ya=63,o$=64,VY=1,FY=2,$I=3,XY=4,CI=5,ZY=6,qY=7,wI=65,GY=66,UY=8,YY=9,KY=10,JY=11,eK=12,PI=13,tK=19,nK=20,rK=29,iK=33,oK=34,aK=47,sK=0,MO=1,cv=2,Oc=3,uv=4;class aa{constructor(e,n,r){this.parent=e,this.depth=n,this.type=r,this.hash=(e?e.hash+e.hash<<8:0)+n+(n<<4)+r}}aa.top=new aa(null,-1,sK);function zl(t,e){for(let n=0,r=e-t.pos-1;;r--,n++){let i=t.peek(r);if(vo(i)||i==-1)return n}}function dv(t){return t==32||t==9}function vo(t){return t==10||t==13}function _I(t){return dv(t)||vo(t)}function fa(t){return t<0||_I(t)}const lK=new mI({start:aa.top,reduce(t,e){return t.type==Oc&&(e==nK||e==oK)?t.parent:t},shift(t,e,n,r){if(e==$I)return new aa(t,zl(r,r.pos),MO);if(e==wI||e==CI)return new aa(t,zl(r,r.pos),cv);if(e==Ya)return t.parent;if(e==tK||e==iK)return new aa(t,0,Oc);if(e==PI&&t.type==uv)return t.parent;if(e==aK){let i=/[1-9]/.exec(r.read(r.pos,n.pos));if(i)return new aa(t,t.depth+ +i[0],uv)}return t},hash(t){return t.hash}});function As(t,e,n=0){return t.peek(n)==e&&t.peek(n+1)==e&&t.peek(n+2)==e&&fa(t.peek(n+3))}const cK=new So((t,e)=>{if(t.next==-1&&e.canShift(o$))return t.acceptToken(o$);let n=t.peek(-1);if((vo(n)||n<0)&&e.context.type!=Oc){if(As(t,45))if(e.canShift(Ya))t.acceptToken(Ya);else return t.acceptToken(VY,3);if(As(t,46))if(e.canShift(Ya))t.acceptToken(Ya);else return t.acceptToken(FY,3);let r=0;for(;t.next==32;)r++,t.advance();(r{if(e.context.type==Oc){t.next==63&&(t.advance(),fa(t.next)&&t.acceptToken(qY));return}if(t.next==45)t.advance(),fa(t.next)&&t.acceptToken(e.context.type==MO&&e.context.depth==zl(t,t.pos-1)?XY:$I);else if(t.next==63)t.advance(),fa(t.next)&&t.acceptToken(e.context.type==cv&&e.context.depth==zl(t,t.pos-1)?ZY:CI);else{let n=t.pos;for(;;)if(dv(t.next)){if(t.pos==n)return;t.advance()}else if(t.next==33)TI(t);else if(t.next==38)fv(t);else if(t.next==42){fv(t);break}else if(t.next==39||t.next==34){if(EO(t,!0))break;return}else if(t.next==91||t.next==123){if(!fK(t))return;break}else{RI(t,!0,!1,0);break}for(;dv(t.next);)t.advance();if(t.next==58){if(t.pos==n&&e.canShift(rK))return;let r=t.peek(1);fa(r)&&t.acceptTokenTo(e.context.type==cv&&e.context.depth==zl(t,n)?GY:wI,n)}}},{contextual:!0});function dK(t){return t>32&&t<127&&t!=34&&t!=37&&t!=44&&t!=60&&t!=62&&t!=92&&t!=94&&t!=96&&t!=123&&t!=124&&t!=125}function a$(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function s$(t,e){return t.next==37?(t.advance(),a$(t.next)&&t.advance(),a$(t.next)&&t.advance(),!0):dK(t.next)||e&&t.next==44?(t.advance(),!0):!1}function TI(t){if(t.advance(),t.next==60){for(t.advance();;)if(!s$(t,!0)){t.next==62&&t.advance();break}}else for(;s$(t,!1););}function fv(t){for(t.advance();!fa(t.next)&&vf(t.tag)!="f";)t.advance()}function EO(t,e){let n=t.next,r=!1,i=t.pos;for(t.advance();;){let o=t.next;if(o<0)break;if(t.advance(),o==n)if(o==39)if(t.next==39)t.advance();else break;else break;else if(o==92&&n==34)t.next>=0&&t.advance();else if(vo(o)){if(e)return!1;r=!0}else if(e&&t.pos>=i+1024)return!1}return!r}function fK(t){for(let e=[],n=t.pos+1024;;)if(t.next==91||t.next==123)e.push(t.next),t.advance();else if(t.next==39||t.next==34){if(!EO(t,!0))return!1}else if(t.next==93||t.next==125){if(e[e.length-1]!=t.next-2)return!1;if(e.pop(),t.advance(),!e.length)return!0}else{if(t.next<0||t.pos>n||vo(t.next))return!1;t.advance()}}const hK="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function vf(t){return t<33?"u":t>125?"s":hK[t-33]}function Gm(t,e){let n=vf(t);return n!="u"&&!(e&&n=="f")}function RI(t,e,n,r){if(vf(t.next)=="s"||(t.next==63||t.next==58||t.next==45)&&Gm(t.peek(1),n))t.advance();else return!1;let i=t.pos;for(;;){let o=t.next,a=0,s=r+1;for(;_I(o);){if(vo(o)){if(e)return!1;s=0}else s++;o=t.peek(++a)}if(!(o>=0&&(o==58?Gm(t.peek(a+1),n):o==35?t.peek(a-1)!=32:Gm(o,n)))||!n&&s<=r||s==0&&!n&&(As(t,45,a)||As(t,46,a)))break;if(e&&vf(o)=="f")return!1;for(let c=a;c>=0;c--)t.advance();if(e&&t.pos>i+1024)return!1}return!0}const mK=new So((t,e)=>{if(t.next==33)TI(t),t.acceptToken(eK);else if(t.next==38||t.next==42){let n=t.next==38?KY:JY;fv(t),t.acceptToken(n)}else t.next==39||t.next==34?(EO(t,!1),t.acceptToken(YY)):RI(t,!1,e.context.type==Oc,e.context.depth)&&t.acceptToken(UY)}),pK=new So((t,e)=>{let n=e.context.type==uv?e.context.depth:-1,r=t.pos;e:for(;;){let i=0,o=t.next;for(;o==32;)o=t.peek(++i);if(!i&&(As(t,45,i)||As(t,46,i))||!vo(o)&&(n<0&&(n=Math.max(e.context.depth+1,i)),iYAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:lK,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[gK],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[cK,uK,mK,pK,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),OK=cc.define({name:"yaml",parser:vK.configure({props:[fO.add({Stream:t=>{for(let e=t.node.resolve(t.pos,-1);e&&e.to>=t.pos;e=e.parent){if(e.name=="BlockLiteralContent"&&e.fromt.pos)return null}}return null},FlowMapping:Gg({closing:"}"}),FlowSequence:Gg({closing:"]"})}),mO.add({"FlowMapping FlowSequence":YT,"Item Pair BlockLiteral":(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function bK(){return new qT(OK)}const{Text:yK}=an;function SK({visible:t,onClose:e,onSuccess:n}){const[r,i]=te(""),[o,a]=te(!1),[s,l]=te(!1);ye(()=>{t&&c()},[t]);const c=async()=>{a(!0);try{const f=await Wn("/api/rbac/yaml-editor",{method:"GET"});if(!f.ok){const m=await f.json();throw new Error(m.error||"Failed to load YAML content")}const h=await f.json();i(h.yaml_content||"")}catch(f){console.error("Error loading YAML content:",f),dr.error({message:"Error Loading YAML",description:f.message,placement:"bottomRight",duration:5})}finally{a(!1)}},u=async()=>{l(!0);try{const f=await Wn("/api/rbac/yaml-editor",{method:"POST",body:JSON.stringify({yaml_content:r})}),h=await f.json();if(!f.ok)throw new Error(h.error||"Failed to save YAML content");dr.success({message:"YAML Updated Successfully",description:h.message||"Configuration has been saved",placement:"bottomRight",duration:3}),n==null||n(),e()}catch(f){console.error("Error saving YAML content:",f),dr.error({message:"Error Saving YAML",description:f.message,placement:"bottomRight",duration:5})}finally{l(!1)}},d=()=>{e()};return A(ar,{title:A(co,{children:[A(id,{style:{color:"#1890ff"}}),A("span",{children:"Edit YAML Configuration"})]}),open:t,onCancel:d,width:"90%",style:{maxWidth:"1200px"},footer:A(co,{children:[A(wt,{icon:A(Rl,{}),onClick:c,loading:o,disabled:s,children:"Reload"}),A(wt,{onClick:d,disabled:s,children:"Cancel"}),A(wt,{type:"primary",icon:A(dH,{}),onClick:u,loading:s,disabled:o,children:"Save Changes"})]}),children:[A("div",{style:{marginBottom:16},children:A(yK,{type:"secondary",children:"Edit the access_control.yaml configuration directly. Changes will be validated before saving."})}),A("div",{style:{border:"1px solid #d9d9d9",borderRadius:"6px",overflow:"hidden"},children:A(IO,{value:r,height:"calc(100vh - 300px)",onChange:f=>{i(f)},editable:!o,extensions:[bK()],basicSetup:{lineNumbers:!0,foldGutter:!0,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!0,highlightSelectionMatches:!1,searchKeymap:!0}})})]})}function xK(){return A("div",{class:"loading",children:[A("h2",{children:"Loading RBAC Configuration..."}),A("p",{children:"Please wait while we load your access control settings."})]})}let gd=!1;function II(){return gd=localStorage.getItem("rbac-theme")==="dark",MI(gd),gd}function MI(t){gd=t;const e=document.documentElement;t?(e.classList.add("dark-theme"),e.classList.remove("light-theme")):(e.classList.add("light-theme"),e.classList.remove("dark-theme")),CK(t)}function $K(t){localStorage.setItem("rbac-theme",t?"dark":"light")}function CK(t){let e=document.querySelector('meta[name="theme-color"]');e||(e=document.createElement("meta"),e.name="theme-color",document.head.appendChild(e)),e.content=t?"#2a2a2a":"#ffffff"}II();function wK(){var ue,de;const[t,e]=te(!0),[n,r]=te(!1),[i,o]=te(!0),[a,s]=te(null),[l,c]=te(!0),[u,d]=te(!0),[f,h]=te(!1),[m,p]=te(!1),[g,O]=te(!1),[v,y]=te(!1),[S,x]=te(!1),[$,C]=te(!1),[P,w]=te(!1),[_,R]=te(null),[I,T]=te(!1),[M,Q]=te({last_rejection:null,last_user_rejected:null}),[E,k]=te({users:[],domains:[],entities:[],services:[],config:null}),[z,L]=te({settings:!1,defaultRestrictions:!1,rolesManagement:!1,userAssignments:!1}),B={algorithm:P?GS.darkAlgorithm:GS.defaultAlgorithm,token:{colorPrimary:"#1890ff",borderRadius:6}};ye(()=>{N(),X(),F()},[]);const F=()=>{try{const D=II();w(D)}catch(D){console.warn("Could not load theme:",D)}},H=()=>{const D=!P;w(D),MI(D),$K(D)},X=()=>{try{const D=localStorage.getItem("rbac-collapsed-sections");if(D){const Y=JSON.parse(D);L({...{settings:!1,defaultRestrictions:!1,rolesManagement:!1,userAssignments:!1},...Y})}}catch(D){console.warn("Could not load collapsed state from localStorage:",D)}},q=D=>{try{localStorage.setItem("rbac-collapsed-sections",JSON.stringify(D))}catch(Y){console.warn("Could not save collapsed state to localStorage:",Y)}},N=async(D=!1)=>{try{s(null),D?r(!0):e(!0);const Y=await Hd();if(!Y)throw T(!1),new Error("Not authenticated with Home Assistant");T(!0);const me=await se(Y);R(me);const G=await fe(Y);G&&Q(G);const[ce,ae,pe,Oe,be]=await Promise.all([Wn("/api/rbac/users"),Wn("/api/rbac/domains"),Wn("/api/rbac/entities"),Wn("/api/rbac/services"),Wn("/api/rbac/config")]);if(ce.status===403||ae.status===403||pe.status===403||Oe.status===403||be.status===403){const Ee=await be.json();s("Admin access required"),dr.error({message:"Access Denied",description:"Only administrators can access RBAC configuration. You will be redirected to the main page.",placement:"bottomRight",duration:5}),setTimeout(()=>{window.location.href=Ee.redirect_url||"/"},5e3);return}if(ce.status===404||ae.status===404||pe.status===404||Oe.status===404||be.status===404){o(!1),D?r(!1):e(!1);return}if(!ce.ok||!ae.ok||!pe.ok||!Oe.ok||!be.ok)throw new Error("Failed to load data from API");const[ge,Me,Ie,He,Ae]=await Promise.all([ce.json(),ae.json(),pe.json(),Oe.json(),be.json()]);k({users:ge,domains:Me,entities:Ie,services:He,config:Ae}),o(!0),Ae&&Ae.enabled!==void 0&&c(Ae.enabled),Ae&&(d(Ae.show_notifications!==void 0?Ae.show_notifications:!0),h(Ae.send_event!==void 0?Ae.send_event:!1),p(Ae.frontend_blocking_enabled!==void 0?Ae.frontend_blocking_enabled:!1),O(Ae.log_deny_list!==void 0?Ae.log_deny_list:!1),y(Ae.allow_chained_actions!==void 0?Ae.allow_chained_actions:!1)),D&&dr.success({message:"Data Reloaded",description:"RBAC configuration has been refreshed successfully.",placement:"bottomRight",duration:2})}catch(Y){console.error("Error loading data:",Y),Y.message.includes("404")||Y.message.includes("Not Found")?o(!1):(s(Y.message),dr.error({message:"Error Loading Data",description:Y.message,placement:"bottomRight",duration:5}))}finally{D?r(!1):e(!1)}},j=()=>{N(!0)},oe=async D=>{try{if(!(await Wn("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_settings",enabled:D})})).ok)throw new Error("Failed to update enabled state");c(D),dr.success({message:"Settings Updated",description:`RBAC is now ${D?"enabled":"disabled"}`,placement:"bottomRight",duration:3})}catch(Y){console.error("Error updating enabled state:",Y),dr.error({message:"Error",description:Y.message,placement:"bottomRight",duration:5})}},ee=async D=>{try{if(!(await Wn("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_settings",...D})})).ok)throw new Error("Failed to update settings");D.show_notifications!==void 0&&d(D.show_notifications),D.send_event!==void 0&&h(D.send_event),D.frontend_blocking_enabled!==void 0&&p(D.frontend_blocking_enabled),D.log_deny_list!==void 0&&O(D.log_deny_list),D.allow_chained_actions!==void 0&&y(D.allow_chained_actions),dr.success({message:"Settings Updated",description:"RBAC settings have been updated",placement:"bottomRight",duration:3})}catch(Y){console.error("Error updating settings:",Y),dr.error({message:"Error",description:Y.message,placement:"bottomRight",duration:5})}},se=async D=>{try{const Y=await Wn("/api/rbac/current-user");return Y.ok?await Y.json():null}catch(Y){return console.error("Error fetching current user:",Y),null}},fe=async D=>{try{const Y=await Wn("/api/rbac/sensors");return Y.ok?await Y.json():null}catch(Y){return console.error("Error fetching sensors:",Y),null}},re=D=>{dr.success({message:"Success",description:D,placement:"bottomRight",duration:3}),setTimeout(()=>{N(!0)},500)},J=D=>{dr.error({message:"Error",description:D,placement:"bottomRight",duration:5})};if(t)return A(xK,{});if(!I)return A(Ur,{theme:B,children:A(qr,{style:{minHeight:"100vh",background:P?"#141414":"#f0f2f5"},children:A(qr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(vu,{currentUser:_}),A("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:A(sa,{message:A("div",{style:{textAlign:"center"},children:"Authentication Required"}),description:A("div",{style:{textAlign:"center"},children:[A("p",{style:{marginBottom:"24px"},children:"You must be logged into Home Assistant to access RBAC configuration."}),A(wt,{type:"primary",onClick:()=>window.location.href="/",style:{marginRight:"12px"},children:"Go to Home Assistant Login"}),A(wt,{onClick:()=>N(),icon:A(Rl,{}),children:"Retry Authentication"})]}),type:"warning",showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})});if(!i)return A(Ur,{theme:B,children:A(qr,{style:{minHeight:"100vh",background:P?"#141414":"#f0f2f5"},children:A(qr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(vu,{currentUser:_}),A("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:A(sa,{message:A("div",{style:{textAlign:"center"},children:"RBAC Integration Required"}),description:A("div",{style:{textAlign:"center"},children:[A("p",{style:{marginBottom:"24px"},children:"Please configure the RBAC integration first."}),A(wt,{type:"primary",icon:A(c_,{}),size:"large",onClick:()=>{const D=window.location.hostname,Y=window.location.protocol,me=window.location.port?`:${window.location.port}`:"",G=`${Y}//${D}${me}/config/integrations/integration/rbac`;window.open(G,"_blank")},children:"Configure Integration"})]}),type:"error",icon:A(id,{}),showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})});if(a){const D=a==="Admin access required";return A(Ur,{theme:B,children:A(qr,{style:{minHeight:"100vh",background:P?"#141414":"#f0f2f5"},children:A(qr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(vu,{currentUser:_}),A("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:A(sa,{message:A("div",{style:{textAlign:"center"},children:D?"Admin Access Required":"Failed to Load RBAC Data"}),description:A("div",{style:{textAlign:"center"},children:[A("p",{style:{marginBottom:"24px"},children:D?"Only administrators can access RBAC configuration. Please contact your system administrator or log in with an admin account.":a}),D?A(wt,{type:"primary",onClick:()=>window.location.href="/",style:{marginRight:"12px"},children:"Go to Home Assistant"}):A(wt,{type:"primary",icon:A(Rl,{}),size:"large",onClick:()=>N(!0),children:"Retry Loading"})]}),type:"error",icon:A(id,{}),showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})})}return A(Ur,{theme:B,children:[A("style",{children:` /* Dark theme background styles */ html.dark-theme { background: #141414 !important; @@ -513,4 +525,4 @@ html body { filter: blur(0px); } } - `}),A(Zr,{style:{minHeight:"100vh",background:"#f0f2f5"},children:A(Zr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(uu,{currentUser:_,isDarkMode:w,onThemeToggle:H}),!l&&A(oa,{message:"RBAC is Disabled",description:A("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[A("span",{children:"Role-based access control is currently disabled. All users have full access to all services and entities."}),A(vt,{type:"primary",onClick:()=>se(!0),style:{marginLeft:"16px"},children:"Enable RBAC"})]}),type:"warning",showIcon:!0,style:{marginBottom:"24px",animation:"bannerSlideIn 0.5s ease-out",transform:"translateY(0)",opacity:1}}),A(Us,{activeKey:Object.keys(N).filter(j=>!N[j]),onChange:j=>{const ee={};Object.keys(N).forEach(he=>{ee[he]=!j.includes(he)}),z(ee),X(ee)},style:{marginBottom:24},expandIconPosition:"right",children:[A(Us.Panel,{header:A("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[A("span",{children:"Settings"}),A("div",{style:{display:"flex",gap:"8px"},children:[A(on,{title:"Edit the access_control.yaml configuration file directly",children:A(vt,{type:"default",icon:A(Yu,{}),onClick:j=>{j.stopPropagation(),$(!0)},size:"small",style:{borderColor:"#1890ff",color:"#1890ff",backgroundColor:"transparent"},onMouseEnter:j=>{j.currentTarget.style.backgroundColor="#1890ff",j.currentTarget.style.color="white"},onMouseLeave:j=>{j.currentTarget.style.backgroundColor="transparent",j.currentTarget.style.color="#1890ff"},children:"Edit YAML"})}),A(vt,{type:"primary",icon:A(wl,{}),onClick:j=>{j.stopPropagation(),G()},loading:n,size:"small",children:"Reload"})]})]}),children:[A(Sa,{size:"small",children:A("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:l?"RBAC is currently enabled":"RBAC is currently disabled",children:A(Oi,{checked:l,onChange:se,checkedChildren:"On",unCheckedChildren:"Off"})}),A("span",{style:{color:"#666"},children:["RBAC is ",l?"Enabled":"Disabled"]})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:u?"Notifications are enabled":"Notifications are disabled",children:A(Oi,{checked:u,onChange:j=>re({show_notifications:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),A("span",{style:{color:"#666",fontSize:"14px"},children:"Show Notifications"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:f?"Events are enabled":"Events are disabled",children:A(Oi,{checked:f,onChange:j=>re({send_event:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),A("span",{style:{color:"#666",fontSize:"14px"},children:"Send Event"}),f&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Event: rbac_access_denied"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:p?"Frontend blocking is enabled":"Frontend blocking is disabled",children:A(Oi,{checked:p,onChange:j=>re({frontend_blocking_enabled:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),A(on,{title:"Restricts the ha-quick-bar to only allowed entities",children:A("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Frontend Blocking"})}),p&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Add frontend script to www/community/rbac/rbac.js"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:g?"Deny list logging is enabled":"Deny list logging is disabled",children:A(Oi,{checked:g,onChange:j=>re({log_deny_list:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),A(on,{title:"Logs all access denials to deny_list.log file",children:A("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Deny List Logging"})}),g&&A(vt,{size:"small",type:"link",onClick:()=>b(!0),style:{padding:"0 4px",height:"auto",fontSize:"12px"},children:"View Logs"}),g&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"File: custom_components/rbac/deny_list.log"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:O?"Chained actions are allowed":"Chained actions are blocked",children:A(Oi,{checked:O,onChange:j=>re({allow_chained_actions:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),A(on,{title:"Allow actions within scripts/automations to run if the parent script/automation was allowed",children:A("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Allow Chained Actions"})}),O&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Actions in allowed scripts/automations bypass RBAC"})]})]})}),A(Sa,{size:"small",style:{marginTop:"16px"},children:[A(yn.Title,{level:5,style:{marginBottom:"16px"},children:"RBAC Status Sensors"}),A("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[A("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[A("span",{style:{fontSize:"16px"},children:"⏰"}),A("div",{children:[A(yn.Text,{strong:!0,children:"Last Rejection"}),A("br",{}),A(yn.Text,{type:"secondary",children:((ue=I.last_rejection)==null?void 0:ue.state)||"Never"})]})]}),A("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[A("span",{style:{fontSize:"16px"},children:"👤"}),A("div",{children:[A(yn.Text,{strong:!0,children:"Last User Rejected"}),A("br",{}),A(yn.Text,{type:"secondary",children:((de=I.last_user_rejected)==null?void 0:de.state)||"None"})]})]}),A("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[A("span",{style:{fontSize:"16px"},children:"🌐"}),A("div",{children:[A(yn.Text,{strong:!0,children:"Config URL"}),A("br",{}),A(yn.Text,{type:"secondary",style:{fontSize:"12px"},children:"/api/rbac/static/config.html"})]})]})]})]})]},"settings"),A(Us.Panel,{header:"Default Restrictions",children:A(MW,{data:M,onSuccess:ie,onError:ne})},"defaultRestrictions"),A(Us.Panel,{header:"Roles Management",children:A(YY,{data:M,onSuccess:ie,onError:ne,onDataChange:E})},"rolesManagement"),A(Us.Panel,{header:"User Role Assignments",children:A(KY,{data:M,onSuccess:ie,onError:ne,onDataChange:E,isDarkMode:w})},"userAssignments")]})]})}),A(tU,{visible:x,onClose:()=>b(!1)}),A(EU,{visible:C,onClose:()=>$(!1),onSuccess:()=>{G()}})]})}hs(A(zU,{}),document.getElementById("app")); + `}),A(qr,{style:{minHeight:"100vh",background:"#f0f2f5"},children:A(qr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(vu,{currentUser:_,isDarkMode:P,onThemeToggle:H}),!l&&A(sa,{message:"RBAC is Disabled",description:A("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[A("span",{children:"Role-based access control is currently disabled. All users have full access to all services and entities."}),A(wt,{type:"primary",onClick:()=>oe(!0),style:{marginLeft:"16px"},children:"Enable RBAC"})]}),type:"warning",showIcon:!0,style:{marginBottom:"24px",animation:"bannerSlideIn 0.5s ease-out",transform:"translateY(0)",opacity:1}}),A(Js,{activeKey:Object.keys(z).filter(D=>!z[D]),onChange:D=>{const Y={};Object.keys(z).forEach(me=>{Y[me]=!D.includes(me)}),L(Y),q(Y)},style:{marginBottom:24},expandIconPosition:"right",children:[A(Js.Panel,{header:A("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[A("span",{children:"Settings"}),A("div",{style:{display:"flex",gap:"8px"},children:[A(on,{title:"Edit the access_control.yaml configuration file directly",children:A(wt,{type:"default",icon:A(id,{}),onClick:D=>{D.stopPropagation(),C(!0)},size:"small",style:{borderColor:"#1890ff",color:"#1890ff",backgroundColor:"transparent"},onMouseEnter:D=>{D.currentTarget.style.backgroundColor="#1890ff",D.currentTarget.style.color="white"},onMouseLeave:D=>{D.currentTarget.style.backgroundColor="transparent",D.currentTarget.style.color="#1890ff"},children:"Edit YAML"})}),A(wt,{type:"primary",icon:A(Rl,{}),onClick:D=>{D.stopPropagation(),j()},loading:n,size:"small",children:"Reload"})]})]}),children:[A($a,{size:"small",children:A("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:l?"RBAC is currently enabled":"RBAC is currently disabled",children:A(Si,{checked:l,onChange:oe,checkedChildren:"On",unCheckedChildren:"Off"})}),A("span",{style:{color:"#666"},children:["RBAC is ",l?"Enabled":"Disabled"]})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:u?"Notifications are enabled":"Notifications are disabled",children:A(Si,{checked:u,onChange:D=>ee({show_notifications:D}),checkedChildren:"On",unCheckedChildren:"Off"})}),A("span",{style:{color:"#666",fontSize:"14px"},children:"Show Notifications"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:f?"Events are enabled":"Events are disabled",children:A(Si,{checked:f,onChange:D=>ee({send_event:D}),checkedChildren:"On",unCheckedChildren:"Off"})}),A("span",{style:{color:"#666",fontSize:"14px"},children:"Send Event"}),f&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Event: rbac_access_denied"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:m?"Frontend blocking is enabled":"Frontend blocking is disabled",children:A(Si,{checked:m,onChange:D=>ee({frontend_blocking_enabled:D}),checkedChildren:"On",unCheckedChildren:"Off"})}),A(on,{title:"Restricts the ha-quick-bar to only allowed entities",children:A("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Frontend Blocking"})}),m&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Add frontend script to /api/rbac/static/rbac.js"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:g?"Deny list logging is enabled":"Deny list logging is disabled",children:A(Si,{checked:g,onChange:D=>ee({log_deny_list:D}),checkedChildren:"On",unCheckedChildren:"Off"})}),A(on,{title:"Logs all access denials to deny_list.log file",children:A("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Deny List Logging"})}),g&&A(wt,{size:"small",type:"link",onClick:()=>x(!0),style:{padding:"0 4px",height:"auto",fontSize:"12px"},children:"View Logs"}),g&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"File: custom_components/rbac/deny_list.log"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:v?"Chained actions are allowed":"Chained actions are blocked",children:A(Si,{checked:v,onChange:D=>ee({allow_chained_actions:D}),checkedChildren:"On",unCheckedChildren:"Off"})}),A(on,{title:"Allow actions within scripts/automations to run if the parent script/automation was allowed",children:A("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Allow Chained Actions"})}),v&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Actions in allowed scripts/automations bypass RBAC"})]})]})}),A($a,{size:"small",style:{marginTop:"16px"},children:[A(an.Title,{level:5,style:{marginBottom:"16px"},children:"RBAC Status Sensors"}),A("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[A("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[A("span",{style:{fontSize:"16px"},children:"⏰"}),A("div",{children:[A(an.Text,{strong:!0,children:"Last Rejection"}),A("br",{}),A(an.Text,{type:"secondary",children:((ue=M.last_rejection)==null?void 0:ue.state)||"Never"})]})]}),A("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[A("span",{style:{fontSize:"16px"},children:"👤"}),A("div",{children:[A(an.Text,{strong:!0,children:"Last User Rejected"}),A("br",{}),A(an.Text,{type:"secondary",children:((de=M.last_user_rejected)==null?void 0:de.state)||"None"})]})]}),A("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[A("span",{style:{fontSize:"16px"},children:"🌐"}),A("div",{children:[A(an.Text,{strong:!0,children:"Config URL"}),A("br",{}),A(an.Text,{type:"secondary",style:{fontSize:"12px"},children:"/api/rbac/static/config.html"})]})]})]})]})]},"settings"),A(Js.Panel,{header:"Default Restrictions",children:A(jY,{data:E,onSuccess:re,onError:J,onDataChange:k})},"defaultRestrictions"),A(Js.Panel,{header:"Roles Management",children:A(LY,{data:E,onSuccess:re,onError:J,onDataChange:k})},"rolesManagement"),A(Js.Panel,{header:"User Role Assignments",children:A(DY,{data:E,onSuccess:re,onError:J,onDataChange:k,isDarkMode:P})},"userAssignments")]})]})}),A(HY,{visible:S,onClose:()=>x(!1)}),A(SK,{visible:$,onClose:()=>C(!1),onSuccess:()=>{j()}})]})}gs(A(wK,{}),document.getElementById("app")); diff --git a/frontend/src/components/App.jsx b/frontend/src/components/App.jsx index 7fc0e5a..c8b6d97 100644 --- a/frontend/src/components/App.jsx +++ b/frontend/src/components/App.jsx @@ -121,10 +121,7 @@ export function App() { } else { setLoading(true); } - console.log('Starting to load data...'); - const auth = await getHAAuth(); - console.log('Auth result:', auth); if (!auth) { setIsAuthenticated(false); @@ -143,7 +140,6 @@ export function App() { setSensors(sensorsData); } - console.log('Making API calls...'); const [usersRes, domainsRes, entitiesRes, servicesRes, configRes] = await Promise.all([ makeAuthenticatedRequest('/api/rbac/users'), makeAuthenticatedRequest('/api/rbac/domains'), @@ -152,8 +148,6 @@ export function App() { makeAuthenticatedRequest('/api/rbac/config') ]); - console.log('API responses:', { usersRes, domainsRes, entitiesRes, servicesRes, configRes }); - // Check for admin access denied (403) if (usersRes.status === 403 || domainsRes.status === 403 || entitiesRes.status === 403 || servicesRes.status === 403 || configRes.status === 403) { @@ -201,7 +195,6 @@ export function App() { configRes.json() ]); - console.log('Loaded data:', { users, domains, entities, services, config }); setData({ users, domains, entities, services, config }); setIntegrationConfigured(true); @@ -343,7 +336,6 @@ export function App() { if (response.ok) { const userData = await response.json(); - console.log('Current user data received:', userData); return userData; } return null; @@ -908,7 +900,7 @@ export function App() { {frontendBlocking && ( - Add frontend script to www/community/rbac/rbac.js + Add frontend script to /api/rbac/static/rbac.js )} @@ -1054,6 +1046,7 @@ export function App() { data={data} onSuccess={showSuccess} onError={showError} + onDataChange={setData} /> diff --git a/frontend/src/components/DefaultRestrictions.jsx b/frontend/src/components/DefaultRestrictions.jsx index bbe5e21..7384a90 100644 --- a/frontend/src/components/DefaultRestrictions.jsx +++ b/frontend/src/components/DefaultRestrictions.jsx @@ -5,178 +5,169 @@ import { Button, Space, Row, - Col + Col, + Select } from 'antd'; -import { AntMultiSelect } from './AntMultiSelect'; +import { EditOutlined } from '@ant-design/icons'; +import { makeAuthenticatedRequest, getHAAuth } from '../utils/auth'; +import { RoleEditModal } from './RoleEditModal'; -export function DefaultRestrictions({ data, onSuccess, onError }) { +export function DefaultRestrictions({ data, onSuccess, onError, onDataChange }) { const [loading, setLoading] = useState(false); - const [restrictions, setRestrictions] = useState({ - domains: [], - entities: [] - }); + const [defaultRole, setDefaultRole] = useState('none'); + const [editingRole, setEditingRole] = useState(null); + const [editingRoleData, setEditingRoleData] = useState(null); - // Initialize restrictions from config + // Initialize default role from config useEffect(() => { - if (data.config?.default_restrictions) { - const defaultRestrictions = data.config.default_restrictions; - setRestrictions({ - domains: Object.keys(defaultRestrictions.domains || {}), - entities: Object.keys(defaultRestrictions.entities || {}) - }); + if (data.config?.default_role !== undefined) { + setDefaultRole(data.config.default_role || 'none'); } }, [data.config]); - const handleSave = async () => { + const handleRoleChange = async (newRole) => { + // Handle clear button (X) - convert undefined to 'none' + const roleToSave = newRole === undefined ? 'none' : newRole; + setLoading(true); try { - const auth = await getHAAuth(); - if (!auth) { - throw new Error('Not authenticated with Home Assistant'); - } - - // Convert restrictions to the expected format - const defaultRestrictions = { - domains: {}, - entities: {}, - services: {} - }; - - // Add domain restrictions - restrictions.domains.forEach(domain => { - defaultRestrictions.domains[domain] = { - hide: true, - services: [] - }; - }); - - // Add entity restrictions - restrictions.entities.forEach(entity => { - defaultRestrictions.entities[entity] = { - hide: true, - services: [] - }; - }); - - const response = await fetch('/api/rbac/config', { + const response = await makeAuthenticatedRequest('/api/rbac/config', { method: 'POST', - headers: { - 'Authorization': `Bearer ${auth.access_token}`, - 'Content-Type': 'application/json', - }, body: JSON.stringify({ - action: 'update_default_restrictions', - restrictions: defaultRestrictions + action: 'update_default_role', + default_role: roleToSave }) }); if (!response.ok) { - throw new Error('Failed to save default restrictions'); + throw new Error('Failed to save default role'); } - onSuccess('Default restrictions saved successfully!'); + setDefaultRole(roleToSave); + onSuccess('Default role saved successfully!'); } catch (error) { - console.error('Error saving default restrictions:', error); + console.error('Error saving default role:', error); onError(error.message); } finally { setLoading(false); } }; - const getHAAuth = async () => { - try { - // Try to get hass object from Home Assistant context - const hass = getHassObject(); - if (hass && hass.auth) { - if (hass.auth.data && hass.auth.data.access_token) { - return { - access_token: hass.auth.data.access_token, - token_type: 'Bearer' - }; - } - if (hass.auth.access_token) { - return { - access_token: hass.auth.access_token, - token_type: 'Bearer' - }; - } - } - - // Try localStorage/sessionStorage - const auth = localStorage.getItem('hassTokens') || sessionStorage.getItem('hassTokens'); - if (auth) { - const tokens = JSON.parse(auth); - return { - access_token: tokens.access_token, - token_type: 'Bearer' - }; + const getAvailableRoles = () => { + const roles = Object.keys(data.config?.roles || {}); + // Add default roles if they don't exist + if (!roles.includes('admin')) roles.unshift('admin'); + if (!roles.includes('user')) roles.push('user'); + if (!roles.includes('guest')) roles.push('guest'); + roles.unshift('none'); + return roles; + }; + + const handleEditRole = () => { + if (defaultRole && defaultRole !== 'none') { + const role = data.config?.roles?.[defaultRole]; + if (role) { + setEditingRole(defaultRole); + setEditingRoleData(role); } - - return null; - } catch (error) { - console.error('Auth error:', error); - return null; } }; - const getHassObject = () => { + const closeRoleModal = () => { + setEditingRole(null); + setEditingRoleData(null); + }; + + const handleSaveRole = async (saveData) => { + setLoading(true); try { - const homeAssistantElement = document.querySelector("home-assistant"); - if (homeAssistantElement && homeAssistantElement.hass) { - return homeAssistantElement.hass; - } - if (window.hass) { - return window.hass; + const response = await makeAuthenticatedRequest('/api/rbac/config', { + method: 'POST', + body: JSON.stringify({ + action: 'update_role', + roleName: saveData.roleName, + roleConfig: saveData.roleData + }) + }); + + if (!response.ok) { + throw new Error('Failed to save role'); } - if (window.parent && window.parent !== window && window.parent.hass) { - return window.parent.hass; + + // Update local data + const updatedConfig = { ...data.config }; + if (!updatedConfig.roles) { + updatedConfig.roles = {}; } - return null; + updatedConfig.roles[saveData.roleName] = saveData.roleData; + + onDataChange({ + ...data, + config: updatedConfig + }); + + closeRoleModal(); + onSuccess(`Role "${saveData.roleName}" updated successfully!`); } catch (error) { - console.error('Error getting hass object:', error); - return null; + console.error('Error saving role:', error); + onError(error.message); + } finally { + setLoading(false); } }; - return (
- Configure global restrictions applied to all users. + Configure the default role that will be applied to users who have no specific role assigned or have the "Default" role assigned. - setRestrictions(prev => ({ ...prev, domains }))} - placeholder="Select domains to restrict..." - disabled={loading} - /> - - - - setRestrictions(prev => ({ ...prev, entities }))} - placeholder="Select entities to restrict..." - disabled={loading} - /> + + Default Role + + + + {defaultRole && defaultRole !== 'none' && ( + - + + {/* Role Edit Modal */} +
); } diff --git a/frontend/src/components/Header.jsx b/frontend/src/components/Header.jsx index 5df89b2..7a48d4f 100644 --- a/frontend/src/components/Header.jsx +++ b/frontend/src/components/Header.jsx @@ -15,22 +15,17 @@ export function Header({ currentUser = null, isDarkMode = false, onThemeToggle } }; const getUserPicture = (user) => { - console.log('Header getUserPicture called with user:', user); - // Use the entity_picture from the person entity if available if (user?.entity_picture) { - console.log('Using entity_picture:', user.entity_picture); return user.entity_picture; } // Fallback: construct URL from user ID (for backwards compatibility) if (user?.id) { const fallbackUrl = `/api/image/serve/${user.id}/512x512`; - console.log('Using fallback URL:', fallbackUrl); return fallbackUrl; } - console.log('No picture available for user'); return null; }; diff --git a/frontend/src/components/RoleEditModal.jsx b/frontend/src/components/RoleEditModal.jsx index 930392b..f1e0723 100644 --- a/frontend/src/components/RoleEditModal.jsx +++ b/frontend/src/components/RoleEditModal.jsx @@ -3,6 +3,7 @@ import { Modal, Form, Input, Button, Space, Row, Col, Select, InputNumber, Switc import { PlusOutlined, DeleteOutlined, CheckOutlined, CloseOutlined, ExclamationOutlined, ToolOutlined, CodeOutlined, DownOutlined } from '@ant-design/icons'; import CodeMirror from '@uiw/react-codemirror'; import { javascript } from '@codemirror/lang-javascript'; +import { getHAAuth } from '../utils/auth'; const { TextArea } = Input; const { Text } = Typography; @@ -279,32 +280,6 @@ export function RoleEditModal({ return services.entities?.[entity] || []; }; - const getHAAuth = async () => { - try { - const homeAssistantElement = document.querySelector("home-assistant"); - if (homeAssistantElement && homeAssistantElement.hass) { - const hass = homeAssistantElement.hass; - if (hass.auth?.data?.access_token) { - return { access_token: hass.auth.data.access_token }; - } - if (hass.auth?.access_token) { - return { access_token: hass.auth.access_token }; - } - } - - const auth = localStorage.getItem('hassTokens') || sessionStorage.getItem('hassTokens'); - if (auth) { - const tokens = JSON.parse(auth); - return { access_token: tokens.access_token }; - } - - return null; - } catch (error) { - console.error('Auth error:', error); - return null; - } - }; - const handleOpenHAEditor = () => { // Get the current domain and redirect to HA template editor const currentUrl = window.location.href; diff --git a/frontend/src/components/RolesManagement.jsx b/frontend/src/components/RolesManagement.jsx index 6666a3e..f343ef2 100644 --- a/frontend/src/components/RolesManagement.jsx +++ b/frontend/src/components/RolesManagement.jsx @@ -12,6 +12,7 @@ import { } from 'antd'; import { PlusOutlined, EditOutlined, DeleteOutlined, CodeOutlined } from '@ant-design/icons'; import { RoleEditModal } from './RoleEditModal'; +import { getHAAuth, makeAuthenticatedRequest } from '../utils/auth'; export function RolesManagement({ data, onSuccess, onError, onDataChange }) { const [loading, setLoading] = useState(false); @@ -27,59 +28,6 @@ export function RolesManagement({ data, onSuccess, onError, onDataChange }) { } }, [data.config]); - const getHAAuth = async () => { - try { - const hass = getHassObject(); - if (hass && hass.auth) { - if (hass.auth.data && hass.auth.data.access_token) { - return { - access_token: hass.auth.data.access_token, - token_type: 'Bearer' - }; - } - if (hass.auth.access_token) { - return { - access_token: hass.auth.access_token, - token_type: 'Bearer' - }; - } - } - - const auth = localStorage.getItem('hassTokens') || sessionStorage.getItem('hassTokens'); - if (auth) { - const tokens = JSON.parse(auth); - return { - access_token: tokens.access_token, - token_type: 'Bearer' - }; - } - - return null; - } catch (error) { - console.error('Auth error:', error); - return null; - } - }; - - const getHassObject = () => { - try { - const homeAssistantElement = document.querySelector("home-assistant"); - if (homeAssistantElement && homeAssistantElement.hass) { - return homeAssistantElement.hass; - } - if (window.hass) { - return window.hass; - } - if (window.parent && window.parent !== window && window.parent.hass) { - return window.parent.hass; - } - return null; - } catch (error) { - console.error('Error getting hass object:', error); - return null; - } - }; - const handleCreateRole = () => { setShowCreateModal(true); }; @@ -87,17 +35,8 @@ export function RolesManagement({ data, onSuccess, onError, onDataChange }) { const handleDeleteRole = async (roleName) => { setLoading(true); try { - const auth = await getHAAuth(); - if (!auth) { - throw new Error('Not authenticated with Home Assistant'); - } - - const response = await fetch('/api/rbac/config', { + const response = await makeAuthenticatedRequest('/api/rbac/config', { method: 'POST', - headers: { - 'Authorization': `Bearer ${auth.access_token}`, - 'Content-Type': 'application/json', - }, body: JSON.stringify({ action: 'delete_role', roleName: roleName @@ -151,21 +90,12 @@ export function RolesManagement({ data, onSuccess, onError, onDataChange }) { const handleSaveRole = async (saveData) => { setLoading(true); try { - const auth = await getHAAuth(); - if (!auth) { - throw new Error('Not authenticated with Home Assistant'); - } - // Extract role name and data const { roleName: newRoleName, roleData } = saveData; const targetRoleName = newRoleName || editingRole; - const response = await fetch('/api/rbac/config', { + const response = await makeAuthenticatedRequest('/api/rbac/config', { method: 'POST', - headers: { - 'Authorization': `Bearer ${auth.access_token}`, - 'Content-Type': 'application/json', - }, body: JSON.stringify({ action: 'update_role', roleName: targetRoleName, @@ -204,20 +134,11 @@ export function RolesManagement({ data, onSuccess, onError, onDataChange }) { const handleCreateRoleSave = async (saveData) => { setLoading(true); try { - const auth = await getHAAuth(); - if (!auth) { - throw new Error('Not authenticated with Home Assistant'); - } - // Extract role name and data from saveData const { roleName, roleData } = saveData; - const response = await fetch('/api/rbac/config', { + const response = await makeAuthenticatedRequest('/api/rbac/config', { method: 'POST', - headers: { - 'Authorization': `Bearer ${auth.access_token}`, - 'Content-Type': 'application/json', - }, body: JSON.stringify({ action: 'update_role', roleName: roleName, diff --git a/frontend/src/components/UserAssignments.jsx b/frontend/src/components/UserAssignments.jsx index 252a15e..f6169af 100644 --- a/frontend/src/components/UserAssignments.jsx +++ b/frontend/src/components/UserAssignments.jsx @@ -9,9 +9,15 @@ import { Select, Tag, Button, - Divider + Divider, + Modal, + Input, + List, + Spin, + Tooltip, + Pagination } from 'antd'; -import { EditOutlined } from '@ant-design/icons'; +import { EditOutlined, EyeOutlined } from '@ant-design/icons'; import { RoleEditModal } from './RoleEditModal'; import { getHAAuth, makeAuthenticatedRequest } from '../utils/auth'; @@ -20,6 +26,14 @@ export function UserAssignments({ data, onSuccess, onError, onDataChange, isDark const [userRoles, setUserRoles] = useState({}); const [editingRole, setEditingRole] = useState(null); const [editingRoleData, setEditingRoleData] = useState(null); + const [entityModalVisible, setEntityModalVisible] = useState(false); + const [selectedUser, setSelectedUser] = useState(null); + const [accessibleEntities, setAccessibleEntities] = useState([]); + const [filteredEntities, setFilteredEntities] = useState([]); + const [searchTerm, setSearchTerm] = useState(''); + const [loadingEntities, setLoadingEntities] = useState(false); + const [currentPage, setCurrentPage] = useState(1); + const [pageSize] = useState(15); // Initialize user roles from config useEffect(() => { @@ -106,6 +120,8 @@ export function UserAssignments({ data, onSuccess, onError, onDataChange, isDark if (!roles.includes('admin')) roles.unshift('admin'); if (!roles.includes('user')) roles.push('user'); if (!roles.includes('guest')) roles.push('guest'); + // Add "Default" option + roles.unshift('default'); return roles; }; @@ -146,6 +162,108 @@ export function UserAssignments({ data, onSuccess, onError, onDataChange, isDark setEditingRoleData(null); }; + const handleViewEntities = async (user) => { + setSelectedUser(user); + setEntityModalVisible(true); + setLoadingEntities(true); + setSearchTerm(''); + + try { + // Get accessible entities using the existing RBAC frontend blocking API + const response = await makeAuthenticatedRequest(`/api/rbac/frontend-blocking?user_id=${user.id}`, { + method: 'GET' + }); + + if (!response.ok) { + throw new Error('Failed to fetch accessible entities'); + } + + const blockingData = await response.json(); + + // Get all entities from Home Assistant + const hassResponse = await makeAuthenticatedRequest('/api/states', { + method: 'GET' + }); + + if (!hassResponse.ok) { + throw new Error('Failed to fetch entities'); + } + + const allEntities = await hassResponse.json(); + + let accessible = []; + + if (blockingData.enabled) { + accessible = allEntities.filter(entity => { + const entityId = entity.entity_id; + const domain = entityId.split('.')[0]; + + if (blockingData.entities && blockingData.entities.includes(entityId)) { + return false; + } + + if (blockingData.allowed_entities && blockingData.allowed_entities.includes(entityId)) { + return true; + } + + if (blockingData.allowed_domains && blockingData.allowed_domains.includes(domain)) { + return true; + } + + return true; + }); + } else { + accessible = allEntities; + } + + setAccessibleEntities(accessible); + setFilteredEntities(accessible); + + } catch (error) { + console.error('Error fetching accessible entities:', error); + onError('Failed to load accessible entities'); + setAccessibleEntities([]); + setFilteredEntities([]); + } finally { + setLoadingEntities(false); + } + }; + + const handleSearchChange = (e) => { + const term = e.target.value.toLowerCase(); + setSearchTerm(term); + setCurrentPage(1); // Reset to first page when searching + + if (!term) { + setFilteredEntities(accessibleEntities); + } else { + const filtered = accessibleEntities.filter(entity => + entity.attributes.friendly_name?.toLowerCase().includes(term) || + entity.entity_id.toLowerCase().includes(term) + ); + setFilteredEntities(filtered); + } + }; + + const handlePageChange = (page) => { + setCurrentPage(page); + }; + + const getCurrentPageEntities = () => { + const startIndex = (currentPage - 1) * pageSize; + const endIndex = startIndex + pageSize; + return filteredEntities.slice(startIndex, endIndex); + }; + + const closeEntityModal = () => { + setEntityModalVisible(false); + setSelectedUser(null); + setAccessibleEntities([]); + setFilteredEntities([]); + setSearchTerm(''); + setCurrentPage(1); + }; + return (