diff --git a/.dev_session/SESSION_INFO b/.dev_session/SESSION_INFO index d1b33a01..9371c096 100644 --- a/.dev_session/SESSION_INFO +++ b/.dev_session/SESSION_INFO @@ -1 +1 @@ -{"task_id": "2ff88f42-8544-8050-8245-c3bb852058f4", "token": "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", "session_start_time": "2026-02-23T13:57:05.351873"} \ No newline at end of file +{"task_id": "31188f42-8544-80f0-b21a-c6beaa9ea3a1", "token": "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", "session_start_time": "2026-02-24T06:47:22.751414"} \ No newline at end of file diff --git a/check_matrix.py b/check_matrix.py new file mode 100644 index 00000000..bc8f397b --- /dev/null +++ b/check_matrix.py @@ -0,0 +1,25 @@ +import os +import sys + +# Add the company-explorer directory to the Python path +sys.path.append(os.path.abspath(os.path.join(os.getcwd(), 'company-explorer'))) + +from backend.database import SessionLocal, MarketingMatrix, Industry, Persona +import json + +db = SessionLocal() +try: + count = db.query(MarketingMatrix).count() + print(f"MarketingMatrix count: {count}") + + if count > 0: + first = db.query(MarketingMatrix).first() + print(f"First entry: ID={first.id}, Industry={first.industry_id}, Persona={first.persona_id}") + else: + print("MarketingMatrix is empty.") + # Check if we have industries and personas + ind_count = db.query(Industry).count() + pers_count = db.query(Persona).count() + print(f"Industries: {ind_count}, Personas: {pers_count}") +finally: + db.close() \ No newline at end of file diff --git a/company-explorer/__init__.py b/company-explorer/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/company-explorer/backend/app.py b/company-explorer/backend/app.py index 1706c1bb..a09cff67 100644 --- a/company-explorer/backend/app.py +++ b/company-explorer/backend/app.py @@ -32,11 +32,12 @@ setup_logging() import logging logger = logging.getLogger(__name__) -from .database import init_db, get_db, Company, Signal, EnrichmentData, RoboticsCategory, Contact, Industry, JobRoleMapping, ReportedMistake, MarketingMatrix, Persona, RawJobTitle +from .database import init_db, get_db, Company, Signal, EnrichmentData, RoboticsCategory, Contact, Industry, JobRolePattern, ReportedMistake, MarketingMatrix, Persona, RawJobTitle from .services.deduplication import Deduplicator from .services.discovery import DiscoveryService from .services.scraping import ScraperService from .services.classification import ClassificationService +from .services.role_mapping import RoleMappingService # Initialize App app = FastAPI( @@ -119,6 +120,25 @@ class IndustryDetails(BaseModel): class Config: from_attributes = True +class MarketingMatrixUpdate(BaseModel): + subject: Optional[str] = None + intro: Optional[str] = None + social_proof: Optional[str] = None + +class MarketingMatrixResponse(BaseModel): + id: int + industry_id: int + persona_id: int + industry_name: str + persona_name: str + subject: Optional[str] = None + intro: Optional[str] = None + social_proof: Optional[str] = None + updated_at: datetime + + class Config: + from_attributes = True + class ContactResponse(BaseModel): id: int first_name: Optional[str] = None @@ -314,23 +334,21 @@ def provision_superoffice_contact( logger.info(f"Created new person {req.so_person_id} for company {company.name}") # Update Job Title & Role logic - if req.job_title: + if req.job_title and req.job_title != person.job_title: person.job_title = req.job_title - # Simple classification fallback - mappings = db.query(JobRoleMapping).all() - found_role = None - for m in mappings: - pattern_clean = m.pattern.replace("%", "").lower() - if pattern_clean in req.job_title.lower(): - found_role = m.role - break + # New, service-based classification + role_mapping_service = RoleMappingService(db) + found_role = role_mapping_service.get_role_for_job_title(req.job_title) - # ALWAYS update role, even if to None, to avoid 'sticking' old roles if found_role != person.role: - logger.info(f"Role Change for {person.so_person_id}: {person.role} -> {found_role}") + logger.info(f"Role Change for {person.so_person_id} via Mapping Service: {person.role} -> {found_role}") person.role = found_role + if not found_role: + # If no role was found, we log it for future pattern mining + role_mapping_service.add_or_update_unclassified_title(req.job_title) + db.commit() db.refresh(person) @@ -429,6 +447,8 @@ def export_companies_csv(db: Session = Depends(get_db), username: str = Depends( from fastapi.responses import StreamingResponse output = io.StringIO() + # Add UTF-8 BOM for Excel + output.write('\ufeff') writer = csv.writer(output) # Header @@ -567,7 +587,229 @@ def list_industries(db: Session = Depends(get_db), username: str = Depends(authe @app.get("/api/job_roles") def list_job_roles(db: Session = Depends(get_db), username: str = Depends(authenticate_user)): - return db.query(JobRoleMapping).order_by(JobRoleMapping.pattern.asc()).all() + return db.query(JobRolePattern).order_by(JobRolePattern.priority.asc()).all() + +# --- Marketing Matrix Endpoints --- + +@app.get("/api/matrix", response_model=List[MarketingMatrixResponse]) +def get_marketing_matrix( + industry_id: Optional[int] = Query(None), + persona_id: Optional[int] = Query(None), + db: Session = Depends(get_db), + username: str = Depends(authenticate_user) +): + query = db.query(MarketingMatrix).options( + joinedload(MarketingMatrix.industry), + joinedload(MarketingMatrix.persona) + ) + + if industry_id: + query = query.filter(MarketingMatrix.industry_id == industry_id) + if persona_id: + query = query.filter(MarketingMatrix.persona_id == persona_id) + + entries = query.all() + + # Map to response model + return [ + MarketingMatrixResponse( + id=e.id, + industry_id=e.industry_id, + persona_id=e.persona_id, + industry_name=e.industry.name if e.industry else "Unknown", + persona_name=e.persona.name if e.persona else "Unknown", + subject=e.subject, + intro=e.intro, + social_proof=e.social_proof, + updated_at=e.updated_at + ) for e in entries + ] + +@app.get("/api/matrix/export") +def export_matrix_csv( + industry_id: Optional[int] = Query(None), + persona_id: Optional[int] = Query(None), + db: Session = Depends(get_db), + username: str = Depends(authenticate_user) +): + """ + Exports a CSV of the marketing matrix, optionally filtered. + """ + import io + import csv + from fastapi.responses import StreamingResponse + + query = db.query(MarketingMatrix).options( + joinedload(MarketingMatrix.industry), + joinedload(MarketingMatrix.persona) + ) + + if industry_id: + query = query.filter(MarketingMatrix.industry_id == industry_id) + if persona_id: + query = query.filter(MarketingMatrix.persona_id == persona_id) + + entries = query.all() + + output = io.StringIO() + # Add UTF-8 BOM for Excel + output.write('\ufeff') + writer = csv.writer(output) + + # Header + writer.writerow([ + "ID", "Industry", "Persona", "Subject", "Intro", "Social Proof", "Last Updated" + ]) + + for e in entries: + writer.writerow([ + e.id, + e.industry.name if e.industry else "Unknown", + e.persona.name if e.persona else "Unknown", + e.subject, + e.intro, + e.social_proof, + e.updated_at.strftime('%Y-%m-%d %H:%M:%S') if e.updated_at else "-" + ]) + + output.seek(0) + + filename = f"marketing_matrix_{datetime.utcnow().strftime('%Y-%m-%d')}.csv" + return StreamingResponse( + output, + media_type="text/csv", + headers={"Content-Disposition": f"attachment; filename={filename}"} + ) + +@app.put("/api/matrix/{entry_id}", response_model=MarketingMatrixResponse) +def update_matrix_entry( + entry_id: int, + data: MarketingMatrixUpdate, + db: Session = Depends(get_db), + username: str = Depends(authenticate_user) +): + entry = db.query(MarketingMatrix).options( + joinedload(MarketingMatrix.industry), + joinedload(MarketingMatrix.persona) + ).filter(MarketingMatrix.id == entry_id).first() + + if not entry: + raise HTTPException(status_code=404, detail="Matrix entry not found") + + if data.subject is not None: + entry.subject = data.subject + if data.intro is not None: + entry.intro = data.intro + if data.social_proof is not None: + entry.social_proof = data.social_proof + + entry.updated_at = datetime.utcnow() + db.commit() + db.refresh(entry) + + return MarketingMatrixResponse( + id=entry.id, + industry_id=entry.industry_id, + persona_id=entry.persona_id, + industry_name=entry.industry.name if entry.industry else "Unknown", + persona_name=entry.persona.name if entry.persona else "Unknown", + subject=entry.subject, + intro=entry.intro, + social_proof=entry.social_proof, + updated_at=entry.updated_at + ) + +@app.get("/api/matrix/personas") +def list_personas(db: Session = Depends(get_db), username: str = Depends(authenticate_user)): + return db.query(Persona).all() + +class JobRolePatternCreate(BaseModel): + pattern_type: str + pattern_value: str + role: str + priority: int = 100 + +class JobRolePatternResponse(BaseModel): + id: int + pattern_type: str + pattern_value: str + role: str + priority: int + is_active: bool + created_by: str + created_at: datetime + updated_at: datetime + + class Config: + from_attributes = True + +class ClassificationResponse(BaseModel): + status: str + processed: int + new_patterns: int + +@app.post("/api/job_roles", response_model=JobRolePatternResponse) +def create_job_role( + job_role: JobRolePatternCreate, + db: Session = Depends(get_db), + username: str = Depends(authenticate_user) +): + db_job_role = JobRolePattern( + pattern_type=job_role.pattern_type, + pattern_value=job_role.pattern_value, + role=job_role.role, + priority=job_role.priority, + created_by="user" + ) + db.add(db_job_role) + db.commit() + db.refresh(db_job_role) + return db_job_role + +@app.put("/api/job_roles/{role_id}", response_model=JobRolePatternResponse) +def update_job_role( + role_id: int, + job_role: JobRolePatternCreate, + db: Session = Depends(get_db), + username: str = Depends(authenticate_user) +): + db_job_role = db.query(JobRolePattern).filter(JobRolePattern.id == role_id).first() + if not db_job_role: + raise HTTPException(status_code=404, detail="Job role not found") + + db_job_role.pattern_type = job_role.pattern_type + db_job_role.pattern_value = job_role.pattern_value + db_job_role.role = job_role.role + db_job_role.priority = job_role.priority + db_job_role.updated_at = datetime.utcnow() + db.commit() + db.refresh(db_job_role) + return db_job_role + +@app.delete("/api/job_roles/{role_id}") +def delete_job_role( + role_id: int, + db: Session = Depends(get_db), + username: str = Depends(authenticate_user) +): + db_job_role = db.query(JobRolePattern).filter(JobRolePattern.id == role_id).first() + if not db_job_role: + raise HTTPException(status_code=404, detail="Job role not found") + + db.delete(db_job_role) + db.commit() + return {"status": "deleted"} + +@app.post("/api/job_roles/classify-batch", response_model=ClassificationResponse) +def classify_batch_job_roles( + background_tasks: BackgroundTasks, + username: str = Depends(authenticate_user) +): + """ + Triggers a background task to classify all unmapped job titles from the inbox. + """ + background_tasks.add_task(run_batch_classification_task) + return {"status": "queued", "processed": 0, "new_patterns": 0} @app.get("/api/job_roles/raw") def list_raw_job_titles( @@ -947,6 +1189,66 @@ def run_analysis_task(company_id: int): finally: db.close() +def run_batch_classification_task(): + from .database import SessionLocal + from .lib.core_utils import call_gemini_flash + import json + + db = SessionLocal() + logger.info("--- [BACKGROUND TASK] Starting Batch Job Title Classification ---") + BATCH_SIZE = 50 + + try: + personas = db.query(Persona).all() + available_roles = [p.name for p in personas] + if not available_roles: + logger.error("No Personas found. Aborting classification task.") + return + + unmapped_titles = db.query(RawJobTitle).filter(RawJobTitle.is_mapped == False).all() + if not unmapped_titles: + logger.info("No unmapped titles to process.") + return + + logger.info(f"Found {len(unmapped_titles)} unmapped titles. Processing in batches of {BATCH_SIZE}.") + + for i in range(0, len(unmapped_titles), BATCH_SIZE): + batch = unmapped_titles[i:i + BATCH_SIZE] + title_strings = [item.title for item in batch] + + prompt = f'''You are an expert in B2B contact segmentation. Classify the following job titles into one of the provided roles: {', '.join(available_roles)}. Respond ONLY with a valid JSON object mapping the title to the role. Use "Influencer" as a fallback. Titles: {json.dumps(title_strings)}''' + + response_text = "" + try: + response_text = call_gemini_flash(prompt, json_mode=True) + if response_text.strip().startswith("```json"): + response_text = response_text.strip()[7:-4] + classifications = json.loads(response_text) + except Exception as e: + logger.error(f"LLM response error for batch, skipping. Error: {e}. Response: {response_text}") + continue + + new_patterns = 0 + for title_obj in batch: + original_title = title_obj.title + assigned_role = classifications.get(original_title) + + if assigned_role and assigned_role in available_roles: + if not db.query(JobRolePattern).filter(JobRolePattern.pattern_value == original_title).first(): + db.add(JobRolePattern(pattern_type='exact', pattern_value=original_title, role=assigned_role, priority=90, created_by='llm_batch')) + new_patterns += 1 + title_obj.is_mapped = True + + db.commit() + logger.info(f"Batch {i//BATCH_SIZE + 1} complete. Created {new_patterns} new patterns.") + + except Exception as e: + logger.critical(f"--- [BACKGROUND TASK] CRITICAL ERROR during classification ---", exc_info=True) + db.rollback() + finally: + db.close() + logger.info("--- [BACKGROUND TASK] Finished Batch Job Title Classification ---") + # --- Serve Frontend --- static_path = "/frontend_static" if not os.path.exists(static_path): diff --git a/company-explorer/backend/database.py b/company-explorer/backend/database.py index 16318934..7c60d212 100644 --- a/company-explorer/backend/database.py +++ b/company-explorer/backend/database.py @@ -157,17 +157,24 @@ class Industry(Base): created_at = Column(DateTime, default=datetime.utcnow) -class JobRoleMapping(Base): +class JobRolePattern(Base): """ - Maps job title patterns (regex or simple string) to Roles. + Maps job title patterns (regex or exact string) to internal Roles. """ - __tablename__ = "job_role_mappings" + __tablename__ = "job_role_patterns" id = Column(Integer, primary_key=True, index=True) - pattern = Column(String, unique=True) # e.g. "%CTO%" or "Technischer Leiter" - role = Column(String) # The target Role + + pattern_type = Column(String, default="exact", index=True) # 'exact' or 'regex' + pattern_value = Column(String, unique=True) # e.g. "Technischer Leiter" or "(?i)leiter.*technik" + role = Column(String, index=True) # The target Role, maps to Persona.name + priority = Column(Integer, default=100) # Lower number means higher priority + + is_active = Column(Boolean, default=True) + created_by = Column(String, default="system") # 'system', 'user', 'llm' created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow) class RawJobTitle(Base): """ @@ -196,7 +203,7 @@ class Persona(Base): __tablename__ = "personas" id = Column(Integer, primary_key=True, index=True) - name = Column(String, unique=True, index=True) # Matches the 'role' string in JobRoleMapping + name = Column(String, unique=True, index=True) # Matches the 'role' string in JobRolePattern pains = Column(Text, nullable=True) # JSON list or multiline string gains = Column(Text, nullable=True) # JSON list or multiline string diff --git a/company-explorer/backend/scripts/__init__.py b/company-explorer/backend/scripts/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/company-explorer/backend/scripts/check_mappings.py b/company-explorer/backend/scripts/check_mappings.py index 55657337..65be09b4 100644 --- a/company-explorer/backend/scripts/check_mappings.py +++ b/company-explorer/backend/scripts/check_mappings.py @@ -5,14 +5,14 @@ import os # Setup Environment sys.path.append(os.path.join(os.path.dirname(__file__), "../../")) -from backend.database import SessionLocal, JobRoleMapping +from backend.database import SessionLocal, JobRolePattern def check_mappings(): db = SessionLocal() - count = db.query(JobRoleMapping).count() - print(f"Total JobRoleMappings: {count}") + count = db.query(JobRolePattern).count() + print(f"Total JobRolePatterns: {count}") - examples = db.query(JobRoleMapping).limit(5).all() + examples = db.query(JobRolePattern).limit(5).all() for ex in examples: print(f" - {ex.pattern} -> {ex.role}") diff --git a/company-explorer/backend/scripts/classify_unmapped_titles.py b/company-explorer/backend/scripts/classify_unmapped_titles.py new file mode 100644 index 00000000..a09a3631 --- /dev/null +++ b/company-explorer/backend/scripts/classify_unmapped_titles.py @@ -0,0 +1,171 @@ +import sys +import os +import argparse +import json +import logging +from sqlalchemy.orm import sessionmaker, declarative_base +from sqlalchemy import create_engine, Column, Integer, String, Boolean, DateTime +from datetime import datetime + +# --- Standalone Configuration --- +# Add the project root to the Python path to find the LLM utility +sys.path.insert(0, '/app') +from company_explorer.backend.lib.core_utils import call_gemini_flash + +DATABASE_URL = "sqlite:////app/companies_v3_fixed_2.db" +LOG_FILE = "/app/Log_from_docker/batch_classifier.log" +BATCH_SIZE = 50 # Number of titles to process in one LLM call + +# --- Logging Setup --- +os.makedirs(os.path.dirname(LOG_FILE), exist_ok=True) +logging.basicConfig( + level=logging.INFO, + format='%(asctime)s - %(levelname)s - %(message)s', + handlers=[ + logging.FileHandler(LOG_FILE), + logging.StreamHandler() + ] +) +logger = logging.getLogger(__name__) + +# --- SQLAlchemy Models (self-contained) --- +Base = declarative_base() + +class RawJobTitle(Base): + __tablename__ = 'raw_job_titles' + id = Column(Integer, primary_key=True) + title = Column(String, unique=True, index=True) + count = Column(Integer, default=1) + source = Column(String) + is_mapped = Column(Boolean, default=False) + created_at = Column(DateTime, default=datetime.now) + updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now) + +class JobRolePattern(Base): + __tablename__ = "job_role_patterns" + id = Column(Integer, primary_key=True, index=True) + pattern_type = Column(String, default="exact", index=True) + pattern_value = Column(String, unique=True) + role = Column(String, index=True) + priority = Column(Integer, default=100) + is_active = Column(Boolean, default=True) + created_by = Column(String, default="system") + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow) + +class Persona(Base): + __tablename__ = "personas" + id = Column(Integer, primary_key=True, index=True) + name = Column(String, unique=True, index=True) + pains = Column(String) + gains = Column(String) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow) + +# --- Database Connection --- +engine = create_engine(DATABASE_URL) +SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) + +def build_classification_prompt(titles_to_classify, available_roles): + """Builds the prompt for the LLM to classify a batch of job titles.""" + prompt = f""" + You are an expert in B2B contact segmentation. Your task is to classify a list of job titles into predefined roles. + + Analyze the following list of job titles and assign each one to the most appropriate role from the list provided. + + The available roles are: + - {', '.join(available_roles)} + + RULES: + 1. Respond ONLY with a valid JSON object. Do not include any text, explanations, or markdown code fences before or after the JSON. + 2. The JSON object should have the original job title as the key and the assigned role as the value. + 3. If a job title is ambiguous or you cannot confidently classify it, assign the value "Influencer". Use this as a fallback. + 4. Do not invent new roles. Only use the roles from the provided list. + + Here are the job titles to classify: + {json.dumps(titles_to_classify, indent=2)} + + Your JSON response: + """ + return prompt + +def classify_and_store_titles(): + db = SessionLocal() + try: + # 1. Fetch available persona names (roles) + personas = db.query(Persona).all() + available_roles = [p.name for p in personas] + if not available_roles: + logger.error("No Personas/Roles found in the database. Cannot classify. Please seed personas first.") + return + + logger.info(f"Classifying based on these roles: {available_roles}") + + # 2. Fetch unmapped titles + unmapped_titles = db.query(RawJobTitle).filter(RawJobTitle.is_mapped == False).all() + if not unmapped_titles: + logger.info("No unmapped job titles found. Nothing to do.") + return + + logger.info(f"Found {len(unmapped_titles)} unmapped job titles to process.") + + # 3. Process in batches + for i in range(0, len(unmapped_titles), BATCH_SIZE): + batch = unmapped_titles[i:i + BATCH_SIZE] + title_strings = [item.title for item in batch] + + logger.info(f"Processing batch {i//BATCH_SIZE + 1} of { (len(unmapped_titles) + BATCH_SIZE - 1) // BATCH_SIZE } with {len(title_strings)} titles...") + + # 4. Call LLM + prompt = build_classification_prompt(title_strings, available_roles) + response_text = "" + try: + response_text = call_gemini_flash(prompt, json_mode=True) + # Clean potential markdown fences + if response_text.strip().startswith("```json"): + response_text = response_text.strip()[7:-4] + + classifications = json.loads(response_text) + except Exception as e: + logger.error(f"Failed to get or parse LLM response for batch. Skipping. Error: {e}") + logger.error(f"Raw response was: {response_text}") + continue + + # 5. Process results + new_patterns = 0 + for title_obj in batch: + original_title = title_obj.title + assigned_role = classifications.get(original_title) + + if assigned_role and assigned_role in available_roles: + exists = db.query(JobRolePattern).filter(JobRolePattern.pattern_value == original_title).first() + if not exists: + new_pattern = JobRolePattern( + pattern_type='exact', + pattern_value=original_title, + role=assigned_role, + priority=90, + created_by='llm_batch' + ) + db.add(new_pattern) + new_patterns += 1 + title_obj.is_mapped = True + else: + logger.warning(f"Could not classify '{original_title}' or role '{assigned_role}' is invalid. It will be re-processed later.") + + db.commit() + logger.info(f"Batch {i//BATCH_SIZE + 1} complete. Created {new_patterns} new mapping patterns.") + + except Exception as e: + logger.error(f"An unexpected error occurred: {e}", exc_info=True) + db.rollback() + finally: + db.close() + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Batch classify unmapped job titles using an LLM.") + args = parser.parse_args() + + logger.info("--- Starting Batch Classification Script ---") + classify_and_store_titles() + logger.info("--- Batch Classification Script Finished ---") \ No newline at end of file diff --git a/company-explorer/backend/scripts/import_job_titles.py b/company-explorer/backend/scripts/import_job_titles.py index d59f16e2..b31fe585 100644 --- a/company-explorer/backend/scripts/import_job_titles.py +++ b/company-explorer/backend/scripts/import_job_titles.py @@ -1,95 +1,66 @@ import sys import os import csv +from collections import Counter import argparse -from datetime import datetime -# Setup Environment -sys.path.append(os.path.join(os.path.dirname(__file__), "../../")) +# Add the 'backend' directory to the path +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) -from backend.database import SessionLocal, RawJobTitle, init_db, engine, Base +from database import SessionLocal, RawJobTitle +from lib.logging_setup import setup_logging +import logging -def import_titles(file_path: str, delimiter: str = ';'): - print(f"🚀 Starting Import from {file_path}...") - - # Ensure Table Exists - RawJobTitle.__table__.create(bind=engine, checkfirst=True) - +setup_logging() +logger = logging.getLogger(__name__) + +def import_job_titles_from_csv(file_path: str): db = SessionLocal() - total_rows = 0 - new_titles = 0 - updated_titles = 0 - try: - with open(file_path, 'r', encoding='utf-8-sig') as f: # utf-8-sig handles BOM from Excel - # Try to detect header - sample = f.read(1024) - has_header = csv.Sniffer().has_header(sample) - f.seek(0) - - reader = csv.reader(f, delimiter=delimiter) - - if has_header: - headers = next(reader) - print(f"ℹ️ Header detected: {headers}") - # Try to find the right column index - col_idx = 0 - for i, h in enumerate(headers): - if h.lower() in ['funktion', 'jobtitle', 'title', 'position', 'rolle']: - col_idx = i - print(f" -> Using column '{h}' (Index {i})") - break - else: - col_idx = 0 - print("ℹ️ No header detected, using first column.") + logger.info(f"Starting import of job titles from {file_path}") + + # Use Counter to get frequencies directly from the CSV + job_title_counts = Counter() + total_rows = 0 - # Process Rows + with open(file_path, 'r', encoding='utf-8') as f: + reader = csv.reader(f) + # Assuming the CSV contains only job titles, one per row for row in reader: - if not row: continue - if len(row) <= col_idx: continue - - raw_title = row[col_idx].strip() - if not raw_title: continue # Skip empty - - total_rows += 1 - - # Check existance - existing = db.query(RawJobTitle).filter(RawJobTitle.title == raw_title).first() - - if existing: - existing.count += 1 - existing.updated_at = datetime.utcnow() - updated_titles += 1 - else: - db.add(RawJobTitle(title=raw_title, count=1)) - new_titles += 1 - - if total_rows % 100 == 0: - db.commit() - print(f" Processed {total_rows} rows...", end='\r') + if row and row[0].strip(): + title = row[0].strip() + job_title_counts[title] += 1 + total_rows += 1 + + logger.info(f"Read {total_rows} total job title entries. Found {len(job_title_counts)} unique titles.") + + added_count = 0 + updated_count = 0 + + for title, count in job_title_counts.items(): + existing_title = db.query(RawJobTitle).filter(RawJobTitle.title == title).first() + if existing_title: + if existing_title.count != count: + existing_title.count = count + updated_count += 1 + # If it exists and count is the same, do nothing. + else: + new_title = RawJobTitle(title=title, count=count, source="csv_import", is_mapped=False) + db.add(new_title) + added_count += 1 + + db.commit() + logger.info(f"Import complete. Added {added_count} new unique titles, updated {updated_count} existing titles.") - db.commit() - except Exception as e: - print(f"\n❌ Error: {e}") + logger.error(f"Error during job title import: {e}", exc_info=True) db.rollback() finally: db.close() - print(f"\n✅ Import Complete.") - print(f" Total Processed: {total_rows}") - print(f" New Unique Titles: {new_titles}") - print(f" Updated Frequencies: {updated_titles}") - if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Import Job Titles from CSV") - parser.add_argument("file", help="Path to CSV file") - parser.add_argument("--delimiter", default=";", help="CSV Delimiter (default: ';')") - + parser = argparse.ArgumentParser(description="Import job titles from a CSV file into the RawJobTitle database table.") + parser.add_argument("file_path", type=str, help="Path to the CSV file containing job titles.") args = parser.parse_args() - - if not os.path.exists(args.file): - print(f"❌ File not found: {args.file}") - sys.exit(1) - - import_titles(args.file, args.delimiter) + + import_job_titles_from_csv(args.file_path) \ No newline at end of file diff --git a/company-explorer/backend/scripts/seed_marketing_data.py b/company-explorer/backend/scripts/seed_marketing_data.py index 1ca1bfd8..f2dd7822 100644 --- a/company-explorer/backend/scripts/seed_marketing_data.py +++ b/company-explorer/backend/scripts/seed_marketing_data.py @@ -4,7 +4,7 @@ import json # Setup Environment to import backend modules sys.path.append(os.path.join(os.path.dirname(__file__), "../../")) -from backend.database import SessionLocal, Persona, JobRoleMapping +from backend.database import SessionLocal, Persona, JobRolePattern def seed_archetypes(): db = SessionLocal() @@ -87,33 +87,41 @@ def seed_archetypes(): db.commit() - # --- 2. Update JobRoleMappings to map to Archetypes --- + # --- 2. Update JobRolePatterns to map to Archetypes --- # We map the patterns to the new 4 Archetypes mapping_updates = [ # Wirtschaftlicher Entscheider - {"role": "Wirtschaftlicher Entscheider", "patterns": ["%geschäftsführer%", "%ceo%", "%director%", "%einkauf%", "%procurement%", "%finance%", "%cfo%"]}, + {"role": "Wirtschaftlicher Entscheider", "patterns": ["geschäftsführer", "ceo", "director", "einkauf", "procurement", "finance", "cfo"]}, # Operativer Entscheider - {"role": "Operativer Entscheider", "patterns": ["%housekeeping%", "%hausdame%", "%hauswirtschaft%", "%reinigung%", "%restaurant%", "%f&b%", "%werksleiter%", "%produktionsleiter%", "%lager%", "%logistik%", "%operations%", "%coo%"]}, + {"role": "Operativer Entscheider", "patterns": ["housekeeping", "hausdame", "hauswirtschaft", "reinigung", "restaurant", "f&b", "werksleiter", "produktionsleiter", "lager", "logistik", "operations", "coo"]}, # Infrastruktur-Verantwortlicher - {"role": "Infrastruktur-Verantwortlicher", "patterns": ["%facility%", "%technik%", "%instandhaltung%", "%it-leiter%", "%cto%", "%admin%", "%building%"]}, + {"role": "Infrastruktur-Verantwortlicher", "patterns": ["facility", "technik", "instandhaltung", "it-leiter", "cto", "admin", "building"]}, # Innovations-Treiber - {"role": "Innovations-Treiber", "patterns": ["%innovation%", "%digital%", "%transformation%", "%business dev%", "%marketing%"]} + {"role": "Innovations-Treiber", "patterns": ["innovation", "digital", "transformation", "business dev", "marketing"]} ] # Clear old mappings to prevent confusion - db.query(JobRoleMapping).delete() + db.query(JobRolePattern).delete() db.commit() - print("Cleared old JobRoleMappings.") + print("Cleared old JobRolePatterns.") for group in mapping_updates: role_name = group["role"] - for pattern in group["patterns"]: - print(f"Mapping '{pattern}' -> '{role_name}'") - db.add(JobRoleMapping(pattern=pattern, role=role_name)) + for pattern_text in group["patterns"]: + print(f"Mapping '{pattern_text}' -> '{role_name}'") + # All seeded patterns are regex contains checks + new_pattern = JobRolePattern( + pattern_type='regex', + pattern_value=pattern_text, # Stored without wildcards + role=role_name, + priority=100, # Default priority for seeded patterns + created_by='system' + ) + db.add(new_pattern) db.commit() print("Archetypes and Mappings Seeded Successfully.") diff --git a/company-explorer/backend/scripts/test_mapping_logic.py b/company-explorer/backend/scripts/test_mapping_logic.py index 5ae6f510..95ce2004 100644 --- a/company-explorer/backend/scripts/test_mapping_logic.py +++ b/company-explorer/backend/scripts/test_mapping_logic.py @@ -5,15 +5,15 @@ import os # Setup Environment sys.path.append(os.path.join(os.path.dirname(__file__), "../../")) -from backend.database import SessionLocal, JobRoleMapping, Persona +from backend.database import SessionLocal, JobRolePattern, Persona def test_mapping(job_title): db = SessionLocal() print(f"\n--- Testing Mapping for '{job_title}' ---") - # 1. Find Role Name via JobRoleMapping + # 1. Find Role Name via JobRolePattern role_name = None - mappings = db.query(JobRoleMapping).all() + mappings = db.query(JobRolePattern).all() for m in mappings: pattern_clean = m.pattern.replace("%", "").lower() if pattern_clean in job_title.lower(): diff --git a/company-explorer/backend/scripts/upgrade_schema_v2.py b/company-explorer/backend/scripts/upgrade_schema_v2.py index 7614d5e2..d71fe8ca 100644 --- a/company-explorer/backend/scripts/upgrade_schema_v2.py +++ b/company-explorer/backend/scripts/upgrade_schema_v2.py @@ -6,7 +6,7 @@ import os sys.path.append(os.path.join(os.path.dirname(__file__), "../../")) # Import everything to ensure metadata is populated -from backend.database import engine, Base, Company, Contact, Industry, JobRoleMapping, Persona, Signal, EnrichmentData, RoboticsCategory, ImportLog, ReportedMistake, MarketingMatrix +from backend.database import engine, Base, Company, Contact, Industry, JobRolePattern, Persona, Signal, EnrichmentData, RoboticsCategory, ImportLog, ReportedMistake, MarketingMatrix def migrate(): print("Migrating Database Schema...") diff --git a/company-explorer/backend/services/classification.py b/company-explorer/backend/services/classification.py index ac630345..e8b24cef 100644 --- a/company-explorer/backend/services/classification.py +++ b/company-explorer/backend/services/classification.py @@ -7,10 +7,10 @@ from typing import Optional, Dict, Any, List from sqlalchemy.orm import Session, joinedload -from backend.database import Company, Industry, RoboticsCategory, EnrichmentData -from backend.lib.core_utils import call_gemini_flash, safe_eval_math, run_serp_search -from backend.services.scraping import scrape_website_content -from backend.lib.metric_parser import MetricParser +from ..database import Company, Industry, RoboticsCategory, EnrichmentData +from ..lib.core_utils import call_gemini_flash, safe_eval_math, run_serp_search +from .scraping import scrape_website_content +from ..lib.metric_parser import MetricParser logger = logging.getLogger(__name__) diff --git a/company-explorer/backend/services/role_mapping.py b/company-explorer/backend/services/role_mapping.py new file mode 100644 index 00000000..0a558a12 --- /dev/null +++ b/company-explorer/backend/services/role_mapping.py @@ -0,0 +1,63 @@ +import logging +import re +from sqlalchemy.orm import Session +from typing import Optional +from ..database import JobRolePattern, RawJobTitle, Persona, Contact + +logger = logging.getLogger(__name__) + +class RoleMappingService: + def __init__(self, db: Session): + self.db = db + + def get_role_for_job_title(self, job_title: str) -> Optional[str]: + """ + Finds the corresponding role for a given job title using a multi-step process. + 1. Check for exact matches. + 2. Evaluate regex patterns. + """ + if not job_title: + return None + + # Normalize job title for matching + normalized_title = job_title.lower().strip() + + # 1. Fetch all active patterns from the database, ordered by priority + patterns = self.db.query(JobRolePattern).filter( + JobRolePattern.is_active == True + ).order_by(JobRolePattern.priority.asc()).all() + + # 2. Separate patterns for easier processing + exact_patterns = {p.pattern_value.lower(): p.role for p in patterns if p.pattern_type == 'exact'} + regex_patterns = [(p.pattern_value, p.role) for p in patterns if p.pattern_type == 'regex'] + + # 3. Check for exact match first (most efficient) + if normalized_title in exact_patterns: + return exact_patterns[normalized_title] + + # 4. Evaluate regex patterns + for pattern, role in regex_patterns: + try: + if re.search(pattern, job_title, re.IGNORECASE): + return role + except re.error as e: + logger.error(f"Invalid regex for role '{role}': {pattern}. Error: {e}") + continue + + return None + + def add_or_update_unclassified_title(self, job_title: str): + """ + Logs an unclassified job title or increments its count if already present. + """ + if not job_title: + return + + entry = self.db.query(RawJobTitle).filter(RawJobTitle.title == job_title).first() + if entry: + entry.count += 1 + else: + entry = RawJobTitle(title=job_title, count=1) + self.db.add(entry) + + self.db.commit() diff --git a/company-explorer/frontend/dist/assets/index-BgxQoHsm.css b/company-explorer/frontend/dist/assets/index-BgxQoHsm.css new file mode 100644 index 00000000..2c7cffc8 --- /dev/null +++ b/company-explorer/frontend/dist/assets/index-BgxQoHsm.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.left-2\.5{left:.625rem}.left-3{left:.75rem}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.z-10{z-index:10}.z-50{z-index:50}.z-\[60\]{z-index:60}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-8{margin-right:2rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.block{display:block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-8{height:2rem}.h-\[calc\(100vh-4rem\)\]{height:calc(100vh - 4rem)}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.min-h-screen{min-height:100vh}.w-1\/3{width:33.333333%}.w-1\/4{width:25%}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[1\.25rem\]{min-width:1.25rem}.min-w-\[200px\]{min-width:200px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-\[150px\]{max-width:150px}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-4{row-gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-slate-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(241 245 249 / var(--tw-divide-opacity, 1))}.divide-slate-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(226 232 240 / var(--tw-divide-opacity, 1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-dotted{border-style:dotted}.border-blue-100{--tw-border-opacity: 1;border-color:rgb(219 234 254 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-400\/30{border-color:#60a5fa4d}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-500\/30{border-color:#3b82f64d}.border-green-100{--tw-border-opacity: 1;border-color:rgb(220 252 231 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-green-400\/30{border-color:#4ade804d}.border-orange-100{--tw-border-opacity: 1;border-color:rgb(255 237 213 / var(--tw-border-opacity, 1))}.border-orange-200{--tw-border-opacity: 1;border-color:rgb(254 215 170 / var(--tw-border-opacity, 1))}.border-orange-400\/30{border-color:#fb923c4d}.border-purple-100{--tw-border-opacity: 1;border-color:rgb(243 232 255 / var(--tw-border-opacity, 1))}.border-purple-200{--tw-border-opacity: 1;border-color:rgb(233 213 255 / var(--tw-border-opacity, 1))}.border-purple-400\/30{border-color:#c084fc4d}.border-red-100{--tw-border-opacity: 1;border-color:rgb(254 226 226 / var(--tw-border-opacity, 1))}.border-slate-100{--tw-border-opacity: 1;border-color:rgb(241 245 249 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-slate-400{--tw-border-opacity: 1;border-color:rgb(148 163 184 / var(--tw-border-opacity, 1))}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}.border-l-slate-400{--tw-border-opacity: 1;border-left-color:rgb(148 163 184 / var(--tw-border-opacity, 1))}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-black\/70{background-color:#000000b3}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-50\/50{background-color:#eff6ff80}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-blue-600\/20{background-color:#2563eb33}.bg-blue-900\/20{background-color:#1e3a8a33}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50\/50{background-color:#f0fdf480}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-green-900\/20{background-color:#14532d33}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-50{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity, 1))}.bg-orange-600{--tw-bg-opacity: 1;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))}.bg-orange-900\/20{background-color:#7c2d1233}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-purple-900\/20{background-color:#581c8733}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50\/50{background-color:#fef2f280}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-100\/50{background-color:#f1f5f980}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-300{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-50\/50{background-color:#f8fafc80}.bg-slate-50\/80{background-color:#f8fafccc}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-800\/30{background-color:#1e293b4d}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-slate-900\/50{background-color:#0f172a80}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.fill-current{fill:currentColor}.fill-red-500{fill:#ef4444}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-9{padding-left:2.25rem;padding-right:2.25rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-8{padding-left:2rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-400\/80{color:#60a5facc}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-green-300{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-500\/80{color:#ef4444cc}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-800{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/20{--tw-shadow-color: rgb(59 130 246 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-900\/10{--tw-shadow-color: rgb(30 58 138 / .1);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-900\/20{--tw-shadow-color: rgb(30 58 138 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-green-500\/20{--tw-shadow-color: rgb(34 197 94 / .2);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#1e293b}::-webkit-scrollbar-thumb{background:#475569;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#64748b}.hover\:line-clamp-none:hover{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-slate-300:hover{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity, 1))}.hover\:bg-green-500:hover{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.hover\:bg-orange-700:hover{--tw-bg-opacity: 1;background-color:rgb(194 65 12 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-300:hover{--tw-bg-opacity: 1;background-color:rgb(203 213 225 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-50:hover{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-50\/50:hover{background-color:#f8fafc80}.hover\:bg-slate-800\/50:hover{background-color:#1e293b80}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-green-700:hover{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.hover\:text-orange-600:hover{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\:text-slate-800:hover{--tw-text-opacity: 1;color:rgb(30 41 59 / var(--tw-text-opacity, 1))}.hover\:text-slate-900:hover{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\:ring-blue-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(37 99 235 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-slate-400:disabled{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity, 1))}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:shadow-none:disabled{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group[open] .group-open\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.group\/row:hover .group-hover\/row\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.dark\:divide-slate-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(30 41 59 / var(--tw-divide-opacity, 1))}.dark\:divide-slate-800\/50:is(.dark *)>:not([hidden])~:not([hidden]){border-color:#1e293b80}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.dark\:border-blue-900\/50:is(.dark *){border-color:#1e3a8a80}.dark\:border-green-900\/30:is(.dark *){border-color:#14532d4d}.dark\:border-orange-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(154 52 18 / var(--tw-border-opacity, 1))}.dark\:border-orange-800\/50:is(.dark *){border-color:#9a341280}.dark\:border-orange-900\/50:is(.dark *){border-color:#7c2d1280}.dark\:border-purple-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 33 168 / var(--tw-border-opacity, 1))}.dark\:border-purple-900\/50:is(.dark *){border-color:#581c8780}.dark\:border-red-900\/30:is(.dark *){border-color:#7f1d1d4d}.dark\:border-slate-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.dark\:border-slate-700\/50:is(.dark *){border-color:#33415580}.dark\:border-slate-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.dark\:border-slate-800\/50:is(.dark *){border-color:#1e293b80}.dark\:border-slate-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(15 23 42 / var(--tw-border-opacity, 1))}.dark\:border-yellow-800\/50:is(.dark *){border-color:#854d0e80}.dark\:bg-blue-900\/10:is(.dark *){background-color:#1e3a8a1a}.dark\:bg-blue-900\/30:is(.dark *){background-color:#1e3a8a4d}.dark\:bg-green-900\/10:is(.dark *){background-color:#14532d1a}.dark\:bg-green-900\/30:is(.dark *){background-color:#14532d4d}.dark\:bg-green-900\/50:is(.dark *){background-color:#14532d80}.dark\:bg-orange-900\/10:is(.dark *){background-color:#7c2d121a}.dark\:bg-orange-900\/20:is(.dark *){background-color:#7c2d1233}.dark\:bg-purple-900\/10:is(.dark *){background-color:#581c871a}.dark\:bg-red-900\/10:is(.dark *){background-color:#7f1d1d1a}.dark\:bg-red-900\/50:is(.dark *){background-color:#7f1d1d80}.dark\:bg-slate-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-800\/30:is(.dark *){background-color:#1e293b4d}.dark\:bg-slate-800\/50:is(.dark *){background-color:#1e293b80}.dark\:bg-slate-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-900\/20:is(.dark *){background-color:#0f172a33}.dark\:bg-slate-900\/50:is(.dark *){background-color:#0f172a80}.dark\:bg-slate-900\/80:is(.dark *){background-color:#0f172acc}.dark\:bg-slate-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-950\/30:is(.dark *){background-color:#0206174d}.dark\:bg-slate-950\/50:is(.dark *){background-color:#02061780}.dark\:bg-yellow-900\/30:is(.dark *){background-color:#713f124d}.dark\:bg-yellow-900\/50:is(.dark *){background-color:#713f1280}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-blue-400\/80:is(.dark *){color:#60a5facc}.dark\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-orange-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 186 116 / var(--tw-text-opacity, 1))}.dark\:text-orange-400:is(.dark *){--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.dark\:text-purple-300:is(.dark *){--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-slate-200:is(.dark *){--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.dark\:text-slate-300:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.dark\:text-slate-600:is(.dark *){--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.dark\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.dark\:text-yellow-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.dark\:text-yellow-400:is(.dark *){--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.dark\:text-yellow-500:is(.dark *){--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.dark\:shadow-xl:is(.dark *){--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:hover\:border-slate-700:hover:is(.dark *){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.dark\:hover\:bg-blue-900\/20:hover:is(.dark *){background-color:#1e3a8a33}.dark\:hover\:bg-blue-900\/30:hover:is(.dark *){background-color:#1e3a8a4d}.dark\:hover\:bg-green-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(20 83 45 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-slate-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-slate-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-slate-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-slate-800\/30:hover:is(.dark *){background-color:#1e293b4d}.dark\:hover\:bg-slate-800\/50:hover:is(.dark *){background-color:#1e293b80}.dark\:hover\:bg-slate-900\/30:hover:is(.dark *){background-color:#0f172a4d}.dark\:hover\:text-blue-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:hover\:text-blue-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:hover\:text-orange-500:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.dark\:hover\:text-red-500:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.dark\:hover\:text-slate-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.dark\:hover\:text-slate-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.group:hover .dark\:group-hover\:bg-slate-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}@media (min-width: 640px){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pr-0{padding-right:0}}@media (min-width: 768px){.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-\[600px\]{width:600px}.md\:w-auto{width:auto}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:gap-4{gap:1rem}}@media (min-width: 1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width: 1280px){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} diff --git a/company-explorer/frontend/dist/assets/index-tQU9lyIc.js b/company-explorer/frontend/dist/assets/index-tQU9lyIc.js new file mode 100644 index 00000000..6dcb9dac --- /dev/null +++ b/company-explorer/frontend/dist/assets/index-tQU9lyIc.js @@ -0,0 +1,309 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();function t0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vu={exports:{}},tl={},Bu={exports:{}},H={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ur=Symbol.for("react.element"),n0=Symbol.for("react.portal"),r0=Symbol.for("react.fragment"),s0=Symbol.for("react.strict_mode"),l0=Symbol.for("react.profiler"),a0=Symbol.for("react.provider"),i0=Symbol.for("react.context"),o0=Symbol.for("react.forward_ref"),u0=Symbol.for("react.suspense"),c0=Symbol.for("react.memo"),d0=Symbol.for("react.lazy"),po=Symbol.iterator;function f0(e){return e===null||typeof e!="object"?null:(e=po&&e[po]||e["@@iterator"],typeof e=="function"?e:null)}var Hu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Wu=Object.assign,Qu={};function Qn(e,t,n){this.props=e,this.context=t,this.refs=Qu,this.updater=n||Hu}Qn.prototype.isReactComponent={};Qn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Qn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function qu(){}qu.prototype=Qn.prototype;function li(e,t,n){this.props=e,this.context=t,this.refs=Qu,this.updater=n||Hu}var ai=li.prototype=new qu;ai.constructor=li;Wu(ai,Qn.prototype);ai.isPureReactComponent=!0;var ho=Array.isArray,Ku=Object.prototype.hasOwnProperty,ii={current:null},Ju={key:!0,ref:!0,__self:!0,__source:!0};function Gu(e,t,n){var r,s={},a=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)Ku.call(t,r)&&!Ju.hasOwnProperty(r)&&(s[r]=t[r]);var o=arguments.length-2;if(o===1)s.children=n;else if(1>>1,J=_[Q];if(0>>1;Qs(Ct,A))hts(mt,Ct)?(_[Q]=mt,_[ht]=A,Q=ht):(_[Q]=Ct,_[Ee]=A,Q=Ee);else if(hts(mt,A))_[Q]=mt,_[ht]=A,Q=ht;else break e}}return M}function s(_,M){var A=_.sortIndex-M.sortIndex;return A!==0?A:_.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var u=[],c=[],f=1,m=null,x=3,y=!1,g=!1,k=!1,S=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(_){for(var M=n(c);M!==null;){if(M.callback===null)r(c);else if(M.startTime<=_)r(c),M.sortIndex=M.expirationTime,t(u,M);else break;M=n(c)}}function N(_){if(k=!1,h(_),!g)if(n(u)!==null)g=!0,I(C);else{var M=n(c);M!==null&&V(N,M.startTime-_)}}function C(_,M){g=!1,k&&(k=!1,p(b),b=-1),y=!0;var A=x;try{for(h(M),m=n(u);m!==null&&(!(m.expirationTime>M)||_&&!z());){var Q=m.callback;if(typeof Q=="function"){m.callback=null,x=m.priorityLevel;var J=Q(m.expirationTime<=M);M=e.unstable_now(),typeof J=="function"?m.callback=J:m===n(u)&&r(u),h(M)}else r(u);m=n(u)}if(m!==null)var Ge=!0;else{var Ee=n(c);Ee!==null&&V(N,Ee.startTime-M),Ge=!1}return Ge}finally{m=null,x=A,y=!1}}var L=!1,P=null,b=-1,U=5,w=-1;function z(){return!(e.unstable_now()-w_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(_){switch(x){case 1:case 2:case 3:var M=3;break;default:M=x}var A=x;x=M;try{return _()}finally{x=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,M){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var A=x;x=_;try{return M()}finally{x=A}},e.unstable_scheduleCallback=function(_,M,A){var Q=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0Q?(_.sortIndex=A,t(c,_),n(u)===null&&_===n(c)&&(k?(p(b),b=-1):k=!0,V(N,A-Q))):(_.sortIndex=J,t(u,_),g||y||(g=!0,I(C))),_},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(_){var M=x;return function(){var A=x;x=M;try{return _.apply(this,arguments)}finally{x=A}}}})(tc);ec.exports=tc;var j0=ec.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var S0=E,$e=j0;function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sa=Object.prototype.hasOwnProperty,C0=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,xo={},go={};function E0(e){return sa.call(go,e)?!0:sa.call(xo,e)?!1:C0.test(e)?go[e]=!0:(xo[e]=!0,!1)}function _0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function R0(e,t,n,r){if(t===null||typeof t>"u"||_0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ce(e,t,n,r,s,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new Ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new Ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new Ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new Ce(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new Ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new Ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new Ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new Ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new Ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var ui=/[\-:]([a-z])/g;function ci(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ui,ci);xe[t]=new Ce(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ui,ci);xe[t]=new Ce(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ui,ci);xe[t]=new Ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new Ce(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new Ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new Ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function di(e,t,n,r){var s=xe.hasOwnProperty(t)?xe[t]:null;(s!==null?s.type!==0:r||!(2o||s[i]!==a[o]){var u=` +`+s[i].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=o);break}}}finally{El=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?or(e):""}function P0(e){switch(e.tag){case 5:return or(e.type);case 16:return or("Lazy");case 13:return or("Suspense");case 19:return or("SuspenseList");case 0:case 2:case 15:return e=_l(e.type,!1),e;case 11:return e=_l(e.type.render,!1),e;case 1:return e=_l(e.type,!0),e;default:return""}}function oa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case vn:return"Fragment";case yn:return"Portal";case la:return"Profiler";case fi:return"StrictMode";case aa:return"Suspense";case ia:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case sc:return(e.displayName||"Context")+".Consumer";case rc:return(e._context.displayName||"Context")+".Provider";case pi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hi:return t=e.displayName||null,t!==null?t:oa(e.type)||"Memo";case _t:t=e._payload,e=e._init;try{return oa(e(t))}catch{}}return null}function T0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oa(t);case 8:return t===fi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Bt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ac(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function L0(e){var t=ac(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yr(e){e._valueTracker||(e._valueTracker=L0(e))}function ic(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ac(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Rs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ua(e,t){var n=t.checked;return se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Bt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function oc(e,t){t=t.checked,t!=null&&di(e,"checked",t,!1)}function ca(e,t){oc(e,t);var n=Bt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?da(e,t.type,n):t.hasOwnProperty("defaultValue")&&da(e,t.type,Bt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function wo(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function da(e,t,n){(t!=="number"||Rs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ur=Array.isArray;function Tn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Zr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Nr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},O0=["Webkit","ms","Moz","O"];Object.keys(pr).forEach(function(e){O0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pr[t]=pr[e]})});function fc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pr.hasOwnProperty(e)&&pr[e]?(""+t).trim():t+"px"}function pc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=fc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var M0=se({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ha(e,t){if(t){if(M0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function ma(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xa=null;function mi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ga=null,Ln=null,On=null;function No(e){if(e=Br(e)){if(typeof ga!="function")throw Error(R(280));var t=e.stateNode;t&&(t=al(t),ga(e.stateNode,e.type,t))}}function hc(e){Ln?On?On.push(e):On=[e]:Ln=e}function mc(){if(Ln){var e=Ln,t=On;if(On=Ln=null,No(e),t)for(e=0;e>>=0,e===0?32:31-(W0(e)/Q0|0)|0}var es=64,ts=4194304;function cr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Os(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,a=e.pingedLanes,i=n&268435455;if(i!==0){var o=i&~s;o!==0?r=cr(o):(a&=i,a!==0&&(r=cr(a)))}else i=n&~s,i!==0?r=cr(i):a!==0&&(r=cr(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function $r(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-st(t),e[t]=n}function G0(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=mr),Lo=" ",Oo=!1;function Dc(e,t){switch(e){case"keyup":return jp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wn=!1;function Cp(e,t){switch(e){case"compositionend":return zc(t);case"keypress":return t.which!==32?null:(Oo=!0,Lo);case"textInput":return e=t.data,e===Lo&&Oo?null:e;default:return null}}function Ep(e,t){if(wn)return e==="compositionend"||!Ni&&Dc(e,t)?(e=Oc(),gs=wi=Ot=null,wn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ao(n)}}function Uc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $c(){for(var e=window,t=Rs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rs(e.document)}return t}function ji(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function zp(e){var t=$c(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Uc(n.ownerDocument.documentElement,n)){if(r!==null&&ji(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,a=Math.min(r.start,s);r=r.end===void 0?a:Math.min(r.end,s),!e.extend&&a>r&&(s=r,r=a,a=s),s=Fo(n,a);var i=Fo(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,kn=null,Na=null,gr=null,ja=!1;function Io(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ja||kn==null||kn!==Rs(r)||(r=kn,"selectionStart"in r&&ji(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),gr&&Rr(gr,r)||(gr=r,r=zs(Na,"onSelect"),0jn||(e.current=Pa[jn],Pa[jn]=null,jn--)}function X(e,t){jn++,Pa[jn]=e.current,e.current=t}var Ht={},ke=qt(Ht),Te=qt(!1),an=Ht;function In(e,t){var n=e.type.contextTypes;if(!n)return Ht;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in n)s[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Le(e){return e=e.childContextTypes,e!=null}function Fs(){ee(Te),ee(ke)}function Qo(e,t,n){if(ke.current!==Ht)throw Error(R(168));X(ke,t),X(Te,n)}function Gc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(R(108,T0(e)||"Unknown",s));return se({},n,r)}function Is(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ht,an=ke.current,X(ke,e),X(Te,Te.current),!0}function qo(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=Gc(e,t,an),r.__reactInternalMemoizedMergedChildContext=e,ee(Te),ee(ke),X(ke,e)):ee(Te),X(Te,n)}var gt=null,il=!1,Vl=!1;function Xc(e){gt===null?gt=[e]:gt.push(e)}function Kp(e){il=!0,Xc(e)}function Kt(){if(!Vl&>!==null){Vl=!0;var e=0,t=K;try{var n=gt;for(K=1;e>=i,s-=i,yt=1<<32-st(t)+s|n<b?(U=P,P=null):U=P.sibling;var w=x(p,P,h[b],N);if(w===null){P===null&&(P=U);break}e&&P&&w.alternate===null&&t(p,P),d=a(w,d,b),L===null?C=w:L.sibling=w,L=w,P=U}if(b===h.length)return n(p,P),te&&Xt(p,b),C;if(P===null){for(;bb?(U=P,P=null):U=P.sibling;var z=x(p,P,w.value,N);if(z===null){P===null&&(P=U);break}e&&P&&z.alternate===null&&t(p,P),d=a(z,d,b),L===null?C=z:L.sibling=z,L=z,P=U}if(w.done)return n(p,P),te&&Xt(p,b),C;if(P===null){for(;!w.done;b++,w=h.next())w=m(p,w.value,N),w!==null&&(d=a(w,d,b),L===null?C=w:L.sibling=w,L=w);return te&&Xt(p,b),C}for(P=r(p,P);!w.done;b++,w=h.next())w=y(P,p,b,w.value,N),w!==null&&(e&&w.alternate!==null&&P.delete(w.key===null?b:w.key),d=a(w,d,b),L===null?C=w:L.sibling=w,L=w);return e&&P.forEach(function(W){return t(p,W)}),te&&Xt(p,b),C}function S(p,d,h,N){if(typeof h=="object"&&h!==null&&h.type===vn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Xr:e:{for(var C=h.key,L=d;L!==null;){if(L.key===C){if(C=h.type,C===vn){if(L.tag===7){n(p,L.sibling),d=s(L,h.props.children),d.return=p,p=d;break e}}else if(L.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===_t&&Go(C)===L.type){n(p,L.sibling),d=s(L,h.props),d.ref=sr(p,L,h),d.return=p,p=d;break e}n(p,L);break}else t(p,L);L=L.sibling}h.type===vn?(d=sn(h.props.children,p.mode,N,h.key),d.return=p,p=d):(N=Ss(h.type,h.key,h.props,null,p.mode,N),N.ref=sr(p,d,h),N.return=p,p=N)}return i(p);case yn:e:{for(L=h.key;d!==null;){if(d.key===L)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){n(p,d.sibling),d=s(d,h.children||[]),d.return=p,p=d;break e}else{n(p,d);break}else t(p,d);d=d.sibling}d=Gl(h,p.mode,N),d.return=p,p=d}return i(p);case _t:return L=h._init,S(p,d,L(h._payload),N)}if(ur(h))return g(p,d,h,N);if(Zn(h))return k(p,d,h,N);os(p,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(n(p,d.sibling),d=s(d,h),d.return=p,p=d):(n(p,d),d=Jl(h,p.mode,N),d.return=p,p=d),i(p)):n(p,d)}return S}var $n=td(!0),nd=td(!1),Vs=qt(null),Bs=null,En=null,_i=null;function Ri(){_i=En=Bs=null}function Pi(e){var t=Vs.current;ee(Vs),e._currentValue=t}function Oa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Dn(e,t){Bs=e,_i=En=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pe=!0),e.firstContext=null)}function Ke(e){var t=e._currentValue;if(_i!==e)if(e={context:e,memoizedValue:t,next:null},En===null){if(Bs===null)throw Error(R(308));En=e,Bs.dependencies={lanes:0,firstContext:e}}else En=En.next=e;return t}var en=null;function Ti(e){en===null?en=[e]:en.push(e)}function rd(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Ti(t)):(n.next=s.next,s.next=n),t.interleaved=n,Nt(e,r)}function Nt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Rt=!1;function Li(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function wt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function It(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Nt(e,n)}return s=r.interleaved,s===null?(t.next=t,Ti(r)):(t.next=s.next,s.next=t),r.interleaved=t,Nt(e,n)}function vs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gi(e,n)}}function Xo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?s=a=i:a=a.next=i,n=n.next}while(n!==null);a===null?s=a=t:a=a.next=t}else s=a=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hs(e,t,n,r){var s=e.updateQueue;Rt=!1;var a=s.firstBaseUpdate,i=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var u=o,c=u.next;u.next=null,i===null?a=c:i.next=c,i=u;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==i&&(o===null?f.firstBaseUpdate=c:o.next=c,f.lastBaseUpdate=u))}if(a!==null){var m=s.baseState;i=0,f=c=u=null,o=a;do{var x=o.lane,y=o.eventTime;if((r&x)===x){f!==null&&(f=f.next={eventTime:y,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var g=e,k=o;switch(x=t,y=n,k.tag){case 1:if(g=k.payload,typeof g=="function"){m=g.call(y,m,x);break e}m=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=k.payload,x=typeof g=="function"?g.call(y,m,x):g,x==null)break e;m=se({},m,x);break e;case 2:Rt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,x=s.effects,x===null?s.effects=[o]:x.push(o))}else y={eventTime:y,lane:x,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(c=f=y,u=m):f=f.next=y,i|=x;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;x=o,o=x.next,x.next=null,s.lastBaseUpdate=x,s.shared.pending=null}}while(!0);if(f===null&&(u=m),s.baseState=u,s.firstBaseUpdate=c,s.lastBaseUpdate=f,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else a===null&&(s.shared.lanes=0);cn|=i,e.lanes=i,e.memoizedState=m}}function Yo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Hl.transition;Hl.transition={};try{e(!1),t()}finally{K=n,Hl.transition=r}}function kd(){return Je().memoizedState}function Yp(e,t,n){var r=$t(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bd(e))Nd(t,n);else if(n=rd(e,t,n,r),n!==null){var s=je();lt(n,e,r,s),jd(n,t,r)}}function Zp(e,t,n){var r=$t(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bd(e))Nd(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,o=a(i,n);if(s.hasEagerState=!0,s.eagerState=o,at(o,i)){var u=t.interleaved;u===null?(s.next=s,Ti(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=rd(e,t,s,r),n!==null&&(s=je(),lt(n,e,r,s),jd(n,t,r))}}function bd(e){var t=e.alternate;return e===re||t!==null&&t===re}function Nd(e,t){yr=Qs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function jd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gi(e,n)}}var qs={readContext:Ke,useCallback:ge,useContext:ge,useEffect:ge,useImperativeHandle:ge,useInsertionEffect:ge,useLayoutEffect:ge,useMemo:ge,useReducer:ge,useRef:ge,useState:ge,useDebugValue:ge,useDeferredValue:ge,useTransition:ge,useMutableSource:ge,useSyncExternalStore:ge,useId:ge,unstable_isNewReconciler:!1},eh={readContext:Ke,useCallback:function(e,t){return ct().memoizedState=[e,t===void 0?null:t],e},useContext:Ke,useEffect:eu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ks(4194308,4,xd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ks(4194308,4,e,t)},useInsertionEffect:function(e,t){return ks(4,2,e,t)},useMemo:function(e,t){var n=ct();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ct();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Yp.bind(null,re,e),[r.memoizedState,e]},useRef:function(e){var t=ct();return e={current:e},t.memoizedState=e},useState:Zo,useDebugValue:Ui,useDeferredValue:function(e){return ct().memoizedState=e},useTransition:function(){var e=Zo(!1),t=e[0];return e=Xp.bind(null,e[1]),ct().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=re,s=ct();if(te){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),fe===null)throw Error(R(349));un&30||od(r,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,eu(cd.bind(null,r,a,e),[e]),r.flags|=2048,Ar(9,ud.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ct(),t=fe.identifierPrefix;if(te){var n=vt,r=yt;n=(r&~(1<<32-st(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Dr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[dt]=t,e[Lr]=r,Md(e,t,!1,!1),t.stateNode=e;e:{switch(i=ma(n,r),n){case"dialog":Z("cancel",e),Z("close",e),s=r;break;case"iframe":case"object":case"embed":Z("load",e),s=r;break;case"video":case"audio":for(s=0;sHn&&(t.flags|=128,r=!0,lr(a,!1),t.lanes=4194304)}else{if(!r)if(e=Ws(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lr(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!te)return ye(t),null}else 2*ae()-a.renderingStartTime>Hn&&n!==1073741824&&(t.flags|=128,r=!0,lr(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(n=a.last,n!==null?n.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ae(),t.sibling=null,n=ne.current,X(ne,r?n&1|2:n&1),t):(ye(t),null);case 22:case 23:return Qi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Fe&1073741824&&(ye(t),t.subtreeFlags&6&&(t.flags|=8192)):ye(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function oh(e,t){switch(Ci(t),t.tag){case 1:return Le(t.type)&&Fs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vn(),ee(Te),ee(ke),Di(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Mi(t),null;case 13:if(ee(ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));Un()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(ne),null;case 4:return Vn(),null;case 10:return Pi(t.type._context),null;case 22:case 23:return Qi(),null;case 24:return null;default:return null}}var cs=!1,ve=!1,uh=typeof WeakSet=="function"?WeakSet:Set,O=null;function _n(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){le(e,t,r)}else n.current=null}function Va(e,t,n){try{n()}catch(r){le(e,t,r)}}var du=!1;function ch(e,t){if(Sa=Ms,e=$c(),ji(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var i=0,o=-1,u=-1,c=0,f=0,m=e,x=null;t:for(;;){for(var y;m!==n||s!==0&&m.nodeType!==3||(o=i+s),m!==a||r!==0&&m.nodeType!==3||(u=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(y=m.firstChild)!==null;)x=m,m=y;for(;;){if(m===e)break t;if(x===n&&++c===s&&(o=i),x===a&&++f===r&&(u=i),(y=m.nextSibling)!==null)break;m=x,x=m.parentNode}m=y}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ca={focusedElem:e,selectionRange:n},Ms=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var k=g.memoizedProps,S=g.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?k:et(t.type,k),S);p.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(N){le(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return g=du,du=!1,g}function vr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&Va(t,n,a)}s=s.next}while(s!==r)}}function cl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ba(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ad(e){var t=e.alternate;t!==null&&(e.alternate=null,Ad(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[dt],delete t[Lr],delete t[Ra],delete t[Qp],delete t[qp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fd(e){return e.tag===5||e.tag===3||e.tag===4}function fu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ha(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=As));else if(r!==4&&(e=e.child,e!==null))for(Ha(e,t,n),e=e.sibling;e!==null;)Ha(e,t,n),e=e.sibling}function Wa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wa(e,t,n),e=e.sibling;e!==null;)Wa(e,t,n),e=e.sibling}var he=null,tt=!1;function Et(e,t,n){for(n=n.child;n!==null;)Id(e,t,n),n=n.sibling}function Id(e,t,n){if(ft&&typeof ft.onCommitFiberUnmount=="function")try{ft.onCommitFiberUnmount(nl,n)}catch{}switch(n.tag){case 5:ve||_n(n,t);case 6:var r=he,s=tt;he=null,Et(e,t,n),he=r,tt=s,he!==null&&(tt?(e=he,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):he.removeChild(n.stateNode));break;case 18:he!==null&&(tt?(e=he,n=n.stateNode,e.nodeType===8?$l(e.parentNode,n):e.nodeType===1&&$l(e,n),Er(e)):$l(he,n.stateNode));break;case 4:r=he,s=tt,he=n.stateNode.containerInfo,tt=!0,Et(e,t,n),he=r,tt=s;break;case 0:case 11:case 14:case 15:if(!ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var a=s,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&Va(n,t,i),s=s.next}while(s!==r)}Et(e,t,n);break;case 1:if(!ve&&(_n(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){le(n,t,o)}Et(e,t,n);break;case 21:Et(e,t,n);break;case 22:n.mode&1?(ve=(r=ve)||n.memoizedState!==null,Et(e,t,n),ve=r):Et(e,t,n);break;default:Et(e,t,n)}}function pu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new uh),t.forEach(function(r){var s=vh.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Ze(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=i),r&=~a}if(r=s,r=ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*fh(r/1960))-r,10e?16:e,Mt===null)var r=!1;else{if(e=Mt,Mt=null,Gs=0,q&6)throw Error(R(331));var s=q;for(q|=4,O=e.current;O!==null;){var a=O,i=a.child;if(O.flags&16){var o=a.deletions;if(o!==null){for(var u=0;uae()-Hi?rn(e,0):Bi|=n),Oe(e,t)}function qd(e,t){t===0&&(e.mode&1?(t=ts,ts<<=1,!(ts&130023424)&&(ts=4194304)):t=1);var n=je();e=Nt(e,t),e!==null&&($r(e,t,n),Oe(e,n))}function yh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qd(e,n)}function vh(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),qd(e,n)}var Kd;Kd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Te.current)Pe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pe=!1,ah(e,t,n);Pe=!!(e.flags&131072)}else Pe=!1,te&&t.flags&1048576&&Yc(t,$s,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;bs(e,t),e=t.pendingProps;var s=In(t,ke.current);Dn(t,n),s=Ai(null,t,r,e,s,n);var a=Fi();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Le(r)?(a=!0,Is(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Li(t),s.updater=ul,t.stateNode=s,s._reactInternals=t,Da(t,r,e,n),t=Fa(null,t,r,!0,a,n)):(t.tag=0,te&&a&&Si(t),Ne(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(bs(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=kh(r),e=et(r,e),s){case 0:t=Aa(null,t,r,e,n);break e;case 1:t=ou(null,t,r,e,n);break e;case 11:t=au(null,t,r,e,n);break e;case 14:t=iu(null,t,r,et(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:et(r,s),Aa(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:et(r,s),ou(e,t,r,s,n);case 3:e:{if(Td(t),e===null)throw Error(R(387));r=t.pendingProps,a=t.memoizedState,s=a.element,sd(e,t),Hs(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=Bn(Error(R(423)),t),t=uu(e,t,r,n,s);break e}else if(r!==s){s=Bn(Error(R(424)),t),t=uu(e,t,r,n,s);break e}else for(Ie=Ft(t.stateNode.containerInfo.firstChild),Ue=t,te=!0,nt=null,n=nd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Un(),r===s){t=jt(e,t,n);break e}Ne(e,t,r,n)}t=t.child}return t;case 5:return ld(t),e===null&&La(t),r=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,i=s.children,Ea(r,s)?i=null:a!==null&&Ea(r,a)&&(t.flags|=32),Pd(e,t),Ne(e,t,i,n),t.child;case 6:return e===null&&La(t),null;case 13:return Ld(e,t,n);case 4:return Oi(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$n(t,null,r,n):Ne(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:et(r,s),au(e,t,r,s,n);case 7:return Ne(e,t,t.pendingProps,n),t.child;case 8:return Ne(e,t,t.pendingProps.children,n),t.child;case 12:return Ne(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,a=t.memoizedProps,i=s.value,X(Vs,r._currentValue),r._currentValue=i,a!==null)if(at(a.value,i)){if(a.children===s.children&&!Te.current){t=jt(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){i=a.child;for(var u=o.firstContext;u!==null;){if(u.context===r){if(a.tag===1){u=wt(-1,n&-n),u.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Oa(a.return,n,t),o.lanes|=n;break}u=u.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(R(341));i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),Oa(i,n,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Ne(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Dn(t,n),s=Ke(s),r=r(s),t.flags|=1,Ne(e,t,r,n),t.child;case 14:return r=t.type,s=et(r,t.pendingProps),s=et(r.type,s),iu(e,t,r,s,n);case 15:return _d(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:et(r,s),bs(e,t),t.tag=1,Le(r)?(e=!0,Is(t)):e=!1,Dn(t,n),Sd(t,r,s),Da(t,r,s,n),Fa(null,t,r,!0,e,n);case 19:return Od(e,t,n);case 22:return Rd(e,t,n)}throw Error(R(156,t.tag))};function Jd(e,t){return bc(e,t)}function wh(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qe(e,t,n,r){return new wh(e,t,n,r)}function Ki(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kh(e){if(typeof e=="function")return Ki(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pi)return 11;if(e===hi)return 14}return 2}function Vt(e,t){var n=e.alternate;return n===null?(n=Qe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ss(e,t,n,r,s,a){var i=2;if(r=e,typeof e=="function")Ki(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case vn:return sn(n.children,s,a,t);case fi:i=8,s|=8;break;case la:return e=Qe(12,n,t,s|2),e.elementType=la,e.lanes=a,e;case aa:return e=Qe(13,n,t,s),e.elementType=aa,e.lanes=a,e;case ia:return e=Qe(19,n,t,s),e.elementType=ia,e.lanes=a,e;case lc:return fl(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rc:i=10;break e;case sc:i=9;break e;case pi:i=11;break e;case hi:i=14;break e;case _t:i=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Qe(i,n,t,s),t.elementType=e,t.type=r,t.lanes=a,t}function sn(e,t,n,r){return e=Qe(7,e,r,t),e.lanes=n,e}function fl(e,t,n,r){return e=Qe(22,e,r,t),e.elementType=lc,e.lanes=n,e.stateNode={isHidden:!1},e}function Jl(e,t,n){return e=Qe(6,e,null,t),e.lanes=n,e}function Gl(e,t,n){return t=Qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bh(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Pl(0),this.expirationTimes=Pl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Ji(e,t,n,r,s,a,i,o,u){return e=new bh(e,t,n,o,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Qe(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Li(a),e}function Nh(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Zd)}catch(e){console.error(e)}}Zd(),Zu.exports=Ve;var _h=Zu.exports,ku=_h;ra.createRoot=ku.createRoot,ra.hydrateRoot=ku.hydrateRoot;function ef(e,t){return function(){return e.apply(t,arguments)}}const{toString:Rh}=Object.prototype,{getPrototypeOf:Zi}=Object,{iterator:gl,toStringTag:tf}=Symbol,yl=(e=>t=>{const n=Rh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),it=e=>(e=e.toLowerCase(),t=>yl(t)===e),vl=e=>t=>typeof t===e,{isArray:Jn}=Array,Wn=vl("undefined");function Wr(e){return e!==null&&!Wn(e)&&e.constructor!==null&&!Wn(e.constructor)&&Me(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const nf=it("ArrayBuffer");function Ph(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&nf(e.buffer),t}const Th=vl("string"),Me=vl("function"),rf=vl("number"),Qr=e=>e!==null&&typeof e=="object",Lh=e=>e===!0||e===!1,Cs=e=>{if(yl(e)!=="object")return!1;const t=Zi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(tf in e)&&!(gl in e)},Oh=e=>{if(!Qr(e)||Wr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Mh=it("Date"),Dh=it("File"),zh=it("Blob"),Ah=it("FileList"),Fh=e=>Qr(e)&&Me(e.pipe),Ih=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Me(e.append)&&((t=yl(e))==="formdata"||t==="object"&&Me(e.toString)&&e.toString()==="[object FormData]"))},Uh=it("URLSearchParams"),[$h,Vh,Bh,Hh]=["ReadableStream","Request","Response","Headers"].map(it),Wh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function qr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Jn(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const nn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lf=e=>!Wn(e)&&e!==nn;function Ga(){const{caseless:e,skipUndefined:t}=lf(this)&&this||{},n={},r=(s,a)=>{const i=e&&sf(n,a)||a;Cs(n[i])&&Cs(s)?n[i]=Ga(n[i],s):Cs(s)?n[i]=Ga({},s):Jn(s)?n[i]=s.slice():(!t||!Wn(s))&&(n[i]=s)};for(let s=0,a=arguments.length;s(qr(t,(s,a)=>{n&&Me(s)?e[a]=ef(s,n):e[a]=s},{allOwnKeys:r}),e),qh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Kh=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Jh=(e,t,n,r)=>{let s,a,i;const o={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)i=s[a],(!r||r(i,e,t))&&!o[i]&&(t[i]=e[i],o[i]=!0);e=n!==!1&&Zi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gh=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Xh=e=>{if(!e)return null;if(Jn(e))return e;let t=e.length;if(!rf(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Yh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zi(Uint8Array)),Zh=(e,t)=>{const r=(e&&e[gl]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},em=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},tm=it("HTMLFormElement"),nm=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),bu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),rm=it("RegExp"),af=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};qr(n,(s,a)=>{let i;(i=t(s,a,e))!==!1&&(r[a]=i||s)}),Object.defineProperties(e,r)},sm=e=>{af(e,(t,n)=>{if(Me(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Me(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},lm=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Jn(e)?r(e):r(String(e).split(t)),n},am=()=>{},im=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function om(e){return!!(e&&Me(e.append)&&e[tf]==="FormData"&&e[gl])}const um=e=>{const t=new Array(10),n=(r,s)=>{if(Qr(r)){if(t.indexOf(r)>=0)return;if(Wr(r))return r;if(!("toJSON"in r)){t[s]=r;const a=Jn(r)?[]:{};return qr(r,(i,o)=>{const u=n(i,s+1);!Wn(u)&&(a[o]=u)}),t[s]=void 0,a}}return r};return n(e,0)},cm=it("AsyncFunction"),dm=e=>e&&(Qr(e)||Me(e))&&Me(e.then)&&Me(e.catch),of=((e,t)=>e?setImmediate:t?((n,r)=>(nn.addEventListener("message",({source:s,data:a})=>{s===nn&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),nn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Me(nn.postMessage)),fm=typeof queueMicrotask<"u"?queueMicrotask.bind(nn):typeof process<"u"&&process.nextTick||of,pm=e=>e!=null&&Me(e[gl]),v={isArray:Jn,isArrayBuffer:nf,isBuffer:Wr,isFormData:Ih,isArrayBufferView:Ph,isString:Th,isNumber:rf,isBoolean:Lh,isObject:Qr,isPlainObject:Cs,isEmptyObject:Oh,isReadableStream:$h,isRequest:Vh,isResponse:Bh,isHeaders:Hh,isUndefined:Wn,isDate:Mh,isFile:Dh,isBlob:zh,isRegExp:rm,isFunction:Me,isStream:Fh,isURLSearchParams:Uh,isTypedArray:Yh,isFileList:Ah,forEach:qr,merge:Ga,extend:Qh,trim:Wh,stripBOM:qh,inherits:Kh,toFlatObject:Jh,kindOf:yl,kindOfTest:it,endsWith:Gh,toArray:Xh,forEachEntry:Zh,matchAll:em,isHTMLForm:tm,hasOwnProperty:bu,hasOwnProp:bu,reduceDescriptors:af,freezeMethods:sm,toObjectSet:lm,toCamelCase:nm,noop:am,toFiniteNumber:im,findKey:sf,global:nn,isContextDefined:lf,isSpecCompliantForm:om,toJSONObject:um,isAsyncFn:cm,isThenable:dm,setImmediate:of,asap:fm,isIterable:pm};function $(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}v.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:v.toJSONObject(this.config),code:this.code,status:this.status}}});const uf=$.prototype,cf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{cf[e]={value:e}});Object.defineProperties($,cf);Object.defineProperty(uf,"isAxiosError",{value:!0});$.from=(e,t,n,r,s,a)=>{const i=Object.create(uf);v.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError");const o=e&&e.message?e.message:"Error",u=t==null&&e?e.code:t;return $.call(i,o,u,n,r,s),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",a&&Object.assign(i,a),i};const hm=null;function Xa(e){return v.isPlainObject(e)||v.isArray(e)}function df(e){return v.endsWith(e,"[]")?e.slice(0,-2):e}function Nu(e,t,n){return e?e.concat(t).map(function(s,a){return s=df(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function mm(e){return v.isArray(e)&&!e.some(Xa)}const xm=v.toFlatObject(v,{},null,function(t){return/^is[A-Z]/.test(t)});function wl(e,t,n){if(!v.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=v.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,S){return!v.isUndefined(S[k])});const r=n.metaTokens,s=n.visitor||f,a=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&v.isSpecCompliantForm(t);if(!v.isFunction(s))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(v.isDate(g))return g.toISOString();if(v.isBoolean(g))return g.toString();if(!u&&v.isBlob(g))throw new $("Blob is not supported. Use a Buffer instead.");return v.isArrayBuffer(g)||v.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function f(g,k,S){let p=g;if(g&&!S&&typeof g=="object"){if(v.endsWith(k,"{}"))k=r?k:k.slice(0,-2),g=JSON.stringify(g);else if(v.isArray(g)&&mm(g)||(v.isFileList(g)||v.endsWith(k,"[]"))&&(p=v.toArray(g)))return k=df(k),p.forEach(function(h,N){!(v.isUndefined(h)||h===null)&&t.append(i===!0?Nu([k],N,a):i===null?k:k+"[]",c(h))}),!1}return Xa(g)?!0:(t.append(Nu(S,k,a),c(g)),!1)}const m=[],x=Object.assign(xm,{defaultVisitor:f,convertValue:c,isVisitable:Xa});function y(g,k){if(!v.isUndefined(g)){if(m.indexOf(g)!==-1)throw Error("Circular reference detected in "+k.join("."));m.push(g),v.forEach(g,function(p,d){(!(v.isUndefined(p)||p===null)&&s.call(t,p,v.isString(d)?d.trim():d,k,x))===!0&&y(p,k?k.concat(d):[d])}),m.pop()}}if(!v.isObject(e))throw new TypeError("data must be an object");return y(e),t}function ju(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function eo(e,t){this._pairs=[],e&&wl(e,this,t)}const ff=eo.prototype;ff.append=function(t,n){this._pairs.push([t,n])};ff.toString=function(t){const n=t?function(r){return t.call(this,r,ju)}:ju;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function gm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function pf(e,t,n){if(!t)return e;const r=n&&n.encode||gm;v.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let a;if(s?a=s(t,n):a=v.isURLSearchParams(t)?t.toString():new eo(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Su{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){v.forEach(this.handlers,function(r){r!==null&&t(r)})}}const hf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ym=typeof URLSearchParams<"u"?URLSearchParams:eo,vm=typeof FormData<"u"?FormData:null,wm=typeof Blob<"u"?Blob:null,km={isBrowser:!0,classes:{URLSearchParams:ym,FormData:vm,Blob:wm},protocols:["http","https","file","blob","url","data"]},to=typeof window<"u"&&typeof document<"u",Ya=typeof navigator=="object"&&navigator||void 0,bm=to&&(!Ya||["ReactNative","NativeScript","NS"].indexOf(Ya.product)<0),Nm=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jm=to&&window.location.href||"http://localhost",Sm=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:to,hasStandardBrowserEnv:bm,hasStandardBrowserWebWorkerEnv:Nm,navigator:Ya,origin:jm},Symbol.toStringTag,{value:"Module"})),we={...Sm,...km};function Cm(e,t){return wl(e,new we.classes.URLSearchParams,{visitor:function(n,r,s,a){return we.isNode&&v.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function Em(e){return v.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _m(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r=n.length;return i=!i&&v.isArray(s)?s.length:i,u?(v.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!o):((!s[i]||!v.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],a)&&v.isArray(s[i])&&(s[i]=_m(s[i])),!o)}if(v.isFormData(e)&&v.isFunction(e.entries)){const n={};return v.forEachEntry(e,(r,s)=>{t(Em(r),s,n,0)}),n}return null}function Rm(e,t,n){if(v.isString(e))try{return(t||JSON.parse)(e),v.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Kr={transitional:hf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=v.isObject(t);if(a&&v.isHTMLForm(t)&&(t=new FormData(t)),v.isFormData(t))return s?JSON.stringify(mf(t)):t;if(v.isArrayBuffer(t)||v.isBuffer(t)||v.isStream(t)||v.isFile(t)||v.isBlob(t)||v.isReadableStream(t))return t;if(v.isArrayBufferView(t))return t.buffer;if(v.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Cm(t,this.formSerializer).toString();if((o=v.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return wl(o?{"files[]":t}:t,u&&new u,this.formSerializer)}}return a||s?(n.setContentType("application/json",!1),Rm(t)):t}],transformResponse:[function(t){const n=this.transitional||Kr.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(v.isResponse(t)||v.isReadableStream(t))return t;if(t&&v.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(o){if(i)throw o.name==="SyntaxError"?$.from(o,$.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:we.classes.FormData,Blob:we.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};v.forEach(["delete","get","head","post","put","patch"],e=>{Kr.headers[e]={}});const Pm=v.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Tm=e=>{const t={};let n,r,s;return e&&e.split(` +`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Pm[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Cu=Symbol("internals");function ir(e){return e&&String(e).trim().toLowerCase()}function Es(e){return e===!1||e==null?e:v.isArray(e)?e.map(Es):String(e)}function Lm(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Om=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Xl(e,t,n,r,s){if(v.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!v.isString(t)){if(v.isString(r))return t.indexOf(r)!==-1;if(v.isRegExp(r))return r.test(t)}}function Mm(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Dm(e,t){const n=v.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,a,i){return this[r].call(this,t,s,a,i)},configurable:!0})})}let De=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(o,u,c){const f=ir(u);if(!f)throw new Error("header name must be a non-empty string");const m=v.findKey(s,f);(!m||s[m]===void 0||c===!0||c===void 0&&s[m]!==!1)&&(s[m||u]=Es(o))}const i=(o,u)=>v.forEach(o,(c,f)=>a(c,f,u));if(v.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(v.isString(t)&&(t=t.trim())&&!Om(t))i(Tm(t),n);else if(v.isObject(t)&&v.isIterable(t)){let o={},u,c;for(const f of t){if(!v.isArray(f))throw TypeError("Object iterator must return a key-value pair");o[c=f[0]]=(u=o[c])?v.isArray(u)?[...u,f[1]]:[u,f[1]]:f[1]}i(o,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=ir(t),t){const r=v.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Lm(s);if(v.isFunction(n))return n.call(this,s,r);if(v.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ir(t),t){const r=v.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Xl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(i){if(i=ir(i),i){const o=v.findKey(r,i);o&&(!n||Xl(r,r[o],o,n))&&(delete r[o],s=!0)}}return v.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||Xl(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return v.forEach(this,(s,a)=>{const i=v.findKey(r,a);if(i){n[i]=Es(s),delete n[a];return}const o=t?Mm(a):String(a).trim();o!==a&&delete n[a],n[o]=Es(s),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return v.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&v.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Cu]=this[Cu]={accessors:{}}).accessors,s=this.prototype;function a(i){const o=ir(i);r[o]||(Dm(s,i),r[o]=!0)}return v.isArray(t)?t.forEach(a):a(t),this}};De.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);v.reduceDescriptors(De.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});v.freezeMethods(De);function Yl(e,t){const n=this||Kr,r=t||n,s=De.from(r.headers);let a=r.data;return v.forEach(e,function(o){a=o.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function xf(e){return!!(e&&e.__CANCEL__)}function Gn(e,t,n){$.call(this,e??"canceled",$.ERR_CANCELED,t,n),this.name="CanceledError"}v.inherits(Gn,$,{__CANCEL__:!0});function gf(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new $("Request failed with status code "+n.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function zm(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Am(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),f=r[a];i||(i=c),n[s]=u,r[s]=c;let m=a,x=0;for(;m!==s;)x+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),c-i{n=f,s=null,a&&(clearTimeout(a),a=null),e(...c)};return[(...c)=>{const f=Date.now(),m=f-n;m>=r?i(c,f):(s=c,a||(a=setTimeout(()=>{a=null,i(s)},r-m)))},()=>s&&i(s)]}const Zs=(e,t,n=3)=>{let r=0;const s=Am(50,250);return Fm(a=>{const i=a.loaded,o=a.lengthComputable?a.total:void 0,u=i-r,c=s(u),f=i<=o;r=i;const m={loaded:i,total:o,progress:o?i/o:void 0,bytes:u,rate:c||void 0,estimated:c&&o&&f?(o-i)/c:void 0,event:a,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(m)},n)},Eu=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},_u=e=>(...t)=>v.asap(()=>e(...t)),Im=we.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,we.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(we.origin),we.navigator&&/(msie|trident)/i.test(we.navigator.userAgent)):()=>!0,Um=we.hasStandardBrowserEnv?{write(e,t,n,r,s,a,i){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];v.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),v.isString(r)&&o.push(`path=${r}`),v.isString(s)&&o.push(`domain=${s}`),a===!0&&o.push("secure"),v.isString(i)&&o.push(`SameSite=${i}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function $m(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Vm(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function yf(e,t,n){let r=!$m(t);return e&&(r||n==!1)?Vm(e,t):t}const Ru=e=>e instanceof De?{...e}:e;function fn(e,t){t=t||{};const n={};function r(c,f,m,x){return v.isPlainObject(c)&&v.isPlainObject(f)?v.merge.call({caseless:x},c,f):v.isPlainObject(f)?v.merge({},f):v.isArray(f)?f.slice():f}function s(c,f,m,x){if(v.isUndefined(f)){if(!v.isUndefined(c))return r(void 0,c,m,x)}else return r(c,f,m,x)}function a(c,f){if(!v.isUndefined(f))return r(void 0,f)}function i(c,f){if(v.isUndefined(f)){if(!v.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function o(c,f,m){if(m in t)return r(c,f);if(m in e)return r(void 0,c)}const u={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:o,headers:(c,f,m)=>s(Ru(c),Ru(f),m,!0)};return v.forEach(Object.keys({...e,...t}),function(f){const m=u[f]||s,x=m(e[f],t[f],f);v.isUndefined(x)&&m!==o||(n[f]=x)}),n}const vf=e=>{const t=fn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:a,headers:i,auth:o}=t;if(t.headers=i=De.from(i),t.url=pf(yf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&i.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),v.isFormData(n)){if(we.hasStandardBrowserEnv||we.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(v.isFunction(n.getHeaders)){const u=n.getHeaders(),c=["content-type","content-length"];Object.entries(u).forEach(([f,m])=>{c.includes(f.toLowerCase())&&i.set(f,m)})}}if(we.hasStandardBrowserEnv&&(r&&v.isFunction(r)&&(r=r(t)),r||r!==!1&&Im(t.url))){const u=s&&a&&Um.read(a);u&&i.set(s,u)}return t},Bm=typeof XMLHttpRequest<"u",Hm=Bm&&function(e){return new Promise(function(n,r){const s=vf(e);let a=s.data;const i=De.from(s.headers).normalize();let{responseType:o,onUploadProgress:u,onDownloadProgress:c}=s,f,m,x,y,g;function k(){y&&y(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let S=new XMLHttpRequest;S.open(s.method.toUpperCase(),s.url,!0),S.timeout=s.timeout;function p(){if(!S)return;const h=De.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),C={data:!o||o==="text"||o==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:h,config:e,request:S};gf(function(P){n(P),k()},function(P){r(P),k()},C),S=null}"onloadend"in S?S.onloadend=p:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(p)},S.onabort=function(){S&&(r(new $("Request aborted",$.ECONNABORTED,e,S)),S=null)},S.onerror=function(N){const C=N&&N.message?N.message:"Network Error",L=new $(C,$.ERR_NETWORK,e,S);L.event=N||null,r(L),S=null},S.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const C=s.transitional||hf;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),r(new $(N,C.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,e,S)),S=null},a===void 0&&i.setContentType(null),"setRequestHeader"in S&&v.forEach(i.toJSON(),function(N,C){S.setRequestHeader(C,N)}),v.isUndefined(s.withCredentials)||(S.withCredentials=!!s.withCredentials),o&&o!=="json"&&(S.responseType=s.responseType),c&&([x,g]=Zs(c,!0),S.addEventListener("progress",x)),u&&S.upload&&([m,y]=Zs(u),S.upload.addEventListener("progress",m),S.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(f=h=>{S&&(r(!h||h.type?new Gn(null,e,S):h),S.abort(),S=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const d=zm(s.url);if(d&&we.protocols.indexOf(d)===-1){r(new $("Unsupported protocol "+d+":",$.ERR_BAD_REQUEST,e));return}S.send(a||null)})},Wm=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const a=function(c){if(!s){s=!0,o();const f=c instanceof Error?c:this.reason;r.abort(f instanceof $?f:new Gn(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,a(new $(`timeout ${t} of ms exceeded`,$.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:u}=r;return u.unsubscribe=()=>v.asap(o),u}},Qm=function*(e,t){let n=e.byteLength;if(n{const s=qm(e,t);let a=0,i,o=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:f}=await s.next();if(c){o(),u.close();return}let m=f.byteLength;if(n){let x=a+=m;n(x)}u.enqueue(new Uint8Array(f))}catch(c){throw o(c),c}},cancel(u){return o(u),s.return()}},{highWaterMark:2})},Tu=64*1024,{isFunction:ps}=v,Jm=(({Request:e,Response:t})=>({Request:e,Response:t}))(v.global),{ReadableStream:Lu,TextEncoder:Ou}=v.global,Mu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Gm=e=>{e=v.merge.call({skipUndefined:!0},Jm,e);const{fetch:t,Request:n,Response:r}=e,s=t?ps(t):typeof fetch=="function",a=ps(n),i=ps(r);if(!s)return!1;const o=s&&ps(Lu),u=s&&(typeof Ou=="function"?(g=>k=>g.encode(k))(new Ou):async g=>new Uint8Array(await new n(g).arrayBuffer())),c=a&&o&&Mu(()=>{let g=!1;const k=new n(we.origin,{body:new Lu,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!k}),f=i&&o&&Mu(()=>v.isReadableStream(new r("").body)),m={stream:f&&(g=>g.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!m[g]&&(m[g]=(k,S)=>{let p=k&&k[g];if(p)return p.call(k);throw new $(`Response type '${g}' is not supported`,$.ERR_NOT_SUPPORT,S)})});const x=async g=>{if(g==null)return 0;if(v.isBlob(g))return g.size;if(v.isSpecCompliantForm(g))return(await new n(we.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(v.isArrayBufferView(g)||v.isArrayBuffer(g))return g.byteLength;if(v.isURLSearchParams(g)&&(g=g+""),v.isString(g))return(await u(g)).byteLength},y=async(g,k)=>{const S=v.toFiniteNumber(g.getContentLength());return S??x(k)};return async g=>{let{url:k,method:S,data:p,signal:d,cancelToken:h,timeout:N,onDownloadProgress:C,onUploadProgress:L,responseType:P,headers:b,withCredentials:U="same-origin",fetchOptions:w}=vf(g),z=t||fetch;P=P?(P+"").toLowerCase():"text";let W=Wm([d,h&&h.toAbortSignal()],N),G=null;const Y=W&&W.unsubscribe&&(()=>{W.unsubscribe()});let j;try{if(L&&c&&S!=="get"&&S!=="head"&&(j=await y(b,p))!==0){let Q=new n(k,{method:"POST",body:p,duplex:"half"}),J;if(v.isFormData(p)&&(J=Q.headers.get("content-type"))&&b.setContentType(J),Q.body){const[Ge,Ee]=Eu(j,Zs(_u(L)));p=Pu(Q.body,Tu,Ge,Ee)}}v.isString(U)||(U=U?"include":"omit");const I=a&&"credentials"in n.prototype,V={...w,signal:W,method:S.toUpperCase(),headers:b.normalize().toJSON(),body:p,duplex:"half",credentials:I?U:void 0};G=a&&new n(k,V);let _=await(a?z(G,w):z(k,V));const M=f&&(P==="stream"||P==="response");if(f&&(C||M&&Y)){const Q={};["status","statusText","headers"].forEach(Ct=>{Q[Ct]=_[Ct]});const J=v.toFiniteNumber(_.headers.get("content-length")),[Ge,Ee]=C&&Eu(J,Zs(_u(C),!0))||[];_=new r(Pu(_.body,Tu,Ge,()=>{Ee&&Ee(),Y&&Y()}),Q)}P=P||"text";let A=await m[v.findKey(m,P)||"text"](_,g);return!M&&Y&&Y(),await new Promise((Q,J)=>{gf(Q,J,{data:A,headers:De.from(_.headers),status:_.status,statusText:_.statusText,config:g,request:G})})}catch(I){throw Y&&Y(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new $("Network Error",$.ERR_NETWORK,g,G),{cause:I.cause||I}):$.from(I,I&&I.code,g,G)}}},Xm=new Map,wf=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let i=a.length,o=i,u,c,f=Xm;for(;o--;)u=a[o],c=f.get(u),c===void 0&&f.set(u,c=o?new Map:Gm(t)),f=c;return c};wf();const no={http:hm,xhr:Hm,fetch:{get:wf}};v.forEach(no,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Du=e=>`- ${e}`,Ym=e=>v.isFunction(e)||e===null||e===!1;function Zm(e,t){e=v.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let i=0;i`adapter ${u} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=n?i.length>1?`since : +`+i.map(Du).join(` +`):" "+Du(i[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s}const kf={getAdapter:Zm,adapters:no};function Zl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gn(null,e)}function zu(e){return Zl(e),e.headers=De.from(e.headers),e.data=Yl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),kf.getAdapter(e.adapter||Kr.adapter,e)(e).then(function(r){return Zl(e),r.data=Yl.call(e,e.transformResponse,r),r.headers=De.from(r.headers),r},function(r){return xf(r)||(Zl(e),r&&r.response&&(r.response.data=Yl.call(e,e.transformResponse,r.response),r.response.headers=De.from(r.response.headers))),Promise.reject(r)})}const bf="1.13.2",kl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{kl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Au={};kl.transitional=function(t,n,r){function s(a,i){return"[Axios v"+bf+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,o)=>{if(t===!1)throw new $(s(i," has been removed"+(n?" in "+n:"")),$.ERR_DEPRECATED);return n&&!Au[i]&&(Au[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,o):!0}};kl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ex(e,t,n){if(typeof e!="object")throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],i=t[a];if(i){const o=e[a],u=o===void 0||i(o,a,e);if(u!==!0)throw new $("option "+a+" must be "+u,$.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new $("Unknown option "+a,$.ERR_BAD_OPTION)}}const _s={assertOptions:ex,validators:kl},ut=_s.validators;let ln=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Su,response:new Su}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=fn(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&_s.assertOptions(r,{silentJSONParsing:ut.transitional(ut.boolean),forcedJSONParsing:ut.transitional(ut.boolean),clarifyTimeoutError:ut.transitional(ut.boolean)},!1),s!=null&&(v.isFunction(s)?n.paramsSerializer={serialize:s}:_s.assertOptions(s,{encode:ut.function,serialize:ut.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),_s.assertOptions(n,{baseUrl:ut.spelling("baseURL"),withXsrfToken:ut.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&v.merge(a.common,a[n.method]);a&&v.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),n.headers=De.concat(i,a);const o=[];let u=!0;this.interceptors.request.forEach(function(k){typeof k.runWhen=="function"&&k.runWhen(n)===!1||(u=u&&k.synchronous,o.unshift(k.fulfilled,k.rejected))});const c=[];this.interceptors.response.forEach(function(k){c.push(k.fulfilled,k.rejected)});let f,m=0,x;if(!u){const g=[zu.bind(this),void 0];for(g.unshift(...o),g.push(...c),x=g.length,f=Promise.resolve(n);m{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(o=>{r.subscribe(o),a=o}).then(s);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,o){r.reason||(r.reason=new Gn(a,i,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Nf(function(s){t=s}),cancel:t}}};function nx(e){return function(n){return e.apply(null,n)}}function rx(e){return v.isObject(e)&&e.isAxiosError===!0}const Za={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Za).forEach(([e,t])=>{Za[t]=e});function jf(e){const t=new ln(e),n=ef(ln.prototype.request,t);return v.extend(n,ln.prototype,t,{allOwnKeys:!0}),v.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return jf(fn(e,s))},n}const D=jf(Kr);D.Axios=ln;D.CanceledError=Gn;D.CancelToken=tx;D.isCancel=xf;D.VERSION=bf;D.toFormData=wl;D.AxiosError=$;D.Cancel=D.CanceledError;D.all=function(t){return Promise.all(t)};D.spread=nx;D.isAxiosError=rx;D.mergeConfig=fn;D.AxiosHeaders=De;D.formToJSON=e=>mf(v.isHTMLForm(e)?new FormData(e):e);D.getAdapter=kf.getAdapter;D.HttpStatusCode=Za;D.default=D;const{Axios:Dx,AxiosError:zx,CanceledError:Ax,isCancel:Fx,CancelToken:Ix,VERSION:Ux,all:$x,Cancel:Vx,isAxiosError:Bx,spread:Hx,toFormData:Wx,AxiosHeaders:Qx,HttpStatusCode:qx,formToJSON:Kx,getAdapter:Jx,mergeConfig:Gx}=D;/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var sx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lx=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),F=(e,t)=>{const n=E.forwardRef(({color:r="currentColor",size:s=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:o="",children:u,...c},f)=>E.createElement("svg",{ref:f,...sx,width:s,height:s,stroke:r,strokeWidth:i?Number(a)*24/Number(s):a,className:["lucide",`lucide-${lx(e)}`,o].join(" "),...c},[...t.map(([m,x])=>E.createElement(m,x)),...Array.isArray(u)?u:[u]]));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ax=F("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ix=F("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sf=F("ArrowDownUp",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ox=F("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pt=F("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ea=F("Briefcase",[["rect",{width:"20",height:"14",x:"2",y:"7",rx:"2",ry:"2",key:"eto64e"}],["path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"zwj3tp"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ir=F("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ux=F("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pn=F("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cx=F("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cf=F("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ef=F("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ta=F("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dx=F("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fx=F("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _f=F("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ei=F("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const px=F("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const el=F("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fr=F("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hx=F("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mx=F("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rf=F("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pf=F("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fu=F("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Iu=F("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tf=F("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ti=F("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xx=F("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gx=F("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const na=F("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Uu=F("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ni=F("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ri=F("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yx=F("Ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Lf=F("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vx=F("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const An=F("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wx=F("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kx=F("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bx=F("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const si=F("Tag",[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Of=F("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mf=F("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $u=F("Unlock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Df=F("UploadCloud",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zf=F("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nx=F("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wt=F("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + * @license lucide-react v0.294.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rt=F("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Af(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t{k(!0);try{const b=await D.get(`${e}/companies?skip=${u*N}&limit=${N}&search=${f}&sort_by=${x}`);a(b.data.items),o(b.data.total)}catch(b){console.error("Failed to fetch companies",b)}finally{k(!1)}};E.useEffect(()=>{const b=setTimeout(C,300);return()=>clearTimeout(b)},[u,f,n,x]);const L=async b=>{p(b);try{await D.post(`${e}/enrich/discover`,{company_id:b}),setTimeout(C,2e3)}catch{alert("Discovery Error")}finally{p(null)}},P=async b=>{p(b);try{await D.post(`${e}/enrich/analyze`,{company_id:b}),setTimeout(C,2e3)}catch{alert("Analysis Error")}finally{p(null)}};return l.jsxs("div",{className:"flex flex-col h-full bg-white dark:bg-slate-900 transition-colors",children:[l.jsxs("div",{className:"flex flex-col md:flex-row gap-4 p-4 border-b border-slate-200 dark:border-slate-800 items-center justify-between bg-slate-50 dark:bg-slate-950/50",children:[l.jsxs("div",{className:"flex items-center gap-2 text-slate-700 dark:text-slate-300 font-bold text-lg",children:[l.jsx(Ir,{className:"h-5 w-5"}),l.jsxs("h2",{children:["Companies (",i,")"]})]}),l.jsxs("div",{className:"flex flex-1 w-full md:w-auto items-center gap-2 max-w-2xl",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(An,{className:"absolute left-3 top-2.5 h-4 w-4 text-slate-400"}),l.jsx("input",{type:"text",placeholder:"Search companies...",className:"w-full pl-10 pr-4 py-2 bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded-md text-sm text-slate-900 dark:text-slate-200 focus:ring-2 focus:ring-blue-500 outline-none",value:f,onChange:b=>{m(b.target.value),c(0)}})]}),l.jsxs("div",{className:"relative flex items-center text-slate-700 dark:text-slate-300",children:[l.jsx(Sf,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 pointer-events-none"}),l.jsxs("select",{value:x,onChange:b=>y(b.target.value),className:"pl-8 pr-4 py-2 appearance-none bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded-md text-sm focus:ring-2 focus:ring-blue-500 outline-none",children:[l.jsx("option",{value:"name_asc",children:"Alphabetical"}),l.jsx("option",{value:"created_desc",children:"Newest First"}),l.jsx("option",{value:"updated_desc",children:"Last Modified"})]})]}),l.jsxs("div",{className:"flex items-center bg-slate-200 dark:bg-slate-800 p-1 rounded-md text-slate-700 dark:text-slate-300",children:[l.jsx("button",{onClick:()=>h("grid"),className:B("p-1.5 rounded",d==="grid"&&"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white"),title:"Grid View",children:l.jsx(Rf,{className:"h-4 w-4"})}),l.jsx("button",{onClick:()=>h("list"),className:B("p-1.5 rounded",d==="list"&&"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white"),title:"List View",children:l.jsx(Pf,{className:"h-4 w-4"})})]}),l.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white text-sm font-bold rounded-md shadow-sm",children:[l.jsx(zf,{className:"h-4 w-4"})," ",l.jsx("span",{className:"hidden md:inline",children:"Import"})]})]})]}),l.jsxs("div",{className:"flex-1 overflow-auto bg-slate-50 dark:bg-slate-950/30",children:[g&&l.jsx("div",{className:"p-4 text-center text-slate-500",children:"Loading companies..."}),s.length===0&&!g?l.jsxs("div",{className:"p-12 text-center text-slate-500",children:[l.jsx(Ir,{className:"h-12 w-12 mx-auto mb-4 opacity-20"}),l.jsx("p",{className:"text-lg font-medium",children:"No companies found"}),l.jsx("p",{className:"text-slate-400 mt-2",children:"Import a list or create one manually to get started."})]}):d==="grid"?l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 p-4",children:s.map(b=>l.jsxs("div",{onClick:()=>t(b.id),className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-lg p-4 hover:shadow-lg transition-all flex flex-col gap-3 group cursor-pointer border-l-4",style:{borderLeftColor:b.status==="ENRICHED"?"#22c55e":b.status==="DISCOVERED"?"#3b82f6":"#94a3b8"},children:[l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(el,{className:B("h-3 w-3 text-slate-300 dark:text-slate-600",b.has_pending_mistakes&&"text-red-500 fill-red-500")}),l.jsx("div",{className:"font-bold text-slate-900 dark:text-white text-sm truncate",title:b.name,children:b.name})]}),l.jsx("div",{className:"flex items-center gap-1 text-[10px] text-slate-500 dark:text-slate-400 font-medium",children:b.city&&b.country?l.jsxs(l.Fragment,{children:[l.jsx(ti,{className:"h-3 w-3"})," ",b.city," ",l.jsxs("span",{className:"text-slate-400",children:["(",b.country,")"]})]}):l.jsx("span",{className:"italic opacity-50",children:"-"})})]}),l.jsx("div",{className:"flex gap-1 ml-2",children:S===b.id?l.jsx(Fu,{className:"h-4 w-4 animate-spin text-blue-500"}):b.status==="NEW"||!b.website||b.website==="k.A."?l.jsx("button",{onClick:U=>{U.stopPropagation(),L(b.id)},className:"p-1.5 bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-400 rounded hover:bg-blue-600 hover:text-white transition-colors",children:l.jsx(An,{className:"h-3.5 w-3.5"})}):l.jsx("button",{onClick:U=>{U.stopPropagation(),P(b.id)},className:"p-1.5 bg-blue-50 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 rounded hover:bg-blue-600 hover:text-white transition-colors",children:l.jsx(Uu,{className:"h-3.5 w-3.5 fill-current"})})})]}),l.jsxs("div",{className:"space-y-2 pt-2 border-t border-slate-100 dark:border-slate-800/50",children:[b.website&&b.website!=="k.A."?l.jsxs("div",{className:"flex items-center gap-2 text-xs text-blue-600 dark:text-blue-400 font-medium truncate",children:[l.jsx(fr,{className:"h-3 w-3"}),l.jsx("span",{children:new URL(b.website).hostname.replace("www.","")})]}):l.jsx("div",{className:"text-xs text-slate-400 italic",children:"No website found"}),l.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-wider truncate",children:b.industry_ai||"Industry Pending"})]})]},b.id))}):l.jsxs("table",{className:"min-w-full divide-y divide-slate-200 dark:divide-slate-800",children:[l.jsx("thead",{className:"bg-slate-100 dark:bg-slate-950/50",children:l.jsxs("tr",{children:[l.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Company"}),l.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Location"}),l.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Website"}),l.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"AI Industry"}),l.jsx("th",{scope:"col",className:"relative px-3 py-3.5",children:l.jsx("span",{className:"sr-only",children:"Actions"})})]})}),l.jsx("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800 bg-white dark:bg-slate-900",children:s.map(b=>l.jsxs("tr",{onClick:()=>t(b.id),className:"hover:bg-slate-50 dark:hover:bg-slate-800/50 cursor-pointer",children:[l.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-slate-900 dark:text-white",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(el,{className:B("h-3 w-3 text-slate-300 dark:text-slate-600",b.has_pending_mistakes&&"text-red-500 fill-red-500")}),l.jsx("span",{children:b.name})]})}),l.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:b.city&&b.country?`${b.city}, (${b.country})`:"-"}),l.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-blue-600 dark:text-blue-400",children:b.website&&b.website!=="k.A."?l.jsx("a",{href:b.website,target:"_blank",rel:"noreferrer",children:new URL(b.website).hostname.replace("www.","")}):"n/a"}),l.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:b.industry_ai||"Pending"}),l.jsx("td",{className:"relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-0",children:S===b.id?l.jsx(Fu,{className:"h-4 w-4 animate-spin text-blue-500"}):b.status==="NEW"||!b.website||b.website==="k.A."?l.jsx("button",{onClick:U=>{U.stopPropagation(),L(b.id)},className:"text-slate-600 dark:text-slate-400 hover:text-blue-600 dark:hover:text-blue-400",children:l.jsx(An,{className:"h-4 w-4"})}):l.jsx("button",{onClick:U=>{U.stopPropagation(),P(b.id)},className:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300",children:l.jsx(Uu,{className:"h-4 w-4 fill-current"})})})]},b.id))})]})]}),l.jsxs("div",{className:"p-3 border-t border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 flex justify-between items-center text-xs text-slate-500 dark:text-slate-400",children:[l.jsxs("span",{children:[i," Companies total"]}),l.jsxs("div",{className:"flex gap-1 items-center",children:[l.jsx("button",{disabled:u===0,onClick:()=>c(b=>b-1),className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-30",children:l.jsx(Cf,{className:"h-4 w-4"})}),l.jsxs("span",{children:["Page ",u+1]}),l.jsx("button",{disabled:(u+1)*N>=i,onClick:()=>c(b=>b+1),className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-30",children:l.jsx(Ef,{className:"h-4 w-4"})})]})]})]})}function Sx({apiBase:e,onCompanyClick:t,onContactClick:n}){const[r,s]=E.useState([]),[a,i]=E.useState(0),[o,u]=E.useState(0),[c,f]=E.useState(""),[m,x]=E.useState("name_asc"),[y,g]=E.useState(!1),[k,S]=E.useState("grid"),p=50,[d,h]=E.useState(!1),[N,C]=E.useState(""),[L,P]=E.useState(null),b=()=>{g(!0),D.get(`${e}/contacts/all?skip=${o*p}&limit=${p}&search=${c}&sort_by=${m}`).then(w=>{s(w.data.items),i(w.data.total)}).finally(()=>g(!1))};E.useEffect(()=>{const w=setTimeout(b,300);return()=>clearTimeout(w)},[o,c,m]);const U=async()=>{if(N){P("Parsing...");try{const z=N.split(` +`).filter(G=>G.trim()).map(G=>{const Y=G.split(/[;,|]+/).map(j=>j.trim());return Y.length<3?null:{company_name:Y[0],first_name:Y[1],last_name:Y[2],email:Y[3]||null,job_title:Y[4]||null}}).filter(Boolean);if(z.length===0){P("Error: No valid contacts found. Format: Company, First, Last, Email");return}P(`Importing ${z.length} contacts...`);const W=await D.post(`${e}/contacts/bulk`,{contacts:z});P(`Success! Added: ${W.data.added}, Created Companies: ${W.data.companies_created}, Skipped: ${W.data.skipped}`),C(""),setTimeout(()=>{h(!1),P(null),b()},2e3)}catch(w){console.error(w),P("Import Failed.")}}};return l.jsxs("div",{className:"flex flex-col h-full bg-white dark:bg-slate-900 transition-colors",children:[l.jsxs("div",{className:"flex flex-col md:flex-row gap-4 p-4 border-b border-slate-200 dark:border-slate-800 items-center justify-between bg-slate-50 dark:bg-slate-950/50",children:[l.jsxs("div",{className:"flex items-center gap-2 text-slate-700 dark:text-slate-300 font-bold text-lg",children:[l.jsx(Wt,{className:"h-5 w-5"}),l.jsxs("h2",{children:["All Contacts (",a,")"]})]}),l.jsxs("div",{className:"flex flex-1 w-full md:w-auto items-center gap-2 max-w-2xl",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(An,{className:"absolute left-3 top-2.5 h-4 w-4 text-slate-400"}),l.jsx("input",{type:"text",placeholder:"Search contacts...",className:"w-full pl-10 pr-4 py-2 bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded-md text-sm text-slate-900 dark:text-slate-200 focus:ring-2 focus:ring-blue-500 outline-none",value:c,onChange:w=>{f(w.target.value),u(0)}})]}),l.jsxs("div",{className:"relative flex items-center text-slate-700 dark:text-slate-300",children:[l.jsx(Sf,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 pointer-events-none"}),l.jsxs("select",{value:m,onChange:w=>x(w.target.value),className:"pl-8 pr-4 py-2 appearance-none bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded-md text-sm focus:ring-2 focus:ring-blue-500 outline-none",children:[l.jsx("option",{value:"name_asc",children:"Alphabetical"}),l.jsx("option",{value:"created_desc",children:"Newest First"}),l.jsx("option",{value:"updated_desc",children:"Last Modified"})]})]}),l.jsxs("div",{className:"flex items-center bg-slate-200 dark:bg-slate-800 p-1 rounded-md text-slate-700 dark:text-slate-300",children:[l.jsx("button",{onClick:()=>S("grid"),className:B("p-1.5 rounded",k==="grid"&&"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white"),title:"Grid View",children:l.jsx(Rf,{className:"h-4 w-4"})}),l.jsx("button",{onClick:()=>S("list"),className:B("p-1.5 rounded",k==="list"&&"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white"),title:"List View",children:l.jsx(Pf,{className:"h-4 w-4"})})]}),l.jsxs("button",{onClick:()=>h(!0),className:"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white text-sm font-bold rounded-md shadow-sm",children:[l.jsx(zf,{className:"h-4 w-4"})," ",l.jsx("span",{className:"hidden md:inline",children:"Import"})]})]})]}),d&&l.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 flex items-center justify-center p-4",children:l.jsxs("div",{className:"bg-white dark:bg-slate-900 rounded-xl shadow-2xl w-full max-w-lg border border-slate-200 dark:border-slate-800 flex flex-col max-h-[90vh]",children:[l.jsxs("div",{className:"p-4 border-b border-slate-200 dark:border-slate-800 flex justify-between items-center",children:[l.jsx("h3",{className:"font-bold text-slate-900 dark:text-white",children:"Bulk Import Contacts"}),l.jsx("button",{onClick:()=>h(!1),className:"text-slate-500 hover:text-red-500",children:l.jsx(rt,{className:"h-5 w-5"})})]}),l.jsxs("div",{className:"p-4 flex-1 overflow-y-auto",children:[l.jsxs("p",{className:"text-sm text-slate-600 dark:text-slate-400 mb-2",children:["Paste CSV data (no header). Format:",l.jsx("br",{}),l.jsx("code",{className:"bg-slate-100 dark:bg-slate-800 px-1 py-0.5 rounded text-xs",children:"Company Name, First Name, Last Name, Email, Job Title"})]}),l.jsx("textarea",{className:"w-full h-48 bg-slate-50 dark:bg-slate-950 border border-slate-300 dark:border-slate-800 rounded p-2 text-xs font-mono text-slate-800 dark:text-slate-200 focus:ring-2 focus:ring-blue-500 outline-none",placeholder:"Acme Corp, John, Doe, john@acme.com, CEO",value:N,onChange:w=>C(w.target.value)}),L&&l.jsx("div",{className:B("mt-2 text-sm font-bold p-2 rounded",L.includes("Success")?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"),children:L})]}),l.jsxs("div",{className:"p-4 border-t border-slate-200 dark:border-slate-800 flex justify-end gap-2",children:[l.jsx("button",{onClick:()=>h(!1),className:"px-4 py-2 text-sm text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white",children:"Cancel"}),l.jsx("button",{onClick:U,className:"px-4 py-2 bg-blue-600 text-white text-sm font-bold rounded hover:bg-blue-500",children:"Run Import"})]})]})}),l.jsxs("div",{className:"flex-1 overflow-auto bg-slate-50 dark:bg-slate-950/30",children:[y&&l.jsx("div",{className:"p-4 text-center text-slate-500",children:"Loading contacts..."}),r.length===0&&!y?l.jsxs("div",{className:"p-12 text-center text-slate-500",children:[l.jsx(Wt,{className:"h-12 w-12 mx-auto mb-4 opacity-20"}),l.jsx("p",{className:"text-lg font-medium",children:"No contacts found"}),l.jsx("p",{className:"text-slate-400 mt-2",children:"Import a list or create one manually to get started."})]}):k==="grid"?l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 p-4",children:r.map(w=>l.jsxs("div",{onClick:()=>n(w.company_id,w.id),className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-lg p-4 hover:shadow-lg transition-all flex flex-col gap-3 group cursor-pointer border-l-4 border-l-slate-400",children:[l.jsxs("div",{className:"font-bold text-slate-900 dark:text-white text-sm",children:[w.title," ",w.first_name," ",w.last_name]}),l.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-400",children:w.job_title||"No Title"}),l.jsxs("div",{className:"space-y-2 pt-2 border-t border-slate-100 dark:border-slate-800/50",children:[l.jsxs("div",{onClick:z=>{z.stopPropagation(),t(w.company_id)},className:"flex items-center gap-2 text-xs font-bold text-slate-600 dark:text-slate-400 hover:text-blue-500 dark:hover:text-blue-400 cursor-pointer",children:[l.jsx(Ir,{className:"h-3 w-3"})," ",w.company_name]}),l.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[l.jsx(Tf,{className:"h-3 w-3"})," ",w.email||"-"]})]})]},w.id))}):l.jsxs("table",{className:"min-w-full divide-y divide-slate-200 dark:divide-slate-800",children:[l.jsx("thead",{className:"bg-slate-100 dark:bg-slate-950/50",children:l.jsxs("tr",{children:[l.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Name"}),l.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Company"}),l.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Email"}),l.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Role"}),l.jsx("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-slate-900 dark:text-white",children:"Status"})]})}),l.jsx("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800 bg-white dark:bg-slate-900",children:r.map(w=>l.jsxs("tr",{onClick:()=>n(w.company_id,w.id),className:"hover:bg-slate-50 dark:hover:bg-slate-800/50 cursor-pointer",children:[l.jsxs("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-slate-900 dark:text-white",children:[w.title," ",w.first_name," ",w.last_name]}),l.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:l.jsx("div",{onClick:z=>{z.stopPropagation(),t(w.company_id)},className:"font-bold text-slate-600 dark:text-slate-400 hover:text-blue-500 dark:hover:text-blue-400 cursor-pointer",children:w.company_name})}),l.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:w.email||"-"}),l.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:w.role||"-"}),l.jsx("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-slate-500 dark:text-slate-400",children:w.status||"-"})]},w.id))})]})]}),l.jsxs("div",{className:"p-3 border-t border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 flex justify-between items-center text-xs text-slate-500 dark:text-slate-400",children:[l.jsxs("span",{children:[a," Contacts total"]}),l.jsxs("div",{className:"flex gap-1 items-center",children:[l.jsx("button",{disabled:o===0,onClick:()=>u(w=>w-1),className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-30",children:l.jsx(Cf,{className:"h-4 w-4"})}),l.jsxs("span",{children:["Page ",o+1]}),l.jsx("button",{disabled:(o+1)*p>=a,onClick:()=>u(w=>w+1),className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 disabled:opacity-30",children:l.jsx(Ef,{className:"h-4 w-4"})})]})]})]})}function Cx({isOpen:e,onClose:t,onSuccess:n,apiBase:r}){const[s,a]=E.useState(""),[i,o]=E.useState(!1);if(!e)return null;const u=async()=>{var f,m;const c=s.split(` +`).map(x=>x.trim()).filter(x=>x.length>0);if(c.length!==0){o(!0);try{await D.post(`${r}/companies/bulk`,{names:c}),a(""),n(),t()}catch(x){console.error(x);const y=((m=(f=x.response)==null?void 0:f.data)==null?void 0:m.detail)||x.message||"Unknown Error";alert(`Import failed: ${y}`)}finally{o(!1)}}};return l.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:l.jsxs("div",{className:"bg-slate-900 border border-slate-700 rounded-xl w-full max-w-lg shadow-2xl",children:[l.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-slate-800",children:[l.jsxs("h3",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[l.jsx(Df,{className:"h-5 w-5 text-blue-400"}),"Quick Import"]}),l.jsx("button",{onClick:t,className:"text-slate-400 hover:text-white",children:l.jsx(rt,{className:"h-5 w-5"})})]}),l.jsxs("div",{className:"p-4 space-y-4",children:[l.jsx("p",{className:"text-sm text-slate-400",children:"Paste company names below (one per line). Duplicates in the database will be skipped automatically."}),l.jsx("textarea",{className:"w-full h-64 bg-slate-950 border border-slate-700 rounded-lg p-3 text-sm text-slate-200 focus:ring-2 focus:ring-blue-600 outline-none font-mono",placeholder:`Company A +Company B +Company C...`,value:s,onChange:c=>a(c.target.value)})]}),l.jsxs("div",{className:"p-4 border-t border-slate-800 flex justify-end gap-3",children:[l.jsx("button",{onClick:t,className:"px-4 py-2 text-sm font-medium text-slate-400 hover:text-white",children:"Cancel"}),l.jsx("button",{onClick:u,disabled:i||!s.trim(),className:"px-4 py-2 bg-blue-600 hover:bg-blue-500 text-white rounded-md text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed",children:i?"Importing...":"Import Companies"})]})]})})}function Ex({contacts:e=[],initialContactId:t,onAddContact:n,onEditContact:r}){const[s,a]=E.useState(null),[i,o]=E.useState(!1);E.useEffect(()=>{if(t&&e.length>0){const y=e.find(g=>g.id===t);y&&(a({...y}),o(!0))}},[t,e]);const u={"Operativer Entscheider":"text-blue-400 border-blue-400/30 bg-blue-900/20","Infrastruktur-Verantwortlicher":"text-orange-400 border-orange-400/30 bg-orange-900/20","Wirtschaftlicher Entscheider":"text-green-400 border-green-400/30 bg-green-900/20","Innovations-Treiber":"text-purple-400 border-purple-400/30 bg-purple-900/20"},c={"":"text-slate-600 italic","Soft Denied":"text-slate-400",Bounced:"text-red-500",Redirect:"text-yellow-500",Interested:"text-green-500","Hard denied":"text-red-700",Init:"text-slate-300","1st Step":"text-blue-300","2nd Step":"text-blue-400","Not replied":"text-slate-500"},f=()=>{a({gender:"männlich",title:"",first_name:"",last_name:"",email:"",job_title:"",language:"De",role:"Operativer Entscheider",status:"",is_primary:!1}),o(!0)},m=y=>{a({...y}),o(!0)},x=()=>{s&&(s.id?r&&r(s):n&&n(s)),o(!1),a(null)};return i&&s?l.jsxs("div",{className:"bg-slate-900/50 rounded-lg p-4 border border-slate-700 space-y-4 animate-in fade-in slide-in-from-bottom-2",children:[l.jsxs("div",{className:"flex justify-between items-center border-b border-slate-700 pb-2 mb-2",children:[l.jsx("h3",{className:"text-sm font-bold text-white",children:s.id?"Edit Contact":"New Contact"}),l.jsx("button",{onClick:()=>o(!1),className:"text-slate-400 hover:text-white",children:l.jsx(rt,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Gender / Salutation"}),l.jsxs("select",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:s.gender,onChange:y=>a({...s,gender:y.target.value}),children:[l.jsx("option",{value:"männlich",children:"Male / Herr"}),l.jsx("option",{value:"weiblich",children:"Female / Frau"})]})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Academic Title"}),l.jsx("input",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:s.title,placeholder:"e.g. Dr., Prof.",onChange:y=>a({...s,title:y.target.value})})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"First Name"}),l.jsx("input",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:s.first_name,onChange:y=>a({...s,first_name:y.target.value})})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Last Name"}),l.jsx("input",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:s.last_name,onChange:y=>a({...s,last_name:y.target.value})})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Email"}),l.jsx("input",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:s.email,onChange:y=>a({...s,email:y.target.value})})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Job Title (Card)"}),l.jsx("input",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:s.job_title,onChange:y=>a({...s,job_title:y.target.value})})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Our Role Interpretation"}),l.jsx("select",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:s.role,onChange:y=>a({...s,role:y.target.value}),children:Object.keys(u).map(y=>l.jsx("option",{value:y,children:y},y))})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Marketing Status"}),l.jsxs("select",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:s.status,onChange:y=>a({...s,status:y.target.value}),children:[l.jsx("option",{value:"",children:""}),Object.keys(c).filter(y=>y!=="").map(y=>l.jsx("option",{value:y,children:y},y))]})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[10px] uppercase text-slate-500 font-bold",children:"Language"}),l.jsxs("select",{className:"w-full bg-slate-800 border border-slate-700 rounded px-2 py-1.5 text-sm text-white focus:border-blue-500 outline-none",value:s.language,onChange:y=>a({...s,language:y.target.value}),children:[l.jsx("option",{value:"De",children:"De"}),l.jsx("option",{value:"En",children:"En"})]})]}),l.jsx("div",{className:"flex items-center pt-5",children:l.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-slate-300 hover:text-white",children:[l.jsx("input",{type:"checkbox",checked:s.is_primary,onChange:y=>a({...s,is_primary:y.target.checked}),className:"rounded border-slate-700 bg-slate-800 text-blue-500 focus:ring-blue-500"}),"Primary Contact"]})})]}),l.jsx("div",{className:"flex gap-2 pt-2",children:l.jsxs("button",{onClick:x,className:"flex-1 bg-blue-600 hover:bg-blue-500 text-white text-sm font-bold py-2 rounded flex items-center justify-center gap-2",children:[l.jsx(Lf,{className:"h-4 w-4"})," Save Contact"]})})]}):l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("h3",{className:"text-sm font-semibold text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[l.jsx(Wt,{className:"h-4 w-4"})," Contacts List"]}),l.jsxs("button",{onClick:f,className:"flex items-center gap-1 px-3 py-1 bg-blue-600/20 text-blue-400 border border-blue-500/30 rounded hover:bg-blue-600 hover:text-white transition-all text-xs font-bold",children:[l.jsx(ni,{className:"h-3.5 w-3.5"})," ADD"]})]}),l.jsx("div",{className:"space-y-3",children:e.length===0?l.jsxs("div",{className:"p-8 rounded-xl border border-dashed border-slate-800 text-center text-slate-600",children:[l.jsx(Wt,{className:"h-8 w-8 mx-auto mb-3 opacity-20"}),l.jsx("p",{className:"text-sm font-medium",children:"No contacts yet."}),l.jsx("p",{className:"text-xs mt-1 opacity-70",children:'Click "ADD" to create the first contact for this account.'})]}):e.map(y=>l.jsxs("div",{className:B("relative bg-slate-800/30 border rounded-lg p-3 transition-all hover:bg-slate-800/50 group cursor-pointer",y.is_primary?"border-blue-500/30 shadow-lg shadow-blue-900/10":"border-slate-800"),onClick:()=>m(y),children:[y.is_primary&&l.jsx("div",{className:"absolute top-2 right-2 text-blue-500",title:"Primary Contact",children:l.jsx(kx,{className:"h-3 w-3 fill-current"})}),l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"p-2 bg-slate-900 rounded-full text-slate-400 shrink-0 mt-1",children:l.jsx(Nx,{className:"h-4 w-4"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[l.jsxs("span",{className:"text-sm font-bold text-slate-200 truncate",children:[y.title?`${y.title} `:"",y.first_name," ",y.last_name]}),l.jsx("span",{className:"text-[10px] text-slate-500 border border-slate-700 px-1 rounded",children:y.language})]}),l.jsx("div",{className:"text-xs text-slate-400 mb-2 truncate font-medium",children:y.job_title}),l.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:l.jsx("span",{className:B("text-[10px] px-1.5 py-0.5 rounded border font-medium",u[y.role]||"text-slate-400 border-slate-700"),children:y.role})}),l.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-slate-500 font-mono",children:[l.jsxs("div",{className:"flex items-center gap-1 truncate",children:[l.jsx(Tf,{className:"h-3 w-3"}),y.email]}),l.jsxs("div",{className:B("flex items-center gap-1 font-bold ml-auto mr-8",c[y.status]),children:[l.jsx(ax,{className:"h-3 w-3"}),y.status||""]})]})]})]})]},y.id))})]})}function _x({companyId:e,initialContactId:t,onClose:n,apiBase:r}){var uo,co,fo;const[s,a]=E.useState(null),[i,o]=E.useState(!1),[u,c]=E.useState(!1),[f,m]=E.useState("overview"),[x,y]=E.useState(!1),[g,k]=E.useState([]),[S,p]=E.useState(""),[d,h]=E.useState(""),[N,C]=E.useState(""),[L,P]=E.useState(""),[b,U]=E.useState(""),[w,z]=E.useState("");E.useEffect(()=>{let T;return u&&(T=setInterval(()=>{Xe(!0)},2e3)),()=>clearInterval(T)},[u,e]),E.useEffect(()=>{m(t?"contacts":"overview")},[t,e]);const[W,G]=E.useState(!1),[Y,j]=E.useState(""),[I,V]=E.useState(!1),[_,M]=E.useState(""),[A,Q]=E.useState(!1),[J,Ge]=E.useState(""),[Ee,Ct]=E.useState([]),[ht,mt]=E.useState(!1),[ro,so]=E.useState(""),Xe=(T=!1)=>{if(!e)return;T||o(!0);const pe=D.get(`${r}/companies/${e}`),be=D.get(`${r}/mistakes?company_id=${e}`);Promise.all([pe,be]).then(([Ae,Nl])=>{var Xn,Yn;const Jt=Ae.data;if(a(Jt),k(Nl.data.items),u){const Gt=(Xn=Jt.enrichment_data)==null?void 0:Xn.some(jl=>jl.source_type==="wikipedia"),e0=(Yn=Jt.enrichment_data)==null?void 0:Yn.some(jl=>jl.source_type==="ai_analysis");(Gt&&Jt.status==="DISCOVERED"||e0&&Jt.status==="ENRICHED")&&c(!1)}}).catch(console.error).finally(()=>{T||o(!1)})};E.useEffect(()=>{Xe(),G(!1),V(!1),Q(!1),mt(!1),c(!1),D.get(`${r}/industries`).then(T=>Ct(T.data)).catch(console.error)},[e]);const Ff=async()=>{if(e){c(!0);try{await D.post(`${r}/enrich/discover`,{company_id:e})}catch(T){console.error(T),c(!1)}}},If=async()=>{if(e){c(!0);try{await D.post(`${r}/enrich/analyze`,{company_id:e})}catch(T){console.error(T),c(!1)}}},Uf=()=>{if(!s)return;const T={metadata:{id:s.id,exported_at:new Date().toISOString(),source:"Company Explorer (Robotics Edition)"},company:{name:s.name,website:s.website,status:s.status,industry_ai:s.industry_ai,created_at:s.created_at},quantitative_potential:{calculated_metric_name:s.calculated_metric_name,calculated_metric_value:s.calculated_metric_value,calculated_metric_unit:s.calculated_metric_unit,standardized_metric_value:s.standardized_metric_value,standardized_metric_unit:s.standardized_metric_unit,metric_source:s.metric_source,metric_source_url:s.metric_source_url,metric_proof_text:s.metric_proof_text,metric_confidence:s.metric_confidence,metric_confidence_reason:s.metric_confidence_reason},enrichment:s.enrichment_data,signals:s.signals},pe=new Blob([JSON.stringify(T,null,2)],{type:"application/json"}),be=URL.createObjectURL(pe),Ae=document.createElement("a");Ae.href=be,Ae.download=`company-export-${s.id}-${s.name.replace(/[^a-z0-9]/gi,"_").toLowerCase()}.json`,document.body.appendChild(Ae),Ae.click(),document.body.removeChild(Ae),URL.revokeObjectURL(be)},$f=async()=>{if(e){c(!0);try{await D.post(`${r}/companies/${e}/override/wiki?url=${encodeURIComponent(Y)}`),G(!1),Xe()}catch(T){alert("Update failed"),console.error(T)}finally{c(!1)}}},Vf=async()=>{if(e){c(!0);try{await D.post(`${r}/companies/${e}/override/website?url=${encodeURIComponent(_)}`),V(!1),Xe()}catch(T){alert("Update failed"),console.error(T)}finally{c(!1)}}},Bf=async()=>{if(e){c(!0);try{await D.post(`${r}/companies/${e}/override/impressum?url=${encodeURIComponent(J)}`),Q(!1),Xe()}catch(T){alert("Impressum update failed"),console.error(T)}finally{c(!1)}}},Hf=async()=>{if(e){c(!0);try{await D.put(`${r}/companies/${e}/industry`,{industry_ai:ro}),mt(!1),Xe()}catch(T){alert("Industry update failed"),console.error(T)}finally{c(!1)}}},Wf=async()=>{if(e){c(!0);try{await D.post(`${r}/companies/${e}/reevaluate-wikipedia`)}catch(T){console.error(T),c(!1)}}},Qf=async()=>{var T,pe;if(e&&window.confirm(`Are you sure you want to delete "${s==null?void 0:s.name}"? This action cannot be undone.`))try{await D.delete(`${r}/companies/${e}`),n(),window.location.reload()}catch(be){alert("Failed to delete company: "+(((pe=(T=be.response)==null?void 0:T.data)==null?void 0:pe.detail)||be.message))}},lo=async(T,pe)=>{if(e)try{await D.post(`${r}/enrichment/${e}/${T}/lock?locked=${!pe}`),Xe(!0)}catch(be){console.error("Lock toggle failed",be)}},qf=async()=>{if(e){if(!S){alert("Field Name is required.");return}c(!0);try{const T={field_name:S,wrong_value:d||null,corrected_value:N||null,source_url:L||null,quote:b||null,user_comment:w||null};await D.post(`${r}/companies/${e}/report-mistake`,T),alert("Mistake reported successfully!"),y(!1),p(""),h(""),C(""),P(""),U(""),z(""),Xe(!0)}catch(T){alert("Failed to report mistake."),console.error(T)}finally{c(!1)}}},Kf=async T=>{if(e)try{await D.post(`${r}/contacts`,{...T,company_id:e}),Xe(!0)}catch(pe){alert("Failed to add contact"),console.error(pe)}},Jf=async T=>{if(T.id)try{await D.put(`${r}/contacts/${T.id}`,T),Xe(!0)}catch(pe){alert("Failed to update contact"),console.error(pe)}};if(!e)return null;const _e=(uo=s==null?void 0:s.enrichment_data)==null?void 0:uo.find(T=>T.source_type==="wikipedia"),oe=_e==null?void 0:_e.content,Gf=_e==null?void 0:_e.is_locked,ao=_e==null?void 0:_e.created_at,mn=(co=s==null?void 0:s.enrichment_data)==null?void 0:co.find(T=>T.source_type==="ai_analysis"),Jr=mn==null?void 0:mn.content,io=mn==null?void 0:mn.created_at,Ye=(fo=s==null?void 0:s.enrichment_data)==null?void 0:fo.find(T=>T.source_type==="website_scrape"),bl=Ye==null?void 0:Ye.content,ze=bl==null?void 0:bl.impressum,oo=Ye==null?void 0:Ye.created_at,Xf=()=>{if(!(s!=null&&s.industry_details))return null;const{pains:T,gains:pe,priority:be,notes:Ae}=s.industry_details;return l.jsxs("div",{className:"bg-purple-50 dark:bg-purple-900/10 rounded-xl p-5 border border-purple-100 dark:border-purple-900/50 mb-6",children:[l.jsxs("h3",{className:"text-sm font-semibold text-purple-700 dark:text-purple-300 uppercase tracking-wider mb-3 flex items-center gap-2",children:[l.jsx(Of,{className:"h-4 w-4"})," Strategic Fit (Notion)"]}),l.jsxs("div",{className:"grid gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs text-slate-500 font-bold uppercase",children:"Status:"}),l.jsx("span",{className:B("px-2 py-0.5 rounded text-xs font-bold",be==="Freigegeben"?"bg-green-100 text-green-700":"bg-yellow-100 text-yellow-700"),children:be||"N/A"})]}),T&&l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-red-600 dark:text-red-400 uppercase font-bold tracking-tight mb-1",children:"Pain Points"}),l.jsx("div",{className:"text-sm text-slate-700 dark:text-slate-300 whitespace-pre-line",children:T})]}),pe&&l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-green-600 dark:text-green-400 uppercase font-bold tracking-tight mb-1",children:"Gain Points"}),l.jsx("div",{className:"text-sm text-slate-700 dark:text-slate-300 whitespace-pre-line",children:pe})]}),Ae&&l.jsxs("div",{className:"pt-2 border-t border-purple-200 dark:border-purple-800",children:[l.jsx("div",{className:"text-[10px] text-purple-500 uppercase font-bold tracking-tight",children:"Internal Notes"}),l.jsx("div",{className:"text-xs text-slate-500 italic",children:Ae})]})]})]})},Yf=()=>!(s!=null&&s.ai_opener)&&!(s!=null&&s.ai_opener_secondary)?null:l.jsxs("div",{className:"bg-orange-50 dark:bg-orange-900/10 rounded-xl p-5 border border-orange-100 dark:border-orange-900/50 mb-6",children:[l.jsxs("h3",{className:"text-sm font-semibold text-orange-700 dark:text-orange-300 uppercase tracking-wider mb-3 flex items-center gap-2",children:[l.jsx(Pt,{className:"h-4 w-4"})," Marketing AI (Openers)"]}),l.jsxs("div",{className:"space-y-4",children:[s.ai_opener&&l.jsxs("div",{className:"p-3 bg-white dark:bg-slate-900 rounded border border-orange-200 dark:border-orange-800",children:[l.jsx("div",{className:"flex justify-between items-center mb-1",children:l.jsx("div",{className:"text-[10px] text-orange-600 dark:text-orange-400 uppercase font-bold tracking-tight",children:"Primary: Infrastructure/Cleaning"})}),l.jsxs("div",{className:"text-sm text-slate-700 dark:text-slate-200 leading-relaxed italic",children:['"',s.ai_opener,'"']})]}),s.ai_opener_secondary&&l.jsxs("div",{className:"p-3 bg-white dark:bg-slate-900 rounded border border-orange-200 dark:border-orange-800",children:[l.jsx("div",{className:"flex justify-between items-center mb-1",children:l.jsx("div",{className:"text-[10px] text-orange-600 dark:text-orange-400 uppercase font-bold tracking-tight",children:"Secondary: Service/Logistics"})}),l.jsxs("div",{className:"text-sm text-slate-700 dark:text-slate-200 leading-relaxed italic",children:['"',s.ai_opener_secondary,'"']})]}),l.jsx("p",{className:"text-[10px] text-slate-500 text-center",children:'These sentences are statically pre-calculated for the "First Sentence Matching" strategy.'})]})]}),Zf=()=>{if(!s)return null;const T=s.crm_name||s.crm_website,pe=s.confidence_score!=null||s.data_mismatch_score!=null;if(!T&&!pe)return null;const be=s.confidence_score??0,Ae=s.data_mismatch_score??0,Nl=Gt=>Gt>.8?{bg:"bg-green-100",text:"text-green-700"}:Gt>.5?{bg:"bg-yellow-100",text:"text-yellow-700"}:{bg:"bg-red-100",text:"text-red-700"},Jt=Gt=>Gt<=.3?{bg:"bg-green-100",text:"text-green-700"}:Gt<=.5?{bg:"bg-yellow-100",text:"text-yellow-700"}:{bg:"bg-red-100",text:"text-red-700"},Xn=Nl(be),Yn=Jt(Ae);return l.jsxs("div",{className:"bg-slate-50 dark:bg-slate-950 rounded-lg p-4 border border-slate-200 dark:border-slate-800 mb-6",children:[l.jsx("div",{className:"flex justify-between items-center mb-4",children:l.jsxs("h3",{className:"text-sm font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[l.jsx(vx,{className:"h-4 w-4"})," Data Quality & CRM Sync"]})}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-xs mb-4",children:[l.jsxs("div",{className:"space-y-3 p-3 bg-white dark:bg-slate-900 rounded border border-slate-200 dark:border-slate-800",children:[l.jsx("div",{className:"text-[10px] font-bold text-slate-400 uppercase",children:"AI Quality Scores"}),s.confidence_score!=null&&l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-slate-500 dark:text-slate-400",children:"Classification Confidence"}),l.jsxs("span",{className:B("font-bold px-2 py-0.5 rounded text-xs",Xn.bg,Xn.text),children:[(be*100).toFixed(0),"%"]})]}),s.data_mismatch_score!=null&&l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-slate-500 dark:text-slate-400",children:"CRM Data Match"}),l.jsxs("span",{className:B("font-bold px-2 py-0.5 rounded text-xs",Yn.bg,Yn.text),children:[((1-Ae)*100).toFixed(0),"%"]})]})]}),l.jsxs("div",{className:"p-3 bg-slate-100 dark:bg-slate-800/50 rounded",children:[l.jsx("div",{className:"text-[10px] font-bold text-slate-400 uppercase mb-2",children:"SuperOffice (CRM)"}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-slate-400",children:"Name:"})," ",l.jsx("span",{className:"font-medium break-all",children:s.crm_name||"-"})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-slate-400",children:"Web:"})," ",l.jsx("span",{className:"font-mono break-all",children:s.crm_website||"-"})]})]})]})]}),l.jsx("div",{className:"text-xs",children:l.jsxs("div",{className:"p-3 bg-white dark:bg-slate-900 rounded border border-blue-100 dark:border-blue-900/50",children:[l.jsx("div",{className:"text-[10px] font-bold text-blue-500 uppercase mb-2",children:"Enriched Data (AI)"}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-slate-400",children:"Name:"})," ",l.jsx("span",{className:"font-medium text-slate-900 dark:text-white",children:s.name})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-slate-400",children:"Web:"})," ",l.jsx("span",{className:"font-mono text-blue-600 dark:text-blue-400",children:s.website})]})]})]})})]})};return l.jsx("div",{className:"fixed inset-y-0 right-0 w-full md:w-[600px] bg-white dark:bg-slate-900 border-l border-slate-200 dark:border-slate-800 shadow-2xl transform transition-transform duration-300 ease-in-out z-50 overflow-y-auto",children:i?l.jsx("div",{className:"p-8 text-slate-500",children:"Loading details..."}):s?l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"p-6 border-b border-slate-200 dark:border-slate-800 bg-slate-50/80 dark:bg-slate-950/50 backdrop-blur-sm sticky top-0 z-10",children:[l.jsxs("div",{className:"flex justify-between items-start mb-4",children:[l.jsx("h2",{className:"text-xl font-bold text-slate-900 dark:text-white leading-tight",children:s.name}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:Qf,className:"p-1.5 text-slate-500 hover:text-red-600 dark:hover:text-red-500 transition-colors",title:"Delete Company",children:l.jsx(Mf,{className:"h-4 w-4"})}),l.jsx("button",{onClick:Uf,className:"p-1.5 text-slate-500 hover:text-blue-600 dark:hover:text-blue-400 transition-colors",title:"Export JSON",children:l.jsx(_f,{className:"h-4 w-4"})}),l.jsx("button",{onClick:()=>y(!0),className:"p-1.5 text-slate-500 hover:text-orange-600 dark:hover:text-orange-500 transition-colors",title:"Report a Mistake",children:l.jsx(el,{className:"h-4 w-4"})}),l.jsx("button",{onClick:()=>Xe(!0),className:"p-1.5 text-slate-500 hover:text-slate-900 dark:hover:text-white transition-colors",title:"Refresh",children:l.jsx(ri,{className:B("h-4 w-4",(i||u)&&"animate-spin")})}),l.jsx("button",{onClick:n,className:"p-1.5 text-slate-400 hover:text-slate-900 dark:hover:text-white transition-colors",children:l.jsx(rt,{className:"h-6 w-6"})})]})]}),l.jsx("div",{className:"flex flex-wrap gap-2 text-sm items-center",children:I?l.jsxs("div",{className:"flex items-center gap-1 animate-in fade-in zoom-in duration-200",children:[l.jsx("input",{type:"text",value:_,onChange:T=>M(T.target.value),placeholder:"https://...",className:"bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded px-2 py-0.5 text-[10px] text-slate-900 dark:text-white focus:ring-1 focus:ring-blue-500 outline-none w-48",autoFocus:!0}),l.jsx("button",{onClick:Vf,className:"p-1 bg-green-100 dark:bg-green-900/50 text-green-700 dark:text-green-400 rounded hover:bg-green-200 dark:hover:bg-green-900 transition-colors",children:l.jsx(Pn,{className:"h-3 w-3"})}),l.jsx("button",{onClick:()=>V(!1),className:"p-1 text-slate-500 hover:text-red-500 transition-colors",children:l.jsx(rt,{className:"h-3 w-3"})})]}):l.jsxs("div",{className:"flex items-center gap-2 group",children:[s.website&&s.website!=="k.A."?l.jsxs("a",{href:s.website.startsWith("http")?s.website:`https://${s.website}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors font-medium",children:[l.jsx(fr,{className:"h-3.5 w-3.5"})," ",new URL(s.website.startsWith("http")?s.website:`https://${s.website}`).hostname.replace("www.","")]}):l.jsx("span",{className:"text-slate-500 italic text-xs",children:"No website"}),l.jsx("button",{onClick:()=>{M(s.website&&s.website!=="k.A."?s.website:""),V(!0)},className:"p-1 text-slate-400 hover:text-slate-900 dark:hover:text-white transition-colors opacity-0 group-hover:opacity-100",title:"Edit Website URL",children:l.jsx(na,{className:"h-3 w-3"})})]})}),g.length>0&&l.jsxs("div",{className:"mt-4 p-4 bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800/50 rounded-lg",children:[l.jsxs("h4",{className:"flex items-center gap-2 text-sm font-bold text-orange-800 dark:text-orange-300 mb-3",children:[l.jsx(ix,{className:"h-4 w-4"}),"Existing Correction Proposals"]}),l.jsx("div",{className:"space-y-3 max-h-40 overflow-y-auto pr-2",children:g.map(T=>l.jsxs("div",{className:"text-xs p-3 bg-white dark:bg-slate-800/50 rounded border border-slate-200 dark:border-slate-700/50",children:[l.jsxs("div",{className:"flex justify-between items-start",children:[l.jsx("span",{className:"font-bold text-slate-800 dark:text-slate-200",children:T.field_name}),l.jsx("span",{className:B("px-2 py-0.5 rounded-full text-[9px] font-medium",{"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/50 dark:text-yellow-300":T.status==="PENDING","bg-green-100 text-green-800 dark:bg-green-900/50 dark:text-green-300":T.status==="APPROVED","bg-red-100 text-red-800 dark:bg-red-900/50 dark:text-red-300":T.status==="REJECTED"}),children:T.status})]}),l.jsxs("p",{className:"text-slate-600 dark:text-slate-400 mt-1",children:[l.jsx("span",{className:"line-through text-red-500/80",children:T.wrong_value||"N/A"})," → ",l.jsx("strong",{className:"text-green-600 dark:text-green-400",children:T.corrected_value||"N/A"})]}),T.user_comment&&l.jsxs("p",{className:"mt-2 text-slate-500 italic",children:['"',T.user_comment,'"']})]},T.id))})]}),x&&l.jsxs("div",{className:"mt-4 p-4 bg-slate-100 dark:bg-slate-800 rounded border border-slate-200 dark:border-slate-700 animate-in slide-in-from-top-2",children:[l.jsxs("h4",{className:"text-sm font-bold mb-3 flex justify-between items-center",children:["Report a Data Error",l.jsx("button",{onClick:()=>y(!1),className:"text-slate-400 hover:text-red-500",children:l.jsx(rt,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-[10px] uppercase font-bold text-slate-500 mb-1",children:"Field Name (Required)"}),l.jsx("input",{className:"w-full text-xs p-2 rounded border dark:bg-slate-900 dark:border-slate-700",value:S,onChange:T=>p(T.target.value),placeholder:"e.g. Revenue, Employee Count"})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-[10px] uppercase font-bold text-slate-500 mb-1",children:"Wrong Value"}),l.jsx("input",{className:"w-full text-xs p-2 rounded border dark:bg-slate-900 dark:border-slate-700",value:d,onChange:T=>h(T.target.value)})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-[10px] uppercase font-bold text-slate-500 mb-1",children:"Correct Value"}),l.jsx("input",{className:"w-full text-xs p-2 rounded border dark:bg-slate-900 dark:border-slate-700",value:N,onChange:T=>C(T.target.value)})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-[10px] uppercase font-bold text-slate-500 mb-1",children:"Source URL / Proof"}),l.jsx("input",{className:"w-full text-xs p-2 rounded border dark:bg-slate-900 dark:border-slate-700",value:L,onChange:T=>P(T.target.value)})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-[10px] uppercase font-bold text-slate-500 mb-1",children:"Comment"}),l.jsx("textarea",{className:"w-full text-xs p-2 rounded border dark:bg-slate-900 dark:border-slate-700",rows:2,value:w,onChange:T=>z(T.target.value)})]}),l.jsx("button",{onClick:qf,disabled:u,className:"w-full bg-orange-600 hover:bg-orange-700 text-white py-2 rounded text-xs font-bold",children:"SUBMIT REPORT"})]})]}),l.jsxs("div",{className:"mt-6 flex border-b border-slate-200 dark:border-slate-800",children:[l.jsx("button",{onClick:()=>m("overview"),className:B("px-4 py-2 text-sm font-medium transition-colors border-b-2",f==="overview"?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-slate-500 dark:text-slate-400 hover:text-slate-800 dark:hover:text-slate-200"),children:"Overview"}),l.jsxs("button",{onClick:()=>m("contacts"),className:B("px-4 py-2 text-sm font-medium transition-colors border-b-2 flex items-center gap-2",f==="contacts"?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-slate-500 dark:text-slate-400 hover:text-slate-800 dark:hover:text-slate-200"),children:["Contacts",s.contacts&&s.contacts.length>0&&l.jsx("span",{className:"bg-slate-200 dark:bg-slate-800 text-slate-600 dark:text-slate-300 px-1.5 py-0.5 rounded-full text-[10px] min-w-[1.25rem] text-center",children:s.contacts.length})]})]})]}),l.jsxs("div",{className:"p-6 space-y-8 bg-white dark:bg-slate-900",children:[f==="overview"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex gap-2 mb-6",children:[l.jsxs("button",{onClick:Ff,disabled:u,className:"flex-1 flex items-center justify-center gap-2 bg-white dark:bg-slate-800 hover:bg-slate-50 dark:hover:bg-slate-700 disabled:opacity-50 text-slate-700 dark:text-white text-xs font-bold py-2 rounded-md border border-slate-200 dark:border-slate-700 transition-all shadow-sm",children:[l.jsx(An,{className:"h-3.5 w-3.5"}),u?"Processing...":"DISCOVER"]}),l.jsxs("button",{onClick:If,disabled:u||!s.website||s.website==="k.A.",className:"flex-1 flex items-center justify-center gap-2 bg-blue-600 hover:bg-blue-500 disabled:opacity-50 text-white text-xs font-bold py-2 rounded-md transition-all shadow-lg shadow-blue-900/20",children:[l.jsx(Pt,{className:"h-3.5 w-3.5"}),u?"Analyzing...":"ANALYZE POTENTIAL"]})]}),Zf(),Xf(),Yf(),l.jsxs("div",{className:"bg-slate-50 dark:bg-slate-950 rounded-lg p-4 border border-slate-200 dark:border-slate-800 flex flex-col gap-2",children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-1 bg-white dark:bg-slate-800 rounded text-slate-400",children:l.jsx(ea,{className:"h-3 w-3"})}),l.jsx("span",{className:"text-[10px] uppercase font-bold text-slate-500 tracking-wider",children:"Official Legal Data"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[oo&&l.jsxs("div",{className:"text-[10px] text-slate-500 flex items-center gap-1",children:[l.jsx(ta,{className:"h-3 w-3"})," ",new Date(oo).toLocaleDateString()]}),Ye&&l.jsx("button",{onClick:()=>lo("website_scrape",Ye.is_locked||!1),className:B("p-1 rounded transition-colors",Ye.is_locked?"text-green-600 dark:text-green-400 hover:text-green-700":"text-slate-400 hover:text-slate-900 dark:hover:text-white"),title:Ye.is_locked?"Data Locked":"Unlocked",children:Ye.is_locked?l.jsx(Iu,{className:"h-3.5 w-3.5"}):l.jsx($u,{className:"h-3.5 w-3.5"})}),A?l.jsxs("div",{className:"flex items-center gap-1 animate-in fade-in zoom-in duration-200",children:[l.jsx("button",{onClick:Bf,className:"p-1 bg-green-100 dark:bg-green-900/50 text-green-600 dark:text-green-400 rounded hover:bg-green-200 dark:hover:bg-green-900 transition-colors",children:l.jsx(Pn,{className:"h-3 w-3"})}),l.jsx("button",{onClick:()=>Q(!1),className:"p-1 text-slate-500 hover:text-red-500 transition-colors",children:l.jsx(rt,{className:"h-3 w-3"})})]}):l.jsx("button",{onClick:()=>{Ge(""),Q(!0)},className:"p-1 text-slate-400 hover:text-slate-900 dark:hover:text-white transition-colors",title:"Set Impressum URL Manually",children:l.jsx(na,{className:"h-3 w-3"})})]})]}),A&&l.jsx("div",{className:"mb-2 animate-in slide-in-from-top-1 duration-200",children:l.jsx("input",{type:"text",value:J,onChange:T=>Ge(T.target.value),placeholder:"https://.../impressum",className:"w-full bg-white dark:bg-slate-900 border border-slate-300 dark:border-slate-700 rounded px-2 py-1 text-xs text-slate-900 dark:text-white focus:ring-1 focus:ring-blue-500 outline-none",autoFocus:!0})}),ze?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"text-sm font-medium text-slate-900 dark:text-white",children:ze.legal_name||"Unknown Legal Name"}),l.jsxs("div",{className:"flex items-start gap-2 text-xs text-slate-500 dark:text-slate-400",children:[l.jsx(ti,{className:"h-3 w-3 mt-0.5 shrink-0"}),l.jsxs("div",{children:[l.jsx("div",{children:ze.street}),l.jsxs("div",{children:[ze.zip," ",ze.city]})]})]}),(ze.email||ze.phone)&&l.jsxs("div",{className:"mt-2 pt-2 border-t border-slate-200 dark:border-slate-900 flex flex-wrap gap-4 text-[10px] text-slate-500 font-mono",children:[ze.email&&l.jsx("span",{children:ze.email}),ze.phone&&l.jsx("span",{children:ze.phone}),ze.vat_id&&l.jsxs("span",{className:"text-blue-600 dark:text-blue-400/80",children:["VAT: ",ze.vat_id]})]})]}):!A&&l.jsx("div",{className:"text-[10px] text-slate-500 italic py-2",children:"No legal data found. Click pencil to provide direct Impressum link."})]}),l.jsx("div",{className:"bg-blue-50/50 dark:bg-blue-900/10 rounded-xl p-5 border border-blue-100 dark:border-blue-900/50 mb-6",children:l.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-blue-600 dark:text-blue-400 uppercase font-bold tracking-tight mb-2",children:"Industry Focus"}),ht?l.jsxs("div",{className:"space-y-2",children:[l.jsxs("select",{value:ro,onChange:T=>so(T.target.value),className:"w-full bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded px-2 py-1.5 text-sm text-slate-900 dark:text-white focus:ring-1 focus:ring-blue-500 outline-none",autoFocus:!0,children:[l.jsx("option",{value:"Others",children:"Others"}),Ee.map(T=>l.jsx("option",{value:T.name,children:T.name},T.id))]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs("button",{onClick:Hf,className:"flex-1 px-3 py-1.5 bg-blue-600 text-white rounded text-xs font-medium hover:bg-blue-700 transition-colors flex items-center justify-center gap-2",children:[l.jsx(Pn,{className:"h-3.5 w-3.5"})," Save & Re-Extract"]}),l.jsx("button",{onClick:()=>mt(!1),className:"px-3 py-1.5 bg-slate-200 dark:bg-slate-700 text-slate-700 dark:text-slate-300 rounded text-xs font-medium hover:bg-slate-300 dark:hover:bg-slate-600 transition-colors",children:l.jsx(rt,{className:"h-3.5 w-3.5"})})]})]}):l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-2 bg-white dark:bg-slate-800 rounded-lg shadow-sm",children:l.jsx(ea,{className:"h-5 w-5 text-blue-600 dark:text-blue-400"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-sm font-semibold text-slate-900 dark:text-white",children:s.industry_ai||"Not Classified"}),l.jsx("button",{onClick:()=>{so(s.industry_ai||"Others"),mt(!0)},className:"text-xs text-blue-600 dark:text-blue-400 hover:underline",children:"Change Industry & Re-Extract"})]})]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight mb-2",children:"Analysis Status"}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-2 bg-white dark:bg-slate-800 rounded-lg shadow-sm",children:l.jsx(Pt,{className:"h-5 w-5 text-slate-500"})}),l.jsx("div",{className:B("px-3 py-1 rounded-full text-xs font-bold",s.status==="ENRICHED"?"bg-green-100 text-green-700 border border-green-200":s.status==="DISCOVERED"?"bg-blue-100 text-blue-700 border border-blue-200":"bg-slate-100 text-slate-600 border border-slate-200"),children:s.status})]})]})]})}),Jr&&l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("h3",{className:"text-sm font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[l.jsx(Pt,{className:"h-4 w-4"})," AI Strategic Dossier"]}),io&&l.jsxs("div",{className:"text-[10px] text-slate-500 flex items-center gap-1",children:[l.jsx(ta,{className:"h-3 w-3"})," ",new Date(io).toLocaleDateString()]})]}),l.jsxs("div",{className:"bg-white dark:bg-slate-800/30 rounded-xl p-5 border border-slate-200 dark:border-slate-800/50 space-y-4 shadow-sm",children:[l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-blue-600 dark:text-blue-400 uppercase font-bold tracking-tight mb-1",children:"Business Model"}),l.jsx("p",{className:"text-sm text-slate-700 dark:text-slate-200 leading-relaxed",children:Jr.business_model||"No summary available."})]}),Jr.infrastructure_evidence&&l.jsxs("div",{className:"pt-4 border-t border-slate-200 dark:border-slate-800/50",children:[l.jsx("div",{className:"text-[10px] text-orange-600 dark:text-orange-400 uppercase font-bold tracking-tight mb-1",children:"Infrastructure Evidence"}),l.jsxs("p",{className:"text-sm text-slate-600 dark:text-slate-300 italic leading-relaxed",children:['"',Jr.infrastructure_evidence,'"']})]})]})]}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("h3",{className:"text-sm font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider flex items-center gap-2",children:[l.jsx(fr,{className:"h-4 w-4"})," Company Profile (Wikipedia)"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[ao&&l.jsxs("div",{className:"text-[10px] text-slate-500 flex items-center gap-1 mr-2",children:[l.jsx(ta,{className:"h-3 w-3"})," ",new Date(ao).toLocaleDateString()]}),_e&&l.jsx("button",{onClick:()=>lo("wikipedia",_e.is_locked||!1),className:B("p-1 rounded transition-colors mr-1",_e.is_locked?"text-green-600 dark:text-green-400 hover:text-green-700":"text-slate-400 hover:text-slate-900 dark:hover:text-white"),title:_e.is_locked?"Wiki Data Locked":"Wiki Data Unlocked",children:_e.is_locked?l.jsx(Iu,{className:"h-3.5 w-3.5"}):l.jsx($u,{className:"h-3.5 w-3.5"})}),l.jsx("button",{onClick:Wf,disabled:u,className:"p-1 text-slate-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors disabled:opacity-50",title:"Re-run metric extraction from Wikipedia text",children:l.jsx(ri,{className:B("h-3.5 w-3.5",u&&"animate-spin")})}),W?l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("button",{onClick:$f,className:"p-1 bg-green-100 dark:bg-green-900/50 text-green-600 dark:text-green-400 rounded hover:bg-green-200 dark:hover:bg-green-900 transition-colors",title:"Save & Rescan",children:l.jsx(Pn,{className:"h-3.5 w-3.5"})}),l.jsx("button",{onClick:()=>G(!1),className:"p-1 text-slate-500 hover:text-red-500 transition-colors",title:"Cancel",children:l.jsx(rt,{className:"h-3.5 w-3.5"})})]}):l.jsx("button",{onClick:()=>{j((oe==null?void 0:oe.url)||""),G(!0)},className:"p-1 text-slate-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors",title:"Edit / Override URL",children:l.jsx(na,{className:"h-3.5 w-3.5"})})]})]}),W&&l.jsxs("div",{className:"mb-2",children:[l.jsx("input",{type:"text",value:Y,onChange:T=>j(T.target.value),placeholder:"Paste Wikipedia URL here...",className:"w-full bg-white dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded px-2 py-1 text-sm text-slate-900 dark:text-white focus:ring-1 focus:ring-blue-500 outline-none"}),l.jsx("p",{className:"text-[10px] text-slate-500 mt-1",children:"Paste a valid URL. Saving will trigger a re-scan."})]}),oe&&oe.url!=="k.A."&&!W?l.jsx("div",{children:l.jsxs("div",{className:"bg-white dark:bg-slate-800/30 rounded-xl p-5 border border-slate-200 dark:border-slate-800/50 relative overflow-hidden shadow-sm",children:[l.jsx("div",{className:"absolute top-0 right-0 p-3 opacity-10",children:l.jsx(fr,{className:"h-16 w-16 text-slate-900 dark:text-white"})}),Gf&&l.jsxs("div",{className:"absolute top-2 right-2 flex items-center gap-1 px-1.5 py-0.5 bg-yellow-100 dark:bg-yellow-900/30 border border-yellow-200 dark:border-yellow-800/50 rounded text-[9px] text-yellow-600 dark:text-yellow-500",children:[l.jsx(si,{className:"h-2.5 w-2.5"})," Manual Override"]}),l.jsxs("p",{className:"text-sm text-slate-600 dark:text-slate-300 leading-relaxed italic mb-4",children:['"',oe.first_paragraph,'"']}),l.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-2 bg-slate-100 dark:bg-slate-900 rounded-lg text-blue-500",children:l.jsx(Wt,{className:"h-4 w-4"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"Employees"}),l.jsx("div",{className:"text-sm text-slate-700 dark:text-slate-200 font-medium",children:oe.mitarbeiter||"k.A."})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-2 bg-slate-100 dark:bg-slate-900 rounded-lg text-green-500",children:l.jsx(fx,{className:"h-4 w-4"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"Revenue"}),l.jsx("div",{className:"text-sm text-slate-700 dark:text-slate-200 font-medium",children:oe.umsatz&&oe.umsatz!=="k.A."?`${oe.umsatz} Mio. €`:"k.A."})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-2 bg-slate-100 dark:bg-slate-900 rounded-lg text-orange-500",children:l.jsx(ti,{className:"h-4 w-4"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"Headquarters"}),l.jsxs("div",{className:"text-sm text-slate-700 dark:text-slate-200 font-medium",children:[oe.sitz_stadt,oe.sitz_land?`, ${oe.sitz_land}`:""]})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-2 bg-slate-100 dark:bg-slate-900 rounded-lg text-purple-500",children:l.jsx(ea,{className:"h-4 w-4"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"Wiki Industry"}),l.jsx("div",{className:"text-sm text-slate-700 dark:text-slate-200 font-medium truncate max-w-[150px]",title:oe.branche,children:oe.branche||"k.A."})]})]})]}),oe.categories&&oe.categories!=="k.A."&&l.jsxs("div",{className:"mt-6 pt-5 border-t border-slate-200 dark:border-slate-800/50",children:[l.jsxs("div",{className:"flex items-start gap-2 text-xs text-slate-500 mb-2",children:[l.jsx(si,{className:"h-3 w-3 mt-0.5"})," Categories"]}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:oe.categories.split(",").map(T=>l.jsx("span",{className:"px-2 py-0.5 bg-slate-100 dark:bg-slate-900 text-slate-600 dark:text-slate-400 rounded-full text-[10px] border border-slate-200 dark:border-slate-800",children:T.trim()},T))})]}),l.jsx("div",{className:"mt-4 flex justify-end",children:l.jsxs("a",{href:oe.url,target:"_blank",className:"text-[10px] text-blue-600 dark:text-blue-500 hover:text-blue-500 dark:hover:text-blue-400 flex items-center gap-1 font-bold",children:["WIKIPEDIA ",l.jsx(ei,{className:"h-2.5 w-2.5"})]})})]})}):W?null:l.jsxs("div",{className:"p-4 rounded-xl border border-dashed border-slate-200 dark:border-slate-800 text-center text-slate-500 dark:text-slate-600",children:[l.jsx(fr,{className:"h-5 w-5 mx-auto mb-2 opacity-20"}),l.jsx("p",{className:"text-xs",children:"No Wikipedia profile found yet."})]})]}),l.jsxs("div",{children:[l.jsxs("h3",{className:"text-sm font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider mb-3 flex items-center gap-2",children:[l.jsx(Pt,{className:"h-4 w-4"})," Quantitative Potential"]}),s.calculated_metric_value!=null||s.standardized_metric_value!=null?l.jsxs("div",{className:"bg-slate-50 dark:bg-slate-950 rounded-lg p-4 border border-slate-200 dark:border-slate-800 space-y-4",children:[s.calculated_metric_value!=null&&l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"p-2 bg-white dark:bg-slate-800 rounded-lg text-blue-500 mt-1",children:l.jsx(ux,{className:"h-4 w-4"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:s.calculated_metric_name||"Calculated Metric"}),l.jsxs("div",{className:"text-xl text-slate-900 dark:text-white font-bold",children:[s.calculated_metric_value.toLocaleString("de-DE"),l.jsx("span",{className:"text-sm font-medium text-slate-500 ml-1",children:s.calculated_metric_unit})]})]})]}),s.standardized_metric_value!=null&&l.jsxs("div",{className:"flex items-start gap-3 pt-4 border-t border-slate-200 dark:border-slate-800",children:[l.jsx("div",{className:"p-2 bg-white dark:bg-slate-800 rounded-lg text-green-500 mt-1",children:l.jsx(yx,{className:"h-4 w-4"})}),l.jsxs("div",{children:[l.jsxs("div",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:["Standardized Potential (",s.standardized_metric_unit,")"]}),l.jsxs("div",{className:"text-xl text-green-600 dark:text-green-400 font-bold",children:[s.standardized_metric_value.toLocaleString("de-DE"),l.jsx("span",{className:"text-sm font-medium text-slate-500 ml-1",children:s.standardized_metric_unit})]}),l.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Comparable value for potential analysis."})]})]}),s.metric_source&&l.jsxs("div",{className:"flex justify-between items-center text-[10px] text-slate-500 pt-2 border-t border-slate-200 dark:border-slate-800",children:[s.metric_confidence!=null&&l.jsxs("div",{className:"flex items-center gap-1.5",title:s.metric_confidence_reason||"No reason provided",children:[l.jsx("span",{className:"uppercase font-bold tracking-tight text-[9px]",children:"Confidence:"}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("div",{className:B("h-2 w-2 rounded-full",s.metric_confidence>=.8?"bg-green-500":s.metric_confidence>=.5?"bg-yellow-500":"bg-red-500")}),l.jsxs("span",{className:B("font-medium",s.metric_confidence>=.8?"text-green-700 dark:text-green-400":s.metric_confidence>=.5?"text-yellow-700 dark:text-yellow-400":"text-red-700 dark:text-red-400"),children:[(s.metric_confidence*100).toFixed(0),"%"]})]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(dx,{className:"h-3 w-3"}),l.jsx("span",{children:"Source:"}),l.jsx("span",{title:s.metric_proof_text||"No proof text available",className:"font-medium text-slate-600 dark:text-slate-400 capitalize cursor-help border-b border-dotted border-slate-400",children:s.metric_source}),s.metric_source_url&&l.jsx("a",{href:s.metric_source_url,target:"_blank",rel:"noopener noreferrer",className:"ml-1 text-blue-600 dark:text-blue-400 hover:underline",children:l.jsx(ei,{className:"h-3 w-3 inline"})})]})]})]}):l.jsxs("div",{className:"p-4 rounded-xl border border-dashed border-slate-200 dark:border-slate-800 text-center text-slate-500 dark:text-slate-600",children:[l.jsx(Pt,{className:"h-5 w-5 mx-auto mb-2 opacity-20"}),l.jsx("p",{className:"text-xs",children:"No quantitative data calculated yet."}),l.jsx("p",{className:"text-xs mt-1",children:'Run "Analyze Potential" to extract metrics.'})]})]})]}),f==="contacts"&&l.jsx(Ex,{contacts:s.contacts,initialContactId:t,onAddContact:Kf,onEditContact:Jf})]})]}):l.jsx("div",{className:"p-8 text-red-400",children:"Failed to load data."})})}function Rx({apiBase:e}){const[t,n]=E.useState([]),[r,s]=E.useState([]),[a,i]=E.useState([]),[o,u]=E.useState(!1),[c,f]=E.useState("all"),[m,x]=E.useState("all"),[y,g]=E.useState(""),[k,S]=E.useState(null),[p,d]=E.useState({subject:"",intro:"",social_proof:""}),h=async()=>{try{const[w,z]=await Promise.all([D.get(`${e}/industries`),D.get(`${e}/matrix/personas`)]);s(w.data),i(z.data)}catch(w){console.error("Failed to fetch metadata:",w)}},N=async()=>{u(!0);try{const w={};c!=="all"&&(w.industry_id=c),m!=="all"&&(w.persona_id=m);const z=await D.get(`${e}/matrix`,{params:w});n(z.data)}catch(w){console.error("Failed to fetch matrix entries:",w)}finally{u(!1)}};E.useEffect(()=>{h()},[]),E.useEffect(()=>{N()},[c,m]);const C=E.useMemo(()=>{if(!y)return t;const w=y.toLowerCase();return t.filter(z=>{var W,G,Y;return z.industry_name.toLowerCase().includes(w)||z.persona_name.toLowerCase().includes(w)||((W=z.subject)==null?void 0:W.toLowerCase().includes(w))||((G=z.intro)==null?void 0:G.toLowerCase().includes(w))||((Y=z.social_proof)==null?void 0:Y.toLowerCase().includes(w))})},[t,y]),L=w=>{S(w.id),d({subject:w.subject||"",intro:w.intro||"",social_proof:w.social_proof||""})},P=()=>{S(null)},b=async w=>{try{await D.put(`${e}/matrix/${w}`,p),n(z=>z.map(W=>W.id===w?{...W,...p}:W)),S(null)}catch(z){alert("Save failed"),console.error(z)}},U=()=>{let w=`${e}/matrix/export`;const z=new URLSearchParams;c!=="all"&&z.append("industry_id",c.toString()),m!=="all"&&z.append("persona_id",m.toString()),z.toString()&&(w+=`?${z.toString()}`),window.open(w,"_blank")};return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3 bg-slate-50 dark:bg-slate-950 p-3 rounded-lg border border-slate-200 dark:border-slate-800",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(px,{className:"h-4 w-4 text-slate-400"}),l.jsx("span",{className:"text-xs font-bold text-slate-500 uppercase",children:"Filters:"})]}),l.jsxs("select",{className:"bg-white dark:bg-slate-900 border border-slate-300 dark:border-slate-700 rounded px-2 py-1.5 text-xs outline-none focus:ring-1 focus:ring-blue-500",value:c,onChange:w=>f(w.target.value==="all"?"all":parseInt(w.target.value)),children:[l.jsx("option",{value:"all",children:"All Industries"}),r.map(w=>l.jsx("option",{value:w.id,children:w.name},w.id))]}),l.jsxs("select",{className:"bg-white dark:bg-slate-900 border border-slate-300 dark:border-slate-700 rounded px-2 py-1.5 text-xs outline-none focus:ring-1 focus:ring-blue-500",value:m,onChange:w=>x(w.target.value==="all"?"all":parseInt(w.target.value)),children:[l.jsx("option",{value:"all",children:"All Personas"}),a.map(w=>l.jsx("option",{value:w.id,children:w.name},w.id))]}),l.jsxs("div",{className:"flex-1 min-w-[200px] relative",children:[l.jsx(An,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-400"}),l.jsx("input",{type:"text",placeholder:"Search in texts...",className:"w-full bg-white dark:bg-slate-900 border border-slate-300 dark:border-slate-700 rounded px-9 py-1.5 text-xs outline-none focus:ring-1 focus:ring-blue-500",value:y,onChange:w=>g(w.target.value)})]}),l.jsxs("button",{onClick:U,className:"flex items-center gap-2 bg-slate-200 dark:bg-slate-800 hover:bg-slate-300 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300 px-3 py-1.5 rounded text-xs font-bold transition-all border border-slate-300 dark:border-slate-700",children:[l.jsx(_f,{className:"h-3.5 w-3.5"}),"EXPORT CSV"]})]}),l.jsx("div",{className:"border border-slate-200 dark:border-slate-800 rounded-lg overflow-hidden bg-white dark:bg-slate-950",children:l.jsxs("table",{className:"w-full text-left text-xs table-fixed",children:[l.jsx("thead",{className:"bg-slate-50 dark:bg-slate-900 border-b border-slate-200 dark:border-slate-800 text-slate-500 font-bold uppercase",children:l.jsxs("tr",{children:[l.jsx("th",{className:"p-3 w-40",children:"Combination"}),l.jsx("th",{className:"p-3 w-1/4",children:"Subject Line"}),l.jsx("th",{className:"p-3 w-1/3",children:"Intro Text"}),l.jsx("th",{className:"p-3",children:"Social Proof"}),l.jsx("th",{className:"p-3 w-20 text-center",children:"Action"})]})}),l.jsx("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-800/50",children:o?l.jsx("tr",{children:l.jsx("td",{colSpan:5,className:"p-12 text-center text-slate-400 italic",children:"Loading matrix entries..."})}):C.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:5,className:"p-12 text-center text-slate-400 italic",children:"No entries found for the selected filters."})}):C.map(w=>l.jsxs("tr",{className:B("group transition-colors",k===w.id?"bg-blue-50/50 dark:bg-blue-900/10":"hover:bg-slate-50/50 dark:hover:bg-slate-900/30"),children:[l.jsxs("td",{className:"p-3 align-top",children:[l.jsx("div",{className:"font-bold text-slate-900 dark:text-white leading-tight mb-1",children:w.industry_name}),l.jsx("div",{className:"text-[10px] text-blue-600 dark:text-blue-400 font-bold uppercase tracking-wider",children:w.persona_name})]}),l.jsx("td",{className:"p-3 align-top",children:k===w.id?l.jsx("input",{className:"w-full bg-white dark:bg-slate-900 border border-blue-300 dark:border-blue-700 rounded p-1.5 outline-none",value:p.subject,onChange:z=>d(W=>({...W,subject:z.target.value}))}):l.jsx("div",{className:"text-slate-700 dark:text-slate-300",children:w.subject||l.jsx("span",{className:"text-slate-400 italic",children:"Empty"})})}),l.jsx("td",{className:"p-3 align-top",children:k===w.id?l.jsx("textarea",{className:"w-full bg-white dark:bg-slate-900 border border-blue-300 dark:border-blue-700 rounded p-1.5 outline-none h-24 text-[11px]",value:p.intro,onChange:z=>d(W=>({...W,intro:z.target.value}))}):l.jsx("div",{className:"text-slate-600 dark:text-slate-400 line-clamp-4 hover:line-clamp-none transition-all",children:w.intro||l.jsx("span",{className:"text-slate-400 italic",children:"Empty"})})}),l.jsx("td",{className:"p-3 align-top",children:k===w.id?l.jsx("textarea",{className:"w-full bg-white dark:bg-slate-900 border border-blue-300 dark:border-blue-700 rounded p-1.5 outline-none h-24 text-[11px]",value:p.social_proof,onChange:z=>d(W=>({...W,social_proof:z.target.value}))}):l.jsx("div",{className:"text-slate-600 dark:text-slate-400 line-clamp-4 hover:line-clamp-none transition-all",children:w.social_proof||l.jsx("span",{className:"text-slate-400 italic",children:"Empty"})})}),l.jsx("td",{className:"p-3 align-top text-center",children:k===w.id?l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("button",{onClick:()=>b(w.id),className:"p-1.5 bg-green-600 text-white rounded hover:bg-green-500 transition-colors shadow-sm",title:"Save Changes",children:l.jsx(Pn,{className:"h-4 w-4"})}),l.jsx("button",{onClick:P,className:"p-1.5 bg-slate-200 dark:bg-slate-800 text-slate-600 dark:text-slate-400 rounded hover:bg-slate-300 dark:hover:bg-slate-700 transition-colors",title:"Cancel",children:l.jsx(rt,{className:"h-4 w-4"})})]}):l.jsx("button",{onClick:()=>L(w),className:"p-2 text-slate-400 hover:text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-full transition-all opacity-0 group-hover:opacity-100",title:"Edit Entry",children:l.jsx(gx,{className:"h-4 w-4"})})})]},w.id))})]})})]})}function Px({isOpen:e,onClose:t,apiBase:n}){const[r,s]=E.useState(localStorage.getItem("roboticsSettingsActiveTab")||"robotics"),[a,i]=E.useState([]),[o,u]=E.useState([]),[c,f]=E.useState([]),[m,x]=E.useState([]),[y,g]=E.useState([]),[k,S]=E.useState("PENDING"),[p,d]=E.useState(!1),[h,N]=E.useState(!1),[C,L]=E.useState(""),P=E.useMemo(()=>{const j=c.reduce((V,_)=>{const M=_.role||"Unassigned";return V[M]||(V[M]=[]),V[M].push(_),V},{});if(!C)return j;const I={};for(const V in j){const _=j[V].filter(M=>M.pattern_value.toLowerCase().includes(C.toLowerCase()));_.length>0&&(I[V]=_)}return I},[c,C]),b=async()=>{d(!0);try{const[j,I,V,_,M]=await Promise.all([D.get(`${n}/robotics/categories`),D.get(`${n}/industries`),D.get(`${n}/job_roles`),D.get(`${n}/job_roles/raw?unmapped_only=true`),D.get(`${n}/mistakes?status=${k}`)]);i(j.data),u(I.data),f(V.data),x(_.data),g(M.data.items)}catch(j){console.error("Failed to fetch settings data:",j),alert("Fehler beim Laden der Settings. Siehe Konsole.")}finally{d(!1)}};E.useEffect(()=>{e&&b()},[e]),E.useEffect(()=>{e&&(async()=>{d(!0);try{const I=await D.get(`${n}/mistakes?status=${k}`);g(I.data.items)}catch(I){console.error(I)}finally{d(!1)}})()},[k]),E.useEffect(()=>{localStorage.setItem("roboticsSettingsActiveTab",r)},[r]);const U=async(j,I,V)=>{d(!0);try{await D.put(`${n}/robotics/categories/${j}`,{description:I,reasoning_guide:V}),b()}catch(_){alert("Update failed"),console.error(_)}finally{d(!1)}},w=async(j,I)=>{d(!0);try{await D.put(`${n}/mistakes/${j}`,{status:I}),b()}catch(V){alert("Failed to update mistake status"),console.error(V)}finally{d(!1)}},z=async()=>{if(window.confirm(`This will send all ${m.length} unmapped job titles to the AI for classification. This may take a few minutes. Continue?`)){N(!0);try{await D.post(`${n}/job_roles/classify-batch`),alert("Batch classification started in the background. The list will update automatically as titles are processed. You can close this window.")}catch(j){alert("Failed to start batch classification."),console.error(j)}finally{N(!1)}}},W=async(j,I,V)=>{const _=c.find(A=>A.id===j);if(!_)return;const M={..._,[I]:V};I==="priority"&&(M.priority=parseInt(V,10));try{await D.put(`${n}/job_roles/${j}`,M),f(c.map(A=>A.id===j?M:A))}catch(A){alert("Failed to update job role"),console.error(A)}},G=async j=>{const I=j||"New Pattern";d(!0);try{await D.post(`${n}/job_roles`,{pattern_type:"exact",pattern_value:I,role:"Influencer",priority:100}),b()}catch(V){alert("Failed to add job role"),console.error(V)}finally{d(!1)}},Y=async j=>{if(window.confirm("Are you sure you want to delete this pattern?")){d(!0);try{await D.delete(`${n}/job_roles/${j}`),b()}catch(I){alert("Failed to delete job role"),console.error(I)}finally{d(!1)}}};return e?l.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm animate-in fade-in duration-200",children:l.jsxs("div",{className:"bg-white dark:bg-slate-900 w-full max-w-4xl max-h-[85vh] rounded-2xl shadow-2xl border border-slate-200 dark:border-slate-800 flex flex-col overflow-hidden",children:[l.jsxs("div",{className:"p-6 border-b border-slate-200 dark:border-slate-800 flex justify-between items-center bg-slate-50 dark:bg-slate-950/50",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-bold text-slate-900 dark:text-white",children:"Settings & Classification Logic"}),l.jsx("p",{className:"text-sm text-slate-500",children:"Define how AI evaluates leads and matches roles."})]}),l.jsx("button",{onClick:t,className:"p-2 hover:bg-slate-200 dark:hover:bg-slate-800 rounded-full transition-colors text-slate-500",children:l.jsx(rt,{className:"h-6 w-6"})})]}),l.jsx("div",{className:"flex flex-shrink-0 border-b border-slate-200 dark:border-slate-800 px-6 bg-white dark:bg-slate-900 overflow-x-auto",children:[{id:"robotics",label:"Robotics Potential",icon:Pt},{id:"industries",label:"Industry Focus",icon:Of},{id:"roles",label:"Job Role Mapping",icon:Wt},{id:"matrix",label:"Marketing Matrix",icon:hx},{id:"mistakes",label:"Reported Mistakes",icon:el}].map(j=>l.jsxs("button",{onClick:()=>s(j.id),className:B("flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 transition-all whitespace-nowrap",r===j.id?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-slate-500 hover:text-slate-800 dark:hover:text-slate-300"),children:[l.jsx(j.icon,{className:"h-4 w-4"})," ",j.label]},j.id))}),l.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6 bg-white dark:bg-slate-900",children:[p&&l.jsx("div",{className:"text-center py-12 text-slate-500",children:"Loading..."}),l.jsx("div",{className:B("grid grid-cols-1 md:grid-cols-2 gap-6",{hidden:p||r!=="robotics"}),children:a.map(j=>l.jsx(Tx,{category:j,onSave:U},j.id))},"robotics-content"),l.jsxs("div",{className:B("space-y-4",{hidden:p||r!=="industries"}),children:[l.jsx("div",{className:"flex justify-between items-center",children:l.jsx("h3",{className:"text-sm font-bold text-slate-700 dark:text-slate-300",children:"Industry Verticals (Synced from Notion)"})}),l.jsx("div",{className:"grid grid-cols-1 gap-3",children:o.map(j=>{var I,V;return l.jsxs("div",{className:"bg-slate-50 dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-lg p-4 flex flex-col gap-3 group relative overflow-hidden",children:[j.notion_id&&l.jsx("div",{className:"absolute top-0 right-0 bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 text-[9px] font-bold px-2 py-0.5 rounded-bl",children:"SYNCED"}),l.jsxs("div",{className:"flex gap-4 items-start pr-12",children:[l.jsx("div",{className:"flex-1",children:l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx("h4",{className:"font-bold text-slate-900 dark:text-white text-sm",children:j.name}),j.priority&&l.jsx("span",{className:B("text-[9px] font-bold px-1.5 py-0.5 rounded uppercase tracking-wider",j.priority==="Freigegeben"?"bg-green-100 text-green-700":"bg-purple-100 text-purple-700"),children:j.priority}),j.ops_focus_secondary&&l.jsx("span",{className:"text-[9px] font-bold px-1.5 py-0.5 rounded uppercase tracking-wider bg-orange-100 text-orange-700 border border-orange-200",children:"SEC-PRODUCT"})]})}),l.jsx("div",{className:"text-right",children:l.jsxs("div",{className:"flex items-center gap-1.5 justify-end",children:[l.jsx("span",{className:B("w-2 h-2 rounded-full",j.is_focus?"bg-green-500":"bg-slate-300 dark:bg-slate-700")}),l.jsx("span",{className:"text-xs text-slate-500",children:j.is_focus?"Focus":"Standard"})]})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("p",{className:"text-xs text-slate-600 dark:text-slate-300 italic whitespace-pre-wrap",children:j.description||"No definition"}),(j.pains||j.gains)&&l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 mt-2",children:[j.pains&&l.jsxs("div",{className:"p-2 bg-red-50/50 dark:bg-red-900/10 rounded border border-red-100 dark:border-red-900/30",children:[l.jsx("div",{className:"text-[9px] font-bold text-red-600 dark:text-red-400 uppercase mb-1",children:"Pains"}),l.jsx("div",{className:"text-[10px] text-slate-600 dark:text-slate-400 line-clamp-3 hover:line-clamp-none transition-all",children:j.pains})]}),j.gains&&l.jsxs("div",{className:"p-2 bg-green-50/50 dark:bg-green-900/10 rounded border border-green-100 dark:border-green-900/30",children:[l.jsx("div",{className:"text-[9px] font-bold text-green-600 dark:text-green-400 uppercase mb-1",children:"Gains"}),l.jsx("div",{className:"text-[10px] text-slate-600 dark:text-slate-400 line-clamp-3 hover:line-clamp-none transition-all",children:j.gains})]})]}),j.notes&&l.jsxs("div",{className:"text-[10px] text-slate-500 border-l-2 border-slate-200 dark:border-slate-800 pl-2 py-1",children:[l.jsx("span",{className:"font-bold uppercase mr-1",children:"Notes:"})," ",j.notes]})]}),l.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-[10px] bg-white dark:bg-slate-900 p-2 rounded border border-slate-200 dark:border-slate-800",children:[l.jsxs("div",{children:[l.jsx("span",{className:"block text-slate-400 font-bold uppercase",children:"Whale >"}),l.jsx("span",{className:"text-slate-700 dark:text-slate-200",children:j.whale_threshold||"-"})]}),l.jsxs("div",{children:[l.jsx("span",{className:"block text-slate-400 font-bold uppercase",children:"Min Req"}),l.jsx("span",{className:"text-slate-700 dark:text-slate-200",children:j.min_requirement||"-"})]}),l.jsxs("div",{children:[l.jsx("span",{className:"block text-slate-400 font-bold uppercase",children:"Unit"}),l.jsx("span",{className:"text-slate-700 dark:text-slate-200 truncate",children:j.scraper_search_term||"-"})]}),l.jsxs("div",{children:[l.jsx("span",{className:"block text-slate-400 font-bold uppercase",children:"Product"}),l.jsx("span",{className:"text-slate-700 dark:text-slate-200 truncate",children:((I=a.find(_=>_.id===j.primary_category_id))==null?void 0:I.name)||"-"}),j.secondary_category_id&&l.jsxs("div",{className:"mt-1 pt-1 border-t border-slate-100 dark:border-slate-800",children:[l.jsx("span",{className:"block text-orange-400 font-bold uppercase text-[9px]",children:"Sec. Prod"}),l.jsx("span",{className:"text-slate-700 dark:text-slate-200 truncate",children:((V=a.find(_=>_.id===j.secondary_category_id))==null?void 0:V.name)||"-"})]})]})]}),j.scraper_keywords&&l.jsxs("div",{className:"text-[10px]",children:[l.jsx("span",{className:"text-slate-400 font-bold uppercase mr-2",children:"Keywords:"}),l.jsx("span",{className:"text-slate-600 dark:text-slate-400 font-mono",children:j.scraper_keywords})]}),j.standardization_logic&&l.jsxs("div",{className:"text-[10px]",children:[l.jsx("span",{className:"text-slate-400 font-bold uppercase mr-2",children:"Standardization:"}),l.jsx("span",{className:"text-slate-600 dark:text-slate-400 font-mono",children:j.standardization_logic})]})]},j.id)})})]},"industries-content"),l.jsxs("div",{className:B("space-y-8",{hidden:p||r!=="roles"}),children:[l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex justify-between items-center gap-4",children:[l.jsx("div",{className:"flex-1",children:l.jsx("input",{type:"text",placeholder:"Search patterns...",value:C,onChange:j=>L(j.target.value),className:"w-full bg-white dark:bg-slate-950 border border-slate-300 dark:border-slate-700 rounded-md px-3 py-1.5 text-xs text-slate-900 dark:text-white focus:ring-1 focus:ring-blue-500 outline-none"})}),l.jsxs("button",{onClick:()=>G(),className:"flex items-center gap-1 px-3 py-1.5 bg-blue-600 hover:bg-blue-500 text-white text-xs font-bold rounded shadow-lg shadow-blue-500/20",children:[l.jsx(ni,{className:"h-3 w-3"})," ADD PATTERN"]})]}),l.jsx("div",{className:"space-y-2",children:Object.keys(P).sort().map(j=>l.jsxs("details",{className:"bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-lg group",open:!!C,children:[l.jsxs("summary",{className:"p-3 cursor-pointer flex justify-between items-center group-hover:bg-slate-50 dark:group-hover:bg-slate-900 transition-colors",children:[l.jsxs("div",{className:"font-semibold text-slate-800 dark:text-slate-200 text-xs",children:[j,l.jsxs("span",{className:"ml-2 text-slate-400 font-normal",children:["(",P[j].length," patterns)"]})]}),l.jsx(cx,{className:"h-4 w-4 text-slate-400 transform group-open:rotate-180 transition-transform"})]}),l.jsx("div",{className:"border-t border-slate-200 dark:border-slate-800",children:l.jsxs("table",{className:"w-full text-left text-xs",children:[l.jsx("thead",{className:"bg-slate-50 dark:bg-slate-900/50 text-slate-500 font-bold uppercase tracking-wider",children:l.jsxs("tr",{children:[l.jsx("th",{className:"p-2",children:"Type"}),l.jsx("th",{className:"p-2",children:"Pattern Value"}),l.jsx("th",{className:"p-2",children:"Priority"}),l.jsx("th",{className:"p-2 w-8"})]})}),l.jsx("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-800/50",children:P[j].map(I=>l.jsxs("tr",{className:"group/row hover:bg-slate-50/50 dark:hover:bg-slate-800/30 transition-colors",children:[l.jsx("td",{className:"p-1.5",children:l.jsxs("select",{className:"w-full bg-transparent border border-transparent hover:border-slate-300 dark:hover:border-slate-700 rounded px-1 py-0.5 text-slate-900 dark:text-slate-200 outline-none focus:border-blue-500",defaultValue:I.pattern_type,onChange:V=>W(I.id,"pattern_type",V.target.value),children:[l.jsx("option",{children:"exact"}),l.jsx("option",{children:"regex"})]})}),l.jsx("td",{className:"p-1.5",children:l.jsx("input",{className:"w-full bg-transparent border border-transparent hover:border-slate-300 dark:hover:border-slate-700 rounded px-1 py-0.5 text-slate-900 dark:text-slate-200 outline-none focus:border-blue-500 font-mono",defaultValue:I.pattern_value,onBlur:V=>W(I.id,"pattern_value",V.target.value)})}),l.jsx("td",{className:"p-1.5",children:l.jsx("input",{type:"number",className:"w-16 bg-transparent border border-transparent hover:border-slate-300 dark:hover:border-slate-700 rounded px-1 py-0.5 text-slate-900 dark:text-slate-200 outline-none focus:border-blue-500 font-mono",defaultValue:I.priority,onBlur:V=>W(I.id,"priority",V.target.value)})}),l.jsx("td",{className:"p-1.5 text-center",children:l.jsx("button",{onClick:()=>Y(I.id),className:"text-slate-400 hover:text-red-500 opacity-0 group-hover/row:opacity-100 transition-all transform hover:scale-110",children:l.jsx(Mf,{className:"h-4 w-4"})})})]},I.id))})]})})]},j))})]}),l.jsxs("div",{className:"space-y-4 pt-4 border-t border-slate-200 dark:border-slate-800",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-bold text-slate-700 dark:text-slate-300",children:"Discovery Inbox"}),l.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-semibold",children:"Unmapped job titles from CRM, prioritized by frequency"})]}),m.length>0&&l.jsxs("button",{onClick:z,disabled:h,className:"flex items-center gap-1 px-3 py-1.5 bg-green-600 hover:bg-green-500 text-white text-xs font-bold rounded shadow-lg shadow-green-500/20 disabled:bg-slate-400 disabled:shadow-none",children:[l.jsx(Pt,{className:"h-3 w-3"}),h?"CLASSIFYING...":`CLASSIFY ${m.length} TITLES`]})]}),l.jsx("div",{className:"bg-slate-50/50 dark:bg-slate-900/20 border border-dashed border-slate-300 dark:border-slate-700 rounded-xl overflow-hidden",children:l.jsxs("table",{className:"w-full text-left text-xs",children:[l.jsx("thead",{className:"bg-slate-100/50 dark:bg-slate-900/80 border-b border-slate-200 dark:border-slate-800 text-slate-400 font-bold uppercase tracking-wider",children:l.jsxs("tr",{children:[l.jsx("th",{className:"p-3",children:"Job Title from CRM"}),l.jsx("th",{className:"p-3 w-20 text-center",children:"Frequency"}),l.jsx("th",{className:"p-3 w-10"})]})}),l.jsxs("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-800/50",children:[m.map(j=>l.jsxs("tr",{className:"group hover:bg-white dark:hover:bg-slate-800 transition-colors",children:[l.jsx("td",{className:"p-3 font-medium text-slate-600 dark:text-slate-400 italic",children:j.title}),l.jsx("td",{className:"p-3 text-center",children:l.jsxs("span",{className:"px-2 py-1 bg-slate-200 dark:bg-slate-800 rounded-full font-bold text-[10px] text-slate-500",children:[j.count,"x"]})}),l.jsx("td",{className:"p-3 text-center",children:l.jsx("button",{onClick:()=>G(j.title),className:"p-1 text-blue-500 hover:bg-blue-100 dark:hover:bg-blue-900/30 rounded transition-all",children:l.jsx(ni,{className:"h-4 w-4"})})})]},j.id)),m.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:3,className:"p-12 text-center text-slate-400 italic",children:"Discovery inbox is empty. Import raw job titles to see data here."})})]})]})})]})]},"roles-content"),l.jsx("div",{className:B("space-y-4",{hidden:p||r!=="matrix"}),children:l.jsx(Rx,{apiBase:n})},"matrix-content"),l.jsxs("div",{className:B("space-y-4",{hidden:p||r!=="mistakes"}),children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("h3",{className:"text-sm font-bold text-slate-700 dark:text-slate-300",children:"Reported Data Mistakes"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs text-slate-500",children:"Filter:"}),l.jsxs("select",{value:k,onChange:j=>S(j.target.value),className:"bg-slate-50 dark:bg-slate-800 border border-slate-300 dark:border-slate-700 rounded-md px-2 py-1 text-xs text-slate-900 dark:text-white focus:ring-1 focus:ring-blue-500 outline-none",children:[l.jsx("option",{value:"PENDING",children:"Pending"}),l.jsx("option",{value:"APPROVED",children:"Approved"}),l.jsx("option",{value:"REJECTED",children:"Rejected"}),l.jsx("option",{value:"ALL",children:"All"})]})]})]}),l.jsx("div",{className:"bg-slate-50 dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-lg overflow-hidden",children:l.jsxs("table",{className:"w-full text-left text-xs",children:[l.jsx("thead",{className:"bg-slate-100 dark:bg-slate-900 border-b border-slate-200 dark:border-slate-800 text-slate-500 font-bold uppercase",children:l.jsxs("tr",{children:[l.jsx("th",{className:"p-3",children:"Company"}),l.jsx("th",{className:"p-3",children:"Field"}),l.jsx("th",{className:"p-3",children:"Wrong Value"}),l.jsx("th",{className:"p-3",children:"Corrected Value"}),l.jsx("th",{className:"p-3",children:"Source / Quote / Comment"}),l.jsx("th",{className:"p-3",children:"Status"}),l.jsx("th",{className:"p-3 w-10",children:"Actions"})]})}),l.jsx("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800",children:y.length>0?y.map(j=>l.jsxs("tr",{className:"group",children:[l.jsx("td",{className:"p-2 font-medium text-slate-900 dark:text-slate-200",children:j.company.name}),l.jsx("td",{className:"p-2 text-slate-700 dark:text-slate-300",children:j.field_name}),l.jsx("td",{className:"p-2 text-red-600 dark:text-red-400",children:j.wrong_value||"-"}),l.jsx("td",{className:"p-2 text-green-600 dark:text-green-400",children:j.corrected_value||"-"}),l.jsxs("td",{className:"p-2 text-slate-500",children:[j.source_url&&l.jsxs("a",{href:j.source_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1 mb-1",children:[l.jsx(ei,{className:"h-3 w-3"})," Source"]}),j.quote&&l.jsxs("p",{className:"italic text-[10px] my-1",children:['"',j.quote,'"']}),j.user_comment&&l.jsxs("p",{className:"text-[10px]",children:["Comment: ",j.user_comment]})]}),l.jsx("td",{className:"p-2",children:l.jsx("span",{className:B("px-2 py-0.5 rounded-full text-[10px] font-semibold",{"bg-yellow-100 text-yellow-700":j.status==="PENDING","bg-green-100 text-green-700":j.status==="APPROVED","bg-red-100 text-red-700":j.status==="REJECTED"}),children:j.status})}),l.jsx("td",{className:"p-2 text-center",children:j.status==="PENDING"&&l.jsxs("div",{className:"flex gap-1 justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:[l.jsx("button",{onClick:()=>w(j.id,"APPROVED"),className:"text-green-600 hover:text-green-700",title:"Approve Mistake",children:l.jsx(Pn,{className:"h-4 w-4"})}),l.jsx("button",{onClick:()=>w(j.id,"REJECTED"),className:"text-red-600 hover:text-red-700",title:"Reject Mistake",children:l.jsx(ox,{className:"h-4 w-4"})})]})})]},j.id)):l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"p-8 text-center text-slate-500 italic",children:"No reported mistakes found."})})})]})})]},"mistakes-content")]})]})}):null}function Tx({category:e,onSave:t}){const[n,r]=E.useState(e.description),[s,a]=E.useState(e.reasoning_guide),[i,o]=E.useState(!1);return E.useEffect(()=>{o(n!==e.description||s!==e.reasoning_guide)},[n,s]),l.jsxs("div",{className:"bg-slate-50 dark:bg-slate-950/50 border border-slate-200 dark:border-slate-800 rounded-xl p-4 flex flex-col gap-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"p-1.5 bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 rounded",children:l.jsx(si,{className:"h-4 w-4"})}),l.jsx("span",{className:"font-bold text-slate-900 dark:text-white uppercase tracking-tight text-sm",children:e.name})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[10px] uppercase font-bold text-slate-500",children:"Definition for LLM"}),l.jsx("textarea",{className:"w-full bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded p-2 text-xs text-slate-800 dark:text-slate-200 focus:ring-1 focus:ring-blue-500 outline-none h-20",value:n,onChange:u=>r(u.target.value)})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("label",{className:"text-[10px] uppercase font-bold text-slate-500",children:"Reasoning Guide (Scoring)"}),l.jsx("textarea",{className:"w-full bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded p-2 text-xs text-slate-800 dark:text-slate-200 focus:ring-1 focus:ring-blue-500 outline-none h-20",value:s,onChange:u=>a(u.target.value)})]}),i&&l.jsxs("button",{onClick:()=>t(e.id,n,s),className:"mt-2 bg-blue-600 hover:bg-blue-500 text-white text-[10px] font-bold py-1.5 rounded transition-all animate-in fade-in flex items-center justify-center gap-1",children:[l.jsx(Lf,{className:"h-3 w-3"})," SAVE CHANGES"]})]})}const gn="/ce/api";function Lx(){const[e,t]=E.useState(0),[n,r]=E.useState(!1),[s,a]=E.useState(!1),[i,o]=E.useState(null),[u,c]=E.useState(null),[f,m]=E.useState(""),[x,y]=E.useState("companies"),[g,k]=E.useState(()=>typeof window<"u"&&window.localStorage&&localStorage.getItem("theme")||"dark");E.useEffect(()=>{g==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem("theme",g)},[g]),E.useEffect(()=>{fetch(`${gn}/health`).then(h=>h.json()).then(h=>m(h.version||"")).catch(()=>m("N/A"))},[]);const S=()=>k(h=>h==="dark"?"light":"dark"),p=h=>{o(h),c(null)},d=()=>{o(null),c(null)};return l.jsxs("div",{className:"min-h-screen bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-200 font-sans transition-colors",children:[l.jsx(Cx,{isOpen:n,onClose:()=>r(!1),apiBase:gn,onSuccess:()=>t(h=>h+1)}),l.jsx(Px,{isOpen:s,onClose:()=>a(!1),apiBase:gn}),l.jsx(_x,{companyId:i,initialContactId:u,onClose:d,apiBase:gn}),l.jsxs("header",{className:"border-b border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900/50 sticky top-0 z-10 backdrop-blur-md",children:[l.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-2 bg-blue-600 rounded-lg",children:l.jsx(mx,{className:"h-6 w-6 text-white"})}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-xl font-bold text-slate-900 dark:text-white tracking-tight",children:"Company Explorer"}),l.jsxs("p",{className:"text-xs text-blue-600 dark:text-blue-400 font-medium",children:["ROBOTICS EDITION ",f&&l.jsxs("span",{className:"text-slate-500 dark:text-slate-600 ml-2",children:["v",f]})]})]})]}),l.jsxs("div",{className:"flex items-center gap-2 md:gap-4",children:[l.jsxs("div",{className:"hidden md:flex bg-slate-100 dark:bg-slate-800 rounded-lg p-1",children:[l.jsxs("button",{onClick:()=>y("companies"),className:B("px-3 py-1.5 rounded-md text-sm font-medium transition-all flex items-center gap-2",x==="companies"?"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-300"),children:[l.jsx(Ir,{className:"h-4 w-4"})," Companies"]}),l.jsxs("button",{onClick:()=>y("contacts"),className:B("px-3 py-1.5 rounded-md text-sm font-medium transition-all flex items-center gap-2",x==="contacts"?"bg-white dark:bg-slate-700 shadow text-blue-600 dark:text-white":"text-slate-500 hover:text-slate-900 dark:hover:text-slate-300"),children:[l.jsx(Wt,{className:"h-4 w-4"})," Contacts"]})]}),l.jsx("div",{className:"h-6 w-px bg-slate-300 dark:bg-slate-700 mx-2 hidden md:block"}),l.jsx("button",{onClick:S,className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-800 rounded-full transition-colors text-slate-500 dark:text-slate-400",title:"Toggle Theme",children:g==="dark"?l.jsx(bx,{className:"h-5 w-5"}):l.jsx(xx,{className:"h-5 w-5"})}),l.jsx("button",{onClick:()=>a(!0),className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-800 rounded-full transition-colors text-slate-500 dark:text-slate-400",title:"Configure Robotics Logic",children:l.jsx(wx,{className:"h-5 w-5"})}),l.jsx("button",{onClick:()=>t(h=>h+1),className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-800 rounded-full transition-colors text-slate-500 dark:text-slate-400",title:"Refresh Data",children:l.jsx(ri,{className:"h-5 w-5"})}),x==="companies"&&l.jsxs("button",{className:"hidden md:flex items-center gap-2 bg-blue-600 hover:bg-blue-500 text-white px-4 py-2 rounded-md font-medium text-sm transition-all shadow-lg shadow-blue-900/20",onClick:()=>r(!0),children:[l.jsx(Df,{className:"h-4 w-4"}),"Import List"]})]})]}),l.jsxs("div",{className:"md:hidden border-t border-slate-200 dark:border-slate-800 flex",children:[l.jsxs("button",{onClick:()=>y("companies"),className:B("flex-1 py-3 text-sm font-medium flex justify-center items-center gap-2 border-b-2",x==="companies"?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-slate-500"),children:[l.jsx(Ir,{className:"h-4 w-4"})," Companies"]}),l.jsxs("button",{onClick:()=>y("contacts"),className:B("flex-1 py-3 text-sm font-medium flex justify-center items-center gap-2 border-b-2",x==="contacts"?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-slate-500"),children:[l.jsx(Wt,{className:"h-4 w-4"})," Contacts"]})]})]}),l.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 h-[calc(100vh-4rem)]",children:l.jsx("div",{className:"bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-xl overflow-hidden shadow-sm dark:shadow-xl h-full",children:x==="companies"?l.jsx(jx,{refreshKey:e,apiBase:gn,onRowClick:p,onImportClick:()=>r(!0)}):l.jsx(Sx,{apiBase:gn,onCompanyClick:h=>{o(h),y("companies")},onContactClick:(h,N)=>{o(h),c(N)}})})})]})}ra.createRoot(document.getElementById("root")).render(l.jsx(g0.StrictMode,{children:l.jsx(Lx,{})})); diff --git a/company-explorer/frontend/dist/index.html b/company-explorer/frontend/dist/index.html new file mode 100644 index 00000000..d9bc2c23 --- /dev/null +++ b/company-explorer/frontend/dist/index.html @@ -0,0 +1,13 @@ + + + + + + Company Explorer (Robotics) + + + + +
+ + diff --git a/company-explorer/frontend/src/components/MarketingMatrixManager.tsx b/company-explorer/frontend/src/components/MarketingMatrixManager.tsx new file mode 100644 index 00000000..bf6e9416 --- /dev/null +++ b/company-explorer/frontend/src/components/MarketingMatrixManager.tsx @@ -0,0 +1,279 @@ +import { useEffect, useState, useMemo } from 'react' +import axios from 'axios' +import { Search, Edit2, X, Check, Filter, Download } from 'lucide-react' +import clsx from 'clsx' + +interface MarketingMatrixManagerProps { + apiBase: string +} + +interface MatrixEntry { + id: number + industry_id: number + persona_id: number + industry_name: string + persona_name: string + subject: string | null + intro: string | null + social_proof: string | null + updated_at: string +} + +interface Industry { + id: number + name: string +} + +interface Persona { + id: number + name: string +} + +export function MarketingMatrixManager({ apiBase }: MarketingMatrixManagerProps) { + const [entries, setEntries] = useState([]) + const [industries, setIndustries] = useState([]) + const [personas, setPersonas] = useState([]) + const [isLoading, setIsLoading] = useState(false) + + // Filters + const [industryFilter, setIndustryFilter] = useState('all') + const [personaFilter, setPersonaFilter] = useState('all') + const [searchTerm, setSearchTerm] = useState('') + + // Editing state + const [editingId, setEditingId] = useState(null) + const [editValues, setEditValues] = useState<{ + subject: string + intro: string + social_proof: string + }>({ subject: '', intro: '', social_proof: '' }) + + const fetchMetadata = async () => { + try { + const [resInd, resPers] = await Promise.all([ + axios.get(`${apiBase}/industries`), + axios.get(`${apiBase}/matrix/personas`) + ]) + setIndustries(resInd.data) + setPersonas(resPers.data) + } catch (e) { + console.error("Failed to fetch metadata:", e) + } + } + + const fetchEntries = async () => { + setIsLoading(true) + try { + const params: any = {} + if (industryFilter !== 'all') params.industry_id = industryFilter + if (personaFilter !== 'all') params.persona_id = personaFilter + + const res = await axios.get(`${apiBase}/matrix`, { params }) + setEntries(res.data) + } catch (e) { + console.error("Failed to fetch matrix entries:", e) + } finally { + setIsLoading(false) + } + } + + useEffect(() => { + fetchMetadata() + }, []) + + useEffect(() => { + fetchEntries() + }, [industryFilter, personaFilter]) + + const filteredEntries = useMemo(() => { + if (!searchTerm) return entries + const s = searchTerm.toLowerCase() + return entries.filter(e => + e.industry_name.toLowerCase().includes(s) || + e.persona_name.toLowerCase().includes(s) || + (e.subject?.toLowerCase().includes(s)) || + (e.intro?.toLowerCase().includes(s)) || + (e.social_proof?.toLowerCase().includes(s)) + ) + }, [entries, searchTerm]) + + const startEditing = (entry: MatrixEntry) => { + setEditingId(entry.id) + setEditValues({ + subject: entry.subject || '', + intro: entry.intro || '', + social_proof: entry.social_proof || '' + }) + } + + const cancelEditing = () => { + setEditingId(null) + } + + const saveEditing = async (id: number) => { + try { + await axios.put(`${apiBase}/matrix/${id}`, editValues) + setEntries(prev => prev.map(e => e.id === id ? { ...e, ...editValues } : e)) + setEditingId(null) + } catch (e) { + alert("Save failed") + console.error(e) + } + } + + const handleDownloadCSV = () => { + let url = `${apiBase}/matrix/export` + const params = new URLSearchParams() + if (industryFilter !== 'all') params.append('industry_id', industryFilter.toString()) + if (personaFilter !== 'all') params.append('persona_id', personaFilter.toString()) + + if (params.toString()) { + url += `?${params.toString()}` + } + + window.open(url, '_blank') + } + + return ( +
+ {/* Toolbar */} +
+
+ + Filters: +
+ + + + + +
+ + setSearchTerm(e.target.value)} + /> +
+ + +
+ + {/* Table */} +
+ + + + + + + + + + + + {isLoading ? ( + + ) : filteredEntries.length === 0 ? ( + + ) : filteredEntries.map(entry => ( + + + + + +
CombinationSubject LineIntro TextSocial ProofAction
Loading matrix entries...
No entries found for the selected filters.
+
{entry.industry_name}
+
{entry.persona_name}
+
+ {editingId === entry.id ? ( + setEditValues(v => ({ ...v, subject: e.target.value }))} + /> + ) : ( +
{entry.subject || Empty}
+ )} +
+ {editingId === entry.id ? ( +