NoobNovel Claude Sonnet 4.6 commited on
Commit
4e8e113
Β·
0 Parent(s):

HF Space deployment: Attention Visualizer (FastAPI + React)

Browse files

Docker-based space that builds the React frontend and serves
everything through FastAPI on port 7860.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.png filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.pyo
5
+ .env
6
+ venv/
7
+ .venv/
8
+ *.egg-info/
9
+
10
+ # Node
11
+ node_modules/
12
+ frontend/dist/
13
+ frontend/.vite/
14
+
15
+ # OS
16
+ .DS_Store
17
+ *.log
18
+
19
+ # Model weights (downloaded at runtime)
20
+ *.bin
21
+ *.safetensors
22
+ *.gguf
Dockerfile ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # Install Node.js 20
4
+ RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates gnupg && \
5
+ curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
6
+ apt-get install -y --no-install-recommends nodejs && \
7
+ rm -rf /var/lib/apt/lists/*
8
+
9
+ WORKDIR /app
10
+
11
+ # Install CPU-only PyTorch first (smaller image, no CUDA overhead)
12
+ RUN pip install --no-cache-dir torch==2.3.0+cpu --index-url https://download.pytorch.org/whl/cpu
13
+
14
+ # Install remaining Python deps
15
+ RUN pip install --no-cache-dir \
16
+ fastapi==0.111.0 \
17
+ "uvicorn[standard]==0.29.0" \
18
+ transformers==4.41.1 \
19
+ numpy==1.26.4 \
20
+ python-multipart==0.0.9
21
+
22
+ # Build React frontend
23
+ COPY frontend/package*.json ./frontend/
24
+ RUN cd frontend && npm ci
25
+
26
+ COPY frontend/ ./frontend/
27
+ RUN cd frontend && npm run build
28
+
29
+ # Copy backend source
30
+ COPY backend/ ./backend/
31
+
32
+ # HF Spaces requires a non-root user with uid 1000
33
+ RUN useradd -m -u 1000 user
34
+ USER user
35
+
36
+ ENV HOME=/home/user \
37
+ HF_HOME=/home/user/.cache/huggingface
38
+
39
+ EXPOSE 7860
40
+
41
+ WORKDIR /app/backend
42
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
README.md ADDED
@@ -0,0 +1,469 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Attention Visualizer
3
+ emoji: 🧠
4
+ colorFrom: purple
5
+ colorTo: blue
6
+ sdk: docker
7
+ app_port: 7860
8
+ pinned: false
9
+ ---
10
+
11
+ # Transformer Attention Visualizer
12
+
13
+ An interactive visualization tool for exploring how transformer-based language models (like BERT) understand sentences internally using **self-attention heatmaps**.
14
+
15
+ ![Tech Stack](https://img.shields.io/badge/stack-FastAPI%20%7C%20HuggingFace%20%7C%20React%20%7C%20Plotly-6366f1?style=flat-square)
16
+
17
+
18
+ ## Features
19
+
20
+ - **Multi-model support** β€” BERT Base, DistilBERT, GPT-2
21
+ - **Per-layer, per-head** attention heatmaps
22
+ - **Average all heads** mode
23
+ - **Click-to-pin tokens** β€” see what each token attends to
24
+ - **Dark glassmorphism UI** with smooth animations
25
+ - LRU model cache β€” loads once, reuses across requests
26
+
27
+ ## Quick Start
28
+
29
+ ```bash
30
+ # One-shot launcher (installs deps + starts both servers)
31
+ chmod +x start.sh && ./start.sh
32
+ ```
33
+
34
+ Then open **http://localhost:5173**
35
+
36
+ API docs available at **http://localhost:8000/docs**
37
+
38
+ ## Manual Setup
39
+
40
+ ### Backend
41
+
42
+ ```bash
43
+ cd backend
44
+ pip install -r requirements.txt
45
+ uvicorn main:app --reload --port 8000
46
+ ```
47
+
48
+ ### Frontend
49
+
50
+ ```bash
51
+ cd frontend
52
+ npm install
53
+ npm run dev
54
+ ```
55
+
56
+ ## Architecture
57
+
58
+ ```
59
+ frontend (React + Plotly) β†’ /api/attend (FastAPI) β†’ HuggingFace + PyTorch
60
+ port 5173 port 8000
61
+ ```
62
+
63
+ ## Models
64
+
65
+ | Model | Layers | Heads | Type | Size |
66
+ |-------|--------|-------|------|------|
67
+ | bert-base-uncased | 12 | 12 | Encoder | 440MB |
68
+ | distilbert-base-uncased | 6 | 12 | Encoder | 265MB |
69
+ | gpt2 | 12 | 12 | Decoder | 548MB |
70
+
71
+ Models are downloaded automatically from HuggingFace on first use and cached locally.
72
+
73
+ ## API
74
+
75
+ ```
76
+ GET /api/models β†’ list of available models
77
+ POST /api/attend β†’ { text, model_id } β†’ { tokens, attentions, n_layers, n_heads }
78
+ GET /api/health β†’ { status: "ok" }
79
+ ```
80
+
81
+
82
+ This project provides a full-stack implementation using:
83
+
84
+ - FastAPI backend
85
+ - Hugging Face Transformers
86
+ - PyTorch inference
87
+ - React frontend
88
+ - Plotly attention visualization
89
+
90
+ It allows users to inspect attention behavior across **tokens, heads, and layers** to understand how contextual meaning is built inside transformer architectures.
91
+
92
+ ---
93
+
94
+ # Project Goal
95
+
96
+ This tool helps users answer one key question:
97
+
98
+ > How does a transformer model understand language internally?
99
+
100
+ By visualizing attention matrices, we can observe:
101
+
102
+ - token relationships
103
+ - grammatical structure learning
104
+ - semantic reasoning
105
+ - sentence-level representation formation
106
+
107
+ in real time.
108
+
109
+ ---
110
+
111
+ # Example Visualization
112
+
113
+ Example sentence:
114
+
115
+ ```
116
+ The cat sat on the mat and watched the dog.
117
+ ```
118
+
119
+ Tokenized form:
120
+
121
+ ```
122
+ [CLS] the cat sat on the mat and watched the dog . [SEP]
123
+ ```
124
+
125
+ Each heatmap cell represents:
126
+
127
+ ```
128
+ How much one token attends to another token
129
+ ```
130
+
131
+ Rows:
132
+
133
+ ```
134
+ Query token (who is looking)
135
+ ```
136
+
137
+ Columns:
138
+
139
+ ```
140
+ Key token (who is being looked at)
141
+ ```
142
+
143
+ Color intensity represents attention strength.
144
+
145
+ ---
146
+
147
+ # Transformer Attention Mechanism
148
+
149
+ Self-attention is computed as:
150
+
151
+ ```
152
+ Attention(Q,K,V) = softmax(QK^T / sqrt(d_k)) V
153
+ ```
154
+
155
+ Meaning:
156
+
157
+ 1. Each token generates a query vector
158
+ 2. Each token generates a key vector
159
+ 3. Queries compare against keys
160
+ 4. Similarity scores become attention weights
161
+ 5. Output representation is updated
162
+
163
+ The heatmap visualizes these normalized attention weights.
164
+
165
+ ---
166
+
167
+ # Understanding the Heatmap
168
+
169
+ ## Color Interpretation
170
+
171
+ | Color | Meaning |
172
+ |------|---------|
173
+ Dark | Low attention |
174
+ Purple | Medium attention |
175
+ Yellow | Strong attention |
176
+
177
+ Example:
178
+
179
+ ```
180
+ watched -> dog
181
+ ```
182
+
183
+ Represents a strong verb-object relationship.
184
+
185
+ Example:
186
+
187
+ ```
188
+ the -> cat
189
+ ```
190
+
191
+ Represents article-noun binding.
192
+
193
+ ---
194
+
195
+ # Role of Special Tokens
196
+
197
+ ## [CLS]
198
+
199
+ Represents entire sentence summary.
200
+
201
+ Used for:
202
+
203
+ - classification
204
+ - semantic similarity
205
+ - retrieval embeddings
206
+ - sentiment detection
207
+
208
+ If many tokens attend to `[CLS]`, the model is building a global sentence representation.
209
+
210
+ ## [SEP]
211
+
212
+ Represents sentence boundary.
213
+
214
+ Often used for:
215
+
216
+ - segmentation
217
+ - sentence compression
218
+ - sequence framing
219
+
220
+ Late transformer layers frequently route information into `[SEP]`.
221
+
222
+ ---
223
+
224
+ # Layer-wise Attention Behavior
225
+
226
+ Transformer layers progressively refine meaning.
227
+
228
+ | Layer Range | Model Behavior |
229
+ |------------|----------------|
230
+ Layer 1-2 | Token identity stabilization |
231
+ Layer 3-6 | Grammar learning |
232
+ Layer 7-10 | Phrase relationships |
233
+ Layer 11-12 | Sentence-level semantics |
234
+
235
+ ---
236
+
237
+ # Early Layer Example (Layer 1)
238
+
239
+ Observed pattern:
240
+
241
+ ```
242
+ cat -> cat
243
+ sat -> sat
244
+ mat -> mat
245
+ ```
246
+
247
+ Meaning:
248
+
249
+ Tokens attend mostly to themselves.
250
+
251
+ Interpretation:
252
+
253
+ Early layers confirm token identity before contextual reasoning begins.
254
+
255
+ Example screenshot:
256
+
257
+ ```
258
+ Insert Layer 1 Heatmap Screenshot Here
259
+ ```
260
+
261
+ ---
262
+
263
+ # Boundary Detection Heads
264
+
265
+ Observed pattern:
266
+
267
+ ```
268
+ tokens -> [CLS]
269
+ tokens -> [SEP]
270
+ ```
271
+
272
+ Interpretation:
273
+
274
+ Model identifies sentence start and end anchors.
275
+
276
+ These heads help construct positional awareness.
277
+
278
+ Example screenshot:
279
+
280
+ ```
281
+ Insert Layer 1 Head 2 Screenshot Here
282
+ ```
283
+
284
+ ---
285
+
286
+ # Middle Layer Example (Layer 5)
287
+
288
+ Observed pattern:
289
+
290
+ ```
291
+ on -> sat
292
+ the -> mat
293
+ watched -> dog
294
+ ```
295
+
296
+ Interpretation:
297
+
298
+ Model captures grammatical relationships:
299
+
300
+ - preposition to verb
301
+ - article to noun
302
+ - verb to object
303
+
304
+ These are syntactic reasoning heads.
305
+
306
+ Example screenshot:
307
+
308
+ ```
309
+ Insert Layer 5 Screenshot Here
310
+ ```
311
+
312
+ ---
313
+
314
+ # Late Layer Example (Layer 11)
315
+
316
+ Observed pattern:
317
+
318
+ ```
319
+ all tokens -> [SEP]
320
+ ```
321
+
322
+ Interpretation:
323
+
324
+ Model compresses sentence meaning into a global representation token.
325
+
326
+ This stage prepares embeddings for:
327
+
328
+ - classification
329
+ - semantic similarity
330
+ - retrieval pipelines
331
+
332
+ Example screenshot:
333
+
334
+ ```
335
+ Insert Layer 11 Screenshot Here
336
+ ```
337
+
338
+ ---
339
+
340
+ # Multi-Head Attention Behavior
341
+
342
+ Each transformer layer contains multiple heads.
343
+
344
+ Each head learns a different linguistic feature.
345
+
346
+ Typical head specializations:
347
+
348
+ | Head Type | Role |
349
+ |----------|------|
350
+ Positional | token order |
351
+ Syntactic | grammar links |
352
+ Semantic | meaning similarity |
353
+ Boundary | CLS / SEP anchors |
354
+ Long-range | clause connections |
355
+
356
+ Switching heads reveals different reasoning strategies.
357
+
358
+ ---
359
+
360
+ # Example Attention Insights From This Tool
361
+
362
+ Sentence:
363
+
364
+ ```
365
+ The cat sat on the mat and watched the dog
366
+ ```
367
+
368
+ Model internally builds:
369
+
370
+ Layer 1:
371
+
372
+ ```
373
+ token identity
374
+ ```
375
+ ![Layer 1 Head 1 Attention](docs/images/layer01_Head_01.png)
376
+
377
+ Layer 2:
378
+
379
+ ```
380
+ article -> noun
381
+ ```
382
+ ![Layer 2 Head 2 Attention](docs/images/layer02_Head_02.png)
383
+
384
+ Layer 5:
385
+
386
+ ```
387
+ subject -> verb
388
+ ```
389
+ ![Layer 5 Head 5 Attention](docs/images/layer05_Head_06.png)
390
+
391
+ Layer 8:
392
+
393
+ ```
394
+ clause linking via "and"
395
+ ```
396
+ ![Layer 8 Head 8 Attention](docs/images/layer05_Head11.png)
397
+
398
+ Layer 11:
399
+
400
+ ```
401
+ sentence representation compression
402
+ ```
403
+
404
+ ![Layer 11 Head 11 Attention](docs/images/layer11_Head_01.png)
405
+
406
+ This reflects how transformer reasoning evolves step-by-step.
407
+
408
+ ---
409
+
410
+ # Why This Tool Is Useful
411
+
412
+ This visualizer helps researchers and engineers:
413
+
414
+ - inspect model reasoning
415
+ - debug hallucinations
416
+ - analyze token influence
417
+ - study linguistic structure learning
418
+ - understand embedding formation
419
+
420
+ Similar tools are used in transformer interpretability research.
421
+
422
+ ---
423
+
424
+ # Tech Stack
425
+
426
+ Backend:
427
+
428
+ - FastAPI
429
+ - PyTorch
430
+ - HuggingFace Transformers
431
+
432
+ Frontend:
433
+
434
+ - React
435
+ - Plotly
436
+
437
+ Visualization:
438
+
439
+ - attention matrices
440
+ - token relationships
441
+ - head-level reasoning
442
+
443
+ ---
444
+
445
+ # Future Improvements
446
+
447
+ Possible extensions:
448
+
449
+ - automatic head role labeling
450
+ - syntax vs semantic head detection
451
+ - cross-layer attention animation
452
+ - GPU acceleration support
453
+ - sentence embedding export
454
+
455
+ ---
456
+
457
+ # Summary
458
+
459
+ This project demonstrates how transformers progressively construct meaning from text.
460
+
461
+ From token identity to grammar to semantic understanding, attention heatmaps provide a transparent window into model reasoning.
462
+
463
+ This makes the system valuable for:
464
+
465
+ - AI engineers
466
+ - NLP researchers
467
+ - students learning transformers
468
+ - interpretability research
469
+
backend/attention.py ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ attention.py β€” HuggingFace inference engine.
3
+
4
+ Loads BERT / DistilBERT / GPT-2 with output_attentions=True and returns
5
+ the tokenized text plus all attention tensors in JSON-serialisable form.
6
+
7
+ Model instances are cached in a module-level LRU dict so that repeated
8
+ requests for the same model do not pay the load penalty each time.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ import logging
14
+ from functools import lru_cache
15
+ from typing import Any
16
+
17
+ import numpy as np
18
+ import torch
19
+ from transformers import (
20
+ AutoTokenizer,
21
+ AutoModel,
22
+ AutoModelForCausalLM,
23
+ BertTokenizer,
24
+ GPT2Tokenizer,
25
+ )
26
+
27
+ from models import MODEL_IDS
28
+
29
+ logger = logging.getLogger(__name__)
30
+
31
+ # ── Module-level model cache ──────────────────────────────────────────────────
32
+ _MODEL_CACHE: dict[str, tuple[Any, Any]] = {}
33
+
34
+ DECODER_MODELS = {"gpt2"}
35
+
36
+
37
+ def _get_model_and_tokenizer(model_id: str):
38
+ """Return (tokenizer, model), loading and caching on first call."""
39
+ if model_id in _MODEL_CACHE:
40
+ return _MODEL_CACHE[model_id]
41
+
42
+ if model_id not in MODEL_IDS:
43
+ raise ValueError(f"Unknown model: {model_id!r}")
44
+
45
+ logger.info("Loading model %s …", model_id)
46
+
47
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
48
+
49
+ if model_id in DECODER_MODELS:
50
+ model = AutoModelForCausalLM.from_pretrained(
51
+ model_id, output_attentions=True
52
+ )
53
+ else:
54
+ model = AutoModel.from_pretrained(model_id, output_attentions=True)
55
+
56
+ model.eval()
57
+ _MODEL_CACHE[model_id] = (tokenizer, model)
58
+ logger.info("Model %s loaded and cached.", model_id)
59
+ return tokenizer, model
60
+
61
+
62
+ def get_attention(
63
+ text: str,
64
+ model_id: str,
65
+ max_length: int = 128,
66
+ ) -> dict:
67
+ """
68
+ Run a forward pass and return attention data.
69
+
70
+ Returns
71
+ -------
72
+ {
73
+ "tokens": list[str], # human-readable sub-word tokens
74
+ "attentions": list[list[list[list[float]]]],
75
+ # shape: [n_layers][n_heads][seq_len][seq_len]
76
+ "n_layers": int,
77
+ "n_heads": int,
78
+ "model_type": "encoder" | "decoder",
79
+ }
80
+ """
81
+ tokenizer, model = _get_model_and_tokenizer(model_id)
82
+
83
+ # Tokenise ─────────────────────────────────────────────────────────────
84
+ encoding = tokenizer(
85
+ text,
86
+ return_tensors="pt",
87
+ max_length=max_length,
88
+ truncation=True,
89
+ )
90
+
91
+ token_ids = encoding["input_ids"][0].tolist()
92
+ tokens = tokenizer.convert_ids_to_tokens(token_ids)
93
+
94
+ # Clean up GPT-2's Δ  prefix for readability
95
+ tokens = [t.replace("Ġ", " ").replace("Ċ", "\n") for t in tokens]
96
+
97
+ # Forward pass ─────────────────────────────────────────────────────────
98
+ with torch.no_grad():
99
+ outputs = model(**encoding, output_attentions=True)
100
+
101
+ # outputs.attentions: tuple of (batch, heads, seq, seq) tensors per layer
102
+ attentions_raw = outputs.attentions # tuple[Tensor]
103
+
104
+ n_layers = len(attentions_raw)
105
+ n_heads = attentions_raw[0].shape[1]
106
+
107
+ # Convert to nested Python lists (JSON-serialisable)
108
+ attentions_list: list[list[list[list[float]]]] = []
109
+ for layer_tensor in attentions_raw:
110
+ # layer_tensor: (1, n_heads, seq, seq) β†’ (n_heads, seq, seq)
111
+ layer_np = layer_tensor.squeeze(0).cpu().numpy() # (H, S, S)
112
+ layer_list = layer_np.tolist()
113
+ attentions_list.append(layer_list)
114
+
115
+ model_type = "decoder" if model_id in DECODER_MODELS else "encoder"
116
+
117
+ return {
118
+ "tokens": tokens,
119
+ "attentions": attentions_list,
120
+ "n_layers": n_layers,
121
+ "n_heads": n_heads,
122
+ "model_type": model_type,
123
+ }
backend/main.py ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ main.py β€” FastAPI application for the Attention Visualization Tool.
3
+
4
+ Routes
5
+ ------
6
+ GET /api/models β†’ list of available models + metadata
7
+ POST /api/attend β†’ run inference, return tokens + attention weights
8
+ GET / β†’ serve React frontend (after build)
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ import logging
14
+ import os
15
+ from pathlib import Path
16
+
17
+ from fastapi import FastAPI, HTTPException
18
+ from fastapi.middleware.cors import CORSMiddleware
19
+ from fastapi.staticfiles import StaticFiles
20
+ from fastapi.responses import FileResponse
21
+ from pydantic import BaseModel, Field
22
+
23
+ from models import MODEL_REGISTRY
24
+ from attention import get_attention
25
+
26
+ # ── Logging ───────────────────────────────────────────────────────────────────
27
+ logging.basicConfig(
28
+ level=logging.INFO,
29
+ format="%(asctime)s [%(levelname)s] %(name)s β€” %(message)s",
30
+ )
31
+ logger = logging.getLogger(__name__)
32
+
33
+ # ── App ───────────────────────────────────────────────────────────────────────
34
+ app = FastAPI(
35
+ title="Attention Visualizer API",
36
+ description="Extracts and serves transformer attention weights for visualization.",
37
+ version="1.0.0",
38
+ )
39
+
40
+ # Allow any localhost port (Vite may pick 5173, 5174, 5175, …)
41
+ app.add_middleware(
42
+ CORSMiddleware,
43
+ allow_origins=["*"], # tighten this for production
44
+ allow_methods=["*"],
45
+ allow_headers=["*"],
46
+ )
47
+
48
+
49
+ # ── Schemas ───────────────────────────────────────────────────────────────────
50
+ class AttendRequest(BaseModel):
51
+ text: str = Field(..., min_length=1, max_length=512, example="The cat sat on the mat.")
52
+ model_id: str = Field(..., example="bert-base-uncased")
53
+
54
+
55
+ # ── Routes ────────────────────────────────────────────────────────────────────
56
+ @app.get("/api/health")
57
+ def health():
58
+ return {"status": "ok"}
59
+
60
+
61
+ @app.get("/api/models")
62
+ def list_models():
63
+ """Return the list of available models with metadata."""
64
+ return MODEL_REGISTRY
65
+
66
+
67
+ @app.post("/api/attend")
68
+ def attend(req: AttendRequest):
69
+ """
70
+ Run a forward pass through the requested model and return
71
+ tokenized text plus all attention weight matrices.
72
+ """
73
+ logger.info("attend β†’ model=%s text=%r", req.model_id, req.text[:80])
74
+ try:
75
+ result = get_attention(req.text, req.model_id)
76
+ except ValueError as exc:
77
+ raise HTTPException(status_code=400, detail=str(exc))
78
+ except Exception as exc:
79
+ logger.exception("Inference error")
80
+ raise HTTPException(status_code=500, detail=f"Inference error: {exc}")
81
+ return result
82
+
83
+
84
+ # ── Serve built React frontend ────────────────────────────────────────────────
85
+ FRONTEND_DIST = Path(__file__).parent.parent / "frontend" / "dist"
86
+
87
+ if FRONTEND_DIST.exists():
88
+ app.mount(
89
+ "/assets",
90
+ StaticFiles(directory=str(FRONTEND_DIST / "assets")),
91
+ name="assets",
92
+ )
93
+
94
+ @app.get("/", include_in_schema=False)
95
+ @app.get("/{full_path:path}", include_in_schema=False)
96
+ def serve_spa(full_path: str = ""):
97
+ index = FRONTEND_DIST / "index.html"
98
+ if index.exists():
99
+ return FileResponse(str(index))
100
+ return {"detail": "Frontend not built. Run: cd frontend && npm run build"}
backend/models.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Model registry β€” defines which HuggingFace models are available
3
+ and their metadata surfaced to the frontend.
4
+ """
5
+
6
+ MODEL_REGISTRY = [
7
+ {
8
+ "id": "bert-base-uncased",
9
+ "label": "BERT Base (Uncased)",
10
+ "description": "12 layers Β· 12 heads Β· bidirectional",
11
+ "n_layers": 12,
12
+ "n_heads": 12,
13
+ "type": "encoder",
14
+ "size_mb": 440,
15
+ },
16
+ {
17
+ "id": "distilbert-base-uncased",
18
+ "label": "DistilBERT Base (Uncased)",
19
+ "description": "6 layers Β· 12 heads Β· lightweight BERT distillation",
20
+ "n_layers": 6,
21
+ "n_heads": 12,
22
+ "type": "encoder",
23
+ "size_mb": 265,
24
+ },
25
+ {
26
+ "id": "gpt2",
27
+ "label": "GPT-2 (Small)",
28
+ "description": "12 layers Β· 12 heads Β· causal / autoregressive",
29
+ "n_layers": 12,
30
+ "n_heads": 12,
31
+ "type": "decoder",
32
+ "size_mb": 548,
33
+ },
34
+ ]
35
+
36
+ MODEL_IDS = {m["id"] for m in MODEL_REGISTRY}
backend/requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ fastapi==0.111.0
2
+ uvicorn[standard]==0.29.0
3
+ transformers==4.41.1
4
+ torch==2.3.0
5
+ numpy==1.26.4
6
+ python-multipart==0.0.9
frontend/eslint.config.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import js from '@eslint/js'
2
+ import globals from 'globals'
3
+ import reactHooks from 'eslint-plugin-react-hooks'
4
+ import reactRefresh from 'eslint-plugin-react-refresh'
5
+ import { defineConfig, globalIgnores } from 'eslint/config'
6
+
7
+ export default defineConfig([
8
+ globalIgnores(['dist']),
9
+ {
10
+ files: ['**/*.{js,jsx}'],
11
+ extends: [
12
+ js.configs.recommended,
13
+ reactHooks.configs.flat.recommended,
14
+ reactRefresh.configs.vite,
15
+ ],
16
+ languageOptions: {
17
+ globals: globals.browser,
18
+ parserOptions: { ecmaFeatures: { jsx: true } },
19
+ },
20
+ },
21
+ ])
frontend/index.html ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🧠</text></svg>" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Attention Visualizer β€” Transformer Attention Weights</title>
8
+ <meta name="description" content="Interactively visualize BERT and GPT-2 transformer attention weights per layer and head." />
9
+ <meta name="theme-color" content="#080b14" />
10
+ </head>
11
+ <body>
12
+ <div id="root"></div>
13
+ <script type="module" src="/src/main.jsx"></script>
14
+ </body>
15
+ </html>
frontend/package-lock.json ADDED
@@ -0,0 +1,2428 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "frontend",
3
+ "version": "0.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "frontend",
9
+ "version": "0.0.0",
10
+ "dependencies": {
11
+ "react": "^19.2.5",
12
+ "react-dom": "^19.2.5"
13
+ },
14
+ "devDependencies": {
15
+ "@eslint/js": "^10.0.1",
16
+ "@types/react": "^19.2.14",
17
+ "@types/react-dom": "^19.2.3",
18
+ "@vitejs/plugin-react": "^6.0.1",
19
+ "eslint": "^10.2.1",
20
+ "eslint-plugin-react-hooks": "^7.1.1",
21
+ "eslint-plugin-react-refresh": "^0.5.2",
22
+ "globals": "^17.5.0",
23
+ "vite": "^8.0.10"
24
+ }
25
+ },
26
+ "node_modules/@babel/code-frame": {
27
+ "version": "7.29.0",
28
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",
29
+ "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==",
30
+ "dev": true,
31
+ "license": "MIT",
32
+ "dependencies": {
33
+ "@babel/helper-validator-identifier": "^7.28.5",
34
+ "js-tokens": "^4.0.0",
35
+ "picocolors": "^1.1.1"
36
+ },
37
+ "engines": {
38
+ "node": ">=6.9.0"
39
+ }
40
+ },
41
+ "node_modules/@babel/compat-data": {
42
+ "version": "7.29.0",
43
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz",
44
+ "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==",
45
+ "dev": true,
46
+ "license": "MIT",
47
+ "engines": {
48
+ "node": ">=6.9.0"
49
+ }
50
+ },
51
+ "node_modules/@babel/core": {
52
+ "version": "7.29.0",
53
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz",
54
+ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
55
+ "dev": true,
56
+ "license": "MIT",
57
+ "dependencies": {
58
+ "@babel/code-frame": "^7.29.0",
59
+ "@babel/generator": "^7.29.0",
60
+ "@babel/helper-compilation-targets": "^7.28.6",
61
+ "@babel/helper-module-transforms": "^7.28.6",
62
+ "@babel/helpers": "^7.28.6",
63
+ "@babel/parser": "^7.29.0",
64
+ "@babel/template": "^7.28.6",
65
+ "@babel/traverse": "^7.29.0",
66
+ "@babel/types": "^7.29.0",
67
+ "@jridgewell/remapping": "^2.3.5",
68
+ "convert-source-map": "^2.0.0",
69
+ "debug": "^4.1.0",
70
+ "gensync": "^1.0.0-beta.2",
71
+ "json5": "^2.2.3",
72
+ "semver": "^6.3.1"
73
+ },
74
+ "engines": {
75
+ "node": ">=6.9.0"
76
+ },
77
+ "funding": {
78
+ "type": "opencollective",
79
+ "url": "https://opencollective.com/babel"
80
+ }
81
+ },
82
+ "node_modules/@babel/generator": {
83
+ "version": "7.29.1",
84
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz",
85
+ "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==",
86
+ "dev": true,
87
+ "license": "MIT",
88
+ "dependencies": {
89
+ "@babel/parser": "^7.29.0",
90
+ "@babel/types": "^7.29.0",
91
+ "@jridgewell/gen-mapping": "^0.3.12",
92
+ "@jridgewell/trace-mapping": "^0.3.28",
93
+ "jsesc": "^3.0.2"
94
+ },
95
+ "engines": {
96
+ "node": ">=6.9.0"
97
+ }
98
+ },
99
+ "node_modules/@babel/helper-compilation-targets": {
100
+ "version": "7.28.6",
101
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz",
102
+ "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==",
103
+ "dev": true,
104
+ "license": "MIT",
105
+ "dependencies": {
106
+ "@babel/compat-data": "^7.28.6",
107
+ "@babel/helper-validator-option": "^7.27.1",
108
+ "browserslist": "^4.24.0",
109
+ "lru-cache": "^5.1.1",
110
+ "semver": "^6.3.1"
111
+ },
112
+ "engines": {
113
+ "node": ">=6.9.0"
114
+ }
115
+ },
116
+ "node_modules/@babel/helper-globals": {
117
+ "version": "7.28.0",
118
+ "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
119
+ "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
120
+ "dev": true,
121
+ "license": "MIT",
122
+ "engines": {
123
+ "node": ">=6.9.0"
124
+ }
125
+ },
126
+ "node_modules/@babel/helper-module-imports": {
127
+ "version": "7.28.6",
128
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz",
129
+ "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==",
130
+ "dev": true,
131
+ "license": "MIT",
132
+ "dependencies": {
133
+ "@babel/traverse": "^7.28.6",
134
+ "@babel/types": "^7.28.6"
135
+ },
136
+ "engines": {
137
+ "node": ">=6.9.0"
138
+ }
139
+ },
140
+ "node_modules/@babel/helper-module-transforms": {
141
+ "version": "7.28.6",
142
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz",
143
+ "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==",
144
+ "dev": true,
145
+ "license": "MIT",
146
+ "dependencies": {
147
+ "@babel/helper-module-imports": "^7.28.6",
148
+ "@babel/helper-validator-identifier": "^7.28.5",
149
+ "@babel/traverse": "^7.28.6"
150
+ },
151
+ "engines": {
152
+ "node": ">=6.9.0"
153
+ },
154
+ "peerDependencies": {
155
+ "@babel/core": "^7.0.0"
156
+ }
157
+ },
158
+ "node_modules/@babel/helper-string-parser": {
159
+ "version": "7.27.1",
160
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
161
+ "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
162
+ "dev": true,
163
+ "license": "MIT",
164
+ "engines": {
165
+ "node": ">=6.9.0"
166
+ }
167
+ },
168
+ "node_modules/@babel/helper-validator-identifier": {
169
+ "version": "7.28.5",
170
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
171
+ "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
172
+ "dev": true,
173
+ "license": "MIT",
174
+ "engines": {
175
+ "node": ">=6.9.0"
176
+ }
177
+ },
178
+ "node_modules/@babel/helper-validator-option": {
179
+ "version": "7.27.1",
180
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
181
+ "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
182
+ "dev": true,
183
+ "license": "MIT",
184
+ "engines": {
185
+ "node": ">=6.9.0"
186
+ }
187
+ },
188
+ "node_modules/@babel/helpers": {
189
+ "version": "7.29.2",
190
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz",
191
+ "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==",
192
+ "dev": true,
193
+ "license": "MIT",
194
+ "dependencies": {
195
+ "@babel/template": "^7.28.6",
196
+ "@babel/types": "^7.29.0"
197
+ },
198
+ "engines": {
199
+ "node": ">=6.9.0"
200
+ }
201
+ },
202
+ "node_modules/@babel/parser": {
203
+ "version": "7.29.2",
204
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz",
205
+ "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==",
206
+ "dev": true,
207
+ "license": "MIT",
208
+ "dependencies": {
209
+ "@babel/types": "^7.29.0"
210
+ },
211
+ "bin": {
212
+ "parser": "bin/babel-parser.js"
213
+ },
214
+ "engines": {
215
+ "node": ">=6.0.0"
216
+ }
217
+ },
218
+ "node_modules/@babel/template": {
219
+ "version": "7.28.6",
220
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz",
221
+ "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==",
222
+ "dev": true,
223
+ "license": "MIT",
224
+ "dependencies": {
225
+ "@babel/code-frame": "^7.28.6",
226
+ "@babel/parser": "^7.28.6",
227
+ "@babel/types": "^7.28.6"
228
+ },
229
+ "engines": {
230
+ "node": ">=6.9.0"
231
+ }
232
+ },
233
+ "node_modules/@babel/traverse": {
234
+ "version": "7.29.0",
235
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz",
236
+ "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==",
237
+ "dev": true,
238
+ "license": "MIT",
239
+ "dependencies": {
240
+ "@babel/code-frame": "^7.29.0",
241
+ "@babel/generator": "^7.29.0",
242
+ "@babel/helper-globals": "^7.28.0",
243
+ "@babel/parser": "^7.29.0",
244
+ "@babel/template": "^7.28.6",
245
+ "@babel/types": "^7.29.0",
246
+ "debug": "^4.3.1"
247
+ },
248
+ "engines": {
249
+ "node": ">=6.9.0"
250
+ }
251
+ },
252
+ "node_modules/@babel/types": {
253
+ "version": "7.29.0",
254
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz",
255
+ "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==",
256
+ "dev": true,
257
+ "license": "MIT",
258
+ "dependencies": {
259
+ "@babel/helper-string-parser": "^7.27.1",
260
+ "@babel/helper-validator-identifier": "^7.28.5"
261
+ },
262
+ "engines": {
263
+ "node": ">=6.9.0"
264
+ }
265
+ },
266
+ "node_modules/@emnapi/core": {
267
+ "version": "1.10.0",
268
+ "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz",
269
+ "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==",
270
+ "dev": true,
271
+ "license": "MIT",
272
+ "optional": true,
273
+ "dependencies": {
274
+ "@emnapi/wasi-threads": "1.2.1",
275
+ "tslib": "^2.4.0"
276
+ }
277
+ },
278
+ "node_modules/@emnapi/runtime": {
279
+ "version": "1.10.0",
280
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz",
281
+ "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==",
282
+ "dev": true,
283
+ "license": "MIT",
284
+ "optional": true,
285
+ "dependencies": {
286
+ "tslib": "^2.4.0"
287
+ }
288
+ },
289
+ "node_modules/@emnapi/wasi-threads": {
290
+ "version": "1.2.1",
291
+ "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz",
292
+ "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==",
293
+ "dev": true,
294
+ "license": "MIT",
295
+ "optional": true,
296
+ "dependencies": {
297
+ "tslib": "^2.4.0"
298
+ }
299
+ },
300
+ "node_modules/@eslint-community/eslint-utils": {
301
+ "version": "4.9.1",
302
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz",
303
+ "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==",
304
+ "dev": true,
305
+ "license": "MIT",
306
+ "dependencies": {
307
+ "eslint-visitor-keys": "^3.4.3"
308
+ },
309
+ "engines": {
310
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
311
+ },
312
+ "funding": {
313
+ "url": "https://opencollective.com/eslint"
314
+ },
315
+ "peerDependencies": {
316
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
317
+ }
318
+ },
319
+ "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {
320
+ "version": "3.4.3",
321
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
322
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
323
+ "dev": true,
324
+ "license": "Apache-2.0",
325
+ "engines": {
326
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
327
+ },
328
+ "funding": {
329
+ "url": "https://opencollective.com/eslint"
330
+ }
331
+ },
332
+ "node_modules/@eslint-community/regexpp": {
333
+ "version": "4.12.2",
334
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz",
335
+ "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==",
336
+ "dev": true,
337
+ "license": "MIT",
338
+ "engines": {
339
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
340
+ }
341
+ },
342
+ "node_modules/@eslint/config-array": {
343
+ "version": "0.23.5",
344
+ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz",
345
+ "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==",
346
+ "dev": true,
347
+ "license": "Apache-2.0",
348
+ "dependencies": {
349
+ "@eslint/object-schema": "^3.0.5",
350
+ "debug": "^4.3.1",
351
+ "minimatch": "^10.2.4"
352
+ },
353
+ "engines": {
354
+ "node": "^20.19.0 || ^22.13.0 || >=24"
355
+ }
356
+ },
357
+ "node_modules/@eslint/config-helpers": {
358
+ "version": "0.5.5",
359
+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.5.tgz",
360
+ "integrity": "sha512-eIJYKTCECbP/nsKaaruF6LW967mtbQbsw4JTtSVkUQc9MneSkbrgPJAbKl9nWr0ZeowV8BfsarBmPpBzGelA2w==",
361
+ "dev": true,
362
+ "license": "Apache-2.0",
363
+ "dependencies": {
364
+ "@eslint/core": "^1.2.1"
365
+ },
366
+ "engines": {
367
+ "node": "^20.19.0 || ^22.13.0 || >=24"
368
+ }
369
+ },
370
+ "node_modules/@eslint/core": {
371
+ "version": "1.2.1",
372
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz",
373
+ "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==",
374
+ "dev": true,
375
+ "license": "Apache-2.0",
376
+ "dependencies": {
377
+ "@types/json-schema": "^7.0.15"
378
+ },
379
+ "engines": {
380
+ "node": "^20.19.0 || ^22.13.0 || >=24"
381
+ }
382
+ },
383
+ "node_modules/@eslint/js": {
384
+ "version": "10.0.1",
385
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz",
386
+ "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==",
387
+ "dev": true,
388
+ "license": "MIT",
389
+ "engines": {
390
+ "node": "^20.19.0 || ^22.13.0 || >=24"
391
+ },
392
+ "funding": {
393
+ "url": "https://eslint.org/donate"
394
+ },
395
+ "peerDependencies": {
396
+ "eslint": "^10.0.0"
397
+ },
398
+ "peerDependenciesMeta": {
399
+ "eslint": {
400
+ "optional": true
401
+ }
402
+ }
403
+ },
404
+ "node_modules/@eslint/object-schema": {
405
+ "version": "3.0.5",
406
+ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz",
407
+ "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==",
408
+ "dev": true,
409
+ "license": "Apache-2.0",
410
+ "engines": {
411
+ "node": "^20.19.0 || ^22.13.0 || >=24"
412
+ }
413
+ },
414
+ "node_modules/@eslint/plugin-kit": {
415
+ "version": "0.7.1",
416
+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.1.tgz",
417
+ "integrity": "sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ==",
418
+ "dev": true,
419
+ "license": "Apache-2.0",
420
+ "dependencies": {
421
+ "@eslint/core": "^1.2.1",
422
+ "levn": "^0.4.1"
423
+ },
424
+ "engines": {
425
+ "node": "^20.19.0 || ^22.13.0 || >=24"
426
+ }
427
+ },
428
+ "node_modules/@humanfs/core": {
429
+ "version": "0.19.2",
430
+ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz",
431
+ "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==",
432
+ "dev": true,
433
+ "license": "Apache-2.0",
434
+ "dependencies": {
435
+ "@humanfs/types": "^0.15.0"
436
+ },
437
+ "engines": {
438
+ "node": ">=18.18.0"
439
+ }
440
+ },
441
+ "node_modules/@humanfs/node": {
442
+ "version": "0.16.8",
443
+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz",
444
+ "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==",
445
+ "dev": true,
446
+ "license": "Apache-2.0",
447
+ "dependencies": {
448
+ "@humanfs/core": "^0.19.2",
449
+ "@humanfs/types": "^0.15.0",
450
+ "@humanwhocodes/retry": "^0.4.0"
451
+ },
452
+ "engines": {
453
+ "node": ">=18.18.0"
454
+ }
455
+ },
456
+ "node_modules/@humanfs/types": {
457
+ "version": "0.15.0",
458
+ "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz",
459
+ "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==",
460
+ "dev": true,
461
+ "license": "Apache-2.0",
462
+ "engines": {
463
+ "node": ">=18.18.0"
464
+ }
465
+ },
466
+ "node_modules/@humanwhocodes/module-importer": {
467
+ "version": "1.0.1",
468
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
469
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
470
+ "dev": true,
471
+ "license": "Apache-2.0",
472
+ "engines": {
473
+ "node": ">=12.22"
474
+ },
475
+ "funding": {
476
+ "type": "github",
477
+ "url": "https://github.com/sponsors/nzakas"
478
+ }
479
+ },
480
+ "node_modules/@humanwhocodes/retry": {
481
+ "version": "0.4.3",
482
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
483
+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",
484
+ "dev": true,
485
+ "license": "Apache-2.0",
486
+ "engines": {
487
+ "node": ">=18.18"
488
+ },
489
+ "funding": {
490
+ "type": "github",
491
+ "url": "https://github.com/sponsors/nzakas"
492
+ }
493
+ },
494
+ "node_modules/@jridgewell/gen-mapping": {
495
+ "version": "0.3.13",
496
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
497
+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
498
+ "dev": true,
499
+ "license": "MIT",
500
+ "dependencies": {
501
+ "@jridgewell/sourcemap-codec": "^1.5.0",
502
+ "@jridgewell/trace-mapping": "^0.3.24"
503
+ }
504
+ },
505
+ "node_modules/@jridgewell/remapping": {
506
+ "version": "2.3.5",
507
+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
508
+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
509
+ "dev": true,
510
+ "license": "MIT",
511
+ "dependencies": {
512
+ "@jridgewell/gen-mapping": "^0.3.5",
513
+ "@jridgewell/trace-mapping": "^0.3.24"
514
+ }
515
+ },
516
+ "node_modules/@jridgewell/resolve-uri": {
517
+ "version": "3.1.2",
518
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
519
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
520
+ "dev": true,
521
+ "license": "MIT",
522
+ "engines": {
523
+ "node": ">=6.0.0"
524
+ }
525
+ },
526
+ "node_modules/@jridgewell/sourcemap-codec": {
527
+ "version": "1.5.5",
528
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
529
+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
530
+ "dev": true,
531
+ "license": "MIT"
532
+ },
533
+ "node_modules/@jridgewell/trace-mapping": {
534
+ "version": "0.3.31",
535
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
536
+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
537
+ "dev": true,
538
+ "license": "MIT",
539
+ "dependencies": {
540
+ "@jridgewell/resolve-uri": "^3.1.0",
541
+ "@jridgewell/sourcemap-codec": "^1.4.14"
542
+ }
543
+ },
544
+ "node_modules/@napi-rs/wasm-runtime": {
545
+ "version": "1.1.4",
546
+ "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz",
547
+ "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==",
548
+ "dev": true,
549
+ "license": "MIT",
550
+ "optional": true,
551
+ "dependencies": {
552
+ "@tybys/wasm-util": "^0.10.1"
553
+ },
554
+ "funding": {
555
+ "type": "github",
556
+ "url": "https://github.com/sponsors/Brooooooklyn"
557
+ },
558
+ "peerDependencies": {
559
+ "@emnapi/core": "^1.7.1",
560
+ "@emnapi/runtime": "^1.7.1"
561
+ }
562
+ },
563
+ "node_modules/@oxc-project/types": {
564
+ "version": "0.127.0",
565
+ "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.127.0.tgz",
566
+ "integrity": "sha512-aIYXQBo4lCbO4z0R3FHeucQHpF46l2LbMdxRvqvuRuW2OxdnSkcng5B8+K12spgLDj93rtN3+J2Vac/TIO+ciQ==",
567
+ "dev": true,
568
+ "license": "MIT",
569
+ "funding": {
570
+ "url": "https://github.com/sponsors/Boshen"
571
+ }
572
+ },
573
+ "node_modules/@rolldown/binding-android-arm64": {
574
+ "version": "1.0.0-rc.17",
575
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.17.tgz",
576
+ "integrity": "sha512-s70pVGhw4zqGeFnXWvAzJDlvxhlRollagdCCKRgOsgUOH3N1l0LIxf83AtGzmb5SiVM4Hjl5HyarMRfdfj3DaQ==",
577
+ "cpu": [
578
+ "arm64"
579
+ ],
580
+ "dev": true,
581
+ "license": "MIT",
582
+ "optional": true,
583
+ "os": [
584
+ "android"
585
+ ],
586
+ "engines": {
587
+ "node": "^20.19.0 || >=22.12.0"
588
+ }
589
+ },
590
+ "node_modules/@rolldown/binding-darwin-arm64": {
591
+ "version": "1.0.0-rc.17",
592
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.17.tgz",
593
+ "integrity": "sha512-4ksWc9n0mhlZpZ9PMZgTGjeOPRu8MB1Z3Tz0Mo02eWfWCHMW1zN82Qz/pL/rC+yQa+8ZnutMF0JjJe7PjwasYw==",
594
+ "cpu": [
595
+ "arm64"
596
+ ],
597
+ "dev": true,
598
+ "license": "MIT",
599
+ "optional": true,
600
+ "os": [
601
+ "darwin"
602
+ ],
603
+ "engines": {
604
+ "node": "^20.19.0 || >=22.12.0"
605
+ }
606
+ },
607
+ "node_modules/@rolldown/binding-darwin-x64": {
608
+ "version": "1.0.0-rc.17",
609
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.17.tgz",
610
+ "integrity": "sha512-SUSDOI6WwUVNcWxd02QEBjLdY1VPHvlEkw6T/8nYG322iYWCTxRb1vzk4E+mWWYehTp7ERibq54LSJGjmouOsw==",
611
+ "cpu": [
612
+ "x64"
613
+ ],
614
+ "dev": true,
615
+ "license": "MIT",
616
+ "optional": true,
617
+ "os": [
618
+ "darwin"
619
+ ],
620
+ "engines": {
621
+ "node": "^20.19.0 || >=22.12.0"
622
+ }
623
+ },
624
+ "node_modules/@rolldown/binding-freebsd-x64": {
625
+ "version": "1.0.0-rc.17",
626
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.17.tgz",
627
+ "integrity": "sha512-hwnz3nw9dbJ05EDO/PvcjaaewqqDy7Y1rn1UO81l8iIK1GjenME75dl16ajbvSSMfv66WXSRCYKIqfgq2KCfxw==",
628
+ "cpu": [
629
+ "x64"
630
+ ],
631
+ "dev": true,
632
+ "license": "MIT",
633
+ "optional": true,
634
+ "os": [
635
+ "freebsd"
636
+ ],
637
+ "engines": {
638
+ "node": "^20.19.0 || >=22.12.0"
639
+ }
640
+ },
641
+ "node_modules/@rolldown/binding-linux-arm-gnueabihf": {
642
+ "version": "1.0.0-rc.17",
643
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.17.tgz",
644
+ "integrity": "sha512-IS+W7epTcwANmFSQFrS1SivEXHtl1JtuQA9wlxrZTcNi6mx+FDOYrakGevvvTwgj2JvWiK8B29/qD9BELZPyXQ==",
645
+ "cpu": [
646
+ "arm"
647
+ ],
648
+ "dev": true,
649
+ "license": "MIT",
650
+ "optional": true,
651
+ "os": [
652
+ "linux"
653
+ ],
654
+ "engines": {
655
+ "node": "^20.19.0 || >=22.12.0"
656
+ }
657
+ },
658
+ "node_modules/@rolldown/binding-linux-arm64-gnu": {
659
+ "version": "1.0.0-rc.17",
660
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.17.tgz",
661
+ "integrity": "sha512-e6usGaHKW5BMNZOymS1UcEYGowQMWcgZ71Z17Sl/h2+ZziNJ1a9n3Zvcz6LdRyIW5572wBCTH/Z+bKuZouGk9Q==",
662
+ "cpu": [
663
+ "arm64"
664
+ ],
665
+ "dev": true,
666
+ "license": "MIT",
667
+ "optional": true,
668
+ "os": [
669
+ "linux"
670
+ ],
671
+ "engines": {
672
+ "node": "^20.19.0 || >=22.12.0"
673
+ }
674
+ },
675
+ "node_modules/@rolldown/binding-linux-arm64-musl": {
676
+ "version": "1.0.0-rc.17",
677
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.17.tgz",
678
+ "integrity": "sha512-b/CgbwAJpmrRLp02RPfhbudf5tZnN9nsPWK82znefso832etkem8H7FSZwxrOI9djcdTP7U6YfNhbRnh7djErg==",
679
+ "cpu": [
680
+ "arm64"
681
+ ],
682
+ "dev": true,
683
+ "license": "MIT",
684
+ "optional": true,
685
+ "os": [
686
+ "linux"
687
+ ],
688
+ "engines": {
689
+ "node": "^20.19.0 || >=22.12.0"
690
+ }
691
+ },
692
+ "node_modules/@rolldown/binding-linux-ppc64-gnu": {
693
+ "version": "1.0.0-rc.17",
694
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.17.tgz",
695
+ "integrity": "sha512-4EII1iNGRUN5WwGbF/kOh/EIkoDN9HsupgLQoXfY+D1oyJm7/F4t5PYU5n8SWZgG0FEwakyM8pGgwcBYruGTlA==",
696
+ "cpu": [
697
+ "ppc64"
698
+ ],
699
+ "dev": true,
700
+ "license": "MIT",
701
+ "optional": true,
702
+ "os": [
703
+ "linux"
704
+ ],
705
+ "engines": {
706
+ "node": "^20.19.0 || >=22.12.0"
707
+ }
708
+ },
709
+ "node_modules/@rolldown/binding-linux-s390x-gnu": {
710
+ "version": "1.0.0-rc.17",
711
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.17.tgz",
712
+ "integrity": "sha512-AH8oq3XqQo4IibpVXvPeLDI5pzkpYn0WiZAfT05kFzoJ6tQNzwRdDYQ45M8I/gslbodRZwW8uxLhbSBbkv96rA==",
713
+ "cpu": [
714
+ "s390x"
715
+ ],
716
+ "dev": true,
717
+ "license": "MIT",
718
+ "optional": true,
719
+ "os": [
720
+ "linux"
721
+ ],
722
+ "engines": {
723
+ "node": "^20.19.0 || >=22.12.0"
724
+ }
725
+ },
726
+ "node_modules/@rolldown/binding-linux-x64-gnu": {
727
+ "version": "1.0.0-rc.17",
728
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.17.tgz",
729
+ "integrity": "sha512-cLnjV3xfo7KslbU41Z7z8BH/E1y5mzUYzAqih1d1MDaIGZRCMqTijqLv76/P7fyHuvUcfGsIpqCdddbxLLK9rA==",
730
+ "cpu": [
731
+ "x64"
732
+ ],
733
+ "dev": true,
734
+ "license": "MIT",
735
+ "optional": true,
736
+ "os": [
737
+ "linux"
738
+ ],
739
+ "engines": {
740
+ "node": "^20.19.0 || >=22.12.0"
741
+ }
742
+ },
743
+ "node_modules/@rolldown/binding-linux-x64-musl": {
744
+ "version": "1.0.0-rc.17",
745
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.17.tgz",
746
+ "integrity": "sha512-0phclDw1spsL7dUB37sIARuis2tAgomCJXAHZlpt8PXZ4Ba0dRP1e+66lsRqrfhISeN9bEGNjQs+T/Fbd7oYGw==",
747
+ "cpu": [
748
+ "x64"
749
+ ],
750
+ "dev": true,
751
+ "license": "MIT",
752
+ "optional": true,
753
+ "os": [
754
+ "linux"
755
+ ],
756
+ "engines": {
757
+ "node": "^20.19.0 || >=22.12.0"
758
+ }
759
+ },
760
+ "node_modules/@rolldown/binding-openharmony-arm64": {
761
+ "version": "1.0.0-rc.17",
762
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.17.tgz",
763
+ "integrity": "sha512-0ag/hEgXOwgw4t8QyQvUCxvEg+V0KBcA6YuOx9g0r02MprutRF5dyljgm3EmR02O292UX7UeS6HzWHAl6KgyhA==",
764
+ "cpu": [
765
+ "arm64"
766
+ ],
767
+ "dev": true,
768
+ "license": "MIT",
769
+ "optional": true,
770
+ "os": [
771
+ "openharmony"
772
+ ],
773
+ "engines": {
774
+ "node": "^20.19.0 || >=22.12.0"
775
+ }
776
+ },
777
+ "node_modules/@rolldown/binding-wasm32-wasi": {
778
+ "version": "1.0.0-rc.17",
779
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.17.tgz",
780
+ "integrity": "sha512-LEXei6vo0E5wTGwpkJ4KoT3OZJRnglwldt5ziLzOlc6qqb55z4tWNq2A+PFqCJuvWWdP53CVhG1Z9NtToDPJrA==",
781
+ "cpu": [
782
+ "wasm32"
783
+ ],
784
+ "dev": true,
785
+ "license": "MIT",
786
+ "optional": true,
787
+ "dependencies": {
788
+ "@emnapi/core": "1.10.0",
789
+ "@emnapi/runtime": "1.10.0",
790
+ "@napi-rs/wasm-runtime": "^1.1.4"
791
+ },
792
+ "engines": {
793
+ "node": "^20.19.0 || >=22.12.0"
794
+ }
795
+ },
796
+ "node_modules/@rolldown/binding-win32-arm64-msvc": {
797
+ "version": "1.0.0-rc.17",
798
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.17.tgz",
799
+ "integrity": "sha512-gUmyzBl3SPMa6hrqFUth9sVfcLBlYsbMzBx5PlexMroZStgzGqlZ26pYG89rBb45Mnia+oil6YAIFeEWGWhoZA==",
800
+ "cpu": [
801
+ "arm64"
802
+ ],
803
+ "dev": true,
804
+ "license": "MIT",
805
+ "optional": true,
806
+ "os": [
807
+ "win32"
808
+ ],
809
+ "engines": {
810
+ "node": "^20.19.0 || >=22.12.0"
811
+ }
812
+ },
813
+ "node_modules/@rolldown/binding-win32-x64-msvc": {
814
+ "version": "1.0.0-rc.17",
815
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.17.tgz",
816
+ "integrity": "sha512-3hkiolcUAvPB9FLb3UZdfjVVNWherN1f/skkGWJP/fgSQhYUZpSIRr0/I8ZK9TkF3F7kxvJAk0+IcKvPHk9qQg==",
817
+ "cpu": [
818
+ "x64"
819
+ ],
820
+ "dev": true,
821
+ "license": "MIT",
822
+ "optional": true,
823
+ "os": [
824
+ "win32"
825
+ ],
826
+ "engines": {
827
+ "node": "^20.19.0 || >=22.12.0"
828
+ }
829
+ },
830
+ "node_modules/@rolldown/pluginutils": {
831
+ "version": "1.0.0-rc.7",
832
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.7.tgz",
833
+ "integrity": "sha512-qujRfC8sFVInYSPPMLQByRh7zhwkGFS4+tyMQ83srV1qrxL4g8E2tyxVVyxd0+8QeBM1mIk9KbWxkegRr76XzA==",
834
+ "dev": true,
835
+ "license": "MIT"
836
+ },
837
+ "node_modules/@tybys/wasm-util": {
838
+ "version": "0.10.1",
839
+ "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz",
840
+ "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==",
841
+ "dev": true,
842
+ "license": "MIT",
843
+ "optional": true,
844
+ "dependencies": {
845
+ "tslib": "^2.4.0"
846
+ }
847
+ },
848
+ "node_modules/@types/esrecurse": {
849
+ "version": "4.3.1",
850
+ "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz",
851
+ "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==",
852
+ "dev": true,
853
+ "license": "MIT"
854
+ },
855
+ "node_modules/@types/estree": {
856
+ "version": "1.0.8",
857
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
858
+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
859
+ "dev": true,
860
+ "license": "MIT"
861
+ },
862
+ "node_modules/@types/json-schema": {
863
+ "version": "7.0.15",
864
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
865
+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
866
+ "dev": true,
867
+ "license": "MIT"
868
+ },
869
+ "node_modules/@types/react": {
870
+ "version": "19.2.14",
871
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz",
872
+ "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==",
873
+ "dev": true,
874
+ "license": "MIT",
875
+ "dependencies": {
876
+ "csstype": "^3.2.2"
877
+ }
878
+ },
879
+ "node_modules/@types/react-dom": {
880
+ "version": "19.2.3",
881
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz",
882
+ "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==",
883
+ "dev": true,
884
+ "license": "MIT",
885
+ "peerDependencies": {
886
+ "@types/react": "^19.2.0"
887
+ }
888
+ },
889
+ "node_modules/@vitejs/plugin-react": {
890
+ "version": "6.0.1",
891
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.0.1.tgz",
892
+ "integrity": "sha512-l9X/E3cDb+xY3SWzlG1MOGt2usfEHGMNIaegaUGFsLkb3RCn/k8/TOXBcab+OndDI4TBtktT8/9BwwW8Vi9KUQ==",
893
+ "dev": true,
894
+ "license": "MIT",
895
+ "dependencies": {
896
+ "@rolldown/pluginutils": "1.0.0-rc.7"
897
+ },
898
+ "engines": {
899
+ "node": "^20.19.0 || >=22.12.0"
900
+ },
901
+ "peerDependencies": {
902
+ "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0",
903
+ "babel-plugin-react-compiler": "^1.0.0",
904
+ "vite": "^8.0.0"
905
+ },
906
+ "peerDependenciesMeta": {
907
+ "@rolldown/plugin-babel": {
908
+ "optional": true
909
+ },
910
+ "babel-plugin-react-compiler": {
911
+ "optional": true
912
+ }
913
+ }
914
+ },
915
+ "node_modules/acorn": {
916
+ "version": "8.16.0",
917
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
918
+ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
919
+ "dev": true,
920
+ "license": "MIT",
921
+ "bin": {
922
+ "acorn": "bin/acorn"
923
+ },
924
+ "engines": {
925
+ "node": ">=0.4.0"
926
+ }
927
+ },
928
+ "node_modules/acorn-jsx": {
929
+ "version": "5.3.2",
930
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
931
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
932
+ "dev": true,
933
+ "license": "MIT",
934
+ "peerDependencies": {
935
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
936
+ }
937
+ },
938
+ "node_modules/ajv": {
939
+ "version": "6.15.0",
940
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz",
941
+ "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==",
942
+ "dev": true,
943
+ "license": "MIT",
944
+ "dependencies": {
945
+ "fast-deep-equal": "^3.1.1",
946
+ "fast-json-stable-stringify": "^2.0.0",
947
+ "json-schema-traverse": "^0.4.1",
948
+ "uri-js": "^4.2.2"
949
+ },
950
+ "funding": {
951
+ "type": "github",
952
+ "url": "https://github.com/sponsors/epoberezkin"
953
+ }
954
+ },
955
+ "node_modules/balanced-match": {
956
+ "version": "4.0.4",
957
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
958
+ "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
959
+ "dev": true,
960
+ "license": "MIT",
961
+ "engines": {
962
+ "node": "18 || 20 || >=22"
963
+ }
964
+ },
965
+ "node_modules/baseline-browser-mapping": {
966
+ "version": "2.10.24",
967
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.24.tgz",
968
+ "integrity": "sha512-I2NkZOOrj2XuguvWCK6OVh9GavsNjZjK908Rq3mIBK25+GD8vPX5w2WdxVqnQ7xx3SrZJiCiZFu+/Oz50oSYSA==",
969
+ "dev": true,
970
+ "license": "Apache-2.0",
971
+ "bin": {
972
+ "baseline-browser-mapping": "dist/cli.cjs"
973
+ },
974
+ "engines": {
975
+ "node": ">=6.0.0"
976
+ }
977
+ },
978
+ "node_modules/brace-expansion": {
979
+ "version": "5.0.5",
980
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz",
981
+ "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==",
982
+ "dev": true,
983
+ "license": "MIT",
984
+ "dependencies": {
985
+ "balanced-match": "^4.0.2"
986
+ },
987
+ "engines": {
988
+ "node": "18 || 20 || >=22"
989
+ }
990
+ },
991
+ "node_modules/browserslist": {
992
+ "version": "4.28.2",
993
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",
994
+ "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==",
995
+ "dev": true,
996
+ "funding": [
997
+ {
998
+ "type": "opencollective",
999
+ "url": "https://opencollective.com/browserslist"
1000
+ },
1001
+ {
1002
+ "type": "tidelift",
1003
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
1004
+ },
1005
+ {
1006
+ "type": "github",
1007
+ "url": "https://github.com/sponsors/ai"
1008
+ }
1009
+ ],
1010
+ "license": "MIT",
1011
+ "dependencies": {
1012
+ "baseline-browser-mapping": "^2.10.12",
1013
+ "caniuse-lite": "^1.0.30001782",
1014
+ "electron-to-chromium": "^1.5.328",
1015
+ "node-releases": "^2.0.36",
1016
+ "update-browserslist-db": "^1.2.3"
1017
+ },
1018
+ "bin": {
1019
+ "browserslist": "cli.js"
1020
+ },
1021
+ "engines": {
1022
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
1023
+ }
1024
+ },
1025
+ "node_modules/caniuse-lite": {
1026
+ "version": "1.0.30001791",
1027
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001791.tgz",
1028
+ "integrity": "sha512-yk0l/YSrOnFZk3UROpDLQD9+kC1l4meK/wed583AXrzoarMGJcbRi2Q4RaUYbKxYAsZ8sWmaSa/DsLmdBeI1vQ==",
1029
+ "dev": true,
1030
+ "funding": [
1031
+ {
1032
+ "type": "opencollective",
1033
+ "url": "https://opencollective.com/browserslist"
1034
+ },
1035
+ {
1036
+ "type": "tidelift",
1037
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
1038
+ },
1039
+ {
1040
+ "type": "github",
1041
+ "url": "https://github.com/sponsors/ai"
1042
+ }
1043
+ ],
1044
+ "license": "CC-BY-4.0"
1045
+ },
1046
+ "node_modules/convert-source-map": {
1047
+ "version": "2.0.0",
1048
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
1049
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
1050
+ "dev": true,
1051
+ "license": "MIT"
1052
+ },
1053
+ "node_modules/cross-spawn": {
1054
+ "version": "7.0.6",
1055
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
1056
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
1057
+ "dev": true,
1058
+ "license": "MIT",
1059
+ "dependencies": {
1060
+ "path-key": "^3.1.0",
1061
+ "shebang-command": "^2.0.0",
1062
+ "which": "^2.0.1"
1063
+ },
1064
+ "engines": {
1065
+ "node": ">= 8"
1066
+ }
1067
+ },
1068
+ "node_modules/csstype": {
1069
+ "version": "3.2.3",
1070
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
1071
+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
1072
+ "dev": true,
1073
+ "license": "MIT"
1074
+ },
1075
+ "node_modules/debug": {
1076
+ "version": "4.4.3",
1077
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
1078
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
1079
+ "dev": true,
1080
+ "license": "MIT",
1081
+ "dependencies": {
1082
+ "ms": "^2.1.3"
1083
+ },
1084
+ "engines": {
1085
+ "node": ">=6.0"
1086
+ },
1087
+ "peerDependenciesMeta": {
1088
+ "supports-color": {
1089
+ "optional": true
1090
+ }
1091
+ }
1092
+ },
1093
+ "node_modules/deep-is": {
1094
+ "version": "0.1.4",
1095
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
1096
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
1097
+ "dev": true,
1098
+ "license": "MIT"
1099
+ },
1100
+ "node_modules/detect-libc": {
1101
+ "version": "2.1.2",
1102
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
1103
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
1104
+ "dev": true,
1105
+ "license": "Apache-2.0",
1106
+ "engines": {
1107
+ "node": ">=8"
1108
+ }
1109
+ },
1110
+ "node_modules/electron-to-chromium": {
1111
+ "version": "1.5.344",
1112
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.344.tgz",
1113
+ "integrity": "sha512-4MxfbmNDm+KPh066EZy+eUnkcDPcZ35wNmOWzFuh/ijvHsve6kbLTLURy88uCNK5FbpN+yk2nQY6BYh1GEt+wg==",
1114
+ "dev": true,
1115
+ "license": "ISC"
1116
+ },
1117
+ "node_modules/escalade": {
1118
+ "version": "3.2.0",
1119
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
1120
+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
1121
+ "dev": true,
1122
+ "license": "MIT",
1123
+ "engines": {
1124
+ "node": ">=6"
1125
+ }
1126
+ },
1127
+ "node_modules/escape-string-regexp": {
1128
+ "version": "4.0.0",
1129
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
1130
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
1131
+ "dev": true,
1132
+ "license": "MIT",
1133
+ "engines": {
1134
+ "node": ">=10"
1135
+ },
1136
+ "funding": {
1137
+ "url": "https://github.com/sponsors/sindresorhus"
1138
+ }
1139
+ },
1140
+ "node_modules/eslint": {
1141
+ "version": "10.2.1",
1142
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.2.1.tgz",
1143
+ "integrity": "sha512-wiyGaKsDgqXvF40P8mDwiUp/KQjE1FdrIEJsM8PZ3XCiniTMXS3OHWWUe5FI5agoCnr8x4xPrTDZuxsBlNHl+Q==",
1144
+ "dev": true,
1145
+ "license": "MIT",
1146
+ "dependencies": {
1147
+ "@eslint-community/eslint-utils": "^4.8.0",
1148
+ "@eslint-community/regexpp": "^4.12.2",
1149
+ "@eslint/config-array": "^0.23.5",
1150
+ "@eslint/config-helpers": "^0.5.5",
1151
+ "@eslint/core": "^1.2.1",
1152
+ "@eslint/plugin-kit": "^0.7.1",
1153
+ "@humanfs/node": "^0.16.6",
1154
+ "@humanwhocodes/module-importer": "^1.0.1",
1155
+ "@humanwhocodes/retry": "^0.4.2",
1156
+ "@types/estree": "^1.0.6",
1157
+ "ajv": "^6.14.0",
1158
+ "cross-spawn": "^7.0.6",
1159
+ "debug": "^4.3.2",
1160
+ "escape-string-regexp": "^4.0.0",
1161
+ "eslint-scope": "^9.1.2",
1162
+ "eslint-visitor-keys": "^5.0.1",
1163
+ "espree": "^11.2.0",
1164
+ "esquery": "^1.7.0",
1165
+ "esutils": "^2.0.2",
1166
+ "fast-deep-equal": "^3.1.3",
1167
+ "file-entry-cache": "^8.0.0",
1168
+ "find-up": "^5.0.0",
1169
+ "glob-parent": "^6.0.2",
1170
+ "ignore": "^5.2.0",
1171
+ "imurmurhash": "^0.1.4",
1172
+ "is-glob": "^4.0.0",
1173
+ "json-stable-stringify-without-jsonify": "^1.0.1",
1174
+ "minimatch": "^10.2.4",
1175
+ "natural-compare": "^1.4.0",
1176
+ "optionator": "^0.9.3"
1177
+ },
1178
+ "bin": {
1179
+ "eslint": "bin/eslint.js"
1180
+ },
1181
+ "engines": {
1182
+ "node": "^20.19.0 || ^22.13.0 || >=24"
1183
+ },
1184
+ "funding": {
1185
+ "url": "https://eslint.org/donate"
1186
+ },
1187
+ "peerDependencies": {
1188
+ "jiti": "*"
1189
+ },
1190
+ "peerDependenciesMeta": {
1191
+ "jiti": {
1192
+ "optional": true
1193
+ }
1194
+ }
1195
+ },
1196
+ "node_modules/eslint-plugin-react-hooks": {
1197
+ "version": "7.1.1",
1198
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-7.1.1.tgz",
1199
+ "integrity": "sha512-f2I7Gw6JbvCexzIInuSbZpfdQ44D7iqdWX01FKLvrPgqxoE7oMj8clOfto8U6vYiz4yd5oKu39rRSVOe1zRu0g==",
1200
+ "dev": true,
1201
+ "license": "MIT",
1202
+ "dependencies": {
1203
+ "@babel/core": "^7.24.4",
1204
+ "@babel/parser": "^7.24.4",
1205
+ "hermes-parser": "^0.25.1",
1206
+ "zod": "^3.25.0 || ^4.0.0",
1207
+ "zod-validation-error": "^3.5.0 || ^4.0.0"
1208
+ },
1209
+ "engines": {
1210
+ "node": ">=18"
1211
+ },
1212
+ "peerDependencies": {
1213
+ "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0"
1214
+ }
1215
+ },
1216
+ "node_modules/eslint-plugin-react-refresh": {
1217
+ "version": "0.5.2",
1218
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.5.2.tgz",
1219
+ "integrity": "sha512-hmgTH57GfzoTFjVN0yBwTggnsVUF2tcqi7RJZHqi9lIezSs4eFyAMktA68YD4r5kNw1mxyY4dmkyoFDb3FIqrA==",
1220
+ "dev": true,
1221
+ "license": "MIT",
1222
+ "peerDependencies": {
1223
+ "eslint": "^9 || ^10"
1224
+ }
1225
+ },
1226
+ "node_modules/eslint-scope": {
1227
+ "version": "9.1.2",
1228
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz",
1229
+ "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==",
1230
+ "dev": true,
1231
+ "license": "BSD-2-Clause",
1232
+ "dependencies": {
1233
+ "@types/esrecurse": "^4.3.1",
1234
+ "@types/estree": "^1.0.8",
1235
+ "esrecurse": "^4.3.0",
1236
+ "estraverse": "^5.2.0"
1237
+ },
1238
+ "engines": {
1239
+ "node": "^20.19.0 || ^22.13.0 || >=24"
1240
+ },
1241
+ "funding": {
1242
+ "url": "https://opencollective.com/eslint"
1243
+ }
1244
+ },
1245
+ "node_modules/eslint-visitor-keys": {
1246
+ "version": "5.0.1",
1247
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
1248
+ "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==",
1249
+ "dev": true,
1250
+ "license": "Apache-2.0",
1251
+ "engines": {
1252
+ "node": "^20.19.0 || ^22.13.0 || >=24"
1253
+ },
1254
+ "funding": {
1255
+ "url": "https://opencollective.com/eslint"
1256
+ }
1257
+ },
1258
+ "node_modules/espree": {
1259
+ "version": "11.2.0",
1260
+ "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz",
1261
+ "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==",
1262
+ "dev": true,
1263
+ "license": "BSD-2-Clause",
1264
+ "dependencies": {
1265
+ "acorn": "^8.16.0",
1266
+ "acorn-jsx": "^5.3.2",
1267
+ "eslint-visitor-keys": "^5.0.1"
1268
+ },
1269
+ "engines": {
1270
+ "node": "^20.19.0 || ^22.13.0 || >=24"
1271
+ },
1272
+ "funding": {
1273
+ "url": "https://opencollective.com/eslint"
1274
+ }
1275
+ },
1276
+ "node_modules/esquery": {
1277
+ "version": "1.7.0",
1278
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz",
1279
+ "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==",
1280
+ "dev": true,
1281
+ "license": "BSD-3-Clause",
1282
+ "dependencies": {
1283
+ "estraverse": "^5.1.0"
1284
+ },
1285
+ "engines": {
1286
+ "node": ">=0.10"
1287
+ }
1288
+ },
1289
+ "node_modules/esrecurse": {
1290
+ "version": "4.3.0",
1291
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
1292
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
1293
+ "dev": true,
1294
+ "license": "BSD-2-Clause",
1295
+ "dependencies": {
1296
+ "estraverse": "^5.2.0"
1297
+ },
1298
+ "engines": {
1299
+ "node": ">=4.0"
1300
+ }
1301
+ },
1302
+ "node_modules/estraverse": {
1303
+ "version": "5.3.0",
1304
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
1305
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
1306
+ "dev": true,
1307
+ "license": "BSD-2-Clause",
1308
+ "engines": {
1309
+ "node": ">=4.0"
1310
+ }
1311
+ },
1312
+ "node_modules/esutils": {
1313
+ "version": "2.0.3",
1314
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
1315
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
1316
+ "dev": true,
1317
+ "license": "BSD-2-Clause",
1318
+ "engines": {
1319
+ "node": ">=0.10.0"
1320
+ }
1321
+ },
1322
+ "node_modules/fast-deep-equal": {
1323
+ "version": "3.1.3",
1324
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
1325
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
1326
+ "dev": true,
1327
+ "license": "MIT"
1328
+ },
1329
+ "node_modules/fast-json-stable-stringify": {
1330
+ "version": "2.1.0",
1331
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
1332
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
1333
+ "dev": true,
1334
+ "license": "MIT"
1335
+ },
1336
+ "node_modules/fast-levenshtein": {
1337
+ "version": "2.0.6",
1338
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
1339
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
1340
+ "dev": true,
1341
+ "license": "MIT"
1342
+ },
1343
+ "node_modules/fdir": {
1344
+ "version": "6.5.0",
1345
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
1346
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
1347
+ "dev": true,
1348
+ "license": "MIT",
1349
+ "engines": {
1350
+ "node": ">=12.0.0"
1351
+ },
1352
+ "peerDependencies": {
1353
+ "picomatch": "^3 || ^4"
1354
+ },
1355
+ "peerDependenciesMeta": {
1356
+ "picomatch": {
1357
+ "optional": true
1358
+ }
1359
+ }
1360
+ },
1361
+ "node_modules/file-entry-cache": {
1362
+ "version": "8.0.0",
1363
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
1364
+ "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",
1365
+ "dev": true,
1366
+ "license": "MIT",
1367
+ "dependencies": {
1368
+ "flat-cache": "^4.0.0"
1369
+ },
1370
+ "engines": {
1371
+ "node": ">=16.0.0"
1372
+ }
1373
+ },
1374
+ "node_modules/find-up": {
1375
+ "version": "5.0.0",
1376
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
1377
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
1378
+ "dev": true,
1379
+ "license": "MIT",
1380
+ "dependencies": {
1381
+ "locate-path": "^6.0.0",
1382
+ "path-exists": "^4.0.0"
1383
+ },
1384
+ "engines": {
1385
+ "node": ">=10"
1386
+ },
1387
+ "funding": {
1388
+ "url": "https://github.com/sponsors/sindresorhus"
1389
+ }
1390
+ },
1391
+ "node_modules/flat-cache": {
1392
+ "version": "4.0.1",
1393
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",
1394
+ "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",
1395
+ "dev": true,
1396
+ "license": "MIT",
1397
+ "dependencies": {
1398
+ "flatted": "^3.2.9",
1399
+ "keyv": "^4.5.4"
1400
+ },
1401
+ "engines": {
1402
+ "node": ">=16"
1403
+ }
1404
+ },
1405
+ "node_modules/flatted": {
1406
+ "version": "3.4.2",
1407
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz",
1408
+ "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==",
1409
+ "dev": true,
1410
+ "license": "ISC"
1411
+ },
1412
+ "node_modules/fsevents": {
1413
+ "version": "2.3.3",
1414
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
1415
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
1416
+ "dev": true,
1417
+ "hasInstallScript": true,
1418
+ "license": "MIT",
1419
+ "optional": true,
1420
+ "os": [
1421
+ "darwin"
1422
+ ],
1423
+ "engines": {
1424
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
1425
+ }
1426
+ },
1427
+ "node_modules/gensync": {
1428
+ "version": "1.0.0-beta.2",
1429
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
1430
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
1431
+ "dev": true,
1432
+ "license": "MIT",
1433
+ "engines": {
1434
+ "node": ">=6.9.0"
1435
+ }
1436
+ },
1437
+ "node_modules/glob-parent": {
1438
+ "version": "6.0.2",
1439
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
1440
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
1441
+ "dev": true,
1442
+ "license": "ISC",
1443
+ "dependencies": {
1444
+ "is-glob": "^4.0.3"
1445
+ },
1446
+ "engines": {
1447
+ "node": ">=10.13.0"
1448
+ }
1449
+ },
1450
+ "node_modules/globals": {
1451
+ "version": "17.5.0",
1452
+ "resolved": "https://registry.npmjs.org/globals/-/globals-17.5.0.tgz",
1453
+ "integrity": "sha512-qoV+HK2yFl/366t2/Cb3+xxPUo5BuMynomoDmiaZBIdbs+0pYbjfZU+twLhGKp4uCZ/+NbtpVepH5bGCxRyy2g==",
1454
+ "dev": true,
1455
+ "license": "MIT",
1456
+ "engines": {
1457
+ "node": ">=18"
1458
+ },
1459
+ "funding": {
1460
+ "url": "https://github.com/sponsors/sindresorhus"
1461
+ }
1462
+ },
1463
+ "node_modules/hermes-estree": {
1464
+ "version": "0.25.1",
1465
+ "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz",
1466
+ "integrity": "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==",
1467
+ "dev": true,
1468
+ "license": "MIT"
1469
+ },
1470
+ "node_modules/hermes-parser": {
1471
+ "version": "0.25.1",
1472
+ "resolved": "https://registry.npmjs.org/hermes-parser/-/hermes-parser-0.25.1.tgz",
1473
+ "integrity": "sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==",
1474
+ "dev": true,
1475
+ "license": "MIT",
1476
+ "dependencies": {
1477
+ "hermes-estree": "0.25.1"
1478
+ }
1479
+ },
1480
+ "node_modules/ignore": {
1481
+ "version": "5.3.2",
1482
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
1483
+ "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
1484
+ "dev": true,
1485
+ "license": "MIT",
1486
+ "engines": {
1487
+ "node": ">= 4"
1488
+ }
1489
+ },
1490
+ "node_modules/imurmurhash": {
1491
+ "version": "0.1.4",
1492
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
1493
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
1494
+ "dev": true,
1495
+ "license": "MIT",
1496
+ "engines": {
1497
+ "node": ">=0.8.19"
1498
+ }
1499
+ },
1500
+ "node_modules/is-extglob": {
1501
+ "version": "2.1.1",
1502
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
1503
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
1504
+ "dev": true,
1505
+ "license": "MIT",
1506
+ "engines": {
1507
+ "node": ">=0.10.0"
1508
+ }
1509
+ },
1510
+ "node_modules/is-glob": {
1511
+ "version": "4.0.3",
1512
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
1513
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
1514
+ "dev": true,
1515
+ "license": "MIT",
1516
+ "dependencies": {
1517
+ "is-extglob": "^2.1.1"
1518
+ },
1519
+ "engines": {
1520
+ "node": ">=0.10.0"
1521
+ }
1522
+ },
1523
+ "node_modules/isexe": {
1524
+ "version": "2.0.0",
1525
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
1526
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
1527
+ "dev": true,
1528
+ "license": "ISC"
1529
+ },
1530
+ "node_modules/js-tokens": {
1531
+ "version": "4.0.0",
1532
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
1533
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
1534
+ "dev": true,
1535
+ "license": "MIT"
1536
+ },
1537
+ "node_modules/jsesc": {
1538
+ "version": "3.1.0",
1539
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
1540
+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
1541
+ "dev": true,
1542
+ "license": "MIT",
1543
+ "bin": {
1544
+ "jsesc": "bin/jsesc"
1545
+ },
1546
+ "engines": {
1547
+ "node": ">=6"
1548
+ }
1549
+ },
1550
+ "node_modules/json-buffer": {
1551
+ "version": "3.0.1",
1552
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
1553
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
1554
+ "dev": true,
1555
+ "license": "MIT"
1556
+ },
1557
+ "node_modules/json-schema-traverse": {
1558
+ "version": "0.4.1",
1559
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
1560
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
1561
+ "dev": true,
1562
+ "license": "MIT"
1563
+ },
1564
+ "node_modules/json-stable-stringify-without-jsonify": {
1565
+ "version": "1.0.1",
1566
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
1567
+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
1568
+ "dev": true,
1569
+ "license": "MIT"
1570
+ },
1571
+ "node_modules/json5": {
1572
+ "version": "2.2.3",
1573
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
1574
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
1575
+ "dev": true,
1576
+ "license": "MIT",
1577
+ "bin": {
1578
+ "json5": "lib/cli.js"
1579
+ },
1580
+ "engines": {
1581
+ "node": ">=6"
1582
+ }
1583
+ },
1584
+ "node_modules/keyv": {
1585
+ "version": "4.5.4",
1586
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
1587
+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
1588
+ "dev": true,
1589
+ "license": "MIT",
1590
+ "dependencies": {
1591
+ "json-buffer": "3.0.1"
1592
+ }
1593
+ },
1594
+ "node_modules/levn": {
1595
+ "version": "0.4.1",
1596
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
1597
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
1598
+ "dev": true,
1599
+ "license": "MIT",
1600
+ "dependencies": {
1601
+ "prelude-ls": "^1.2.1",
1602
+ "type-check": "~0.4.0"
1603
+ },
1604
+ "engines": {
1605
+ "node": ">= 0.8.0"
1606
+ }
1607
+ },
1608
+ "node_modules/lightningcss": {
1609
+ "version": "1.32.0",
1610
+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
1611
+ "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==",
1612
+ "dev": true,
1613
+ "license": "MPL-2.0",
1614
+ "dependencies": {
1615
+ "detect-libc": "^2.0.3"
1616
+ },
1617
+ "engines": {
1618
+ "node": ">= 12.0.0"
1619
+ },
1620
+ "funding": {
1621
+ "type": "opencollective",
1622
+ "url": "https://opencollective.com/parcel"
1623
+ },
1624
+ "optionalDependencies": {
1625
+ "lightningcss-android-arm64": "1.32.0",
1626
+ "lightningcss-darwin-arm64": "1.32.0",
1627
+ "lightningcss-darwin-x64": "1.32.0",
1628
+ "lightningcss-freebsd-x64": "1.32.0",
1629
+ "lightningcss-linux-arm-gnueabihf": "1.32.0",
1630
+ "lightningcss-linux-arm64-gnu": "1.32.0",
1631
+ "lightningcss-linux-arm64-musl": "1.32.0",
1632
+ "lightningcss-linux-x64-gnu": "1.32.0",
1633
+ "lightningcss-linux-x64-musl": "1.32.0",
1634
+ "lightningcss-win32-arm64-msvc": "1.32.0",
1635
+ "lightningcss-win32-x64-msvc": "1.32.0"
1636
+ }
1637
+ },
1638
+ "node_modules/lightningcss-android-arm64": {
1639
+ "version": "1.32.0",
1640
+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz",
1641
+ "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==",
1642
+ "cpu": [
1643
+ "arm64"
1644
+ ],
1645
+ "dev": true,
1646
+ "license": "MPL-2.0",
1647
+ "optional": true,
1648
+ "os": [
1649
+ "android"
1650
+ ],
1651
+ "engines": {
1652
+ "node": ">= 12.0.0"
1653
+ },
1654
+ "funding": {
1655
+ "type": "opencollective",
1656
+ "url": "https://opencollective.com/parcel"
1657
+ }
1658
+ },
1659
+ "node_modules/lightningcss-darwin-arm64": {
1660
+ "version": "1.32.0",
1661
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz",
1662
+ "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==",
1663
+ "cpu": [
1664
+ "arm64"
1665
+ ],
1666
+ "dev": true,
1667
+ "license": "MPL-2.0",
1668
+ "optional": true,
1669
+ "os": [
1670
+ "darwin"
1671
+ ],
1672
+ "engines": {
1673
+ "node": ">= 12.0.0"
1674
+ },
1675
+ "funding": {
1676
+ "type": "opencollective",
1677
+ "url": "https://opencollective.com/parcel"
1678
+ }
1679
+ },
1680
+ "node_modules/lightningcss-darwin-x64": {
1681
+ "version": "1.32.0",
1682
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz",
1683
+ "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==",
1684
+ "cpu": [
1685
+ "x64"
1686
+ ],
1687
+ "dev": true,
1688
+ "license": "MPL-2.0",
1689
+ "optional": true,
1690
+ "os": [
1691
+ "darwin"
1692
+ ],
1693
+ "engines": {
1694
+ "node": ">= 12.0.0"
1695
+ },
1696
+ "funding": {
1697
+ "type": "opencollective",
1698
+ "url": "https://opencollective.com/parcel"
1699
+ }
1700
+ },
1701
+ "node_modules/lightningcss-freebsd-x64": {
1702
+ "version": "1.32.0",
1703
+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz",
1704
+ "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==",
1705
+ "cpu": [
1706
+ "x64"
1707
+ ],
1708
+ "dev": true,
1709
+ "license": "MPL-2.0",
1710
+ "optional": true,
1711
+ "os": [
1712
+ "freebsd"
1713
+ ],
1714
+ "engines": {
1715
+ "node": ">= 12.0.0"
1716
+ },
1717
+ "funding": {
1718
+ "type": "opencollective",
1719
+ "url": "https://opencollective.com/parcel"
1720
+ }
1721
+ },
1722
+ "node_modules/lightningcss-linux-arm-gnueabihf": {
1723
+ "version": "1.32.0",
1724
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz",
1725
+ "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==",
1726
+ "cpu": [
1727
+ "arm"
1728
+ ],
1729
+ "dev": true,
1730
+ "license": "MPL-2.0",
1731
+ "optional": true,
1732
+ "os": [
1733
+ "linux"
1734
+ ],
1735
+ "engines": {
1736
+ "node": ">= 12.0.0"
1737
+ },
1738
+ "funding": {
1739
+ "type": "opencollective",
1740
+ "url": "https://opencollective.com/parcel"
1741
+ }
1742
+ },
1743
+ "node_modules/lightningcss-linux-arm64-gnu": {
1744
+ "version": "1.32.0",
1745
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz",
1746
+ "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==",
1747
+ "cpu": [
1748
+ "arm64"
1749
+ ],
1750
+ "dev": true,
1751
+ "license": "MPL-2.0",
1752
+ "optional": true,
1753
+ "os": [
1754
+ "linux"
1755
+ ],
1756
+ "engines": {
1757
+ "node": ">= 12.0.0"
1758
+ },
1759
+ "funding": {
1760
+ "type": "opencollective",
1761
+ "url": "https://opencollective.com/parcel"
1762
+ }
1763
+ },
1764
+ "node_modules/lightningcss-linux-arm64-musl": {
1765
+ "version": "1.32.0",
1766
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz",
1767
+ "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==",
1768
+ "cpu": [
1769
+ "arm64"
1770
+ ],
1771
+ "dev": true,
1772
+ "license": "MPL-2.0",
1773
+ "optional": true,
1774
+ "os": [
1775
+ "linux"
1776
+ ],
1777
+ "engines": {
1778
+ "node": ">= 12.0.0"
1779
+ },
1780
+ "funding": {
1781
+ "type": "opencollective",
1782
+ "url": "https://opencollective.com/parcel"
1783
+ }
1784
+ },
1785
+ "node_modules/lightningcss-linux-x64-gnu": {
1786
+ "version": "1.32.0",
1787
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz",
1788
+ "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==",
1789
+ "cpu": [
1790
+ "x64"
1791
+ ],
1792
+ "dev": true,
1793
+ "license": "MPL-2.0",
1794
+ "optional": true,
1795
+ "os": [
1796
+ "linux"
1797
+ ],
1798
+ "engines": {
1799
+ "node": ">= 12.0.0"
1800
+ },
1801
+ "funding": {
1802
+ "type": "opencollective",
1803
+ "url": "https://opencollective.com/parcel"
1804
+ }
1805
+ },
1806
+ "node_modules/lightningcss-linux-x64-musl": {
1807
+ "version": "1.32.0",
1808
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz",
1809
+ "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==",
1810
+ "cpu": [
1811
+ "x64"
1812
+ ],
1813
+ "dev": true,
1814
+ "license": "MPL-2.0",
1815
+ "optional": true,
1816
+ "os": [
1817
+ "linux"
1818
+ ],
1819
+ "engines": {
1820
+ "node": ">= 12.0.0"
1821
+ },
1822
+ "funding": {
1823
+ "type": "opencollective",
1824
+ "url": "https://opencollective.com/parcel"
1825
+ }
1826
+ },
1827
+ "node_modules/lightningcss-win32-arm64-msvc": {
1828
+ "version": "1.32.0",
1829
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz",
1830
+ "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==",
1831
+ "cpu": [
1832
+ "arm64"
1833
+ ],
1834
+ "dev": true,
1835
+ "license": "MPL-2.0",
1836
+ "optional": true,
1837
+ "os": [
1838
+ "win32"
1839
+ ],
1840
+ "engines": {
1841
+ "node": ">= 12.0.0"
1842
+ },
1843
+ "funding": {
1844
+ "type": "opencollective",
1845
+ "url": "https://opencollective.com/parcel"
1846
+ }
1847
+ },
1848
+ "node_modules/lightningcss-win32-x64-msvc": {
1849
+ "version": "1.32.0",
1850
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz",
1851
+ "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==",
1852
+ "cpu": [
1853
+ "x64"
1854
+ ],
1855
+ "dev": true,
1856
+ "license": "MPL-2.0",
1857
+ "optional": true,
1858
+ "os": [
1859
+ "win32"
1860
+ ],
1861
+ "engines": {
1862
+ "node": ">= 12.0.0"
1863
+ },
1864
+ "funding": {
1865
+ "type": "opencollective",
1866
+ "url": "https://opencollective.com/parcel"
1867
+ }
1868
+ },
1869
+ "node_modules/locate-path": {
1870
+ "version": "6.0.0",
1871
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
1872
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
1873
+ "dev": true,
1874
+ "license": "MIT",
1875
+ "dependencies": {
1876
+ "p-locate": "^5.0.0"
1877
+ },
1878
+ "engines": {
1879
+ "node": ">=10"
1880
+ },
1881
+ "funding": {
1882
+ "url": "https://github.com/sponsors/sindresorhus"
1883
+ }
1884
+ },
1885
+ "node_modules/lru-cache": {
1886
+ "version": "5.1.1",
1887
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
1888
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
1889
+ "dev": true,
1890
+ "license": "ISC",
1891
+ "dependencies": {
1892
+ "yallist": "^3.0.2"
1893
+ }
1894
+ },
1895
+ "node_modules/minimatch": {
1896
+ "version": "10.2.5",
1897
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
1898
+ "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
1899
+ "dev": true,
1900
+ "license": "BlueOak-1.0.0",
1901
+ "dependencies": {
1902
+ "brace-expansion": "^5.0.5"
1903
+ },
1904
+ "engines": {
1905
+ "node": "18 || 20 || >=22"
1906
+ },
1907
+ "funding": {
1908
+ "url": "https://github.com/sponsors/isaacs"
1909
+ }
1910
+ },
1911
+ "node_modules/ms": {
1912
+ "version": "2.1.3",
1913
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1914
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
1915
+ "dev": true,
1916
+ "license": "MIT"
1917
+ },
1918
+ "node_modules/nanoid": {
1919
+ "version": "3.3.11",
1920
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
1921
+ "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
1922
+ "dev": true,
1923
+ "funding": [
1924
+ {
1925
+ "type": "github",
1926
+ "url": "https://github.com/sponsors/ai"
1927
+ }
1928
+ ],
1929
+ "license": "MIT",
1930
+ "bin": {
1931
+ "nanoid": "bin/nanoid.cjs"
1932
+ },
1933
+ "engines": {
1934
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
1935
+ }
1936
+ },
1937
+ "node_modules/natural-compare": {
1938
+ "version": "1.4.0",
1939
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
1940
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
1941
+ "dev": true,
1942
+ "license": "MIT"
1943
+ },
1944
+ "node_modules/node-releases": {
1945
+ "version": "2.0.38",
1946
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.38.tgz",
1947
+ "integrity": "sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==",
1948
+ "dev": true,
1949
+ "license": "MIT"
1950
+ },
1951
+ "node_modules/optionator": {
1952
+ "version": "0.9.4",
1953
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
1954
+ "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==",
1955
+ "dev": true,
1956
+ "license": "MIT",
1957
+ "dependencies": {
1958
+ "deep-is": "^0.1.3",
1959
+ "fast-levenshtein": "^2.0.6",
1960
+ "levn": "^0.4.1",
1961
+ "prelude-ls": "^1.2.1",
1962
+ "type-check": "^0.4.0",
1963
+ "word-wrap": "^1.2.5"
1964
+ },
1965
+ "engines": {
1966
+ "node": ">= 0.8.0"
1967
+ }
1968
+ },
1969
+ "node_modules/p-limit": {
1970
+ "version": "3.1.0",
1971
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
1972
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
1973
+ "dev": true,
1974
+ "license": "MIT",
1975
+ "dependencies": {
1976
+ "yocto-queue": "^0.1.0"
1977
+ },
1978
+ "engines": {
1979
+ "node": ">=10"
1980
+ },
1981
+ "funding": {
1982
+ "url": "https://github.com/sponsors/sindresorhus"
1983
+ }
1984
+ },
1985
+ "node_modules/p-locate": {
1986
+ "version": "5.0.0",
1987
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
1988
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
1989
+ "dev": true,
1990
+ "license": "MIT",
1991
+ "dependencies": {
1992
+ "p-limit": "^3.0.2"
1993
+ },
1994
+ "engines": {
1995
+ "node": ">=10"
1996
+ },
1997
+ "funding": {
1998
+ "url": "https://github.com/sponsors/sindresorhus"
1999
+ }
2000
+ },
2001
+ "node_modules/path-exists": {
2002
+ "version": "4.0.0",
2003
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
2004
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
2005
+ "dev": true,
2006
+ "license": "MIT",
2007
+ "engines": {
2008
+ "node": ">=8"
2009
+ }
2010
+ },
2011
+ "node_modules/path-key": {
2012
+ "version": "3.1.1",
2013
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
2014
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
2015
+ "dev": true,
2016
+ "license": "MIT",
2017
+ "engines": {
2018
+ "node": ">=8"
2019
+ }
2020
+ },
2021
+ "node_modules/picocolors": {
2022
+ "version": "1.1.1",
2023
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
2024
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
2025
+ "dev": true,
2026
+ "license": "ISC"
2027
+ },
2028
+ "node_modules/picomatch": {
2029
+ "version": "4.0.4",
2030
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
2031
+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
2032
+ "dev": true,
2033
+ "license": "MIT",
2034
+ "engines": {
2035
+ "node": ">=12"
2036
+ },
2037
+ "funding": {
2038
+ "url": "https://github.com/sponsors/jonschlinkert"
2039
+ }
2040
+ },
2041
+ "node_modules/postcss": {
2042
+ "version": "8.5.12",
2043
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.12.tgz",
2044
+ "integrity": "sha512-W62t/Se6rA0Az3DfCL0AqJwXuKwBeYg6nOaIgzP+xZ7N5BFCI7DYi1qs6ygUYT6rvfi6t9k65UMLJC+PHZpDAA==",
2045
+ "dev": true,
2046
+ "funding": [
2047
+ {
2048
+ "type": "opencollective",
2049
+ "url": "https://opencollective.com/postcss/"
2050
+ },
2051
+ {
2052
+ "type": "tidelift",
2053
+ "url": "https://tidelift.com/funding/github/npm/postcss"
2054
+ },
2055
+ {
2056
+ "type": "github",
2057
+ "url": "https://github.com/sponsors/ai"
2058
+ }
2059
+ ],
2060
+ "license": "MIT",
2061
+ "dependencies": {
2062
+ "nanoid": "^3.3.11",
2063
+ "picocolors": "^1.1.1",
2064
+ "source-map-js": "^1.2.1"
2065
+ },
2066
+ "engines": {
2067
+ "node": "^10 || ^12 || >=14"
2068
+ }
2069
+ },
2070
+ "node_modules/prelude-ls": {
2071
+ "version": "1.2.1",
2072
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
2073
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
2074
+ "dev": true,
2075
+ "license": "MIT",
2076
+ "engines": {
2077
+ "node": ">= 0.8.0"
2078
+ }
2079
+ },
2080
+ "node_modules/punycode": {
2081
+ "version": "2.3.1",
2082
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
2083
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
2084
+ "dev": true,
2085
+ "license": "MIT",
2086
+ "engines": {
2087
+ "node": ">=6"
2088
+ }
2089
+ },
2090
+ "node_modules/react": {
2091
+ "version": "19.2.5",
2092
+ "resolved": "https://registry.npmjs.org/react/-/react-19.2.5.tgz",
2093
+ "integrity": "sha512-llUJLzz1zTUBrskt2pwZgLq59AemifIftw4aB7JxOqf1HY2FDaGDxgwpAPVzHU1kdWabH7FauP4i1oEeer2WCA==",
2094
+ "license": "MIT",
2095
+ "engines": {
2096
+ "node": ">=0.10.0"
2097
+ }
2098
+ },
2099
+ "node_modules/react-dom": {
2100
+ "version": "19.2.5",
2101
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.5.tgz",
2102
+ "integrity": "sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==",
2103
+ "license": "MIT",
2104
+ "dependencies": {
2105
+ "scheduler": "^0.27.0"
2106
+ },
2107
+ "peerDependencies": {
2108
+ "react": "^19.2.5"
2109
+ }
2110
+ },
2111
+ "node_modules/rolldown": {
2112
+ "version": "1.0.0-rc.17",
2113
+ "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.17.tgz",
2114
+ "integrity": "sha512-ZrT53oAKrtA4+YtBWPQbtPOxIbVDbxT0orcYERKd63VJTF13zPcgXTvD4843L8pcsI7M6MErt8QtON6lrB9tyA==",
2115
+ "dev": true,
2116
+ "license": "MIT",
2117
+ "dependencies": {
2118
+ "@oxc-project/types": "=0.127.0",
2119
+ "@rolldown/pluginutils": "1.0.0-rc.17"
2120
+ },
2121
+ "bin": {
2122
+ "rolldown": "bin/cli.mjs"
2123
+ },
2124
+ "engines": {
2125
+ "node": "^20.19.0 || >=22.12.0"
2126
+ },
2127
+ "optionalDependencies": {
2128
+ "@rolldown/binding-android-arm64": "1.0.0-rc.17",
2129
+ "@rolldown/binding-darwin-arm64": "1.0.0-rc.17",
2130
+ "@rolldown/binding-darwin-x64": "1.0.0-rc.17",
2131
+ "@rolldown/binding-freebsd-x64": "1.0.0-rc.17",
2132
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.17",
2133
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.17",
2134
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.17",
2135
+ "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.17",
2136
+ "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.17",
2137
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.17",
2138
+ "@rolldown/binding-linux-x64-musl": "1.0.0-rc.17",
2139
+ "@rolldown/binding-openharmony-arm64": "1.0.0-rc.17",
2140
+ "@rolldown/binding-wasm32-wasi": "1.0.0-rc.17",
2141
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.17",
2142
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.17"
2143
+ }
2144
+ },
2145
+ "node_modules/rolldown/node_modules/@rolldown/pluginutils": {
2146
+ "version": "1.0.0-rc.17",
2147
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.17.tgz",
2148
+ "integrity": "sha512-n8iosDOt6Ig1UhJ2AYqoIhHWh/isz0xpicHTzpKBeotdVsTEcxsSA/i3EVM7gQAj0rU27OLAxCjzlj15IWY7bg==",
2149
+ "dev": true,
2150
+ "license": "MIT"
2151
+ },
2152
+ "node_modules/scheduler": {
2153
+ "version": "0.27.0",
2154
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",
2155
+ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
2156
+ "license": "MIT"
2157
+ },
2158
+ "node_modules/semver": {
2159
+ "version": "6.3.1",
2160
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
2161
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
2162
+ "dev": true,
2163
+ "license": "ISC",
2164
+ "bin": {
2165
+ "semver": "bin/semver.js"
2166
+ }
2167
+ },
2168
+ "node_modules/shebang-command": {
2169
+ "version": "2.0.0",
2170
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
2171
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
2172
+ "dev": true,
2173
+ "license": "MIT",
2174
+ "dependencies": {
2175
+ "shebang-regex": "^3.0.0"
2176
+ },
2177
+ "engines": {
2178
+ "node": ">=8"
2179
+ }
2180
+ },
2181
+ "node_modules/shebang-regex": {
2182
+ "version": "3.0.0",
2183
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
2184
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
2185
+ "dev": true,
2186
+ "license": "MIT",
2187
+ "engines": {
2188
+ "node": ">=8"
2189
+ }
2190
+ },
2191
+ "node_modules/source-map-js": {
2192
+ "version": "1.2.1",
2193
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
2194
+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
2195
+ "dev": true,
2196
+ "license": "BSD-3-Clause",
2197
+ "engines": {
2198
+ "node": ">=0.10.0"
2199
+ }
2200
+ },
2201
+ "node_modules/tinyglobby": {
2202
+ "version": "0.2.16",
2203
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz",
2204
+ "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==",
2205
+ "dev": true,
2206
+ "license": "MIT",
2207
+ "dependencies": {
2208
+ "fdir": "^6.5.0",
2209
+ "picomatch": "^4.0.4"
2210
+ },
2211
+ "engines": {
2212
+ "node": ">=12.0.0"
2213
+ },
2214
+ "funding": {
2215
+ "url": "https://github.com/sponsors/SuperchupuDev"
2216
+ }
2217
+ },
2218
+ "node_modules/tslib": {
2219
+ "version": "2.8.1",
2220
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
2221
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
2222
+ "dev": true,
2223
+ "license": "0BSD",
2224
+ "optional": true
2225
+ },
2226
+ "node_modules/type-check": {
2227
+ "version": "0.4.0",
2228
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
2229
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
2230
+ "dev": true,
2231
+ "license": "MIT",
2232
+ "dependencies": {
2233
+ "prelude-ls": "^1.2.1"
2234
+ },
2235
+ "engines": {
2236
+ "node": ">= 0.8.0"
2237
+ }
2238
+ },
2239
+ "node_modules/update-browserslist-db": {
2240
+ "version": "1.2.3",
2241
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
2242
+ "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
2243
+ "dev": true,
2244
+ "funding": [
2245
+ {
2246
+ "type": "opencollective",
2247
+ "url": "https://opencollective.com/browserslist"
2248
+ },
2249
+ {
2250
+ "type": "tidelift",
2251
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
2252
+ },
2253
+ {
2254
+ "type": "github",
2255
+ "url": "https://github.com/sponsors/ai"
2256
+ }
2257
+ ],
2258
+ "license": "MIT",
2259
+ "dependencies": {
2260
+ "escalade": "^3.2.0",
2261
+ "picocolors": "^1.1.1"
2262
+ },
2263
+ "bin": {
2264
+ "update-browserslist-db": "cli.js"
2265
+ },
2266
+ "peerDependencies": {
2267
+ "browserslist": ">= 4.21.0"
2268
+ }
2269
+ },
2270
+ "node_modules/uri-js": {
2271
+ "version": "4.4.1",
2272
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
2273
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
2274
+ "dev": true,
2275
+ "license": "BSD-2-Clause",
2276
+ "dependencies": {
2277
+ "punycode": "^2.1.0"
2278
+ }
2279
+ },
2280
+ "node_modules/vite": {
2281
+ "version": "8.0.10",
2282
+ "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.10.tgz",
2283
+ "integrity": "sha512-rZuUu9j6J5uotLDs+cAA4O5H4K1SfPliUlQwqa6YEwSrWDZzP4rhm00oJR5snMewjxF5V/K3D4kctsUTsIU9Mw==",
2284
+ "dev": true,
2285
+ "license": "MIT",
2286
+ "dependencies": {
2287
+ "lightningcss": "^1.32.0",
2288
+ "picomatch": "^4.0.4",
2289
+ "postcss": "^8.5.10",
2290
+ "rolldown": "1.0.0-rc.17",
2291
+ "tinyglobby": "^0.2.16"
2292
+ },
2293
+ "bin": {
2294
+ "vite": "bin/vite.js"
2295
+ },
2296
+ "engines": {
2297
+ "node": "^20.19.0 || >=22.12.0"
2298
+ },
2299
+ "funding": {
2300
+ "url": "https://github.com/vitejs/vite?sponsor=1"
2301
+ },
2302
+ "optionalDependencies": {
2303
+ "fsevents": "~2.3.3"
2304
+ },
2305
+ "peerDependencies": {
2306
+ "@types/node": "^20.19.0 || >=22.12.0",
2307
+ "@vitejs/devtools": "^0.1.0",
2308
+ "esbuild": "^0.27.0 || ^0.28.0",
2309
+ "jiti": ">=1.21.0",
2310
+ "less": "^4.0.0",
2311
+ "sass": "^1.70.0",
2312
+ "sass-embedded": "^1.70.0",
2313
+ "stylus": ">=0.54.8",
2314
+ "sugarss": "^5.0.0",
2315
+ "terser": "^5.16.0",
2316
+ "tsx": "^4.8.1",
2317
+ "yaml": "^2.4.2"
2318
+ },
2319
+ "peerDependenciesMeta": {
2320
+ "@types/node": {
2321
+ "optional": true
2322
+ },
2323
+ "@vitejs/devtools": {
2324
+ "optional": true
2325
+ },
2326
+ "esbuild": {
2327
+ "optional": true
2328
+ },
2329
+ "jiti": {
2330
+ "optional": true
2331
+ },
2332
+ "less": {
2333
+ "optional": true
2334
+ },
2335
+ "sass": {
2336
+ "optional": true
2337
+ },
2338
+ "sass-embedded": {
2339
+ "optional": true
2340
+ },
2341
+ "stylus": {
2342
+ "optional": true
2343
+ },
2344
+ "sugarss": {
2345
+ "optional": true
2346
+ },
2347
+ "terser": {
2348
+ "optional": true
2349
+ },
2350
+ "tsx": {
2351
+ "optional": true
2352
+ },
2353
+ "yaml": {
2354
+ "optional": true
2355
+ }
2356
+ }
2357
+ },
2358
+ "node_modules/which": {
2359
+ "version": "2.0.2",
2360
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
2361
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
2362
+ "dev": true,
2363
+ "license": "ISC",
2364
+ "dependencies": {
2365
+ "isexe": "^2.0.0"
2366
+ },
2367
+ "bin": {
2368
+ "node-which": "bin/node-which"
2369
+ },
2370
+ "engines": {
2371
+ "node": ">= 8"
2372
+ }
2373
+ },
2374
+ "node_modules/word-wrap": {
2375
+ "version": "1.2.5",
2376
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
2377
+ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==",
2378
+ "dev": true,
2379
+ "license": "MIT",
2380
+ "engines": {
2381
+ "node": ">=0.10.0"
2382
+ }
2383
+ },
2384
+ "node_modules/yallist": {
2385
+ "version": "3.1.1",
2386
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
2387
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
2388
+ "dev": true,
2389
+ "license": "ISC"
2390
+ },
2391
+ "node_modules/yocto-queue": {
2392
+ "version": "0.1.0",
2393
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
2394
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
2395
+ "dev": true,
2396
+ "license": "MIT",
2397
+ "engines": {
2398
+ "node": ">=10"
2399
+ },
2400
+ "funding": {
2401
+ "url": "https://github.com/sponsors/sindresorhus"
2402
+ }
2403
+ },
2404
+ "node_modules/zod": {
2405
+ "version": "4.3.6",
2406
+ "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz",
2407
+ "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==",
2408
+ "dev": true,
2409
+ "license": "MIT",
2410
+ "funding": {
2411
+ "url": "https://github.com/sponsors/colinhacks"
2412
+ }
2413
+ },
2414
+ "node_modules/zod-validation-error": {
2415
+ "version": "4.0.2",
2416
+ "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-4.0.2.tgz",
2417
+ "integrity": "sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==",
2418
+ "dev": true,
2419
+ "license": "MIT",
2420
+ "engines": {
2421
+ "node": ">=18.0.0"
2422
+ },
2423
+ "peerDependencies": {
2424
+ "zod": "^3.25.0 || ^4.0.0"
2425
+ }
2426
+ }
2427
+ }
2428
+ }
frontend/package.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "frontend",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "lint": "eslint .",
10
+ "preview": "vite preview"
11
+ },
12
+ "dependencies": {
13
+ "react": "^19.2.5",
14
+ "react-dom": "^19.2.5"
15
+ },
16
+ "devDependencies": {
17
+ "@eslint/js": "^10.0.1",
18
+ "@types/react": "^19.2.14",
19
+ "@types/react-dom": "^19.2.3",
20
+ "@vitejs/plugin-react": "^6.0.1",
21
+ "eslint": "^10.2.1",
22
+ "eslint-plugin-react-hooks": "^7.1.1",
23
+ "eslint-plugin-react-refresh": "^0.5.2",
24
+ "globals": "^17.5.0",
25
+ "vite": "^8.0.10"
26
+ }
27
+ }
frontend/public/favicon.svg ADDED
frontend/public/icons.svg ADDED
frontend/src/App.css ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .counter {
2
+ font-size: 16px;
3
+ padding: 5px 10px;
4
+ border-radius: 5px;
5
+ color: var(--accent);
6
+ background: var(--accent-bg);
7
+ border: 2px solid transparent;
8
+ transition: border-color 0.3s;
9
+ margin-bottom: 24px;
10
+
11
+ &:hover {
12
+ border-color: var(--accent-border);
13
+ }
14
+ &:focus-visible {
15
+ outline: 2px solid var(--accent);
16
+ outline-offset: 2px;
17
+ }
18
+ }
19
+
20
+ .hero {
21
+ position: relative;
22
+
23
+ .base,
24
+ .framework,
25
+ .vite {
26
+ inset-inline: 0;
27
+ margin: 0 auto;
28
+ }
29
+
30
+ .base {
31
+ width: 170px;
32
+ position: relative;
33
+ z-index: 0;
34
+ }
35
+
36
+ .framework,
37
+ .vite {
38
+ position: absolute;
39
+ }
40
+
41
+ .framework {
42
+ z-index: 1;
43
+ top: 34px;
44
+ height: 28px;
45
+ transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
46
+ scale(1.4);
47
+ }
48
+
49
+ .vite {
50
+ z-index: 0;
51
+ top: 107px;
52
+ height: 26px;
53
+ width: auto;
54
+ transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
55
+ scale(0.8);
56
+ }
57
+ }
58
+
59
+ #center {
60
+ display: flex;
61
+ flex-direction: column;
62
+ gap: 25px;
63
+ place-content: center;
64
+ place-items: center;
65
+ flex-grow: 1;
66
+
67
+ @media (max-width: 1024px) {
68
+ padding: 32px 20px 24px;
69
+ gap: 18px;
70
+ }
71
+ }
72
+
73
+ #next-steps {
74
+ display: flex;
75
+ border-top: 1px solid var(--border);
76
+ text-align: left;
77
+
78
+ & > div {
79
+ flex: 1 1 0;
80
+ padding: 32px;
81
+ @media (max-width: 1024px) {
82
+ padding: 24px 20px;
83
+ }
84
+ }
85
+
86
+ .icon {
87
+ margin-bottom: 16px;
88
+ width: 22px;
89
+ height: 22px;
90
+ }
91
+
92
+ @media (max-width: 1024px) {
93
+ flex-direction: column;
94
+ text-align: center;
95
+ }
96
+ }
97
+
98
+ #docs {
99
+ border-right: 1px solid var(--border);
100
+
101
+ @media (max-width: 1024px) {
102
+ border-right: none;
103
+ border-bottom: 1px solid var(--border);
104
+ }
105
+ }
106
+
107
+ #next-steps ul {
108
+ list-style: none;
109
+ padding: 0;
110
+ display: flex;
111
+ gap: 8px;
112
+ margin: 32px 0 0;
113
+
114
+ .logo {
115
+ height: 18px;
116
+ }
117
+
118
+ a {
119
+ color: var(--text-h);
120
+ font-size: 16px;
121
+ border-radius: 6px;
122
+ background: var(--social-bg);
123
+ display: flex;
124
+ padding: 6px 12px;
125
+ align-items: center;
126
+ gap: 8px;
127
+ text-decoration: none;
128
+ transition: box-shadow 0.3s;
129
+
130
+ &:hover {
131
+ box-shadow: var(--shadow);
132
+ }
133
+ .button-icon {
134
+ height: 18px;
135
+ width: 18px;
136
+ }
137
+ }
138
+
139
+ @media (max-width: 1024px) {
140
+ margin-top: 20px;
141
+ flex-wrap: wrap;
142
+ justify-content: center;
143
+
144
+ li {
145
+ flex: 1 1 calc(50% - 8px);
146
+ }
147
+
148
+ a {
149
+ width: 100%;
150
+ justify-content: center;
151
+ box-sizing: border-box;
152
+ }
153
+ }
154
+ }
155
+
156
+ #spacer {
157
+ height: 88px;
158
+ border-top: 1px solid var(--border);
159
+ @media (max-width: 1024px) {
160
+ height: 48px;
161
+ }
162
+ }
163
+
164
+ .ticks {
165
+ position: relative;
166
+ width: 100%;
167
+
168
+ &::before,
169
+ &::after {
170
+ content: '';
171
+ position: absolute;
172
+ top: -4.5px;
173
+ border: 5px solid transparent;
174
+ }
175
+
176
+ &::before {
177
+ left: 0;
178
+ border-left-color: var(--border);
179
+ }
180
+ &::after {
181
+ right: 0;
182
+ border-right-color: var(--border);
183
+ }
184
+ }
frontend/src/App.jsx ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // src/App.jsx
2
+ import { useState, useEffect, useCallback, useMemo } from 'react';
3
+ import TextInput from './components/TextInput';
4
+ import ModelSelector from './components/ModelSelector';
5
+ import LayerHeadControls from './components/LayerHeadControls';
6
+ import AttentionHeatmap from './components/AttentionHeatmap';
7
+ import TokenRow from './components/TokenRow';
8
+ import InfoPanel from './components/InfoPanel';
9
+ import ErrorBoundary from './components/ErrorBoundary';
10
+
11
+ // Use relative path so Vite's proxy handles it β€” works on any port Vite picks
12
+ const API = import.meta.env.VITE_API_URL ?? '';
13
+
14
+ export default function App() {
15
+ // ── Input state ──────────────────────────────────────────────────────────
16
+ const [text, setText] = useState('The cat sat on the mat and watched the dog.');
17
+ const [modelId, setModelId] = useState('bert-base-uncased');
18
+ const [models, setModels] = useState([]);
19
+
20
+ // ── Result state ─────────────────────────────────────────────────────────
21
+ const [data, setData] = useState(null); // { tokens, attentions, n_layers, n_heads, model_type }
22
+ const [loading, setLoading] = useState(false);
23
+ const [error, setError] = useState('');
24
+
25
+ // ── View state ───────────────────────────────────────────────────────────
26
+ const [selectedLayer, setSelectedLayer] = useState(0);
27
+ const [selectedHead, setSelectedHead] = useState(0);
28
+ const [avgHeads, setAvgHeads] = useState(false);
29
+ const [selectedToken, setSelectedToken] = useState(null);
30
+
31
+ // ── Load model list on mount ─────────────────────────────────────────────
32
+ useEffect(() => {
33
+ fetch(`${API}/api/models`)
34
+ .then((r) => r.json())
35
+ .then(setModels)
36
+ .catch(() => {});
37
+ }, []);
38
+
39
+ // ── Run inference ────────────────────────────────────────────────────────
40
+ const analyze = useCallback(async () => {
41
+ if (!text.trim()) return;
42
+ setLoading(true);
43
+ setError('');
44
+ setData(null);
45
+ setSelectedToken(null);
46
+
47
+ try {
48
+ const res = await fetch(`${API}/api/attend`, {
49
+ method: 'POST',
50
+ headers: { 'Content-Type': 'application/json' },
51
+ body: JSON.stringify({ text, model_id: modelId }),
52
+ });
53
+ if (!res.ok) {
54
+ const err = await res.json().catch(() => ({}));
55
+ throw new Error(err.detail ?? `HTTP ${res.status}`);
56
+ }
57
+ const result = await res.json();
58
+ setData(result);
59
+ setSelectedLayer(0);
60
+ setSelectedHead(0);
61
+ setAvgHeads(false);
62
+ } catch (e) {
63
+ setError(e.message);
64
+ } finally {
65
+ setLoading(false);
66
+ }
67
+ }, [text, modelId]);
68
+
69
+ // ── Derive current attention matrix ──────────────────────────────────────
70
+ const matrix = useMemo(() => {
71
+ if (!data) return null;
72
+ const layerAttn = data.attentions[selectedLayer]; // [n_heads][seq][seq]
73
+ if (avgHeads) {
74
+ // Average over all heads
75
+ const S = layerAttn[0].length;
76
+ const avg = Array.from({ length: S }, () => new Array(S).fill(0));
77
+ const H = layerAttn.length;
78
+ for (let h = 0; h < H; h++) {
79
+ for (let s = 0; s < S; s++) {
80
+ for (let t = 0; t < S; t++) {
81
+ avg[s][t] += layerAttn[h][s][t] / H;
82
+ }
83
+ }
84
+ }
85
+ return avg;
86
+ }
87
+ return layerAttn[selectedHead]; // [seq][seq]
88
+ }, [data, selectedLayer, selectedHead, avgHeads]);
89
+
90
+ const modelMeta = models.find((m) => m.id === modelId);
91
+
92
+ return (
93
+ <div className="app-shell">
94
+ {/* ── Header ─────────────────────────────────────────────────────── */}
95
+ <header className="app-header">
96
+ <div className="app-logo">🧠</div>
97
+ <div>
98
+ <div className="app-title">Attention Visualizer</div>
99
+ <div className="app-subtitle">Transformer attention weights Β· per layer Β· per head</div>
100
+ </div>
101
+ <div className="header-badge">BERTViz-style</div>
102
+ </header>
103
+
104
+ {/* ── Main layout ─────────────────────────────────────────────────── */}
105
+ <div className="main-grid">
106
+ {/* Left panel */}
107
+ <aside className="left-panel">
108
+ <TextInput
109
+ value={text}
110
+ onChange={setText}
111
+ onSubmit={analyze}
112
+ loading={loading}
113
+ />
114
+
115
+ {models.length > 0 && (
116
+ <ModelSelector
117
+ models={models}
118
+ selected={modelId}
119
+ onSelect={setModelId}
120
+ disabled={loading}
121
+ />
122
+ )}
123
+
124
+ {data && (
125
+ <LayerHeadControls
126
+ nLayers={data.n_layers}
127
+ nHeads={data.n_heads}
128
+ selectedLayer={selectedLayer}
129
+ selectedHead={selectedHead}
130
+ avgHeads={avgHeads}
131
+ onLayerChange={setSelectedLayer}
132
+ onHeadChange={setSelectedHead}
133
+ onAvgToggle={() => setAvgHeads((v) => !v)}
134
+ disabled={loading}
135
+ />
136
+ )}
137
+ </aside>
138
+
139
+ {/* Right panel */}
140
+ <main className="right-panel">
141
+ {/* Info stats */}
142
+ {data && <InfoPanel data={data} modelMeta={modelMeta} />}
143
+
144
+ {/* Token row */}
145
+ {data && (
146
+ <TokenRow
147
+ tokens={data.tokens}
148
+ matrix={matrix}
149
+ selectedToken={selectedToken}
150
+ onSelectToken={setSelectedToken}
151
+ />
152
+ )}
153
+
154
+ {/* Error */}
155
+ {error && (
156
+ <div className="error-banner">
157
+ <span>⚠️</span>
158
+ <span>{error}</span>
159
+ </div>
160
+ )}
161
+
162
+ {/* Loading */}
163
+ {loading && (
164
+ <div className="card loading-overlay">
165
+ <div className="spinner" />
166
+ <div>Running inference…</div>
167
+ <div className="loading-model-name">{modelMeta?.label}</div>
168
+ <div style={{ fontSize: 11, color: 'var(--text-muted)', maxWidth: 260, textAlign: 'center' }}>
169
+ First run downloads the model (~{modelMeta?.size_mb}MB). Subsequent runs are instant.
170
+ </div>
171
+ </div>
172
+ )}
173
+
174
+ {/* Heatmap */}
175
+ <div className="card" style={{ flex: 1 }}>
176
+ <div className="card-title">
177
+ Attention Heatmap
178
+ {data && (
179
+ <span style={{ fontFamily: 'JetBrains Mono', fontSize: 10, color: 'var(--text-muted)', marginLeft: 'auto', fontWeight: 400 }}>
180
+ layer {selectedLayer} Β· {avgHeads ? 'avg heads' : `head ${selectedHead}`}
181
+ </span>
182
+ )}
183
+ </div>
184
+ {!loading && (
185
+ <ErrorBoundary>
186
+ <AttentionHeatmap
187
+ matrix={matrix}
188
+ tokens={data?.tokens}
189
+ selectedToken={selectedToken}
190
+ onSelectToken={setSelectedToken}
191
+ />
192
+ </ErrorBoundary>
193
+ )}
194
+ </div>
195
+ </main>
196
+ </div>
197
+ </div>
198
+ );
199
+ }
frontend/src/assets/react.svg ADDED
frontend/src/assets/vite.svg ADDED
frontend/src/components/AttentionHeatmap.jsx ADDED
@@ -0,0 +1,272 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // src/components/AttentionHeatmap.jsx
2
+ // Pure SVG heatmap β€” zero external dependencies, works everywhere
3
+ import { useRef, useEffect, useCallback } from 'react';
4
+
5
+ /** Interpolate between two hex colors by t ∈ [0,1] */
6
+ function lerpColor(a, b, t) {
7
+ const ah = parseInt(a.slice(1), 16);
8
+ const bh = parseInt(b.slice(1), 16);
9
+ const ar = (ah >> 16) & 0xff, ag = (ah >> 8) & 0xff, ab = ah & 0xff;
10
+ const br = (bh >> 16) & 0xff, bg = (bh >> 8) & 0xff, bb = bh & 0xff;
11
+ const r = Math.round(ar + (br - ar) * t);
12
+ const g = Math.round(ag + (bg - ag) * t);
13
+ const b2 = Math.round(ab + (bb - ab) * t);
14
+ return `rgb(${r},${g},${b2})`;
15
+ }
16
+
17
+ /** Map a value [0,1] through our purple→gold colorscale */
18
+ function heatColor(v) {
19
+ const stops = [
20
+ [0, '#080b14'],
21
+ [0.15, '#1e1b4b'],
22
+ [0.35, '#312e81'],
23
+ [0.5, '#4f46e5'],
24
+ [0.65, '#7c3aed'],
25
+ [0.82, '#c026d3'],
26
+ [1.0, '#f59e0b'],
27
+ ];
28
+ for (let i = 0; i < stops.length - 1; i++) {
29
+ const [t0, c0] = stops[i];
30
+ const [t1, c1] = stops[i + 1];
31
+ if (v <= t1) {
32
+ const t = (v - t0) / (t1 - t0);
33
+ return lerpColor(c0, c1, Math.max(0, Math.min(1, t)));
34
+ }
35
+ }
36
+ return stops[stops.length - 1][1];
37
+ }
38
+
39
+ export default function AttentionHeatmap({ matrix, tokens, selectedToken, onSelectToken }) {
40
+ const canvasRef = useRef(null);
41
+
42
+ /* ── Draw on canvas ─────────────────────────────────────────────────────── */
43
+ useEffect(() => {
44
+ const canvas = canvasRef.current;
45
+ if (!canvas || !matrix || !tokens || tokens.length === 0) return;
46
+
47
+ const ctx = canvas.getContext('2d');
48
+ const S = tokens.length;
49
+
50
+ const LABEL_W = 88; // left axis label area
51
+ const LABEL_H = 80; // bottom axis label area
52
+ const PAD_R = 24; // right padding
53
+ const PAD_T = 12; // top padding
54
+
55
+ const availW = canvas.width - LABEL_W - PAD_R;
56
+ const availH = canvas.height - LABEL_H - PAD_T;
57
+ const cell = Math.max(4, Math.min(Math.floor(availW / S), Math.floor(availH / S)));
58
+ const gridW = cell * S;
59
+ const gridH = cell * S;
60
+ const originX = LABEL_W;
61
+ const originY = PAD_T;
62
+
63
+ // Clear
64
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
65
+
66
+ // Background
67
+ ctx.fillStyle = 'rgba(13,17,32,0.0)';
68
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
69
+
70
+ // Draw cells
71
+ for (let r = 0; r < S; r++) {
72
+ for (let c = 0; c < S; c++) {
73
+ const val = matrix[r]?.[c] ?? 0;
74
+ ctx.fillStyle = heatColor(val);
75
+ ctx.fillRect(originX + c * cell, originY + r * cell, cell - 1, cell - 1);
76
+ }
77
+ }
78
+
79
+ // Selected token: highlight row + col
80
+ if (selectedToken !== null && selectedToken < S) {
81
+ ctx.fillStyle = 'rgba(99,102,241,0.18)';
82
+ // Row
83
+ ctx.fillRect(originX, originY + selectedToken * cell, gridW, cell);
84
+ // Col
85
+ ctx.fillRect(originX + selectedToken * cell, originY, cell, gridH);
86
+ // Border row
87
+ ctx.strokeStyle = 'rgba(99,102,241,0.7)';
88
+ ctx.lineWidth = 1.5;
89
+ ctx.strokeRect(originX, originY + selectedToken * cell, gridW, cell);
90
+ ctx.strokeRect(originX + selectedToken * cell, originY, cell, gridH);
91
+ }
92
+
93
+ // Y-axis labels (query tokens, left side)
94
+ ctx.fillStyle = '#8b9ec7';
95
+ ctx.font = `${Math.max(8, Math.min(11, cell - 2))}px JetBrains Mono, monospace`;
96
+ ctx.textAlign = 'right';
97
+ ctx.textBaseline = 'middle';
98
+ for (let r = 0; r < S; r++) {
99
+ const label = tokens[r].length > 10 ? tokens[r].slice(0, 9) + '…' : tokens[r];
100
+ const y = originY + r * cell + cell / 2;
101
+ if (r === selectedToken) {
102
+ ctx.fillStyle = '#a5b4fc';
103
+ ctx.font = `bold ${Math.max(8, Math.min(11, cell - 2))}px JetBrains Mono, monospace`;
104
+ } else {
105
+ ctx.fillStyle = '#8b9ec7';
106
+ ctx.font = `${Math.max(8, Math.min(11, cell - 2))}px JetBrains Mono, monospace`;
107
+ }
108
+ ctx.fillText(label, originX - 6, y);
109
+ }
110
+
111
+ // X-axis labels (key tokens, bottom, rotated)
112
+ ctx.textAlign = 'right';
113
+ ctx.textBaseline = 'top';
114
+ for (let c = 0; c < S; c++) {
115
+ const label = tokens[c].length > 10 ? tokens[c].slice(0, 9) + '…' : tokens[c];
116
+ const x = originX + c * cell + cell / 2;
117
+ if (c === selectedToken) {
118
+ ctx.fillStyle = '#a5b4fc';
119
+ ctx.font = `bold ${Math.max(8, Math.min(11, cell - 2))}px JetBrains Mono, monospace`;
120
+ } else {
121
+ ctx.fillStyle = '#8b9ec7';
122
+ ctx.font = `${Math.max(8, Math.min(11, cell - 2))}px JetBrains Mono, monospace`;
123
+ }
124
+ ctx.save();
125
+ ctx.translate(x, originY + gridH + 6);
126
+ ctx.rotate(-Math.PI / 4);
127
+ ctx.fillText(label, 0, 0);
128
+ ctx.restore();
129
+ }
130
+
131
+ // Axis titles
132
+ ctx.fillStyle = '#4b5a7a';
133
+ ctx.font = '10px Inter, sans-serif';
134
+ ctx.textAlign = 'center';
135
+ ctx.textBaseline = 'bottom';
136
+ ctx.fillText('Key (attended to)', originX + gridW / 2, canvas.height);
137
+
138
+ ctx.save();
139
+ ctx.translate(10, originY + gridH / 2);
140
+ ctx.rotate(-Math.PI / 2);
141
+ ctx.textAlign = 'center';
142
+ ctx.textBaseline = 'top';
143
+ ctx.fillText('Query (attends from)', 0, 0);
144
+ ctx.restore();
145
+
146
+ // Colorbar
147
+ const cbX = originX + gridW + 8;
148
+ const cbW = 12;
149
+ const cbH = gridH;
150
+ const grad = ctx.createLinearGradient(0, originY, 0, originY + cbH);
151
+ grad.addColorStop(0, '#f59e0b');
152
+ grad.addColorStop(0.18, '#c026d3');
153
+ grad.addColorStop(0.35, '#7c3aed');
154
+ grad.addColorStop(0.5, '#4f46e5');
155
+ grad.addColorStop(0.65, '#312e81');
156
+ grad.addColorStop(0.85, '#1e1b4b');
157
+ grad.addColorStop(1, '#080b14');
158
+ ctx.fillStyle = grad;
159
+ ctx.fillRect(cbX, originY, cbW, cbH);
160
+ ctx.strokeStyle = 'rgba(99,102,241,0.2)';
161
+ ctx.lineWidth = 1;
162
+ ctx.strokeRect(cbX, originY, cbW, cbH);
163
+ // Colorbar ticks
164
+ ctx.fillStyle = '#4b5a7a';
165
+ ctx.font = '9px JetBrains Mono, monospace';
166
+ ctx.textAlign = 'left';
167
+ for (const [frac, label] of [[0, '1.0'], [0.5, '0.5'], [1, '0.0']]) {
168
+ ctx.fillText(label, cbX + cbW + 3, originY + cbH * frac);
169
+ }
170
+ }, [matrix, tokens, selectedToken]);
171
+
172
+ /* ── Click handler ──────────────────────────────────────────────────────── */
173
+ const handleClick = useCallback((e) => {
174
+ if (!matrix || !tokens) return;
175
+ const canvas = canvasRef.current;
176
+ const rect = canvas.getBoundingClientRect();
177
+ const S = tokens.length;
178
+ const LABEL_W = 88;
179
+ const PAD_T = 12;
180
+ const availW = canvas.width - LABEL_W - 24;
181
+ const availH = canvas.height - 80 - PAD_T;
182
+ const cell = Math.max(4, Math.min(Math.floor(availW / S), Math.floor(availH / S)));
183
+ const scaleX = canvas.width / rect.width;
184
+ const scaleY = canvas.height / rect.height;
185
+ const cx = (e.clientX - rect.left) * scaleX;
186
+ const cy = (e.clientY - rect.top) * scaleY;
187
+ const col = Math.floor((cx - LABEL_W) / cell);
188
+ const row = Math.floor((cy - PAD_T) / cell);
189
+ if (row >= 0 && row < S && col >= 0 && col < S) {
190
+ onSelectToken(selectedToken === row ? null : row);
191
+ }
192
+ }, [matrix, tokens, selectedToken, onSelectToken]);
193
+
194
+ /* ── Hover handler β€” show tooltip ───────────────────────────────────────── */
195
+ const tooltipRef = useRef(null);
196
+ const handleMouseMove = useCallback((e) => {
197
+ if (!matrix || !tokens) return;
198
+ const canvas = canvasRef.current;
199
+ const tooltip = tooltipRef.current;
200
+ const rect = canvas.getBoundingClientRect();
201
+ const S = tokens.length;
202
+ const LABEL_W = 88;
203
+ const PAD_T = 12;
204
+ const availW = canvas.width - LABEL_W - 24;
205
+ const availH = canvas.height - 80 - PAD_T;
206
+ const cell = Math.max(4, Math.min(Math.floor(availW / S), Math.floor(availH / S)));
207
+ const scaleX = canvas.width / rect.width;
208
+ const scaleY = canvas.height / rect.height;
209
+ const cx = (e.clientX - rect.left) * scaleX;
210
+ const cy = (e.clientY - rect.top) * scaleY;
211
+ const col = Math.floor((cx - LABEL_W) / cell);
212
+ const row = Math.floor((cy - PAD_T) / cell);
213
+ if (row >= 0 && row < S && col >= 0 && col < S) {
214
+ const val = matrix[row]?.[col] ?? 0;
215
+ tooltip.style.display = 'block';
216
+ tooltip.style.left = `${e.clientX - rect.left + 12}px`;
217
+ tooltip.style.top = `${e.clientY - rect.top - 32}px`;
218
+ tooltip.innerHTML =
219
+ `<b>${tokens[row]}</b> β†’ <b>${tokens[col]}</b><br/>` +
220
+ `weight: <span style="color:#f59e0b">${val.toFixed(4)}</span>`;
221
+ } else {
222
+ tooltip.style.display = 'none';
223
+ }
224
+ }, [matrix, tokens]);
225
+
226
+ const handleMouseLeave = () => {
227
+ if (tooltipRef.current) tooltipRef.current.style.display = 'none';
228
+ };
229
+
230
+ if (!matrix || matrix.length === 0) {
231
+ return (
232
+ <div className="empty-state">
233
+ <div className="empty-icon">πŸ”­</div>
234
+ <h3>No attention data yet</h3>
235
+ <p>Enter a sentence and click Analyze Attention to visualise the weights.</p>
236
+ </div>
237
+ );
238
+ }
239
+
240
+ return (
241
+ <div style={{ position: 'relative', width: '100%' }} className="fade-in">
242
+ <canvas
243
+ ref={canvasRef}
244
+ width={820}
245
+ height={480}
246
+ style={{ width: '100%', height: 'auto', cursor: 'crosshair', borderRadius: 8 }}
247
+ onClick={handleClick}
248
+ onMouseMove={handleMouseMove}
249
+ onMouseLeave={handleMouseLeave}
250
+ />
251
+ {/* Tooltip */}
252
+ <div
253
+ ref={tooltipRef}
254
+ style={{
255
+ display: 'none',
256
+ position: 'absolute',
257
+ pointerEvents: 'none',
258
+ background: '#111827',
259
+ border: '1px solid #6366f1',
260
+ borderRadius: 6,
261
+ padding: '6px 10px',
262
+ fontSize: 12,
263
+ fontFamily: 'JetBrains Mono, monospace',
264
+ color: '#f0f4ff',
265
+ whiteSpace: 'nowrap',
266
+ zIndex: 10,
267
+ boxShadow: '0 4px 12px rgba(0,0,0,0.5)',
268
+ }}
269
+ />
270
+ </div>
271
+ );
272
+ }
frontend/src/components/ErrorBoundary.jsx ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // src/components/ErrorBoundary.jsx
2
+ import { Component } from 'react';
3
+
4
+ export default class ErrorBoundary extends Component {
5
+ constructor(props) {
6
+ super(props);
7
+ this.state = { hasError: false, message: '' };
8
+ }
9
+
10
+ static getDerivedStateFromError(err) {
11
+ return { hasError: true, message: err?.message ?? String(err) };
12
+ }
13
+
14
+ componentDidCatch(err, info) {
15
+ console.error('ErrorBoundary caught:', err, info);
16
+ }
17
+
18
+ render() {
19
+ if (this.state.hasError) {
20
+ return (
21
+ <div className="error-banner" style={{ margin: 16 }}>
22
+ <span>⚠️</span>
23
+ <div>
24
+ <strong>Component error</strong>
25
+ <div style={{ fontSize: 11, marginTop: 4, fontFamily: 'JetBrains Mono' }}>
26
+ {this.state.message}
27
+ </div>
28
+ </div>
29
+ <button
30
+ onClick={() => this.setState({ hasError: false, message: '' })}
31
+ style={{ marginLeft: 'auto', background: 'none', border: 'none',
32
+ color: '#fca5a5', cursor: 'pointer', fontSize: 18 }}
33
+ >
34
+ β†Ί
35
+ </button>
36
+ </div>
37
+ );
38
+ }
39
+ return this.props.children;
40
+ }
41
+ }
frontend/src/components/InfoPanel.jsx ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // src/components/InfoPanel.jsx
2
+ export default function InfoPanel({ data, modelMeta }) {
3
+ if (!data) return null;
4
+
5
+ const { tokens, n_layers, n_heads, model_type } = data;
6
+
7
+ const stats = [
8
+ { label: 'Tokens', value: tokens.length, accent: true },
9
+ { label: 'Layers', value: n_layers },
10
+ { label: 'Heads', value: n_heads },
11
+ { label: 'Type', value: model_type, accent: model_type === 'decoder' },
12
+ { label: 'Total Matrices', value: n_layers * n_heads, accent: false },
13
+ ];
14
+
15
+ return (
16
+ <div className="info-panel fade-in">
17
+ {stats.map((s) => (
18
+ <div className="info-stat" key={s.label}>
19
+ <div className="info-stat-label">{s.label}</div>
20
+ <div className={`info-stat-value ${s.accent ? 'accent' : ''}`}>{s.value}</div>
21
+ </div>
22
+ ))}
23
+ {modelMeta && (
24
+ <div className="info-stat" style={{ gridColumn: 'span 2' }}>
25
+ <div className="info-stat-label">Model</div>
26
+ <div className="info-stat-value" style={{ fontSize: 12, fontFamily: 'Inter' }}>
27
+ {modelMeta.label}
28
+ </div>
29
+ </div>
30
+ )}
31
+ </div>
32
+ );
33
+ }
frontend/src/components/LayerHeadControls.jsx ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // src/components/LayerHeadControls.jsx
2
+
3
+ export default function LayerHeadControls({
4
+ nLayers,
5
+ nHeads,
6
+ selectedLayer,
7
+ selectedHead,
8
+ avgHeads,
9
+ onLayerChange,
10
+ onHeadChange,
11
+ onAvgToggle,
12
+ disabled,
13
+ }) {
14
+ if (!nLayers) return null;
15
+
16
+ const heads = Array.from({ length: nHeads }, (_, i) => i);
17
+
18
+ return (
19
+ <div className="card">
20
+ <div className="card-title">Layer &amp; Head</div>
21
+ <div className="lhc-sliders">
22
+ {/* Layer slider */}
23
+ <div className="slider-group">
24
+ <label>
25
+ Layer
26
+ <span>{selectedLayer}</span>
27
+ </label>
28
+ <input
29
+ id="layer-slider"
30
+ type="range"
31
+ min={0}
32
+ max={nLayers - 1}
33
+ value={selectedLayer}
34
+ onChange={(e) => onLayerChange(Number(e.target.value))}
35
+ disabled={disabled}
36
+ style={{
37
+ background: `linear-gradient(
38
+ to right,
39
+ var(--accent) 0%,
40
+ var(--accent) ${(selectedLayer / (nLayers - 1)) * 100}%,
41
+ var(--bg-input) ${(selectedLayer / (nLayers - 1)) * 100}%,
42
+ var(--bg-input) 100%
43
+ )`,
44
+ }}
45
+ />
46
+ <div style={{ display: 'flex', justifyContent: 'space-between', fontSize: 10, color: 'var(--text-muted)', marginTop: 4 }}>
47
+ <span>0</span><span>{nLayers - 1}</span>
48
+ </div>
49
+ </div>
50
+
51
+ {/* Head selector */}
52
+ <div className="slider-group">
53
+ <label>
54
+ Head
55
+ <span>{avgHeads ? 'avg' : selectedHead}</span>
56
+ </label>
57
+ <div className="head-grid">
58
+ {heads.map((h) => (
59
+ <button
60
+ key={h}
61
+ id={`head-btn-${h}`}
62
+ className={`head-btn ${!avgHeads && selectedHead === h ? 'active' : ''}`}
63
+ onClick={() => { onHeadChange(h); if (avgHeads) onAvgToggle(); }}
64
+ disabled={disabled}
65
+ >
66
+ {h}
67
+ </button>
68
+ ))}
69
+ </div>
70
+
71
+ {/* Average toggle */}
72
+ <button
73
+ className={`avg-toggle ${avgHeads ? 'active' : ''}`}
74
+ onClick={onAvgToggle}
75
+ disabled={disabled}
76
+ >
77
+ {avgHeads ? 'βœ“ Averaging All Heads' : 'βŠ• Average All Heads'}
78
+ </button>
79
+ </div>
80
+ </div>
81
+ </div>
82
+ );
83
+ }
frontend/src/components/ModelSelector.jsx ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // src/components/ModelSelector.jsx
2
+ export default function ModelSelector({ models, selected, onSelect, disabled }) {
3
+ return (
4
+ <div className="card">
5
+ <div className="card-title">Model</div>
6
+ <div className="model-cards">
7
+ {models.map((m) => (
8
+ <button
9
+ key={m.id}
10
+ className={`model-card ${selected === m.id ? 'selected' : ''}`}
11
+ onClick={() => !disabled && onSelect(m.id)}
12
+ disabled={disabled}
13
+ title={`${m.size_mb} MB`}
14
+ >
15
+ <div className="model-card-header">
16
+ <span className="model-card-label">{m.label}</span>
17
+ <span className={`model-type-badge ${m.type}`}>{m.type}</span>
18
+ </div>
19
+ <div className="model-card-desc">{m.description}</div>
20
+ </button>
21
+ ))}
22
+ </div>
23
+ </div>
24
+ );
25
+ }
frontend/src/components/TextInput.jsx ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // src/components/TextInput.jsx
2
+ import { useState } from 'react';
3
+
4
+ const MAX = 400;
5
+
6
+ const EXAMPLES = [
7
+ 'The cat sat on the mat and watched the dog sleep.',
8
+ 'Attention is all you need to understand transformers.',
9
+ 'The bank can guarantee deposits will eventually cover future tuition costs.',
10
+ 'She saw the man with the telescope on the hill.',
11
+ ];
12
+
13
+ export default function TextInput({ value, onChange, onSubmit, loading }) {
14
+ const [showExamples, setShowExamples] = useState(false);
15
+
16
+ return (
17
+ <div className="card text-input-wrap">
18
+ <div className="card-title">Input Text</div>
19
+ <textarea
20
+ id="text-input"
21
+ value={value}
22
+ onChange={(e) => onChange(e.target.value.slice(0, MAX))}
23
+ placeholder="Type or paste a sentence…"
24
+ maxLength={MAX}
25
+ rows={4}
26
+ onKeyDown={(e) => {
27
+ if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) onSubmit();
28
+ }}
29
+ />
30
+ <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginTop: 8 }}>
31
+ <button
32
+ style={{
33
+ background: 'none',
34
+ border: 'none',
35
+ color: 'var(--text-muted)',
36
+ fontSize: 11,
37
+ cursor: 'pointer',
38
+ padding: '2px 0',
39
+ textDecoration: 'underline dotted',
40
+ }}
41
+ onClick={() => setShowExamples((v) => !v)}
42
+ >
43
+ {showExamples ? 'hide examples' : 'load example'}
44
+ </button>
45
+ <div className="char-count">{value.length} / {MAX}</div>
46
+ </div>
47
+
48
+ {showExamples && (
49
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 6, marginTop: 10 }} className="fade-in">
50
+ {EXAMPLES.map((ex, i) => (
51
+ <button
52
+ key={i}
53
+ onClick={() => { onChange(ex); setShowExamples(false); }}
54
+ style={{
55
+ textAlign: 'left',
56
+ background: 'var(--bg-input)',
57
+ border: '1px solid var(--border)',
58
+ borderRadius: 'var(--radius-sm)',
59
+ color: 'var(--text-secondary)',
60
+ fontSize: 12,
61
+ padding: '7px 10px',
62
+ cursor: 'pointer',
63
+ transition: 'all var(--transition)',
64
+ fontFamily: 'Inter, sans-serif',
65
+ }}
66
+ onMouseEnter={(e) => e.currentTarget.style.borderColor = 'var(--border-hover)'}
67
+ onMouseLeave={(e) => e.currentTarget.style.borderColor = 'var(--border)'}
68
+ >
69
+ {ex}
70
+ </button>
71
+ ))}
72
+ </div>
73
+ )}
74
+
75
+ <button
76
+ className="btn-analyze"
77
+ style={{ marginTop: 14 }}
78
+ onClick={onSubmit}
79
+ disabled={loading || !value.trim()}
80
+ id="analyze-btn"
81
+ >
82
+ {loading ? '⏳ Analyzing…' : '⚑ Analyze Attention'}
83
+ </button>
84
+ <div style={{ fontSize: 10, color: 'var(--text-muted)', marginTop: 8, textAlign: 'center' }}>
85
+ ⌘ + Enter to run
86
+ </div>
87
+ </div>
88
+ );
89
+ }
frontend/src/components/TokenRow.jsx ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // src/components/TokenRow.jsx
2
+
3
+ /**
4
+ * Displays tokens as colored chips.
5
+ * Heat-maps each token by its average attention *to* the selected token
6
+ * (column of the attention matrix for the selected source token).
7
+ */
8
+ export default function TokenRow({ tokens, matrix, selectedToken, onSelectToken }) {
9
+ if (!tokens || tokens.length === 0) return null;
10
+
11
+ // Compute max for normalisation
12
+ let maxVal = 0;
13
+ if (matrix && selectedToken !== null) {
14
+ const row = matrix[selectedToken] ?? [];
15
+ maxVal = Math.max(...row, 1e-9);
16
+ }
17
+
18
+ const getColor = (idx) => {
19
+ if (!matrix || selectedToken === null) {
20
+ return { bg: 'var(--bg-input)', color: 'var(--text-secondary)' };
21
+ }
22
+ const val = (matrix[selectedToken]?.[idx] ?? 0) / maxVal;
23
+ // Gradient: dark-blue β†’ indigo β†’ gold
24
+ const r = Math.round(99 + (245 - 99) * val);
25
+ const g = Math.round(102 + (158 - 102) * val);
26
+ const b = Math.round(241 + (11 - 241) * val);
27
+ const alpha = 0.15 + val * 0.55;
28
+ return {
29
+ bg: `rgba(${r},${g},${b},${alpha})`,
30
+ color: val > 0.5 ? '#fff' : 'var(--text-secondary)',
31
+ borderColor: val > 0.3 ? `rgba(${r},${g},${b},0.7)` : 'var(--border)',
32
+ };
33
+ };
34
+
35
+ return (
36
+ <div className="card fade-in">
37
+ <div className="card-title">
38
+ Tokens
39
+ {selectedToken !== null && (
40
+ <span style={{ fontFamily: 'JetBrains Mono', fontSize: 11, color: 'var(--accent-3)', marginLeft: 8 }}>
41
+ query: {tokens[selectedToken]}
42
+ </span>
43
+ )}
44
+ </div>
45
+ <div className="token-row-wrap">
46
+ {tokens.map((tok, i) => {
47
+ const style = getColor(i);
48
+ return (
49
+ <button
50
+ key={i}
51
+ id={`token-${i}`}
52
+ className={`token-chip ${selectedToken === i ? 'selected' : ''}`}
53
+ style={{
54
+ background: style.bg,
55
+ color: style.color,
56
+ borderColor: style.borderColor ?? 'var(--border)',
57
+ }}
58
+ onClick={() => onSelectToken(selectedToken === i ? null : i)}
59
+ title={`Token ${i}: ${tok}`}
60
+ >
61
+ {tok}
62
+ </button>
63
+ );
64
+ })}
65
+ </div>
66
+ {selectedToken === null && tokens.length > 0 && (
67
+ <div style={{ fontSize: 11, color: 'var(--text-muted)', marginTop: 10 }}>
68
+ ↑ Click a token to highlight attention weights
69
+ </div>
70
+ )}
71
+ </div>
72
+ );
73
+ }
frontend/src/index.css ADDED
@@ -0,0 +1,564 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ── Design Tokens ──────────────────────────────────────────────────────── */
2
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
3
+
4
+ :root {
5
+ --bg-base: #080b14;
6
+ --bg-surface: #0d1120;
7
+ --bg-card: #111827;
8
+ --bg-glass: rgba(17, 24, 39, 0.72);
9
+ --bg-input: #161f32;
10
+ --border: rgba(99, 130, 255, 0.18);
11
+ --border-hover: rgba(99, 130, 255, 0.45);
12
+
13
+ --accent: #6366f1; /* indigo */
14
+ --accent-glow: rgba(99, 102, 241, 0.35);
15
+ --accent-2: #8b5cf6; /* violet */
16
+ --accent-3: #06b6d4; /* cyan */
17
+ --gold: #f59e0b;
18
+
19
+ --text-primary: #f0f4ff;
20
+ --text-secondary: #8b9ec7;
21
+ --text-muted: #4b5a7a;
22
+
23
+ --heat-0: #0d1120;
24
+ --heat-100: #f59e0b;
25
+
26
+ --radius-sm: 6px;
27
+ --radius-md: 12px;
28
+ --radius-lg: 20px;
29
+ --radius-xl: 28px;
30
+
31
+ --shadow-card: 0 4px 32px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.3);
32
+ --shadow-glow: 0 0 24px var(--accent-glow);
33
+
34
+ --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
35
+ }
36
+
37
+ /* ── Reset ────────────────────────────────────────────────────────────────── */
38
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
39
+ html { scroll-behavior: smooth; }
40
+
41
+ body {
42
+ font-family: 'Inter', system-ui, sans-serif;
43
+ background: var(--bg-base);
44
+ color: var(--text-primary);
45
+ min-height: 100vh;
46
+ overflow-x: hidden;
47
+ /* subtle grid pattern */
48
+ background-image:
49
+ linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
50
+ linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
51
+ background-size: 32px 32px;
52
+ }
53
+
54
+ /* ── Scrollbar ────────────────────────────────────────────────────────────── */
55
+ ::-webkit-scrollbar { width: 6px; height: 6px; }
56
+ ::-webkit-scrollbar-track { background: transparent; }
57
+ ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
58
+ ::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
59
+
60
+ /* ── Layout ───────────────────────────────────────────────────────────────── */
61
+ #root { min-height: 100vh; display: flex; flex-direction: column; }
62
+
63
+ .app-shell {
64
+ display: flex;
65
+ flex-direction: column;
66
+ min-height: 100vh;
67
+ max-width: 1440px;
68
+ margin: 0 auto;
69
+ width: 100%;
70
+ padding: 0 24px 48px;
71
+ }
72
+
73
+ /* ── Header ───────────────────────────────────────────────────────────────── */
74
+ .app-header {
75
+ display: flex;
76
+ align-items: center;
77
+ gap: 16px;
78
+ padding: 28px 0 20px;
79
+ border-bottom: 1px solid var(--border);
80
+ margin-bottom: 28px;
81
+ }
82
+
83
+ .app-logo {
84
+ width: 40px;
85
+ height: 40px;
86
+ border-radius: var(--radius-md);
87
+ background: linear-gradient(135deg, var(--accent), var(--accent-2));
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: center;
91
+ font-size: 20px;
92
+ box-shadow: var(--shadow-glow);
93
+ flex-shrink: 0;
94
+ }
95
+
96
+ .app-title {
97
+ font-size: 22px;
98
+ font-weight: 700;
99
+ background: linear-gradient(135deg, #fff 40%, var(--accent-3));
100
+ -webkit-background-clip: text;
101
+ -webkit-text-fill-color: transparent;
102
+ background-clip: text;
103
+ }
104
+
105
+ .app-subtitle {
106
+ font-size: 13px;
107
+ color: var(--text-secondary);
108
+ margin-top: 2px;
109
+ font-weight: 400;
110
+ }
111
+
112
+ .header-badge {
113
+ margin-left: auto;
114
+ font-size: 11px;
115
+ font-weight: 600;
116
+ letter-spacing: 0.08em;
117
+ text-transform: uppercase;
118
+ color: var(--accent-3);
119
+ background: rgba(6,182,212,0.12);
120
+ border: 1px solid rgba(6,182,212,0.25);
121
+ padding: 4px 12px;
122
+ border-radius: 99px;
123
+ }
124
+
125
+ /* ── Main Grid ────────────────────────────────────────────────────────────── */
126
+ .main-grid {
127
+ display: grid;
128
+ grid-template-columns: 340px 1fr;
129
+ gap: 20px;
130
+ flex: 1;
131
+ }
132
+
133
+ @media (max-width: 900px) {
134
+ .main-grid { grid-template-columns: 1fr; }
135
+ }
136
+
137
+ /* ── Cards / Glass ────────────────────────────────────────────────────────── */
138
+ .card {
139
+ background: var(--bg-glass);
140
+ border: 1px solid var(--border);
141
+ border-radius: var(--radius-lg);
142
+ padding: 24px;
143
+ box-shadow: var(--shadow-card);
144
+ backdrop-filter: blur(14px);
145
+ -webkit-backdrop-filter: blur(14px);
146
+ }
147
+
148
+ .card-title {
149
+ font-size: 11px;
150
+ font-weight: 600;
151
+ letter-spacing: 0.1em;
152
+ text-transform: uppercase;
153
+ color: var(--text-secondary);
154
+ margin-bottom: 16px;
155
+ display: flex;
156
+ align-items: center;
157
+ gap: 8px;
158
+ }
159
+
160
+ .card-title::before {
161
+ content: '';
162
+ display: inline-block;
163
+ width: 3px;
164
+ height: 14px;
165
+ border-radius: 2px;
166
+ background: linear-gradient(var(--accent), var(--accent-2));
167
+ }
168
+
169
+ /* ── Left Panel ───────────────────────────────────────────────────────────── */
170
+ .left-panel {
171
+ display: flex;
172
+ flex-direction: column;
173
+ gap: 16px;
174
+ }
175
+
176
+ /* ── Text Input ───────────────────────────────────────────────────────────── */
177
+ .text-input-wrap textarea {
178
+ width: 100%;
179
+ background: var(--bg-input);
180
+ border: 1px solid var(--border);
181
+ border-radius: var(--radius-md);
182
+ color: var(--text-primary);
183
+ font-family: 'Inter', sans-serif;
184
+ font-size: 14px;
185
+ line-height: 1.7;
186
+ padding: 14px 16px;
187
+ resize: vertical;
188
+ min-height: 120px;
189
+ outline: none;
190
+ transition: border-color var(--transition), box-shadow var(--transition);
191
+ }
192
+
193
+ .text-input-wrap textarea:focus {
194
+ border-color: var(--accent);
195
+ box-shadow: 0 0 0 3px var(--accent-glow);
196
+ }
197
+
198
+ .text-input-wrap textarea::placeholder { color: var(--text-muted); }
199
+
200
+ .char-count {
201
+ text-align: right;
202
+ font-size: 11px;
203
+ color: var(--text-muted);
204
+ margin-top: 6px;
205
+ font-variant-numeric: tabular-nums;
206
+ }
207
+
208
+ /* ── Analyze Button ───────────────────────────────────────────────────────── */
209
+ .btn-analyze {
210
+ width: 100%;
211
+ padding: 13px;
212
+ border: none;
213
+ border-radius: var(--radius-md);
214
+ font-family: 'Inter', sans-serif;
215
+ font-size: 14px;
216
+ font-weight: 600;
217
+ cursor: pointer;
218
+ background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
219
+ color: #fff;
220
+ letter-spacing: 0.02em;
221
+ transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
222
+ box-shadow: 0 4px 16px var(--accent-glow);
223
+ position: relative;
224
+ overflow: hidden;
225
+ }
226
+
227
+ .btn-analyze::after {
228
+ content: '';
229
+ position: absolute;
230
+ inset: 0;
231
+ background: linear-gradient(rgba(255,255,255,0.1), transparent);
232
+ opacity: 0;
233
+ transition: opacity var(--transition);
234
+ }
235
+
236
+ .btn-analyze:hover:not(:disabled)::after { opacity: 1; }
237
+ .btn-analyze:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 24px var(--accent-glow); }
238
+ .btn-analyze:active:not(:disabled) { transform: translateY(0); }
239
+ .btn-analyze:disabled { opacity: 0.5; cursor: not-allowed; }
240
+
241
+ /* ── Model Selector ───────────────────────────────────────────────────────── */
242
+ .model-cards {
243
+ display: flex;
244
+ flex-direction: column;
245
+ gap: 8px;
246
+ }
247
+
248
+ .model-card {
249
+ border: 1px solid var(--border);
250
+ border-radius: var(--radius-md);
251
+ padding: 12px 14px;
252
+ cursor: pointer;
253
+ transition: border-color var(--transition), background var(--transition), transform var(--transition);
254
+ background: var(--bg-input);
255
+ position: relative;
256
+ overflow: hidden;
257
+ }
258
+
259
+ .model-card.selected {
260
+ border-color: var(--accent);
261
+ background: rgba(99,102,241,0.08);
262
+ box-shadow: 0 0 0 1px var(--accent);
263
+ }
264
+
265
+ .model-card:hover:not(.selected) { border-color: var(--border-hover); transform: translateX(2px); }
266
+
267
+ .model-card-header {
268
+ display: flex;
269
+ align-items: center;
270
+ justify-content: space-between;
271
+ margin-bottom: 4px;
272
+ }
273
+
274
+ .model-card-label {
275
+ font-size: 13px;
276
+ font-weight: 600;
277
+ color: var(--text-primary);
278
+ }
279
+
280
+ .model-type-badge {
281
+ font-size: 10px;
282
+ font-weight: 600;
283
+ letter-spacing: 0.06em;
284
+ text-transform: uppercase;
285
+ padding: 2px 8px;
286
+ border-radius: 99px;
287
+ }
288
+
289
+ .model-type-badge.encoder {
290
+ background: rgba(99,102,241,0.15);
291
+ color: #818cf8;
292
+ border: 1px solid rgba(99,102,241,0.3);
293
+ }
294
+
295
+ .model-type-badge.decoder {
296
+ background: rgba(6,182,212,0.12);
297
+ color: #22d3ee;
298
+ border: 1px solid rgba(6,182,212,0.25);
299
+ }
300
+
301
+ .model-card-desc {
302
+ font-size: 11px;
303
+ color: var(--text-muted);
304
+ }
305
+
306
+ .model-card.selected .model-card-label { color: #a5b4fc; }
307
+
308
+ /* ── Layer/Head Controls ──────────────────────────────────────────────────── */
309
+ .lhc-sliders { display: flex; flex-direction: column; gap: 18px; }
310
+
311
+ .slider-group label {
312
+ display: flex;
313
+ justify-content: space-between;
314
+ align-items: center;
315
+ font-size: 12px;
316
+ color: var(--text-secondary);
317
+ margin-bottom: 10px;
318
+ }
319
+
320
+ .slider-group label span {
321
+ font-family: 'JetBrains Mono', monospace;
322
+ font-size: 12px;
323
+ color: var(--accent-3);
324
+ background: rgba(6,182,212,0.1);
325
+ padding: 1px 8px;
326
+ border-radius: 4px;
327
+ }
328
+
329
+ input[type=range] {
330
+ -webkit-appearance: none;
331
+ width: 100%;
332
+ height: 4px;
333
+ border-radius: 99px;
334
+ background: var(--bg-input);
335
+ outline: none;
336
+ cursor: pointer;
337
+ }
338
+
339
+ input[type=range]::-webkit-slider-thumb {
340
+ -webkit-appearance: none;
341
+ width: 18px;
342
+ height: 18px;
343
+ border-radius: 50%;
344
+ background: linear-gradient(135deg, var(--accent), var(--accent-2));
345
+ box-shadow: 0 0 8px var(--accent-glow);
346
+ cursor: pointer;
347
+ transition: transform var(--transition);
348
+ }
349
+
350
+ input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
351
+
352
+ .head-grid {
353
+ display: grid;
354
+ grid-template-columns: repeat(6, 1fr);
355
+ gap: 6px;
356
+ margin-top: 8px;
357
+ }
358
+
359
+ .head-btn {
360
+ aspect-ratio: 1;
361
+ border: 1px solid var(--border);
362
+ border-radius: var(--radius-sm);
363
+ background: var(--bg-input);
364
+ color: var(--text-secondary);
365
+ font-size: 11px;
366
+ font-family: 'JetBrains Mono', monospace;
367
+ cursor: pointer;
368
+ transition: all var(--transition);
369
+ display: flex;
370
+ align-items: center;
371
+ justify-content: center;
372
+ padding: 0;
373
+ }
374
+
375
+ .head-btn:hover { border-color: var(--border-hover); color: var(--text-primary); }
376
+ .head-btn.active {
377
+ border-color: var(--accent);
378
+ background: rgba(99,102,241,0.2);
379
+ color: #a5b4fc;
380
+ box-shadow: 0 0 8px var(--accent-glow);
381
+ }
382
+
383
+ .avg-toggle {
384
+ width: 100%;
385
+ padding: 9px;
386
+ margin-top: 10px;
387
+ border: 1px solid var(--border);
388
+ border-radius: var(--radius-md);
389
+ background: transparent;
390
+ color: var(--text-secondary);
391
+ font-family: 'Inter', sans-serif;
392
+ font-size: 12px;
393
+ font-weight: 500;
394
+ cursor: pointer;
395
+ transition: all var(--transition);
396
+ }
397
+
398
+ .avg-toggle:hover { border-color: var(--accent-3); color: var(--accent-3); }
399
+ .avg-toggle.active {
400
+ background: rgba(6,182,212,0.1);
401
+ border-color: var(--accent-3);
402
+ color: var(--accent-3);
403
+ }
404
+
405
+ /* ── Right Panel ──────────────────────────────────────────────────────────── */
406
+ .right-panel {
407
+ display: flex;
408
+ flex-direction: column;
409
+ gap: 16px;
410
+ min-width: 0;
411
+ }
412
+
413
+ /* ── Token Row ────────────────────────────────────────────────────────────── */
414
+ .token-row-wrap {
415
+ display: flex;
416
+ flex-wrap: wrap;
417
+ gap: 6px;
418
+ align-items: center;
419
+ min-height: 40px;
420
+ }
421
+
422
+ .token-chip {
423
+ font-family: 'JetBrains Mono', monospace;
424
+ font-size: 12px;
425
+ padding: 5px 10px;
426
+ border-radius: var(--radius-sm);
427
+ border: 1px solid transparent;
428
+ cursor: pointer;
429
+ transition: all var(--transition);
430
+ white-space: nowrap;
431
+ user-select: none;
432
+ position: relative;
433
+ }
434
+
435
+ .token-chip:hover { transform: translateY(-2px); }
436
+ .token-chip.selected { border-color: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
437
+
438
+ /* ── Heatmap Panel ────────────────────────────────────────────────────────── */
439
+ .heatmap-container {
440
+ flex: 1;
441
+ min-height: 420px;
442
+ position: relative;
443
+ }
444
+
445
+ .heatmap-container .plotly-container {
446
+ width: 100% !important;
447
+ height: 100% !important;
448
+ min-height: 420px;
449
+ }
450
+
451
+ /* ── Info Panel ───────────────────────────────────────────────────────────── */
452
+ .info-panel {
453
+ display: grid;
454
+ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
455
+ gap: 10px;
456
+ }
457
+
458
+ .info-stat {
459
+ background: var(--bg-input);
460
+ border: 1px solid var(--border);
461
+ border-radius: var(--radius-md);
462
+ padding: 12px 16px;
463
+ display: flex;
464
+ flex-direction: column;
465
+ gap: 4px;
466
+ }
467
+
468
+ .info-stat-label {
469
+ font-size: 10px;
470
+ font-weight: 600;
471
+ letter-spacing: 0.08em;
472
+ text-transform: uppercase;
473
+ color: var(--text-muted);
474
+ }
475
+
476
+ .info-stat-value {
477
+ font-family: 'JetBrains Mono', monospace;
478
+ font-size: 18px;
479
+ font-weight: 700;
480
+ color: var(--text-primary);
481
+ }
482
+
483
+ .info-stat-value.accent { color: var(--accent-3); }
484
+
485
+ /* ── Loading State ────────────────────────────────────────────────────────── */
486
+ .loading-overlay {
487
+ display: flex;
488
+ flex-direction: column;
489
+ align-items: center;
490
+ justify-content: center;
491
+ gap: 16px;
492
+ padding: 60px 20px;
493
+ color: var(--text-secondary);
494
+ font-size: 14px;
495
+ }
496
+
497
+ .spinner {
498
+ width: 40px;
499
+ height: 40px;
500
+ border: 3px solid var(--border);
501
+ border-top-color: var(--accent);
502
+ border-radius: 50%;
503
+ animation: spin 0.8s linear infinite;
504
+ }
505
+
506
+ @keyframes spin { to { transform: rotate(360deg); } }
507
+
508
+ .loading-model-name {
509
+ font-family: 'JetBrains Mono', monospace;
510
+ font-size: 12px;
511
+ color: var(--accent-3);
512
+ }
513
+
514
+ /* ── Empty State ───────────────────────��──────────────────────────────────── */
515
+ .empty-state {
516
+ display: flex;
517
+ flex-direction: column;
518
+ align-items: center;
519
+ justify-content: center;
520
+ gap: 12px;
521
+ padding: 60px 20px;
522
+ color: var(--text-muted);
523
+ text-align: center;
524
+ }
525
+
526
+ .empty-icon {
527
+ font-size: 48px;
528
+ opacity: 0.4;
529
+ animation: float 3s ease-in-out infinite;
530
+ }
531
+
532
+ @keyframes float {
533
+ 0%, 100% { transform: translateY(0); }
534
+ 50% { transform: translateY(-6px); }
535
+ }
536
+
537
+ .empty-state h3 { font-size: 16px; color: var(--text-secondary); font-weight: 600; }
538
+ .empty-state p { font-size: 13px; line-height: 1.6; max-width: 280px; }
539
+
540
+ /* ── Error ────────────────────────────────────────────────────────────────── */
541
+ .error-banner {
542
+ background: rgba(239,68,68,0.1);
543
+ border: 1px solid rgba(239,68,68,0.3);
544
+ border-radius: var(--radius-md);
545
+ padding: 12px 16px;
546
+ font-size: 13px;
547
+ color: #fca5a5;
548
+ display: flex;
549
+ align-items: flex-start;
550
+ gap: 8px;
551
+ }
552
+
553
+ /* ── Subtle animations ─────────────────────────────────────────────────────── */
554
+ @keyframes fadeIn {
555
+ from { opacity: 0; transform: translateY(8px); }
556
+ to { opacity: 1; transform: translateY(0); }
557
+ }
558
+
559
+ .fade-in { animation: fadeIn 0.35s ease forwards; }
560
+
561
+ /* ── Plotly dark overrides ─────────────────────────────────────────────────── */
562
+ .js-plotly-plot .plotly .modebar { background: transparent !important; }
563
+ .js-plotly-plot .plotly .modebar-btn path { fill: var(--text-muted) !important; }
564
+ .js-plotly-plot .plotly .modebar-btn:hover path { fill: var(--text-primary) !important; }
frontend/src/main.jsx ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import { StrictMode } from 'react'
2
+ import { createRoot } from 'react-dom/client'
3
+ import './index.css'
4
+ import App from './App.jsx'
5
+
6
+ createRoot(document.getElementById('root')).render(
7
+ <StrictMode>
8
+ <App />
9
+ </StrictMode>,
10
+ )
frontend/vite.config.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ // https://vite.dev/config/
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ server: {
8
+ proxy: {
9
+ '/api': {
10
+ target: 'http://localhost:8000',
11
+ changeOrigin: true,
12
+ },
13
+ },
14
+ },
15
+ })
run.sh ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # run.sh β€” Start both backend (FastAPI) and frontend (Vite) with one command
3
+ # Usage: ./run.sh
4
+ set -euo pipefail
5
+
6
+ ROOT="$(cd "$(dirname "$0")" && pwd)"
7
+ BACKEND="$ROOT/backend"
8
+ FRONTEND="$ROOT/frontend"
9
+
10
+ # ── Detect the right Python (miniforge > conda > system) ─────────────────────
11
+ PYTHON=""
12
+ for candidate in \
13
+ "$HOME/miniforge3/bin/python3" \
14
+ "$HOME/miniconda3/bin/python3" \
15
+ "$HOME/anaconda3/bin/python3" \
16
+ "$(which python3 2>/dev/null)"; do
17
+ if [ -x "$candidate" ]; then
18
+ PYTHON="$candidate"
19
+ break
20
+ fi
21
+ done
22
+
23
+ if [ -z "$PYTHON" ]; then
24
+ echo "❌ Could not find python3. Install miniforge or conda."
25
+ exit 1
26
+ fi
27
+
28
+ UVICORN="$(dirname "$PYTHON")/uvicorn"
29
+ if [ ! -x "$UVICORN" ]; then
30
+ echo "❌ uvicorn not found at $UVICORN"
31
+ echo " Run: $PYTHON -m pip install uvicorn fastapi transformers torch"
32
+ exit 1
33
+ fi
34
+
35
+ echo ""
36
+ echo "🧠 Attention Visualizer"
37
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
38
+ echo " Python : $PYTHON"
39
+ echo " Uvicorn : $UVICORN"
40
+ echo ""
41
+
42
+ # ── Free ports if something is already using them ────────────────────────────
43
+ free_port() {
44
+ local port=$1
45
+ local pids
46
+ pids=$(lsof -ti:"$port" 2>/dev/null || true)
47
+ if [ -n "$pids" ]; then
48
+ echo "⚠️ Freeing port $port (PIDs: $pids)"
49
+ echo "$pids" | xargs kill -9 2>/dev/null || true
50
+ sleep 0.5
51
+ fi
52
+ }
53
+ free_port 8000
54
+ free_port 5173
55
+
56
+ # ── Cleanup handler β€” kill both child processes on Ctrl+C ────────────────────
57
+ BACKEND_PID=""
58
+ FRONTEND_PID=""
59
+
60
+ cleanup() {
61
+ echo ""
62
+ echo "πŸ›‘ Shutting down…"
63
+ [ -n "$BACKEND_PID" ] && kill "$BACKEND_PID" 2>/dev/null || true
64
+ [ -n "$FRONTEND_PID" ] && kill "$FRONTEND_PID" 2>/dev/null || true
65
+ wait 2>/dev/null || true
66
+ echo "βœ… All stopped. Bye!"
67
+ exit 0
68
+ }
69
+ trap cleanup INT TERM
70
+
71
+ # ── Start FastAPI backend ─────────────────────────────────────────────────────
72
+ echo "πŸš€ Starting backend β†’ http://localhost:8000"
73
+ (cd "$BACKEND" && "$UVICORN" main:app --host 0.0.0.0 --port 8000) &
74
+ BACKEND_PID=$!
75
+
76
+ # Give the backend a moment to start
77
+ sleep 2
78
+
79
+ # ── Install frontend deps if node_modules is missing ─────────────────────────
80
+ if [ ! -d "$FRONTEND/node_modules" ]; then
81
+ echo "πŸ“¦ Installing frontend npm packages…"
82
+ (cd "$FRONTEND" && npm install --silent)
83
+ fi
84
+
85
+ # ── Start Vite dev server ─────────────────────────────────────────────────────
86
+ echo "🎨 Starting frontend β†’ http://localhost:5173"
87
+ (cd "$FRONTEND" && npm run dev -- --port 5173) &
88
+ FRONTEND_PID=$!
89
+
90
+ echo ""
91
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
92
+ echo "✨ Both servers running!"
93
+ echo " App : http://localhost:5173"
94
+ echo " API docs : http://localhost:8000/docs"
95
+ echo ""
96
+ echo " Press Ctrl+C to stop everything."
97
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
98
+
99
+ # ── Wait β€” exit if either server dies ────────────────────────────────────────
100
+ wait $BACKEND_PID $FRONTEND_PID
start.sh ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # start.sh β€” One-shot launcher for Attention Visualizer
3
+ set -euo pipefail
4
+
5
+ ROOT="$(cd "$(dirname "$0")" && pwd)"
6
+ BACKEND="$ROOT/backend"
7
+ FRONTEND="$ROOT/frontend"
8
+
9
+ echo ""
10
+ echo "🧠 Attention Visualizer β€” Setup & Launch"
11
+ echo "════════════════════════════════════════"
12
+
13
+ # ── Backend ────────────────────────────────────────────────────────────────
14
+ echo ""
15
+ echo "πŸ“¦ Installing backend dependencies…"
16
+ pip install -q -r "$BACKEND/requirements.txt"
17
+ echo "βœ… Backend deps installed."
18
+
19
+ # ── Frontend ───────────────────────────────────────────────────────────────
20
+ echo ""
21
+ echo "πŸ“¦ Installing frontend dependencies…"
22
+ cd "$FRONTEND"
23
+ npm install --silent
24
+ echo "βœ… Frontend deps installed."
25
+
26
+ # ── Start FastAPI backend ──────────────────────────────────────────────────
27
+ echo ""
28
+ echo "πŸš€ Starting FastAPI backend on http://localhost:8000 …"
29
+ cd "$BACKEND"
30
+ uvicorn main:app --reload --host 0.0.0.0 --port 8000 &
31
+ BACKEND_PID=$!
32
+ echo " Backend PID: $BACKEND_PID"
33
+
34
+ # ── Start Vite dev server ──────────────────────────────────────────────────
35
+ echo ""
36
+ echo "🎨 Starting Vite dev server on http://localhost:5173 …"
37
+ cd "$FRONTEND"
38
+ npm run dev &
39
+ FRONTEND_PID=$!
40
+ echo " Frontend PID: $FRONTEND_PID"
41
+
42
+ echo ""
43
+ echo "════════════════════════════════════════"
44
+ echo "✨ App running!"
45
+ echo " Frontend: http://localhost:5173"
46
+ echo " API docs: http://localhost:8000/docs"
47
+ echo ""
48
+ echo "Press Ctrl+C to stop both servers."
49
+ echo "════════════════════════════════════════"
50
+
51
+ # Wait for either process to exit
52
+ wait $BACKEND_PID $FRONTEND_PID