Varun10000 commited on
Commit
5d2180f
Β·
verified Β·
1 Parent(s): 2181bbb

Upload 49 files

Browse files
Files changed (49) hide show
  1. .gitignore +10 -0
  2. Dockerfile +28 -0
  3. README.md +30 -0
  4. backend/.env +3 -0
  5. backend/app/__init__.py +1 -0
  6. backend/app/config.py +20 -0
  7. backend/app/database.py +16 -0
  8. backend/app/main.py +69 -0
  9. backend/app/main_hf.py +45 -0
  10. backend/app/models.py +51 -0
  11. backend/app/routers/__init__.py +1 -0
  12. backend/app/routers/chatbot.py +97 -0
  13. backend/app/routers/health.py +98 -0
  14. backend/app/routers/knowledge_base.py +171 -0
  15. backend/app/routers/rfp_processing.py +185 -0
  16. backend/app/schemas.py +73 -0
  17. backend/app/services/__init__.py +1 -0
  18. backend/app/services/hf_ollama_service.py +125 -0
  19. backend/app/services/huggingface_service.py +100 -0
  20. backend/app/services/pdf_service.py +82 -0
  21. backend/app/services/similarity_service.py +305 -0
  22. backend/requirements.txt +12 -0
  23. frontend/build/_app/env.js +1 -0
  24. frontend/build/_app/immutable/assets/0.szp2DwjZ.css +1 -0
  25. frontend/build/_app/immutable/assets/2.BhOwCb3K.css +1 -0
  26. frontend/build/_app/immutable/assets/3.nLZZFO8x.css +1 -0
  27. frontend/build/_app/immutable/assets/4.DFSjY77Q.css +1 -0
  28. frontend/build/_app/immutable/chunks/BGm1LqbF.js +6 -0
  29. frontend/build/_app/immutable/chunks/BT92UpWj.js +1 -0
  30. frontend/build/_app/immutable/chunks/Bj0ilmBj.js +1 -0
  31. frontend/build/_app/immutable/chunks/CAMnkZV6.js +1 -0
  32. frontend/build/_app/immutable/chunks/CZHqxbHz.js +1 -0
  33. frontend/build/_app/immutable/chunks/ChCjnC3I.js +2 -0
  34. frontend/build/_app/immutable/chunks/Dw-a1Jcz.js +1 -0
  35. frontend/build/_app/immutable/chunks/Rnl2RoQi.js +1 -0
  36. frontend/build/_app/immutable/chunks/masODVgD.js +1 -0
  37. frontend/build/_app/immutable/chunks/tFCoQf30.js +2 -0
  38. frontend/build/_app/immutable/entry/app.awhfrDwS.js +2 -0
  39. frontend/build/_app/immutable/entry/start.Cm-ihup3.js +1 -0
  40. frontend/build/_app/immutable/nodes/0.NVaLwRK8.js +1 -0
  41. frontend/build/_app/immutable/nodes/1.D_MNTp_q.js +1 -0
  42. frontend/build/_app/immutable/nodes/2.BE75OYFf.js +1 -0
  43. frontend/build/_app/immutable/nodes/3.BFRT2aOm.js +1 -0
  44. frontend/build/_app/immutable/nodes/4.CtAip5RQ.js +4 -0
  45. frontend/build/_app/version.json +1 -0
  46. frontend/build/index.html +36 -0
  47. frontend/build/logo.1svg +17 -0
  48. frontend/build/logo.png +0 -0
  49. frontend/build/robots.txt +3 -0
.gitignore ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python
2
+ __pycache__/
3
+ *.pyc
4
+ *.db
5
+
6
+ # Node
7
+ node_modules/
8
+
9
+ # Environment
10
+ .env
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ gcc \
8
+ g++ \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy and install Python dependencies
12
+ COPY backend/requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy application code
16
+ COPY backend/ ./backend/
17
+ COPY frontend/build ./frontend/build
18
+
19
+ # Environment variables
20
+ ENV PYTHONPATH=/app/backend
21
+ ENV DATABASE_URL=sqlite:///./backend/rfp.db
22
+ ENV HUGGINGFACE_MODEL=meta-llama/Llama-3.1-8B
23
+
24
+ # Expose port
25
+ EXPOSE 7860
26
+
27
+ # Start application
28
+ CMD ["uvicorn", "backend.app.main:app", "--host", "0.0.0.0", "--port", "7860"]
README.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: RFP Assistant - Sedna
3
+ emoji: πŸ“„
4
+ colorFrom: purple
5
+ colorTo: blue
6
+ sdk: docker
7
+ pinned: false
8
+ license: other
9
+ ---
10
+
11
+ # RFP Assistant - Sedna Consulting Group
12
+
13
+ AI-powered RFP response management system with intelligent chatbot.
14
+
15
+ ## Features
16
+
17
+ - AI Chatbot powered by Mistral-7B
18
+ - PDF RFP document processing
19
+ - Smart similarity search
20
+ - Knowledge base management
21
+ - Modern professional UI
22
+
23
+ ## Usage
24
+
25
+ 1. Upload your RFP PDF document
26
+ 2. Ask questions using the chatbot
27
+ 3. Process questions to find similar answers
28
+ 4. Generate AI-powered responses
29
+
30
+ Set HUGGINGFACE_API_KEY in Space secrets.
backend/.env ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ ο»ΏDATABASE_URL=sqlite:///./rfp.db
2
+ HUGGINGFACE_API_KEY=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
3
+ HUGGINGFACE_MODEL=meta-llama/Llama-3.1-8B
backend/app/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ # Empty __init__.py files for Python package structure
backend/app/config.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pydantic_settings import BaseSettings
2
+ from pathlib import Path
3
+
4
+ # Get the backend directory path
5
+ BACKEND_DIR = Path(__file__).parent.parent
6
+ ENV_FILE = BACKEND_DIR / ".env"
7
+
8
+ class Settings(BaseSettings):
9
+ DATABASE_URL: str = "sqlite:///./rfp.db"
10
+
11
+ # HuggingFace API settings
12
+ HUGGINGFACE_API_KEY: str = ""
13
+ HUGGINGFACE_MODEL: str = "meta-llama/Llama-3.1-8B"
14
+
15
+ class Config:
16
+ env_file = str(ENV_FILE)
17
+ env_file_encoding = 'utf-8'
18
+ extra = 'ignore' # Ignore extra fields from .env
19
+
20
+ settings = Settings()
backend/app/database.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from sqlalchemy import create_engine
2
+ from sqlalchemy.ext.declarative import declarative_base
3
+ from sqlalchemy.orm import sessionmaker
4
+ from app.config import settings
5
+
6
+ engine = create_engine(settings.DATABASE_URL)
7
+ SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
8
+
9
+ Base = declarative_base()
10
+
11
+ def get_db():
12
+ db = SessionLocal()
13
+ try:
14
+ yield db
15
+ finally:
16
+ db.close()
backend/app/main.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+ from fastapi.middleware.cors import CORSMiddleware
3
+ from fastapi.staticfiles import StaticFiles
4
+ from fastapi.responses import FileResponse
5
+ from app.database import engine, Base
6
+ from app.routers import knowledge_base, rfp_processing, chatbot, health
7
+ from pathlib import Path
8
+ import os
9
+
10
+ # Create database tables
11
+ Base.metadata.create_all(bind=engine)
12
+
13
+ app = FastAPI(
14
+ title="RFP Management System",
15
+ description="AI-powered RFP management with intelligent answer generation",
16
+ version="1.0.0"
17
+ )
18
+
19
+ # CORS middleware for frontend
20
+ app.add_middleware(
21
+ CORSMiddleware,
22
+ allow_origins=["http://localhost:5173", "http://localhost:5174", "http://localhost:3000"], # SvelteKit default ports
23
+ allow_credentials=True,
24
+ allow_methods=["*"],
25
+ allow_headers=["*"],
26
+ )
27
+
28
+ # Include routers
29
+ app.include_router(health.router)
30
+ app.include_router(knowledge_base.router)
31
+ app.include_router(rfp_processing.router)
32
+ app.include_router(chatbot.router)
33
+
34
+ # Serve static frontend files
35
+ FRONTEND_BUILD_DIR = Path(__file__).parent.parent.parent / "frontend" / "build"
36
+
37
+ # Check if we're in deployment (frontend/build exists at different path)
38
+ if not FRONTEND_BUILD_DIR.exists():
39
+ # In Docker deployment, frontend is at /app/frontend/build
40
+ FRONTEND_BUILD_DIR = Path("/app/frontend/build")
41
+
42
+ if FRONTEND_BUILD_DIR.exists():
43
+ # Mount static files
44
+ app.mount("/_app", StaticFiles(directory=str(FRONTEND_BUILD_DIR / "_app")), name="app-assets")
45
+
46
+ # Serve index.html for root and all other routes (SPA fallback)
47
+ @app.get("/")
48
+ async def serve_frontend():
49
+ return FileResponse(str(FRONTEND_BUILD_DIR / "index.html"))
50
+
51
+ @app.get("/{full_path:path}")
52
+ async def serve_spa(full_path: str):
53
+ # Serve static files if they exist
54
+ file_path = FRONTEND_BUILD_DIR / full_path
55
+ if file_path.is_file():
56
+ return FileResponse(str(file_path))
57
+ # Otherwise serve index.html for SPA routing
58
+ return FileResponse(str(FRONTEND_BUILD_DIR / "index.html"))
59
+ else:
60
+ # Fallback if frontend not found
61
+ @app.get("/")
62
+ def read_root():
63
+ return {
64
+ "message": "RFP Management System API",
65
+ "version": "1.0.0",
66
+ "docs": "/docs"
67
+ }
68
+
69
+
backend/app/main_hf.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from fastapi import FastAPI
3
+ from fastapi.middleware.cors import CORSMiddleware
4
+ from fastapi.staticfiles import StaticFiles
5
+ from app.routers import rfp_processing
6
+ from app.routers import knowledge_base
7
+ from app.database import engine, Base
8
+
9
+ # Create tables
10
+ Base.metadata.create_all(bind=engine)
11
+
12
+ app = FastAPI(
13
+ title="Sedna RFP Management System",
14
+ description="AI-powered RFP response generation system",
15
+ version="1.0.0"
16
+ )
17
+
18
+ # CORS middleware
19
+ app.add_middleware(
20
+ CORSMiddleware,
21
+ allow_origins=["*"],
22
+ allow_credentials=True,
23
+ allow_methods=["*"],
24
+ allow_headers=["*"],
25
+ )
26
+
27
+ # Include routers
28
+ app.include_router(knowledge_base.router)
29
+ app.include_router(rfp_processing.router)
30
+
31
+ # Serve frontend static files if available
32
+ if os.path.exists("../frontend/build"):
33
+ app.mount("/", StaticFiles(directory="../frontend/build", html=True), name="frontend")
34
+
35
+ @app.get("/health")
36
+ def health_check():
37
+ return {"status": "healthy"}
38
+
39
+ @app.get("/api/health")
40
+ def api_health_check():
41
+ return {
42
+ "status": "healthy",
43
+ "ai_service": "huggingface",
44
+ "database": "sqlite"
45
+ }
backend/app/models.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from sqlalchemy import Column, Integer, String, Text, DateTime, ForeignKey, Float
2
+ from sqlalchemy.orm import relationship
3
+ from datetime import datetime
4
+ from app.database import Base
5
+
6
+ class RFP(Base):
7
+ __tablename__ = "rfps"
8
+
9
+ id = Column(Integer, primary_key=True, index=True)
10
+ title = Column(String(500), nullable=False)
11
+ description = Column(Text)
12
+ created_at = Column(DateTime, default=datetime.utcnow)
13
+ updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
14
+
15
+ questions = relationship("Question", back_populates="rfp", cascade="all, delete-orphan")
16
+
17
+ class Question(Base):
18
+ __tablename__ = "questions"
19
+
20
+ id = Column(Integer, primary_key=True, index=True)
21
+ rfp_id = Column(Integer, ForeignKey("rfps.id"), nullable=False)
22
+ section = Column(String(200))
23
+ question_id = Column(String(50)) # Custom question ID like "Q1.1"
24
+ question_text = Column(Text, nullable=False)
25
+ answer_text = Column(Text, nullable=False)
26
+ page_start = Column(Integer)
27
+ page_end = Column(Integer)
28
+ created_at = Column(DateTime, default=datetime.utcnow)
29
+ updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
30
+
31
+ rfp = relationship("RFP", back_populates="questions")
32
+ embedding = relationship("QuestionEmbedding", back_populates="question", uselist=False, cascade="all, delete-orphan")
33
+
34
+ class QuestionEmbedding(Base):
35
+ __tablename__ = "question_embeddings"
36
+
37
+ id = Column(Integer, primary_key=True, index=True)
38
+ question_id = Column(Integer, ForeignKey("questions.id"), nullable=False, unique=True)
39
+ embedding = Column(Text, nullable=False) # JSON serialized numpy array
40
+
41
+ question = relationship("Question", back_populates="embedding")
42
+
43
+ class UploadedRFP(Base):
44
+ __tablename__ = "uploaded_rfps"
45
+
46
+ id = Column(Integer, primary_key=True, index=True)
47
+ filename = Column(String(500), nullable=False)
48
+ rfp_name = Column(String(500)) # Friendly name for the RFP
49
+ file_path = Column(String(1000), nullable=False)
50
+ uploaded_at = Column(DateTime, default=datetime.utcnow)
51
+ text_content = Column(Text) # Extracted text from first 3 pages or full document
backend/app/routers/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ # Empty __init__.py files for Python package structure
backend/app/routers/chatbot.py ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import APIRouter, HTTPException
2
+ from pydantic import BaseModel
3
+ from typing import List
4
+ from app.database import get_db
5
+ from app.services.huggingface_service import huggingface_service
6
+ from app.models import UploadedRFP
7
+ import pdfplumber
8
+
9
+ router = APIRouter(prefix="/api/chatbot", tags=["Chatbot"])
10
+
11
+ class ChatMessage(BaseModel):
12
+ role: str
13
+ content: str
14
+
15
+ class ChatRequest(BaseModel):
16
+ message: str
17
+ conversation_history: List[ChatMessage] = []
18
+
19
+ class ChatResponse(BaseModel):
20
+ response: str
21
+
22
+ @router.post("/chat", response_model=ChatResponse)
23
+ async def chat_with_assistant(request: ChatRequest):
24
+ """
25
+ AI chatbot that helps understand uploaded RFPs and answer questions about requirements.
26
+ Uses HuggingFace Inference API with the uploaded RFP content.
27
+ """
28
+ try:
29
+ db = next(get_db())
30
+
31
+ # Get the most recent uploaded RFP
32
+ uploaded_rfp = db.query(UploadedRFP).order_by(UploadedRFP.id.desc()).first()
33
+
34
+ if not uploaded_rfp:
35
+ return ChatResponse(
36
+ response="I don't have access to any uploaded RFPs yet. Please upload an RFP document first so I can help you understand its requirements."
37
+ )
38
+
39
+ # Extract RFP content for context
40
+ rfp_context = ""
41
+ if uploaded_rfp.file_path:
42
+ try:
43
+ with pdfplumber.open(uploaded_rfp.file_path) as pdf:
44
+ # Extract first 5 pages for context
45
+ pages_text = []
46
+ for page in pdf.pages[:5]:
47
+ text = page.extract_text()
48
+ if text:
49
+ pages_text.append(text)
50
+ rfp_context = "\n\n".join(pages_text)
51
+ except Exception as e:
52
+ print(f"Error extracting RFP content: {e}")
53
+ rfp_context = "Unable to extract RFP content"
54
+
55
+ # Create comprehensive prompt for the AI assistant
56
+ system_context = f"""You are an expert RFP assistant for Sedna Consulting Group helping the team understand the uploaded RFP: "{uploaded_rfp.rfp_name}".
57
+
58
+ Answer questions about:
59
+ - RFP requirements and specifications
60
+ - Deadlines and submission guidelines
61
+ - Technical requirements
62
+ - What information Sedna needs to provide
63
+
64
+ Be conversational, professional, and cite specific sections when possible.
65
+
66
+ RFP CONTENT:
67
+ {rfp_context[:3000]}"""
68
+
69
+ # Use HuggingFace Inference API
70
+ print("Using HuggingFace API for chat...")
71
+
72
+ # Build conversation history
73
+ history = [
74
+ {'role': msg.role, 'content': msg.content}
75
+ for msg in request.conversation_history[-6:]
76
+ ]
77
+
78
+ response_text = huggingface_service.generate_chat_response(
79
+ system_prompt=system_context,
80
+ user_message=request.message,
81
+ conversation_history=history,
82
+ max_tokens=800,
83
+ temperature=0.7
84
+ )
85
+
86
+ # If HF returned a diagnostic error string, surface it as a 502 so frontend can show it
87
+ if isinstance(response_text, str) and response_text.startswith("Error:"):
88
+ # Provide actionable details but avoid leaking secrets
89
+ raise HTTPException(status_code=502, detail=response_text)
90
+
91
+ return ChatResponse(response=response_text)
92
+
93
+ except Exception as e:
94
+ print(f"Chatbot error: {e}")
95
+ return ChatResponse(
96
+ response="I apologize, but I encountered an error processing your question. Please try again or be more specific about what section of the RFP you're interested in."
97
+ )
backend/app/routers/health.py ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import APIRouter
2
+ from pydantic import BaseModel
3
+ from app.services.huggingface_service import huggingface_service
4
+ from app.config import settings
5
+
6
+ router = APIRouter(prefix="/api/health", tags=["Health"])
7
+
8
+ class HealthStatus(BaseModel):
9
+ status: str
10
+ message: str
11
+ details: dict = {}
12
+
13
+ @router.get("/", response_model=HealthStatus)
14
+ async def health_check():
15
+ """Basic health check for the API"""
16
+ return HealthStatus(
17
+ status="healthy",
18
+ message="API is running",
19
+ details={"version": "1.0.0"}
20
+ )
21
+
22
+ @router.get("/ai", response_model=HealthStatus)
23
+ async def ai_health_check():
24
+ """
25
+ Check if HuggingFace AI model is accessible and working
26
+ Returns detailed diagnostics about model availability, token validity, etc.
27
+ """
28
+ # Check if service is configured
29
+ if not huggingface_service.is_configured():
30
+ return HealthStatus(
31
+ status="unhealthy",
32
+ message="HuggingFace API key not configured",
33
+ details={
34
+ "model": settings.HUGGINGFACE_MODEL,
35
+ "api_key_set": bool(settings.HUGGINGFACE_API_KEY),
36
+ "recommendation": "Set HUGGINGFACE_API_KEY in Space secrets"
37
+ }
38
+ )
39
+
40
+ # Check model availability using the service's built-in check
41
+ diag = huggingface_service._check_model_available()
42
+
43
+ if diag is None:
44
+ # Model is accessible
45
+ return HealthStatus(
46
+ status="healthy",
47
+ message="AI model is accessible and ready",
48
+ details={
49
+ "model": settings.HUGGINGFACE_MODEL.strip(),
50
+ "api_status": "connected"
51
+ }
52
+ )
53
+ else:
54
+ # Model check failed
55
+ error_msg = str(diag).lower()
56
+
57
+ if "401" in error_msg or "unauthorized" in error_msg:
58
+ return HealthStatus(
59
+ status="unhealthy",
60
+ message="API key unauthorized",
61
+ details={
62
+ "model": settings.HUGGINGFACE_MODEL.strip(),
63
+ "error": diag,
64
+ "recommendation": "Check your HUGGINGFACE_API_KEY token has appropriate permissions"
65
+ }
66
+ )
67
+
68
+ elif "403" in error_msg or "forbidden" in error_msg:
69
+ return HealthStatus(
70
+ status="unhealthy",
71
+ message="Access forbidden - model may be gated",
72
+ details={
73
+ "model": settings.HUGGINGFACE_MODEL.strip(),
74
+ "error": diag,
75
+ "recommendation": f"Ensure you've accepted the model license at https://huggingface.co/{settings.HUGGINGFACE_MODEL.strip()}"
76
+ }
77
+ )
78
+
79
+ elif "503" in error_msg or "loading" in error_msg:
80
+ return HealthStatus(
81
+ status="degraded",
82
+ message="Model is loading",
83
+ details={
84
+ "model": settings.HUGGINGFACE_MODEL.strip(),
85
+ "error": diag,
86
+ "recommendation": "Wait a moment and try again. Model is initializing on HuggingFace servers."
87
+ }
88
+ )
89
+
90
+ else:
91
+ return HealthStatus(
92
+ status="unhealthy",
93
+ message="Error connecting to HuggingFace API",
94
+ details={
95
+ "model": settings.HUGGINGFACE_MODEL.strip(),
96
+ "error": diag
97
+ }
98
+ )
backend/app/routers/knowledge_base.py ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import APIRouter, Depends, HTTPException
2
+ from sqlalchemy.orm import Session
3
+ from typing import List
4
+ from app.database import get_db
5
+ from app.models import RFP, Question
6
+ from app.schemas import (
7
+ RFPCreate, RFPUpdate, RFPResponse,
8
+ QuestionCreate, QuestionUpdate, QuestionResponse, QuestionWithRFP
9
+ )
10
+ from app.services.similarity_service import similarity_service
11
+
12
+ router = APIRouter(prefix="/api/knowledge-base", tags=["Knowledge Base"])
13
+
14
+ # RFP Endpoints
15
+ @router.post("/rfps", response_model=RFPResponse)
16
+ def create_rfp(rfp: RFPCreate, db: Session = Depends(get_db)):
17
+ """Create a new RFP"""
18
+ db_rfp = RFP(**rfp.model_dump())
19
+ db.add(db_rfp)
20
+ db.commit()
21
+ db.refresh(db_rfp)
22
+ return db_rfp
23
+
24
+ @router.get("/rfps", response_model=List[RFPResponse])
25
+ def list_rfps(skip: int = 0, limit: int = 100, db: Session = Depends(get_db)):
26
+ """List all RFPs"""
27
+ rfps = db.query(RFP).offset(skip).limit(limit).all()
28
+ return rfps
29
+
30
+ @router.get("/rfps/{rfp_id}", response_model=RFPResponse)
31
+ def get_rfp(rfp_id: int, db: Session = Depends(get_db)):
32
+ """Get a specific RFP"""
33
+ rfp = db.query(RFP).filter(RFP.id == rfp_id).first()
34
+ if not rfp:
35
+ raise HTTPException(status_code=404, detail="RFP not found")
36
+ return rfp
37
+
38
+ @router.put("/rfps/{rfp_id}", response_model=RFPResponse)
39
+ def update_rfp(rfp_id: int, rfp_update: RFPUpdate, db: Session = Depends(get_db)):
40
+ """Update an RFP"""
41
+ db_rfp = db.query(RFP).filter(RFP.id == rfp_id).first()
42
+ if not db_rfp:
43
+ raise HTTPException(status_code=404, detail="RFP not found")
44
+
45
+ for key, value in rfp_update.model_dump(exclude_unset=True).items():
46
+ setattr(db_rfp, key, value)
47
+
48
+ db.commit()
49
+ db.refresh(db_rfp)
50
+ return db_rfp
51
+
52
+ @router.delete("/rfps/{rfp_id}")
53
+ def delete_rfp(rfp_id: int, db: Session = Depends(get_db)):
54
+ """Delete an RFP and all its questions"""
55
+ db_rfp = db.query(RFP).filter(RFP.id == rfp_id).first()
56
+ if not db_rfp:
57
+ raise HTTPException(status_code=404, detail="RFP not found")
58
+
59
+ db.delete(db_rfp)
60
+ db.commit()
61
+ return {"message": "RFP deleted successfully"}
62
+
63
+ # Question Endpoints
64
+ @router.post("/questions", response_model=QuestionResponse)
65
+ def create_question(question: QuestionCreate, db: Session = Depends(get_db)):
66
+ """Create a new question and generate its embedding"""
67
+ # Verify RFP exists
68
+ rfp = db.query(RFP).filter(RFP.id == question.rfp_id).first()
69
+ if not rfp:
70
+ raise HTTPException(status_code=404, detail="RFP not found")
71
+
72
+ # Create question
73
+ db_question = Question(**question.model_dump())
74
+ db.add(db_question)
75
+ db.commit()
76
+ db.refresh(db_question)
77
+
78
+ # Generate and save embedding immediately
79
+ try:
80
+ print(f"Generating embedding for question {db_question.id}...")
81
+ similarity_service.save_question_embedding(db, db_question.id, db_question.question_text)
82
+ print(f"Embedding generated successfully for question {db_question.id}")
83
+ except Exception as e:
84
+ print(f"ERROR: Failed to generate embedding for question {db_question.id}: {e}")
85
+ # Don't fail the request, but log the error
86
+
87
+ return db_question
88
+
89
+ @router.get("/questions", response_model=List[QuestionWithRFP])
90
+ def list_questions(
91
+ skip: int = 0,
92
+ limit: int = 100,
93
+ rfp_id: int = None,
94
+ db: Session = Depends(get_db)
95
+ ):
96
+ """List all questions, optionally filtered by RFP"""
97
+ query = db.query(Question)
98
+
99
+ if rfp_id:
100
+ query = query.filter(Question.rfp_id == rfp_id)
101
+
102
+ questions = query.offset(skip).limit(limit).all()
103
+ return questions
104
+
105
+ @router.get("/questions/{question_id}", response_model=QuestionWithRFP)
106
+ def get_question(question_id: int, db: Session = Depends(get_db)):
107
+ """Get a specific question"""
108
+ question = db.query(Question).filter(Question.id == question_id).first()
109
+ if not question:
110
+ raise HTTPException(status_code=404, detail="Question not found")
111
+ return question
112
+
113
+ @router.put("/questions/{question_id}", response_model=QuestionResponse)
114
+ def update_question(
115
+ question_id: int,
116
+ question_update: QuestionUpdate,
117
+ db: Session = Depends(get_db)
118
+ ):
119
+ """Update a question and regenerate its embedding if text changed"""
120
+ db_question = db.query(Question).filter(Question.id == question_id).first()
121
+ if not db_question:
122
+ raise HTTPException(status_code=404, detail="Question not found")
123
+
124
+ update_data = question_update.model_dump(exclude_unset=True)
125
+ question_text_changed = "question_text" in update_data
126
+
127
+ for key, value in update_data.items():
128
+ setattr(db_question, key, value)
129
+
130
+ db.commit()
131
+ db.refresh(db_question)
132
+
133
+ # Regenerate embedding if question text changed
134
+ if question_text_changed:
135
+ similarity_service.save_question_embedding(db, db_question.id, db_question.question_text)
136
+
137
+ return db_question
138
+
139
+ @router.delete("/questions/{question_id}")
140
+ def delete_question(question_id: int, db: Session = Depends(get_db)):
141
+ """Delete a question"""
142
+ question = db.query(Question).filter(Question.id == question_id).first()
143
+ if not question:
144
+ raise HTTPException(status_code=404, detail="Question not found")
145
+
146
+ db.delete(question)
147
+ db.commit()
148
+ return {"message": "Question deleted successfully"}
149
+
150
+ @router.post("/generate-embeddings")
151
+ def generate_all_embeddings(db: Session = Depends(get_db)):
152
+ """Generate embeddings for all questions that don't have them"""
153
+ questions = db.query(Question).all()
154
+ generated = 0
155
+ failed = 0
156
+
157
+ for question in questions:
158
+ try:
159
+ similarity_service.save_question_embedding(db, question.id, question.question_text)
160
+ generated += 1
161
+ print(f"Generated embedding for question {question.id}")
162
+ except Exception as e:
163
+ failed += 1
164
+ print(f"Failed to generate embedding for question {question.id}: {e}")
165
+
166
+ return {
167
+ "message": "Embedding generation complete",
168
+ "total_questions": len(questions),
169
+ "generated": generated,
170
+ "failed": failed
171
+ }
backend/app/routers/rfp_processing.py ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import APIRouter, Depends, HTTPException, UploadFile, File
2
+ from sqlalchemy.orm import Session
3
+ from typing import List
4
+ from app.database import get_db
5
+ from app.models import UploadedRFP, Question
6
+ from app.schemas import ProcessQuestionRequest, AIAnswerResponse, SimilarQuestion
7
+ from app.services.pdf_service import pdf_service
8
+ from app.services.similarity_service import similarity_service
9
+ from app.services.huggingface_service import huggingface_service
10
+
11
+ router = APIRouter(prefix="/api/rfp-processing", tags=["RFP Processing"])
12
+
13
+ @router.post("/upload")
14
+ async def upload_rfp(file: UploadFile = File(...), db: Session = Depends(get_db)):
15
+ """Upload a new RFP PDF and extract text from first 3 pages"""
16
+ if not file.filename.endswith('.pdf'):
17
+ raise HTTPException(status_code=400, detail="Only PDF files are allowed")
18
+
19
+ uploaded_rfp = await pdf_service.save_and_extract_pdf(file, db, extract_pages=3)
20
+
21
+ return {
22
+ "id": uploaded_rfp.id,
23
+ "filename": uploaded_rfp.filename,
24
+ "uploaded_at": uploaded_rfp.uploaded_at,
25
+ "text_preview": uploaded_rfp.text_content[:500] + "..." if len(uploaded_rfp.text_content) > 500 else uploaded_rfp.text_content
26
+ }
27
+
28
+ @router.get("/uploaded-rfps")
29
+ def list_uploaded_rfps(skip: int = 0, limit: int = 50, db: Session = Depends(get_db)):
30
+ """List all uploaded RFPs"""
31
+ rfps = db.query(UploadedRFP).offset(skip).limit(limit).all()
32
+ return [
33
+ {
34
+ "id": rfp.id,
35
+ "filename": rfp.filename,
36
+ "rfp_name": rfp.rfp_name if hasattr(rfp, 'rfp_name') and rfp.rfp_name else rfp.filename.rsplit('.', 1)[0],
37
+ "uploaded_at": rfp.uploaded_at
38
+ }
39
+ for rfp in rfps
40
+ ]
41
+
42
+ @router.delete("/uploaded-rfps/{rfp_id}")
43
+ def delete_uploaded_rfp(rfp_id: int, db: Session = Depends(get_db)):
44
+ """Delete an uploaded RFP"""
45
+ uploaded_rfp = db.query(UploadedRFP).filter(UploadedRFP.id == rfp_id).first()
46
+ if not uploaded_rfp:
47
+ raise HTTPException(status_code=404, detail="Uploaded RFP not found")
48
+
49
+ # Delete the file from disk if it exists
50
+ import os
51
+ if uploaded_rfp.file_path and os.path.exists(uploaded_rfp.file_path):
52
+ try:
53
+ os.remove(uploaded_rfp.file_path)
54
+ except Exception as e:
55
+ print(f"Error deleting file: {e}")
56
+
57
+ db.delete(uploaded_rfp)
58
+ db.commit()
59
+
60
+ return {"message": "Uploaded RFP deleted successfully"}
61
+
62
+ @router.post("/process-question", response_model=AIAnswerResponse)
63
+ async def process_question(request: ProcessQuestionRequest, db: Session = Depends(get_db)):
64
+ """
65
+ Process a question against a new RFP:
66
+ 1. Find similar questions from database
67
+ 2. Get new RFP content (if provided)
68
+ 3. Generate AI answer combining both
69
+ 4. Provide gap analysis
70
+ """
71
+ # Get uploaded RFP (optional)
72
+ uploaded_rfp = None
73
+ new_rfp_content = ""
74
+
75
+ if request.uploaded_rfp_id:
76
+ uploaded_rfp = db.query(UploadedRFP).filter(
77
+ UploadedRFP.id == request.uploaded_rfp_id
78
+ ).first()
79
+
80
+ if not uploaded_rfp:
81
+ raise HTTPException(status_code=404, detail="Uploaded RFP not found")
82
+
83
+ new_rfp_content = uploaded_rfp.text_content
84
+
85
+ # Check for exact match first
86
+ exact_match = similarity_service.check_exact_match(db, request.question_text)
87
+
88
+ if exact_match:
89
+ # Return exact match answer
90
+ return AIAnswerResponse(
91
+ ai_answer=exact_match.answer_text,
92
+ gap_analysis="Exact match found in database. This is the stored answer from previous RFP." if not new_rfp_content else "Exact match found. No new information in current RFP.",
93
+ similar_questions=[
94
+ SimilarQuestion(
95
+ question_id=exact_match.id,
96
+ question_text=exact_match.question_text,
97
+ answer_text=exact_match.answer_text,
98
+ page_start=exact_match.page_start,
99
+ page_end=exact_match.page_end,
100
+ rfp_title=exact_match.rfp.title,
101
+ similarity_score=1.0
102
+ )
103
+ ],
104
+ new_rfp_content=new_rfp_content[:1000] + "..." if new_rfp_content else "No new RFP uploaded"
105
+ )
106
+
107
+ # Find similar questions - get more matches for AI to consider
108
+ similar_questions = similarity_service.find_similar_questions(
109
+ db,
110
+ request.question_text,
111
+ top_k=10, # Get more answers for AI to reference
112
+ threshold=0.15 # Lower threshold to include more potential matches
113
+ )
114
+
115
+ # Format similar questions for response
116
+ similar_questions_list = [
117
+ SimilarQuestion(
118
+ question_id=q.id,
119
+ question_text=q.question_text,
120
+ answer_text=q.answer_text,
121
+ page_start=q.page_start,
122
+ page_end=q.page_end,
123
+ rfp_title=q.rfp.title,
124
+ similarity_score=score
125
+ )
126
+ for q, score in similar_questions
127
+ ]
128
+
129
+ print(f"Found {len(similar_questions_list)} similar questions")
130
+ for sq in similar_questions_list:
131
+ print(f" - {sq.question_text} (score: {sq.similarity_score:.2f})")
132
+
133
+ # Prepare previous answers for AI
134
+ previous_answers = [
135
+ {
136
+ "question_text": q.question_text,
137
+ "answer_text": q.answer_text,
138
+ "page_start": q.page_start,
139
+ "page_end": q.page_end,
140
+ "rfp_title": q.rfp.title,
141
+ "similarity_score": score
142
+ }
143
+ for q, score in similar_questions
144
+ ]
145
+
146
+ # Generate AI answer with HuggingFace
147
+ prompt = f"""Question: {request.question_text}
148
+
149
+ New RFP Content:
150
+ {new_rfp_content if new_rfp_content else "No new RFP content provided"}
151
+
152
+ Previous Similar Answers:
153
+ {chr(10).join([f"- {ans['answer_text']} (from {ans['rfp_title']}, score: {ans['similarity_score']:.2f})" for ans in previous_answers[:5]])}
154
+
155
+ {request.additional_context if request.additional_context else ""}
156
+
157
+ Provide a comprehensive answer and gap analysis."""
158
+
159
+ ai_answer = huggingface_service.generate_chat_response(prompt)
160
+
161
+ ai_response = {
162
+ 'ai_answer': ai_answer,
163
+ 'gap_analysis': "Generated using HuggingFace Mistral-7B model based on available context."
164
+ }
165
+
166
+ return AIAnswerResponse(
167
+ ai_answer=ai_response['ai_answer'],
168
+ gap_analysis=ai_response['gap_analysis'],
169
+ similar_questions=similar_questions_list,
170
+ new_rfp_content=new_rfp_content[:1000] + "..." if new_rfp_content else "No new RFP uploaded"
171
+ )
172
+
173
+ @router.get("/uploaded-rfps/{rfp_id}/content")
174
+ def get_rfp_content(rfp_id: int, db: Session = Depends(get_db)):
175
+ """Get the full extracted content of an uploaded RFP"""
176
+ uploaded_rfp = db.query(UploadedRFP).filter(UploadedRFP.id == rfp_id).first()
177
+
178
+ if not uploaded_rfp:
179
+ raise HTTPException(status_code=404, detail="Uploaded RFP not found")
180
+
181
+ return {
182
+ "id": uploaded_rfp.id,
183
+ "filename": uploaded_rfp.filename,
184
+ "content": uploaded_rfp.text_content
185
+ }
backend/app/schemas.py ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pydantic import BaseModel
2
+ from typing import Optional
3
+ from datetime import datetime
4
+
5
+ # RFP Schemas
6
+ class RFPBase(BaseModel):
7
+ title: str
8
+ description: Optional[str] = None
9
+
10
+ class RFPCreate(RFPBase):
11
+ pass
12
+
13
+ class RFPUpdate(RFPBase):
14
+ pass
15
+
16
+ class RFPResponse(RFPBase):
17
+ id: int
18
+ created_at: datetime
19
+ updated_at: datetime
20
+
21
+ class Config:
22
+ from_attributes = True
23
+
24
+ # Question Schemas
25
+ class QuestionBase(BaseModel):
26
+ section: Optional[str] = None
27
+ question_id: Optional[str] = None
28
+ question_text: str
29
+ answer_text: str
30
+ page_start: Optional[int] = None
31
+ page_end: Optional[int] = None
32
+
33
+ class QuestionCreate(QuestionBase):
34
+ rfp_id: int
35
+
36
+ class QuestionUpdate(QuestionBase):
37
+ pass
38
+
39
+ class QuestionResponse(QuestionBase):
40
+ id: int
41
+ rfp_id: int
42
+ created_at: datetime
43
+ updated_at: datetime
44
+
45
+ class Config:
46
+ from_attributes = True
47
+
48
+ class QuestionWithRFP(QuestionResponse):
49
+ rfp: RFPResponse
50
+
51
+ class Config:
52
+ from_attributes = True
53
+
54
+ # New RFP Processing Schemas
55
+ class SimilarQuestion(BaseModel):
56
+ question_id: int
57
+ question_text: str
58
+ answer_text: str
59
+ page_start: Optional[int]
60
+ page_end: Optional[int]
61
+ rfp_title: str
62
+ similarity_score: float
63
+
64
+ class AIAnswerResponse(BaseModel):
65
+ ai_answer: str
66
+ gap_analysis: str
67
+ similar_questions: list[SimilarQuestion]
68
+ new_rfp_content: str
69
+
70
+ class ProcessQuestionRequest(BaseModel):
71
+ uploaded_rfp_id: Optional[int] = None
72
+ question_text: str
73
+ additional_context: Optional[str] = None
backend/app/services/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ # Empty __init__.py files for Python package structure
backend/app/services/hf_ollama_service.py ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import requests
3
+ from typing import List, Dict
4
+
5
+ class HuggingFaceOllamaService:
6
+ """
7
+ Modified Ollama service to use Hugging Face Inference API instead of local Ollama
8
+ """
9
+ def __init__(self):
10
+ self.api_token = os.getenv("HF_TOKEN", "")
11
+ self.model = "meta-llama/Llama-3.1-8B-Instruct"
12
+ self.api_url = f"https://api-inference.huggingface.co/models/{self.model}"
13
+
14
+ def generate_answer(
15
+ self,
16
+ question: str,
17
+ new_rfp_content: str,
18
+ previous_answers: List[dict],
19
+ additional_context: str = None
20
+ ) -> Dict[str, str]:
21
+ """
22
+ Generate an AI answer using Hugging Face Inference API
23
+ """
24
+ # Build context from previous answers
25
+ previous_context = self._format_previous_answers(previous_answers)
26
+
27
+ # Build additional context section
28
+ additional_section = ""
29
+ if additional_context:
30
+ additional_section = f"""
31
+
32
+ ADDITIONAL REQUIREMENTS:
33
+ {additional_context}
34
+
35
+ You MUST include the above additional requirements in your answer.
36
+ """
37
+
38
+ # Create prompt
39
+ prompt = f"""You are Sedna's RFP response writer. Write a professional, polished answer to the RFP question as if this is the FINAL response that will be submitted to the client.
40
+
41
+ QUESTION FROM NEW RFP:
42
+ {question}
43
+
44
+ NEW RFP CONTENT (uploaded document - context only):
45
+ {new_rfp_content[:2000] if new_rfp_content and new_rfp_content.strip() != "No new RFP content provided" else "No new RFP document uploaded"}
46
+
47
+ SEDNA'S PREVIOUS ANSWERS FROM KNOWLEDGE BASE:
48
+ {previous_context[:3000]}
49
+ {additional_section}
50
+
51
+ YOUR TASK:
52
+ Write a clean, professional RFP response for Sedna. Use specific facts from the knowledge base but present them naturally as part of the answer. Focus on what the client is asking for.
53
+
54
+ Write 3-5 comprehensive paragraphs addressing all parts of the question. If information is missing, simply note what additional details you'd be happy to discuss.
55
+
56
+ ANSWER:"""
57
+
58
+ # Call Hugging Face API
59
+ headers = {"Authorization": f"Bearer {self.api_token}"}
60
+ payload = {
61
+ "inputs": prompt,
62
+ "parameters": {
63
+ "max_new_tokens": 1000,
64
+ "temperature": 0.3,
65
+ "top_p": 0.9,
66
+ "return_full_text": False
67
+ }
68
+ }
69
+
70
+ try:
71
+ response = requests.post(self.api_url, headers=headers, json=payload, timeout=60)
72
+ response.raise_for_status()
73
+ result = response.json()
74
+
75
+ if isinstance(result, list) and len(result) > 0:
76
+ full_response = result[0].get("generated_text", "")
77
+ else:
78
+ full_response = "Unable to generate response. Please try again."
79
+
80
+ # Parse response
81
+ answer, gap_analysis = self._parse_response(full_response)
82
+
83
+ return {
84
+ 'ai_answer': answer,
85
+ 'gap_analysis': gap_analysis
86
+ }
87
+ except Exception as e:
88
+ print(f"Error calling Hugging Face API: {e}")
89
+ return {
90
+ 'ai_answer': f"Error generating AI response: {str(e)}",
91
+ 'gap_analysis': "Unable to analyze gaps due to API error"
92
+ }
93
+
94
+ def _format_previous_answers(self, previous_answers: List[dict]) -> str:
95
+ """Format previous answers for context"""
96
+ if not previous_answers:
97
+ return "No previous similar answers found."
98
+
99
+ formatted = []
100
+ for idx, ans in enumerate(previous_answers[:5], 1): # Limit to 5 for token efficiency
101
+ formatted.append(f"""
102
+ Previous Answer {idx}:
103
+ Question: {ans.get('question_text', '')}
104
+ Answer: {ans.get('answer_text', '')[:500]}...
105
+ """)
106
+
107
+ return "\n".join(formatted)
108
+
109
+ def _parse_response(self, response: str) -> tuple[str, str]:
110
+ """Parse the AI response to extract answer and gap analysis"""
111
+ answer = ""
112
+ gap_analysis = ""
113
+
114
+ if "GAP ANALYSIS:" in response:
115
+ parts = response.split("GAP ANALYSIS:")
116
+ answer = parts[0].strip()
117
+ gap_analysis = parts[1].strip() if len(parts) > 1 else ""
118
+ else:
119
+ answer = response.strip()
120
+ gap_analysis = "No gap analysis provided"
121
+
122
+ return answer, gap_analysis
123
+
124
+ # Create singleton instance
125
+ hf_ollama_service = HuggingFaceOllamaService()
backend/app/services/huggingface_service.py ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from huggingface_hub import InferenceClient
2
+ from typing import List, Optional
3
+ from app.config import settings
4
+ import sys
5
+
6
+
7
+ class HuggingFaceService:
8
+ def __init__(self):
9
+ self.api_key = settings.HUGGINGFACE_API_KEY
10
+ self.model = settings.HUGGINGFACE_MODEL.strip() # Remove any whitespace
11
+ # Use InferenceClient which handles the correct endpoints
12
+ self.client = InferenceClient(token=self.api_key)
13
+
14
+ def _check_model_available(self) -> Optional[str]:
15
+ """Check if model is accessible."""
16
+ try:
17
+ # Simple test with the client
18
+ self.client.text_generation(
19
+ "test",
20
+ model=self.model,
21
+ max_new_tokens=1
22
+ )
23
+ return None
24
+ except Exception as e:
25
+ return f"Model check failed: {str(e)}"
26
+
27
+ def generate_chat_response(
28
+ self,
29
+ system_prompt: str,
30
+ user_message: str,
31
+ conversation_history: List[dict] = None,
32
+ max_tokens: int = 1000,
33
+ temperature: float = 0.7
34
+ ) -> str:
35
+ """
36
+ Generate a chat response using HuggingFace Inference API
37
+
38
+ Args:
39
+ system_prompt: System context/instructions
40
+ user_message: Current user message
41
+ conversation_history: List of {'role': 'user'/'assistant', 'content': '...'}
42
+ max_tokens: Maximum response length
43
+ temperature: Creativity (0.0-1.0, lower = more focused)
44
+
45
+ Returns:
46
+ Generated response text
47
+ """
48
+
49
+ # Build a simple text prompt that works with most models
50
+ prompt_parts = []
51
+
52
+ # Add system context
53
+ if system_prompt:
54
+ prompt_parts.append(f"System: {system_prompt}\n")
55
+
56
+ # Add conversation history
57
+ if conversation_history:
58
+ for msg in conversation_history[-6:]: # Last 3 exchanges
59
+ role = "User" if msg['role'] == 'user' else "Assistant"
60
+ prompt_parts.append(f"{role}: {msg['content']}\n")
61
+
62
+ # Add current message
63
+ prompt_parts.append(f"User: {user_message}\nAssistant:")
64
+
65
+ # Combine into single prompt
66
+ prompt = "".join(prompt_parts)
67
+
68
+ try:
69
+ # Use InferenceClient for text generation
70
+ response_text = self.client.text_generation(
71
+ prompt,
72
+ model=self.model,
73
+ max_new_tokens=max_tokens,
74
+ temperature=temperature,
75
+ top_p=0.9,
76
+ do_sample=True,
77
+ return_full_text=False
78
+ )
79
+
80
+ return response_text.strip()
81
+
82
+ except Exception as e:
83
+ error_msg = str(e)
84
+ print(f"HuggingFace service error: {error_msg}", file=sys.stderr)
85
+
86
+ # Provide helpful error messages
87
+ if "401" in error_msg or "unauthorized" in error_msg.lower():
88
+ return "API key error: unauthorized. Check your HUGGINGFACE_API_KEY in Space secrets."
89
+ elif "403" in error_msg or "forbidden" in error_msg.lower():
90
+ return f"Access forbidden. Ensure you've accepted the model license at https://huggingface.co/{self.model}"
91
+ elif "503" in error_msg or "loading" in error_msg.lower():
92
+ return "The AI model is currently loading on HuggingFace. Try again in a minute."
93
+ else:
94
+ return f"Error connecting to HuggingFace API: {error_msg}"
95
+
96
+ def is_configured(self) -> bool:
97
+ """Check if HuggingFace is properly configured"""
98
+ return bool(self.api_key and self.api_key != "your_huggingface_api_key_here" and self.model)
99
+
100
+ huggingface_service = HuggingFaceService()
backend/app/services/pdf_service.py ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pdfplumber
2
+ import os
3
+ from typing import Optional
4
+ from fastapi import UploadFile
5
+ from app.models import UploadedRFP
6
+ from sqlalchemy.orm import Session
7
+
8
+ class PDFService:
9
+ def __init__(self, upload_dir: str = "uploads"):
10
+ self.upload_dir = upload_dir
11
+ os.makedirs(upload_dir, exist_ok=True)
12
+
13
+ async def save_and_extract_pdf(
14
+ self,
15
+ file: UploadFile,
16
+ db: Session,
17
+ extract_pages: Optional[int] = 3
18
+ ) -> UploadedRFP:
19
+ """
20
+ Save uploaded PDF and extract text from first N pages
21
+ """
22
+ # Save file
23
+ file_path = os.path.join(self.upload_dir, file.filename)
24
+
25
+ with open(file_path, "wb") as buffer:
26
+ content = await file.read()
27
+ buffer.write(content)
28
+
29
+ # Extract text
30
+ extracted_text = self.extract_text_from_pdf(file_path, max_pages=extract_pages)
31
+
32
+ # Generate friendly RFP name from filename (remove .pdf extension)
33
+ rfp_name = file.filename.rsplit('.', 1)[0] if '.' in file.filename else file.filename
34
+
35
+ # Save to database
36
+ uploaded_rfp = UploadedRFP(
37
+ filename=file.filename,
38
+ rfp_name=rfp_name,
39
+ file_path=file_path,
40
+ text_content=extracted_text
41
+ )
42
+ db.add(uploaded_rfp)
43
+ db.commit()
44
+ db.refresh(uploaded_rfp)
45
+
46
+ return uploaded_rfp
47
+
48
+ def extract_text_from_pdf(self, file_path: str, max_pages: Optional[int] = None) -> str:
49
+ """
50
+ Extract text from PDF using pdfplumber
51
+ """
52
+ text_content = []
53
+
54
+ with pdfplumber.open(file_path) as pdf:
55
+ pages_to_process = pdf.pages[:max_pages] if max_pages else pdf.pages
56
+
57
+ for page in pages_to_process:
58
+ text = page.extract_text()
59
+ if text:
60
+ text_content.append(text)
61
+
62
+ return "\n\n".join(text_content)
63
+
64
+ def extract_specific_pages(self, file_path: str, start_page: int, end_page: int) -> str:
65
+ """
66
+ Extract text from specific page range (1-indexed)
67
+ """
68
+ text_content = []
69
+
70
+ with pdfplumber.open(file_path) as pdf:
71
+ # Convert to 0-indexed
72
+ start_idx = start_page - 1
73
+ end_idx = end_page
74
+
75
+ for page in pdf.pages[start_idx:end_idx]:
76
+ text = page.extract_text()
77
+ if text:
78
+ text_content.append(text)
79
+
80
+ return "\n\n".join(text_content)
81
+
82
+ pdf_service = PDFService()
backend/app/services/similarity_service.py ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import json
3
+ from typing import List, Tuple
4
+ from sqlalchemy.orm import Session
5
+ from app.models import Question, QuestionEmbedding
6
+
7
+ class SimilaritySearchService:
8
+ def __init__(self):
9
+ # HuggingFace model for embeddings
10
+ self.model = None
11
+ self._model_loaded = False
12
+
13
+ def _load_model(self):
14
+ """Load the HuggingFace sentence transformer model"""
15
+ if not self._model_loaded:
16
+ try:
17
+ from sentence_transformers import SentenceTransformer
18
+ print("Loading HuggingFace sentence-transformers model (all-MiniLM-L6-v2)...")
19
+ # Using a lightweight, fast model from HuggingFace
20
+ self.model = SentenceTransformer('all-MiniLM-L6-v2')
21
+ self._model_loaded = True
22
+ print("βœ“ HuggingFace model loaded successfully!")
23
+ print(f" Model: all-MiniLM-L6-v2")
24
+ print(f" Embedding dimension: 384")
25
+ except Exception as e:
26
+ print(f"ERROR: Could not load HuggingFace sentence-transformers: {e}")
27
+ print("Falling back to dummy embeddings")
28
+ self._model_loaded = True
29
+
30
+ def generate_embedding(self, text: str) -> np.ndarray:
31
+ """Generate embedding using HuggingFace model"""
32
+ self._load_model()
33
+ if not self.model:
34
+ print("WARNING: Using random embeddings (model not loaded)")
35
+ return np.random.rand(384)
36
+
37
+ # Generate embedding using HuggingFace
38
+ embedding = self.model.encode(text, convert_to_numpy=True)
39
+ return embedding
40
+
41
+ def save_question_embedding(self, db: Session, question_id: int, question_text: str):
42
+ """Generate and save embedding for a question"""
43
+ embedding = self.generate_embedding(question_text)
44
+ embedding_json = json.dumps(embedding.tolist())
45
+
46
+ # Check if embedding exists
47
+ existing = db.query(QuestionEmbedding).filter(
48
+ QuestionEmbedding.question_id == question_id
49
+ ).first()
50
+
51
+ if existing:
52
+ existing.embedding = embedding_json
53
+ else:
54
+ db_embedding = QuestionEmbedding(
55
+ question_id=question_id,
56
+ embedding=embedding_json
57
+ )
58
+ db.add(db_embedding)
59
+
60
+ db.commit()
61
+
62
+ def find_similar_questions(
63
+ self,
64
+ db: Session,
65
+ question_text: str,
66
+ top_k: int = 5,
67
+ threshold: float = 0.5
68
+ ) -> List[Tuple[Question, float]]:
69
+ """
70
+ Find similar questions using cosine similarity with text-based fallback
71
+ Returns list of (Question, similarity_score) tuples
72
+ """
73
+ similarities = []
74
+
75
+ # FIRST: Check text similarity for all questions, especially short ones
76
+ # This ensures our special case matching works (Executive Summary -> Vendor Org = 98%)
77
+ all_questions = db.query(Question).all()
78
+ text_similarities = []
79
+
80
+ for question in all_questions:
81
+ text_score = self._text_similarity(question_text, question.question_text)
82
+ if text_score >= 0.90: # Very high text match (95%+)
83
+ print(f"HIGH TEXT MATCH FOUND: '{question.question_text}' = {text_score:.2f}")
84
+ text_similarities.append((question, text_score))
85
+
86
+ # If we found high-confidence text matches, use those
87
+ if text_similarities:
88
+ text_similarities.sort(key=lambda x: x[1], reverse=True)
89
+ print(f"Using {len(text_similarities)} high-confidence text matches instead of embeddings")
90
+ return text_similarities[:top_k]
91
+
92
+ try:
93
+ # Try embedding-based search
94
+ query_embedding = self.generate_embedding(question_text)
95
+ all_embeddings = db.query(QuestionEmbedding).all()
96
+
97
+ if all_embeddings and len(all_embeddings) > 0:
98
+ for emb in all_embeddings:
99
+ try:
100
+ stored_embedding = np.array(json.loads(emb.embedding))
101
+ similarity = self._cosine_similarity(query_embedding, stored_embedding)
102
+
103
+ if similarity >= threshold:
104
+ similarities.append((emb.question, similarity))
105
+ except Exception as e:
106
+ print(f"Error processing embedding for question {emb.question_id}: {e}")
107
+ continue
108
+
109
+ # Sort by similarity score (descending)
110
+ similarities.sort(key=lambda x: x[1], reverse=True)
111
+
112
+ if len(similarities) > 0:
113
+ print(f"Found {len(similarities)} matches using embeddings")
114
+ return similarities[:top_k]
115
+
116
+ except Exception as e:
117
+ print(f"Embedding search failed: {e}")
118
+
119
+ # Fallback to text-based search if embeddings failed or no results
120
+ print("Using text-based fallback search...")
121
+ all_questions = db.query(Question).all()
122
+
123
+ for question in all_questions:
124
+ text_similarity = self._text_similarity(question_text, question.question_text)
125
+ if text_similarity >= threshold:
126
+ similarities.append((question, text_similarity))
127
+
128
+ # Sort by similarity score (descending)
129
+ similarities.sort(key=lambda x: x[1], reverse=True)
130
+
131
+ print(f"Found {len(similarities)} matches using text search")
132
+ return similarities[:top_k]
133
+
134
+ def _text_similarity(self, text1: str, text2: str) -> float:
135
+ """Calculate simple text similarity based on word overlap"""
136
+ import re
137
+
138
+ # Normalize texts - remove punctuation and convert to lowercase
139
+ text1_clean = re.sub(r'[^\w\s]', ' ', text1.lower().strip())
140
+ text2_clean = re.sub(r'[^\w\s]', ' ', text2.lower().strip())
141
+
142
+ # SPECIAL CASE: If database question is very short (1-2 words), check if ANY of those words appear in query
143
+ db_words = text2_clean.split()
144
+ if len(db_words) <= 2:
145
+ # For short database questions like "Executive Summary"
146
+ for word in db_words:
147
+ if len(word) > 3 and word in text1_clean: # Check if significant word appears in query
148
+ # Check if it's about same topic using keyword matching
149
+ vendor_keywords = ['executive', 'summary', 'vendor', 'organization', 'company', 'business', 'about', 'information', 'general']
150
+ recruiting_keywords = ['recruiting', 'recruitment', 'candidate', 'interview', 'hiring', 'process', 'evaluate']
151
+
152
+ query_vendor_matches = sum(1 for kw in vendor_keywords if kw in text1_clean)
153
+ db_vendor_matches = sum(1 for kw in vendor_keywords if kw in text2_clean)
154
+ query_recruiting_matches = sum(1 for kw in recruiting_keywords if kw in text1_clean)
155
+
156
+ # If db is "executive summary" and query has vendor/org keywords, VERY high match
157
+ if ('executive' in text2_clean or 'summary' in text2_clean) and query_vendor_matches >= 2:
158
+ print(f"βœ“ SHORT QUESTION MATCH: '{text2_clean}' matches vendor org query. Score: 0.98")
159
+ return 0.98
160
+
161
+ # If db is "executive summary" and query has even 1 vendor keyword, still good match
162
+ if ('executive' in text2_clean or 'summary' in text2_clean) and query_vendor_matches >= 1 and query_recruiting_matches == 0:
163
+ print(f"βœ“ EXECUTIVE SUMMARY match with vendor keywords. Score: 0.95")
164
+ return 0.95
165
+
166
+ # Don't match if query is about recruiting and db is executive summary
167
+ if ('executive' in text2_clean or 'summary' in text2_clean) and query_recruiting_matches >= 2 and query_vendor_matches < 2:
168
+ print(f"βœ— Topic mismatch: Executive Summary vs Recruiting question")
169
+ return 0.0
170
+
171
+ # Check for keyword-based semantic matches first
172
+ keyword_groups = {
173
+ 'vendor_info': ['executive', 'summary', 'vendor', 'organization', 'company', 'business', 'focus', 'specialty', 'employees', 'general', 'information', 'about'],
174
+ 'recruiting': ['recruiting', 'recruitment', 'hiring', 'candidate', 'interview'],
175
+ 'quality': ['quality', 'assurance', 'satisfaction', 'success', 'rate'],
176
+ 'response_time': ['response', 'time', 'acknowledge', 'initial', 'mean', 'timeframe'],
177
+ 'turnover': ['turnover', 'replacement', 'contract', 'period'],
178
+ }
179
+
180
+ # Check if both texts belong to same semantic group
181
+ for group_name, keywords in keyword_groups.items():
182
+ text1_matches = sum(1 for kw in keywords if kw in text1_clean)
183
+ text2_matches = sum(1 for kw in keywords if kw in text2_clean)
184
+
185
+ # Debug logging for vendor_info
186
+ if group_name == 'vendor_info':
187
+ print(f"\n=== VENDOR_INFO MATCHING DEBUG ===")
188
+ print(f"Text1 (query): '{text1_clean}'")
189
+ print(f"Text2 (db): '{text2_clean}'")
190
+ print(f"Text1 matches: {text1_matches}")
191
+ print(f"Text2 matches: {text2_matches}")
192
+ print(f"'executive' in text2: {'executive' in text2_clean}")
193
+ print(f"'summary' in text2: {'summary' in text2_clean}")
194
+ print(f"Condition 1 (query has 2+ vendor keywords AND db has executive/summary): {text1_matches >= 2 and ('executive' in text2_clean or 'summary' in text2_clean)}")
195
+ print(f"Condition 2 (db has 1+ vendor keyword AND query has executive/summary): {text2_matches >= 1 and ('executive' in text1_clean or 'summary' in text1_clean)}")
196
+
197
+ # Special handling for vendor_info - match "Executive Summary" with organization questions
198
+ if group_name == 'vendor_info':
199
+ # If query has vendor/org keywords (2+) and db has "executive" or "summary"
200
+ if text1_matches >= 2 and ('executive' in text2_clean or 'summary' in text2_clean):
201
+ print(f"βœ“ Keyword match: Vendor info question matched with Executive Summary. Score: 0.92")
202
+ return 0.92
203
+ # If db has vendor keywords and query has "executive" or "summary"
204
+ if text2_matches >= 1 and ('executive' in text1_clean or 'summary' in text1_clean):
205
+ print(f"βœ“ Keyword match: Executive Summary matched with vendor info. Score: 0.92")
206
+ return 0.92
207
+ # Both have multiple vendor keywords
208
+ if text1_matches >= 3 and text2_matches >= 1:
209
+ print(f"βœ“ Keyword match: Strong vendor/company information match. Score: 0.88")
210
+ return 0.88
211
+ # For other groups, require matches in both
212
+ elif text1_matches >= 2 and text2_matches >= 1:
213
+ print(f"Keyword match: {group_name} group. Score: 0.80")
214
+ return 0.80
215
+
216
+ # Check for substring match (very high score)
217
+ if text1_clean in text2_clean or text2_clean in text1_clean:
218
+ print(f"Substring match found! Score: 0.95")
219
+ return 0.95
220
+
221
+ # Split into words
222
+ words1 = set(text1_clean.split())
223
+ words2 = set(text2_clean.split())
224
+
225
+ # Remove only very common words (not content words like organization, company)
226
+ common_words = {'the', 'a', 'an', 'is', 'are', 'what', 'how', 'why', 'when', 'where', 'who', 'of', 'to', 'in', 'for', 'on', 'with', 'at', 'by', 'from', 'whats', 'your', 'our', 'their', 's', 'and', 'or'}
227
+ words1_filtered = words1 - common_words
228
+ words2_filtered = words2 - common_words
229
+
230
+ print(f"Question: '{text1_clean}'")
231
+ print(f"Database: '{text2_clean}'")
232
+ print(f"Words1 filtered: {words1_filtered}")
233
+ print(f"Words2 filtered: {words2_filtered}")
234
+
235
+ if len(words1_filtered) == 0 or len(words2_filtered) == 0:
236
+ # Fall back to unfiltered if all words were common
237
+ words1_filtered = words1
238
+ words2_filtered = words2
239
+
240
+ if len(words1_filtered) == 0 or len(words2_filtered) == 0:
241
+ return 0.0
242
+
243
+ # Calculate intersection
244
+ intersection = words1_filtered.intersection(words2_filtered)
245
+ print(f"Intersection: {intersection}")
246
+
247
+ # If no meaningful words match, return 0
248
+ if len(intersection) == 0:
249
+ return 0.0
250
+
251
+ # Calculate similarity based on smaller set (more lenient)
252
+ smaller_set_size = min(len(words1_filtered), len(words2_filtered))
253
+ match_ratio = len(intersection) / smaller_set_size
254
+ print(f"Match ratio: {match_ratio} ({len(intersection)}/{smaller_set_size})")
255
+
256
+ # Boost if all important words from smaller question match
257
+ if match_ratio >= 0.5: # If 50% or more words match
258
+ # High confidence
259
+ score = min(0.85 + (match_ratio * 0.15), 1.0)
260
+ print(f"High confidence score: {score}")
261
+ return score
262
+ elif match_ratio >= 0.3: # If 30-50% words match
263
+ # Medium confidence
264
+ score = 0.65 + (match_ratio * 0.2)
265
+ print(f"Medium confidence score: {score}")
266
+ return score
267
+ else:
268
+ # Low confidence
269
+ score = match_ratio * 0.6
270
+ print(f"Low confidence score: {score}")
271
+ return score
272
+
273
+ def _cosine_similarity(self, vec1: np.ndarray, vec2: np.ndarray) -> float:
274
+ """Calculate cosine similarity between two vectors"""
275
+ dot_product = np.dot(vec1, vec2)
276
+ norm1 = np.linalg.norm(vec1)
277
+ norm2 = np.linalg.norm(vec2)
278
+
279
+ if norm1 == 0 or norm2 == 0:
280
+ return 0.0
281
+
282
+ return dot_product / (norm1 * norm2)
283
+
284
+ def check_exact_match(self, db: Session, question_text: str) -> Question:
285
+ """Check for exact question match (case-insensitive, trimmed)"""
286
+ # Normalize the input question
287
+ normalized_question = question_text.strip().lower()
288
+
289
+ # Try exact match first
290
+ exact = db.query(Question).filter(
291
+ Question.question_text.ilike(normalized_question)
292
+ ).first()
293
+
294
+ if exact:
295
+ return exact
296
+
297
+ # Try with wildcards for very close matches (90%+ similar)
298
+ all_questions = db.query(Question).all()
299
+ for q in all_questions:
300
+ if q.question_text.strip().lower() == normalized_question:
301
+ return q
302
+
303
+ return None
304
+
305
+ similarity_service = SimilaritySearchService()
backend/requirements.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fastapi==0.104.1
2
+ uvicorn[standard]==0.24.0
3
+ sqlalchemy==2.0.23
4
+ python-multipart==0.0.6
5
+ pdfplumber==0.10.3
6
+ sentence-transformers==2.2.2
7
+ numpy==1.24.3
8
+ python-dotenv==1.0.0
9
+ pydantic==2.5.0
10
+ pydantic-settings==2.1.0
11
+ huggingface-hub==0.20.2
12
+ requests==2.31.0
frontend/build/_app/env.js ADDED
@@ -0,0 +1 @@
 
 
1
+ export const env={}
frontend/build/_app/immutable/assets/0.szp2DwjZ.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .chat-button.svelte-1g2ry5f{position:fixed;bottom:30px;right:30px;width:60px;height:60px;border-radius:50%;background:linear-gradient(135deg,#667eea,#764ba2);border:none;box-shadow:0 4px 20px #667eea66;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#fff;transition:all .3s ease;z-index:1000;position:relative}.chat-button.svelte-1g2ry5f:hover{transform:scale(1.1);box-shadow:0 6px 30px #667eea99}.pulse.svelte-1g2ry5f{position:absolute;width:100%;height:100%;border-radius:50%;background:#667eea66;animation:svelte-1g2ry5f-pulse 2s infinite}@keyframes svelte-1g2ry5f-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.5);opacity:0}}.chat-window.svelte-1g2ry5f{position:fixed;bottom:30px;right:30px;width:400px;height:600px;background:#fff;border-radius:16px;box-shadow:0 10px 40px #0003;display:flex;flex-direction:column;z-index:1000;overflow:hidden}.chat-header.svelte-1g2ry5f{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:1rem 1.25rem;display:flex;justify-content:space-between;align-items:center}.header-content.svelte-1g2ry5f{display:flex;align-items:center;gap:.75rem}.header-content.svelte-1g2ry5f h3:where(.svelte-1g2ry5f){margin:0;font-size:1rem;font-weight:600}.status.svelte-1g2ry5f{margin:0;font-size:.75rem;opacity:.9}.header-actions.svelte-1g2ry5f{display:flex;gap:.5rem}.icon-btn.svelte-1g2ry5f{background:#fff3;border:none;color:#fff;width:32px;height:32px;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s}.icon-btn.svelte-1g2ry5f:hover{background:#ffffff4d}.chat-messages.svelte-1g2ry5f{flex:1;overflow-y:auto;padding:1.25rem;background:#f8f9fa;scroll-behavior:smooth}.message.svelte-1g2ry5f{display:flex;gap:.75rem;margin-bottom:1rem;animation:svelte-1g2ry5f-fadeIn .3s ease}@keyframes svelte-1g2ry5f-fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.message-avatar.svelte-1g2ry5f{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}.message.assistant.svelte-1g2ry5f .message-avatar:where(.svelte-1g2ry5f){background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.message.user.svelte-1g2ry5f .message-avatar:where(.svelte-1g2ry5f){background:#e0e7ff;color:#4f46e5}.message-content.svelte-1g2ry5f{background:#fff;padding:.75rem 1rem;border-radius:12px;max-width:75%;line-height:1.5;font-size:.9rem;box-shadow:0 1px 3px #0000001a}.message.user.svelte-1g2ry5f .message-content:where(.svelte-1g2ry5f){background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;margin-left:auto}.message.user.svelte-1g2ry5f{flex-direction:row-reverse}.typing.svelte-1g2ry5f{display:flex;gap:.4rem;padding:1rem}.typing.svelte-1g2ry5f span:where(.svelte-1g2ry5f){width:8px;height:8px;border-radius:50%;background:#667eea;animation:svelte-1g2ry5f-typing 1.4s infinite}.typing.svelte-1g2ry5f span:where(.svelte-1g2ry5f):nth-child(2){animation-delay:.2s}.typing.svelte-1g2ry5f span:where(.svelte-1g2ry5f):nth-child(3){animation-delay:.4s}@keyframes svelte-1g2ry5f-typing{0%,60%,to{transform:translateY(0)}30%{transform:translateY(-10px)}}.chat-input.svelte-1g2ry5f{display:flex;gap:.75rem;padding:1rem 1.25rem;border-top:1px solid #e5e7eb;background:#fff}.chat-input.svelte-1g2ry5f textarea:where(.svelte-1g2ry5f){flex:1;border:1px solid #e5e7eb;border-radius:12px;padding:.75rem;font-size:.9rem;resize:none;font-family:inherit;max-height:100px}.chat-input.svelte-1g2ry5f textarea:where(.svelte-1g2ry5f):focus{outline:none;border-color:#667eea}.send-btn.svelte-1g2ry5f{background:linear-gradient(135deg,#667eea,#764ba2);border:none;color:#fff;width:40px;height:40px;border-radius:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}.send-btn.svelte-1g2ry5f:hover:not(:disabled){transform:scale(1.05);box-shadow:0 4px 12px #667eea66}.send-btn.svelte-1g2ry5f:disabled{opacity:.5;cursor:not-allowed}.chat-footer.svelte-1g2ry5f{background:#f8f9fa;padding:.75rem 1.25rem;border-top:1px solid #e5e7eb}.footer-text.svelte-1g2ry5f{font-size:.75rem;color:#6b7280;display:block;text-align:center}@media(max-width:480px){.chat-window.svelte-1g2ry5f{width:calc(100vw - 20px);height:calc(100vh - 20px);bottom:10px;right:10px}}body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;background:linear-gradient(135deg,#f5f7fa,#c3cfe2);min-height:100vh}.container.svelte-12qhfyh{min-height:100vh}nav.svelte-12qhfyh{background:linear-gradient(135deg,#1e3c72,#2a5298);color:#fff;padding:1.25rem 2rem;box-shadow:0 4px 20px #00000026;position:sticky;top:0;z-index:100}.nav-brand.svelte-12qhfyh{display:flex;align-items:center;gap:1rem;margin-bottom:1rem}.logo.svelte-12qhfyh{height:60px;width:auto;object-fit:contain}.brand-text.svelte-12qhfyh h1:where(.svelte-12qhfyh){margin:0;font-size:1.5rem;font-weight:700;letter-spacing:.5px}.tagline.svelte-12qhfyh{margin:.25rem 0 0;font-size:.85rem;opacity:.9;font-weight:300}.nav-links.svelte-12qhfyh{display:flex;gap:.75rem;flex-wrap:wrap}.nav-links.svelte-12qhfyh a:where(.svelte-12qhfyh){color:#ffffffe6;text-decoration:none;padding:.65rem 1.25rem;border-radius:8px;transition:all .3s ease;background:#ffffff1a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);display:flex;align-items:center;gap:.5rem;font-weight:500;border:1px solid rgba(255,255,255,.2)}.nav-links.svelte-12qhfyh a:where(.svelte-12qhfyh):hover{background:#fff3;transform:translateY(-2px);box-shadow:0 4px 12px #0003}.nav-links.svelte-12qhfyh a.active:where(.svelte-12qhfyh){background:linear-gradient(135deg,#667eea,#764ba2);border-color:#ffffff4d;box-shadow:0 4px 15px #667eea66}main.svelte-12qhfyh{padding:2.5rem;max-width:1400px;margin:0 auto}.card{background:#fff;border-radius:12px;padding:2rem;box-shadow:0 4px 20px #00000014;margin-bottom:2rem;border:1px solid rgba(0,0,0,.05);transition:all .3s ease}.card:hover{box-shadow:0 8px 30px #0000001f;transform:translateY(-2px)}.btn{padding:.75rem 1.5rem;border:none;border-radius:8px;cursor:pointer;font-size:.95rem;font-weight:500;transition:all .3s ease;display:inline-flex;align-items:center;gap:.5rem}.btn-primary{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;box-shadow:0 4px 15px #667eea4d}.btn-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px #667eea66}.btn-danger{background:linear-gradient(135deg,#f093fb,#f5576c);color:#fff;box-shadow:0 4px 15px #f5576c4d}.btn-danger:hover{transform:translateY(-2px);box-shadow:0 6px 20px #f5576c66}.btn-success{background:linear-gradient(135deg,#4facfe,#00f2fe);color:#fff;box-shadow:0 4px 15px #4facfe4d}.btn-success:hover{transform:translateY(-2px);box-shadow:0 6px 20px #4facfe66}.form-group{margin-bottom:1.5rem}.form-group label{display:block;margin-bottom:.5rem;font-weight:600;color:#2c3e50;font-size:.95rem}.form-group input,.form-group textarea,.form-group select{width:100%;padding:.75rem 1rem;border:2px solid #e5e7eb;border-radius:8px;font-size:.95rem;box-sizing:border-box;transition:all .3s ease;background:#fff}.form-group input:focus,.form-group textarea:focus,.form-group select:focus{outline:none;border-color:#667eea;box-shadow:0 0 0 3px #667eea1a}.form-group textarea{min-height:120px;resize:vertical;font-family:inherit}table{width:100%;border-collapse:separate;border-spacing:0}table th,table td{padding:1rem;text-align:left;border-bottom:1px solid #e5e7eb}table th{background:linear-gradient(135deg,#f8f9fa,#e9ecef);font-weight:600;color:#2c3e50;position:sticky;top:0}table tr:hover{background:#f8f9fa}.loading{text-align:center;padding:3rem;color:#667eea;font-size:1.1rem}.error{background:linear-gradient(135deg,#fee,#fdd);color:#c0392b;padding:1.25rem;border-radius:8px;margin-bottom:1.5rem;border-left:4px solid #c0392b;font-weight:500}.success{background:linear-gradient(135deg,#d4edda,#c3e6cb);color:#155724;padding:1.25rem;border-radius:8px;margin-bottom:1.5rem;border-left:4px solid #28a745;font-weight:500}h2{color:#2c3e50;font-size:2rem;font-weight:700;margin-bottom:1.5rem;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}::-webkit-scrollbar-thumb{background:linear-gradient(135deg,#667eea,#764ba2);border-radius:10px}::-webkit-scrollbar-thumb:hover{background:linear-gradient(135deg,#5568d3,#6a3f8f)}@media(max-width:768px){nav.svelte-12qhfyh{padding:1rem}.nav-brand.svelte-12qhfyh{flex-direction:column;align-items:flex-start;gap:.5rem}.logo.svelte-12qhfyh{height:40px}.nav-links.svelte-12qhfyh{flex-direction:column;gap:.5rem}main.svelte-12qhfyh{padding:1.5rem 1rem}.card{padding:1.5rem}}
frontend/build/_app/immutable/assets/2.BhOwCb3K.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .form-section.svelte-1uha8ag{background:#f8f9fa;padding:1.5rem;border-radius:4px;margin-bottom:1rem}.form-row.svelte-1uha8ag{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.link-button.svelte-1uha8ag{background:none;border:none;color:#3498db;cursor:pointer;font-size:inherit;text-decoration:underline;padding:0}.link-button.svelte-1uha8ag:hover{color:#2980b9}tr.selected.svelte-1uha8ag{background:#e3f2fd!important}.btn-sm.svelte-1uha8ag{padding:.4rem .8rem;font-size:.85rem}.questions-list.svelte-1uha8ag{display:flex;flex-direction:column;gap:1rem}.question-item.svelte-1uha8ag{border:1px solid #ddd;border-radius:4px;padding:1rem;background:#fafafa}.question-header.svelte-1uha8ag{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.question-meta.svelte-1uha8ag{font-size:.85rem;color:#7f8c8d;font-weight:500}.question-text.svelte-1uha8ag{margin-bottom:.75rem;color:#2c3e50}.answer-text.svelte-1uha8ag{color:#27ae60;line-height:1.6;white-space:pre-wrap;word-wrap:break-word;font-family:inherit}h2.svelte-1uha8ag{color:#2c3e50;margin-bottom:.5rem}h3.svelte-1uha8ag{margin:0;color:#2c3e50}
frontend/build/_app/immutable/assets/3.nLZZFO8x.css ADDED
@@ -0,0 +1 @@
 
 
1
+ h2.svelte-7nnquv{color:#2c3e50;margin-bottom:.5rem}h3.svelte-7nnquv{margin:0;color:#2c3e50}h4.svelte-7nnquv{margin:0 0 1rem;color:#2c3e50}h5.svelte-7nnquv{margin:0 0 .75rem;color:#2c3e50;font-size:1rem}.empty-state.svelte-7nnquv{text-align:center;padding:3rem 1rem;color:#7f8c8d}.empty-state.svelte-7nnquv p:where(.svelte-7nnquv){margin:.5rem 0}.empty-state.svelte-7nnquv a:where(.svelte-7nnquv){color:#3498db;text-decoration:underline}.bulk-save-form.svelte-7nnquv{background:#e3f2fd;padding:1.5rem;border-radius:6px;margin-bottom:1.5rem;border-left:4px solid #3498db}.answers-list.svelte-7nnquv{display:flex;flex-direction:column;gap:1.5rem}.answer-card.svelte-7nnquv{border:2px solid #e0e0e0;border-radius:8px;padding:1.5rem;background:#fff;transition:box-shadow .2s}.answer-card.svelte-7nnquv:hover{box-shadow:0 4px 12px #0000001a}.answer-header.svelte-7nnquv{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #eee}.answer-meta.svelte-7nnquv{display:flex;flex-direction:column;gap:.25rem}.answer-type.svelte-7nnquv{font-weight:600;color:#2c3e50;font-size:.95rem}.edited-badge.svelte-7nnquv{display:inline-block;background:#fff3cd;color:#856404;padding:.15rem .5rem;border-radius:3px;font-size:.75rem;font-weight:600}.answer-date.svelte-7nnquv{font-size:.8rem;color:#95a5a6}.answer-question.svelte-7nnquv{margin-bottom:1rem;color:#2c3e50;font-size:1.05rem}.answer-body.svelte-7nnquv{margin-bottom:1.5rem}.answer-text.svelte-7nnquv{background:#f8f9fa;padding:1rem;border-radius:4px;border-left:4px solid #27ae60;line-height:1.6;white-space:pre-wrap;word-wrap:break-word;margin-bottom:.75rem;color:#2c3e50}.edit-section.svelte-7nnquv{margin-top:.5rem}.save-metadata.svelte-7nnquv{background:#f8f9fa;padding:1rem;border-radius:6px;margin-top:1rem}.metadata-grid.svelte-7nnquv{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin-bottom:1rem}.form-group.svelte-7nnquv{display:flex;flex-direction:column;gap:.25rem}.form-group.svelte-7nnquv label:where(.svelte-7nnquv){font-size:.85rem;font-weight:600;color:#555}.btn-sm.svelte-7nnquv{padding:.4rem .8rem;font-size:.85rem}
frontend/build/_app/immutable/assets/4.DFSjY77Q.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .upload-section.svelte-afnr3e{display:flex;align-items:center;gap:1rem}input[type=file].svelte-afnr3e{display:none}.file-name.svelte-afnr3e{color:#27ae60;font-weight:500}.btn.disabled.svelte-afnr3e{opacity:.6;cursor:not-allowed}.result-section.svelte-afnr3e{margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid #eee}.result-section.svelte-afnr3e:first-child{margin-top:0;padding-top:0;border-top:none}h4.svelte-afnr3e{color:#2c3e50;margin-bottom:1rem}.similar-item.svelte-afnr3e{background:#f8f9fa;padding:1rem;border-radius:4px;margin-bottom:1rem;border-left:4px solid #3498db}.similar-header.svelte-afnr3e{font-size:.85rem;color:#7f8c8d;margin-bottom:.5rem}.similar-question.svelte-afnr3e{margin-bottom:.5rem;color:#2c3e50}.similar-answer.svelte-afnr3e{color:#27ae60;line-height:1.6;white-space:pre-wrap;word-wrap:break-word}.ai-answer.svelte-afnr3e{background:#e8f4f8;padding:1rem;border-radius:4px;line-height:1.6;white-space:pre-wrap;border-left:4px solid #3498db}.gap-analysis.svelte-afnr3e{background:#fff4e6;padding:1rem;border-radius:4px;line-height:1.6;white-space:pre-wrap;border-left:4px solid #f39c12}.save-form.svelte-afnr3e{background:#f8f9fa;padding:1.5rem;border-radius:4px;margin-top:1rem}.form-row.svelte-afnr3e{display:grid;grid-template-columns:1fr 1fr;gap:1rem}h2.svelte-afnr3e{color:#2c3e50;margin-bottom:.5rem}h3.svelte-afnr3e{margin:0 0 1rem;color:#2c3e50}.answer-selector-horizontal.svelte-afnr3e{display:flex;flex-direction:row;gap:1rem;margin:1rem 0;flex-wrap:wrap}.answer-option-horizontal.svelte-afnr3e{display:flex;align-items:center;gap:.5rem;padding:.75rem 1.25rem;border:2px solid #e0e0e0;border-radius:6px;cursor:pointer;transition:all .2s;background:#fff;font-size:.95rem}.answer-option-horizontal.svelte-afnr3e:hover{border-color:#3498db;background:#f0f8ff;transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.answer-option-horizontal.selected.svelte-afnr3e{border-color:#3498db;background:#e3f2fd;font-weight:600}.answer-option-horizontal.svelte-afnr3e input[type=radio]:where(.svelte-afnr3e){width:16px;height:16px;cursor:pointer}.answer-option-horizontal.svelte-afnr3e span:where(.svelte-afnr3e){cursor:pointer;-webkit-user-select:none;user-select:none}details.svelte-afnr3e{margin-top:1rem;border:1px solid #e0e0e0;border-radius:6px;overflow:hidden}summary.svelte-afnr3e{cursor:pointer;padding:1rem;background:#f8f9fa;font-weight:600;color:#2c3e50;-webkit-user-select:none;user-select:none;transition:background .2s}summary.svelte-afnr3e:hover{background:#e9ecef}summary.svelte-afnr3e::marker{color:#3498db}.collapsible-content.svelte-afnr3e{padding:1rem;background:#fff}.refinement-section.svelte-afnr3e{background:#fff9e6;padding:1.5rem;border-radius:6px;border-left:4px solid #f39c12}.warning-box.svelte-afnr3e{background:#fff3cd;border:2px solid #ffc107;border-radius:6px;padding:1rem;margin-bottom:1rem}.warning-box.svelte-afnr3e strong:where(.svelte-afnr3e){color:#856404;display:block;margin-bottom:.5rem;font-size:1.05rem}.warning-box.svelte-afnr3e p:where(.svelte-afnr3e){color:#856404;margin:.5rem 0;line-height:1.5}.selected-answer-preview.svelte-afnr3e{margin-top:1rem;padding:1rem;background:#f8f9fa;border-radius:4px}.answer-preview.svelte-afnr3e{margin-top:.5rem;padding:1rem;background:#fff;border-left:4px solid #27ae60;white-space:pre-wrap;line-height:1.6}.batch-result.svelte-afnr3e{margin-bottom:2rem;padding:1.5rem;background:#f8f9fa;border-radius:4px;border-left:4px solid #3498db}.batch-result.svelte-afnr3e h4:where(.svelte-afnr3e){margin-top:0;color:#2c3e50}.mode-toggle.svelte-afnr3e{display:flex;gap:.5rem;margin-bottom:1.5rem;background:#f8f9fa;padding:.5rem;border-radius:12px;width:fit-content}.toggle-btn.svelte-afnr3e{padding:.75rem 1.5rem;border:none;background:transparent;color:#6b7280;border-radius:8px;cursor:pointer;font-size:.95rem;font-weight:500;transition:all .3s ease;display:flex;align-items:center;gap:.5rem}.toggle-btn.svelte-afnr3e:hover{background:#667eea1a;color:#667eea}.toggle-btn.active.svelte-afnr3e{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;box-shadow:0 4px 15px #667eea4d}.toggle-btn.svelte-afnr3e svg:where(.svelte-afnr3e){flex-shrink:0}.uploaded-rfp-list.svelte-afnr3e{display:flex;flex-direction:column;gap:.75rem;margin-top:.75rem}.uploaded-rfp-item.svelte-afnr3e{display:flex;align-items:center;justify-content:space-between;padding:1rem;border:2px solid #e5e7eb;border-radius:8px;transition:all .3s ease;background:#fff}.uploaded-rfp-item.svelte-afnr3e:hover{border-color:#667eea;box-shadow:0 2px 8px #667eea1a}.uploaded-rfp-item.selected.svelte-afnr3e{border-color:#667eea;background:linear-gradient(135deg,#667eea0d,#764ba20d)}.rfp-radio-label.svelte-afnr3e{display:flex;align-items:center;gap:.75rem;cursor:pointer;flex:1;margin:0;font-weight:400}.rfp-radio-label.svelte-afnr3e input[type=radio]:where(.svelte-afnr3e){width:18px;height:18px;cursor:pointer}.rfp-info.svelte-afnr3e{display:flex;flex-direction:column;gap:.25rem}.rfp-info.svelte-afnr3e strong:where(.svelte-afnr3e){color:#2c3e50;font-size:.95rem}.rfp-date.svelte-afnr3e{color:#6b7280;font-size:.85rem}.btn-icon-delete.svelte-afnr3e{background:transparent;border:none;color:#e74c3c;cursor:pointer;padding:.5rem;border-radius:6px;transition:all .2s;display:flex;align-items:center;justify-content:center}.btn-icon-delete.svelte-afnr3e:hover{background:#fee;transform:scale(1.1)}.btn-clear-selection.svelte-afnr3e{margin-top:.5rem;padding:.5rem 1rem;background:#f8f9fa;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;font-size:.85rem;color:#6b7280;transition:all .2s}.btn-clear-selection.svelte-afnr3e:hover{background:#e9ecef;border-color:#dee2e6}
frontend/build/_app/immutable/chunks/BGm1LqbF.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import{E as M,U as qt,T as Ht,g as He,a9 as Mt,W as $t,X as zt,Y as Me,Z as we,_ as Ee,P as ie,ap as Jt,aR as Vt,aw as $e,c as W,O as ve,R as Wt,aP as ct,i as Kt,M as Ce,m as Xt,an as ze,aT as lt,aU as ut,aV as Gt,aD as Yt,aW as ft,I as dt,K as Zt,aX as ge,q as Ne,aY as Qt,aL as en,aZ as tn,a_ as nn,aO as rn,J as sn,l as ht,ak as on,u as an,r as pt,p as cn,a as ln,t as un}from"./CZHqxbHz.js";function zr(e,t){return t}function fn(e,t,n){for(var r=[],s=t.length,i=0;i<s;i++)tn(t[i].e,r,!0);nn(r,()=>{var o=r.length===0&&n!==null;if(o){var c=n,f=c.parentNode;rn(f),f.append(c),e.items.clear(),j(e,t[0].prev,t[s-1].next)}for(var l=0;l<s;l++){var u=t[l];o||(e.items.delete(u.k),j(e,u.prev,u.next)),sn(u.e,!o)}e.first===t[0]&&(e.first=t[0].prev)})}function Jr(e,t,n,r,s,i=null){var o=e,c=new Map,f=null,l=(t&ft)!==0,u=(t&ut)!==0,p=(t&lt)!==0;if(l){var y=e;o=M?we(Yt(y)):y.appendChild(Ce())}M&&qt();var E=null,h=Mt(()=>{var g=n();return Kt(g)?g:g==null?[]:ct(g)}),m,d=!0;function b(){dn(S,m,o,t,r),E!==null&&(m.length===0?(E.fragment?(o.before(E.fragment),E.fragment=null):dt(E.effect),T.first=E.effect):Zt(E.effect,()=>{E=null}))}var T=Ht(()=>{m=He(h);var g=m.length;let _=!1;if(M){var N=$t(o)===zt;N!==(g===0)&&(o=Me(),we(o),Ee(!1),_=!0)}for(var R=new Set,F=W,k=null,Y=Wt(),L=0;L<g;L+=1){M&&ie.nodeType===Jt&&ie.data===Vt&&(o=ie,_=!0,Ee(!1));var q=m[L],D=r(q,L),A=d?null:c.get(D);A?(u&&$e(A.v,q),p?$e(A.i,L):A.i=L,Y&&F.skipped_effects.delete(A.e)):(A=hn(d?o:null,k,q,D,L,s,t,n),d&&(A.o=!0,k===null?f=A:k.next=A,k=A),c.set(D,A)),R.add(D)}if(g===0&&i&&!E)if(d)E={fragment:null,effect:ve(()=>i(o))};else{var Z=document.createDocumentFragment(),P=Ce();Z.append(P),E={fragment:Z,effect:ve(()=>i(P))}}if(M&&g>0&&we(Me()),!d)if(Y){for(const[se,B]of c)R.has(se)||F.skipped_effects.add(B.e);F.oncommit(b),F.ondiscard(()=>{})}else b();_&&Ee(!0),He(h)}),S={effect:T,items:c,first:f};d=!1,M&&(o=ie)}function dn(e,t,n,r,s){var i=(r&Qt)!==0,o=t.length,c=e.items,f=e.first,l,u=null,p,y=[],E=[],h,m,d,b;if(i)for(b=0;b<o;b+=1)h=t[b],m=s(h,b),d=c.get(m),d.a?.measure(),(p??=new Set).add(d);for(b=0;b<o;b+=1){if(h=t[b],m=s(h,b),d=c.get(m),e.first??=d,!d.o){d.o=!0;var T=u?u.next:f;j(e,u,d),j(e,d,T),Se(d,T,n),u=d,y=[],E=[],f=u.next;continue}if((d.e.f&ge)!==0&&(dt(d.e),i&&(d.a?.unfix(),(p??=new Set).delete(d))),d!==f){if(l!==void 0&&l.has(d)){if(y.length<E.length){var S=E[0],g;u=S.prev;var _=y[0],N=y[y.length-1];for(g=0;g<y.length;g+=1)Se(y[g],S,n);for(g=0;g<E.length;g+=1)l.delete(E[g]);j(e,_.prev,N.next),j(e,u,_),j(e,N,S),f=S,u=N,b-=1,y=[],E=[]}else l.delete(d),Se(d,f,n),j(e,d.prev,d.next),j(e,d,u===null?e.first:u.next),j(e,u,d),u=d;continue}for(y=[],E=[];f!==null&&f.k!==m;)(f.e.f&ge)===0&&(l??=new Set).add(f),E.push(f),f=f.next;if(f===null)continue;d=f}y.push(d),u=d,f=d.next}if(f!==null||l!==void 0){for(var R=l===void 0?[]:ct(l);f!==null;)(f.e.f&ge)===0&&R.push(f),f=f.next;var F=R.length;if(F>0){var k=(r&ft)!==0&&o===0?n:null;if(i){for(b=0;b<F;b+=1)R[b].a?.measure();for(b=0;b<F;b+=1)R[b].a?.fix()}fn(e,R,k)}}i&&Ne(()=>{if(p!==void 0)for(d of p)d.a?.apply()})}function hn(e,t,n,r,s,i,o,c){var f=(o&ut)!==0,l=(o&Gt)===0,u=f?l?Xt(n,!1,!1):ze(n):n,p=(o&lt)===0?s:ze(s),y={i:p,v:u,k:r,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var E=document.createDocumentFragment();E.append(e=Ce())}return y.e=ve(()=>i(e,u,p,c)),t!==null&&(t.next=y),y}finally{}}function Se(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,s=t?t.e.nodes_start:n,i=e.e.nodes_start;i!==null&&i!==r;){var o=en(i);s.before(i),i=o}}function j(e,t,n){t===null?(e.first=n,e.effect.first=n&&n.e):(t.e.next&&(t.e.next.prev=null),t.next=n,t.e.next=n&&n.e),n===null?e.effect.last=t&&t.e:(n.e.prev&&(n.e.prev.next=null),n.prev=t,n.e.prev=t&&t.e)}function Vr(e,t,n=t){var r=new WeakSet;ht(e,"input",async s=>{var i=s?e.defaultValue:e.value;if(i=Oe(e)?Ae(i):i,n(i),W!==null&&r.add(W),await on(),i!==(i=t())){var o=e.selectionStart,c=e.selectionEnd,f=e.value.length;if(e.value=i??"",c!==null){var l=e.value.length;o===c&&c===f&&l>f?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(c,l))}}}),(M&&e.defaultValue!==e.value||an(t)==null&&e.value)&&(n(Oe(e)?Ae(e.value):e.value),W!==null&&r.add(W)),pt(()=>{var s=t();if(e===document.activeElement){var i=cn??W;if(r.has(i))return}Oe(e)&&s===Ae(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}const Re=new Set;function Wr(e,t,n,r,s=r){var i=n.getAttribute("type")==="checkbox",o=e;let c=!1;if(t!==null)for(var f of t)o=o[f]??=[];o.push(n),ht(n,"change",()=>{var l=n.__value;i&&(l=Je(o,l,n.checked)),s(l)},()=>s(i?[]:null)),pt(()=>{var l=r();if(M&&n.defaultChecked!==n.checked){c=!0;return}i?(l=l||[],n.checked=l.includes(n.__value)):n.checked=ln(n.__value,l)}),un(()=>{var l=o.indexOf(n);l!==-1&&o.splice(l,1)}),Re.has(o)||(Re.add(o),Ne(()=>{o.sort((l,u)=>l.compareDocumentPosition(u)===4?-1:1),Re.delete(o)})),Ne(()=>{if(c){var l;if(i)l=Je(o,l,n.checked);else{var u=o.find(p=>p.checked);l=u?.__value}s(l)}})}function Je(e,t,n){for(var r=new Set,s=0;s<e.length;s+=1)e[s].checked&&r.add(e[s].__value);return n||r.delete(t),Array.from(r)}function Oe(e){var t=e.type;return t==="number"||t==="range"}function Ae(e){return e===""?null:+e}function mt(e,t){return function(){return e.apply(t,arguments)}}const{toString:pn}=Object.prototype,{getPrototypeOf:Le}=Object,{iterator:de,toStringTag:yt}=Symbol,he=(e=>t=>{const n=pn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>he(t)===e),pe=e=>t=>typeof t===e,{isArray:X}=Array,K=pe("undefined");function ee(e){return e!==null&&!K(e)&&e.constructor!==null&&!K(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bt=U("ArrayBuffer");function mn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bt(e.buffer),t}const yn=pe("string"),v=pe("function"),wt=pe("number"),te=e=>e!==null&&typeof e=="object",bn=e=>e===!0||e===!1,ce=e=>{if(he(e)!=="object")return!1;const t=Le(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(yt in e)&&!(de in e)},wn=e=>{if(!te(e)||ee(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},En=U("Date"),gn=U("File"),Sn=U("Blob"),Rn=U("FileList"),On=e=>te(e)&&v(e.pipe),An=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||v(e.append)&&((t=he(e))==="formdata"||t==="object"&&v(e.toString)&&e.toString()==="[object FormData]"))},Tn=U("URLSearchParams"),[_n,xn,vn,Cn]=["ReadableStream","Request","Response","Headers"].map(U),Nn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),X(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(ee(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function Et(e,t){if(ee(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gt=e=>!K(e)&&e!==$;function Pe(){const{caseless:e,skipUndefined:t}=gt(this)&&this||{},n={},r=(s,i)=>{const o=e&&Et(n,i)||i;ce(n[o])&&ce(s)?n[o]=Pe(n[o],s):ce(s)?n[o]=Pe({},s):X(s)?n[o]=s.slice():(!t||!K(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&ne(arguments[s],r);return n}const Pn=(e,t,n,{allOwnKeys:r}={})=>(ne(t,(s,i)=>{n&&v(s)?e[i]=mt(s,n):e[i]=s},{allOwnKeys:r}),e),Fn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kn=(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)},Un=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&Le(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ln=(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},Dn=e=>{if(!e)return null;if(X(e))return e;let t=e.length;if(!wt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Bn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Le(Uint8Array)),In=(e,t)=>{const r=(e&&e[de]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},jn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},qn=U("HTMLFormElement"),Hn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ve=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Mn=U("RegExp"),St=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ne(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},$n=e=>{St(e,(t,n)=>{if(v(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(v(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+"'")})}})},zn=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return X(e)?r(e):r(String(e).split(t)),n},Jn=()=>{},Vn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Wn(e){return!!(e&&v(e.append)&&e[yt]==="FormData"&&e[de])}const Kn=e=>{const t=new Array(10),n=(r,s)=>{if(te(r)){if(t.indexOf(r)>=0)return;if(ee(r))return r;if(!("toJSON"in r)){t[s]=r;const i=X(r)?[]:{};return ne(r,(o,c)=>{const f=n(o,s+1);!K(f)&&(i[c]=f)}),t[s]=void 0,i}}return r};return n(e,0)},Xn=U("AsyncFunction"),Gn=e=>e&&(te(e)||v(e))&&v(e.then)&&v(e.catch),Rt=((e,t)=>e?setImmediate:t?((n,r)=>($.addEventListener("message",({source:s,data:i})=>{s===$&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),$.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",v($.postMessage)),Yn=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||Rt,Zn=e=>e!=null&&v(e[de]),a={isArray:X,isArrayBuffer:bt,isBuffer:ee,isFormData:An,isArrayBufferView:mn,isString:yn,isNumber:wt,isBoolean:bn,isObject:te,isPlainObject:ce,isEmptyObject:wn,isReadableStream:_n,isRequest:xn,isResponse:vn,isHeaders:Cn,isUndefined:K,isDate:En,isFile:gn,isBlob:Sn,isRegExp:Mn,isFunction:v,isStream:On,isURLSearchParams:Tn,isTypedArray:Bn,isFileList:Rn,forEach:ne,merge:Pe,extend:Pn,trim:Nn,stripBOM:Fn,inherits:kn,toFlatObject:Un,kindOf:he,kindOfTest:U,endsWith:Ln,toArray:Dn,forEachEntry:In,matchAll:jn,isHTMLForm:qn,hasOwnProperty:Ve,hasOwnProp:Ve,reduceDescriptors:St,freezeMethods:$n,toObjectSet:zn,toCamelCase:Hn,noop:Jn,toFiniteNumber:Vn,findKey:Et,global:$,isContextDefined:gt,isSpecCompliantForm:Wn,toJSONObject:Kn,isAsyncFn:Xn,isThenable:Gn,setImmediate:Rt,asap:Yn,isIterable:Zn};function w(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)}a.inherits(w,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:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Ot=w.prototype,At={};["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=>{At[e]={value:e}});Object.defineProperties(w,At);Object.defineProperty(Ot,"isAxiosError",{value:!0});w.from=(e,t,n,r,s,i)=>{const o=Object.create(Ot);a.toFlatObject(e,o,function(u){return u!==Error.prototype},l=>l!=="isAxiosError");const c=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return w.call(o,c,f,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const Qn=null;function Fe(e){return a.isPlainObject(e)||a.isArray(e)}function Tt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function We(e,t,n){return e?e.concat(t).map(function(s,i){return s=Tt(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function er(e){return a.isArray(e)&&!e.some(Fe)}const tr=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function me(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,d){return!a.isUndefined(d[m])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(a.isDate(h))return h.toISOString();if(a.isBoolean(h))return h.toString();if(!f&&a.isBlob(h))throw new w("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(h)||a.isTypedArray(h)?f&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,d){let b=h;if(h&&!d&&typeof h=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(a.isArray(h)&&er(h)||(a.isFileList(h)||a.endsWith(m,"[]"))&&(b=a.toArray(h)))return m=Tt(m),b.forEach(function(S,g){!(a.isUndefined(S)||S===null)&&t.append(o===!0?We([m],g,i):o===null?m:m+"[]",l(S))}),!1}return Fe(h)?!0:(t.append(We(d,m,i),l(h)),!1)}const p=[],y=Object.assign(tr,{defaultVisitor:u,convertValue:l,isVisitable:Fe});function E(h,m){if(!a.isUndefined(h)){if(p.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(h),a.forEach(h,function(b,T){(!(a.isUndefined(b)||b===null)&&s.call(t,b,a.isString(T)?T.trim():T,m,y))===!0&&E(b,m?m.concat(T):[T])}),p.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Ke(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function De(e,t){this._pairs=[],e&&me(e,this,t)}const _t=De.prototype;_t.append=function(t,n){this._pairs.push([t,n])};_t.toString=function(t){const n=t?function(r){return t.call(this,r,Ke)}:Ke;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function nr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xt(e,t,n){if(!t)return e;const r=n&&n.encode||nr;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new De(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Xe{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){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const vt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rr=typeof URLSearchParams<"u"?URLSearchParams:De,sr=typeof FormData<"u"?FormData:null,or=typeof Blob<"u"?Blob:null,ir={isBrowser:!0,classes:{URLSearchParams:rr,FormData:sr,Blob:or},protocols:["http","https","file","blob","url","data"]},Be=typeof window<"u"&&typeof document<"u",ke=typeof navigator=="object"&&navigator||void 0,ar=Be&&(!ke||["ReactNative","NativeScript","NS"].indexOf(ke.product)<0),cr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lr=Be&&window.location.href||"http://localhost",ur=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Be,hasStandardBrowserEnv:ar,hasStandardBrowserWebWorkerEnv:cr,navigator:ke,origin:lr},Symbol.toStringTag,{value:"Module"})),x={...ur,...ir};function fr(e,t){return me(e,new x.classes.URLSearchParams,{visitor:function(n,r,s,i){return x.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function dr(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function hr(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function Ct(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),f=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,f?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=hr(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(dr(r),s,n,0)}),n}return null}function pr(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const re={transitional:vt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Ct(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return fr(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return me(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),pr(t)):t}],transformResponse:[function(t){const n=this.transitional||re.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(c){if(o)throw c.name==="SyntaxError"?w.from(c,w.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{re.headers[e]={}});const mr=a.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"]),yr=e=>{const t={};let n,r,s;return e&&e.split(`
2
+ `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&mr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ge=Symbol("internals");function Q(e){return e&&String(e).trim().toLowerCase()}function le(e){return e===!1||e==null?e:a.isArray(e)?e.map(le):String(e)}function br(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 wr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Te(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Er(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function gr(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let C=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,f,l){const u=Q(f);if(!u)throw new Error("header name must be a non-empty string");const p=a.findKey(s,u);(!p||s[p]===void 0||l===!0||l===void 0&&s[p]!==!1)&&(s[p||f]=le(c))}const o=(c,f)=>a.forEach(c,(l,u)=>i(l,u,f));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(a.isString(t)&&(t=t.trim())&&!wr(t))o(yr(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},f,l;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(f=c[l])?a.isArray(f)?[...f,u[1]]:[f,u[1]]:u[1]}o(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Q(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return br(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Q(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Te(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=Q(o),o){const c=a.findKey(r,o);c&&(!n||Te(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Te(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=le(s),delete n[i];return}const c=t?Er(i):String(i).trim();c!==i&&delete n[i],n[c]=le(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.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(`
3
+ `)}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[Ge]=this[Ge]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=Q(o);r[c]||(gr(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};C.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(C.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(C);function _e(e,t){const n=this||re,r=t||n,s=C.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Nt(e){return!!(e&&e.__CANCEL__)}function G(e,t,n){w.call(this,e??"canceled",w.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(G,w,{__CANCEL__:!0});function Pt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new w("Request failed with status code "+n.status,[w.ERR_BAD_REQUEST,w.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Sr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Rr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(f){const l=Date.now(),u=r[i];o||(o=l),n[s]=f,r[s]=l;let p=i,y=0;for(;p!==s;)y+=n[p++],p=p%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const E=u&&l-u;return E?Math.round(y*1e3/E):void 0}}function Or(e,t){let n=0,r=1e3/t,s,i;const o=(l,u=Date.now())=>{n=u,s=null,i&&(clearTimeout(i),i=null),e(...l)};return[(...l)=>{const u=Date.now(),p=u-n;p>=r?o(l,u):(s=l,i||(i=setTimeout(()=>{i=null,o(s)},r-p)))},()=>s&&o(s)]}const fe=(e,t,n=3)=>{let r=0;const s=Rr(50,250);return Or(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,f=o-r,l=s(f),u=o<=c;r=o;const p={loaded:o,total:c,progress:c?o/c:void 0,bytes:f,rate:l||void 0,estimated:l&&c&&u?(c-o)/l:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},Ye=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ze=e=>(...t)=>a.asap(()=>e(...t)),Ar=x.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,x.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(x.origin),x.navigator&&/(msie|trident)/i.test(x.navigator.userAgent)):()=>!0,Tr=x.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),i===!0&&c.push("secure"),a.isString(o)&&c.push(`SameSite=${o}`),document.cookie=c.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 _r(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ft(e,t,n){let r=!_r(t);return e&&(r||n==!1)?xr(e,t):t}const Qe=e=>e instanceof C?{...e}:e;function J(e,t){t=t||{};const n={};function r(l,u,p,y){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:y},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,p,y){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l,p,y)}else return r(l,u,p,y)}function i(l,u){if(!a.isUndefined(u))return r(void 0,u)}function o(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function c(l,u,p){if(p in t)return r(l,u);if(p in e)return r(void 0,l)}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(l,u,p)=>s(Qe(l),Qe(u),p,!0)};return a.forEach(Object.keys({...e,...t}),function(u){const p=f[u]||s,y=p(e[u],t[u],u);a.isUndefined(y)&&p!==c||(n[u]=y)}),n}const kt=e=>{const t=J({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=t;if(t.headers=o=C.from(o),t.url=xt(Ft(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(n)){if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(a.isFunction(n.getHeaders)){const f=n.getHeaders(),l=["content-type","content-length"];Object.entries(f).forEach(([u,p])=>{l.includes(u.toLowerCase())&&o.set(u,p)})}}if(x.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&Ar(t.url))){const f=s&&i&&Tr.read(i);f&&o.set(s,f)}return t},vr=typeof XMLHttpRequest<"u",Cr=vr&&function(e){return new Promise(function(n,r){const s=kt(e);let i=s.data;const o=C.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:l}=s,u,p,y,E,h;function m(){E&&E(),h&&h(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let d=new XMLHttpRequest;d.open(s.method.toUpperCase(),s.url,!0),d.timeout=s.timeout;function b(){if(!d)return;const S=C.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),_={data:!c||c==="text"||c==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:S,config:e,request:d};Pt(function(R){n(R),m()},function(R){r(R),m()},_),d=null}"onloadend"in d?d.onloadend=b:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(b)},d.onabort=function(){d&&(r(new w("Request aborted",w.ECONNABORTED,e,d)),d=null)},d.onerror=function(g){const _=g&&g.message?g.message:"Network Error",N=new w(_,w.ERR_NETWORK,e,d);N.event=g||null,r(N),d=null},d.ontimeout=function(){let g=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const _=s.transitional||vt;s.timeoutErrorMessage&&(g=s.timeoutErrorMessage),r(new w(g,_.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,e,d)),d=null},i===void 0&&o.setContentType(null),"setRequestHeader"in d&&a.forEach(o.toJSON(),function(g,_){d.setRequestHeader(_,g)}),a.isUndefined(s.withCredentials)||(d.withCredentials=!!s.withCredentials),c&&c!=="json"&&(d.responseType=s.responseType),l&&([y,h]=fe(l,!0),d.addEventListener("progress",y)),f&&d.upload&&([p,E]=fe(f),d.upload.addEventListener("progress",p),d.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(u=S=>{d&&(r(!S||S.type?new G(null,e,d):S),d.abort(),d=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const T=Sr(s.url);if(T&&x.protocols.indexOf(T)===-1){r(new w("Unsupported protocol "+T+":",w.ERR_BAD_REQUEST,e));return}d.send(i||null)})},Nr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;r.abort(u instanceof w?u:new G(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new w(`timeout ${t} of ms exceeded`,w.ETIMEDOUT))},t);const c=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>l.addEventListener("abort",i));const{signal:f}=r;return f.unsubscribe=()=>a.asap(c),f}},Pr=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Fr=async function*(e,t){for await(const n of kr(e))yield*Pr(n,t)},kr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},et=(e,t,n,r)=>{const s=Fr(e,t);let i=0,o,c=f=>{o||(o=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:l,value:u}=await s.next();if(l){c(),f.close();return}let p=u.byteLength;if(n){let y=i+=p;n(y)}f.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},tt=64*1024,{isFunction:ae}=a,Ur=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:nt,TextEncoder:rt}=a.global,st=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Lr=e=>{e=a.merge.call({skipUndefined:!0},Ur,e);const{fetch:t,Request:n,Response:r}=e,s=t?ae(t):typeof fetch=="function",i=ae(n),o=ae(r);if(!s)return!1;const c=s&&ae(nt),f=s&&(typeof rt=="function"?(h=>m=>h.encode(m))(new rt):async h=>new Uint8Array(await new n(h).arrayBuffer())),l=i&&c&&st(()=>{let h=!1;const m=new n(x.origin,{body:new nt,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!m}),u=o&&c&&st(()=>a.isReadableStream(new r("").body)),p={stream:u&&(h=>h.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!p[h]&&(p[h]=(m,d)=>{let b=m&&m[h];if(b)return b.call(m);throw new w(`Response type '${h}' is not supported`,w.ERR_NOT_SUPPORT,d)})});const y=async h=>{if(h==null)return 0;if(a.isBlob(h))return h.size;if(a.isSpecCompliantForm(h))return(await new n(x.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(a.isArrayBufferView(h)||a.isArrayBuffer(h))return h.byteLength;if(a.isURLSearchParams(h)&&(h=h+""),a.isString(h))return(await f(h)).byteLength},E=async(h,m)=>{const d=a.toFiniteNumber(h.getContentLength());return d??y(m)};return async h=>{let{url:m,method:d,data:b,signal:T,cancelToken:S,timeout:g,onDownloadProgress:_,onUploadProgress:N,responseType:R,headers:F,withCredentials:k="same-origin",fetchOptions:Y}=kt(h),L=t||fetch;R=R?(R+"").toLowerCase():"text";let q=Nr([T,S&&S.toAbortSignal()],g),D=null;const A=q&&q.unsubscribe&&(()=>{q.unsubscribe()});let Z;try{if(N&&l&&d!=="get"&&d!=="head"&&(Z=await E(F,b))!==0){let H=new n(m,{method:"POST",body:b,duplex:"half"}),V;if(a.isFormData(b)&&(V=H.headers.get("content-type"))&&F.setContentType(V),H.body){const[be,oe]=Ye(Z,fe(Ze(N)));b=et(H.body,tt,be,oe)}}a.isString(k)||(k=k?"include":"omit");const P=i&&"credentials"in n.prototype,se={...Y,signal:q,method:d.toUpperCase(),headers:F.normalize().toJSON(),body:b,duplex:"half",credentials:P?k:void 0};D=i&&new n(m,se);let B=await(i?L(D,Y):L(m,se));const je=u&&(R==="stream"||R==="response");if(u&&(_||je&&A)){const H={};["status","statusText","headers"].forEach(qe=>{H[qe]=B[qe]});const V=a.toFiniteNumber(B.headers.get("content-length")),[be,oe]=_&&Ye(V,fe(Ze(_),!0))||[];B=new r(et(B.body,tt,be,()=>{oe&&oe(),A&&A()}),H)}R=R||"text";let jt=await p[a.findKey(p,R)||"text"](B,h);return!je&&A&&A(),await new Promise((H,V)=>{Pt(H,V,{data:jt,headers:C.from(B.headers),status:B.status,statusText:B.statusText,config:h,request:D})})}catch(P){throw A&&A(),P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)?Object.assign(new w("Network Error",w.ERR_NETWORK,h,D),{cause:P.cause||P}):w.from(P,P&&P.code,h,D)}}},Dr=new Map,Ut=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,c=o,f,l,u=Dr;for(;c--;)f=i[c],l=u.get(f),l===void 0&&u.set(f,l=c?new Map:Lr(t)),u=l;return l};Ut();const Ie={http:Qn,xhr:Cr,fetch:{get:Ut}};a.forEach(Ie,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ot=e=>`- ${e}`,Br=e=>a.isFunction(e)||e===null||e===!1;function Ir(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let c;if(s=r,!Br(r)&&(s=Ie[(c=String(r)).toLowerCase()],s===void 0))throw new w(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(t))))break;i[c||"#"+o]=s}if(!s){const o=Object.entries(i).map(([f,l])=>`adapter ${f} `+(l===!1?"is not supported by the environment":"is not available in the build"));let c=n?o.length>1?`since :
4
+ `+o.map(ot).join(`
5
+ `):" "+ot(o[0]):"as no adapter specified";throw new w("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const Lt={getAdapter:Ir,adapters:Ie};function xe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new G(null,e)}function it(e){return xe(e),e.headers=C.from(e.headers),e.data=_e.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lt.getAdapter(e.adapter||re.adapter,e)(e).then(function(r){return xe(e),r.data=_e.call(e,e.transformResponse,r),r.headers=C.from(r.headers),r},function(r){return Nt(r)||(xe(e),r&&r.response&&(r.response.data=_e.call(e,e.transformResponse,r.response),r.response.headers=C.from(r.response.headers))),Promise.reject(r)})}const Dt="1.13.2",ye={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ye[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const at={};ye.transitional=function(t,n,r){function s(i,o){return"[Axios v"+Dt+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new w(s(o," has been removed"+(n?" in "+n:"")),w.ERR_DEPRECATED);return n&&!at[o]&&(at[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}};ye.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function jr(e,t,n){if(typeof e!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],f=c===void 0||o(c,i,e);if(f!==!0)throw new w("option "+i+" must be "+f,w.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new w("Unknown option "+i,w.ERR_BAD_OPTION)}}const ue={assertOptions:jr,validators:ye},I=ue.validators;let z=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Xe,response:new Xe}}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 i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=J(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ue.assertOptions(r,{silentJSONParsing:I.transitional(I.boolean),forcedJSONParsing:I.transitional(I.boolean),clarifyTimeoutError:I.transitional(I.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:ue.assertOptions(s,{encode:I.function,serialize:I.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ue.assertOptions(n,{baseUrl:I.spelling("baseURL"),withXsrfToken:I.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=C.concat(o,i);const c=[];let f=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(f=f&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let u,p=0,y;if(!f){const h=[it.bind(this),void 0];for(h.unshift(...c),h.push(...l),y=h.length,u=Promise.resolve(n);p<y;)u=u.then(h[p++],h[p++]);return u}y=c.length;let E=n;for(;p<y;){const h=c[p++],m=c[p++];try{E=h(E)}catch(d){m.call(this,d);break}}try{u=it.call(this,E)}catch(h){return Promise.reject(h)}for(p=0,y=l.length;p<y;)u=u.then(l[p++],l[p++]);return u}getUri(t){t=J(this.defaults,t);const n=Ft(t.baseURL,t.url,t.allowAbsoluteUrls);return xt(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){z.prototype[t]=function(n,r){return this.request(J(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,c){return this.request(J(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}z.prototype[t]=n(),z.prototype[t+"Form"]=n(!0)});let qr=class Bt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new G(i,o,c),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 Bt(function(s){t=s}),cancel:t}}};function Hr(e){return function(n){return e.apply(null,n)}}function Mr(e){return a.isObject(e)&&e.isAxiosError===!0}const Ue={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(Ue).forEach(([e,t])=>{Ue[t]=e});function It(e){const t=new z(e),n=mt(z.prototype.request,t);return a.extend(n,z.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return It(J(e,s))},n}const O=It(re);O.Axios=z;O.CanceledError=G;O.CancelToken=qr;O.isCancel=Nt;O.VERSION=Dt;O.toFormData=me;O.AxiosError=w;O.Cancel=O.CanceledError;O.all=function(t){return Promise.all(t)};O.spread=Hr;O.isAxiosError=Mr;O.mergeConfig=J;O.AxiosHeaders=C;O.formToJSON=e=>Ct(a.isHTMLForm(e)?new FormData(e):e);O.getAdapter=Lt.getAdapter;O.HttpStatusCode=Ue;O.default=O;const{Axios:Gr,AxiosError:Yr,CanceledError:Zr,isCancel:Qr,CancelToken:es,VERSION:ts,all:ns,Cancel:rs,isAxiosError:ss,spread:os,toFormData:is,AxiosHeaders:as,HttpStatusCode:cs,formToJSON:ls,getAdapter:us,mergeConfig:fs}=O,ds=typeof window<"u"&&window.location.hostname!=="localhost"?"":"http://localhost:8000";export{ds as A,Wr as a,Vr as b,O as c,Jr as e,zr as i};
frontend/build/_app/immutable/chunks/BT92UpWj.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{o as Ne,j as U,g as T,b as I,ak as Z,a$ as De,b0 as pt}from"./CZHqxbHz.js";import{w as be}from"./Bj0ilmBj.js";class ke{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Se{constructor(t,n){this.status=t,this.location=n}}class Ee extends Error{constructor(t,n,a){super(a),this.status=t,this.text=n}}new URL("sveltekit-internal://");function gt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function _t(e){return e.split("%25").map(decodeURI).join("%25")}function mt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function de({href:e}){return e.split("#")[0]}function wt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let a=n.length;for(;a;)t=t*33^n.charCodeAt(--a)}else if(ArrayBuffer.isView(n)){const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=a.length;for(;r;)t=t*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function vt(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}const yt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&M.delete(Re(e)),yt(e,t));const M=new Map;function bt(e,t){const n=Re(e,t),a=document.querySelector(n);if(a?.textContent){a.remove();let{body:r,...s}=JSON.parse(a.textContent);const o=a.getAttribute("data-ttl");return o&&M.set(n,{body:r,init:s,ttl:1e3*Number(o)}),a.getAttribute("data-b64")!==null&&(r=vt(r)),Promise.resolve(new Response(r,s))}return window.fetch(e,t)}function kt(e,t,n){if(M.size>0){const a=Re(e,n),r=M.get(a);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(r.body,r.init);M.delete(a)}}return window.fetch(t,n)}function Re(e,t){let a=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const r=[];t.headers&&r.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&r.push(t.body),a+=`[data-hash="${wt(...r)}"]`}return a}const St=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Et(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${xt(e).map(a=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return t.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const o=a.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return he(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return he(String.fromCharCode(...c.slice(2).split("-").map(m=>parseInt(m,16))));const f=St.exec(c),[,h,w,u,g]=f;return t.push({name:u,matcher:g,optional:!!h,rest:!!w,chained:w?l===1&&o[0]==="":!1}),w?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return he(c)}).join("")}).join("")}/?$`),params:t}}function Rt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function xt(e){return e.slice(1).split("/").filter(Rt)}function At(e,t,n){const a={},r=e.slice(1),s=r.filter(i=>i!==void 0);let o=0;for(let i=0;i<t.length;i+=1){const c=t[i];let l=r[i-o];if(c.chained&&c.rest&&o&&(l=r.slice(i-o,i+1).filter(f=>f).join("/"),o=0),l===void 0){c.rest&&(a[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){a[c.name]=l;const f=t[i+1],h=r[i+1];f&&!f.rest&&f.optional&&h&&c.chained&&(o=0),!f&&!h&&Object.keys(a).length===s.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return a}function he(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Lt({nodes:e,server_loads:t,dictionary:n,matchers:a}){const r=new Set(t);return Object.entries(n).map(([i,[c,l,f]])=>{const{pattern:h,params:w}=Et(i),u={id:i,exec:g=>{const m=h.exec(g);if(m)return At(m,w,a)},errors:[1,...f||[]].map(g=>e[g]),layouts:[0,...l||[]].map(o),leaf:s(c)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function s(i){const c=i<0;return c&&(i=~i),[c,e[i]]}function o(i){return i===void 0?i:[r.has(i),e[i]]}}function Ge(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function qe(e,t,n=JSON.stringify){const a=n(t);try{sessionStorage[e]=a}catch{}}const A=globalThis.__sveltekit_99419z?.base??"",Ut=globalThis.__sveltekit_99419z?.assets??A??"",Tt="1763958337763",We="sveltekit:snapshot",Ye="sveltekit:scroll",He="sveltekit:states",It="sveltekit:pageurl",z="sveltekit:history",G="sveltekit:navigation",j={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},xe=location.origin;function Je(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function ce(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...j,"":j.hover};function Xe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Qe(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Xe(e)}}function _e(e,t,n){let a;try{if(a=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&a.hash.match(/^#[^/]/)){const i=location.hash.split("#")[1]||"/";a.hash=`#${i}${a.hash}`}}catch{}const r=e instanceof SVGAElement?e.target.baseVal:e.target,s=!a||!!r||le(a,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=a?.origin===xe&&e.hasAttribute("download");return{url:a,external:s,target:r,download:o}}function ee(e){let t=null,n=null,a=null,r=null,s=null,o=null,i=e;for(;i&&i!==document.documentElement;)a===null&&(a=V(i,"preload-code")),r===null&&(r=V(i,"preload-data")),t===null&&(t=V(i,"keepfocus")),n===null&&(n=V(i,"noscroll")),s===null&&(s=V(i,"reload")),o===null&&(o=V(i,"replacestate")),i=Xe(i);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[a??"off"],preload_data:Ve[r??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(o)}}function ze(e){const t=be(e);let n=!0;function a(){n=!0,t.update(o=>o)}function r(o){n=!1,t.set(o)}function s(o){let i;return t.subscribe(c=>{(i===void 0||n&&c!==i)&&o(i=c)})}return{notify:a,set:r,subscribe:s}}const Ze={v:()=>{}};function Ot(){const{set:e,subscribe:t}=be(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${Ut}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const o=(await r.json()).version!==Tt;return o&&(e(!0),Ze.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:a}}function le(e,t,n){return e.origin!==xe||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function on(e){}const et=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...et];const $t=new Set([...et]);[...$t];function Pt(e){return e.filter(t=>t!=null)}function Ae(e){return e instanceof ke||e instanceof Ee?e.status:500}function Ct(e){return e instanceof Ee?e.text:"Internal Error"}let k,W,pe;const jt=Ne.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ne.toString());jt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},pe={current:!1}):(k=new class{#e=U({});get data(){return T(this.#e)}set data(t){I(this.#e,t)}#t=U(null);get form(){return T(this.#t)}set form(t){I(this.#t,t)}#n=U(null);get error(){return T(this.#n)}set error(t){I(this.#n,t)}#a=U({});get params(){return T(this.#a)}set params(t){I(this.#a,t)}#r=U({id:null});get route(){return T(this.#r)}set route(t){I(this.#r,t)}#o=U({});get state(){return T(this.#o)}set state(t){I(this.#o,t)}#s=U(-1);get status(){return T(this.#s)}set status(t){I(this.#s,t)}#i=U(new URL("https://example.com"));get url(){return T(this.#i)}set url(t){I(this.#i,t)}},W=new class{#e=U(null);get current(){return T(this.#e)}set current(t){I(this.#e,t)}},pe=new class{#e=U(!1);get current(){return T(this.#e)}set current(t){I(this.#e,t)}},Ze.v=()=>pe.current=!0);function tt(e){Object.assign(k,e)}const Nt=new Set(["icon","shortcut icon","apple-touch-icon"]),D=Ge(Ye)??{},Y=Ge(We)??{},C={url:ze({}),page:ze({}),navigating:be(null),updated:Ot()};function Le(e){D[e]=ce()}function Dt(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;Y[n];)delete Y[n],n+=1}function H(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(A||"/");e&&await e.update()}}function Be(){}let Ue,me,te,O,we,v;const ne=[],ae=[];let R=null;function ve(){R?.fork?.then(e=>e?.discard()),R=null}const Q=new Map,at=new Set,qt=new Set,F=new Set;let _={branch:[],error:null,url:null},rt=!1,re=!1,Ke=!0,J=!1,K=!1,ot=!1,Te=!1,Ie,y,x,N;const oe=new Set,Me=new Map;async function un(e,t,n){globalThis.__sveltekit_99419z?.data&&globalThis.__sveltekit_99419z.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Ue=Lt(e),O=document.documentElement,we=t,me=e.nodes[0],te=e.nodes[1],me(),te(),y=history.state?.[z],x=history.state?.[G],y||(y=x=Date.now(),history.replaceState({...history.state,[z]:y,[G]:x},""));const a=D[y];function r(){a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y))}n?(r(),await Zt(we,n)):(await B({type:"enter",url:Je(v.hash?nn(new URL(location.href)):location.href),replace_state:!0}),r()),Qt()}function Vt(){ne.length=0,Te=!1}function st(e){ae.some(t=>t?.snapshot)&&(Y[e]=ae.map(t=>t?.snapshot?.capture()))}function it(e){Y[e]?.forEach((t,n)=>{ae[n]?.snapshot?.restore(t)})}function Fe(){Le(y),qe(Ye,D),st(x),qe(We,Y)}async function zt(e,t,n,a){let r;t.invalidateAll&&ve(),await B({type:"goto",url:Je(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:a,accept:()=>{t.invalidateAll&&(Te=!0,r=[...Me.keys()]),t.invalidate&&t.invalidate.forEach(Xt)}}),t.invalidateAll&&Z().then(Z).then(()=>{Me.forEach(({resource:s},o)=>{r?.includes(o)&&s.refresh?.()})})}async function Bt(e){if(e.id!==R?.id){ve();const t={};if(oe.add(t),R={id:e.id,token:t,promise:lt({...e,preload:t}).then(n=>(oe.delete(t),n.type==="loaded"&&n.state.error&&ve(),n)),fork:null},De){const n=R;n.fork=n.promise.then(a=>{if(n===R&&a.type==="loaded")try{return De(()=>{Ie.$set(a.props),tt(a.props.page)})}catch{}return null})}}return R.promise}async function ge(e){const t=(await ue(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function ct(e,t,n){_=e.state;const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(k,e.props.page),Ie=new v.root({target:t,props:{...e.props,stores:C,components:ae},hydrate:n,sync:!1}),await Promise.resolve(),it(x),n){const r={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};F.forEach(s=>s(r))}re=!0}function se({url:e,params:t,branch:n,status:a,error:r,route:s,form:o}){let i="never";if(A&&(e.pathname===A||e.pathname===A+"/"))i="always";else for(const u of n)u?.slash!==void 0&&(i=u.slash);e.pathname=gt(e.pathname,i),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:r,route:s},props:{constructors:Pt(n).map(u=>u.node.component),page:je(k)}};o!==void 0&&(c.props.form=o);let l={},f=!k,h=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const g=n[u],m=_.branch[u];g?.data!==m?.data&&(f=!0),g&&(l={...l,...g.data},f&&(c.props[`data_${h}`]=l),h+=1)}return(!_.url||e.href!==_.url.href||_.error!==r||o!==void 0&&o!==k.form||f)&&(c.props.page={error:r,params:t,route:{id:s?.id??null},state:{},status:a,url:new URL(e),form:o??null,data:f?l:k.data}),c}async function Oe({loader:e,parent:t,url:n,params:a,route:r,server_data_node:s}){let o=null;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();return{node:c,loader:e,server:s,universal:c.universal?.load?{type:"data",data:o,uses:i}:null,data:o??s?.data??null,slash:c.universal?.trailingSlash??s?.slash}}function Kt(e,t,n){let a=e instanceof Request?e.url:e;const r=new URL(a,n);r.origin===n.origin&&(a=r.href.slice(n.origin.length));const s=re?kt(a,r.href,t):bt(a,t);return{resolved:r,promise:s}}function Mt(e,t,n,a,r,s){if(Te)return!0;if(!r)return!1;if(r.parent&&e||r.route&&t||r.url&&n)return!0;for(const o of r.search_params)if(a.has(o))return!0;for(const o of r.params)if(s[o]!==_.params[o])return!0;for(const o of r.dependencies)if(ne.some(i=>i(new URL(o))))return!0;return!1}function $e(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Ft(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const a of n){const r=e.searchParams.getAll(a),s=t.searchParams.getAll(a);r.every(o=>s.includes(o))&&s.every(o=>r.includes(o))&&n.delete(a)}return n}function Gt({error:e,url:t,route:n,params:a}){return{type:"loaded",state:{error:e,url:t,route:n,params:a,branch:[]},props:{page:je(k),constructors:[]}}}async function lt({id:e,invalidating:t,url:n,params:a,route:r,preload:s}){if(R?.id===e)return oe.delete(R.token),R.promise;const{errors:o,layouts:i,leaf:c}=r,l=[...i,c];o.forEach(p=>p?.().catch(()=>{})),l.forEach(p=>p?.[1]().catch(()=>{}));const f=_.url?e!==ie(_.url):!1,h=_.route?r.id!==_.route.id:!1,w=Ft(_.url,n);let u=!1;const g=l.map(async(p,d)=>{if(!p)return;const S=_.branch[d];return p[1]===S?.loader&&!Mt(u,h,f,w,S.universal?.uses,a)?S:(u=!0,Oe({loader:p[1],url:n,params:a,route:r,parent:async()=>{const $={};for(let L=0;L<d;L+=1)Object.assign($,(await g[L])?.data);return $},server_data_node:$e(p[0]?{type:"skip"}:null,p[0]?S?.server:void 0)}))});for(const p of g)p.catch(()=>{});const m=[];for(let p=0;p<l.length;p+=1)if(l[p])try{m.push(await g[p])}catch(d){if(d instanceof Se)return{type:"redirect",location:d.location};if(oe.has(s))return Gt({error:await X(d,{params:a,url:n,route:{id:r.id}}),url:n,params:a,route:r});let S=Ae(d),E;if(d instanceof ke)E=d.body;else{if(await C.updated.check())return await nt(),await H(n);E=await X(d,{params:a,url:n,route:{id:r.id}})}const $=await Wt(p,m,o);return $?se({url:n,params:a,branch:m.slice(0,$.idx).concat($.node),status:S,error:E,route:r}):await ft(n,{id:r.id},E,S)}else m.push(void 0);return se({url:n,params:a,branch:m,status:200,error:null,route:r,form:t?void 0:null})}async function Wt(e,t,n){for(;e--;)if(n[e]){let a=e;for(;!t[a];)a-=1;try{return{idx:a+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Pe({status:e,error:t,url:n,route:a}){const r={};let s=null;try{const o=await Oe({loader:me,url:n,params:r,route:a,parent:()=>Promise.resolve({}),server_data_node:$e(s)}),i={node:await te(),loader:te,universal:null,server:null,data:null};return se({url:n,params:r,branch:[o,i],status:e,error:t,route:null})}catch(o){if(o instanceof Se)return zt(new URL(o.location,location.href),{},0);throw o}}async function Yt(e){const t=e.href;if(Q.has(t))return Q.get(t);let n;try{const a=(async()=>{let r=await v.hooks.reroute({url:new URL(e),fetch:async(s,o)=>Kt(s,o,e).promise})??e;if(typeof r=="string"){const s=new URL(e);v.hash?s.hash=r:s.pathname=r,r=s}return r})();Q.set(t,a),n=await a}catch{Q.delete(t);return}return n}async function ue(e,t){if(e&&!le(e,A,v.hash)){const n=await Yt(e);if(!n)return;const a=Ht(n);for(const r of Ue){const s=r.exec(a);if(s)return{id:ie(e),invalidating:t,route:r,params:mt(s),url:e}}}}function Ht(e){return _t(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(A.length))||"/"}function ie(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ut({url:e,type:t,intent:n,delta:a,event:r}){let s=!1;const o=Ce(_,n,e,t);a!==void 0&&(o.navigation.delta=a),r!==void 0&&(o.navigation.event=r);const i={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return J||at.forEach(c=>c(i)),s?null:o}async function B({type:e,url:t,popped:n,keepfocus:a,noscroll:r,replace_state:s,state:o={},redirect_count:i=0,nav_token:c={},accept:l=Be,block:f=Be,event:h}){const w=N;N=c;const u=await ue(t,!1),g=e==="enter"?Ce(_,u,t,e):ut({url:t,type:e,delta:n?.delta,intent:u,event:h});if(!g){f(),N===c&&(N=w);return}const m=y,p=x;l(),J=!0,re&&g.navigation.type!=="enter"&&C.navigating.set(W.current=g.navigation);let d=u&&await lt(u);if(!d){if(le(t,A,v.hash))return await H(t,s);d=await ft(t,{id:null},await X(new Ee(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=u?.url||t,N!==c)return g.reject(new Error("navigation aborted")),!1;if(d.type==="redirect"){if(i<20){await B({type:e,url:new URL(d.location,t),popped:n,keepfocus:a,noscroll:r,replace_state:s,state:o,redirect_count:i+1,nav_token:c}),g.fulfil(void 0);return}d=await Pe({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else d.props.page.status>=400&&await C.updated.check()&&(await nt(),await H(t,s));if(Vt(),Le(m),st(p),d.props.page.url.pathname!==t.pathname&&(t.pathname=d.props.page.url.pathname),o=n?n.state:o,!n){const b=s?0:1,q={[z]:y+=b,[G]:x+=b,[He]:o};(s?history.replaceState:history.pushState).call(history,q,"",t),s||Dt(y,x)}const S=u&&R?.id===u.id?R.fork:null;R=null,d.props.page.state=o;let E;if(re){const b=(await Promise.all(Array.from(qt,P=>P(g.navigation)))).filter(P=>typeof P=="function");if(b.length>0){let P=function(){b.forEach(fe=>{F.delete(fe)})};b.push(P),b.forEach(fe=>{F.add(fe)})}_=d.state,d.props.page&&(d.props.page.url=t);const q=S&&await S;q?E=q.commit():(Ie.$set(d.props),tt(d.props.page),E=pt?.()),ot=!0}else await ct(d,we,!1);const{activeElement:$}=document;await E,await Z(),await Z();let L=n?n.scroll:r?ce():null;if(Ke){const b=t.hash&&document.getElementById(dt(t));if(L)scrollTo(L.x,L.y);else if(b){b.scrollIntoView();const{top:q,left:P}=b.getBoundingClientRect();L={x:pageXOffset+P,y:pageYOffset+q}}else scrollTo(0,0)}const ht=document.activeElement!==$&&document.activeElement!==document.body;!a&&!ht&&tn(t,L),Ke=!0,d.props.page&&Object.assign(k,d.props.page),J=!1,e==="popstate"&&it(x),g.fulfil(void 0),F.forEach(b=>b(g.navigation)),C.navigating.set(W.current=null)}async function ft(e,t,n,a,r){return e.origin===xe&&e.pathname===location.pathname&&!rt?await Pe({status:a,error:n,url:e,route:t}):await H(e,r)}function Jt(){let e,t,n;O.addEventListener("mousemove",i=>{const c=i.target;clearTimeout(e),e=setTimeout(()=>{s(c,j.hover)},20)});function a(i){i.defaultPrevented||s(i.composedPath()[0],j.tap)}O.addEventListener("mousedown",a),O.addEventListener("touchstart",a,{passive:!0});const r=new IntersectionObserver(i=>{for(const c of i)c.isIntersecting&&(ge(new URL(c.target.href)),r.unobserve(c.target))},{threshold:0});async function s(i,c){const l=Qe(i,O),f=l===t&&c>=n;if(!l||f)return;const{url:h,external:w,download:u}=_e(l,A,v.hash);if(w||u)return;const g=ee(l),m=h&&ie(_.url)===ie(h);if(!(g.reload||m))if(c<=g.preload_data){t=l,n=j.tap;const p=await ue(h,!1);if(!p)return;Bt(p)}else c<=g.preload_code&&(t=l,n=c,ge(h))}function o(){r.disconnect();for(const i of O.querySelectorAll("a")){const{url:c,external:l,download:f}=_e(i,A,v.hash);if(l||f)continue;const h=ee(i);h.reload||(h.preload_code===j.viewport&&r.observe(i),h.preload_code===j.eager&&ge(c))}}F.add(o),o()}function X(e,t){if(e instanceof ke)return e.body;const n=Ae(e),a=Ct(e);return v.hooks.handleError({error:e,event:t,status:n,message:a})??{message:a}}function Xt(e){if(typeof e=="function")ne.push(e);else{const{href:t}=new URL(e,location.href);ne.push(n=>n.href===t)}}function Qt(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Fe(),!J){const a=Ce(_,void 0,null,"leave"),r={...a.navigation,cancel:()=>{n=!0,a.reject(new Error("navigation cancelled"))}};at.forEach(s=>s(r))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Fe()}),navigator.connection?.saveData||Jt(),O.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Qe(t.composedPath()[0],O);if(!n)return;const{url:a,external:r,target:s,download:o}=_e(n,A,v.hash);if(!a)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const i=ee(n);if(!(n instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[l,f]=(v.hash?a.hash.replace(/^#/,""):a.href).split("#"),h=l===de(location);if(r||i.reload&&(!h||!f)){ut({url:a,type:"link",event:t})?J=!0:t.preventDefault();return}if(f!==void 0&&h){const[,w]=_.url.href.split("#");if(w===f){if(t.preventDefault(),f===""||f==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(f));u&&(u.scrollIntoView(),u.focus())}return}if(K=!0,Le(y),e(a),!i.replace_state)return;K=!1}t.preventDefault(),await new Promise(w=>{requestAnimationFrame(()=>{setTimeout(w,0)}),setTimeout(w,100)}),await B({type:"link",url:a,keepfocus:i.keepfocus,noscroll:i.noscroll,replace_state:i.replace_state??a.href===location.href,event:t})}),O.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),a=t.submitter;if((a?.formTarget||n.target)==="_blank"||(a?.formMethod||n.method)!=="get")return;const o=new URL(a?.hasAttribute("formaction")&&a?.formAction||n.action);if(le(o,A,!1))return;const i=t.target,c=ee(i);if(c.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(i,a);o.search=new URLSearchParams(l).toString(),B({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!ye){if(t.state?.[z]){const n=t.state[z];if(N={},n===y)return;const a=D[n],r=t.state[He]??{},s=new URL(t.state[It]??location.href),o=t.state[G],i=_.url?de(location)===de(_.url):!1;if(o===x&&(ot||i)){r!==k.state&&(k.state=r),e(s),D[y]=ce(),a&&scrollTo(a.x,a.y),y=n;return}const l=n-y;await B({type:"popstate",url:s,popped:{state:r,scroll:a,delta:l},accept:()=>{y=n,x=o},block:()=>{history.go(-l)},nav_token:N,event:t})}else if(!K){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{K&&(K=!1,history.replaceState({...history.state,[z]:++y,[G]:x},"",location.href))});for(const t of document.querySelectorAll("link"))Nt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&C.navigating.set(W.current=null)});function e(t){_.url=k.url=t,C.page.set(je(k)),C.page.notify()}}async function Zt(e,{status:t=200,error:n,node_ids:a,params:r,route:s,server_route:o,data:i,form:c}){rt=!0;const l=new URL(location.href);let f;({params:r={},route:s={id:null}}=await ue(l,!1)||{}),f=Ue.find(({id:u})=>u===s.id);let h,w=!0;try{const u=a.map(async(m,p)=>{const d=i[p];return d?.uses&&(d.uses=en(d.uses)),Oe({loader:v.nodes[m],url:l,params:r,route:s,parent:async()=>{const S={};for(let E=0;E<p;E+=1)Object.assign(S,(await u[E]).data);return S},server_data_node:$e(d)})}),g=await Promise.all(u);if(f){const m=f.layouts;for(let p=0;p<m.length;p++)m[p]||g.splice(p,0,void 0)}h=se({url:l,params:r,branch:g,status:t,error:n,form:c,route:f??null})}catch(u){if(u instanceof Se){await H(new URL(u.location,location.href));return}h=await Pe({status:Ae(u),error:await X(u,{url:l,params:r,route:s}),url:l,route:s}),e.textContent="",w=!1}h.props.page&&(h.props.page.state={}),await ct(h,e,w)}function en(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let ye=!1;function tn(e,t=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const a=dt(e);if(a&&document.getElementById(a)){const{x:s,y:o}=t??ce();setTimeout(()=>{const i=history.state;ye=!0,location.replace(`#${a}`),v.hash&&location.replace(e.hash),history.replaceState(i,"",e.hash),scrollTo(s,o),ye=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const s=[];for(let o=0;o<r.rangeCount;o+=1)s.push(r.getRangeAt(o));setTimeout(()=>{if(r.rangeCount===s.length){for(let o=0;o<r.rangeCount;o+=1){const i=s[o],c=r.getRangeAt(o);if(i.commonAncestorContainer!==c.commonAncestorContainer||i.startContainer!==c.startContainer||i.endContainer!==c.endContainer||i.startOffset!==c.startOffset||i.endOffset!==c.endOffset)return}r.removeAllRanges()}})}}}function Ce(e,t,n,a){let r,s;const o=new Promise((c,l)=>{r=c,s=l});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n},willUnload:!t,type:a,complete:o},fulfil:r,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function nn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function dt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{un as a,on as l,k as p,C as s};
frontend/build/_app/immutable/chunks/Bj0ilmBj.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{n as o,u as a,f as d}from"./CZHqxbHz.js";function p(s,u,e){if(s==null)return u(void 0),o;const t=a(()=>s.subscribe(u,e));return t.unsubscribe?()=>t.unsubscribe():t}const i=[];function _(s,u=o){let e=null;const t=new Set;function c(r){if(d(s,r)&&(s=r,e)){const b=!i.length;for(const n of t)n[1](),i.push(n,s);if(b){for(let n=0;n<i.length;n+=2)i[n][0](i[n+1]);i.length=0}}}function f(r){c(r(s))}function l(r,b=o){const n=[r,b];return t.add(n),t.size===1&&(e=u(c,f)||o),r(s),()=>{t.delete(n),t.size===0&&e&&(e(),e=null)}}return{set:c,update:f,subscribe:l}}function h(s){let u;return p(s,e=>u=e)(),u}export{h as g,p as s,_ as w};
frontend/build/_app/immutable/chunks/CAMnkZV6.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{l as _,c as s,e as o,p as c,i as b,s as m,a as h,t as y}from"./CZHqxbHz.js";function d(e,r,l=!1){if(e.multiple){if(r==null)return;if(!b(r))return m();for(var a of e.options)a.selected=r.includes(n(a));return}for(a of e.options){var i=n(a);if(h(i,r)){a.selected=!0;return}}(!l||r!==void 0)&&(e.selectedIndex=-1)}function p(e){var r=new MutationObserver(()=>{d(e,e.__value)});r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),y(()=>{r.disconnect()})}function S(e,r,l=r){var a=new WeakSet,i=!0;_(e,"change",u=>{var f=u?"[selected]":":checked",t;if(e.multiple)t=[].map.call(e.querySelectorAll(f),n);else{var v=e.querySelector(f)??e.querySelector("option:not([disabled])");t=v&&n(v)}l(t),s!==null&&a.add(s)}),o(()=>{var u=r();if(e===document.activeElement){var f=c??s;if(a.has(f))return}if(d(e,u,i),i&&u===void 0){var t=e.querySelector(":checked");t!==null&&(u=n(t),l(u))}e.__value=u,i=!1}),p(e)}function n(e){return"__value"in e?e.__value:e.value}export{S as b,p as i,d as s};
frontend/build/_app/immutable/chunks/CZHqxbHz.js ADDED
@@ -0,0 +1 @@
 
 
1
+ var Lt=Array.isArray,Yt=Array.prototype.indexOf,Nn=Array.from,Cn=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,qt=Object.getOwnPropertyDescriptors,Ht=Object.prototype,Ut=Array.prototype,it=Object.getPrototypeOf,Qe=Object.isExtensible;const Mn=()=>{};function Fn(e){return e()}function Bt(e){for(var t=0;t<e.length;t++)e[t]()}function at(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}const y=2,Ye=4,xe=8,F=16,j=32,ne=64,qe=128,D=512,g=1024,T=2048,L=4096,I=8192,q=16384,He=32768,we=65536,Ie=1<<17,lt=1<<18,ve=1<<19,ot=1<<20,Q=32768,Ne=1<<21,Ue=1<<22,H=1<<23,W=Symbol("$state"),jn=Symbol("legacy props"),Ln=Symbol(""),re=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Be=3,ut=8;function Vt(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Gt(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Kt(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function zt(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function $t(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Xt(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Zt(){throw new Error("https://svelte.dev/e/experimental_async_fork")}function Wt(){throw new Error("https://svelte.dev/e/fork_discarded")}function Jt(){throw new Error("https://svelte.dev/e/fork_timing")}function qn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Hn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Qt(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function en(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function tn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Un(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Bn=1,Vn=2,Gn=4,Kn=8,zn=16,$n=1,Xn=2,Zn=4,Wn=8,Jn=16,Qn=1,er=2,nn="[",rn="[!",sn="]",Ve={},m=Symbol(),tr="http://www.w3.org/1999/xhtml";function Ge(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function nr(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function rr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let V=!1;function sr(e){V=e}let k;function se(e){if(e===null)throw Ge(),Ve;return k=e}function fr(){return se(z(k))}function ir(e){if(V){if(z(k)!==null)throw Ge(),Ve;k=e}}function ar(e=1){if(V){for(var t=e,n=k;t--;)n=z(n);k=n}}function lr(e=!0){for(var t=0,n=k;;){if(n.nodeType===ut){var r=n.data;if(r===sn){if(t===0)return n;t-=1}else(r===nn||r===rn)&&(t+=1)}var s=z(n);e&&n.remove(),n=s}}function or(e){if(!e||e.nodeType!==ut)throw Ge(),Ve;return e.data}function ct(e){return e===this.v}function fn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function _t(e){return!fn(e,this.v)}let de=!1;function ur(){de=!0}let w=null;function ye(e){w=e}function cr(e,t=!1,n){w={p:w,i:!1,c:null,e:null,s:e,x:null,l:de&&!t?{s:null,u:null,$:[]}:null}}function _r(e){var t=w,n=t.e;if(n!==null){t.e=null;for(var r of n)kt(r)}return t.i=!0,w=t.p,{}}function he(){return!de||w!==null&&w.l===null}let X=[];function vt(){var e=X;X=[],Bt(e)}function an(e){if(X.length===0&&!ue){var t=X;queueMicrotask(()=>{t===X&&vt()})}X.push(e)}function ln(){for(;X.length>0;)vt()}function on(e){var t=h;if(t===null)return _.f|=H,e;if((t.f&He)===0){if((t.f&qe)===0)throw e;t.b.error(e)}else Ee(e,t)}function Ee(e,t){for(;t!==null;){if((t.f&qe)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const Z=new Set;let p=null,De=null,S=null,R=[],Re=null,Ce=!1,ue=!1;class G{committed=!1;current=new Map;previous=new Map;#r=new Set;#s=new Set;#t=0;#n=0;#a=null;#f=[];#i=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#n>0}process(t){R=[],De=null,this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#l(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#e(n.effects),this.#e(n.render_effects),this.#e(n.block_effects)):(De=this,p=null,et(n.render_effects),et(n.effects),De=null,this.#a?.resolve()),S=null}#l(t,n){t.f^=g;for(var r=t.first;r!==null;){var s=r.f,f=(s&(j|ne))!==0,o=f&&(s&g)!==0,l=o||(s&I)!==0||this.skipped_effects.has(r);if((r.f&qe)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!l&&r.fn!==null){f?r.f^=g:(s&Ye)!==0?n.effects.push(r):pe(r)&&((r.f&F)!==0&&n.block_effects.push(r),_e(r));var i=r.first;if(i!==null){r=i;continue}}var a=r.parent;for(r=r.next;r===null&&a!==null;)a===n.effect&&(this.#e(n.effects),this.#e(n.render_effects),this.#e(n.block_effects),n=n.parent),r=a.next,a=a.parent}}#e(t){for(const n of t)((n.f&T)!==0?this.#f:this.#i).push(n),this.#o(n.deps),E(n,g)}#o(t){if(t!==null)for(const n of t)(n.f&y)===0||(n.f&Q)===0||(n.f^=Q,this.#o(n.deps))}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&H)===0&&(this.current.set(t,t.v),S?.set(t,t.v))}activate(){p=this,this.apply()}deactivate(){p===this&&(p=null,S=null)}flush(){if(this.activate(),R.length>0){if(Fe(),p!==null&&p!==this)return}else this.#t===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#u(){if(this.#n===0){for(const t of this.#r)t();this.#r.clear()}this.#t===0&&this.#c()}#c(){if(Z.size>1){this.previous.clear();var t=S,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const f of Z){if(f===this){n=!1;continue}const o=[];for(const[i,a]of this.current){if(f.current.has(i))if(n&&a!==f.current.get(i))f.current.set(i,a);else continue;o.push(i)}if(o.length===0)continue;const l=[...f.current.keys()].filter(i=>!this.current.has(i));if(l.length>0){var s=R;R=[];const i=new Set,a=new Map;for(const u of o)dt(u,l,i,a);if(R.length>0){p=f,f.apply();for(const u of R)f.#l(u,r);f.deactivate()}R=s}}p=null,S=t}this.committed=!0,Z.delete(this)}increment(t){this.#t+=1,t&&(this.#n+=1)}decrement(t){this.#t-=1,t&&(this.#n-=1),this.revive()}revive(){for(const t of this.#f)E(t,T),ee(t);for(const t of this.#i)E(t,L),ee(t);this.#f=[],this.#i=[],this.flush()}oncommit(t){this.#r.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#a??=at()).promise}static ensure(){if(p===null){const t=p=new G;Z.add(p),ue||G.enqueue(()=>{p===t&&t.flush()})}return p}static enqueue(t){an(t)}apply(){}}function Me(e){var t=ue;ue=!0;try{var n;for(e&&(p!==null&&Fe(),n=e());;){if(ln(),R.length===0&&(p?.flush(),R.length===0))return Re=null,n;Fe()}}finally{ue=t}}function Fe(){var e=B;Ce=!0;var t=null;try{var n=0;for(Ae(!0);R.length>0;){var r=G.ensure();if(n++>1e3){var s,f;un()}r.process(R),U.clear()}}finally{Ce=!1,Ae(e),Re=null}}function un(){try{Xt()}catch(e){Ee(e,Re)}}let C=null;function et(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(q|I))===0&&pe(r)&&(C=new Set,_e(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null&&r.ac===null?St(r):r.fn=null),C?.size>0)){U.clear();for(const s of C){if((s.f&(q|I))!==0)continue;const f=[s];let o=s.parent;for(;o!==null;)C.has(o)&&(C.delete(o),f.push(o)),o=o.parent;for(let l=f.length-1;l>=0;l--){const i=f[l];(i.f&(q|I))===0&&_e(i)}}C.clear()}}C=null}}function dt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&y)!==0?dt(s,t,n,r):(f&(Ue|F))!==0&&(f&T)===0&&pt(s,t,r)&&(E(s,T),ee(s))}}function ht(e,t){if(e.reactions!==null)for(const n of e.reactions){const r=n.f;(r&y)!==0?ht(n,t):(r&Ie)!==0&&(E(n,T),t.add(n))}}function pt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&y)!==0&&pt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function ee(e){for(var t=Re=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ce&&t===h&&(n&F)!==0&&(n&lt)===0)return;if((n&(ne|j))!==0){if((n&g)===0)return;t.f^=g}}R.push(t)}function vr(e){Zt(),p!==null&&Jt();var t=G.ensure();t.is_fork=!0;var n=!1,r=t.settled();Me(e);for(var[s,f]of t.previous)s.v=f;return{commit:async()=>{if(n){await r;return}Z.has(t)||Wt(),n=!0,t.is_fork=!1;for(var[o,l]of t.current)o.v=l;Me(()=>{var i=new Set;for(var a of t.current.keys())ht(a,i);pn(i),mt()}),t.revive(),await r},discard:()=>{!n&&Z.has(t)&&(Z.delete(t),t.discard())}}}function cn(e,t,n,r){const s=he()?Ke:dn;if(n.length===0&&e.length===0){r(t.map(s));return}var f=p,o=h,l=_n();function i(){Promise.all(n.map(a=>vn(a))).then(a=>{l();try{r([...t.map(s),...a])}catch(u){(o.f&q)===0&&Ee(u,o)}f?.deactivate(),me()}).catch(a=>{Ee(a,o)})}e.length>0?Promise.all(e).then(()=>{l();try{return i()}finally{f?.deactivate(),me()}}):i()}function _n(){var e=h,t=_,n=w,r=p;return function(f=!0){fe(e),K(t),ye(n),f&&r?.activate()}}function me(){fe(null),K(null),ye(null)}function Ke(e){var t=y|T,n=_!==null&&(_.f&y)!==0?_:null;return h!==null&&(h.f|=ve),{ctx:w,deps:null,effects:null,equals:ct,f:t,fn:e,reactions:null,rv:0,v:m,wv:0,parent:n??h,ac:null}}function vn(e,t){let n=h;n===null&&Gt();var r=n.b,s=void 0,f=$e(m),o=!_,l=new Map;return Tn(()=>{var i=at();s=i.promise;try{Promise.resolve(e()).then(i.resolve,i.reject).then(()=>{a===p&&a.committed&&a.deactivate(),me()})}catch(c){i.reject(c),me()}var a=p;if(o){var u=!r.is_pending();r.update_pending_count(1),a.increment(u),l.get(a)?.reject(re),l.delete(a),l.set(a,i)}const v=(c,d=void 0)=>{if(a.activate(),d)d!==re&&(f.f|=H,je(f,d));else{(f.f&H)!==0&&(f.f^=H),je(f,c);for(const[O,Se]of l){if(l.delete(O),O===a)break;Se.reject(re)}}o&&(r.update_pending_count(-1),a.decrement(u))};i.promise.then(v,c=>v(null,c||"unknown"))}),gn(()=>{for(const i of l.values())i.reject(re)}),new Promise(i=>{function a(u){function v(){u===s?i(f):a(s)}u.then(v,v)}a(s)})}function dr(e){const t=Ke(e);return Pt(t),t}function dn(e){const t=Ke(e);return t.equals=_t,t}function wt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)te(t[n])}}function hn(e){for(var t=e.parent;t!==null;){if((t.f&y)===0)return(t.f&q)===0?t:null;t=t.parent}return null}function ze(e){var t,n=h;fe(hn(e));try{e.f&=~Q,wt(e),t=Mt(e)}finally{fe(n)}return t}function yt(e){var t=ze(e);if(e.equals(t)||(p?.is_fork||(e.v=t),e.wv=Nt()),!ie)if(S!==null)Ze()&&S.set(e,t);else{var n=(e.f&D)===0?L:g;E(e,n)}}let ge=new Set;const U=new Map;function pn(e){ge=e}let Et=!1;function $e(e,t){var n={f:0,v:e,reactions:null,equals:ct,rv:0,wv:0};return n}function Y(e,t){const n=$e(e);return Pt(n),n}function hr(e,t=!1,n=!0){const r=$e(e);return t||(r.equals=_t),de&&n&&w!==null&&w.l!==null&&(w.l.s??=[]).push(r),r}function $(e,t,n=!1){_!==null&&(!P||(_.f&Ie)!==0)&&he()&&(_.f&(y|F|Ue|Ie))!==0&&!M?.includes(e)&&tn();let r=n?ae(t):t;return je(e,r)}function je(e,t){if(!e.equals(t)){var n=e.v;ie?U.set(e,t):U.set(e,n),e.v=t;var r=G.ensure();r.capture(e,n),(e.f&y)!==0&&((e.f&T)!==0&&ze(e),E(e,(e.f&D)!==0?g:L)),e.wv=Nt(),gt(e,T),he()&&h!==null&&(h.f&g)!==0&&(h.f&(j|ne))===0&&(x===null?Sn([e]):x.push(e)),!r.is_fork&&ge.size>0&&!Et&&mt()}return t}function mt(){Et=!1;var e=B;Ae(!0);const t=Array.from(ge);try{for(const n of t)(n.f&g)!==0&&E(n,L),pe(n)&&_e(n)}finally{Ae(e)}ge.clear()}function Pe(e){$(e,e.v+1)}function gt(e,t){var n=e.reactions;if(n!==null)for(var r=he(),s=n.length,f=0;f<s;f++){var o=n[f],l=o.f;if(!(!r&&o===h)){var i=(l&T)===0;if(i&&E(o,t),(l&y)!==0){var a=o;S?.delete(a),(l&Q)===0&&(l&D&&(o.f|=Q),gt(a,L))}else i&&((l&F)!==0&&C!==null&&C.add(o),ee(o))}}}function ae(e){if(typeof e!="object"||e===null||W in e)return e;const t=it(e);if(t!==Ht&&t!==Ut)return e;var n=new Map,r=Lt(e),s=Y(0),f=J,o=l=>{if(J===f)return l();var i=_,a=J;K(null),ft(f);var u=l();return K(i),ft(a),u};return r&&n.set("length",Y(e.length)),new Proxy(e,{defineProperty(l,i,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&Qt();var u=n.get(i);return u===void 0?u=o(()=>{var v=Y(a.value);return n.set(i,v),v}):$(u,a.value,!0),!0},deleteProperty(l,i){var a=n.get(i);if(a===void 0){if(i in l){const u=o(()=>Y(m));n.set(i,u),Pe(s)}}else $(a,m),Pe(s);return!0},get(l,i,a){if(i===W)return e;var u=n.get(i),v=i in l;if(u===void 0&&(!v||oe(l,i)?.writable)&&(u=o(()=>{var d=ae(v?l[i]:m),O=Y(d);return O}),n.set(i,u)),u!==void 0){var c=le(u);return c===m?void 0:c}return Reflect.get(l,i,a)},getOwnPropertyDescriptor(l,i){var a=Reflect.getOwnPropertyDescriptor(l,i);if(a&&"value"in a){var u=n.get(i);u&&(a.value=le(u))}else if(a===void 0){var v=n.get(i),c=v?.v;if(v!==void 0&&c!==m)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return a},has(l,i){if(i===W)return!0;var a=n.get(i),u=a!==void 0&&a.v!==m||Reflect.has(l,i);if(a!==void 0||h!==null&&(!u||oe(l,i)?.writable)){a===void 0&&(a=o(()=>{var c=u?ae(l[i]):m,d=Y(c);return d}),n.set(i,a));var v=le(a);if(v===m)return!1}return u},set(l,i,a,u){var v=n.get(i),c=i in l;if(r&&i==="length")for(var d=a;d<v.v;d+=1){var O=n.get(d+"");O!==void 0?$(O,m):d in l&&(O=o(()=>Y(m)),n.set(d+"",O))}if(v===void 0)(!c||oe(l,i)?.writable)&&(v=o(()=>Y(void 0)),$(v,ae(a)),n.set(i,v));else{c=v.v!==m;var Se=o(()=>ae(a));$(v,Se)}var We=Reflect.getOwnPropertyDescriptor(l,i);if(We?.set&&We.set.call(u,a),!c){if(r&&typeof i=="string"){var Je=n.get("length"),Oe=Number(i);Number.isInteger(Oe)&&Oe>=Je.v&&$(Je,Oe+1)}Pe(s)}return!0},ownKeys(l){le(s);var i=Reflect.ownKeys(l).filter(v=>{var c=n.get(v);return c===void 0||c.v!==m});for(var[a,u]of n)u.v!==m&&!(a in l)&&i.push(a);return i},setPrototypeOf(){en()}})}function tt(e){try{if(e!==null&&typeof e=="object"&&W in e)return e[W]}catch{}return e}function pr(e,t){return Object.is(tt(e),tt(t))}var nt,wn,bt,Tt;function wr(){if(nt===void 0){nt=window,wn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;bt=oe(t,"firstChild").get,Tt=oe(t,"nextSibling").get,Qe(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Qe(n)&&(n.__t=void 0)}}function be(e=""){return document.createTextNode(e)}function Te(e){return bt.call(e)}function z(e){return Tt.call(e)}function yr(e,t){if(!V)return Te(e);var n=Te(k);if(n===null)n=k.appendChild(be());else if(t&&n.nodeType!==Be){var r=be();return n?.before(r),se(r),r}return se(n),n}function Er(e,t=!1){if(!V){var n=Te(e);return n instanceof Comment&&n.data===""?z(n):n}if(t&&k?.nodeType!==Be){var r=be();return k?.before(r),se(r),r}return k}function mr(e,t=1,n=!1){let r=V?k:e;for(var s;t--;)s=r,r=z(r);if(!V)return r;if(n&&r?.nodeType!==Be){var f=be();return r===null?s?.after(f):r.before(f),se(f),f}return se(r),r}function yn(e){e.textContent=""}function gr(){return!1}function br(e){V&&Te(e)!==null&&yn(e)}let rt=!1;function En(){rt||(rt=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Xe(e){var t=_,n=h;K(null),fe(null);try{return e()}finally{K(t),fe(n)}}function Tr(e,t,n,r=n){e.addEventListener(t,()=>Xe(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),En()}function At(e){h===null&&(_===null&&$t(),zt()),ie&&Kt()}function mn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function N(e,t,n){var r=h;r!==null&&(r.f&I)!==0&&(e|=I);var s={ctx:w,deps:null,nodes_start:null,nodes_end:null,f:e|T|D,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{_e(s),s.f|=He}catch(l){throw te(s),l}else t!==null&&ee(s);var f=s;if(n&&f.deps===null&&f.teardown===null&&f.nodes_start===null&&f.first===f.last&&(f.f&ve)===0&&(f=f.first,(e&F)!==0&&(e&we)!==0&&f!==null&&(f.f|=we)),f!==null&&(f.parent=r,r!==null&&mn(f,r),_!==null&&(_.f&y)!==0&&(e&ne)===0)){var o=_;(o.effects??=[]).push(f)}return s}function Ze(){return _!==null&&!P}function gn(e){const t=N(xe,null,!1);return E(t,g),t.teardown=e,t}function bn(e){At();var t=h.f,n=!_&&(t&j)!==0&&(t&He)===0;if(n){var r=w;(r.e??=[]).push(e)}else return kt(e)}function kt(e){return N(Ye|ot,e,!1)}function Ar(e){return At(),N(xe|ot,e,!0)}function kr(e){G.ensure();const t=N(ne|ve,e,!0);return(n={})=>new Promise(r=>{n.outro?xn(t,()=>{te(t),r(void 0)}):(te(t),r(void 0))})}function xr(e){return N(Ye,e,!1)}function Tn(e){return N(Ue|ve,e,!0)}function Rr(e,t=0){return N(xe|t,e,!0)}function Sr(e,t=[],n=[],r=[]){cn(r,t,n,s=>{N(xe,()=>e(...s.map(le)),!0)})}function Or(e,t=0){var n=N(F|t,e,!0);return n}function Dr(e){return N(j|ve,e,!0)}function xt(e){var t=e.teardown;if(t!==null){const n=ie,r=_;st(!0),K(null);try{t.call(null)}finally{st(n),K(r)}}}function Rt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Xe(()=>{s.abort(re)});var r=n.next;(n.f&ne)!==0?n.parent=null:te(n,t),n=r}}function An(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&j)===0&&te(t),t=n}}function te(e,t=!0){var n=!1;(t||(e.f&lt)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(kn(e.nodes_start,e.nodes_end),n=!0),Rt(e,t&&!n),ke(e,0),E(e,q);var r=e.transitions;if(r!==null)for(const f of r)f.stop();xt(e);var s=e.parent;s!==null&&s.first!==null&&St(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function kn(e,t){for(;e!==null;){var n=e===t?null:z(e);e.remove(),e=n}}function St(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function xn(e,t,n=!0){var r=[];Ot(e,r,!0),Rn(r,()=>{n&&te(e),t&&t()})}function Rn(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var s of e)s.out(r)}else t()}function Ot(e,t,n){if((e.f&I)===0){if(e.f^=I,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var r=e.first;r!==null;){var s=r.next,f=(r.f&we)!==0||(r.f&j)!==0&&(e.f&F)!==0;Ot(r,t,f?n:!1),r=s}}}function Pr(e){Dt(e,!0)}function Dt(e,t){if((e.f&I)!==0){e.f^=I,(e.f&g)===0&&(E(e,T),ee(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&we)!==0||(n.f&j)!==0;Dt(n,s?t:!1),n=r}if(e.transitions!==null)for(const f of e.transitions)(f.is_global||t)&&f.in()}}function Ir(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var s=n===r?null:z(n);t.append(n),n=s}}let B=!1;function Ae(e){B=e}let ie=!1;function st(e){ie=e}let _=null,P=!1;function K(e){_=e}let h=null;function fe(e){h=e}let M=null;function Pt(e){_!==null&&(M===null?M=[e]:M.push(e))}let b=null,A=0,x=null;function Sn(e){x=e}let It=1,ce=0,J=ce;function ft(e){J=e}function Nt(){return++It}function pe(e){var t=e.f;if((t&T)!==0)return!0;if(t&y&&(e.f&=~Q),(t&L)!==0){var n=e.deps;if(n!==null)for(var r=n.length,s=0;s<r;s++){var f=n[s];if(pe(f)&&yt(f),f.wv>e.wv)return!0}(t&D)!==0&&S===null&&E(e,g)}return!1}function Ct(e,t,n=!0){var r=e.reactions;if(r!==null&&!M?.includes(e))for(var s=0;s<r.length;s++){var f=r[s];(f.f&y)!==0?Ct(f,t,!1):t===f&&(n?E(f,T):(f.f&g)!==0&&E(f,L),ee(f))}}function Mt(e){var t=b,n=A,r=x,s=_,f=M,o=w,l=P,i=J,a=e.f;b=null,A=0,x=null,_=(a&(j|ne))===0?e:null,M=null,ye(e.ctx),P=!1,J=++ce,e.ac!==null&&(Xe(()=>{e.ac.abort(re)}),e.ac=null);try{e.f|=Ne;var u=e.fn,v=u(),c=e.deps;if(b!==null){var d;if(ke(e,A),c!==null&&A>0)for(c.length=A+b.length,d=0;d<b.length;d++)c[A+d]=b[d];else e.deps=c=b;if(B&&Ze()&&(e.f&D)!==0)for(d=A;d<c.length;d++)(c[d].reactions??=[]).push(e)}else c!==null&&A<c.length&&(ke(e,A),c.length=A);if(he()&&x!==null&&!P&&c!==null&&(e.f&(y|L|T))===0)for(d=0;d<x.length;d++)Ct(x[d],e);return s!==null&&s!==e&&(ce++,x!==null&&(r===null?r=x:r.push(...x))),(e.f&H)!==0&&(e.f^=H),v}catch(O){return on(O)}finally{e.f^=Ne,b=t,A=n,x=r,_=s,M=f,ye(o),P=l,J=i}}function On(e,t){let n=t.reactions;if(n!==null){var r=Yt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}n===null&&(t.f&y)!==0&&(b===null||!b.includes(t))&&(E(t,L),(t.f&D)!==0&&(t.f^=D,t.f&=~Q),wt(t),ke(t,0))}function ke(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)On(e,n[r])}function _e(e){var t=e.f;if((t&q)===0){E(e,g);var n=h,r=B;h=e,B=!0;try{(t&F)!==0?An(e):Rt(e),xt(e);var s=Mt(e);e.teardown=typeof s=="function"?s:null,e.wv=It;var f}finally{B=r,h=n}}}async function Nr(){await Promise.resolve(),Me()}function Cr(){return G.ensure().settled()}function le(e){var t=e.f,n=(t&y)!==0;if(_!==null&&!P){var r=h!==null&&(h.f&q)!==0;if(!r&&!M?.includes(e)){var s=_.deps;if((_.f&Ne)!==0)e.rv<ce&&(e.rv=ce,b===null&&s!==null&&s[A]===e?A++:b===null?b=[e]:b.includes(e)||b.push(e));else{(_.deps??=[]).push(e);var f=e.reactions;f===null?e.reactions=[_]:f.includes(_)||f.push(_)}}}if(ie){if(U.has(e))return U.get(e);if(n){var o=e,l=o.v;return((o.f&g)===0&&o.reactions!==null||jt(o))&&(l=ze(o)),U.set(o,l),l}}else n&&!S?.has(e)&&(o=e,pe(o)&&yt(o),B&&Ze()&&(o.f&D)===0&&Ft(o));if(S?.has(e))return S.get(e);if((e.f&H)!==0)throw e.v;return e.v}function Ft(e){if(e.deps!==null){e.f^=D;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&y)!==0&&(t.f&D)===0&&Ft(t)}}function jt(e){if(e.v===m)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(U.has(t)||(t.f&y)!==0&&jt(t))return!0;return!1}function Dn(e){var t=P;try{return P=!0,e()}finally{P=t}}const Pn=-7169;function E(e,t){e.f=e.f&Pn|t}function Mr(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(W in e)Le(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&W in n&&Le(n)}}}function Le(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Le(e[r],t)}catch{}const n=it(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=qt(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}function Fr(e){w===null&&Vt(),de&&w.l!==null?In(w).m.push(e):bn(()=>{const t=Dn(e);if(typeof t=="function")return t})}function In(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}export{w as $,ir as A,br as B,bn as C,ar as D,V as E,it as F,qt as G,En as H,Pr as I,te as J,xn as K,Ln as L,be as M,tr as N,Dr as O,k as P,Ir as Q,gr as R,W as S,Or as T,fr as U,we as V,or as W,rn as X,lr as Y,se as Z,sr as _,pr as a,vr as a$,Ar as a0,Bt as a1,Fn as a2,Mr as a3,Ke as a4,ur as a5,oe as a6,Hn as a7,Zn as a8,dn as a9,qe as aA,rr as aB,Xe as aC,Te as aD,wn as aE,Qn as aF,er as aG,He as aH,Be as aI,wr as aJ,nn as aK,z as aL,Ve as aM,qn as aN,yn as aO,Nn as aP,kr as aQ,sn as aR,Ge as aS,Vn as aT,Bn as aU,zn as aV,Gn as aW,I as aX,Kn as aY,Ot as aZ,Rn as a_,ie as aa,h as ab,q as ac,Wn as ad,de as ae,Xn as af,$n as ag,Jn as ah,jn as ai,Me as aj,Nr as ak,dr as al,Ze as am,$e as an,Pe as ao,ut as ap,G as aq,fe as ar,K as as,ye as at,on as au,_ as av,je as aw,Ee as ax,Un as ay,ve as az,$ as b,Cr as b0,p as c,Cn as d,xr as e,fn as f,le as g,cr as h,Lt as i,Y as j,ae as k,Tr as l,hr as m,Mn as n,Fr as o,De as p,an as q,Rr as r,nr as s,gn as t,Dn as u,mr as v,Er as w,Sr as x,_r as y,yr as z};
frontend/build/_app/immutable/chunks/ChCjnC3I.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import{am as j,g as q,an as U,r as z,u as Z,ao as V,q as B,P as l,E as d,ab as v,T as ee,U as G,ap as H,X as te,O as p,aq as A,K as M,M as w,ar as D,as as E,at as W,au as re,av as C,$ as J,Q as ne,aw as se,J as F,Z as N,D as ie,Y as ae,ax as Y,ay as oe,V as ue,az as fe,aA as le,aB as he,d as de,t as ce,aC as _e,aD as R,aE as pe,aF as ve,aG as ge,aH as me,aI as ye,aJ as P,aK as Ee,aL as Te,aM as k,_ as O,aN as be,aO as we,aP as Ne,aQ as Re,h as Se,aR as Ae,aS as Oe,y as De}from"./CZHqxbHz.js";function Le(t){let e=0,r=U(0),i;return()=>{j()&&(q(r),z(()=>(e===0&&(i=Z(()=>t(()=>V(r)))),e+=1,()=>{B(()=>{e-=1,e===0&&(i?.(),i=void 0,V(r))})})))}}var Me=ue|fe|le;function Fe(t,e,r){new Ce(t,e,r)}class Ce{parent;#r=!1;#t;#v=d?l:null;#s;#h;#i;#n=null;#e=null;#a=null;#o=null;#u=null;#d=0;#f=0;#c=!1;#l=null;#y=Le(()=>(this.#l=U(this.#d),()=>{this.#l=null}));constructor(e,r,i){this.#t=e,this.#s=r,this.#h=i,this.parent=v.b,this.#r=!!this.#s.pending,this.#i=ee(()=>{if(v.b=this,d){const n=this.#v;G(),n.nodeType===H&&n.data===te?this.#T():this.#E()}else{var s=this.#g();try{this.#n=p(()=>i(s))}catch(n){this.error(n)}this.#f>0?this.#p():this.#r=!1}return()=>{this.#u?.remove()}},Me),d&&(this.#t=l)}#E(){try{this.#n=p(()=>this.#h(this.#t))}catch(e){this.error(e)}this.#r=!1}#T(){const e=this.#s.pending;e&&(this.#e=p(()=>e(this.#t)),A.enqueue(()=>{var r=this.#g();this.#n=this.#_(()=>(A.ensure(),p(()=>this.#h(r)))),this.#f>0?this.#p():(M(this.#e,()=>{this.#e=null}),this.#r=!1)}))}#g(){var e=this.#t;return this.#r&&(this.#u=w(),this.#t.before(this.#u),e=this.#u),e}is_pending(){return this.#r||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#s.pending}#_(e){var r=v,i=C,s=J;D(this.#i),E(this.#i),W(this.#i.ctx);try{return e()}catch(n){return re(n),null}finally{D(r),E(i),W(s)}}#p(){const e=this.#s.pending;this.#n!==null&&(this.#o=document.createDocumentFragment(),this.#o.append(this.#u),ne(this.#n,this.#o)),this.#e===null&&(this.#e=p(()=>e(this.#t)))}#m(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(e);return}this.#f+=e,this.#f===0&&(this.#r=!1,this.#e&&M(this.#e,()=>{this.#e=null}),this.#o&&(this.#t.before(this.#o),this.#o=null))}update_pending_count(e){this.#m(e),this.#d+=e,this.#l&&se(this.#l,this.#d)}get_effect_pending(){return this.#y(),q(this.#l)}error(e){var r=this.#s.onerror;let i=this.#s.failed;if(this.#c||!r&&!i)throw e;this.#n&&(F(this.#n),this.#n=null),this.#e&&(F(this.#e),this.#e=null),this.#a&&(F(this.#a),this.#a=null),d&&(N(this.#v),ie(),N(ae()));var s=!1,n=!1;const a=()=>{if(s){he();return}s=!0,n&&oe(),A.ensure(),this.#d=0,this.#a!==null&&M(this.#a,()=>{this.#a=null}),this.#r=this.has_pending_snippet(),this.#n=this.#_(()=>(this.#c=!1,p(()=>this.#h(this.#t)))),this.#f>0?this.#p():this.#r=!1};var h=C;try{E(null),n=!0,r?.(e,a),n=!1}catch(o){Y(o,this.#i&&this.#i.parent)}finally{E(h)}i&&B(()=>{this.#a=this.#_(()=>{A.ensure(),this.#c=!0;try{return p(()=>{i(this.#t,()=>e,()=>a)})}catch(o){return Y(o,this.#i.parent),null}finally{this.#c=!1}})})}}const Pe=["touchstart","touchmove"];function ke(t){return Pe.includes(t)}const K=new Set,x=new Set;function xe(t,e,r,i={}){function s(n){if(i.capture||b.call(e,n),!n.cancelBubble)return _e(()=>r?.call(this,n))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?B(()=>{e.addEventListener(t,s,i)}):e.addEventListener(t,s,i),s}function We(t,e,r,i,s){var n={capture:i,passive:s},a=xe(t,e,r,n);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ce(()=>{e.removeEventListener(t,a,n)})}function Ye(t){for(var e=0;e<t.length;e++)K.add(t[e]);for(var r of x)r(t)}let $=null;function b(t){var e=this,r=e.ownerDocument,i=t.type,s=t.composedPath?.()||[],n=s[0]||t.target;$=t;var a=0,h=$===t&&t.__root;if(h){var o=s.indexOf(h);if(o!==-1&&(e===document||e===window)){t.__root=e;return}var g=s.indexOf(e);if(g===-1)return;o<=g&&(a=o)}if(n=s[a]||t.target,n!==e){de(t,"currentTarget",{configurable:!0,get(){return n||r}});var L=C,_=v;E(null),D(null);try{for(var u,f=[];n!==null;){var m=n.assignedSlot||n.parentNode||n.host||null;try{var T=n["__"+i];T!=null&&(!n.disabled||t.target===n)&&T.call(n,t)}catch(S){u?f.push(S):u=S}if(t.cancelBubble||m===e||m===null)break;n=m}if(u){for(let S of f)queueMicrotask(()=>{throw S});throw u}}finally{t.__root=e,delete t.currentTarget,E(L),D(_)}}}function Q(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function c(t,e){var r=v;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function $e(t,e){var r=(e&ve)!==0,i=(e&ge)!==0,s,n=!t.startsWith("<!>");return()=>{if(d)return c(l,null),l;s===void 0&&(s=Q(n?t:"<!>"+t),r||(s=R(s)));var a=i||pe?document.importNode(s,!0):s.cloneNode(!0);if(r){var h=R(a),o=a.lastChild;c(h,o)}else c(a,a);return a}}function Ie(t,e,r="svg"){var i=!t.startsWith("<!>"),s=`<${r}>${i?t:"<!>"+t}</${r}>`,n;return()=>{if(d)return c(l,null),l;if(!n){var a=Q(s),h=R(a);n=R(h)}var o=n.cloneNode(!0);return c(o,o),o}}function qe(t,e){return Ie(t,e,"svg")}function Ue(t=""){if(!d){var e=w(t+"");return c(e,e),e}var r=l;return r.nodeType!==ye&&(r.before(r=w()),N(r)),c(r,r),r}function Ge(){if(d)return c(l,null),l;var t=document.createDocumentFragment(),e=document.createComment(""),r=w();return t.append(e,r),c(e,r),t}function Je(t,e){if(d){var r=v;((r.f&me)===0||r.nodes_end===null)&&(r.nodes_end=l),G();return}t!==null&&t.before(e)}function Ke(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function Be(t,e){return X(t,e)}function Qe(t,e){P(),e.intro=e.intro??!1;const r=e.target,i=d,s=l;try{for(var n=R(r);n&&(n.nodeType!==H||n.data!==Ee);)n=Te(n);if(!n)throw k;O(!0),N(n);const a=X(t,{...e,anchor:n});return O(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
2
+ `).some(h=>h.startsWith("https://svelte.dev/e/")))throw a;return a!==k&&console.warn("Failed to hydrate: ",a),e.recover===!1&&be(),P(),we(r),O(!1),Be(t,e)}finally{O(i),N(s)}}const y=new Map;function X(t,{target:e,anchor:r,props:i={},events:s,context:n,intro:a=!0}){P();var h=new Set,o=_=>{for(var u=0;u<_.length;u++){var f=_[u];if(!h.has(f)){h.add(f);var m=ke(f);e.addEventListener(f,b,{passive:m});var T=y.get(f);T===void 0?(document.addEventListener(f,b,{passive:m}),y.set(f,1)):y.set(f,T+1)}}};o(Ne(K)),x.add(o);var g=void 0,L=Re(()=>{var _=r??e.appendChild(w());return Fe(_,{pending:()=>{}},u=>{if(n){Se({});var f=J;f.c=n}if(s&&(i.$$events=s),d&&c(u,null),g=t(u,i)||{},d&&(v.nodes_end=l,l===null||l.nodeType!==H||l.data!==Ae))throw Oe(),k;n&&De()}),()=>{for(var u of h){e.removeEventListener(u,b);var f=y.get(u);--f===0?(document.removeEventListener(u,b),y.delete(u)):y.set(u,f)}x.delete(o),_!==r&&_.parentNode?.removeChild(_)}});return I.set(g,L),g}let I=new WeakMap;function Xe(t,e){const r=I.get(t);return r?(I.delete(t),r(e)):Promise.resolve()}const He="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(He);export{Je as a,qe as b,Ge as c,Ye as d,We as e,$e as f,Qe as h,Be as m,Ke as s,Ue as t,Xe as u};
frontend/build/_app/immutable/chunks/Dw-a1Jcz.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{c as l,I as v,J as o,K as m,M as u,O as _,E as d,P as b,Q as k,R as g,T as y,U as T,V as A,W as E,X as w,Y as M,Z as R,_ as p}from"./CZHqxbHz.js";class F{anchor;#s=new Map;#t=new Map;#e=new Map;#a=new Set;#i=!0;constructor(s,a=!0){this.anchor=s,this.#i=a}#r=()=>{var s=l;if(this.#s.has(s)){var a=this.#s.get(s),e=this.#t.get(a);if(e)v(e),this.#a.delete(a);else{var f=this.#e.get(a);f&&(this.#t.set(a,f.effect),this.#e.delete(a),f.fragment.lastChild.remove(),this.anchor.before(f.fragment),e=f.effect)}for(const[i,t]of this.#s){if(this.#s.delete(i),i===s)break;const r=this.#e.get(t);r&&(o(r.effect),this.#e.delete(t))}for(const[i,t]of this.#t){if(i===a||this.#a.has(i))continue;const r=()=>{if(Array.from(this.#s.values()).includes(i)){var c=document.createDocumentFragment();k(t,c),c.append(u()),this.#e.set(i,{effect:t,fragment:c})}else o(t);this.#a.delete(i),this.#t.delete(i)};this.#i||!e?(this.#a.add(i),m(t,r,!1)):r()}}};#f=s=>{this.#s.delete(s);const a=Array.from(this.#s.values());for(const[e,f]of this.#e)a.includes(e)||(o(f.effect),this.#e.delete(e))};ensure(s,a){var e=l,f=g();if(a&&!this.#t.has(s)&&!this.#e.has(s))if(f){var i=document.createDocumentFragment(),t=u();i.append(t),this.#e.set(s,{effect:_(()=>a(t)),fragment:i})}else this.#t.set(s,_(()=>a(this.anchor)));if(this.#s.set(e,s),f){for(const[r,h]of this.#t)r===s?e.skipped_effects.delete(h):e.skipped_effects.add(h);for(const[r,h]of this.#e)r===s?e.skipped_effects.delete(h.effect):e.skipped_effects.add(h.effect);e.oncommit(this.#r),e.ondiscard(this.#f)}else d&&(this.anchor=b),this.#r()}}function x(n,s,a=!1){d&&T();var e=new F(n),f=a?A:0;function i(t,r){if(d){const c=E(n)===w;if(t===c){var h=M();R(h),e.anchor=h,p(!1),e.ensure(t,r),p(!0);return}}e.ensure(t,r)}y(()=>{var t=!1;s((r,h=!0)=>{t=!0,i(h,r)}),t||i(!1,null)},f)}export{F as B,x as i};
frontend/build/_app/immutable/chunks/Rnl2RoQi.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{E as d,L as u,N as l,F as g,G as _,q as v,H as k}from"./CZHqxbHz.js";import{c as h,A}from"./BGm1LqbF.js";const R=Symbol("is custom element"),b=Symbol("is html");function F(e){if(d){var s=!1,r=()=>{if(!s){if(s=!0,e.hasAttribute("value")){var o=e.value;p(e,"value",null),e.value=o}if(e.hasAttribute("checked")){var a=e.checked;p(e,"checked",null),e.checked=a}}};e.__on_r=r,v(r),k()}}function S(e,s){var r=c(e);r.value===(r.value=s??void 0)||e.value===s&&(s!==0||e.nodeName!=="PROGRESS")||(e.value=s??"")}function p(e,s,r,o){var a=c(e);d&&(a[s]=e.getAttribute(s),s==="src"||s==="srcset"||s==="href"&&e.nodeName==="LINK")||a[s]!==(a[s]=r)&&(s==="loading"&&(e[u]=r),r==null?e.removeAttribute(s):typeof r!="string"&&w(e).includes(s)?e[s]=r:e.setAttribute(s,r))}function c(e){return e.__attributes??={[R]:e.nodeName.includes("-"),[b]:e.namespaceURI===l}}var n=new Map;function w(e){var s=e.getAttribute("is")||e.nodeName,r=n.get(s);if(r)return r;n.set(s,r=[]);for(var o,a=e,f=Element.prototype;f!==a;){o=_(a);for(var i in o)o[i].set&&r.push(i);a=g(a)}return r}const t=h.create({baseURL:A,headers:{"Content-Type":"application/json"}}),y={createRFP:e=>t.post("/api/knowledge-base/rfps",e),listRFPs:()=>t.get("/api/knowledge-base/rfps"),getRFP:e=>t.get(`/api/knowledge-base/rfps/${e}`),updateRFP:(e,s)=>t.put(`/api/knowledge-base/rfps/${e}`,s),deleteRFP:e=>t.delete(`/api/knowledge-base/rfps/${e}`),createQuestion:e=>t.post("/api/knowledge-base/questions",e),listQuestions:(e=null)=>{const s=e?{rfp_id:e}:{};return t.get("/api/knowledge-base/questions",{params:s})},getQuestion:e=>t.get(`/api/knowledge-base/questions/${e}`),updateQuestion:(e,s)=>t.put(`/api/knowledge-base/questions/${e}`,s),deleteQuestion:e=>t.delete(`/api/knowledge-base/questions/${e}`)},E={uploadRFP:e=>{const s=new FormData;return s.append("file",e),t.post("/api/rfp-processing/upload",s,{headers:{"Content-Type":"multipart/form-data"}})},listUploadedRFPs:()=>t.get("/api/rfp-processing/uploaded-rfps"),deleteUploadedRFP:e=>t.delete(`/api/rfp-processing/uploaded-rfps/${e}`),processQuestion:e=>t.post("/api/rfp-processing/process-question",e),getRFPContent:e=>t.get(`/api/rfp-processing/uploaded-rfps/${e}/content`)};export{F as a,p as b,E as p,y as r,S as s};
frontend/build/_app/immutable/chunks/masODVgD.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{e as c,r as l,u as o,q as d,S as _,t as g,d as p,n as f,m as v,g as S,b as y}from"./CZHqxbHz.js";import{s as T,g as q}from"./Bj0ilmBj.js";function b(s,r){return s===r||s?.[_]===r}function N(s={},r,i,u){return c(()=>{var n,e;return l(()=>{n=e,e=[],o(()=>{s!==i(...e)&&(r(s,...e),n&&b(i(...n),s)&&r(null,...n))})}),()=>{d(()=>{e&&b(i(...e),s)&&r(null,...e)})}}),s}let t=!1,a=Symbol();function O(s,r,i){const u=i[r]??={store:null,source:v(void 0),unsubscribe:f};if(u.store!==s&&!(a in i))if(u.unsubscribe(),u.store=s??null,s==null)u.source.v=void 0,u.unsubscribe=f;else{var n=!0;u.unsubscribe=T(s,e=>{n?u.source.v=e:y(u.source,e)}),n=!1}return s&&a in i?q(s):S(u.source)}function U(){const s={};function r(){g(()=>{for(var i in s)s[i].unsubscribe();p(s,a,{enumerable:!1,value:!0})})}return[s,r]}function h(s){var r=t;try{return t=!1,[s(),t]}finally{t=r}}export{O as a,N as b,h as c,U as s};
frontend/build/_app/immutable/chunks/tFCoQf30.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import{E as a}from"./CZHqxbHz.js";const c=[...`
2
+ \r\fΒ \v\uFEFF`];function v(r,g,u){var i=r==null?"":""+r;if(g&&(i=i?i+" "+g:g),u){for(var l in u)if(u[l])i=i?i+" "+l:l;else if(i.length)for(var t=l.length,f=0;(f=i.indexOf(l,f))>=0;){var n=f+t;(f===0||c.includes(i[f-1]))&&(n===i.length||c.includes(i[n]))?i=(f===0?"":i.substring(0,f))+i.substring(n+1):f=n}}return i===""?null:i}function N(r,g,u,i,l,t){var f=r.__className;if(a||f!==u||f===void 0){var n=v(u,i,t);(!a||n!==r.getAttribute("class"))&&(n==null?r.removeAttribute("class"):r.className=n),r.__className=u}else if(t&&l!==t)for(var o in t){var s=!!t[o];(l==null||s!==!!l[o])&&r.classList.toggle(o,s)}return t}export{N as s};
frontend/build/_app/immutable/entry/app.awhfrDwS.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.NVaLwRK8.js","../chunks/ChCjnC3I.js","../chunks/CZHqxbHz.js","../chunks/Dw-a1Jcz.js","../chunks/tFCoQf30.js","../chunks/masODVgD.js","../chunks/Bj0ilmBj.js","../chunks/BT92UpWj.js","../chunks/BGm1LqbF.js","../assets/0.szp2DwjZ.css","../nodes/1.D_MNTp_q.js","../nodes/2.BE75OYFf.js","../chunks/Rnl2RoQi.js","../assets/2.BhOwCb3K.css","../nodes/3.BFRT2aOm.js","../chunks/CAMnkZV6.js","../assets/3.nLZZFO8x.css","../nodes/4.CtAip5RQ.js","../assets/4.DFSjY77Q.css"])))=>i.map(i=>d[i]);
2
+ import{E as F,U as p,T as G,V as W,a6 as Z,a7 as H,a8 as J,g as v,a4 as K,a9 as Q,k as X,b as A,aa as $,ab as ee,ac as te,ad as re,u as ae,ae as ne,af as se,ag as oe,ah as ie,S as ce,ai as B,aj as ue,d as le,m as fe,h as de,a0 as _e,C as me,o as ve,j as T,ak as he,w,v as ge,y as Ee,z as Pe,A as be,al as I,x as ye}from"../chunks/CZHqxbHz.js";import{h as Se,m as Re,u as Oe,f as M,a as R,c as L,t as Ae,s as we}from"../chunks/ChCjnC3I.js";import{B as Te,i as x}from"../chunks/Dw-a1Jcz.js";import{c as Ie,b as j}from"../chunks/masODVgD.js";function D(a,e,n){F&&p();var c=new Te(a);G(()=>{var o=e()??null;c.ensure(o,o&&(t=>n(t,o)))},W)}function k(a,e,n,c){var o=!ne||(n&se)!==0,t=(n&re)!==0,r=(n&ie)!==0,s=c,P=!0,y=()=>(P&&(P=!1,s=r?ae(c):c),s),u;if(t){var h=ce in a||B in a;u=Z(a,e)?.set??(h&&e in a?i=>a[e]=i:void 0)}var d,_=!1;t?[d,_]=Ie(()=>a[e]):d=a[e],d===void 0&&c!==void 0&&(d=y(),u&&(o&&H(),u(d)));var f;if(o?f=()=>{var i=a[e];return i===void 0?y():(P=!0,i)}:f=()=>{var i=a[e];return i!==void 0&&(s=void 0),i===void 0?s:i},o&&(n&J)===0)return f;if(u){var l=a.$$legacy;return(function(i,E){return arguments.length>0?((!o||!E||l||_)&&u(E?f():i),i):f()})}var g=!1,m=((n&oe)!==0?K:Q)(()=>(g=!1,f()));t&&v(m);var S=ee;return(function(i,E){if(arguments.length>0){const b=E?v(m):o&&t?X(i):i;return A(m,b),g=!0,s!==void 0&&(s=b),i}return $&&g||(S.f&te)!==0?m.v:v(m)})}function Le(a){return class extends xe{constructor(e){super({component:a,...e})}}}class xe{#t;#e;constructor(e){var n=new Map,c=(t,r)=>{var s=fe(r,!1,!1);return n.set(t,s),s};const o=new Proxy({...e.props||{},$$events:{}},{get(t,r){return v(n.get(r)??c(r,Reflect.get(t,r)))},has(t,r){return r===B?!0:(v(n.get(r)??c(r,Reflect.get(t,r))),Reflect.has(t,r))},set(t,r,s){return A(n.get(r)??c(r,s),s),Reflect.set(t,r,s)}});this.#e=(e.hydrate?Se:Re)(e.component,{target:e.target,anchor:e.anchor,props:o,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&ue(),this.#t=o.$$events;for(const t of Object.keys(this.#e))t==="$set"||t==="$destroy"||t==="$on"||le(this,t,{get(){return this.#e[t]},set(r){this.#e[t]=r},enumerable:!0});this.#e.$set=t=>{Object.assign(o,t)},this.#e.$destroy=()=>{Oe(this.#e)}}$set(e){this.#e.$set(e)}$on(e,n){this.#t[e]=this.#t[e]||[];const c=(...o)=>n.call(this,...o);return this.#t[e].push(c),()=>{this.#t[e]=this.#t[e].filter(o=>o!==c)}}$destroy(){this.#e.$destroy()}}const je="modulepreload",De=function(a,e){return new URL(a,e).href},N={},O=function(e,n,c){let o=Promise.resolve();if(n&&n.length>0){let y=function(u){return Promise.all(u.map(h=>Promise.resolve(h).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};const r=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),P=s?.nonce||s?.getAttribute("nonce");o=y(n.map(u=>{if(u=De(u,c),u in N)return;N[u]=!0;const h=u.endsWith(".css"),d=h?'[rel="stylesheet"]':"";if(c)for(let f=r.length-1;f>=0;f--){const l=r[f];if(l.href===u&&(!h||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${d}`))return;const _=document.createElement("link");if(_.rel=h?"stylesheet":je,h||(_.as="script"),_.crossOrigin="",_.href=u,P&&_.setAttribute("nonce",P),document.head.appendChild(_),h)return new Promise((f,l)=>{_.addEventListener("load",f),_.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${u}`)))})}))}function t(r){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=r,window.dispatchEvent(s),!s.defaultPrevented)throw r}return o.then(r=>{for(const s of r||[])s.status==="rejected"&&t(s.reason);return e().catch(t)})},ze={};var ke=M('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Ce=M("<!> <!>",1);function Ne(a,e){de(e,!0);let n=k(e,"components",23,()=>[]),c=k(e,"data_0",3,null),o=k(e,"data_1",3,null);_e(()=>e.stores.page.set(e.page)),me(()=>{e.stores,e.page,e.constructors,n(),e.form,c(),o(),e.stores.page.notify()});let t=T(!1),r=T(!1),s=T(null);ve(()=>{const l=e.stores.page.subscribe(()=>{v(t)&&(A(r,!0),he().then(()=>{A(s,document.title||"untitled page",!0)}))});return A(t,!0),l});const P=I(()=>e.constructors[1]);var y=Ce(),u=w(y);{var h=l=>{const g=I(()=>e.constructors[0]);var m=L(),S=w(m);D(S,()=>v(g),(i,E)=>{j(E(i,{get data(){return c()},get form(){return e.form},get params(){return e.page.params},children:(b,Me)=>{var C=L(),V=w(C);D(V,()=>v(P),(Y,q)=>{j(q(Y,{get data(){return o()},get form(){return e.form},get params(){return e.page.params}}),z=>n()[1]=z,()=>n()?.[1])}),R(b,C)},$$slots:{default:!0}}),b=>n()[0]=b,()=>n()?.[0])}),R(l,m)},d=l=>{const g=I(()=>e.constructors[0]);var m=L(),S=w(m);D(S,()=>v(g),(i,E)=>{j(E(i,{get data(){return c()},get form(){return e.form},get params(){return e.page.params}}),b=>n()[0]=b,()=>n()?.[0])}),R(l,m)};x(u,l=>{e.constructors[1]?l(h):l(d,!1)})}var _=ge(u,2);{var f=l=>{var g=ke(),m=Pe(g);{var S=i=>{var E=Ae();ye(()=>we(E,v(s))),R(i,E)};x(m,i=>{v(r)&&i(S)})}be(g),R(l,g)};x(_,l=>{v(t)&&l(f)})}R(a,y),Ee()}const Fe=Le(Ne),pe=[()=>O(()=>import("../nodes/0.NVaLwRK8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),()=>O(()=>import("../nodes/1.D_MNTp_q.js"),__vite__mapDeps([10,1,2,7,6]),import.meta.url),()=>O(()=>import("../nodes/2.BE75OYFf.js"),__vite__mapDeps([11,1,2,8,3,12,4,13]),import.meta.url),()=>O(()=>import("../nodes/3.BFRT2aOm.js"),__vite__mapDeps([14,1,2,8,3,12,15,16]),import.meta.url),()=>O(()=>import("../nodes/4.CtAip5RQ.js"),__vite__mapDeps([17,1,2,8,3,12,4,15,18]),import.meta.url)],Ge=[],We={"/":[2],"/chosen":[3],"/process":[4]},U={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},Be=Object.fromEntries(Object.entries(U.transport).map(([a,e])=>[a,e.decode])),Ze=Object.fromEntries(Object.entries(U.transport).map(([a,e])=>[a,e.encode])),He=!1,Je=(a,e)=>Be[a](e);export{Je as decode,Be as decoders,We as dictionary,Ze as encoders,He as hash,U as hooks,ze as matchers,pe as nodes,Fe as root,Ge as server_loads};
frontend/build/_app/immutable/entry/start.Cm-ihup3.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{l as o,a as r}from"../chunks/BT92UpWj.js";export{o as load_css,r as start};
frontend/build/_app/immutable/nodes/0.NVaLwRK8.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{d as ve,f as m,a as f,s as U,e as ce,b as X}from"../chunks/ChCjnC3I.js";import{T as he,V as ge,h as Y,j as P,k as de,C as W,g as e,b as h,w as fe,y as Z,v as l,z as a,A as r,B as ye,x as V}from"../chunks/CZHqxbHz.js";import{B as pe,i as F}from"../chunks/Dw-a1Jcz.js";import{s as M}from"../chunks/tFCoQf30.js";import{b as ue,s as _e,a as me}from"../chunks/masODVgD.js";import{s as be}from"../chunks/BT92UpWj.js";import{c as J,A as Q,e as we,b as xe,i as ke}from"../chunks/BGm1LqbF.js";function Ce(v,y,...g){var t=new pe(v);he(()=>{const n=y()??null;t.ensure(n,n&&(i=>n(i,...g)))},ge)}const qe=()=>{const v=be;return{page:{subscribe:v.page.subscribe},navigating:{subscribe:v.navigating.subscribe},updated:v.updated}},Pe={subscribe(v){return qe().page.subscribe(v)}};var Be=m('<button class="chat-button svelte-1g2ry5f" title="Ask RFP Assistant"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-1g2ry5f"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" class="svelte-1g2ry5f"></path></svg> <span class="pulse svelte-1g2ry5f"></span></button>'),Re=X('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-1g2ry5f"><circle cx="12" cy="12" r="10" class="svelte-1g2ry5f"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2" class="svelte-1g2ry5f"></path><line x1="9" y1="9" x2="9.01" y2="9" class="svelte-1g2ry5f"></line><line x1="15" y1="9" x2="15.01" y2="9" class="svelte-1g2ry5f"></line></svg>'),Ae=X('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-1g2ry5f"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" class="svelte-1g2ry5f"></path><circle cx="12" cy="7" r="4" class="svelte-1g2ry5f"></circle></svg>'),Fe=m('<div><div class="message-avatar svelte-1g2ry5f"><!></div> <div class="message-content svelte-1g2ry5f"> </div></div>'),Me=m('<div class="message assistant svelte-1g2ry5f"><div class="message-avatar svelte-1g2ry5f"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-1g2ry5f"><circle cx="12" cy="12" r="10" class="svelte-1g2ry5f"></circle></svg></div> <div class="message-content typing svelte-1g2ry5f"><span class="svelte-1g2ry5f"></span> <span class="svelte-1g2ry5f"></span> <span class="svelte-1g2ry5f"></span></div></div>'),$e=m('<div class="chat-window svelte-1g2ry5f"><div class="chat-header svelte-1g2ry5f"><div class="header-content svelte-1g2ry5f"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-1g2ry5f"><circle cx="12" cy="12" r="10" class="svelte-1g2ry5f"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2" class="svelte-1g2ry5f"></path><line x1="9" y1="9" x2="9.01" y2="9" class="svelte-1g2ry5f"></line><line x1="15" y1="9" x2="15.01" y2="9" class="svelte-1g2ry5f"></line></svg> <div class="svelte-1g2ry5f"><h3 class="svelte-1g2ry5f">RFP Assistant</h3> <p class="status svelte-1g2ry5f">Online β€’ Powered by AI</p></div></div> <div class="header-actions svelte-1g2ry5f"><button class="icon-btn svelte-1g2ry5f" title="Clear chat"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-1g2ry5f"><polyline points="3 6 5 6 21 6" class="svelte-1g2ry5f"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" class="svelte-1g2ry5f"></path></svg></button> <button class="icon-btn svelte-1g2ry5f" title="Close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-1g2ry5f"><line x1="18" y1="6" x2="6" y2="18" class="svelte-1g2ry5f"></line><line x1="6" y1="6" x2="18" y2="18" class="svelte-1g2ry5f"></line></svg></button></div></div> <div class="chat-messages svelte-1g2ry5f"><!> <!></div> <div class="chat-input svelte-1g2ry5f"><textarea placeholder="Ask about the RFP requirements..." rows="1" class="svelte-1g2ry5f"></textarea> <button class="send-btn svelte-1g2ry5f"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-1g2ry5f"><line x1="22" y1="2" x2="11" y2="13" class="svelte-1g2ry5f"></line><polygon points="22 2 15 22 11 13 2 9 22 2" class="svelte-1g2ry5f"></polygon></svg></button></div> <div class="chat-footer svelte-1g2ry5f"><span class="footer-text svelte-1g2ry5f"> </span></div></div>'),He=m("<!> <!>",1);function Ie(v,y){Y(y,!0);let g=P(!1),t=P(de([])),n=P(""),i=P(!1),d,p=P("the uploaded RFP");async function b(){try{const s=await J.get(`${Q}/api/rfp-processing/uploaded-rfps`);if(s.data&&s.data.length>0){const o=s.data[s.data.length-1];h(p,o.rfp_name||o.filename,!0)}}catch(s){console.error("Error fetching RFP name:",s)}}W(()=>{e(t).length===0&&(b(),h(t,[{role:"assistant",content:`Hello! I'm your Sedna RFP assistant. I can help you understand ${e(p)}, answer questions about requirements, and guide you through the response process. What would you like to know?`}],!0))}),W(()=>{d&&e(t).length>0&&setTimeout(()=>{d.scrollTop=d.scrollHeight},100)});async function w(){if(!e(n).trim()||e(i))return;const s=e(n).trim();h(n,""),h(t,[...e(t),{role:"user",content:s}],!0),h(i,!0);try{const o=await J.post(`${Q}/api/chatbot/chat`,{message:s,conversation_history:e(t).slice(-6)});h(t,[...e(t),{role:"assistant",content:o.data.response}],!0)}catch(o){h(t,[...e(t),{role:"assistant",content:"I apologize, but I encountered an error. Please try again or rephrase your question."}],!0),console.error("Chatbot error:",o)}finally{h(i,!1)}}function B(s){s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),w())}function x(){h(g,!e(g))}function $(){b(),h(t,[{role:"assistant",content:`Chat cleared. How can I help you with ${e(p)}?`}],!0)}var k=He(),u=fe(k);{var H=s=>{var o=Be();o.__click=x,f(s,o)};F(u,s=>{e(g)||s(H)})}var I=l(u,2);{var ee=s=>{var o=$e(),S=a(o),z=l(a(S),2),K=a(z);K.__click=$;var se=l(K,2);se.__click=x,r(z),r(S);var R=l(S,2),G=a(R);we(G,17,()=>e(t),ke,(c,q)=>{var A=Fe(),T=a(A),le=a(T);{var oe=_=>{var N=Re();f(_,N)},ne=_=>{var N=Ae();f(_,N)};F(le,_=>{e(q).role==="assistant"?_(oe):_(ne,!1)})}r(T);var D=l(T,2),ie=a(D,!0);r(D),r(A),V(()=>{M(A,1,`message ${e(q).role??""}`,"svelte-1g2ry5f"),U(ie,e(q).content)}),f(c,A)});var te=l(G,2);{var ae=c=>{var q=Me();f(c,q)};F(te,c=>{e(i)&&c(ae)})}r(R),ue(R,c=>d=c,()=>d);var E=l(R,2),C=a(E);ye(C);var L=l(C,2);L.__click=w,r(E);var O=l(E,2),j=a(O),re=a(j);r(j),r(O),r(o),V(c=>{C.disabled=e(i),L.disabled=c,U(re,`Ask about ${e(p)??""} requirements, deadlines, or get help with responses`)},[()=>!e(n).trim()||e(i)]),ce("keypress",C,B),xe(C,()=>e(n),c=>h(n,c)),f(s,o)};F(I,s=>{e(g)&&s(ee)})}f(v,k),Z()}ve(["click"]);var Se=m('<div class="container svelte-12qhfyh"><nav class="svelte-12qhfyh"><div class="nav-brand svelte-12qhfyh"><img src="/logo.png" alt="Sedna Consulting Group" class="logo svelte-12qhfyh"/> <div class="brand-text svelte-12qhfyh"><h1 class="svelte-12qhfyh">Sedna Consulting Group</h1> <p class="tagline svelte-12qhfyh">RFP Management System</p></div></div> <div class="nav-links svelte-12qhfyh"><a href="/"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg> Knowledge Base</a> <a href="/process"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg> Process New RFP</a> <a href="/chosen"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path></svg> Chosen Answers</a></div></nav> <main class="svelte-12qhfyh"><!></main> <!></div>');function Le(v,y){Y(y,!0);const g=()=>me(Pe,"$page",t),[t,n]=_e();var i=Se(),d=a(i),p=l(a(d),2),b=a(p);let w;var B=l(b,2);let x;var $=l(B,2);let k;r(p),r(d);var u=l(d,2),H=a(u);Ce(H,()=>y.children),r(u);var I=l(u,2);Ie(I,{}),r(i),V(()=>{w=M(b,1,"svelte-12qhfyh",null,w,{active:g().url.pathname==="/"}),x=M(B,1,"svelte-12qhfyh",null,x,{active:g().url.pathname==="/process"}),k=M($,1,"svelte-12qhfyh",null,k,{active:g().url.pathname==="/chosen"})}),f(v,i),Z(),n()}export{Le as component};
frontend/build/_app/immutable/nodes/1.D_MNTp_q.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{f as b,a as x,s as l}from"../chunks/ChCjnC3I.js";import{$ as k,a0 as y,C as i,u as $,a1 as u,a2 as w,g as v,a3 as z,a4 as A,a5 as C,h as E,w as j,x as q,y as B,z as g,A as m,v as D}from"../chunks/CZHqxbHz.js";import{s as F,p as _}from"../chunks/BT92UpWj.js";function G(r=!1){const t=k,e=t.l.u;if(!e)return;let a=()=>z(t.s);if(r){let o=0,s={};const f=A(()=>{let p=!1;const c=t.s;for(const n in c)c[n]!==s[n]&&(s[n]=c[n],p=!0);return p&&o++,o});a=()=>v(f)}e.b.length&&y(()=>{h(t,a),u(e.b)}),i(()=>{const o=$(()=>e.m.map(w));return()=>{for(const s of o)typeof s=="function"&&s()}}),e.a.length&&i(()=>{h(t,a),u(e.a)})}function h(r,t){if(r.l.s)for(const e of r.l.s)v(e);t()}C();const H={get error(){return _.error},get status(){return _.status}};F.updated.check;const d=H;var I=b("<h1> </h1> <p> </p>",1);function M(r,t){E(t,!1),G();var e=I(),a=j(e),o=g(a,!0);m(a);var s=D(a,2),f=g(s,!0);m(s),q(()=>{l(o,d.status),l(f,d.error?.message)}),x(r,e),B()}export{M as component};
frontend/build/_app/immutable/nodes/2.BE75OYFf.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{d as ze,f as p,a as o,s as _,c as xe,t as ve}from"../chunks/ChCjnC3I.js";import{h as Ne,j as R,k as ae,o as He,v as r,w as ce,b as t,g as e,x as F,y as Ie,z as i,A as s,B as ue}from"../chunks/CZHqxbHz.js";import{b as j,e as be,i as me}from"../chunks/BGm1LqbF.js";import{i as y}from"../chunks/Dw-a1Jcz.js";import{r as X,a as W}from"../chunks/Rnl2RoQi.js";import{s as Ke}from"../chunks/tFCoQf30.js";var Oe=p('<div class="error"> </div>'),Ve=p('<div class="success"> </div>'),Xe=p('<div class="form-section svelte-1uha8ag"><div class="form-group"><label for="rfp-title">RFP Title *</label> <input id="rfp-title" type="text" placeholder="e.g., Client XYZ 2024 Project"/></div> <div class="form-group"><label for="rfp-desc">Description</label> <textarea id="rfp-desc" placeholder="Optional description"></textarea></div> <button class="btn btn-success"> </button></div>'),Ye=p('<div class="loading">Loading RFPs...</div>'),Ze=p('<p>No RFPs yet. Click "+ Add RFP" to create one.</p>'),Ge=p('<tr><td><button class="link-button svelte-1uha8ag"> </button></td><td> </td><td> </td><td><button class="btn btn-danger btn-sm svelte-1uha8ag">Delete</button></td></tr>'),Je=p("<table><thead><tr><th>Title</th><th>Description</th><th>Created</th><th>Actions</th></tr></thead><tbody></tbody></table>"),Ue=p('<div class="form-section svelte-1uha8ag"><div class="form-row svelte-1uha8ag"><div class="form-group"><label for="q-section">Section</label> <input id="q-section" type="text" placeholder="e.g., Technical Requirements"/></div> <div class="form-group"><label for="q-id">Question ID</label> <input id="q-id" type="text" placeholder="e.g., Q1.1"/></div></div> <div class="form-group"><label for="q-text">Question Text *</label> <textarea id="q-text" placeholder="Enter the question"></textarea></div> <div class="form-group"><label for="q-answer">Answer Text *</label> <textarea id="q-answer" placeholder="Enter the answer" rows="6"></textarea></div> <div class="form-row svelte-1uha8ag"><div class="form-group"><label for="q-page-start">Page Start</label> <input id="q-page-start" type="number" placeholder="e.g., 5"/></div> <div class="form-group"><label for="q-page-end">Page End</label> <input id="q-page-end" type="number" placeholder="e.g., 7"/></div></div> <button class="btn btn-success"> </button></div>'),We=p('<div class="loading">Loading questions...</div>'),$e=p('<p>No questions yet. Click "+ Add Question" to create one.</p>'),et=p('<div class="question-item svelte-1uha8ag"><div class="question-header svelte-1uha8ag"><span class="question-meta svelte-1uha8ag"><!> <!> <!></span> <button class="btn btn-danger btn-sm svelte-1uha8ag">Delete</button></div> <div class="question-text svelte-1uha8ag"><strong>Q:</strong> </div> <div class="answer-text svelte-1uha8ag"><strong>A:</strong> </div></div>'),tt=p('<div class="questions-list svelte-1uha8ag"></div>'),at=p('<div class="card"><div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;"><h3 style="margin: 0; display: flex; align-items: center; gap: 0.5rem;" class="svelte-1uha8ag"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg> </h3> <button class="btn btn-primary"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg> </button></div> <!> <!></div>'),rt=p('<h2 class="svelte-1uha8ag">πŸ“š RFP Knowledge Base</h2> <p style="color: #666; margin-bottom: 2rem;">Manage your RFP library and build a comprehensive knowledge base for intelligent response generation.</p> <!> <!> <div class="card"><div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem;"><h3 style="margin: 0; display: flex; align-items: center; gap: 0.5rem;" class="svelte-1uha8ag"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg> RFPs</h3> <button class="btn btn-primary"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg> </button></div> <!> <!></div> <!>',1);function vt(ye,we){Ne(we,!0);let Y=R(ae([])),Z=R(ae([])),C=R(null),d=R(!1),c=R(""),q=R(""),G=R(!1),J=R(!1),M=R(ae({title:"",description:""})),n=R(ae({rfp_id:0,section:"",question_id:"",question_text:"",answer_text:"",page_start:null,page_end:null}));He(async()=>{await re()});async function re(){t(d,!0),t(c,"");try{const a=await X.listRFPs();t(Y,a.data,!0)}catch(a){t(c,"Failed to load RFPs: "+(a.response?.data?.detail||a.message))}finally{t(d,!1)}}async function se(a=null){t(d,!0),t(c,"");try{const l=await X.listQuestions(a);t(Z,l.data,!0)}catch(l){t(c,"Failed to load questions: "+(l.response?.data?.detail||l.message))}finally{t(d,!1)}}async function Fe(){if(!e(M).title){t(c,"RFP title is required");return}t(d,!0),t(c,""),t(q,"");try{await X.createRFP(e(M)),t(q,"RFP created successfully!"),t(M,{title:"",description:""},!0),t(G,!1),await re()}catch(a){t(c,"Failed to create RFP: "+(a.response?.data?.detail||a.message))}finally{t(d,!1)}}async function qe(){if(!e(n).question_text||!e(n).answer_text||!e(n).rfp_id){t(c,"RFP, Question text, and Answer text are required");return}t(d,!0),t(c,""),t(q,"");try{await X.createQuestion(e(n)),t(q,"Question created successfully!"),t(n,{rfp_id:e(n).rfp_id,section:"",question_id:"",question_text:"",answer_text:"",page_start:null,page_end:null},!0),t(J,!1),await se(e(C))}catch(a){t(c,"Failed to create question: "+(a.response?.data?.detail||a.message))}finally{t(d,!1)}}async function Pe(a){if(confirm("Are you sure you want to delete this RFP and all its questions?")){t(d,!0),t(c,""),t(q,"");try{await X.deleteRFP(a),t(q,"RFP deleted successfully!"),await re(),e(C)===a&&(t(C,null),t(Z,[],!0))}catch(l){t(c,"Failed to delete RFP: "+(l.response?.data?.detail||l.message))}finally{t(d,!1)}}}async function Re(a){if(confirm("Are you sure you want to delete this question?")){t(d,!0),t(c,""),t(q,"");try{await X.deleteQuestion(a),t(q,"Question deleted successfully!"),await se(e(C))}catch(l){t(c,"Failed to delete question: "+(l.response?.data?.detail||l.message))}finally{t(d,!1)}}}function ke(a){t(C,a,!0),e(n).rfp_id=a,se(a)}var _e=rt(),pe=r(ce(_e),4);{var Qe=a=>{var l=Oe(),g=i(l,!0);s(l),F(()=>_(g,e(c))),o(a,l)};y(pe,a=>{e(c)&&a(Qe)})}var ge=r(pe,2);{var Ce=a=>{var l=Ve(),g=i(l,!0);s(l),F(()=>_(g,e(q))),o(a,l)};y(ge,a=>{e(q)&&a(Ce)})}var ie=r(ge,2),le=i(ie),ne=r(i(le),2);ne.__click=()=>t(G,!e(G));var Ae=r(i(ne));s(ne),s(le);var fe=r(le,2);{var De=a=>{var l=Xe(),g=i(l),A=r(i(g),2);W(A),s(g);var E=r(g,2),f=r(i(E),2);ue(f),s(E);var b=r(E,2);b.__click=Fe;var L=i(b,!0);s(b),s(l),F(()=>{b.disabled=e(d),_(L,e(d)?"Creating...":"Create RFP")}),j(A,()=>e(M).title,S=>e(M).title=S),j(f,()=>e(M).description,S=>e(M).description=S),o(a,l)};y(fe,a=>{e(G)&&a(De)})}var Be=r(fe,2);{var Te=a=>{var l=Ye();o(a,l)},je=a=>{var l=xe(),g=ce(l);{var A=f=>{var b=Ze();o(f,b)},E=f=>{var b=Je(),L=r(i(b));be(L,21,()=>e(Y),me,(S,D)=>{var H=Ge();let $;var v=i(H),m=i(v);m.__click=()=>ke(e(D).id);var z=i(m,!0);s(m),s(v);var k=r(v),I=i(k,!0);s(k);var h=r(k),P=i(h,!0);s(h);var B=r(h),u=i(B);u.__click=()=>Pe(e(D).id),s(B),s(H),F(Q=>{$=Ke(H,1,"svelte-1uha8ag",null,$,{selected:e(C)===e(D).id}),_(z,e(D).title),_(I,e(D).description||"-"),_(P,Q)},[()=>new Date(e(D).created_at).toLocaleDateString()]),o(S,H)}),s(L),s(b),o(f,b)};y(g,f=>{e(Y).length===0?f(A):f(E,!1)},!0)}o(a,l)};y(Be,a=>{e(d)&&e(Y).length===0?a(Te):a(je,!1)})}s(ie);var Me=r(ie,2);{var Ee=a=>{var l=at(),g=i(l),A=i(g),E=r(i(A));s(A);var f=r(A,2);f.__click=()=>t(J,!e(J));var b=r(i(f));s(f),s(g);var L=r(g,2);{var S=v=>{var m=Ue(),z=i(m),k=i(z),I=r(i(k),2);W(I),s(k);var h=r(k,2),P=r(i(h),2);W(P),s(h),s(z);var B=r(z,2),u=r(i(B),2);ue(u),s(B);var Q=r(B,2),K=r(i(Q),2);ue(K),s(Q);var N=r(Q,2),O=i(N),ee=r(i(O),2);W(ee),s(O);var U=r(O,2),te=r(i(U),2);W(te),s(U),s(N);var V=r(N,2);V.__click=qe;var oe=i(V,!0);s(V),s(m),F(()=>{V.disabled=e(d),_(oe,e(d)?"Creating...":"Create Question")}),j(I,()=>e(n).section,x=>e(n).section=x),j(P,()=>e(n).question_id,x=>e(n).question_id=x),j(u,()=>e(n).question_text,x=>e(n).question_text=x),j(K,()=>e(n).answer_text,x=>e(n).answer_text=x),j(ee,()=>e(n).page_start,x=>e(n).page_start=x),j(te,()=>e(n).page_end,x=>e(n).page_end=x),o(v,m)};y(L,v=>{e(J)&&v(S)})}var D=r(L,2);{var H=v=>{var m=We();o(v,m)},$=v=>{var m=xe(),z=ce(m);{var k=h=>{var P=$e();o(h,P)},I=h=>{var P=tt();be(P,21,()=>e(Z),me,(B,u)=>{var Q=et(),K=i(Q),N=i(K),O=i(N);{var ee=w=>{var T=ve();F(()=>_(T,`${e(u).section??""} -`)),o(w,T)};y(O,w=>{e(u).section&&w(ee)})}var U=r(O,2);{var te=w=>{var T=ve();F(()=>_(T,e(u).question_id)),o(w,T)};y(U,w=>{e(u).question_id&&w(te)})}var V=r(U,2);{var oe=w=>{var T=ve();F(()=>_(T,`(Pages ${e(u).page_start??""}-${(e(u).page_end||e(u).page_start)??""})`)),o(w,T)};y(V,w=>{e(u).page_start&&w(oe)})}s(N);var x=r(N,2);x.__click=()=>Re(e(u).id),s(K);var de=r(K,2),Le=r(i(de));s(de);var he=r(de,2),Se=r(i(he));s(he),s(Q),F(()=>{_(Le,` ${e(u).question_text??""}`),_(Se,` ${e(u).answer_text??""}`)}),o(B,Q)}),s(P),o(h,P)};y(z,h=>{e(Z).length===0?h(k):h(I,!1)},!0)}o(v,m)};y(D,v=>{e(d)&&e(Z).length===0?v(H):v($,!1)})}s(l),F(v=>{_(E,` Questions for ${v??""}`),_(b,` ${e(J)?"Cancel":"Add Question"}`)},[()=>e(Y).find(v=>v.id===e(C))?.title]),o(a,l)};y(Me,a=>{e(C)&&a(Ee)})}F(()=>_(Ae,` ${e(G)?"Cancel":"Add RFP"}`)),o(ye,_e),Ie()}ze(["click"]);export{vt as component};
frontend/build/_app/immutable/nodes/3.BFRT2aOm.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{d as Ue,f as p,a as _,s as b}from"../chunks/ChCjnC3I.js";import{h as Ye,j as h,k as me,o as He,v as i,w as ie,x as y,y as Ve,z as l,b as s,g as e,A as r,B as We}from"../chunks/CZHqxbHz.js";import{e as re,i as le,b as Xe}from"../chunks/BGm1LqbF.js";import{i as S}from"../chunks/Dw-a1Jcz.js";import{r as ve,a as D,s as J}from"../chunks/Rnl2RoQi.js";import{b as Ze,i as et,s as tt}from"../chunks/CAMnkZV6.js";var at=p('<div class="error"> </div>'),st=p('<div class="success"> </div>'),nt=p('<button class="btn btn-primary">πŸ’Ύ Bulk Save All</button> <button class="btn btn-danger">πŸ—‘οΈ Clear All</button>',1),it=p("<option> </option>"),rt=p('<div class="bulk-save-form svelte-7nnquv"><h4 class="svelte-7nnquv">Save All Answers to Knowledge Base</h4> <div class="form-group svelte-7nnquv"><label for="bulk-rfp" class="svelte-7nnquv">Select RFP *</label> <select id="bulk-rfp"><option>-- Select RFP --</option><!></select></div> <div style="display: flex; gap: 0.5rem;"><button class="btn btn-success"> </button> <button class="btn">Cancel</button></div></div>'),lt=p('<div class="empty-state svelte-7nnquv"><p class="svelte-7nnquv">πŸ“‹ No chosen answers yet.</p> <p class="svelte-7nnquv">Go to the <a href="/process" class="svelte-7nnquv">Process Questions</a> page and click "Add to Chosen Answers" to add answers here for editing.</p></div>'),vt=p('<span class="edited-badge svelte-7nnquv">✏️ Edited</span>'),ot=p('<div class="edit-section svelte-7nnquv"><textarea rows="10" placeholder="Edit your answer..." style="width: 100%; padding: 0.75rem; border: 2px solid #3498db; border-radius: 4px; font-family: inherit; font-size: 0.95rem;"></textarea> <div style="display: flex; gap: 0.5rem; margin-top: 0.5rem;"><button class="btn btn-success">πŸ’Ύ Save Changes</button> <button class="btn">Cancel</button></div></div>'),dt=p('<div class="answer-text svelte-7nnquv"> </div> <button class="btn btn-primary btn-sm svelte-7nnquv">✏️ Edit Answer</button>',1),ut=p("<option> </option>"),ct=p('<div class="answer-card svelte-7nnquv"><div class="answer-header svelte-7nnquv"><div class="answer-meta svelte-7nnquv"><span class="answer-type svelte-7nnquv"> </span> <!> <span class="answer-date svelte-7nnquv"> </span></div> <button class="btn btn-danger btn-sm svelte-7nnquv">Remove</button></div> <div class="answer-question svelte-7nnquv"><strong>Question:</strong> </div> <div class="answer-body svelte-7nnquv"><!></div> <div class="save-metadata svelte-7nnquv"><h5 class="svelte-7nnquv">Metadata for Knowledge Base</h5> <div class="metadata-grid svelte-7nnquv"><div class="form-group svelte-7nnquv"><label class="svelte-7nnquv">RFP *</label> <select><option>-- Select RFP --</option><!></select></div> <div class="form-group svelte-7nnquv"><label class="svelte-7nnquv">Section</label> <input type="text" placeholder="e.g., Technical"/></div> <div class="form-group svelte-7nnquv"><label class="svelte-7nnquv">Question ID</label> <input type="text" placeholder="e.g., Q1.1"/></div> <div class="form-group svelte-7nnquv"><label class="svelte-7nnquv">Page Start</label> <input type="number"/></div> <div class="form-group svelte-7nnquv"><label class="svelte-7nnquv">Page End</label> <input type="number"/></div></div> <button class="btn btn-success"> </button></div></div>'),_t=p('<div class="answers-list svelte-7nnquv"></div>'),pt=p('<h2 class="svelte-7nnquv">Chosen Answers</h2> <p>Edit and finalize your selected answers before saving them to the knowledge base.</p> <!> <!> <div class="card"><div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;"><h3 class="svelte-7nnquv"> </h3> <div style="display: flex; gap: 0.5rem;"><!></div></div> <!> <!></div>',1);function xt(he,qe){Ye(qe,!0);let o=h(me([])),N=h(null),P=h(""),q=h(!1),x=h(""),f=h(""),L=h(me([])),E=h(!1),B=h(0);He(async()=>{xe(),await ye()});function xe(){const t=localStorage.getItem("chosenAnswers");t&&s(o,JSON.parse(t),!0)}function F(){localStorage.setItem("chosenAnswers",JSON.stringify(e(o)))}async function ye(){try{const t=await ve.listRFPs();s(L,t.data,!0)}catch(t){console.error("Failed to load RFPs",t)}}function we(t,a){s(N,t,!0),s(P,a,!0)}function Ae(t){const a=e(o).findIndex(d=>d.id===t);a!==-1&&(e(o)[a].answer=e(P),e(o)[a].edited=!0,s(o,[...e(o)],!0),F(),s(N,null),s(P,""),s(f,"Answer updated!"),setTimeout(()=>s(f,""),2e3))}function ke(){s(N,null),s(P,"")}function Se(t){confirm("Remove this answer from chosen answers?")&&(s(o,e(o).filter(a=>a.id!==t),!0),F(),s(f,"Answer removed!"),setTimeout(()=>s(f,""),2e3))}function Pe(){confirm("Clear all chosen answers? This cannot be undone.")&&(s(o,[],!0),F(),s(f,"All answers cleared!"),setTimeout(()=>s(f,""),2e3))}async function Fe(t){if(!t.rfp_id){s(x,"Please select an RFP first");return}s(q,!0),s(x,""),s(f,"");try{await ve.createQuestion({rfp_id:t.rfp_id,section:t.section||"",question_id:t.question_id||"",question_text:t.question,answer_text:t.answer,page_start:t.page_start||null,page_end:t.page_end||null}),s(f,`Answer "${t.question.substring(0,50)}..." saved to knowledge base!`),s(o,e(o).filter(a=>a.id!==t.id),!0),F()}catch(a){s(x,"Failed to save: "+(a.response?.data?.detail||a.message))}finally{s(q,!1)}}async function Ce(){if(!e(B)){s(x,"Please select an RFP");return}s(q,!0),s(x,"");let t=0,a=0;for(const d of e(o))try{await ve.createQuestion({rfp_id:e(B),section:d.section||"",question_id:d.question_id||"",question_text:d.question,answer_text:d.answer,page_start:d.page_start||null,page_end:d.page_end||null}),t++}catch(n){a++,console.error("Failed to save answer:",n)}t>0&&(s(f,`Saved ${t} answer(s) to knowledge base!`),s(o,[],!0),F(),s(E,!1)),a>0&&s(x,`Failed to save ${a} answer(s)`),s(q,!1)}function Q(t,a,d){const n=e(o).findIndex(g=>g.id===t);n!==-1&&(e(o)[n][a]=d,s(o,[...e(o)],!0),F())}var oe=pt(),de=i(ie(oe),4);{var Re=t=>{var a=at(),d=l(a,!0);r(a),y(()=>b(d,e(x))),_(t,a)};S(de,t=>{e(x)&&t(Re)})}var ue=i(de,2);{var Ie=t=>{var a=st(),d=l(a,!0);r(a),y(()=>b(d,e(f))),_(t,a)};S(ue,t=>{e(f)&&t(Ie)})}var ce=i(ue,2),M=l(ce),O=l(M),Te=l(O);r(O);var _e=i(O,2),Ee=l(_e);{var Be=t=>{var a=nt(),d=ie(a);d.__click=()=>s(E,!e(E));var n=i(d,2);n.__click=Pe,_(t,a)};S(Ee,t=>{e(o).length>0&&t(Be)})}r(_e),r(M);var pe=i(M,2);{var Qe=t=>{var a=rt(),d=i(l(a),2),n=i(l(d),2),g=l(n);g.value=g.__value=0;var K=i(g);re(K,17,()=>e(L),le,(z,R)=>{var w=it(),U=l(w,!0);r(w);var I={};y(()=>{b(U,e(R).title),I!==(I=e(R).id)&&(w.value=(w.__value=e(R).id)??"")}),_(z,w)}),r(n),r(d);var C=i(d,2),m=l(C);m.__click=Ce;var G=l(m,!0);r(m);var $=i(m,2);$.__click=()=>s(E,!1),r(C),r(a),y(()=>{m.disabled=e(q)||!e(B),b(G,e(q)?"Saving...":`Save ${e(o).length} Answers`)}),Ze(n,()=>e(B),z=>s(B,z)),_(t,a)};S(pe,t=>{e(E)&&t(Qe)})}var Ke=i(pe,2);{var ze=t=>{var a=lt();_(t,a)},Ne=t=>{var a=_t();re(a,21,()=>e(o),le,(d,n)=>{var g=ct(),K=l(g),C=l(K),m=l(C),G=l(m,!0);r(m);var $=i(m,2);{var z=v=>{var u=vt();_(v,u)};S($,v=>{e(n).edited&&v(z)})}var R=i($,2),w=l(R,!0);r(R),r(C);var U=i(C,2);U.__click=()=>Se(e(n).id),r(K);var I=i(K,2),$e=i(l(I));r(I);var Y=i(I,2),je=l(Y);{var De=v=>{var u=ot(),c=l(u);We(c);var T=i(c,2),k=l(T);k.__click=()=>Ae(e(n).id);var Oe=i(k,2);Oe.__click=ke,r(T),r(u),Xe(c,()=>e(P),Ge=>s(P,Ge)),_(v,u)},Je=v=>{var u=dt(),c=ie(u),T=l(c,!0);r(c);var k=i(c,2);k.__click=()=>we(e(n).id,e(n).answer),y(()=>b(T,e(n).answer)),_(v,u)};S(je,v=>{e(N)===e(n).id?v(De):v(Je,!1)})}r(Y);var fe=i(Y,2),H=i(l(fe),2),V=l(H),A=i(l(V),2);A.__change=v=>Q(e(n).id,"rfp_id",parseInt(v.target.value));var W=l(A);W.value=W.__value=0;var Le=i(W);re(Le,17,()=>e(L),le,(v,u)=>{var c=ut(),T=l(c,!0);r(c);var k={};y(()=>{b(T,e(u).title),k!==(k=e(u).id)&&(c.value=(c.__value=e(u).id)??"")}),_(v,c)}),r(A);var be;et(A),r(V);var X=i(V,2),Z=i(l(X),2);D(Z),Z.__input=v=>Q(e(n).id,"section",v.target.value),r(X);var ee=i(X,2),te=i(l(ee),2);D(te),te.__input=v=>Q(e(n).id,"question_id",v.target.value),r(ee);var ae=i(ee,2),se=i(l(ae),2);D(se),se.__input=v=>Q(e(n).id,"page_start",v.target.value?parseInt(v.target.value):null),r(ae);var ge=i(ae,2),ne=i(l(ge),2);D(ne),ne.__input=v=>Q(e(n).id,"page_end",v.target.value?parseInt(v.target.value):null),r(ge),r(H);var j=i(H,2);j.__click=()=>Fe(e(n));var Me=l(j,!0);r(j),r(fe),r(g),y((v,u)=>{b(G,v),b(w,u),b($e,` ${e(n).question??""}`),be!==(be=e(n).rfp_id||0)&&(A.value=(A.__value=e(n).rfp_id||0)??"",tt(A,e(n).rfp_id||0)),J(Z,e(n).section||""),J(te,e(n).question_id||""),J(se,e(n).page_start||""),J(ne,e(n).page_end||""),j.disabled=e(q)||!e(n).rfp_id,b(Me,e(q)?"Saving...":"πŸ’Ύ Save to Knowledge Base")},[()=>e(n).selectedType==="ai"?"πŸ€– AI Answer":`πŸ“š Previous Answer (${e(n).selectedType.toUpperCase()})`,()=>new Date(e(n).addedAt).toLocaleString()]),_(d,g)}),r(a),_(t,a)};S(Ke,t=>{e(o).length===0?t(ze):t(Ne,!1)})}r(ce),y(()=>b(Te,`Your Chosen Answers (${e(o).length??""})`)),_(he,oe),Ve()}Ue(["click","change","input"]);export{xt as component};
frontend/build/_app/immutable/nodes/4.CtAip5RQ.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import{d as Ea,f as u,a as c,s as o,c as pa}from"../chunks/ChCjnC3I.js";import{h as Oa,j as g,k as Qe,o as Ga,C as Ja,g as e,v as s,w as ce,z as t,b as r,x as _,y as La,A as a,B as ga,D as ta}from"../chunks/CZHqxbHz.js";import{b as xe,e as ue,i as _e,a as sa}from"../chunks/BGm1LqbF.js";import{i as y}from"../chunks/Dw-a1Jcz.js";import{p as qe,r as ma,b as Ne,a as Y,s as Va}from"../chunks/Rnl2RoQi.js";import{s as Fe}from"../chunks/tFCoQf30.js";import{b as ja}from"../chunks/CAMnkZV6.js";var Ha=u('<div class="error"> </div>'),Wa=u('<div class="success"> </div>'),Xa=u('<span class="file-name svelte-afnr3e"> </span>'),Ya=u('<div><label class="rfp-radio-label svelte-afnr3e"><input type="radio" name="uploaded-rfp" class="svelte-afnr3e"/> <div class="rfp-info svelte-afnr3e"><strong class="svelte-afnr3e"> </strong> <span class="rfp-date svelte-afnr3e"> </span></div></label> <button class="btn-icon-delete svelte-afnr3e" title="Delete this RFP"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg></button></div>'),Za=u('<button class="btn-clear-selection svelte-afnr3e">Clear Selection</button>'),et=u('<div class="form-group" style="margin-top: 1rem;"><label for="select-rfp">Previously uploaded RFPs:</label> <div class="uploaded-rfp-list svelte-afnr3e"><!> <!></div></div>'),at=u('<div class="error"> </div>'),tt=u('<label class="answer-option-horizontal svelte-afnr3e"><input type="radio" class="svelte-afnr3e"/> <span class="svelte-afnr3e"> </span></label>'),st=u("| <strong>Pages:</strong> ",1),rt=u('<div class="similar-item svelte-afnr3e"><div class="similar-header svelte-afnr3e"><strong></strong> <strong>Match:</strong> <!></div> <div class="similar-answer svelte-afnr3e"> </div></div>'),nt=u('<div class="result-section svelte-afnr3e"><details class="svelte-afnr3e"><summary class="svelte-afnr3e"> </summary> <div class="collapsible-content svelte-afnr3e"></div></details></div>'),it=u('<div class="result-section svelte-afnr3e"><strong>πŸ€– AI Answer:</strong> <div class="ai-answer svelte-afnr3e"> </div></div> <div class="result-section svelte-afnr3e"><strong>Select Answer:</strong> <div class="answer-selector-horizontal svelte-afnr3e"><label class="answer-option-horizontal svelte-afnr3e"><input type="radio" value="ai" checked class="svelte-afnr3e"/> <span class="svelte-afnr3e">Use AI Answer</span></label> <!></div></div> <!>',1),lt=u('<div class="batch-result svelte-afnr3e"><h4 class="svelte-afnr3e"> </h4> <!></div>'),ot=u('<div class="card"><h3 class="svelte-afnr3e"> </h3> <!></div>'),vt=u('<div class="warning-box svelte-afnr3e"><strong class="svelte-afnr3e">⚠️ Low Match Confidence</strong> <p class="svelte-afnr3e"> </p> <p class="svelte-afnr3e"><strong class="svelte-afnr3e">Recommendation:</strong> If the AI answer below is not relevant, please add this question to your Knowledge Base first with the correct answer.</p></div>'),dt=u("| <strong>Pages:</strong> ",1),ct=u('<div class="similar-item svelte-afnr3e"><div class="similar-header svelte-afnr3e"><strong>RFP:</strong> <strong>Match:</strong> <!></div> <div class="similar-question svelte-afnr3e"><strong>Q:</strong> </div> <div class="similar-answer svelte-afnr3e"><strong>A:</strong> </div></div>'),ut=u('<!> <details class="svelte-afnr3e"><summary class="svelte-afnr3e"> </summary> <div class="collapsible-content svelte-afnr3e"><p style="color: #27ae60; font-size: 0.9rem; margin-bottom: 1rem; font-weight: 500;"> </p> <!></div></details>',1),_t=u(`<div class="warning-box svelte-afnr3e"><strong class="svelte-afnr3e">ℹ️ No Previous Answers Found</strong> <p class="svelte-afnr3e">This appears to be a new question. No similar questions exist in your knowledge base.</p> <p class="svelte-afnr3e"><strong class="svelte-afnr3e">Recommendation:</strong> Review the AI answer below. If it's not accurate, you may need to upload an RFP document or add this question to your Knowledge Base first.</p></div>`),ft=u('<label><input type="radio" class="svelte-afnr3e"/> <span class="svelte-afnr3e"> </span></label>'),pt=u("<option> </option>"),gt=u('<div class="save-form svelte-afnr3e"><div class="form-group"><label for="save-rfp">Save to RFP *</label> <select id="save-rfp"><option>-- Select RFP --</option><!></select></div> <div class="form-row svelte-afnr3e"><div class="form-group"><label for="save-section">Section</label> <input id="save-section" type="text" placeholder="e.g., Technical"/></div> <div class="form-group"><label for="save-qid">Question ID</label> <input id="save-qid" type="text" placeholder="e.g., Q1.1"/></div></div> <div class="form-row svelte-afnr3e"><div class="form-group"><label for="save-page-start">Page Start</label> <input id="save-page-start" type="number"/></div> <div class="form-group"><label for="save-page-end">Page End</label> <input id="save-page-end" type="number"/></div></div> <button class="btn btn-success"> </button></div>'),mt=u(`<div class="card"><h3 class="svelte-afnr3e">3. Results</h3> <div class="result-section svelte-afnr3e"><!></div> <div class="result-section svelte-afnr3e"><h4 class="svelte-afnr3e">πŸ€– AI-Generated Answer</h4> <div class="ai-answer svelte-afnr3e"> </div></div> <div class="result-section svelte-afnr3e"><details class="svelte-afnr3e"><summary class="svelte-afnr3e">πŸ” Gap Analysis (What's new or different)</summary> <div class="collapsible-content svelte-afnr3e"><div class="gap-analysis svelte-afnr3e"> </div></div></details></div> <div class="result-section refinement-section svelte-afnr3e"><h4 class="svelte-afnr3e">✏️ Add More Information to Refine Answer</h4> <p style="color: #7f8c8d; font-size: 0.9rem; margin-bottom: 1rem;">Add specific details or requirements you want included in the answer. AI will reprocess and incorporate this information.</p> <div class="form-group"><textarea placeholder="Example: Mention our ISO 27001 certification, 98% revenue growth, and Inc. 5000 recognition. Emphasize our 24/7 support capability." rows="4"></textarea></div> <button class="btn btn-primary"> </button></div> <div class="result-section svelte-afnr3e"><h4 class="svelte-afnr3e">πŸ“ Select Final Answer to Save</h4> <p style="color: #7f8c8d; font-size: 0.9rem; margin-bottom: 1rem;">Choose which answer to save to your knowledge base:</p> <div class="answer-selector-horizontal svelte-afnr3e"><label><input type="radio" class="svelte-afnr3e"/> <span class="svelte-afnr3e">Use AI Answer</span></label> <!></div> <div class="selected-answer-preview svelte-afnr3e"><strong>Selected Answer Preview:</strong> <div class="answer-preview svelte-afnr3e"> </div></div></div> <div class="result-section svelte-afnr3e"><div style="display: flex; gap: 1rem; margin-bottom: 1rem;"><button class="btn btn-primary">πŸ“‹ Add to Chosen Answers (for editing)</button> <button class="btn btn-success"> </button></div> <!></div></div>`),ht=u('<h2 class="svelte-afnr3e">Process New RFP</h2> <p>Upload a new RFP, ask questions, and get AI-generated answers based on the new content and your knowledge base.</p> <!> <!> <div class="card"><h3 class="svelte-afnr3e">1. Upload New RFP (Optional)</h3> <p style="color: #7f8c8d; font-size: 0.9rem;">Upload a new RFP to compare with previous answers, or skip to use only your knowledge base.</p> <div class="upload-section svelte-afnr3e"><input type="file" accept=".pdf" id="pdf-upload" class="svelte-afnr3e"/> <label for="pdf-upload"> </label> <!></div> <!></div> <div class="card"><h3 class="svelte-afnr3e">2. Ask a Question</h3> <p style="color: #7f8c8d; font-size: 0.9rem;">Ask any question. The system will search your knowledge base and use the uploaded RFP if available.</p> <div class="mode-toggle svelte-afnr3e"><button><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-afnr3e"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg> Single Question</button> <button><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-afnr3e"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg> Batch Mode</button></div> <div class="form-group"><label for="question"> </label> <textarea id="question"></textarea></div> <button class="btn btn-primary"> </button></div> <!> <!>',1);function Pt(ha,ba){Oa(ba,!0);const wa=[],ra=[];let Ee=g(Qe([])),C=g(null),P=g(""),v=g(null),se=g(Qe([])),N=g(!1),$=g(!1),Ae=g(!1),m=g(""),S=g(""),fe=g(null),T=g("ai"),pe=g(""),ya=g(!1),Ue=g(!1),Pe=g(!1),h=g(Qe({rfp_id:0,section:"",question_id:"",page_start:null,page_end:null})),na=g(Qe([])),ze=g(Qe([]));Ga(async()=>{const n=localStorage.getItem("chosenAnswers");n&&r(ze,JSON.parse(n),!0),await Oe(),await xa()}),Ja(()=>{localStorage.setItem("chosenAnswers",JSON.stringify(e(ze)))});async function Oe(){try{const n=await qe.listUploadedRFPs();r(Ee,n.data,!0)}catch(n){r(m,"Failed to load uploaded RFPs: "+(n.response?.data?.detail||n.message))}}async function xa(){try{const n=await ma.listRFPs();r(na,n.data,!0)}catch(n){console.error("Failed to load RFPs for saving",n)}}async function qa(n){const i=n.target;if(i.files&&i.files[0]){r(fe,i.files[0],!0),r(Ae,!0),r(m,""),r(S,"");try{const l=await qe.uploadRFP(e(fe));r(S,`RFP "${e(fe).name}" uploaded successfully!`),r(fe,null),await Oe(),r(C,l.data.id,!0)}catch(l){r(m,"Failed to upload RFP: "+(l.response?.data?.detail||l.message))}finally{r(Ae,!1),i.value=""}}}async function Fa(){if(!e(P)){r(m,"Please enter a question");return}let n=[];if(e(N)?/^\s*\d+\.\s+/m.test(e(P))?n=e(P).split(/(?=^\s*\d+\.\s+)/m).map(l=>l.trim().replace(/^\d+\.\s+/,"")).filter(l=>l.length>0):n=e(P).split(/\n\n+|\n/).map(l=>l.trim()).filter(l=>l.length>0):n=[e(P).trim()],n.length>1&&e(N)){r($,!0),r(m,""),r(se,[],!0);for(const i of n)try{const l=await qe.processQuestion({uploaded_rfp_id:e(C)||void 0,question_text:i.trim()});e(se).push({question:i.trim(),...l.data})}catch(l){e(se).push({question:i.trim(),error:l.response?.data?.detail||l.message})}r($,!1),r(v,null)}else{r($,!0),r(m,""),r(v,null),r(se,[],!0);try{const i=await qe.processQuestion({uploaded_rfp_id:e(C)||void 0,question_text:e(P)});r(v,i.data,!0),r(T,"ai"),r(pe,""),r(ya,!1)}catch(i){r(m,"Failed to process question: "+(i.response?.data?.detail||i.message))}finally{r($,!1)}}}async function Aa(){if(!e(pe).trim()||!e(v)){r(m,"Please enter refinement details");return}r(Ue,!0),r(m,"");try{const n=await qe.processQuestion({uploaded_rfp_id:e(C)||void 0,question_text:e(P),additional_context:e(pe)});r(v,n.data,!0),r(T,"ai"),r(S,"Answer refined successfully!"),setTimeout(()=>r(S,""),3e3)}catch(n){r(m,"Failed to refine answer: "+(n.response?.data?.detail||n.message))}finally{r(Ue,!1)}}function Ge(){if(!e(v))return"";if(e(T)==="ai")return e(v).ai_answer;{const n=parseInt(e(T).substring(1))-1;if(e(v).similar_questions&&e(v).similar_questions[n])return e(v).similar_questions[n].answer_text}return e(v).ai_answer}function Pa(){if(!e(v)||!e(P)){r(m,"No answer to add");return}const n={id:Date.now(),question:e(P),answer:Ge(),selectedType:e(T),addedAt:new Date().toISOString()};r(ze,[...e(ze),n],!0),r(S,"Answer added to Chosen Answers! Go to the Chosen Answers page to edit and finalize."),setTimeout(()=>r(S,""),3e3)}async function Ra(){if(!e(h).rfp_id||!e(v)){r(m,"Please select an RFP to save to");return}r($,!0),r(m,""),r(S,"");try{await ma.createQuestion({rfp_id:e(h).rfp_id,section:e(h).section,question_id:e(h).question_id,question_text:e(P),answer_text:Ge(),page_start:e(h).page_start,page_end:e(h).page_end}),r(S,"Answer saved to knowledge base successfully!"),r(Pe,!1),r(h,{rfp_id:0,section:"",question_id:"",page_start:null,page_end:null},!0)}catch(n){r(m,"Failed to save answer: "+(n.response?.data?.detail||n.message))}finally{r($,!1)}}async function ka(n){if(confirm("Are you sure you want to delete this uploaded RFP?")){r($,!0),r(m,""),r(S,"");try{await qe.deleteUploadedRFP(n),r(S,"Uploaded RFP deleted successfully!"),await Oe(),e(C)===n&&r(C,null)}catch(i){r(m,"Failed to delete uploaded RFP: "+(i.response?.data?.detail||i.message))}finally{r($,!1)}}}var ia=ht(),la=s(ce(ia),4);{var $a=n=>{var i=Ha(),l=t(i,!0);a(i),_(()=>o(l,e(m))),c(n,i)};y(la,n=>{e(m)&&n($a)})}var oa=s(la,2);{var Sa=n=>{var i=Wa(),l=t(i,!0);a(i),_(()=>o(l,e(S))),c(n,i)};y(oa,n=>{e(S)&&n(Sa)})}var Je=s(oa,2),Le=s(t(Je),4),Ve=t(Le);Ve.__change=qa;var Ce=s(Ve,2);let va;var Ia=t(Ce,!0);a(Ce);var Qa=s(Ce,2);{var Ua=n=>{var i=Xa(),l=t(i,!0);a(i),_(()=>o(l,e(fe).name)),c(n,i)};y(Qa,n=>{e(fe)&&n(Ua)})}a(Le);var za=s(Le,2);{var Ca=n=>{var i=et(),l=s(t(i),2),ge=t(l);ue(ge,17,()=>e(Ee),_e,(f,b)=>{var E=Ya();let O;var Z=t(E),G=t(Z);Y(G);var re,me=s(G,2),q=t(me),I=t(q,!0);a(q);var D=s(q,2),V=t(D);a(D),a(me),a(Z);var $e=s(Z,2);$e.__click=()=>ka(e(b).id),a(E),_(M=>{O=Fe(E,1,"uploaded-rfp-item svelte-afnr3e",null,O,{selected:e(C)===e(b).id}),re!==(re=e(b).id)&&(G.value=(G.__value=e(b).id)??""),o(I,e(b).rfp_name||e(b).filename),o(V,`Uploaded ${M??""}`)},[()=>new Date(e(b).uploaded_at).toLocaleDateString()]),sa(wa,[],G,()=>(e(b).id,e(C)),M=>r(C,M)),c(f,E)});var Re=s(ge,2);{var ke=f=>{var b=Za();b.__click=()=>r(C,null),c(f,b)};y(Re,f=>{e(C)&&f(ke)})}a(l),a(i),c(n,i)};y(za,n=>{e(Ee).length>0&&n(Ca)})}a(Je);var je=s(Je,2),He=s(t(je),4),We=t(He);let da;We.__click=()=>r(N,!1);var ca=s(We,2);let ua;ca.__click=()=>r(N,!0),a(He);var Xe=s(He,2),Ye=t(Xe),Ta=t(Ye,!0);a(Ye);var Te=s(Ye,2);ga(Te),a(Xe);var De=s(Xe,2);De.__click=Fa;var Da=t(De,!0);a(De),a(je);var _a=s(je,2);{var Ma=n=>{var i=ot(),l=t(i),ge=t(l);a(l);var Re=s(l,2);ue(Re,17,()=>e(se),_e,(ke,f,b)=>{var E=lt(),O=t(E),Z=t(O);a(O);var G=s(O,2);{var re=q=>{var I=at(),D=t(I);a(I),_(()=>o(D,`Error: ${e(f).error??""}`)),c(q,I)},me=q=>{var I=it(),D=ce(I),V=s(t(D),2),$e=t(V,!0);a(V),a(D);var M=s(D,2),he=s(t(M),2),ee=t(he),Se=t(ee);Y(Se),Ne(Se,"name",`batch-${b}`),ta(2),a(ee);var be=s(ee,2);{var Ze=J=>{var ae=pa(),ne=ce(ae);ue(ne,17,()=>e(f).similar_questions,_e,(j,we,H)=>{var ie=tt(),F=t(ie);Y(F),Ne(F,"name",`batch-${b}`),Va(F,`k${H+1}`);var ye=s(F,2),d=t(ye);a(ye),a(ie),_(p=>o(d,`Use K${H+1} (${p??""}%)`),[()=>(e(we).similarity_score*100).toFixed(0)]),c(j,ie)}),c(J,ae)};y(be,J=>{e(f).similar_questions&&J(Ze)})}a(he),a(M);var ea=s(M,2);{var Me=J=>{var ae=nt(),ne=t(ae),j=t(ne),we=t(j);a(j);var H=s(j,2);ue(H,21,()=>e(f).similar_questions,_e,(ie,F,ye)=>{var d=rt(),p=t(d),B=t(p);B.textContent=`K${ye+1}:`;var L=s(B),Q=s(L,2),K=s(Q);{var U=R=>{var W=st(),x=s(ce(W),2);_(()=>o(x,` ${e(F).page_start??""}-${(e(F).page_end||e(F).page_start)??""}`)),c(R,W)};y(K,R=>{e(F).page_start&&R(U)})}a(p);var z=s(p,2),A=t(z,!0);a(z),a(d),_(R=>{o(L,` ${e(F).rfp_title??""} | `),o(Q,` ${R??""}% `),o(A,e(F).answer_text)},[()=>(e(F).similarity_score*100).toFixed(0)]),c(ie,d)}),a(H),a(ne),a(ae),_(()=>o(we,`πŸ“š Previous Answers (${e(f).similar_questions.length??""} found)`)),c(J,ae)};y(ea,J=>{e(f).similar_questions&&e(f).similar_questions.length>0&&J(Me)})}_(()=>o($e,e(f).ai_answer)),c(q,I)};y(G,q=>{e(f).error?q(re):q(me,!1)})}a(E),_(()=>o(Z,`Q${b+1}: ${e(f).question??""}`)),c(ke,E)}),a(i),_(()=>o(ge,`3. Batch Results (${e(se).length??""} questions)`)),c(n,i)};y(_a,n=>{e(se).length>0&&n(Ma)})}var Ba=s(_a,2);{var Ka=n=>{var i=mt(),l=s(t(i),2),ge=t(l);{var Re=d=>{var p=ut(),B=ce(p);{var L=x=>{var w=vt(),X=s(t(w),2),te=t(X);a(X),ta(2),a(w),_(le=>o(te,`The best match is only ${le??""}%. This question might not exist in your knowledge base yet.`),[()=>(e(v).similar_questions[0].similarity_score*100).toFixed(0)]),c(x,w)};y(B,x=>{e(v).similar_questions[0].similarity_score<.5&&x(L)})}var Q=s(B,2),K=t(Q),U=t(K);a(K);var z=s(K,2),A=t(z),R=t(A);a(A);var W=s(A,2);ue(W,17,()=>e(v).similar_questions,_e,(x,w)=>{var X=ct(),te=t(X),le=s(t(te)),oe=s(le,2),aa=s(oe);{var k=Ie=>{var fa=dt(),Na=s(ce(fa),2);_(()=>o(Na,` ${e(w).page_start??""}-${(e(w).page_end||e(w).page_start)??""}`)),c(Ie,fa)};y(aa,Ie=>{e(w).page_start&&Ie(k)})}a(te);var ve=s(te,2),de=s(t(ve));a(ve);var Be=s(ve,2),Ke=s(t(Be));a(Be),a(X),_(Ie=>{o(le,` ${e(w).rfp_title??""} | `),o(oe,` ${Ie??""}% `),o(de,` ${e(w).question_text??""}`),o(Ke,` ${e(w).answer_text??""}`)},[()=>(e(w).similarity_score*100).toFixed(0)]),c(x,X)}),a(z),a(Q),_(()=>{Q.open=e(v).similar_questions[0].similarity_score>=.5,o(U,`πŸ“š Previous Answers from Database (${e(v).similar_questions.length??""} found)`),o(R,`βœ“ Found ${e(v).similar_questions.length??""} similar previous answer(s). AI synthesized them below.`)}),c(d,p)},ke=d=>{var p=_t();c(d,p)};y(ge,d=>{e(v).similar_questions&&e(v).similar_questions.length>0?d(Re):d(ke,!1)})}a(l);var f=s(l,2),b=s(t(f),2),E=t(b,!0);a(b),a(f);var O=s(f,2),Z=t(O),G=s(t(Z),2),re=t(G),me=t(re,!0);a(re),a(G),a(Z),a(O);var q=s(O,2),I=s(t(q),4),D=t(I);ga(D),a(I);var V=s(I,2);V.__click=Aa;var $e=t(V,!0);a(V),a(q);var M=s(q,2),he=s(t(M),4),ee=t(he);let Se;var be=t(ee);Y(be),be.value=be.__value="ai",ta(2),a(ee);var Ze=s(ee,2);{var ea=d=>{var p=pa(),B=ce(p);ue(B,17,()=>e(v).similar_questions,_e,(L,Q,K)=>{var U=ft();let z;var A=t(U);Y(A),A.value=A.__value=`k${K+1}`;var R=s(A,2),W=t(R);a(R),a(U),_(x=>{z=Fe(U,1,"answer-option-horizontal svelte-afnr3e",null,z,{selected:e(T)===`k${K+1}`}),o(W,`Use K${K+1} (${x??""}%)`)},[()=>(e(Q).similarity_score*100).toFixed(0)]),sa(ra,[],A,()=>e(T),x=>r(T,x)),c(L,U)}),c(d,p)};y(Ze,d=>{e(v).similar_questions&&e(v).similar_questions.length>0&&d(ea)})}a(he);var Me=s(he,2),J=s(t(Me),2),ae=t(J,!0);a(J),a(Me),a(M);var ne=s(M,2),j=t(ne),we=t(j);we.__click=Pa;var H=s(we,2);H.__click=()=>r(Pe,!e(Pe));var ie=t(H,!0);a(H),a(j);var F=s(j,2);{var ye=d=>{var p=gt(),B=t(p),L=s(t(B),2),Q=t(L);Q.value=Q.__value=0;var K=s(Q);ue(K,17,()=>e(na),_e,(k,ve)=>{var de=pt(),Be=t(de,!0);a(de);var Ke={};_(()=>{o(Be,e(ve).title),Ke!==(Ke=e(ve).id)&&(de.value=(de.__value=e(ve).id)??"")}),c(k,de)}),a(L),a(B);var U=s(B,2),z=t(U),A=s(t(z),2);Y(A),a(z);var R=s(z,2),W=s(t(R),2);Y(W),a(R),a(U);var x=s(U,2),w=t(x),X=s(t(w),2);Y(X),a(w);var te=s(w,2),le=s(t(te),2);Y(le),a(te),a(x);var oe=s(x,2);oe.__click=Ra;var aa=t(oe,!0);a(oe),a(p),_(()=>{oe.disabled=e($)||!e(h).rfp_id,o(aa,e($)?"Saving...":"Save to Knowledge Base")}),ja(L,()=>e(h).rfp_id,k=>e(h).rfp_id=k),xe(A,()=>e(h).section,k=>e(h).section=k),xe(W,()=>e(h).question_id,k=>e(h).question_id=k),xe(X,()=>e(h).page_start,k=>e(h).page_start=k),xe(le,()=>e(h).page_end,k=>e(h).page_end=k),c(d,p)};y(F,d=>{e(Pe)&&d(ye)})}a(ne),a(i),_((d,p)=>{o(E,e(v).ai_answer),o(me,e(v).gap_analysis),V.disabled=d,o($e,e(Ue)?"Refining...":"πŸ”„ Refine Answer with Additional Details"),Se=Fe(ee,1,"answer-option-horizontal svelte-afnr3e",null,Se,{selected:e(T)==="ai"}),o(ae,p),o(ie,e(Pe)?"Cancel":"πŸ’Ύ Save Directly to Knowledge Base")},[()=>e(Ue)||!e(pe).trim(),Ge]),xe(D,()=>e(pe),d=>r(pe,d)),sa(ra,[],be,()=>e(T),d=>r(T,d)),c(n,i)};y(Ba,n=>{e(v)&&n(Ka)})}_(()=>{Ve.disabled=e(Ae),va=Fe(Ce,1,"btn btn-primary svelte-afnr3e",null,va,{disabled:e(Ae)}),o(Ia,e(Ae)?"Uploading...":"Choose PDF File"),da=Fe(We,1,"toggle-btn svelte-afnr3e",null,da,{active:!e(N)}),ua=Fe(ca,1,"toggle-btn svelte-afnr3e",null,ua,{active:e(N)}),o(Ta,e(N)?"Multiple Questions (one per line)":"Question Text"),Ne(Te,"placeholder",e(N)?`Enter multiple questions (one per line):
2
+ 1. Question one?
3
+ 2. Question two?
4
+ 3. Question three?`:"Enter your question about the RFP..."),Ne(Te,"rows",e(N)?8:3),De.disabled=e($)||!e(P),o(Da,e($)?"Processing...":e(N)?"Process All Questions":"Process Question")}),xe(Te,()=>e(P),n=>r(P,n)),c(ha,ia),La()}Ea(["change","click"]);export{Pt as component};
frontend/build/_app/version.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":"1763958337763"}
frontend/build/index.html ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+
7
+ <link rel="modulepreload" href="/_app/immutable/entry/start.Cm-ihup3.js">
8
+ <link rel="modulepreload" href="/_app/immutable/chunks/BT92UpWj.js">
9
+ <link rel="modulepreload" href="/_app/immutable/chunks/CZHqxbHz.js">
10
+ <link rel="modulepreload" href="/_app/immutable/chunks/Bj0ilmBj.js">
11
+ <link rel="modulepreload" href="/_app/immutable/entry/app.awhfrDwS.js">
12
+ <link rel="modulepreload" href="/_app/immutable/chunks/ChCjnC3I.js">
13
+ <link rel="modulepreload" href="/_app/immutable/chunks/Dw-a1Jcz.js">
14
+ <link rel="modulepreload" href="/_app/immutable/chunks/masODVgD.js">
15
+ </head>
16
+ <body data-sveltekit-preload-data="hover">
17
+ <div style="display: contents">
18
+ <script>
19
+ {
20
+ __sveltekit_99419z = {
21
+ base: ""
22
+ };
23
+
24
+ const element = document.currentScript.parentElement;
25
+
26
+ Promise.all([
27
+ import("/_app/immutable/entry/start.Cm-ihup3.js"),
28
+ import("/_app/immutable/entry/app.awhfrDwS.js")
29
+ ]).then(([kit, app]) => {
30
+ kit.start(app, element);
31
+ });
32
+ }
33
+ </script>
34
+ </div>
35
+ </body>
36
+ </html>
frontend/build/logo.1svg ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width="200" height="60" viewBox="0 0 200 60" xmlns="http://www.w3.org/2000/svg">
2
+ <!-- Background -->
3
+ <rect width="200" height="60" fill="#000000"/>
4
+
5
+ <!-- SEDNA text -->
6
+ <text x="20" y="32" font-family="Arial, sans-serif" font-size="24" font-weight="bold" fill="#FFFFFF" letter-spacing="2">
7
+ SEDNA
8
+ </text>
9
+
10
+ <!-- Line under SEDNA -->
11
+ <line x1="20" y1="37" x2="140" y2="37" stroke="#FFFFFF" stroke-width="2"/>
12
+
13
+ <!-- consulting group text -->
14
+ <text x="20" y="52" font-family="Arial, sans-serif" font-size="11" fill="#FFFFFF" letter-spacing="1">
15
+ consulting group
16
+ </text>
17
+ </svg>
frontend/build/logo.png ADDED
frontend/build/robots.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # allow crawling everything by default
2
+ User-agent: *
3
+ Disallow: