diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index a6f844d..0000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# Keep captured command output verbatim, including terminal whitespace. -evidence/r2/*.log -whitespace diff --git a/.gitignore b/.gitignore deleted file mode 100644 index d049e3b..0000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules/ -.astro/ -dist/ -.DS_Store -evidence/r2/local-screens/ diff --git a/README.md b/README.md index 631dd14..794cb6a 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,42 @@ -# askclaw.dev +# AskClaw 🦀 -AskClaw 官网源码。首页 = AMBER(琥珀式封存的历史回放评测)主站;`/amber/` 重定向回首页。 +端到端实现一人公司(OPC)。 +用 AI agents 构建、运行、扩展一个人的公司。 -The askclaw.dev site source. The homepage IS the AMBER site (sealed-replay evaluation); `/amber/` redirects to `/`. +Build, run & scale your one-person company end-to-end with AI agents. -## 结构 +## 我们在构建 / What we build -- `index.html` / `en.html` — 首页(中/英) -- `amber/` — 重定向页 -- `assets/` — 图(PNG 兜底 + Vega-Lite spec + 自托管 vega/vega-embed) +AskClaw 构建面向一人公司和小团队的 agentic AI 工作流:产品、工程、运营、支持、增长,从想法到交付端到端完成。 -## 部署(DEPLOY) +AskClaw builds agentic AI workflows for one-person companies and small teams: product, engineering, operations, support, and growth — from idea to delivery. -托管:26430 的 Caddy,文档根 `/var/www/askclaw-site`,域名块在 `/etc/caddy/Caddyfile`(改前必备份,改后 `caddy validate && systemctl reload caddy`)。 +## 方向 / Focus -同步流程(在 2651 上): +- 一人公司(OPC)的端到端 AI 工作流 + End-to-end AI workflows for one-person companies -```bash -cd ~/2609/askclaw-dev-site # 编辑工作区 -tar czf /tmp/site.tgz index.html en.html amber assets -scp /tmp/site.tgz 26430.tail744929.ts.net:/tmp/ -ssh 26430.tail744929.ts.net 'sudo tar xzf /tmp/site.tgz -C /var/www/askclaw-site' -``` +- OpenClaw、Hermes、多 agent 协作 + OpenClaw, Hermes, and multi-agent collaboration -改完务必同步本仓(PR → review → merge)。图的真源在 [getaskclaw/amber](https://github.com/getaskclaw/amber) 的 `docs/images/`。 +- 开发者工具、自动化、异步执行 + Developer tools, automation, and async-first execution + +- 让人和 AI agents 一起把真实工作做完 + Helping humans and AI agents finish real work together + +## 链接 / Links + +- Website: https://askclaw.dev +- X: https://x.com/GetAskClaw +- GitHub: https://github.com/getaskclaw + +## 文档 / Docs + +- [AskClaw docs](docs/README.md) ## 联系 / Contact +- Admin: admin@askclaw.dev - GitHub: github@askclaw.dev - Security: security@askclaw.dev diff --git a/amber/en.html b/amber/en.html deleted file mode 100644 index 9601ab2..0000000 --- a/amber/en.html +++ /dev/null @@ -1 +0,0 @@ -→ askclaw.dev/en diff --git a/amber/index.html b/amber/index.html deleted file mode 100644 index 36dcae2..0000000 --- a/amber/index.html +++ /dev/null @@ -1 +0,0 @@ -→ askclaw.dev diff --git a/assets/completion-matrix-7way.en.png b/assets/completion-matrix-7way.en.png deleted file mode 100644 index d4b0f29..0000000 Binary files a/assets/completion-matrix-7way.en.png and /dev/null differ diff --git a/assets/completion-matrix-7way.png b/assets/completion-matrix-7way.png deleted file mode 100644 index da77549..0000000 Binary files a/assets/completion-matrix-7way.png and /dev/null differ diff --git a/assets/effort-curves-20260911.en.png b/assets/effort-curves-20260911.en.png deleted file mode 100644 index ed26347..0000000 Binary files a/assets/effort-curves-20260911.en.png and /dev/null differ diff --git a/assets/effort-curves-20260911.png b/assets/effort-curves-20260911.png deleted file mode 100644 index 60ff9dd..0000000 Binary files a/assets/effort-curves-20260911.png and /dev/null differ diff --git a/assets/score-vs-tokens-2026-w37.en.png b/assets/score-vs-tokens-2026-w37.en.png deleted file mode 100644 index 56aa07b..0000000 Binary files a/assets/score-vs-tokens-2026-w37.en.png and /dev/null differ diff --git a/assets/score-vs-tokens-2026-w37.png b/assets/score-vs-tokens-2026-w37.png deleted file mode 100644 index 2df72b0..0000000 Binary files a/assets/score-vs-tokens-2026-w37.png and /dev/null differ diff --git a/assets/specs/completion-matrix-7way.en.vega-lite.json b/assets/specs/completion-matrix-7way.en.vega-lite.json deleted file mode 100644 index cabc0e8..0000000 --- a/assets/specs/completion-matrix-7way.en.vega-lite.json +++ /dev/null @@ -1,826 +0,0 @@ -{ - "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "width": 620, - "height": 372, - "title": { - "text": "Five-way 17/23 tie + doubao 16/23 + gp27b 14/23: nine-axis completion matrix (21-case subset)", - "subtitle": "bigger dot = higher completion; doubao verification axes = 3600s-makeup real scores (addendum 1); gp27b = one-shot snapshot of a community self-hosted endpoint (effort knob proven inert)", - "fontSize": 15, - "subtitleFontSize": 11 - }, - "layer": [ - { - "data": { - "values": [ - { - "key": "Vision", - "lane": "k3 @ Kimi official coding", - "value": 0.778 - }, - { - "key": "UI", - "lane": "k3 @ Kimi official coding", - "value": 0.0 - }, - { - "key": "Requirements", - "lane": "k3 @ Kimi official coding", - "value": 1.0 - }, - { - "key": "Ops", - "lane": "k3 @ Kimi official coding", - "value": 1.0 - }, - { - "key": "Review", - "lane": "k3 @ Kimi official coding", - "value": 0.556 - }, - { - "key": "Attribution", - "lane": "k3 @ Kimi official coding", - "value": 0.667 - }, - { - "key": "Defense", - "lane": "k3 @ Kimi official coding", - "value": 0.389 - }, - { - "key": "Delivery", - "lane": "k3 @ Kimi official coding", - "value": 1.0 - }, - { - "key": "Coding", - "lane": "k3 @ Kimi official coding", - "value": 0.958 - }, - { - "key": "Coding", - "lane": "v4.1-flash @ CommandCode", - "value": 0.958 - }, - { - "key": "Delivery", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "Defense", - "lane": "v4.1-flash @ CommandCode", - "value": 0.611 - }, - { - "key": "Attribution", - "lane": "v4.1-flash @ CommandCode", - "value": 0.867 - }, - { - "key": "Review", - "lane": "v4.1-flash @ CommandCode", - "value": 0.556 - }, - { - "key": "Ops", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "Requirements", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "UI", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "Vision", - "lane": "v4.1-flash @ CommandCode", - "value": 0.333 - }, - { - "key": "Coding", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.958 - }, - { - "key": "Delivery", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "Defense", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.389 - }, - { - "key": "Attribution", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.933 - }, - { - "key": "Review", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.667 - }, - { - "key": "Ops", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "Requirements", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "UI", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.917 - }, - { - "key": "Vision", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.778 - }, - { - "key": "Coding", - "lane": "v4.1-flash @ Ollama", - "value": 0.958 - }, - { - "key": "Delivery", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "Defense", - "lane": "v4.1-flash @ Ollama", - "value": 0.389 - }, - { - "key": "Attribution", - "lane": "v4.1-flash @ Ollama", - "value": 0.467 - }, - { - "key": "Review", - "lane": "v4.1-flash @ Ollama", - "value": 0.667 - }, - { - "key": "Ops", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "Requirements", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "UI", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "Vision", - "lane": "v4.1-flash @ Ollama", - "value": 0.222 - }, - { - "key": "Coding", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.958 - }, - { - "key": "Delivery", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "Defense", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.333 - }, - { - "key": "Attribution", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.933 - }, - { - "key": "Review", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.556 - }, - { - "key": "Ops", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "Requirements", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "UI", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "Vision", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.333 - }, - { - "key": "Coding", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.958 - }, - { - "key": "Delivery", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 1.0 - }, - { - "key": "Defense", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.5 - }, - { - "key": "Attribution", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.467 - }, - { - "key": "Review", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.333 - }, - { - "key": "Ops", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 1.0 - }, - { - "key": "Requirements", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 1.0 - }, - { - "key": "UI", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.0 - }, - { - "key": "Vision", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.0 - }, - { - "key": "Coding", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.833 - }, - { - "key": "Delivery", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 1.0 - }, - { - "key": "Attribution", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.4 - }, - { - "key": "Ops", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.967 - }, - { - "key": "Requirements", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 1.0 - }, - { - "key": "UI", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.0 - }, - { - "key": "Vision", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.0 - }, - { - "key": "Review", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.0 - }, - { - "key": "Defense", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.389 - } - ] - }, - "encoding": { - "x": { - "field": "key", - "type": "nominal", - "sort": [ - "Coding", - "Delivery", - "Attribution", - "Ops", - "Requirements", - "UI", - "Vision", - "Review", - "Defense" - ], - "title": null, - "axis": { - "labelFontSize": 13, - "labelAngle": 0, - "domain": false, - "ticks": false - } - }, - "y": { - "field": "lane", - "type": "nominal", - "sort": [ - "k3 @ Kimi official coding", - "hy4-preview-f @ WorkBuddy", - "v4.1-flash @ CommandCode", - "glm-5.3-flash @ Ollama", - "v4.1-flash @ Ollama", - "doubao-seed-evolving @ Ark Agent Plan", - "Qwen3.8-27B @ goldenpotato self-hosted" - ], - "title": null, - "axis": { - "labelFontSize": 12, - "labelLimit": 0, - "domain": false, - "ticks": false - } - }, - "color": { - "field": "lane", - "type": "nominal", - "scale": { - "domain": [ - "k3 @ Kimi official coding", - "hy4-preview-f @ WorkBuddy", - "v4.1-flash @ CommandCode", - "glm-5.3-flash @ Ollama", - "v4.1-flash @ Ollama", - "doubao-seed-evolving @ Ark Agent Plan", - "Qwen3.8-27B @ goldenpotato self-hosted" - ], - "range": [ - "#26C6DA", - "#2e8b57", - "#2a9d8f", - "#e76f51", - "#8d6fd1", - "#f4a261", - "#e9c46a" - ] - }, - "legend": null - }, - "size": { - "field": "value", - "type": "quantitative", - "scale": { - "domain": [ - 0, - 1 - ], - "range": [ - 90, - 420 - ] - }, - "legend": null - } - }, - "mark": { - "type": "point", - "filled": true, - "opacity": 0.95, - "stroke": "#bbb", - "strokeWidth": 1, - "tooltip": true - } - }, - { - "data": { - "values": [ - { - "key": "Vision", - "lane": "k3 @ Kimi official coding", - "value": 0.778 - }, - { - "key": "UI", - "lane": "k3 @ Kimi official coding", - "value": 0.0 - }, - { - "key": "Requirements", - "lane": "k3 @ Kimi official coding", - "value": 1.0 - }, - { - "key": "Ops", - "lane": "k3 @ Kimi official coding", - "value": 1.0 - }, - { - "key": "Review", - "lane": "k3 @ Kimi official coding", - "value": 0.556 - }, - { - "key": "Attribution", - "lane": "k3 @ Kimi official coding", - "value": 0.667 - }, - { - "key": "Defense", - "lane": "k3 @ Kimi official coding", - "value": 0.389 - }, - { - "key": "Delivery", - "lane": "k3 @ Kimi official coding", - "value": 1.0 - }, - { - "key": "Coding", - "lane": "k3 @ Kimi official coding", - "value": 0.958 - }, - { - "key": "Coding", - "lane": "v4.1-flash @ CommandCode", - "value": 0.958 - }, - { - "key": "Delivery", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "Defense", - "lane": "v4.1-flash @ CommandCode", - "value": 0.611 - }, - { - "key": "Attribution", - "lane": "v4.1-flash @ CommandCode", - "value": 0.867 - }, - { - "key": "Review", - "lane": "v4.1-flash @ CommandCode", - "value": 0.556 - }, - { - "key": "Ops", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "Requirements", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "UI", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "Vision", - "lane": "v4.1-flash @ CommandCode", - "value": 0.333 - }, - { - "key": "Coding", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.958 - }, - { - "key": "Delivery", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "Defense", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.389 - }, - { - "key": "Attribution", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.933 - }, - { - "key": "Review", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.667 - }, - { - "key": "Ops", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "Requirements", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "UI", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.917 - }, - { - "key": "Vision", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.778 - }, - { - "key": "Coding", - "lane": "v4.1-flash @ Ollama", - "value": 0.958 - }, - { - "key": "Delivery", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "Defense", - "lane": "v4.1-flash @ Ollama", - "value": 0.389 - }, - { - "key": "Attribution", - "lane": "v4.1-flash @ Ollama", - "value": 0.467 - }, - { - "key": "Review", - "lane": "v4.1-flash @ Ollama", - "value": 0.667 - }, - { - "key": "Ops", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "Requirements", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "UI", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "Vision", - "lane": "v4.1-flash @ Ollama", - "value": 0.222 - }, - { - "key": "Coding", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.958 - }, - { - "key": "Delivery", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "Defense", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.333 - }, - { - "key": "Attribution", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.933 - }, - { - "key": "Review", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.556 - }, - { - "key": "Ops", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "Requirements", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "UI", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "Vision", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.333 - }, - { - "key": "Coding", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.958 - }, - { - "key": "Delivery", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 1.0 - }, - { - "key": "Defense", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.5 - }, - { - "key": "Attribution", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.467 - }, - { - "key": "Review", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.333 - }, - { - "key": "Ops", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 1.0 - }, - { - "key": "Requirements", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 1.0 - }, - { - "key": "UI", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.0 - }, - { - "key": "Vision", - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "value": 0.0 - }, - { - "key": "Coding", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.833 - }, - { - "key": "Delivery", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 1.0 - }, - { - "key": "Attribution", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.4 - }, - { - "key": "Ops", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.967 - }, - { - "key": "Requirements", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 1.0 - }, - { - "key": "UI", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.0 - }, - { - "key": "Vision", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.0 - }, - { - "key": "Review", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.0 - }, - { - "key": "Defense", - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "value": 0.389 - } - ] - }, - "encoding": { - "x": { - "field": "key", - "type": "nominal", - "sort": [ - "Coding", - "Delivery", - "Attribution", - "Ops", - "Requirements", - "UI", - "Vision", - "Review", - "Defense" - ], - "title": null, - "axis": { - "labelFontSize": 13, - "labelAngle": 0, - "domain": false, - "ticks": false - } - }, - "y": { - "field": "lane", - "type": "nominal", - "sort": [ - "k3 @ Kimi official coding", - "hy4-preview-f @ WorkBuddy", - "v4.1-flash @ CommandCode", - "glm-5.3-flash @ Ollama", - "v4.1-flash @ Ollama", - "doubao-seed-evolving @ Ark Agent Plan", - "Qwen3.8-27B @ goldenpotato self-hosted" - ], - "title": null, - "axis": { - "labelFontSize": 12, - "labelLimit": 0, - "domain": false, - "ticks": false - } - }, - "color": { - "field": "lane", - "type": "nominal", - "scale": { - "domain": [ - "k3 @ Kimi official coding", - "hy4-preview-f @ WorkBuddy", - "v4.1-flash @ CommandCode", - "glm-5.3-flash @ Ollama", - "v4.1-flash @ Ollama", - "doubao-seed-evolving @ Ark Agent Plan", - "Qwen3.8-27B @ goldenpotato self-hosted" - ], - "range": [ - "#26C6DA", - "#2e8b57", - "#2a9d8f", - "#e76f51", - "#8d6fd1", - "#f4a261", - "#e9c46a" - ] - }, - "legend": null - }, - "text": { - "field": "value", - "format": ".2f" - } - }, - "mark": { - "type": "text", - "fontSize": 10, - "dy": 16, - "color": "#555" - } - } - ] -} \ No newline at end of file diff --git a/assets/specs/completion-matrix-7way.vega-lite.json b/assets/specs/completion-matrix-7way.vega-lite.json deleted file mode 100644 index 8ebaf7c..0000000 --- a/assets/specs/completion-matrix-7way.vega-lite.json +++ /dev/null @@ -1,826 +0,0 @@ -{ - "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "width": 620, - "height": 372, - "title": { - "text": "五家 17/23 + doubao 16/23 + gp27b 14/23:九轴完成度矩阵(21 案子集)", - "subtitle": "点越大 = 该面完成度越高;doubao 核验两轴为 3600s 补考真值(addendum 1);gp27b = 社区自部署端点一次性快照(effort 旋钮实证无效,按端点默认档记)", - "fontSize": 15, - "subtitleFontSize": 11 - }, - "layer": [ - { - "data": { - "values": [ - { - "key": "视觉", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.778 - }, - { - "key": "UI", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.0 - }, - { - "key": "需求", - "lane": "k3 @ Kimi 官方 coding", - "value": 1.0 - }, - { - "key": "运维", - "lane": "k3 @ Kimi 官方 coding", - "value": 1.0 - }, - { - "key": "审查", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.556 - }, - { - "key": "归因", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.667 - }, - { - "key": "防御", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.389 - }, - { - "key": "交付", - "lane": "k3 @ Kimi 官方 coding", - "value": 1.0 - }, - { - "key": "编码", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.958 - }, - { - "key": "编码", - "lane": "v4.1-flash @ CommandCode", - "value": 0.958 - }, - { - "key": "交付", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "防御", - "lane": "v4.1-flash @ CommandCode", - "value": 0.611 - }, - { - "key": "归因", - "lane": "v4.1-flash @ CommandCode", - "value": 0.867 - }, - { - "key": "审查", - "lane": "v4.1-flash @ CommandCode", - "value": 0.556 - }, - { - "key": "运维", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "需求", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "UI", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "视觉", - "lane": "v4.1-flash @ CommandCode", - "value": 0.333 - }, - { - "key": "编码", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.958 - }, - { - "key": "交付", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "防御", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.389 - }, - { - "key": "归因", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.933 - }, - { - "key": "审查", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.667 - }, - { - "key": "运维", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "需求", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "UI", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.917 - }, - { - "key": "视觉", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.778 - }, - { - "key": "编码", - "lane": "v4.1-flash @ Ollama", - "value": 0.958 - }, - { - "key": "交付", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "防御", - "lane": "v4.1-flash @ Ollama", - "value": 0.389 - }, - { - "key": "归因", - "lane": "v4.1-flash @ Ollama", - "value": 0.467 - }, - { - "key": "审查", - "lane": "v4.1-flash @ Ollama", - "value": 0.667 - }, - { - "key": "运维", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "需求", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "UI", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "视觉", - "lane": "v4.1-flash @ Ollama", - "value": 0.222 - }, - { - "key": "编码", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.958 - }, - { - "key": "交付", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "防御", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.333 - }, - { - "key": "归因", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.933 - }, - { - "key": "审查", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.556 - }, - { - "key": "运维", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "需求", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "UI", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "视觉", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.333 - }, - { - "key": "编码", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.958 - }, - { - "key": "交付", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 1.0 - }, - { - "key": "防御", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.5 - }, - { - "key": "归因", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.467 - }, - { - "key": "审查", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.333 - }, - { - "key": "运维", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 1.0 - }, - { - "key": "需求", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 1.0 - }, - { - "key": "UI", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.0 - }, - { - "key": "视觉", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.0 - }, - { - "key": "编码", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.833 - }, - { - "key": "交付", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 1.0 - }, - { - "key": "归因", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.4 - }, - { - "key": "运维", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.967 - }, - { - "key": "需求", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 1.0 - }, - { - "key": "UI", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.0 - }, - { - "key": "视觉", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.0 - }, - { - "key": "审查", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.0 - }, - { - "key": "防御", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.389 - } - ] - }, - "encoding": { - "x": { - "field": "key", - "type": "nominal", - "sort": [ - "编码", - "交付", - "归因", - "运维", - "需求", - "UI", - "视觉", - "审查", - "防御" - ], - "title": null, - "axis": { - "labelFontSize": 13, - "labelAngle": 0, - "domain": false, - "ticks": false - } - }, - "y": { - "field": "lane", - "type": "nominal", - "sort": [ - "k3 @ Kimi 官方 coding", - "hy4-preview-f @ WorkBuddy", - "v4.1-flash @ CommandCode", - "glm-5.3-flash @ Ollama", - "v4.1-flash @ Ollama", - "doubao-seed-evolving @ 火山方舟 Agent Plan", - "Qwen3.8-27B @ goldenpotato 自部署" - ], - "title": null, - "axis": { - "labelFontSize": 12, - "labelLimit": 0, - "domain": false, - "ticks": false - } - }, - "color": { - "field": "lane", - "type": "nominal", - "scale": { - "domain": [ - "k3 @ Kimi 官方 coding", - "hy4-preview-f @ WorkBuddy", - "v4.1-flash @ CommandCode", - "glm-5.3-flash @ Ollama", - "v4.1-flash @ Ollama", - "doubao-seed-evolving @ 火山方舟 Agent Plan", - "Qwen3.8-27B @ goldenpotato 自部署" - ], - "range": [ - "#26C6DA", - "#2e8b57", - "#2a9d8f", - "#e76f51", - "#8d6fd1", - "#f4a261", - "#e9c46a" - ] - }, - "legend": null - }, - "size": { - "field": "value", - "type": "quantitative", - "scale": { - "domain": [ - 0, - 1 - ], - "range": [ - 90, - 420 - ] - }, - "legend": null - } - }, - "mark": { - "type": "point", - "filled": true, - "opacity": 0.95, - "stroke": "#bbb", - "strokeWidth": 1, - "tooltip": true - } - }, - { - "data": { - "values": [ - { - "key": "视觉", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.778 - }, - { - "key": "UI", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.0 - }, - { - "key": "需求", - "lane": "k3 @ Kimi 官方 coding", - "value": 1.0 - }, - { - "key": "运维", - "lane": "k3 @ Kimi 官方 coding", - "value": 1.0 - }, - { - "key": "审查", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.556 - }, - { - "key": "归因", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.667 - }, - { - "key": "防御", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.389 - }, - { - "key": "交付", - "lane": "k3 @ Kimi 官方 coding", - "value": 1.0 - }, - { - "key": "编码", - "lane": "k3 @ Kimi 官方 coding", - "value": 0.958 - }, - { - "key": "编码", - "lane": "v4.1-flash @ CommandCode", - "value": 0.958 - }, - { - "key": "交付", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "防御", - "lane": "v4.1-flash @ CommandCode", - "value": 0.611 - }, - { - "key": "归因", - "lane": "v4.1-flash @ CommandCode", - "value": 0.867 - }, - { - "key": "审查", - "lane": "v4.1-flash @ CommandCode", - "value": 0.556 - }, - { - "key": "运维", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "需求", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "UI", - "lane": "v4.1-flash @ CommandCode", - "value": 1.0 - }, - { - "key": "视觉", - "lane": "v4.1-flash @ CommandCode", - "value": 0.333 - }, - { - "key": "编码", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.958 - }, - { - "key": "交付", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "防御", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.389 - }, - { - "key": "归因", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.933 - }, - { - "key": "审查", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.667 - }, - { - "key": "运维", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "需求", - "lane": "glm-5.3-flash @ Ollama", - "value": 1.0 - }, - { - "key": "UI", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.917 - }, - { - "key": "视觉", - "lane": "glm-5.3-flash @ Ollama", - "value": 0.778 - }, - { - "key": "编码", - "lane": "v4.1-flash @ Ollama", - "value": 0.958 - }, - { - "key": "交付", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "防御", - "lane": "v4.1-flash @ Ollama", - "value": 0.389 - }, - { - "key": "归因", - "lane": "v4.1-flash @ Ollama", - "value": 0.467 - }, - { - "key": "审查", - "lane": "v4.1-flash @ Ollama", - "value": 0.667 - }, - { - "key": "运维", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "需求", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "UI", - "lane": "v4.1-flash @ Ollama", - "value": 1.0 - }, - { - "key": "视觉", - "lane": "v4.1-flash @ Ollama", - "value": 0.222 - }, - { - "key": "编码", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.958 - }, - { - "key": "交付", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "防御", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.333 - }, - { - "key": "归因", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.933 - }, - { - "key": "审查", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.556 - }, - { - "key": "运维", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "需求", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "UI", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 1.0 - }, - { - "key": "视觉", - "lane": "hy4-preview-f @ WorkBuddy", - "value": 0.333 - }, - { - "key": "编码", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.958 - }, - { - "key": "交付", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 1.0 - }, - { - "key": "防御", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.5 - }, - { - "key": "归因", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.467 - }, - { - "key": "审查", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.333 - }, - { - "key": "运维", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 1.0 - }, - { - "key": "需求", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 1.0 - }, - { - "key": "UI", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.0 - }, - { - "key": "视觉", - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "value": 0.0 - }, - { - "key": "编码", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.833 - }, - { - "key": "交付", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 1.0 - }, - { - "key": "归因", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.4 - }, - { - "key": "运维", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.967 - }, - { - "key": "需求", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 1.0 - }, - { - "key": "UI", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.0 - }, - { - "key": "视觉", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.0 - }, - { - "key": "审查", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.0 - }, - { - "key": "防御", - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "value": 0.389 - } - ] - }, - "encoding": { - "x": { - "field": "key", - "type": "nominal", - "sort": [ - "编码", - "交付", - "归因", - "运维", - "需求", - "UI", - "视觉", - "审查", - "防御" - ], - "title": null, - "axis": { - "labelFontSize": 13, - "labelAngle": 0, - "domain": false, - "ticks": false - } - }, - "y": { - "field": "lane", - "type": "nominal", - "sort": [ - "k3 @ Kimi 官方 coding", - "hy4-preview-f @ WorkBuddy", - "v4.1-flash @ CommandCode", - "glm-5.3-flash @ Ollama", - "v4.1-flash @ Ollama", - "doubao-seed-evolving @ 火山方舟 Agent Plan", - "Qwen3.8-27B @ goldenpotato 自部署" - ], - "title": null, - "axis": { - "labelFontSize": 12, - "labelLimit": 0, - "domain": false, - "ticks": false - } - }, - "color": { - "field": "lane", - "type": "nominal", - "scale": { - "domain": [ - "k3 @ Kimi 官方 coding", - "hy4-preview-f @ WorkBuddy", - "v4.1-flash @ CommandCode", - "glm-5.3-flash @ Ollama", - "v4.1-flash @ Ollama", - "doubao-seed-evolving @ 火山方舟 Agent Plan", - "Qwen3.8-27B @ goldenpotato 自部署" - ], - "range": [ - "#26C6DA", - "#2e8b57", - "#2a9d8f", - "#e76f51", - "#8d6fd1", - "#f4a261", - "#e9c46a" - ] - }, - "legend": null - }, - "text": { - "field": "value", - "format": ".2f" - } - }, - "mark": { - "type": "text", - "fontSize": 10, - "dy": 16, - "color": "#555" - } - } - ] -} \ No newline at end of file diff --git a/assets/specs/effort-curves-20260911.en.vega-lite.json b/assets/specs/effort-curves-20260911.en.vega-lite.json deleted file mode 100644 index a489c04..0000000 --- a/assets/specs/effort-curves-20260911.en.vega-lite.json +++ /dev/null @@ -1,327 +0,0 @@ -{ - "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "background": "white", - "title": { - "text": [ - "effort curves: top-band backlash is a family script, not a law", - "(four families, case-level pass rate %; swe-2 non-decreasing: low 15 = medium 15 < high 16 < max 18)" - ], - "fontSize": 16, - "anchor": "start" - }, - "data": { - "values": [ - { - "effort": "low", - "pct": 57.1, - "model": "gpt-6-astra-900k (21 cases)" - }, - { - "effort": "medium", - "pct": 66.7, - "model": "gpt-6-astra-900k (21 cases)" - }, - { - "effort": "high", - "pct": 66.7, - "model": "gpt-6-astra-900k (21 cases)" - }, - { - "effort": "xhigh", - "pct": 47.6, - "model": "gpt-6-astra-900k (21 cases)" - }, - { - "effort": "max", - "pct": 47.6, - "model": "gpt-6-astra-900k (21 cases)" - }, - { - "effort": "none", - "pct": 73.9, - "model": "deepseek-v4.1-flash @ cc (23 cases)" - }, - { - "effort": "low", - "pct": 65.2, - "model": "deepseek-v4.1-flash @ cc (23 cases)" - }, - { - "effort": "medium", - "pct": 65.2, - "model": "deepseek-v4.1-flash @ cc (23 cases)" - }, - { - "effort": "high", - "pct": 73.9, - "model": "deepseek-v4.1-flash @ cc (23 cases)" - }, - { - "effort": "xhigh", - "pct": 65.2, - "model": "deepseek-v4.1-flash @ cc (23 cases)" - }, - { - "effort": "high", - "pct": 73.9, - "model": "glm-5.3-flash @ ollama (23 cases)" - }, - { - "effort": "xhigh", - "pct": 52.2, - "model": "glm-5.3-flash @ ollama (23 cases)" - }, - { - "effort": "medium", - "pct": 65.2, - "model": "swe-2 @ devin (23 cases)" - }, - { - "effort": "high", - "pct": 69.6, - "model": "swe-2 @ devin (23 cases)" - }, - { - "effort": "max", - "pct": 78.3, - "model": "swe-2 @ devin (23 cases)" - }, - { - "effort": "low", - "pct": 65.2, - "model": "swe-2 @ devin (23 cases)" - } - ] - }, - "width": 640, - "height": 320, - "layer": [ - { - "mark": { - "type": "line", - "strokeWidth": 2.5, - "point": { - "size": 70, - "opacity": 1 - }, - "tooltip": true - }, - "encoding": { - "x": { - "field": "effort", - "type": "ordinal", - "sort": [ - "none", - "low", - "medium", - "high", - "xhigh", - "max" - ], - "axis": { - "title": "reasoning effort", - "labelAngle": 0 - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 40, - 85 - ] - }, - "axis": { - "title": "case-level pass rate (%)" - } - }, - "color": { - "field": "model", - "type": "nominal", - "scale": { - "range": [ - "#00838F", - "#E67E22", - "#6A5ACD", - "#8D6E63" - ] - }, - "legend": { - "title": null, - "labelLimit": 0, - "orient": "bottom" - } - } - } - }, - { - "transform": [ - { - "filter": "datum.model == \"gpt-6-astra-900k (21 cases)\"" - } - ], - "mark": { - "type": "text", - "fontSize": 11, - "color": "#555", - "align": "left", - "dx": 6, - "dy": -14 - }, - "encoding": { - "x": { - "field": "effort", - "type": "ordinal", - "sort": [ - "none", - "low", - "medium", - "high", - "xhigh", - "max" - ] - }, - "y": { - "field": "pct", - "type": "quantitative" - }, - "text": { - "field": "pct", - "type": "quantitative", - "format": ".0f" - }, - "detail": { - "field": "model", - "type": "nominal" - } - } - }, - { - "transform": [ - { - "filter": "datum.model == \"deepseek-v4.1-flash @ cc (23 cases)\"" - } - ], - "mark": { - "type": "text", - "fontSize": 11, - "color": "#555", - "align": "left", - "dx": 6, - "dy": 12 - }, - "encoding": { - "x": { - "field": "effort", - "type": "ordinal", - "sort": [ - "none", - "low", - "medium", - "high", - "xhigh", - "max" - ] - }, - "y": { - "field": "pct", - "type": "quantitative" - }, - "text": { - "field": "pct", - "type": "quantitative", - "format": ".0f" - }, - "detail": { - "field": "model", - "type": "nominal" - } - } - }, - { - "transform": [ - { - "filter": "datum.model == \"glm-5.3-flash @ ollama (23 cases)\"" - } - ], - "mark": { - "type": "text", - "fontSize": 11, - "color": "#555", - "align": "left", - "dx": 6, - "dy": -24 - }, - "encoding": { - "x": { - "field": "effort", - "type": "ordinal", - "sort": [ - "none", - "low", - "medium", - "high", - "xhigh", - "max" - ] - }, - "y": { - "field": "pct", - "type": "quantitative" - }, - "text": { - "field": "pct", - "type": "quantitative", - "format": ".0f" - }, - "detail": { - "field": "model", - "type": "nominal" - } - } - }, - { - "transform": [ - { - "filter": "datum.model == \"swe-2 @ devin (23 cases)\"" - } - ], - "mark": { - "type": "text", - "fontSize": 11, - "color": "#555", - "align": "left", - "dx": 6, - "dy": 22 - }, - "encoding": { - "x": { - "field": "effort", - "type": "ordinal", - "sort": [ - "none", - "low", - "medium", - "high", - "xhigh", - "max" - ] - }, - "y": { - "field": "pct", - "type": "quantitative" - }, - "text": { - "field": "pct", - "type": "quantitative", - "format": ".0f" - }, - "detail": { - "field": "model", - "type": "nominal" - } - } - } - ] -} \ No newline at end of file diff --git a/assets/specs/effort-curves-20260911.vega-lite.json b/assets/specs/effort-curves-20260911.vega-lite.json deleted file mode 100644 index 8f87c8d..0000000 --- a/assets/specs/effort-curves-20260911.vega-lite.json +++ /dev/null @@ -1,327 +0,0 @@ -{ - "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "background": "white", - "title": { - "text": [ - "effort 曲线:顶档反噬是家族剧本,不是定律", - "(四家族,案级通过率 %;swe-2 四档不减:low 15 = medium 15 < high 16 < max 18)" - ], - "fontSize": 16, - "anchor": "start" - }, - "data": { - "values": [ - { - "effort": "low", - "pct": 57.1, - "model": "gpt-6-astra-900k(21 案)" - }, - { - "effort": "medium", - "pct": 66.7, - "model": "gpt-6-astra-900k(21 案)" - }, - { - "effort": "high", - "pct": 66.7, - "model": "gpt-6-astra-900k(21 案)" - }, - { - "effort": "xhigh", - "pct": 47.6, - "model": "gpt-6-astra-900k(21 案)" - }, - { - "effort": "max", - "pct": 47.6, - "model": "gpt-6-astra-900k(21 案)" - }, - { - "effort": "none", - "pct": 73.9, - "model": "deepseek-v4.1-flash @ cc(23 案)" - }, - { - "effort": "low", - "pct": 65.2, - "model": "deepseek-v4.1-flash @ cc(23 案)" - }, - { - "effort": "medium", - "pct": 65.2, - "model": "deepseek-v4.1-flash @ cc(23 案)" - }, - { - "effort": "high", - "pct": 73.9, - "model": "deepseek-v4.1-flash @ cc(23 案)" - }, - { - "effort": "xhigh", - "pct": 65.2, - "model": "deepseek-v4.1-flash @ cc(23 案)" - }, - { - "effort": "high", - "pct": 73.9, - "model": "glm-5.3-flash @ ollama(23 案)" - }, - { - "effort": "xhigh", - "pct": 52.2, - "model": "glm-5.3-flash @ ollama(23 案)" - }, - { - "effort": "medium", - "pct": 65.2, - "model": "swe-2 @ devin(23 案)" - }, - { - "effort": "high", - "pct": 69.6, - "model": "swe-2 @ devin(23 案)" - }, - { - "effort": "max", - "pct": 78.3, - "model": "swe-2 @ devin(23 案)" - }, - { - "effort": "low", - "pct": 65.2, - "model": "swe-2 @ devin(23 案)" - } - ] - }, - "width": 640, - "height": 320, - "layer": [ - { - "mark": { - "type": "line", - "strokeWidth": 2.5, - "point": { - "size": 70, - "opacity": 1 - }, - "tooltip": true - }, - "encoding": { - "x": { - "field": "effort", - "type": "ordinal", - "sort": [ - "none", - "low", - "medium", - "high", - "xhigh", - "max" - ], - "axis": { - "title": "reasoning effort", - "labelAngle": 0 - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 40, - 85 - ] - }, - "axis": { - "title": "案级通过率(%)" - } - }, - "color": { - "field": "model", - "type": "nominal", - "scale": { - "range": [ - "#00838F", - "#E67E22", - "#6A5ACD", - "#8D6E63" - ] - }, - "legend": { - "title": null, - "labelLimit": 0, - "orient": "bottom" - } - } - } - }, - { - "transform": [ - { - "filter": "datum.model == \"gpt-6-astra-900k(21 案)\"" - } - ], - "mark": { - "type": "text", - "fontSize": 11, - "color": "#555", - "align": "left", - "dx": 6, - "dy": -14 - }, - "encoding": { - "x": { - "field": "effort", - "type": "ordinal", - "sort": [ - "none", - "low", - "medium", - "high", - "xhigh", - "max" - ] - }, - "y": { - "field": "pct", - "type": "quantitative" - }, - "text": { - "field": "pct", - "type": "quantitative", - "format": ".0f" - }, - "detail": { - "field": "model", - "type": "nominal" - } - } - }, - { - "transform": [ - { - "filter": "datum.model == \"deepseek-v4.1-flash @ cc(23 案)\"" - } - ], - "mark": { - "type": "text", - "fontSize": 11, - "color": "#555", - "align": "left", - "dx": 6, - "dy": 12 - }, - "encoding": { - "x": { - "field": "effort", - "type": "ordinal", - "sort": [ - "none", - "low", - "medium", - "high", - "xhigh", - "max" - ] - }, - "y": { - "field": "pct", - "type": "quantitative" - }, - "text": { - "field": "pct", - "type": "quantitative", - "format": ".0f" - }, - "detail": { - "field": "model", - "type": "nominal" - } - } - }, - { - "transform": [ - { - "filter": "datum.model == \"glm-5.3-flash @ ollama(23 案)\"" - } - ], - "mark": { - "type": "text", - "fontSize": 11, - "color": "#555", - "align": "left", - "dx": 6, - "dy": -24 - }, - "encoding": { - "x": { - "field": "effort", - "type": "ordinal", - "sort": [ - "none", - "low", - "medium", - "high", - "xhigh", - "max" - ] - }, - "y": { - "field": "pct", - "type": "quantitative" - }, - "text": { - "field": "pct", - "type": "quantitative", - "format": ".0f" - }, - "detail": { - "field": "model", - "type": "nominal" - } - } - }, - { - "transform": [ - { - "filter": "datum.model == \"swe-2 @ devin(23 案)\"" - } - ], - "mark": { - "type": "text", - "fontSize": 11, - "color": "#555", - "align": "left", - "dx": 6, - "dy": 22 - }, - "encoding": { - "x": { - "field": "effort", - "type": "ordinal", - "sort": [ - "none", - "low", - "medium", - "high", - "xhigh", - "max" - ] - }, - "y": { - "field": "pct", - "type": "quantitative" - }, - "text": { - "field": "pct", - "type": "quantitative", - "format": ".0f" - }, - "detail": { - "field": "model", - "type": "nominal" - } - } - } - ] -} \ No newline at end of file diff --git a/assets/specs/score-vs-tokens-2026-w37.en.vega-lite.json b/assets/specs/score-vs-tokens-2026-w37.en.vega-lite.json deleted file mode 100644 index 9032ddd..0000000 --- a/assets/specs/score-vs-tokens-2026-w37.en.vega-lite.json +++ /dev/null @@ -1,1201 +0,0 @@ -{ - "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "title": { - "text": [ - "output tokens x case pass rate: same high band, 17x apart in thinking budget", - "(circles = W37 board lanes; dashed diamonds = same-model effort ladders; tokens are a cost proxy, not $)" - ], - "fontSize": 16, - "anchor": "start" - }, - "data": { - "values": [ - { - "kind": "board", - "label": "g53f @ ollama", - "family": "glm", - "tokens": 840000, - "pct": 73.9, - "align": "left", - "baseline": "middle", - "dx": 10, - "dy": 0 - }, - { - "kind": "board", - "label": "v4.1f @ cc", - "family": "deepseek", - "tokens": 640000, - "pct": 73.9, - "align": "right", - "baseline": "middle", - "dx": -10, - "dy": 0 - }, - { - "kind": "board", - "label": "v4.1f @ ocgo", - "family": "deepseek", - "tokens": 720000, - "pct": 69.6, - "align": "left", - "baseline": "bottom", - "dx": 8, - "dy": -5 - }, - { - "kind": "board", - "label": "v4.1f @ ds", - "family": "deepseek", - "tokens": 820000, - "pct": 69.6, - "align": "left", - "baseline": "top", - "dx": 8, - "dy": 5 - }, - { - "kind": "board", - "label": "qwen3.8 @ crof", - "family": "qwen", - "tokens": 690000, - "pct": 69.6, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 6 - }, - { - "kind": "board", - "label": "astra-900k (h)", - "family": "gpt", - "tokens": 147000, - "pct": 69.6, - "align": "center", - "baseline": "bottom", - "dx": 0, - "dy": -10 - }, - { - "kind": "board", - "label": "luna-900k (h)", - "family": "gpt", - "tokens": 239000, - "pct": 65.2, - "align": "left", - "baseline": "top", - "dx": 8, - "dy": 10 - }, - { - "kind": "board", - "label": "0731 @ ollama", - "family": "deepseek", - "tokens": 2500000, - "pct": 65.2, - "align": "right", - "baseline": "bottom", - "dx": -8, - "dy": -8 - }, - { - "kind": "board", - "label": "0731 @ crof", - "family": "deepseek", - "tokens": 690000, - "pct": 65.2, - "align": "left", - "baseline": "top", - "dx": 10, - "dy": 2 - }, - { - "kind": "board", - "label": "sol-900k (h)", - "family": "gpt", - "tokens": 175000, - "pct": 60.9, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 10 - }, - { - "kind": "board", - "label": "v4.1f-exp @ ds", - "family": "deepseek", - "tokens": 1070000, - "pct": 60.9, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 6 - }, - { - "kind": "board", - "label": "g53f @ crof", - "family": "glm", - "tokens": 1380000, - "pct": 60.9, - "align": "left", - "baseline": "bottom", - "dx": 8, - "dy": -6 - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 77000, - "pct": 57.1, - "band": "low", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 81000, - "pct": 66.7, - "band": "medium", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 147000, - "pct": 66.7, - "band": "high", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 225000, - "pct": 47.6, - "band": "xhigh", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 195000, - "pct": 47.6, - "band": "max", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 104000, - "pct": 65.2, - "band": "medium", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 239000, - "pct": 65.2, - "band": "high", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 303000, - "pct": 65.2, - "band": "xhigh", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "sol-900k", - "family": "gpt", - "tokens": 204000, - "pct": 60.9, - "band": "medium", - "series": "sol-900k" - }, - { - "kind": "ladder", - "label": "sol-900k", - "family": "gpt", - "tokens": 175000, - "pct": 60.9, - "band": "high", - "series": "sol-900k" - } - ] - }, - "width": 700, - "height": 380, - "layer": [ - { - "data": { - "values": [ - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 77000, - "pct": 57.1, - "band": "low", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 81000, - "pct": 66.7, - "band": "medium", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 147000, - "pct": 66.7, - "band": "high", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 225000, - "pct": 47.6, - "band": "xhigh", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 195000, - "pct": 47.6, - "band": "max", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 104000, - "pct": 65.2, - "band": "medium", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 239000, - "pct": 65.2, - "band": "high", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 303000, - "pct": 65.2, - "band": "xhigh", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "sol-900k", - "family": "gpt", - "tokens": 204000, - "pct": 60.9, - "band": "medium", - "series": "sol-900k" - }, - { - "kind": "ladder", - "label": "sol-900k", - "family": "gpt", - "tokens": 175000, - "pct": 60.9, - "band": "high", - "series": "sol-900k" - } - ] - }, - "mark": { - "type": "line", - "strokeWidth": 2, - "strokeDash": [ - 4, - 3 - ], - "opacity": 0.7, - "tooltip": true - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "color": { - "field": "family", - "type": "nominal" - }, - "detail": { - "field": "series", - "type": "nominal" - } - } - }, - { - "mark": { - "type": "point", - "size": 110, - "filled": true, - "opacity": 1, - "tooltip": true - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false, - "title": "full-library output tokens (log)" - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - }, - "axis": { - "title": "case-level pass rate (%)" - } - }, - "color": { - "field": "family", - "type": "nominal", - "scale": { - "domain": [ - "deepseek", - "gpt", - "glm", - "qwen" - ], - "range": [ - "#00838F", - "#6A5ACD", - "#E67E22", - "#8D6E63" - ] - }, - "legend": { - "title": null, - "orient": "bottom" - } - }, - "shape": { - "field": "kind", - "type": "nominal", - "scale": { - "domain": [ - "board", - "ladder" - ], - "range": [ - "circle", - "diamond" - ] - }, - "legend": null - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "v4.1f @ cc", - "family": "deepseek", - "tokens": 640000, - "pct": 73.9, - "align": "right", - "baseline": "middle", - "dx": -10, - "dy": 0 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "right", - "baseline": "middle" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "g53f @ ollama", - "family": "glm", - "tokens": 840000, - "pct": 73.9, - "align": "left", - "baseline": "middle", - "dx": 10, - "dy": 0 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "left", - "baseline": "middle" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "g53f @ crof", - "family": "glm", - "tokens": 1380000, - "pct": 60.9, - "align": "left", - "baseline": "bottom", - "dx": 8, - "dy": -6 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "left", - "baseline": "bottom" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "v4.1f @ ocgo", - "family": "deepseek", - "tokens": 720000, - "pct": 69.6, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 16 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 16 - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "luna-900k (h)", - "family": "gpt", - "tokens": 239000, - "pct": 65.2, - "align": "left", - "baseline": "top", - "dx": 8, - "dy": 10 - }, - { - "kind": "board", - "label": "0731 @ crof", - "family": "deepseek", - "tokens": 690000, - "pct": 65.2, - "align": "left", - "baseline": "top", - "dx": 10, - "dy": 2 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "left", - "baseline": "top" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "v4.1f @ ds", - "family": "deepseek", - "tokens": 820000, - "pct": 69.6, - "align": "right", - "baseline": "bottom", - "dx": -8, - "dy": -14 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "right", - "baseline": "bottom", - "dx": -8, - "dy": -14 - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "sol-900k (h)", - "family": "gpt", - "tokens": 175000, - "pct": 60.9, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 10 - }, - { - "kind": "board", - "label": "v4.1f-exp @ ds", - "family": "deepseek", - "tokens": 1070000, - "pct": 60.9, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 6 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "right", - "baseline": "top" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "qwen3.8 @ crof", - "family": "qwen", - "tokens": 690000, - "pct": 69.6, - "align": "left", - "baseline": "top", - "dx": 8, - "dy": 16 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "left", - "baseline": "top", - "dx": 8, - "dy": 16 - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "astra-900k (h)", - "family": "gpt", - "tokens": 147000, - "pct": 69.6, - "align": "center", - "baseline": "bottom", - "dx": 0, - "dy": -10 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "center", - "baseline": "bottom" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "0731 @ ollama", - "family": "deepseek", - "tokens": 2500000, - "pct": 65.2, - "align": "right", - "baseline": "bottom", - "dx": -8, - "dy": -8 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "right", - "baseline": "bottom" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - } - ] -} \ No newline at end of file diff --git a/assets/specs/score-vs-tokens-2026-w37.vega-lite.json b/assets/specs/score-vs-tokens-2026-w37.vega-lite.json deleted file mode 100644 index cdf46af..0000000 --- a/assets/specs/score-vs-tokens-2026-w37.vega-lite.json +++ /dev/null @@ -1,1201 +0,0 @@ -{ - "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "title": { - "text": [ - "全库输出 token × 案级通过率:同 high 档,思考预算差 17 倍", - "(圆点 = 各道 W37 榜分;虚线菱形 = 同模型档位天梯;token 是成本代理,非美元)" - ], - "fontSize": 16, - "anchor": "start" - }, - "data": { - "values": [ - { - "kind": "board", - "label": "g53f @ ollama", - "family": "glm", - "tokens": 840000, - "pct": 73.9, - "align": "left", - "baseline": "middle", - "dx": 10, - "dy": 0 - }, - { - "kind": "board", - "label": "v4.1f @ cc", - "family": "deepseek", - "tokens": 640000, - "pct": 73.9, - "align": "right", - "baseline": "middle", - "dx": -10, - "dy": 0 - }, - { - "kind": "board", - "label": "v4.1f @ ocgo", - "family": "deepseek", - "tokens": 720000, - "pct": 69.6, - "align": "left", - "baseline": "bottom", - "dx": 8, - "dy": -5 - }, - { - "kind": "board", - "label": "v4.1f @ ds", - "family": "deepseek", - "tokens": 820000, - "pct": 69.6, - "align": "left", - "baseline": "top", - "dx": 8, - "dy": 5 - }, - { - "kind": "board", - "label": "qwen3.8 @ crof", - "family": "qwen", - "tokens": 690000, - "pct": 69.6, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 6 - }, - { - "kind": "board", - "label": "astra-900k (h)", - "family": "gpt", - "tokens": 147000, - "pct": 69.6, - "align": "center", - "baseline": "bottom", - "dx": 0, - "dy": -10 - }, - { - "kind": "board", - "label": "luna-900k (h)", - "family": "gpt", - "tokens": 239000, - "pct": 65.2, - "align": "left", - "baseline": "top", - "dx": 8, - "dy": 10 - }, - { - "kind": "board", - "label": "0731 @ ollama", - "family": "deepseek", - "tokens": 2500000, - "pct": 65.2, - "align": "right", - "baseline": "bottom", - "dx": -8, - "dy": -8 - }, - { - "kind": "board", - "label": "0731 @ crof", - "family": "deepseek", - "tokens": 690000, - "pct": 65.2, - "align": "left", - "baseline": "top", - "dx": 10, - "dy": 2 - }, - { - "kind": "board", - "label": "sol-900k (h)", - "family": "gpt", - "tokens": 175000, - "pct": 60.9, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 10 - }, - { - "kind": "board", - "label": "v4.1f-exp @ ds", - "family": "deepseek", - "tokens": 1070000, - "pct": 60.9, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 6 - }, - { - "kind": "board", - "label": "g53f @ crof", - "family": "glm", - "tokens": 1380000, - "pct": 60.9, - "align": "left", - "baseline": "bottom", - "dx": 8, - "dy": -6 - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 77000, - "pct": 57.1, - "band": "low", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 81000, - "pct": 66.7, - "band": "medium", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 147000, - "pct": 66.7, - "band": "high", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 225000, - "pct": 47.6, - "band": "xhigh", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 195000, - "pct": 47.6, - "band": "max", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 104000, - "pct": 65.2, - "band": "medium", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 239000, - "pct": 65.2, - "band": "high", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 303000, - "pct": 65.2, - "band": "xhigh", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "sol-900k", - "family": "gpt", - "tokens": 204000, - "pct": 60.9, - "band": "medium", - "series": "sol-900k" - }, - { - "kind": "ladder", - "label": "sol-900k", - "family": "gpt", - "tokens": 175000, - "pct": 60.9, - "band": "high", - "series": "sol-900k" - } - ] - }, - "width": 700, - "height": 380, - "layer": [ - { - "data": { - "values": [ - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 77000, - "pct": 57.1, - "band": "low", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 81000, - "pct": 66.7, - "band": "medium", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 147000, - "pct": 66.7, - "band": "high", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 225000, - "pct": 47.6, - "band": "xhigh", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "astra-900k", - "family": "gpt", - "tokens": 195000, - "pct": 47.6, - "band": "max", - "series": "astra-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 104000, - "pct": 65.2, - "band": "medium", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 239000, - "pct": 65.2, - "band": "high", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "luna-900k", - "family": "gpt", - "tokens": 303000, - "pct": 65.2, - "band": "xhigh", - "series": "luna-900k" - }, - { - "kind": "ladder", - "label": "sol-900k", - "family": "gpt", - "tokens": 204000, - "pct": 60.9, - "band": "medium", - "series": "sol-900k" - }, - { - "kind": "ladder", - "label": "sol-900k", - "family": "gpt", - "tokens": 175000, - "pct": 60.9, - "band": "high", - "series": "sol-900k" - } - ] - }, - "mark": { - "type": "line", - "strokeWidth": 2, - "strokeDash": [ - 4, - 3 - ], - "opacity": 0.7, - "tooltip": true - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "color": { - "field": "family", - "type": "nominal" - }, - "detail": { - "field": "series", - "type": "nominal" - } - } - }, - { - "mark": { - "type": "point", - "size": 110, - "filled": true, - "opacity": 1, - "tooltip": true - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false, - "title": "全库输出 token(log)" - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - }, - "axis": { - "title": "案级通过率(%)" - } - }, - "color": { - "field": "family", - "type": "nominal", - "scale": { - "domain": [ - "deepseek", - "gpt", - "glm", - "qwen" - ], - "range": [ - "#00838F", - "#6A5ACD", - "#E67E22", - "#8D6E63" - ] - }, - "legend": { - "title": null, - "orient": "bottom" - } - }, - "shape": { - "field": "kind", - "type": "nominal", - "scale": { - "domain": [ - "board", - "ladder" - ], - "range": [ - "circle", - "diamond" - ] - }, - "legend": null - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "v4.1f @ cc", - "family": "deepseek", - "tokens": 640000, - "pct": 73.9, - "align": "right", - "baseline": "middle", - "dx": -10, - "dy": 0 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "right", - "baseline": "middle" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "g53f @ ollama", - "family": "glm", - "tokens": 840000, - "pct": 73.9, - "align": "left", - "baseline": "middle", - "dx": 10, - "dy": 0 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "left", - "baseline": "middle" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "g53f @ crof", - "family": "glm", - "tokens": 1380000, - "pct": 60.9, - "align": "left", - "baseline": "bottom", - "dx": 8, - "dy": -6 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "left", - "baseline": "bottom" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "v4.1f @ ocgo", - "family": "deepseek", - "tokens": 720000, - "pct": 69.6, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 16 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 16 - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "luna-900k (h)", - "family": "gpt", - "tokens": 239000, - "pct": 65.2, - "align": "left", - "baseline": "top", - "dx": 8, - "dy": 10 - }, - { - "kind": "board", - "label": "0731 @ crof", - "family": "deepseek", - "tokens": 690000, - "pct": 65.2, - "align": "left", - "baseline": "top", - "dx": 10, - "dy": 2 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "left", - "baseline": "top" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "v4.1f @ ds", - "family": "deepseek", - "tokens": 820000, - "pct": 69.6, - "align": "right", - "baseline": "bottom", - "dx": -8, - "dy": -14 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "right", - "baseline": "bottom", - "dx": -8, - "dy": -14 - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "sol-900k (h)", - "family": "gpt", - "tokens": 175000, - "pct": 60.9, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 10 - }, - { - "kind": "board", - "label": "v4.1f-exp @ ds", - "family": "deepseek", - "tokens": 1070000, - "pct": 60.9, - "align": "right", - "baseline": "top", - "dx": -8, - "dy": 6 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "right", - "baseline": "top" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "qwen3.8 @ crof", - "family": "qwen", - "tokens": 690000, - "pct": 69.6, - "align": "left", - "baseline": "top", - "dx": 8, - "dy": 16 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "left", - "baseline": "top", - "dx": 8, - "dy": 16 - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "astra-900k (h)", - "family": "gpt", - "tokens": 147000, - "pct": 69.6, - "align": "center", - "baseline": "bottom", - "dx": 0, - "dy": -10 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "center", - "baseline": "bottom" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - }, - { - "data": { - "values": [ - { - "kind": "board", - "label": "0731 @ ollama", - "family": "deepseek", - "tokens": 2500000, - "pct": 65.2, - "align": "right", - "baseline": "bottom", - "dx": -8, - "dy": -8 - } - ] - }, - "mark": { - "type": "text", - "fontSize": 10, - "color": "#333", - "align": "right", - "baseline": "bottom" - }, - "encoding": { - "x": { - "field": "tokens", - "type": "quantitative", - "scale": { - "type": "log", - "domain": [ - 60000, - 4000000 - ] - }, - "axis": { - "format": "~s", - "values": [ - 100000, - 200000, - 500000, - 1000000, - 2000000 - ], - "labelFlush": false - } - }, - "y": { - "field": "pct", - "type": "quantitative", - "scale": { - "domain": [ - 44, - 80 - ] - } - }, - "text": { - "field": "label", - "type": "nominal" - }, - "dx": { - "field": "dx", - "type": "quantitative" - }, - "dy": { - "field": "dy", - "type": "quantitative" - } - } - } - ] -} \ No newline at end of file diff --git a/assets/specs/top5-2026-w38.en.vega-lite.json b/assets/specs/top5-2026-w38.en.vega-lite.json deleted file mode 100644 index 388b1c3..0000000 --- a/assets/specs/top5-2026-w38.en.vega-lite.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "background": "white", - "title": { - "text": "AMBER full board: five rank tiers (2026-W38, 23-case library)", - "fontSize": 16, - "anchor": "start" - }, - "data": { - "values": [ - { - "lane": "swe-2-max @ Devin", - "pass": 18, - "rank": "#1" - }, - { - "lane": "glm-5.3-flash @ Ollama Cloud", - "pass": 17, - "rank": "#2 tie" - }, - { - "lane": "deepseek-v4.1-flash @ CommandCode", - "pass": 17, - "rank": "#2 tie" - }, - { - "lane": "deepseek-v4.1-flash @ Ollama Cloud", - "pass": 17, - "rank": "#2 tie" - }, - { - "lane": "k3 @ Kimi official coding", - "pass": 17, - "rank": "#2 tie" - }, - { - "lane": "hy4-preview-f @ WorkBuddy", - "pass": 17, - "rank": "#2 tie" - }, - { - "lane": "gpt-6-astra-900k @ OpenAI Codex", - "pass": 16, - "rank": "#3 tie" - }, - { - "lane": "qwen3.8-27b @ CrofAI", - "pass": 16, - "rank": "#3 tie" - }, - { - "lane": "deepseek-flash @ OpenCode Go", - "pass": 16, - "rank": "#3 tie" - }, - { - "lane": "deepseek-v4.1-flash @ DeepSeek official", - "pass": 16, - "rank": "#3 tie" - }, - { - "lane": "swe-2-high @ Devin", - "pass": 16, - "rank": "#3 tie" - }, - { - "lane": "doubao-seed-evolving @ Ark Agent Plan", - "pass": 16, - "rank": "#3 tie" - }, - { - "lane": "gpt-5.6-sol-900k @ OpenAI Codex", - "pass": 15, - "rank": "#4 tie" - }, - { - "lane": "gpt-5.6-luna-900k @ OpenAI Codex", - "pass": 15, - "rank": "#4 tie" - }, - { - "lane": "deepseek-v4-flash-0731 @ CrofAI", - "pass": 15, - "rank": "#4 tie" - }, - { - "lane": "deepseek-v4-flash:0731 @ Ollama Cloud", - "pass": 15, - "rank": "#4 tie" - }, - { - "lane": "swe-2-medium @ Devin", - "pass": 15, - "rank": "#4 tie" - }, - { - "lane": "swe-2-high @ Devin (re-run)", - "pass": 15, - "rank": "#4 tie" - }, - { - "lane": "deepseek-v4.1-flash @ WorkBuddy", - "pass": 15, - "rank": "#4 tie" - }, - { - "lane": "glm-5.3-flash @ CrofAI", - "pass": 14, - "rank": "#5 tie" - }, - { - "lane": "swe-1-7-medium @ Devin", - "pass": 14, - "rank": "#5 tie" - }, - { - "lane": "deepseek-v4.1-flash-exp @ DeepSeek official (preview)", - "pass": 14, - "rank": "#5 tie" - }, - { - "lane": "kimi-for-coding @ Kimi official coding", - "pass": 14, - "rank": "#5 tie" - }, - { - "lane": "Qwen3.8-27B @ goldenpotato self-hosted", - "pass": 14, - "rank": "#5 tie" - } - ] - }, - "width": 620, - "height": 700, - "layer": [ - { - "mark": { - "type": "bar", - "cornerRadiusEnd": 3, - "height": 20, - "stroke": "#00414A", - "strokeWidth": 0.75, - "tooltip": true - }, - "encoding": { - "y": { - "field": "lane", - "type": "nominal", - "sort": "-x", - "axis": { - "labelFontSize": 12, - "labelLimit": 0, - "title": null - } - }, - "x": { - "field": "pass", - "type": "quantitative", - "scale": { - "domain": [ - 0, - 23 - ] - }, - "axis": { - "title": "cases passed (/ 23)", - "grid": true - } - }, - "color": { - "field": "rank", - "type": "nominal", - "scale": { - "range": [ - "#003A44", - "#00695F", - "#0097A7", - "#26C6DA", - "#80DEEA" - ] - }, - "legend": { - "title": "rank" - } - } - } - }, - { - "mark": { - "type": "text", - "align": "left", - "dx": 4, - "fontSize": 12, - "color": "#006064" - }, - "encoding": { - "y": { - "field": "lane", - "type": "nominal", - "sort": "-x" - }, - "x": { - "field": "pass", - "type": "quantitative" - }, - "text": { - "field": "pass", - "type": "quantitative" - } - } - } - ] -} \ No newline at end of file diff --git a/assets/specs/top5-2026-w38.vega-lite.json b/assets/specs/top5-2026-w38.vega-lite.json deleted file mode 100644 index bd4404d..0000000 --- a/assets/specs/top5-2026-w38.vega-lite.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "background": "white", - "title": { - "text": "AMBER 当前总榜:五个名次档(2026-W38,全库 23 案)", - "fontSize": 16, - "anchor": "start" - }, - "data": { - "values": [ - { - "lane": "swe-2-max @ Devin", - "pass": 18, - "rank": "#1" - }, - { - "lane": "glm-5.3-flash @ Ollama Cloud", - "pass": 17, - "rank": "#2 并列" - }, - { - "lane": "deepseek-v4.1-flash @ CommandCode", - "pass": 17, - "rank": "#2 并列" - }, - { - "lane": "deepseek-v4.1-flash @ Ollama Cloud", - "pass": 17, - "rank": "#2 并列" - }, - { - "lane": "k3 @ Kimi 官方 coding", - "pass": 17, - "rank": "#2 并列" - }, - { - "lane": "hy4-preview-f @ WorkBuddy", - "pass": 17, - "rank": "#2 并列" - }, - { - "lane": "gpt-6-astra-900k @ OpenAI Codex", - "pass": 16, - "rank": "#3 并列" - }, - { - "lane": "qwen3.8-27b @ CrofAI", - "pass": 16, - "rank": "#3 并列" - }, - { - "lane": "deepseek-flash @ OpenCode Go", - "pass": 16, - "rank": "#3 并列" - }, - { - "lane": "deepseek-v4.1-flash @ DeepSeek 官方", - "pass": 16, - "rank": "#3 并列" - }, - { - "lane": "swe-2-high @ Devin", - "pass": 16, - "rank": "#3 并列" - }, - { - "lane": "doubao-seed-evolving @ 火山方舟 Agent Plan", - "pass": 16, - "rank": "#3 并列" - }, - { - "lane": "gpt-5.6-sol-900k @ OpenAI Codex", - "pass": 15, - "rank": "#4 并列" - }, - { - "lane": "gpt-5.6-luna-900k @ OpenAI Codex", - "pass": 15, - "rank": "#4 并列" - }, - { - "lane": "deepseek-v4-flash-0731 @ CrofAI", - "pass": 15, - "rank": "#4 并列" - }, - { - "lane": "deepseek-v4-flash:0731 @ Ollama Cloud", - "pass": 15, - "rank": "#4 并列" - }, - { - "lane": "swe-2-medium @ Devin", - "pass": 15, - "rank": "#4 并列" - }, - { - "lane": "swe-2-high @ Devin (二跑)", - "pass": 15, - "rank": "#4 并列" - }, - { - "lane": "deepseek-v4.1-flash @ WorkBuddy", - "pass": 15, - "rank": "#4 并列" - }, - { - "lane": "glm-5.3-flash @ CrofAI", - "pass": 14, - "rank": "#5 并列" - }, - { - "lane": "swe-1-7-medium @ Devin", - "pass": 14, - "rank": "#5 并列" - }, - { - "lane": "deepseek-v4.1-flash-exp @ DeepSeek 官方(预览)", - "pass": 14, - "rank": "#5 并列" - }, - { - "lane": "kimi-for-coding @ Kimi 官方 coding", - "pass": 14, - "rank": "#5 并列" - }, - { - "lane": "Qwen3.8-27B @ goldenpotato 自部署", - "pass": 14, - "rank": "#5 并列" - } - ] - }, - "width": 620, - "height": 700, - "layer": [ - { - "mark": { - "type": "bar", - "cornerRadiusEnd": 3, - "height": 20, - "stroke": "#00414A", - "strokeWidth": 0.75, - "tooltip": true - }, - "encoding": { - "y": { - "field": "lane", - "type": "nominal", - "sort": "-x", - "axis": { - "labelFontSize": 12, - "labelLimit": 0, - "title": null - } - }, - "x": { - "field": "pass", - "type": "quantitative", - "scale": { - "domain": [ - 0, - 23 - ] - }, - "axis": { - "title": "通过案数(/ 23)", - "grid": true - } - }, - "color": { - "field": "rank", - "type": "nominal", - "scale": { - "range": [ - "#003A44", - "#00695F", - "#0097A7", - "#26C6DA", - "#80DEEA" - ] - }, - "legend": { - "title": "名次" - } - } - } - }, - { - "mark": { - "type": "text", - "align": "left", - "dx": 4, - "fontSize": 12, - "color": "#006064" - }, - "encoding": { - "y": { - "field": "lane", - "type": "nominal", - "sort": "-x" - }, - "x": { - "field": "pass", - "type": "quantitative" - }, - "text": { - "field": "pass", - "type": "quantitative" - } - } - } - ] -} \ No newline at end of file diff --git a/assets/top5-2026-w38.en.png b/assets/top5-2026-w38.en.png deleted file mode 100644 index 82b7f82..0000000 Binary files a/assets/top5-2026-w38.en.png and /dev/null differ diff --git a/assets/top5-2026-w38.png b/assets/top5-2026-w38.png deleted file mode 100644 index c80cb89..0000000 Binary files a/assets/top5-2026-w38.png and /dev/null differ diff --git a/assets/top5-card.en.png b/assets/top5-card.en.png deleted file mode 100644 index 515ecb5..0000000 Binary files a/assets/top5-card.en.png and /dev/null differ diff --git a/assets/top5-card.png b/assets/top5-card.png deleted file mode 100644 index 2e6c50c..0000000 Binary files a/assets/top5-card.png and /dev/null differ diff --git a/assets/trust-chain.en.png b/assets/trust-chain.en.png deleted file mode 100644 index e9f2e42..0000000 Binary files a/assets/trust-chain.en.png and /dev/null differ diff --git a/assets/trust-chain.png b/assets/trust-chain.png deleted file mode 100644 index 68f266e..0000000 Binary files a/assets/trust-chain.png and /dev/null differ diff --git a/assets/vendor/vega-embed.min.js b/assets/vendor/vega-embed.min.js deleted file mode 100644 index 8ae6223..0000000 --- a/assets/vendor/vega-embed.min.js +++ /dev/null @@ -1,7 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vega"),require("vega-lite")):"function"==typeof define&&define.amd?define(["vega","vega-lite"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).vegaEmbed=t(e.vega,e.vegaLite)}(this,(function(e,t){"use strict";function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r,i=n(e),o=n(t),a=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=Object.prototype.hasOwnProperty;function l(e,t){return s.call(e,t)}function c(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n=48&&t<=57))return!1;n++}return!0}function p(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function h(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var t=0,n=e.length;t0&&"constructor"==s[c-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&void 0===h&&(void 0===l[g]?h=s.slice(0,c).join("/"):c==p-1&&(h=t.path),void 0!==h&&m(t,0,e,h)),c++,Array.isArray(l)){if("-"===g)g=l.length;else{if(n&&!d(g))throw new E("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",o,t,e);d(g)&&(g=~~g)}if(c>=p){if(n&&"add"===t.op&&g>l.length)throw new E("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",o,t,e);if(!1===(a=y[t.op].call(t,l,g,e)).test)throw new E("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return a}}else if(c>=p){if(!1===(a=b[t.op].call(t,l,g,e)).test)throw new E("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return a}if(l=l[g],n&&c0)throw new E('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new E("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new E("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&h(e.value))throw new E("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n)if("add"==e.op){var i=e.path.split("/").length,o=r.split("/").length;if(i!==o+1&&i!==o)throw new E("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new E("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var a=x([{op:"_get",path:e.from,value:void 0}],n);if(a&&"OPERATION_PATH_UNRESOLVABLE"===a.name)throw new E("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function x(e,t,n){try{if(!Array.isArray(e))throw new E("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)A(f(t),f(e),n||!0);else{n=n||I;for(var r=0;r0&&(e.patches=[],e.callback&&e.callback(r)),r}function C(e,t,n,r,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var o=c(t),a=c(e),s=!1,d=a.length-1;d>=0;d--){var u=e[g=a[d]];if(!l(t,g)||void 0===t[g]&&void 0!==u&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+p(g),value:f(u)}),n.push({op:"remove",path:r+"/"+p(g)}),s=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}));else{var h=t[g];"object"==typeof u&&null!=u&&"object"==typeof h&&null!=h&&Array.isArray(u)===Array.isArray(h)?C(u,h,n,r+"/"+p(g),i):u!==h&&(i&&n.push({op:"test",path:r+"/"+p(g),value:f(u)}),n.push({op:"replace",path:r+"/"+p(g),value:f(h)}))}}if(s||o.length!=a.length)for(d=0;dt||`${e} `));if(e.length<=l)return e}if(null!=i&&(t=JSON.parse(s),i=void 0),"object"==typeof t&&null!==t){const r=o+n,i=[];let a,s,l=0;if(Array.isArray(t)){a="[",s="]";const{length:n}=t;for(;l0)return[a,n+i.join(`,\n${r}`),s].join(`\n${o}`)}return s}(e,"",0)}function _(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var P,M,z,j;function U(){if(j)return z;j=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return z=n=>n?"object"!=typeof n?e:n:t}var B,G,W,X,V,H,Y,q,J,Q,Z,K,ee,te,ne,re,ie,oe,ae,se,le,ce,fe,de,pe,ue,he,ge,me,Ee,ve,be={exports:{}};function ye(){if(G)return B;G=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return B={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function we(){if(X)return W;X=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return W=e}function Oe(){return V||(V=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=ye(),o=we(),a=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],c=t.t={};let f=0;const d="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",i],[d,r]],u=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=f++;o(e,i,t),c[e]=i,l[i]=t,a[i]=new RegExp(t,n?"g":void 0),s[i]=new RegExp(r,n?"g":void 0)};u("NUMERICIDENTIFIER","0|[1-9]\\d*"),u("NUMERICIDENTIFIERLOOSE","\\d+"),u("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),u("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),u("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),u("PRERELEASEIDENTIFIER",`(?:${l[c.NUMERICIDENTIFIER]}|${l[c.NONNUMERICIDENTIFIER]})`),u("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NUMERICIDENTIFIERLOOSE]}|${l[c.NONNUMERICIDENTIFIER]})`),u("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),u("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),u("BUILDIDENTIFIER",`${d}+`),u("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),u("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),u("FULL",`^${l[c.FULLPLAIN]}$`),u("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),u("LOOSE",`^${l[c.LOOSEPLAIN]}$`),u("GTLT","((?:<|>)?=?)"),u("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),u("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),u("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),u("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),u("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),u("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),u("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),u("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),u("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?`+`(?:${l[c.BUILD]})?(?:$|[^\\d])`),u("COERCERTL",l[c.COERCE],!0),u("COERCERTLFULL",l[c.COERCEFULL],!0),u("LONETILDE","(?:~>?)"),u("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",u("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),u("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),u("LONECARET","(?:\\^)"),u("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",u("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),u("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),u("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),u("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),u("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",u("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),u("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),u("STAR","(<|>)?=?\\s*\\*"),u("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),u("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(be,be.exports)),be.exports}function Ae(){if(J)return q;J=1;const e=we(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=ye(),{safeRe:r,t:i}=Oe(),o=U(),{compareIdentifiers:a}=function(){if(Y)return H;Y=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:tt(n,e)}}();class s{constructor(a,l){if(l=o(l),a instanceof s){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=a.trim().match(l.loose?r[i.LOOSE]:r[i.FULL]);if(!c)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===a(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return q=s}function Ie(){if(Z)return Q;Z=1;const e=Ae();return Q=(t,n,r)=>new e(t,r).compare(new e(n,r))}function xe(){if(pe)return de;pe=1;const e=function(){if(ee)return K;ee=1;const e=Ie();return K=(t,n,r)=>0===e(t,n,r)}(),t=function(){if(ne)return te;ne=1;const e=Ie();return te=(t,n,r)=>0!==e(t,n,r)}(),n=function(){if(ie)return re;ie=1;const e=Ie();return re=(t,n,r)=>e(t,n,r)>0}(),r=function(){if(ae)return oe;ae=1;const e=Ie();return oe=(t,n,r)=>e(t,n,r)>=0}(),i=function(){if(le)return se;le=1;const e=Ie();return se=(t,n,r)=>e(t,n,r)<0}(),o=function(){if(fe)return ce;fe=1;const e=Ie();return ce=(t,n,r)=>e(t,n,r)<=0}();return de=(a,s,l,c)=>{switch(s){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a===l;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a!==l;case"":case"=":case"==":return e(a,l,c);case"!=":return t(a,l,c);case">":return n(a,l,c);case">=":return r(a,l,c);case"<":return i(a,l,c);case"<=":return o(a,l,c);default:throw new TypeError(`Invalid operator: ${s}`)}}}function Le(){if(me)return ge;me=1;const e=/\s+/g;class t{constructor(n,o){if(o=r(o),n instanceof t)return n.loose===!!o.loose&&n.includePrerelease===!!o.includePrerelease?n:new t(n.raw,o);if(n instanceof i)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&p)|(this.options.loose&&u))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,g=a?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(g,N(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],c),o("comparator trim",e),e=e.replace(s[l.TILDETRIM],f),o("tilde trim",e),e=e.replace(s[l.CARETTRIM],d),o("caret trim",e);let m=e.split(" ").map((e=>E(e,this.options))).join(" ").split(/\s+/).map((e=>L(e,this.options)));a&&(m=m.filter((e=>(o("loose invalid filter",e,this.options),!!e.match(s[l.COMPARATORLOOSE]))))),o("range list",m);const v=new Map,b=m.map((e=>new i(e,this.options)));for(const e of b){if(h(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const y=[...v.values()];return n.set(t,y),y}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>m(t,n)&&e.set.some((e=>m(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}})),r=U(),i=function(){if(he)return ue;he=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],o=t.match(n);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==o[1]?o[1]:"","="===this.operator&&(this.operator=""),o[2]?this.semver=new s(o[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):!((r=n(r)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(o(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(o(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}ue=t;const n=U(),{safeRe:r,t:i}=Oe(),o=xe(),a=we(),s=Ae(),l=Le();return ue}(),o=we(),a=Ae(),{safeRe:s,t:l,comparatorTrimReplace:c,tildeTrimReplace:f,caretTrimReplace:d}=Oe(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:u}=ye(),h=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,m=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},E=(e,t)=>(o("comp",e,t),e=w(e,t),o("caret",e),e=b(e,t),o("tildes",e),e=A(e,t),o("xrange",e),e=x(e,t),o("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,r,i,a)=>{let s;return o("tilde",e,t,n,r,i,a),v(n)?s="":v(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:v(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o("tilde return",s),s}))},w=(e,t)=>e.trim().split(/\s+/).map((e=>O(e,t))).join(" "),O=(e,t)=>{o("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,s)=>{let l;return o("caret",e,t,n,i,a,s),v(n)?l="":v(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(a)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",l),l}))},A=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>I(e,t))).join(" ")),I=(e,t)=>{e=e.trim();const n=t.loose?s[l.XRANGELOOSE]:s[l.XRANGE];return e.replace(n,((n,r,i,a,s,l)=>{o("xRange",e,n,r,i,a,s,l);const c=v(i),f=c||v(a),d=f||v(s),p=d;return"="===r&&p&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(f&&(a=0),s=0,">"===r?(r=">=",f?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",f?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${s}${l}`):f?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),o("xRange return",n),n}))},x=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),L=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),N=e=>(t,n,r,i,o,a,s,l,c,f,d,p)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(o)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(c)?"":v(f)?`<${+c+1}.0.0-0`:v(d)?`<${c}.${+f+1}.0-0`:p?`<=${c}.${f}.${d}-${p}`:e?`<${c}.${f}.${+d+1}-0`:`<=${l}`}`.trim(),$=(e,t,n)=>{for(let n=0;n0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return ge}var Ne=function(){if(ve)return Ee;ve=1;const e=Le();return Ee=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Ee}(),$e=_(Ne);var Re={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},Te={"*":(e,t)=>e*t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,">":(e,t)=>e>t,"<":(e,t)=>ee<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},Se={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const Ce=Array.prototype.slice,De=(e,t,n)=>{const r=n?n(t[0]):t[0];return r[e].apply(r,Ce.call(t,1))};var Fe={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,n)=>Math.max(t,Math.min(n,e)),now:Date.now,utc:Date.UTC,datetime:(e,t,n,r,i,o,a)=>new Date(e,t||0,null!=n?n:1,r||0,i||0,o||0,a||0),date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return De("join",arguments)},indexof:function(){return De("indexOf",arguments)},lastindexof:function(){return De("lastIndexOf",arguments)},slice:function(){return De("slice",arguments)},reverse:e=>e.slice().reverse(),parseFloat:parseFloat,parseInt:parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return De("substring",arguments,String)},split:function(){return De("split",arguments,String)},replace:function(){return De("replace",arguments,String)},trim:e=>String(e).trim(),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const ke=["view","item","group","xy","x","y"],_e=new Set([Function,eval,setTimeout,setInterval]);"function"==typeof setImmediate&&_e.add(setImmediate);const Pe={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const n=t.name;return e.memberDepth>0?n:"datum"===n?e.datum:"event"===n?e.event:"item"===n?e.item:Re[n]||e.params["$"+n]},MemberExpression:(e,t)=>{const n=!t.computed,r=e(t.object);n&&(e.memberDepth+=1);const i=e(t.property);if(n&&(e.memberDepth-=1),!_e.has(r[i]))return r[i];console.error(`Prevented interpretation of member "${i}" which could lead to insecure code execution`)},CallExpression:(e,t)=>{const n=t.arguments;let r=t.callee.name;return r.startsWith("_")&&(r=r.slice(1)),"if"===r?e(n[0])?e(n[1]):e(n[2]):(e.fn[r]||Fe[r]).apply(e.fn,n.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>Te[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>Se[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>"&&"===t.operator?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce(((t,n)=>{e.memberDepth+=1;const r=e(n.key);return e.memberDepth-=1,_e.has(e(n.value))?console.error(`Prevented interpretation of property "${r}" which could lead to insecure code execution`):t[r]=e(n.value),t}),{})};function Me(e,t,n,r,i,o){const a=e=>Pe[e.type](a,e);return a.memberDepth=0,a.fn=Object.create(t),a.params=n,a.datum=r,a.event=i,a.item=o,ke.forEach((e=>a.fn[e]=function(){return i.vega[e](...arguments)})),a(e)}var ze={operator(e,t){const n=t.ast,r=e.functions;return e=>Me(n,r,e)},parameter(e,t){const n=t.ast,r=e.functions;return(e,t)=>Me(n,r,t,e)},event(e,t){const n=t.ast,r=e.functions;return e=>Me(n,r,void 0,void 0,e)},handler(e,t){const n=t.ast,r=e.functions;return(e,t)=>{const i=t.item&&t.item.datum;return Me(n,r,e,i,t)}},encode(e,t){const{marktype:n,channels:r}=t,i=e.functions,o="group"===n||"image"===n||"rect"===n;return(e,t)=>{const a=e.datum;let s,l=0;for(const n in r)s=Me(r[n].ast,i,t,a,void 0,e),e[n]!==s&&(e[n]=s,l=1);return"rule"!==n&&function(e,t,n){let r;t.x2&&(t.x?(n&&e.x>e.x2&&(r=e.x,e.x=e.x2,e.x2=r),e.width=e.x2-e.x):e.x=e.x2-(e.width||0)),t.xc&&(e.x=e.xc-(e.width||0)/2),t.y2&&(t.y?(n&&e.y>e.y2&&(r=e.y,e.y=e.y2,e.y2=r),e.height=e.y2-e.y):e.y=e.y2-(e.height||0)),t.yc&&(e.y=e.yc-(e.height||0)/2)}(e,r,o),l}}};function je(e){const[t,n]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:n}}var Ue="2.15.0";const Be="#fff",Ge="#888",We={background:"#333",view:{stroke:Ge},title:{color:Be,subtitleColor:Be},style:{"guide-label":{fill:Be},"guide-title":{fill:Be}},axis:{domainColor:Be,gridColor:Ge,tickColor:Be}},Xe="#4572a7",Ve={background:"#fff",arc:{fill:Xe},area:{fill:Xe},line:{stroke:Xe,strokeWidth:2},path:{stroke:Xe},rect:{fill:Xe},shape:{stroke:Xe},symbol:{fill:Xe,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},He="#30a2da",Ye="#cbcbcb",qe="#f0f0f0",Je="#333",Qe={arc:{fill:He},area:{fill:He},axis:{domainColor:Ye,grid:!0,gridColor:Ye,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:Ye,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:qe,group:{fill:qe},legend:{labelColor:Je,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:Je,titleFontSize:14,titlePadding:10},line:{stroke:He,strokeWidth:2},path:{stroke:He,strokeWidth:.5},rect:{fill:He},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:He},bar:{binSpacing:2,fill:He,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},Ze="#000",Ke={group:{fill:"#e5e5e5"},arc:{fill:Ze},area:{fill:Ze},line:{stroke:Ze},path:{stroke:Ze},rect:{fill:Ze},shape:{stroke:Ze},symbol:{fill:Ze,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},et="Benton Gothic, sans-serif",tt="#82c6df",nt="Benton Gothic Bold, sans-serif",rt="normal",it={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},ot={background:"#ffffff",title:{anchor:"start",color:"#000000",font:nt,fontSize:22,fontWeight:"normal"},arc:{fill:tt},area:{fill:tt},line:{stroke:tt,strokeWidth:2},path:{stroke:tt},rect:{fill:tt},shape:{stroke:tt},symbol:{fill:tt,size:30},axis:{labelFont:et,labelFontSize:11.5,labelFontWeight:"normal",titleFont:nt,titleFontSize:13,titleFontWeight:rt},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:et,labelFontSize:11.5,symbolType:"square",titleFont:nt,titleFontSize:13,titleFontWeight:rt},range:{category:it["category-6"],diverging:it["fireandice-6"],heatmap:it["fire-7"],ordinal:it["fire-7"],ramp:it["fire-7"]}},at="#ab5787",st="#979797",lt={background:"#f9f9f9",arc:{fill:at},area:{fill:at},line:{stroke:at},path:{stroke:at},rect:{fill:at},shape:{stroke:at},symbol:{fill:at,size:30},axis:{domainColor:st,domainWidth:.5,gridWidth:.2,labelColor:st,tickColor:st,tickWidth:.2,titleColor:st},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},ct="#3e5c69",ft={background:"#fff",arc:{fill:ct},area:{fill:ct},line:{stroke:ct},path:{stroke:ct},rect:{fill:ct},shape:{stroke:ct},symbol:{fill:ct},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},dt="#1696d2",pt="#000000",ut="Lato",ht="Lato",gt={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},mt={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:ut},axisX:{domain:!0,domainColor:pt,domainWidth:1,grid:!1,labelFontSize:12,labelFont:ht,labelAngle:0,tickColor:pt,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:ut},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:ht,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:ut,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:ht,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:ut,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:gt["six-groups-cat-1"],diverging:gt["diverging-colors"],heatmap:gt["diverging-colors"],ordinal:gt["six-groups-seq"],ramp:gt["shades-blue"]},area:{fill:dt},rect:{fill:dt},line:{color:dt,stroke:dt,strokeWidth:5},trail:{color:dt,stroke:dt,strokeWidth:0,size:1},path:{stroke:dt,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:dt,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:dt,stroke:null}},arc:{fill:dt},shape:{stroke:dt},symbol:{fill:dt,size:30}},Et="#3366CC",vt="#ccc",bt="Arial, sans-serif",yt={arc:{fill:Et},area:{fill:Et},path:{stroke:Et},rect:{fill:Et},shape:{stroke:Et},symbol:{stroke:Et},circle:{fill:Et},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:bt,fontSize:12},"guide-title":{font:bt,fontSize:12},"group-title":{font:bt,fontSize:12}},title:{font:bt,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:vt,tickColor:vt,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},wt=e=>e*(1/3+1),Ot=wt(9),At=wt(10),It=wt(12),xt="Segoe UI",Lt="wf_standard-font, helvetica, arial, sans-serif",Nt="#252423",$t="#605E5C",Rt="transparent",Tt="#118DFF",St="#DEEFFF",Ct=[St,Tt],Dt={view:{stroke:Rt},background:Rt,font:xt,header:{titleFont:Lt,titleFontSize:It,titleColor:Nt,labelFont:xt,labelFontSize:At,labelColor:$t},axis:{ticks:!1,grid:!1,domain:!1,labelColor:$t,labelFontSize:Ot,titleFont:Lt,titleColor:Nt,titleFontSize:It,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:"#C8C6C4",gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:Tt},line:{stroke:Tt,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:xt,fontSize:Ot,fill:$t},arc:{fill:Tt},area:{fill:Tt,line:!0,opacity:.6},path:{stroke:Tt},rect:{fill:Tt},point:{fill:Tt,filled:!0,size:75},shape:{stroke:Tt},symbol:{fill:Tt,strokeWidth:1.5,size:50},legend:{titleFont:xt,titleFontWeight:"bold",titleColor:$t,labelFont:xt,labelFontSize:At,labelColor:$t,symbolType:"circle",symbolSize:75},range:{category:[Tt,"#12239E","#E66C37","#6B007B","#E044A7","#744EC2","#D9B300","#D64550"],diverging:Ct,heatmap:Ct,ordinal:[St,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",Tt]}},Ft='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',kt={textPrimary:{g90:"#f4f4f4",g100:"#f4f4f4",white:"#161616",g10:"#161616"},textSecondary:{g90:"#c6c6c6",g100:"#c6c6c6",white:"#525252",g10:"#525252"},layerAccent01:{white:"#e0e0e0",g10:"#e0e0e0",g90:"#525252",g100:"#393939"},gridBg:{white:"#ffffff",g10:"#ffffff",g90:"#161616",g100:"#161616"}},_t=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],Pt=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function Mt({theme:e,background:t}){const n=["white","g10"].includes(e)?"light":"dark",r=kt.gridBg[e],i=kt.textPrimary[e],o=kt.textSecondary[e],a="dark"===n?_t:Pt,s="dark"===n?"#d4bbff":"#6929c4";return{background:t,arc:{fill:s},area:{fill:s},path:{stroke:s},rect:{fill:s},shape:{stroke:s},symbol:{stroke:s},circle:{fill:s},view:{fill:r,stroke:r},group:{fill:r},title:{color:i,anchor:"start",dy:-15,fontSize:16,font:Ft,fontWeight:600},axis:{labelColor:o,labelFontSize:12,labelFont:'IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif',labelFontWeight:400,titleColor:i,titleFontWeight:600,titleFontSize:12,grid:!0,gridColor:kt.layerAccent01[e],labelAngle:0},axisX:{titlePadding:10},axisY:{titlePadding:2.5},style:{"guide-label":{font:Ft,fill:o,fontWeight:400},"guide-title":{font:Ft,fill:o,fontWeight:400}},range:{category:a,diverging:["#750e13","#a2191f","#da1e28","#fa4d56","#ff8389","#ffb3b8","#ffd7d9","#fff1f1","#e5f6ff","#bae6ff","#82cfff","#33b1ff","#1192e8","#0072c3","#00539a","#003a6d"],heatmap:["#f6f2ff","#e8daff","#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4","#491d8b","#31135e","#1c0f30"]}}}const zt=Mt({theme:"white",background:"#ffffff"}),jt=Mt({theme:"g10",background:"#f4f4f4"}),Ut=Mt({theme:"g90",background:"#262626"}),Bt=Mt({theme:"g100",background:"#161616"}),Gt=Ue;var Wt=Object.freeze({__proto__:null,carbong10:jt,carbong100:Bt,carbong90:Ut,carbonwhite:zt,dark:We,excel:Ve,fivethirtyeight:Qe,ggplot2:Ke,googlecharts:yt,latimes:ot,powerbi:Dt,quartz:lt,urbaninstitute:mt,version:Gt,vox:ft});function Xt(e,t,n){return e.fields=t||[],e.fname=n,e}const Vt=e=>function(t){return t[e]},Ht=e=>{const t=e.length;return function(n){for(let r=0;rr&&c(),s=r=i+1):"]"===o&&(s||Yt("Access path missing open bracket: "+e),s>0&&c(),s=0,r=i+1):i>r?c():r=i+1}return s&&Yt("Access path missing closing bracket: "+e),a&&Yt("Access path missing closing quote: "+e),i>r&&(i++,c()),t}(e);e=1===t.length?t[0]:e,Xt(function(e){return 1===e.length?Vt(e[0]):Ht(e)}(t),[e],e)}("id"),Xt((e=>e),[],"identity"),Xt((()=>0),[],"zero"),Xt((()=>1),[],"one"),Xt((()=>!0),[],"true"),Xt((()=>!1),[],"false");var qt=Array.isArray;function Jt(e){return e===Object(e)}function Qt(e,t){return JSON.stringify(e,function(e){const t=[];return function(n,r){if("object"!=typeof r||null===r)return r;const i=t.indexOf(this)+1;return t.length=i,t.length>e?"[Object]":t.indexOf(r)>=0?"[Circular]":(t.push(r),r)}}(t))}var Zt="#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black;\n}\n#vg-tooltip-element.visible {\n visibility: visible;\n}\n#vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px;\n}\n#vg-tooltip-element table {\n border-spacing: 0;\n}\n#vg-tooltip-element table tr {\n border: none;\n}\n#vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px;\n}\n#vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px;\n}\n#vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left;\n}\n#vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white;\n}\n#vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf;\n}\n";const Kt="vg-tooltip-element",en={offsetX:10,offsetY:10,id:Kt,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function(e){return String(e).replace(/&/g,"&").replace(/t("string"==typeof e?e:Qt(e,n)))).join(", ")}]`;if(Jt(e)){let i="";const{title:o,image:a,...s}=e;o&&(i+=`

${t(o)}

`),a&&(i+=``);const l=Object.keys(s);if(l.length>0){i+="";for(const e of l){let r=s[e];void 0!==r&&(Jt(r)&&(r=Qt(r,n)),i+=``)}i+="
${t(e)}${t(r)}
"}return i||"{}"}return t(e)},baseURL:"",anchor:"cursor",position:["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]};function tn(e,t,{offsetX:n,offsetY:r}){const i=nn({x1:e.clientX,x2:e.clientX,y1:e.clientY,y2:e.clientY},t,n,r),o=["bottom-right","bottom-left","top-right","top-left"];for(const e of o)if(rn(i[e],t))return i[e];return i["top-left"]}function nn(e,t,n,r){const i=(e.x1+e.x2)/2,o=(e.y1+e.y2)/2,a=e.x1-t.width-n,s=i-t.width/2,l=e.x2+n,c=e.y1-t.height-r,f=o-t.height/2,d=e.y2+r;return{top:{x:s,y:c},bottom:{x:s,y:d},left:{x:a,y:f},right:{x:l,y:f},"top-left":{x:a,y:c},"top-right":{x:l,y:c},"bottom-left":{x:a,y:d},"bottom-right":{x:l,y:d}}}function rn(e,t){return e.x>=0&&e.y>=0&&e.x+t.width<=window.innerWidth&&e.y+t.height<=window.innerHeight}function on(e,t,n){return e.clientX>=t.x&&e.clientX<=t.x+n.width&&e.clientY>=t.y&&e.clientY<=t.y+n.height}class an{constructor(e){this.options={...en,...e};const t=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const e=document.createElement("style");e.setAttribute("id",this.options.styleId),e.innerHTML=function(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return Zt.toString().replace(Kt,e)}(t);const n=document.head;n.childNodes.length>0?n.insertBefore(e,n.childNodes[0]):n.appendChild(e)}}tooltipHandler(e,t,n,r){if(this.el=document.getElementById(this.options.id),!this.el){this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip");(document.fullscreenElement??document.body).appendChild(this.el)}if(null==r||""===r)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:i,y:o}="mark"===this.options.anchor?function(e,t,n,r,i){const{position:o,offsetX:a,offsetY:s}=i,l=function(e,t,n){const r=n.isVoronoi?n.datum.bounds:n.bounds;let i=e.left+t[0]+r.x1,o=e.top+t[1]+r.y1,a=n;for(;a.mark.group;)a=a.mark.group,i+=a.x??0,o+=a.y??0;return{x1:i,x2:i+(r.x2-r.x1),y1:o,y2:o+(r.y2-r.y1)}}(e._el.getBoundingClientRect(),e._origin,n),c=nn(l,r,a,s),f=Array.isArray(o)?o:[o];for(const e of f)if(rn(c[e],r)&&!on(t,c[e],r))return c[e];return tn(t,r,i)}(e,t,n,this.el.getBoundingClientRect(),this.options):tn(t,this.el.getBoundingClientRect(),this.options);this.el.style.top=`${o}px`,this.el.style.left=`${i}px`}}var sn='.vega-embed {\n position: relative;\n display: inline-block;\n box-sizing: border-box;\n}\n.vega-embed.has-actions {\n padding-right: 38px;\n}\n.vega-embed details:not([open]) > :not(summary) {\n display: none !important;\n}\n.vega-embed summary {\n list-style: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n cursor: pointer;\n line-height: 0px;\n}\n.vega-embed summary::-webkit-details-marker {\n display: none;\n}\n.vega-embed summary:active {\n box-shadow: #aaa 0px 0px 0px 1px inset;\n}\n.vega-embed summary svg {\n width: 14px;\n height: 14px;\n}\n.vega-embed details[open] summary {\n opacity: 0.7;\n}\n.vega-embed:hover summary, .vega-embed:focus-within summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease;\n}\n.vega-embed .vega-actions {\n position: absolute;\n z-index: 1001;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n text-align: left;\n}\n.vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none;\n}\n.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {\n background-color: #f7f7f9;\n color: black;\n}\n.vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: "";\n display: inline-block;\n position: absolute;\n}\n.vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid rgba(0, 0, 0, 0);\n border-bottom-color: #d9d9d9;\n}\n.vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid rgba(0, 0, 0, 0);\n border-bottom-color: #fff;\n}\n.vega-embed .chart-wrapper.fit-x {\n width: 100%;\n}\n.vega-embed .chart-wrapper.fit-y {\n height: 100%;\n}\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: auto;\n padding-right: 14px;\n}\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n';function ln(e,...t){for(const n of t)cn(e,n);return e}function cn(t,n){for(const r of Object.keys(n))e.writeConfig(t,r,n[r],!0)}const fn="6.29.0",dn=i;let pn=o;const un="undefined"!=typeof window?window:void 0;void 0===pn&&un?.vl?.compile&&(pn=un.vl);const hn={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},gn={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},mn={vega:"Vega","vega-lite":"Vega-Lite"},En={vega:dn.version,"vega-lite":pn?pn.version:"not available"},vn={vega:e=>e,"vega-lite":(e,t)=>pn.compile(e,{config:t}).spec},bn='\n\n \n \n \n',yn="chart-wrapper";function wn(e,t,n,r){const i=`${t}
`,o=`
${n}`,a=window.open("");a.document.write(i+e+o),a.document.title=`${mn[r]} JSON Source`}function On(e){return!(!e||!("load"in e))}function An(e){return On(e)?e:dn.loader(e)}async function In(t,n,r={}){let i,o;e.isString(n)?(o=An(r.loader),i=JSON.parse(await o.load(n))):i=n;const a=function(t){const n=t.usermeta?.embedOptions??{};return e.isString(n.defaultStyle)&&(n.defaultStyle=!1),n}(i),s=a.loader;o&&!s||(o=An(r.loader??s));const l=await xn(a,o),c=await xn(r,o),f={...ln(c,l),config:e.mergeConfig(c.config??{},l.config??{})};return await async function(t,n,r={},i){const o=r.theme?e.mergeConfig(Wt[r.theme],r.config??{}):r.config,a=e.isBoolean(r.actions)?r.actions:ln({},hn,r.actions??{}),s={...gn,...r.i18n},l=r.renderer??"canvas",c=r.logLevel??dn.Warn,f=r.downloadFileName??"visualization",d="string"==typeof t?document.querySelector(t):t;if(!d)throw new Error(`${t} does not exist`);if(!1!==r.defaultStyle){const e="vega-embed-style",{root:t,rootContainer:n}=function(e){const t=e.getRootNode?e.getRootNode():document;return t instanceof ShadowRoot?{root:t,rootContainer:t}:{root:document,rootContainer:document.head??document.body}}(d);if(!t.getElementById(e)){const t=document.createElement("style");t.id=e,t.innerHTML=void 0===r.defaultStyle||!0===r.defaultStyle?sn.toString():r.defaultStyle,n.appendChild(t)}}const p=function(e,t){if(e.$schema){const n=je(e.$schema);t&&t!==n.library&&console.warn(`The given visualization spec is written in ${mn[n.library]}, but mode argument sets ${mn[t]??t}.`);const r=n.library;return $e(En[r],`^${n.version.slice(1)}`)||console.warn(`The input spec uses ${mn[r]} ${n.version}, but the current version of ${mn[r]} is v${En[r]}.`),r}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":t??"vega"}(n,r.mode);let u=vn[p](n,o);if("vega-lite"===p&&u.$schema){const e=je(u.$schema);$e(En.vega,`^${e.version.slice(1)}`)||console.warn(`The compiled spec uses Vega ${e.version}, but current version is v${En.vega}.`)}d.classList.add("vega-embed"),a&&d.classList.add("has-actions");d.innerHTML="";let h=d;if(a){const e=document.createElement("div");e.classList.add(yn),d.appendChild(e),h=e}const g=r.patch;g&&(u=g instanceof Function?g(u):A(u,g,!0,!1).newDocument);r.formatLocale&&dn.formatLocale(r.formatLocale);r.timeFormatLocale&&dn.timeFormatLocale(r.timeFormatLocale);if(r.expressionFunctions)for(const e in r.expressionFunctions){const t=r.expressionFunctions[e];"fn"in t?dn.expressionFunction(e,t.fn,t.visitor):t instanceof Function&&dn.expressionFunction(e,t)}const{ast:m}=r,E=dn.parse(u,"vega-lite"===p?{}:o,{ast:m}),v=new(r.viewClass||dn.View)(E,{loader:i,logLevel:c,renderer:l,...m?{expr:dn.expressionInterpreter??r.expr??ze}:{}});if(v.addSignalListener("autosize",((e,t)=>{const{type:n}=t;"fit-x"==n?(h.classList.add("fit-x"),h.classList.remove("fit-y")):"fit-y"==n?(h.classList.remove("fit-x"),h.classList.add("fit-y")):"fit"==n?h.classList.add("fit-x","fit-y"):h.classList.remove("fit-x","fit-y")})),!1!==r.tooltip){const{loader:e,tooltip:t}=r,n=e&&!On(e)?e?.baseURL:void 0,i="function"==typeof t?t:new an({baseURL:n,...!0===t?{}:t}).call;v.tooltip(i)}let b,{hover:y}=r;void 0===y&&(y="vega"===p);if(y){const{hoverSet:e,updateSet:t}="boolean"==typeof y?{}:y;v.hover(e,t)}r&&(null!=r.width&&v.width(r.width),null!=r.height&&v.height(r.height),null!=r.padding&&v.padding(r.padding));if(await v.initialize(h,r.bind).runAsync(),!1!==a){let t=d;if(!1!==r.defaultStyle||r.forceActionsMenu){const e=document.createElement("details");e.title=s.CLICK_TO_VIEW_ACTIONS,d.append(e),t=e;const n=document.createElement("summary");n.innerHTML=bn,e.append(n),b=t=>{e.contains(t.target)||e.removeAttribute("open")},document.addEventListener("click",b)}const i=document.createElement("div");if(t.append(i),i.classList.add("vega-actions"),!0===a||!1!==a.export)for(const t of["svg","png"])if(!0===a||!0===a.export||a.export[t]){const n=s[`${t.toUpperCase()}_ACTION`],o=document.createElement("a"),a=e.isObject(r.scaleFactor)?r.scaleFactor[t]:r.scaleFactor;o.text=n,o.href="#",o.target="_blank",o.download=`${f}.${t}`,o.addEventListener("mousedown",(async function(e){e.preventDefault();const n=await v.toImageURL(t,a);this.href=n})),i.append(o)}if(!0===a||!1!==a.source){const e=document.createElement("a");e.text=s.SOURCE_ACTION,e.href="#",e.addEventListener("click",(function(e){wn(k(n),r.sourceHeader??"",r.sourceFooter??"",p),e.preventDefault()})),i.append(e)}if("vega-lite"===p&&(!0===a||!1!==a.compiled)){const e=document.createElement("a");e.text=s.COMPILED_ACTION,e.href="#",e.addEventListener("click",(function(e){wn(k(u),r.sourceHeader??"",r.sourceFooter??"","vega"),e.preventDefault()})),i.append(e)}if(!0===a||!1!==a.editor){const e=r.editorUrl??"https://vega.github.io/editor/",t=document.createElement("a");t.text=s.EDITOR_ACTION,t.href="#",t.addEventListener("click",(function(t){!function(e,t,n){const r=e.open(t),{origin:i}=new URL(t);let o=40;e.addEventListener("message",(function t(n){n.source===r&&(o=0,e.removeEventListener("message",t,!1))}),!1),setTimeout((function e(){o<=0||(r.postMessage(n,i),setTimeout(e,250),o-=1)}),250)}(window,e,{config:o,mode:g?"vega":p,renderer:l,spec:k(g?u:n)}),t.preventDefault()})),i.append(t)}}function w(){b&&document.removeEventListener("click",b),v.finalize()}return{view:v,spec:n,vgSpec:u,finalize:w,embedOptions:r}}(t,i,f,o)}async function xn(t,n){const r=e.isString(t.config)?JSON.parse(await n.load(t.config)):t.config??{},i=e.isString(t.patch)?JSON.parse(await n.load(t.patch)):t.patch;return{...t,...i?{patch:i}:{},...r?{config:r}:{}}}async function Ln(e,t={}){const n=document.createElement("div");n.classList.add("vega-embed-wrapper");const r=document.createElement("div");n.appendChild(r);const i=!0===t.actions||!1===t.actions?t.actions:{export:!0,source:!1,compiled:!0,editor:!0,...t.actions},o=await In(r,e,{actions:i,...t});return n.value=o.view,n}const Nn=(...t)=>{return t.length>1&&(e.isString(t[0])&&!((n=t[0]).startsWith("http://")||n.startsWith("https://")||n.startsWith("//"))||t[0]instanceof HTMLElement||3===t.length)?In(t[0],t[1],t[2]):Ln(t[0],t[1]);var n};return Nn.vegaLite=pn,Nn.vl=pn,Nn.container=Ln,Nn.embed=In,Nn.vega=dn,Nn.default=In,Nn.version=fn,Nn})); -//# sourceMappingURL=vega-embed.min.js.map diff --git a/assets/vendor/vega-lite.min.js b/assets/vendor/vega-lite.min.js deleted file mode 100644 index 31b0032..0000000 --- a/assets/vendor/vega-lite.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vega")):"function"==typeof define&&define.amd?define(["exports","vega"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).vegaLite={},e.vega)}(this,(function(e,t){"use strict";var n="5.23.0";function i(e){return J(e,"or")}function r(e){return J(e,"and")}function o(e){return J(e,"not")}function a(e,t){if(o(e))a(e.not,t);else if(r(e))for(const n of e.and)a(n,t);else if(i(e))for(const n of e.or)a(n,t);else t(e)}function s(e,t){return o(e)?{not:s(e.not,t)}:r(e)?{and:e.and.map((e=>s(e,t)))}:i(e)?{or:e.or.map((e=>s(e,t)))}:t(e)}const l=structuredClone;function c(e){throw new Error(e)}function u(e,n){const i={};for(const r of n)t.hasOwnProperty(e,r)&&(i[r]=e[r]);return i}function f(e,t){const n={...e};for(const e of t)delete n[e];return n}function d(e){if(t.isNumber(e))return e;const n=t.isString(e)?e:Q(e);if(n.length<250)return n;let i=0;for(let e=0;e1?t-1:0),i=1;i0===t?e:`[${e}]`)),r=e.map(((t,n)=>e.slice(0,n+1).join("")));for(const e of r)n.add(e)}return n}function k(e,t){return void 0===e||void 0===t||$(w(e),w(t))}function S(e){return 0===D(e).length}Set.prototype.toJSON=function(){return`Set(${[...this].map((e=>Q(e))).join(",")})`};const D=Object.keys,F=Object.values,O=Object.entries;function z(e){return!0===e||!1===e}function C(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function _(e,t){return o(e)?`!(${_(e.not,t)})`:r(e)?`(${e.and.map((e=>_(e,t))).join(") && (")})`:i(e)?`(${e.or.map((e=>_(e,t))).join(") || (")})`:t(e)}function P(e,t){if(0===t.length)return!0;const n=t.shift();return n in e&&P(e[n],t)&&delete e[n],S(e)}function N(e){return e.charAt(0).toUpperCase()+e.substr(1)}function A(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"datum";const i=t.splitAccessPath(e),r=[];for(let e=1;e<=i.length;e++){const o=`[${i.slice(0,e).map(t.stringValue).join("][")}]`;r.push(`${n}${o}`)}return r.join(" && ")}function T(e){return`${arguments.length>1&&void 0!==arguments[1]?arguments[1]:"datum"}[${t.stringValue(t.splitAccessPath(e).join("."))}]`}function j(e){return`datum['${e.replaceAll("'","\\'")}']`}function E(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function M(e){return`${t.splitAccessPath(e).map(E).join("\\.")}`}function R(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function L(e){return`${t.splitAccessPath(e).join(".")}`}function q(e){return e?t.splitAccessPath(e).length:0}function U(){for(var e=arguments.length,t=new Array(e),n=0;nvoid 0!==e))}let W=42;function I(e){const t=++W;return e?String(e)+t:t}function B(e){return V(e)?e:`__${e}`}function V(e){return e.startsWith("__")}function H(e){if(void 0!==e)return(e%360+360)%360}function G(e){return!!t.isNumber(e)||!isNaN(e)&&!isNaN(parseFloat(e))}const Y=Object.getPrototypeOf(structuredClone({}));function X(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor.name!==t.constructor.name)return!1;let n,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;0!=i--;)if(!X(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;for(const n of e.entries())if(!X(n[1],t.get(n[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e.entries())if(!t.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(i=n;0!=i--;)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&e.valueOf!==Y.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&e.toString!==Y.toString)return e.toString()===t.toString();const r=Object.keys(e);if(n=r.length,n!==Object.keys(t).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(i=n;0!=i--;){const n=r[i];if(!X(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Q(e){const t=[];return function e(n){if(n&&n.toJSON&&"function"==typeof n.toJSON&&(n=n.toJSON()),void 0===n)return;if("number"==typeof n)return isFinite(n)?""+n:"null";if("object"!=typeof n)return JSON.stringify(n);let i,r;if(Array.isArray(n)){for(r="[",i=0;ihn(e[t])?C(`_${t}_${O(e[t])}`):C(`_${t}_${e[t]}`))).join("")}function mn(e){return!0===e||gn(e)&&!e.binned}function pn(e){return"binned"===e||gn(e)&&!0===e.binned}function gn(e){return t.isObject(e)}function hn(e){return J(e,"param")}function yn(e){switch(e){case K:case Z:case xe:case he:case ye:case ve:case De:case we:case ke:case Se:case be:return 6;case Fe:return 4;default:return 10}}function vn(e){return J(e,"expr")}function bn(e){let{level:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{level:0};const n=D(e||{}),i={};for(const r of n)i[r]=0===t?Cn(e[r]):bn(e[r],{level:t-1});return i}function xn(e){const{anchor:t,frame:n,offset:i,orient:r,angle:o,limit:a,color:s,subtitleColor:l,subtitleFont:c,subtitleFontSize:f,subtitleFontStyle:d,subtitleFontWeight:m,subtitleLineHeight:p,subtitlePadding:g,...h}=e,y={...t?{anchor:t}:{},...n?{frame:n}:{},...i?{offset:i}:{},...r?{orient:r}:{},...void 0!==o?{angle:o}:{},...void 0!==a?{limit:a}:{}},v={...l?{subtitleColor:l}:{},...c?{subtitleFont:c}:{},...f?{subtitleFontSize:f}:{},...d?{subtitleFontStyle:d}:{},...m?{subtitleFontWeight:m}:{},...p?{subtitleLineHeight:p}:{},...g?{subtitlePadding:g}:{}};return{titleMarkConfig:{...h,...s?{fill:s}:{}},subtitleMarkConfig:u(e,["align","baseline","dx","dy","limit"]),nonMarkTitleProperties:y,subtitle:v}}function $n(e){return t.isString(e)||t.isArray(e)&&t.isString(e[0])}function wn(e){return J(e,"signal")}function kn(e){return J(e,"step")}function Sn(e){return!t.isArray(e)&&(J(e,"field")&&J(e,"data"))}const Dn=D({aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1}),Fn={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},On=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function zn(e){const n=t.isArray(e.condition)?e.condition.map(_n):_n(e.condition);return{...Cn(e),condition:n}}function Cn(e){if(vn(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function _n(e){if(vn(e)){const{expr:t,...n}=e;return{signal:t,...n}}return e}function Pn(e){if(vn(e)){const{expr:t,...n}=e;return{signal:t,...n}}return wn(e)?e:void 0!==e?{value:e}:void 0}function Nn(e){return wn(e)?e.signal:t.stringValue(e.value)}function An(e){return wn(e)?e.signal:null==e?null:t.stringValue(e)}function Tn(e,t,n){for(const i of n){const n=Mn(i,t.markDef,t.config);void 0!==n&&(e[i]=Pn(n))}return e}function jn(e){return[].concat(e.type,e.style??[])}function En(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{vgChannel:r,ignoreVgConfig:o}=i;return r&&J(t,r)?t[r]:void 0!==t[e]?t[e]:!o||r&&r!==e?Mn(e,t,n,i):void 0}function Mn(e,t,n){let{vgChannel:i}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=Rn(e,t,n.style);return U(i?r:void 0,r,i?n[t.type][i]:void 0,n[t.type][e],i?n.mark[i]:n.mark[e])}function Rn(e,t,n){return Ln(e,jn(t),n)}function Ln(e,n,i){let r;n=t.array(n);for(const t of n){const n=i[t];J(n,e)&&(r=n[e])}return r}function qn(e,n){return t.array(e).reduce(((e,t)=>(e.field.push(ma(t,n)),e.order.push(t.sort??"ascending"),e)),{field:[],order:[]})}function Un(e,t){const n=[...e];return t.forEach((e=>{for(const t of n)if(X(t,e))return;n.push(e)})),n}function Wn(e,n){return X(e,n)||!n?e:e?[...t.array(e),...t.array(n)].join(", "):n}function In(e,t){const n=e.value,i=t.value;if(null==n||null===i)return{explicit:e.explicit,value:null};if(($n(n)||wn(n))&&($n(i)||wn(i)))return{explicit:e.explicit,value:Wn(n,i)};if($n(n)||wn(n))return{explicit:e.explicit,value:n};if($n(i)||wn(i))return{explicit:e.explicit,value:i};if(!($n(n)||wn(n)||$n(i)||wn(i)))return{explicit:e.explicit,value:Un(n,i)};throw new Error("It should never reach here")}function Bn(e){return`Invalid specification ${Q(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}const Vn='Autosize "fit" only works for single views and layered views.';function Hn(e){return`${"width"==e?"Width":"Height"} "container" only works for single views and layered views.`}function Gn(e){return`${"width"==e?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==e?"x":"y"}".`}function Yn(e){return e?`Dropping "fit-${e}" because spec has discrete ${st(e)}.`:'Dropping "fit" because spec has discrete size.'}function Xn(e){return`Unknown field for ${e}. Cannot calculate view size.`}function Qn(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function Jn(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function Kn(e){return`Selection not supported for ${e} yet.`}const Zn="The same selection must be used to override scale domains in a layered view.";function ei(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}const ti="Animation involving facet, layer, or concat is currently unsupported.";function ni(e,t,n){return`An ancestor parsed field "${e}" as ${n} but a child wants to parse the field as ${t}.`}function ii(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function ri(e){return`${e}Offset dropped because ${e} is continuous`}function oi(e){return`Invalid field type "${e}".`}function ai(e,t){const{fill:n,stroke:i}=t;return`Dropping color ${e} as the plot also has ${n&&i?"fill and stroke":n?"fill":"stroke"}.`}function si(e,t){return`Dropping ${Q(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}function li(e,t,n){return`${e} dropped as it is incompatible with "${t}".`}function ci(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function ui(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function fi(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${"ordinal"===t?"order":"magnitude"}.`}function di(e){return`Using unaggregated domain with raw field has no effect (${Q(e)}).`}function mi(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function pi(e){return`Unaggregated domain is currently unsupported for log scale (${Q(e)}).`}function gi(e,t,n){return`${n}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function hi(e){return`The step for "${e}" is dropped because the ${"width"===e?"x":"y"} is continuous.`}const yi="Domains that should be unioned has conflicting sort properties. Sort will be set to true.";function vi(e,t){return`Invalid ${e}: ${Q(t)}.`}function bi(e){return`1D error band does not support ${e}.`}function xi(e){return`Channel ${e} is required for "binned" bin.`}const $i=t.logger(t.Warn);let wi=$i;function ki(){wi.error(...arguments)}function Si(){wi.warn(...arguments)}function Di(e){if(e&&t.isObject(e))for(const t of Ai)if(J(e,t))return!0;return!1}const Fi=["january","february","march","april","may","june","july","august","september","october","november","december"],Oi=Fi.map((e=>e.substr(0,3))),zi=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Ci=zi.map((e=>e.substr(0,3)));function _i(e,n){const i=[];if(n&&void 0!==e.day&&D(e).length>1&&(Si(function(e){return`Dropping day from datetime ${Q(e)} as day cannot be combined with other units.`}(e)),delete(e=l(e)).day),void 0!==e.year?i.push(e.year):i.push(2012),void 0!==e.month){const r=n?function(e){if(G(e)&&(e=+e),t.isNumber(e))return e-1;{const t=e.toLowerCase(),n=Fi.indexOf(t);if(-1!==n)return n;const i=t.substr(0,3),r=Oi.indexOf(i);if(-1!==r)return r;throw new Error(vi("month",e))}}(e.month):e.month;i.push(r)}else if(void 0!==e.quarter){const r=n?function(e){if(G(e)&&(e=+e),t.isNumber(e))return e>4&&Si(vi("quarter",e)),e-1;throw new Error(vi("quarter",e))}(e.quarter):e.quarter;i.push(t.isNumber(r)?3*r:`${r}*3`)}else i.push(0);if(void 0!==e.date)i.push(e.date);else if(void 0!==e.day){const r=n?function(e){if(G(e)&&(e=+e),t.isNumber(e))return e%7;{const t=e.toLowerCase(),n=zi.indexOf(t);if(-1!==n)return n;const i=t.substr(0,3),r=Ci.indexOf(i);if(-1!==r)return r;throw new Error(vi("day",e))}}(e.day):e.day;i.push(t.isNumber(r)?r+1:`${r}+1`)}else i.push(1);for(const t of["hours","minutes","seconds","milliseconds"]){const n=e[t];i.push(void 0===n?0:n)}return i}function Pi(e){const t=_i(e,!0).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}const Ni={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},Ai=D(Ni);function Ti(e){return t.isObject(e)?e.binned:ji(e)}function ji(e){return e&&e.startsWith("binned")}function Ei(e){return e.startsWith("utc")}const Mi={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function Ri(e){return Ai.filter((t=>qi(e,t)))}function Li(e){const t=Ri(e);return t[t.length-1]}function qi(e,t){const n=e.indexOf(t);return!(n<0)&&(!(n>0&&"seconds"===t&&"i"===e.charAt(n-1))&&(!(e.length>n+3&&"day"===t&&"o"===e.charAt(n+3))&&!(n>0&&"year"===t&&"f"===e.charAt(n-1))))}function Ui(e,t){let{end:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{end:!1};const i=A(t),r=Ei(e)?"utc":"";let o;const a={};for(const t of Ai)qi(e,t)&&(a[t]="quarter"===(s=t)?`(${r}quarter(${i})-1)`:`${r}${s}(${i})`,o=t);var s;return n&&(a[o]+="+1"),function(e){const t=_i(e,!1).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}(a)}function Wi(e){if(!e)return;return`timeUnitSpecifier(${Q(Ri(e))}, ${Q(Mi)})`}function Ii(e){if(!e)return;let n;return t.isString(e)?n=ji(e)?{unit:e.substring(6),binned:!0}:{unit:e}:t.isObject(e)&&(n={...e,...e.unit?{unit:e.unit}:{}}),Ei(n.unit)&&(n.utc=!0,n.unit=n.unit.substring(3)),n}function Bi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;const n=Ii(e),i=Li(n.unit);if(i&&"day"!==i){const e={year:2001,month:1,date:1,hours:0,minutes:0,seconds:0,milliseconds:0},{step:r,part:o}=Hi(i,n.step);return`${t(Pi({...e,[o]:+e[o]+r}))} - ${t(Pi(e))}`}}const Vi={year:1,month:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1};function Hi(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(function(e){return t.hasOwnProperty(Vi,e)}(e))return{part:e,step:n};switch(e){case"day":case"dayofyear":return{part:"date",step:n};case"quarter":return{part:"month",step:3*n};case"week":return{part:"date",step:7*n}}}function Gi(e){return!!e?.field&&void 0!==e.equal}function Yi(e){return!!e?.field&&void 0!==e.lt}function Xi(e){return!!e?.field&&void 0!==e.lte}function Qi(e){return!!e?.field&&void 0!==e.gt}function Ji(e){return!!e?.field&&void 0!==e.gte}function Ki(e){if(e?.field){if(t.isArray(e.range)&&2===e.range.length)return!0;if(wn(e.range))return!0}return!1}function Zi(e){return!!e?.field&&(t.isArray(e.oneOf)||t.isArray(e.in))}function er(e){return Zi(e)||Gi(e)||Ki(e)||Yi(e)||Qi(e)||Xi(e)||Ji(e)}function tr(e,t){return _a(e,{timeUnit:t,wrapTime:!0})}function nr(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{field:n}=e,i=Ii(e.timeUnit),{unit:r,binned:o}=i||{},a=ma(e,{expr:"datum"}),s=r?`time(${o?a:Ui(r,n)})`:a;if(Gi(e))return`${s}===${tr(e.equal,r)}`;if(Yi(e)){return`${s}<${tr(e.lt,r)}`}if(Qi(e)){return`${s}>${tr(e.gt,r)}`}if(Xi(e)){return`${s}<=${tr(e.lte,r)}`}if(Ji(e)){return`${s}>=${tr(e.gte,r)}`}if(Zi(e))return`indexof([${function(e,t){return e.map((e=>tr(e,t)))}(e.oneOf,r).join(",")}], ${s}) !== -1`;if(function(e){return!!e?.field&&void 0!==e.valid}(e))return ir(s,e.valid);if(Ki(e)){const{range:n}=bn(e),i=wn(n)?{signal:`${n.signal}[0]`}:n[0],o=wn(n)?{signal:`${n.signal}[1]`}:n[1];if(null!==i&&null!==o&&t)return"inrange("+s+", ["+tr(i,r)+", "+tr(o,r)+"])";const a=[];return null!==i&&a.push(`${s} >= ${tr(i,r)}`),null!==o&&a.push(`${s} <= ${tr(o,r)}`),a.length>0?a.join(" && "):"true"}throw new Error(`Invalid field predicate: ${Q(e)}`)}function ir(e){return!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function rr(e){return er(e)&&e.timeUnit?{...e,timeUnit:Ii(e.timeUnit)}:e}function or(e){return"quantitative"===e||"temporal"===e}function ar(e){return"ordinal"===e||"nominal"===e}const sr="quantitative",lr="ordinal",cr="temporal",ur="nominal",fr="geojson";const dr={LINEAR:"linear",LOG:"log",POW:"pow",SQRT:"sqrt",SYMLOG:"symlog",IDENTITY:"identity",SEQUENTIAL:"sequential",TIME:"time",UTC:"utc",QUANTILE:"quantile",QUANTIZE:"quantize",THRESHOLD:"threshold",BIN_ORDINAL:"bin-ordinal",ORDINAL:"ordinal",POINT:"point",BAND:"band"},mr={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function pr(e,t){const n=mr[e],i=mr[t];return n===i||"ordinal-position"===n&&"time"===i||"ordinal-position"===i&&"time"===n}const gr={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function hr(e){return gr[e]}const yr=new Set(["linear","log","pow","sqrt","symlog"]),vr=new Set([...yr,"time","utc"]);function br(e){return yr.has(e)}const xr=new Set(["quantile","quantize","threshold"]),$r=new Set([...vr,...xr,"sequential","identity"]),wr=new Set(["ordinal","bin-ordinal","point","band"]);function kr(e){return wr.has(e)}function Sr(e){return $r.has(e)}function Dr(e){return vr.has(e)}function Fr(e){return xr.has(e)}function Or(e){return J(e,"param")}const{type:zr,domain:Cr,range:_r,rangeMax:Pr,rangeMin:Nr,scheme:Ar,...Tr}={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,domainRaw:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},jr=D(Tr);function Er(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return Dr(e)||"band"===e||"point"===e;case"padding":case"rangeMin":case"rangeMax":return Dr(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return"band"===e;case"domainMax":case"domainMid":case"domainMin":case"domainRaw":case"clamp":return Dr(e);case"nice":return Dr(e)||"quantize"===e||"threshold"===e;case"exponent":return"pow"===e;case"base":return"log"===e;case"constant":return"symlog"===e;case"zero":return Sr(e)&&!p(["log","time","utc","threshold","quantile"],e)}}function Mr(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return We(e)?void 0:`Cannot use the scale property "${t}" with non-color channel.`;case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"domainRaw":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}const Rr={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},Lr=Rr.arc,qr=Rr.area,Ur=Rr.bar,Wr=Rr.image,Ir=Rr.line,Br=Rr.point,Vr=Rr.rect,Hr=Rr.rule,Gr=Rr.text,Yr=Rr.tick,Xr=Rr.trail,Qr=Rr.circle,Jr=Rr.square,Kr=Rr.geoshape;function Zr(e){return["line","area","trail"].includes(e)}function eo(e){return["rect","bar","image","arc","tick"].includes(e)}const to=new Set(D(Rr));function no(e){return J(e,"type")}const io=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit","fill","fillOpacity"],ro=D({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),oo=["binSpacing","continuousBandSize","discreteBandSize","minBandSize"],ao={area:["line","point"],bar:oo,rect:oo,line:["point"],tick:["bandSize","thickness",...oo]},so=D({mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1});function lo(e){return J(e,"band")}const co={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},uo={binSpacing:0,continuousBandSize:5,minBandSize:.25,timeUnitBandPosition:.5},fo={...uo,binSpacing:1},mo={...uo,thickness:1};function po(e,t){let{isPath:n}=t;return void 0===e||"break-paths-show-path-domains"===e?n?"break-paths-show-domains":"filter":null===e?"show":e}function go(e){let{markDef:t,config:n,scaleChannel:i,scaleType:r,isCountAggregate:o}=e;if(!r||!Sr(r)||o)return"always-valid";const a=po(En("invalid",t,n),{isPath:Zr(t.type)}),s=n.scale?.invalid?.[i];return void 0!==s?"show":a}function ho(e){let{scaleName:t,scale:n,mode:i}=e;const r=`domain('${t}')`;if(!n||!t)return;const o=`${r}[0]`,a=`peek(${r})`,s=n.domainHasZero();if("definitely"===s)return{scale:t,value:0};if("maybe"===s){return{signal:`scale('${t}', inrange(0, ${r}) ? 0 : ${"zeroOrMin"===i?o:a})`}}return{signal:`scale('${t}', ${"zeroOrMin"===i?o:a})`}}function yo(e){let{scaleChannel:t,channelDef:n,scale:i,scaleName:r,markDef:o,config:a}=e;const s=i?.get("type"),l=wa(n),c=go({scaleChannel:t,markDef:o,config:a,scaleType:s,isCountAggregate:cn(l?.aggregate)});if(l&&"show"===c){const e=a.scale.invalid?.[t]??"zero-or-min";return{test:ir(ma(l,{expr:"datum"}),!1),...vo(e,i,r)}}}function vo(e,n,i){if(r=e,t.isObject(r)&&"value"in r){const{value:t}=e;return wn(t)?{signal:t.signal}:{value:t}}var r;return ho({scale:n,scaleName:i,mode:"zeroOrMin"})}function bo(e){const{channel:t,channelDef:n,markDef:i,scale:r,scaleName:o,config:a}=e,s=rt(t),l=wo(e),c=yo({scaleChannel:s,channelDef:n,scale:r,scaleName:o,markDef:i,config:a});return void 0!==c?[c,l]:l}function xo(e,t,n,i){const r={};if(t&&(r.scale=t),ta(e)){const{datum:t}=e;Di(t)?r.signal=Pi(t):wn(t)?r.signal=t.signal:vn(t)?r.signal=t.expr:r.value=t}else r.field=ma(e,n);if(i){const{offset:e,band:t}=i;e&&(r.offset=e),t&&(r.band=t)}return r}function $o(e){let{scaleName:t,fieldOrDatumDef:n,fieldOrDatumDef2:i,offset:r,startSuffix:o,endSuffix:a="end",bandPosition:s=.5}=e;const l=!wn(s)&&01&&void 0!==arguments[1]?arguments[1]:{},n=e.field;const i=t.prefix;let r=t.suffix,o="";if(function(e){return"count"===e.aggregate}(e))n=B("count");else{let i;if(!t.nofn)if(function(e){return J(e,"op")}(e))i=e.op;else{const{bin:a,aggregate:s,timeUnit:l}=e;mn(a)?(i=dn(a),r=(t.binSuffix??"")+(t.suffix??"")):s?an(s)?(o=`["${n}"]`,n=`argmax_${s.argmax}`):on(s)?(o=`["${n}"]`,n=`argmin_${s.argmin}`):i=String(s):l&&!Ti(l)&&(i=function(e){const{utc:t,...n}=Ii(e);return n.unit?(t?"utc":"")+D(n).map((e=>C(`${"unit"===e?"":`_${e}_`}${n[e]}`))).join(""):(t?"utc":"")+"timeunit"+D(n).map((e=>C(`_${e}_${n[e]}`))).join("")}(l),r=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(t.suffix??""))}i&&(n=n?`${i}_${n}`:i)}return r&&(n=`${n}_${r}`),i&&(n=`${i}_${n}`),t.forAs?L(n):t.expr?T(n,t.expr)+o:M(n)+o}function pa(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return Zo(e)&&!!e.bin;case"temporal":return!1}throw new Error(oi(e.type))}const ga=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return function(e){const{aggregate:t,bin:n,timeUnit:i,field:r}=e;if(an(t))return`${r} for argmax(${t.argmax})`;if(on(t))return`${r} for argmin(${t.argmin})`;const o=i&&!Ti(i)?Ii(i):void 0,a=t||o?.unit||o?.maxbins&&"timeunit"||mn(n)&&"bin";return a?`${a.toUpperCase()}(${r})`:r}(e);default:return function(e,t){const{field:n,bin:i,timeUnit:r,aggregate:o}=e;if("count"===o)return t.countTitle;if(mn(i))return`${n} (binned)`;if(r&&!Ti(r)){const e=Ii(r)?.unit;if(e)return`${n} (${Ri(e).join("-")})`}else if(o)return an(o)?`${n} for max ${o.argmax}`:on(o)?`${n} for min ${o.argmin}`:`${N(o)} of ${n}`;return n}(e,t)}};let ha=ga;function ya(e){ha=e}function va(e,t,n){let{allowDisabling:i,includeDefault:r=!0}=n;const o=ba(e)?.title;if(!Zo(e))return o??e.title;const a=e,s=r?xa(a,t):void 0;return i?U(o,a.title,s):o??a.title??s}function ba(e){return ca(e)&&e.axis?e.axis:ua(e)&&e.legend?e.legend:Wo(e)&&e.header?e.header:void 0}function xa(e,t){return ha(e,t)}function $a(e){if(fa(e)){const{format:t,formatType:n}=e;return{format:t,formatType:n}}{const t=ba(e)??{},{format:n,formatType:i}=t;return{format:n,formatType:i}}}function wa(e){return Zo(e)?e:Jo(e)?e.condition:void 0}function ka(e){return oa(e)?e:Ko(e)?e.condition:void 0}function Sa(e,n,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t.isString(e)||t.isNumber(e)||t.isBoolean(e)){return Si(function(e,t,n){return`Channel ${e} is a ${t}. Converted to {value: ${Q(n)}}.`}(n,t.isString(e)?"string":t.isNumber(e)?"number":"boolean",e)),{value:e}}return oa(e)?Da(e,n,i,r):Ko(e)?{...e,condition:Da(e.condition,n,i,r)}:e}function Da(e,n,i,r){if(fa(e)){const{format:t,formatType:o,...a}=e;if(So(o)&&!i.customFormatTypes)return Si(ii(n)),Da(a,n,i,r)}else{const t=ca(e)?"axis":ua(e)?"legend":Wo(e)?"header":null;if(t&&e[t]){const{format:o,formatType:a,...s}=e[t];if(So(a)&&!i.customFormatTypes)return Si(ii(n)),Da({...e,[t]:s},n,i,r)}}return Zo(e)?Fa(e,n,r):function(e){let n=e.type;if(n)return e;const{datum:i}=e;return n=t.isNumber(i)?"quantitative":t.isString(i)?"nominal":Di(i)?"temporal":void 0,{...e,type:n}}(e)}function Fa(e,n){let{compositeMark:i=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{aggregate:r,timeUnit:o,bin:a,field:s}=e,l={...e};if(i||!r||sn(r)||an(r)||on(r)||(Si(function(e){return`Invalid aggregation operator "${e}".`}(r)),delete l.aggregate),o&&(l.timeUnit=Ii(o)),s&&(l.field=`${s}`),mn(a)&&(l.bin=Oa(a,n)),pn(a)&&!_t(n)&&Si(function(e){return`Channel ${e} should not be used with "binned" bin.`}(n)),aa(l)){const{type:e}=l,t=function(e){if(e)switch(e=e.toLowerCase()){case"q":case sr:return"quantitative";case"t":case cr:return"temporal";case"o":case lr:return"ordinal";case"n":case ur:return"nominal";case fr:return"geojson"}}(e);e!==t&&(l.type=t),"quantitative"!==e&&cn(r)&&(Si(function(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}(e,r)),l.type="quantitative")}else if(!it(n)){const e=function(e,n){switch(n){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(Vo(e)&&t.isArray(e.sort))return"ordinal";const{aggregate:i,bin:r,timeUnit:o}=e;if(o)return"temporal";if(r||i&&!an(i)&&!on(i))return"quantitative";if(la(e)&&e.scale?.type)switch(mr[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}(l,n);l.type=e}if(aa(l)){const{compatible:e,warning:t}=function(e,t){const n=e.type;if("geojson"===n&&"shape"!==t)return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case K:case Z:case ee:return pa(e)?za:{compatible:!1,warning:ci(t)};case te:case ne:case oe:case ae:case he:case ye:case ve:case Oe:case Ce:case _e:case Pe:case Ne:case Ae:case $e:case ce:case se:case Te:return za;case de:case pe:case fe:case me:return n!==sr?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:za;case we:case ke:case Se:case De:case xe:case ue:case le:case ie:case re:case ge:return"nominal"!==n||e.sort?za:{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`};case be:case Fe:return pa(e)||la(i=e)&&Fr(i.scale?.type)?za:{compatible:!1,warning:ui(t)};case ze:return"nominal"!==e.type||"sort"in e?za:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}var i}(l,n)||{};!1===e&&Si(t)}if(Vo(l)&&t.isString(l.sort)){const{sort:e}=l;if(Ro(e))return{...l,sort:{encoding:e}};const t=e.substring(1);if("-"===e.charAt(0)&&Ro(t))return{...l,sort:{encoding:t,order:"descending"}}}if(Wo(l)){const{header:e}=l;if(e){const{orient:t,...n}=e;if(t)return{...l,header:{...n,labelOrient:e.labelOrient||t,titleOrient:e.titleOrient||t}}}}return l}function Oa(e,n){return t.isBoolean(e)?{maxbins:yn(n)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:{...e,maxbins:yn(n)}}const za={compatible:!0};function Ca(e){const{formatType:t}=$a(e);return"time"===t||!t&&((n=e)&&("temporal"===n.type||Zo(n)&&!!n.timeUnit));var n}function _a(e,n){let{timeUnit:i,type:r,wrapTime:o,undefinedIfExprNotRequired:a}=n;const s=i&&Ii(i)?.unit;let l,c=s||"temporal"===r;return vn(e)?l=e.expr:wn(e)?l=e.signal:Di(e)?(c=!0,l=Pi(e)):(t.isString(e)||t.isNumber(e))&&c&&(l=`datetime(${Q(e)})`,function(e){return t.hasOwnProperty(Ni,e)}(s)&&(t.isNumber(e)&&e<1e4||t.isString(e)&&isNaN(Date.parse(e)))&&(l=Pi({[s]:e}))),l?o&&c?`time(${l})`:l:a?void 0:Q(e)}function Pa(e,t){const{type:n}=e;return t.map((t=>{const i=_a(t,{timeUnit:Zo(e)&&!Ti(e.timeUnit)?e.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return void 0!==i?{signal:i}:t}))}function Na(e,t){return mn(e.bin)?Qt(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const Aa={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function Ta(e){return e?.condition}const ja=["domain","grid","labels","ticks","title"],Ea={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},Ma={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},Ra={...Ma,style:1,labelExpr:1,encoding:1};function La(e){return t.hasOwnProperty(Ra,e)}const qa=D({axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1});function Ua(e){return J(e,"mark")}class Wa{constructor(e,t){this.name=e,this.run=t}hasMatchingType(e){return!!Ua(e)&&(no(t=e.mark)?t.type:t)===this.name;var t}}function Ia(e,n){const i=e&&e[n];return!!i&&(t.isArray(i)?g(i,(e=>!!e.field)):Zo(i)||Jo(i))}function Ba(e,n){const i=e&&e[n];return!!i&&(t.isArray(i)?g(i,(e=>!!e.field)):Zo(i)||ta(i)||Ko(i))}function Va(e,t){if(_t(t)){const n=e[t];if((Zo(n)||ta(n))&&(ar(n.type)||Zo(n)&&n.timeUnit)){return Ba(e,ct(t))}}return!1}function Ha(e){return g(He,(n=>{if(Ia(e,n)){const i=e[n];if(t.isArray(i))return g(i,(e=>!!e.aggregate));{const e=wa(i);return e&&!!e.aggregate}}return!1}))}function Ga(e,n){const i=[],r=[],o=[],a=[],s={};return Qa(e,((l,c)=>{if(Zo(l)){const{field:u,aggregate:f,bin:d,timeUnit:m,...p}=l;if(f||m||d){const e=ba(l),g=e?.title;let h=ma(l,{forAs:!0});const y={...g?[]:{title:va(l,n,{allowDisabling:!0})},...p,field:h};if(f){let e;if(an(f)?(e="argmax",h=ma({op:"argmax",field:f.argmax},{forAs:!0}),y.field=`${h}.${u}`):on(f)?(e="argmin",h=ma({op:"argmin",field:f.argmin},{forAs:!0}),y.field=`${h}.${u}`):"boxplot"!==f&&"errorbar"!==f&&"errorband"!==f&&(e=f),e){const t={op:e,as:h};u&&(t.field=u),a.push(t)}}else if(i.push(h),aa(l)&&mn(d)){if(r.push({bin:d,field:u,as:h}),i.push(ma(l,{binSuffix:"end"})),Na(l,c)&&i.push(ma(l,{binSuffix:"range"})),_t(c)){const e={field:`${h}_end`};s[`${c}2`]=e}y.bin="binned",it(c)||(y.type=sr)}else if(m&&!Ti(m)){o.push({timeUnit:m,field:u,as:h});const e=aa(l)&&l.type!==cr&&"time";e&&(c===Oe||c===Pe?y.formatType=e:!function(e){return t.hasOwnProperty(Ft,e)}(c)?_t(c)&&(y.axis={formatType:e,...y.axis}):y.legend={formatType:e,...y.legend})}s[c]=y}else i.push(u),s[c]=e[c]}else s[c]=e[c]})),{bins:r,timeUnits:o,aggregate:a,groupby:i,encoding:s}}function Ya(e,t,n){const i=Jt(t,n);if(!i)return!1;if("binned"===i){const n=e[t===ie?te:ne];return!!(Zo(n)&&Zo(e[t])&&pn(n.bin))}return!0}function Xa(e,t){const n={};for(const i of D(e)){const r=Sa(e[i],i,t,{compositeMark:!0});n[i]=r}return n}function Qa(e,n,i){if(e)for(const r of D(e)){const o=e[r];if(t.isArray(o))for(const e of o)n.call(i,e,r);else n.call(i,o,r)}}function Ja(e,n){return D(n).reduce(((i,r)=>{switch(r){case te:case ne:case Ne:case Te:case Ae:case ie:case re:case oe:case ae:case ce:case ue:case se:case le:case ge:case fe:case de:case me:case pe:case Oe:case be:case $e:case Pe:return i;case ze:if("line"===e||"trail"===e)return i;case Ce:case _e:{const e=n[r];if(t.isArray(e)||Zo(e))for(const n of t.array(e))n.aggregate||i.push(ma(n,{}));return i}case xe:if("trail"===e)return i;case he:case ye:case ve:case we:case ke:case Se:case Fe:case De:{const e=wa(n[r]);return e&&!e.aggregate&&i.push(ma(e,{})),i}}}),[])}function Ka(e,n,i){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if("tooltip"in i)return{tooltip:i.tooltip};return{tooltip:[...e.map((e=>{let{fieldPrefix:t,titlePrefix:i}=e;const o=r?` of ${Za(n)}`:"";return{field:t+n.field,type:n.type,title:wn(i)?{signal:`${i}"${escape(o)}"`}:i+o}})),...b(function(e){const n=[];for(const i of D(e))if(Ia(e,i)){const r=e[i],o=t.array(r);for(const e of o)Zo(e)?n.push(e):Jo(e)&&n.push(e.condition)}return n}(i).map(da),d)]}}function Za(e){const{title:t,field:n}=e;return U(t,n)}function es(e,n,i,r,o){const{scale:a,axis:s}=i;return l=>{let{partName:c,mark:u,positionPrefix:f,endPositionPrefix:d,extraEncoding:m={}}=l;const p=Za(i);return ts(e,c,o,{mark:u,encoding:{[n]:{field:`${f}_${i.field}`,type:i.type,...void 0!==p?{title:p}:{},...void 0!==a?{scale:a}:{},...void 0!==s?{axis:s}:{}},...t.isString(d)?{[`${n}2`]:{field:`${d}_${i.field}`}}:{},...r,...m}})}}function ts(e,n,i,r){const{clip:o,color:a,opacity:s}=e,l=e.type;return e[n]||void 0===e[n]&&i[n]?[{...r,mark:{...i[n],...o?{clip:o}:{},...a?{color:a}:{},...s?{opacity:s}:{},...no(r.mark)?r.mark:{type:r.mark},style:`${l}-${String(n)}`,...t.isBoolean(e[n])?{}:e[n]}}]:[]}function ns(e,t,n){const{encoding:i}=e,r="vertical"===t?"y":"x",o=i[r],a=i[`${r}2`],s=i[`${r}Error`],l=i[`${r}Error2`];return{continuousAxisChannelDef:is(o,n),continuousAxisChannelDef2:is(a,n),continuousAxisChannelDefError:is(s,n),continuousAxisChannelDefError2:is(l,n),continuousAxis:r}}function is(e,t){if(e?.aggregate){const{aggregate:n,...i}=e;return n!==t&&Si(function(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}(n,t)),i}return e}function rs(e,t){const{mark:n,encoding:i}=e,{x:r,y:o}=i;if(no(n)&&n.orient)return n.orient;if(na(r)){if(na(o)){const e=Zo(r)&&r.aggregate,n=Zo(o)&&o.aggregate;if(e||n!==t){if(n||e!==t){if(e===t&&n===t)throw new Error("Both x and y cannot have aggregate");return Ca(o)&&!Ca(r)?"horizontal":"vertical"}return"horizontal"}return"vertical"}return"horizontal"}if(na(o))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}const os="boxplot",as=new Wa(os,ls);function ss(e){return t.isNumber(e)?"tukey":e}function ls(e,n){let{config:i}=n;e={...e,encoding:Xa(e.encoding,i)};const{mark:r,encoding:o,params:a,projection:s,...l}=e,c=no(r)?r:{type:r};a&&Si(Kn("boxplot"));const u=c.extent??i.boxplot.extent,d=En("size",c,i),m=c.invalid,p=ss(u),{bins:g,timeUnits:h,transform:y,continuousAxisChannelDef:v,continuousAxis:b,groupby:x,aggregate:$,encodingWithoutContinuousAxis:w,ticksOrient:k,boxOrient:D,customTooltipWithoutAggregatedField:F}=function(e,n,i){const r=rs(e,os),{continuousAxisChannelDef:o,continuousAxis:a}=ns(e,r,os),s=o.field,l=L(s),c=ss(n),u=[...cs(s),{op:"median",field:s,as:`mid_box_${l}`},{op:"min",field:s,as:("min-max"===c?"lower_whisker_":"min_")+l},{op:"max",field:s,as:("min-max"===c?"upper_whisker_":"max_")+l}],f="min-max"===c||"tukey"===c?[]:[{calculate:`${j(`upper_box_${l}`)} - ${j(`lower_box_${l}`)}`,as:`iqr_${l}`},{calculate:`min(${j(`upper_box_${l}`)} + ${j(`iqr_${l}`)} * ${n}, ${j(`max_${l}`)})`,as:`upper_whisker_${l}`},{calculate:`max(${j(`lower_box_${l}`)} - ${j(`iqr_${l}`)} * ${n}, ${j(`min_${l}`)})`,as:`lower_whisker_${l}`}],{[a]:d,...m}=e.encoding,{customTooltipWithoutAggregatedField:p,filteredEncoding:g}=function(e){const{tooltip:n,...i}=e;if(!n)return{filteredEncoding:i};let r,o;if(t.isArray(n)){for(const e of n)e.aggregate?(r||(r=[]),r.push(e)):(o||(o=[]),o.push(e));r&&(i.tooltip=r)}else n.aggregate?i.tooltip=n:o=n;return t.isArray(o)&&1===o.length&&(o=o[0]),{customTooltipWithoutAggregatedField:o,filteredEncoding:i}}(m),{bins:h,timeUnits:y,aggregate:v,groupby:b,encoding:x}=Ga(g,i),$="vertical"===r?"horizontal":"vertical",w=r,k=[...h,...y,{aggregate:[...v,...u],groupby:b},...f];return{bins:h,timeUnits:y,transform:k,groupby:b,aggregate:v,continuousAxisChannelDef:o,continuousAxis:a,encodingWithoutContinuousAxis:x,ticksOrient:$,boxOrient:w,customTooltipWithoutAggregatedField:p}}(e,u,i),O=L(v.field),{color:z,size:C,..._}=w,P=e=>es(c,b,v,e,i.boxplot),N=P(_),A=P(w),T=(t.isObject(i.boxplot.box)?i.boxplot.box.color:i.mark.color)||"#4c78a8",E=P({..._,...C?{size:C}:{},color:{condition:{test:`${j(`lower_box_${v.field}`)} >= ${j(`upper_box_${v.field}`)}`,...z||{value:T}}}}),M=Ka([{fieldPrefix:"min-max"===p?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===p?"lower_whisker_":"min_",titlePrefix:"Min"}],v,w),R={type:"tick",color:"black",opacity:1,orient:k,invalid:m,aria:!1},q="min-max"===p?M:Ka([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],v,w),U=[...N({partName:"rule",mark:{type:"rule",invalid:m,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:q}),...N({partName:"rule",mark:{type:"rule",invalid:m,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:q}),...N({partName:"ticks",mark:R,positionPrefix:"lower_whisker",extraEncoding:q}),...N({partName:"ticks",mark:R,positionPrefix:"upper_whisker",extraEncoding:q})],W=[..."tukey"!==p?U:[],...A({partName:"box",mark:{type:"bar",...d?{size:d}:{},orient:D,invalid:m,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:M}),...E({partName:"median",mark:{type:"tick",invalid:m,...t.isObject(i.boxplot.median)&&i.boxplot.median.color?{color:i.boxplot.median.color}:{},...d?{size:d}:{},orient:k,aria:!1},positionPrefix:"mid_box",extraEncoding:M})];if("min-max"===p)return{...l,transform:(l.transform??[]).concat(y),layer:W};const I=j(`lower_box_${v.field}`),B=j(`upper_box_${v.field}`),V=`(${B} - ${I})`,H=`${I} - ${u} * ${V}`,G=`${B} + ${u} * ${V}`,Y=j(v.field),X={joinaggregate:cs(v.field),groupby:x},Q={transform:[{filter:`(${H} <= ${Y}) && (${Y} <= ${G})`},{aggregate:[{op:"min",field:v.field,as:`lower_whisker_${O}`},{op:"max",field:v.field,as:`upper_whisker_${O}`},{op:"min",field:`lower_box_${v.field}`,as:`lower_box_${O}`},{op:"max",field:`upper_box_${v.field}`,as:`upper_box_${O}`},...$],groupby:x}],layer:U},{tooltip:J,...K}=_,{scale:Z,axis:ee}=v,te=Za(v),ne=f(ee,["title"]),ie=ts(c,"outliers",i.boxplot,{transform:[{filter:`(${Y} < ${H}) || (${Y} > ${G})`}],mark:"point",encoding:{[b]:{field:v.field,type:v.type,...void 0!==te?{title:te}:{},...void 0!==Z?{scale:Z}:{},...S(ne)?{}:{axis:ne}},...K,...z?{color:z}:{},...F?{tooltip:F}:{}}})[0];let re;const oe=[...g,...h,X];return ie?re={transform:oe,layer:[ie,Q]}:(re=Q,re.transform.unshift(...oe)),{...l,layer:[re,{transform:y,layer:W}]}}function cs(e){const t=L(e);return[{op:"q1",field:e,as:`lower_box_${t}`},{op:"q3",field:e,as:`upper_box_${t}`}]}const us="errorbar",fs=new Wa(us,ds);function ds(e,t){let{config:n}=t;e={...e,encoding:Xa(e.encoding,n)};const{transform:i,continuousAxisChannelDef:r,continuousAxis:o,encodingWithoutContinuousAxis:a,ticksOrient:s,markDef:l,outerSpec:c,tooltipEncoding:u}=ps(e,us,n);delete a.size;const f=es(l,o,r,a,n.errorbar),d=l.thickness,m=l.size,p={type:"tick",orient:s,aria:!1,...void 0!==d?{thickness:d}:{},...void 0!==m?{size:m}:{}},g=[...f({partName:"ticks",mark:p,positionPrefix:"lower",extraEncoding:u}),...f({partName:"ticks",mark:p,positionPrefix:"upper",extraEncoding:u}),...f({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...void 0!==d?{size:d}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:u})];return{...c,transform:i,...g.length>1?{layer:g}:{...g[0]}}}function ms(e,t){const{encoding:n}=e;if(function(e){return(oa(e.x)||oa(e.y))&&!oa(e.x2)&&!oa(e.y2)&&!oa(e.xError)&&!oa(e.xError2)&&!oa(e.yError)&&!oa(e.yError2)}(n))return{orient:rs(e,t),inputType:"raw"};const i=function(e){return oa(e.x2)||oa(e.y2)}(n),r=function(e){return oa(e.xError)||oa(e.xError2)||oa(e.yError)||oa(e.yError2)}(n),o=n.x,a=n.y;if(i){if(r)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const e=n.x2,i=n.y2;if(oa(e)&&oa(i))throw new Error(`${t} cannot have both x2 and y2`);if(oa(e)){if(na(o))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}if(oa(i)){if(na(a))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}{const e=n.xError,i=n.xError2,r=n.yError,s=n.yError2;if(oa(i)&&!oa(e))throw new Error(`${t} cannot have xError2 without xError`);if(oa(s)&&!oa(r))throw new Error(`${t} cannot have yError2 without yError`);if(oa(e)&&oa(r))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(oa(e)){if(na(o))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(oa(r)){if(na(a))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}function ps(e,t,n){const{mark:i,encoding:r,params:o,projection:a,...s}=e,l=no(i)?i:{type:i};o&&Si(Kn(t));const{orient:c,inputType:u}=ms(e,t),{continuousAxisChannelDef:f,continuousAxisChannelDef2:d,continuousAxisChannelDefError:m,continuousAxisChannelDefError2:p,continuousAxis:g}=ns(e,c,t),{errorBarSpecificAggregate:h,postAggregateCalculates:y,tooltipSummary:v,tooltipTitleWithFieldName:b}=function(e,t,n,i,r,o,a,s){let l=[],c=[];const u=t.field;let f,d=!1;if("raw"===o){const t=e.center?e.center:e.extent?"iqr"===e.extent?"median":"mean":s.errorbar.center,n=e.extent?e.extent:"mean"===t?"stderr":"iqr";if("median"===t!=("iqr"===n)&&Si(function(e,t,n){return`${e} is not usually used with ${t} for ${n}.`}(t,n,a)),"stderr"===n||"stdev"===n)l=[{op:n,field:u,as:`extent_${u}`},{op:t,field:u,as:`center_${u}`}],c=[{calculate:`${j(`center_${u}`)} + ${j(`extent_${u}`)}`,as:`upper_${u}`},{calculate:`${j(`center_${u}`)} - ${j(`extent_${u}`)}`,as:`lower_${u}`}],f=[{fieldPrefix:"center_",titlePrefix:N(t)},{fieldPrefix:"upper_",titlePrefix:gs(t,n,"+")},{fieldPrefix:"lower_",titlePrefix:gs(t,n,"-")}],d=!0;else{let e,t,i;"ci"===n?(e="mean",t="ci0",i="ci1"):(e="median",t="q1",i="q3"),l=[{op:t,field:u,as:`lower_${u}`},{op:i,field:u,as:`upper_${u}`},{op:e,field:u,as:`center_${u}`}],f=[{fieldPrefix:"upper_",titlePrefix:va({field:u,aggregate:i,type:"quantitative"},s,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:va({field:u,aggregate:t,type:"quantitative"},s,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:va({field:u,aggregate:e,type:"quantitative"},s,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&Si((m=e.center,`${(p=e.extent)?"extent ":""}${p&&m?"and ":""}${m?"center ":""}${p&&m?"are ":"is "}not needed when data are aggregated.`)),"aggregated-upper-lower"===o?(f=[],c=[{calculate:j(n.field),as:`upper_${u}`},{calculate:j(u),as:`lower_${u}`}]):"aggregated-error"===o&&(f=[{fieldPrefix:"",titlePrefix:u}],c=[{calculate:`${j(u)} + ${j(i.field)}`,as:`upper_${u}`}],r?c.push({calculate:`${j(u)} + ${j(r.field)}`,as:`lower_${u}`}):c.push({calculate:`${j(u)} - ${j(i.field)}`,as:`lower_${u}`}));for(const e of c)f.push({fieldPrefix:e.as.substring(0,6),titlePrefix:R(R(e.calculate,"datum['",""),"']","")})}var m,p;return{postAggregateCalculates:c,errorBarSpecificAggregate:l,tooltipSummary:f,tooltipTitleWithFieldName:d}}(l,f,d,m,p,u,t,n),{[g]:x,["x"===g?"x2":"y2"]:$,["x"===g?"xError":"yError"]:w,["x"===g?"xError2":"yError2"]:k,...S}=r,{bins:D,timeUnits:F,aggregate:O,groupby:z,encoding:C}=Ga(S,n),_=[...O,...h],P="raw"!==u?[]:z,A=Ka(v,f,C,b);return{transform:[...s.transform??[],...D,...F,...0===_.length?[]:[{aggregate:_,groupby:P}],...y],groupby:P,continuousAxisChannelDef:f,continuousAxis:g,encodingWithoutContinuousAxis:C,ticksOrient:"vertical"===c?"horizontal":"vertical",markDef:l,outerSpec:s,tooltipEncoding:A}}function gs(e,t,n){return`${N(e)} ${n} ${t}`}const hs="errorband",ys=new Wa(hs,vs);function vs(e,t){let{config:n}=t;e={...e,encoding:Xa(e.encoding,n)};const{transform:i,continuousAxisChannelDef:r,continuousAxis:o,encodingWithoutContinuousAxis:a,markDef:s,outerSpec:l,tooltipEncoding:c}=ps(e,hs,n),u=s,f=es(u,o,r,a,n.errorband),d=void 0!==e.encoding.x&&void 0!==e.encoding.y;let m={type:d?"area":"rect"},p={type:d?"line":"rule"};const g={...u.interpolate?{interpolate:u.interpolate}:{},...u.tension&&u.interpolate?{tension:u.tension}:{}};return d?(m={...m,...g,ariaRoleDescription:"errorband"},p={...p,...g,aria:!1}):u.interpolate?Si(bi("interpolate")):u.tension&&Si(bi("tension")),{...l,transform:i,layer:[...f({partName:"band",mark:m,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c}),...f({partName:"borders",mark:p,positionPrefix:"lower",extraEncoding:c}),...f({partName:"borders",mark:p,positionPrefix:"upper",extraEncoding:c})]}}const bs={};function xs(e,t,n){const i=new Wa(e,t);bs[e]={normalizer:i,parts:n}}xs(os,ls,["box","median","outliers","rule","ticks"]),xs(us,ds,["ticks","rule"]),xs(hs,vs,["band","borders"]);const $s=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],ws={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},ks={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},Ss=D(ws),Ds=D(ks),Fs=D({header:1,headerRow:1,headerColumn:1,headerFacet:1}),Os=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],zs="_vgsid_",Cs={point:{on:"click",fields:[zs],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[pointerdown, window:pointerup] > window:pointermove!",encodings:["x","y"],translate:"[pointerdown, window:pointerup] > window:pointermove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function _s(e){return"legend"===e||!!e?.legend}function Ps(e){return _s(e)&&t.isObject(e)}function Ns(e){return!!e?.select}function As(e){const t=[];for(const n of e||[]){if(Ns(n))continue;const{expr:e,bind:i,...r}=n;if(i&&e){const n={...r,bind:i,init:e};t.push(n)}else{const n={...r,...e?{update:e}:{},...i?{bind:i}:{}};t.push(n)}}return t}function Ts(e){return J(e,"concat")}function js(e){return J(e,"vconcat")}function Es(e){return J(e,"hconcat")}function Ms(e){let{step:t,offsetIsDiscrete:n}=e;return n?t.for??"offset":"position"}function Rs(e){return J(e,"step")}function Ls(e){return J(e,"view")||J(e,"width")||J(e,"height")}const qs=D({align:1,bounds:1,center:1,columns:1,spacing:1});function Us(e,t){return e[t]??e["width"===t?"continuousWidth":"continuousHeight"]}function Ws(e,t){const n=Is(e,t);return Rs(n)?n.step:Bs}function Is(e,t){return U(e[t]??e["width"===t?"discreteWidth":"discreteHeight"],{step:e.step})}const Bs=20,Vs={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:Bs},mark:{color:"#4c78a8",invalid:"break-paths-show-path-domains",timeUnitBandSize:1},arc:{},area:{},bar:fo,circle:{},geoshape:{},image:{},line:{},point:{},rect:uo,rule:{color:"black"},square:{},text:{color:"black"},tick:mo,trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:{pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,tickBandPaddingInner:.25,bandWithNestedOffsetPaddingInner:.2,bandWithNestedOffsetPaddingOuter:.2,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:4,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4,zero:!0,framesPerSecond:2,animationDuration:5},projection:{},legend:{gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:Cs,style:{},title:{},facet:{spacing:20},concat:{spacing:20},normalizedNumberFormat:".0%"},Hs=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],Gs={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},Ys={blue:Hs[0],orange:Hs[1],red:Hs[2],teal:Hs[3],green:Hs[4],yellow:Hs[5],purple:Hs[6],pink:Hs[7],brown:Hs[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function Xs(e){const t=D(e||{}),n={};for(const i of t){const t=e[i];n[i]=Ta(t)?zn(t):Cn(t)}return n}const Qs=[...so,...qa,...Fs,"background","padding","legend","lineBreak","scale","style","title","view"];function Js(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{color:n,font:i,fontSize:r,selection:o,...a}=e,s=t.mergeConfig({},l(Vs),i?function(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}(i):{},n?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{signals:[{name:"color",value:t.isObject(e)?{...Ys,...e}:Ys}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}(n):{},r?function(e){return{signals:[{name:"fontSize",value:t.isObject(e)?{...Gs,...e}:Gs}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}(r):{},a||{});o&&t.writeConfig(s,"selection",o,!0);const c=f(s,Qs);for(const e of["background","lineBreak","padding"])s[e]&&(c[e]=Cn(s[e]));for(const e of so)s[e]&&(c[e]=bn(s[e]));for(const e of qa)s[e]&&(c[e]=Xs(s[e]));for(const e of Fs)s[e]&&(c[e]=bn(s[e]));if(s.legend&&(c.legend=bn(s.legend)),s.scale){const{invalid:e,...t}=s.scale,n=bn(e,{level:1});c.scale={...bn(t),...D(n).length>0?{invalid:n}:{}}}return s.style&&(c.style=function(e){const t=D(e),n={};for(const i of t)n[i]=Xs(e[i]);return n}(s.style)),s.title&&(c.title=bn(s.title)),s.view&&(c.view=bn(s.view)),c}const Ks=new Set(["view",...to]),Zs=["color","fontSize","background","padding","facet","concat","numberFormat","numberFormatType","normalizedNumberFormat","normalizedNumberFormatType","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],el={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],...ao};function tl(e){e=l(e);for(const t of Zs)delete e[t];if(e.axis)for(const t in e.axis)Ta(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of $s)delete e.legend[t];if(e.mark){for(const t of ro)delete e.mark[t];e.mark.tooltip&&t.isObject(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat(As(e.params)),delete e.params);for(const t of Ks){for(const n of ro)delete e[t][n];const n=el[t];if(n)for(const i of n)delete e[t][i];nl(e,t)}for(const t of D(bs))delete e[t];!function(e){const{titleMarkConfig:t,subtitleMarkConfig:n,subtitle:i}=xn(e.title);S(t)||(e.style["group-title"]={...e.style["group-title"],...t});S(n)||(e.style["group-subtitle"]={...e.style["group-subtitle"],...n});S(i)?delete e.title:e.title=i}(e);for(const n in e)t.isObject(e[n])&&S(e[n])&&delete e[n];return S(e)?void 0:e}function nl(e,t,n,i){"view"===t&&(n="cell");const r={...e[t],...e.style[n??t]};S(r)||(e.style[n??t]=r),delete e[t]}function il(e){return J(e,"layer")}class rl{map(e,t){return Io(e)?this.mapFacet(e,t):function(e){return J(e,"repeat")}(e)?this.mapRepeat(e,t):Es(e)?this.mapHConcat(e,t):js(e)?this.mapVConcat(e,t):Ts(e)?this.mapConcat(e,t):this.mapLayerOrUnit(e,t)}mapLayerOrUnit(e,t){if(il(e))return this.mapLayer(e,t);if(Ua(e))return this.mapUnit(e,t);throw new Error(Bn(e))}mapLayer(e,t){return{...e,layer:e.layer.map((e=>this.mapLayerOrUnit(e,t)))}}mapHConcat(e,t){return{...e,hconcat:e.hconcat.map((e=>this.map(e,t)))}}mapVConcat(e,t){return{...e,vconcat:e.vconcat.map((e=>this.map(e,t)))}}mapConcat(e,t){const{concat:n,...i}=e;return{...i,concat:n.map((e=>this.map(e,t)))}}mapFacet(e,t){return{...e,spec:this.map(e.spec,t)}}mapRepeat(e,t){return{...e,spec:this.map(e.spec,t)}}}const ol={zero:1,center:1,normalize:1};const al=new Set([Lr,Ur,qr,Hr,Br,Qr,Jr,Ir,Gr,Yr]),sl=new Set([Ur,qr,Lr]);function ll(e){return Zo(e)&&"quantitative"===ea(e)&&!e.bin}function cl(e,t,n){let{orient:i,type:r}=n;const o="x"===t?"y":"radius",a="x"===t&&["bar","area"].includes(r),s=e[t],l=e[o];if(Zo(s)&&Zo(l))if(ll(s)&&ll(l)){if(s.stack)return t;if(l.stack)return o;const e=Zo(s)&&!!s.aggregate;if(e!==(Zo(l)&&!!l.aggregate))return e?t:o;if(a){if("vertical"===i)return o;if("horizontal"===i)return t}}else{if(ll(s))return t;if(ll(l))return o}else{if(ll(s)){if(a&&"vertical"===i)return;return t}if(ll(l)){if(a&&"horizontal"===i)return;return o}}}function ul(e,n){const i=no(e)?e:{type:e},r=i.type;if(!al.has(r))return null;const o=cl(n,"x",i)||cl(n,"theta",i);if(!o)return null;const a=n[o],s=Zo(a)?ma(a,{}):void 0,l=function(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}(o),c=[],u=new Set;if(n[l]){const e=n[l],t=Zo(e)?ma(e,{}):void 0;t&&t!==s&&(c.push(l),u.add(t))}const f="x"===l?"xOffset":"yOffset",d=n[f],m=Zo(d)?ma(d,{}):void 0;m&&m!==s&&(c.push(f),u.add(m));const p=Ot.reduce(((e,i)=>{if("tooltip"!==i&&Ia(n,i)){const r=n[i];for(const n of t.array(r)){const t=wa(n);if(t.aggregate)continue;const r=ma(t,{});r&&u.has(r)||e.push({channel:i,fieldDef:t})}}return e}),[]);let g;return void 0!==a.stack?g=t.isBoolean(a.stack)?a.stack?"zero":null:a.stack:sl.has(r)&&(g="zero"),g&&(h=g,t.hasOwnProperty(ol,h))?Ha(n)&&0===p.length?null:(a?.scale?.type&&a?.scale?.type!==dr.LINEAR&&a?.stack&&Si(function(e){return`Stack is applied to a non-linear scale (${e}).`}(a.scale.type)),oa(n[at(o)])?(void 0!==a.stack&&Si(`Cannot stack "${y=o}" if there is already "${y}2".`),null):(Zo(a)&&a.aggregate&&!un.has(a.aggregate)&&Si(`Stacking is applied even though the aggregate function is non-summative ("${a.aggregate}").`),{groupbyChannels:c,groupbyFields:u,fieldChannel:o,impute:null!==a.impute&&Zr(r),stackBy:p,offset:g})):null;var h,y}function fl(e,t,n){const i=bn(e),r=En("orient",i,n);if(i.orient=function(e,t,n){switch(e){case Br:case Qr:case Jr:case Gr:case Vr:case Wr:return}const{x:i,y:r,x2:o,y2:a}=t;switch(e){case Ur:if(Zo(i)&&(pn(i.bin)||Zo(r)&&r.aggregate&&!i.aggregate))return"vertical";if(Zo(r)&&(pn(r.bin)||Zo(i)&&i.aggregate&&!r.aggregate))return"horizontal";if(a||o){if(n)return n;if(!o)return(Zo(i)&&i.type===sr&&!mn(i.bin)||ra(i))&&Zo(r)&&pn(r.bin)?"horizontal":"vertical";if(!a)return(Zo(r)&&r.type===sr&&!mn(r.bin)||ra(r))&&Zo(i)&&pn(i.bin)?"vertical":"horizontal"}case Hr:if(o&&(!Zo(i)||!pn(i.bin))&&a&&(!Zo(r)||!pn(r.bin)))return;case qr:if(a)return Zo(r)&&pn(r.bin)?"horizontal":"vertical";if(o)return Zo(i)&&pn(i.bin)?"vertical":"horizontal";if(e===Hr){if(i&&!r)return"vertical";if(r&&!i)return"horizontal"}case Ir:case Yr:{const t=ia(i),o=ia(r);if(n)return n;if(t&&!o)return"tick"!==e?"horizontal":"vertical";if(!t&&o)return"tick"!==e?"vertical":"horizontal";if(t&&o)return"vertical";{const e=aa(i)&&i.type===cr,t=aa(r)&&r.type===cr;if(e&&!t)return"vertical";if(!e&&t)return"horizontal"}return}}return"vertical"}(i.type,t,r),void 0!==r&&r!==i.orient&&Si(`Specified orient "${i.orient}" overridden with "${r}".`),"bar"===i.type&&i.orient){const e=En("cornerRadiusEnd",i,n);if(void 0!==e){const n="horizontal"===i.orient&&t.x2||"vertical"===i.orient&&t.y2?["cornerRadius"]:co[i.orient];for(const t of n)i[t]=e;void 0!==i.cornerRadiusEnd&&delete i.cornerRadiusEnd}}const o=En("opacity",i,n),a=En("fillOpacity",i,n);void 0===o&&void 0===a&&(i.opacity=function(e,t){if(p([Br,Yr,Qr,Jr],e)&&!Ha(t))return.7;return}(i.type,t));return void 0===En("cursor",i,n)&&(i.cursor=function(e,t,n){if(t.href||e.href||En("href",e,n))return"pointer";return e.cursor}(i,t,n)),i}function dl(e){const{point:t,line:n,...i}=e;return D(i).length>1?i:i.type}function ml(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:f(e[t],["point","line"])});return e}function pl(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return"transparent"===e.point?{opacity:0}:e.point?t.isObject(e.point)?e.point:{}:void 0!==e.point?null:n.point||i.shape?t.isObject(n.point)?n.point:{}:void 0}function gl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:void 0}class hl{name="path-overlay";hasMatchingType(e,t){if(Ua(e)){const{mark:n,encoding:i}=e,r=no(n)?n:{type:n};switch(r.type){case"line":case"rule":case"trail":return!!pl(r,t[r.type],i);case"area":return!!pl(r,t[r.type],i)||!!gl(r,t[r.type])}}return!1}run(e,t,n){const{config:i}=t,{params:r,projection:o,mark:a,name:s,encoding:l,...c}=e,d=Xa(l,i),m=no(a)?a:{type:a},p=pl(m,i[m.type],d),g="area"===m.type&&gl(m,i[m.type]),h=[{name:s,...r?{params:r}:{},mark:dl({..."area"===m.type&&void 0===m.opacity&&void 0===m.fillOpacity?{opacity:.7}:{},...m}),encoding:f(d,["shape"])}],y=ul(fl(m,d,i),d);let v=d;if(y){const{fieldChannel:e,offset:t}=y;v={...d,[e]:{...d[e],...t?{stack:t}:{}}}}return v=f(v,["y2","x2"]),g&&h.push({...o?{projection:o}:{},mark:{type:"line",...u(m,["clip","interpolate","tension","tooltip"]),...g},encoding:v}),p&&h.push({...o?{projection:o}:{},mark:{type:"point",opacity:1,filled:!0,...u(m,["clip","tooltip"]),...p},encoding:v}),n({...c,layer:h},{...t,config:ml(i)})}}function yl(e,t){return t?Uo(e)?kl(e,t):xl(e,t):e}function vl(e,t){return t?kl(e,t):e}function bl(e,n,i){const r=n[e];return o=r,!t.isString(o)&&J(o,"repeat")?r.repeat in i?{...n,[e]:i[r.repeat]}:void Si(function(e){return`Unknown repeated value "${e}".`}(r.repeat)):n;var o}function xl(e,t){if(void 0!==(e=bl("field",e,t))){if(null===e)return null;if(Vo(e)&&Lo(e.sort)){const n=bl("field",e.sort,t);e={...e,...n?{sort:n}:{}}}return e}}function $l(e,t){if(Zo(e))return xl(e,t);{const n=bl("datum",e,t);return n===e||n.type||(n.type="nominal"),n}}function wl(e,t){if(!oa(e)){if(Ko(e)){const n=$l(e.condition,t);if(n)return{...e,condition:n};{const{condition:t,...n}=e;return n}}return e}{const n=$l(e,t);if(n)return n;if(Qo(e))return{condition:e.condition}}}function kl(e,n){const i={};for(const r in e)if(J(e,r)){const o=e[r];if(t.isArray(o))i[r]=o.map((e=>wl(e,n))).filter((e=>e));else{const e=wl(o,n);void 0!==e&&(i[r]=e)}}return i}class Sl{name="RuleForRangedLine";hasMatchingType(e){if(Ua(e)){const{encoding:t,mark:n}=e;if("line"===n||no(n)&&"line"===n.type)for(const e of nt){const n=t[rt(e)];if(t[e]&&(Zo(n)&&!pn(n.bin)||ta(n)))return!0}}return!1}run(e,n,i){const{encoding:r,mark:o}=e;var a,s;return Si((a=!!r.x2,s=!!r.y2,`Line mark is for continuous lines and thus cannot be used with ${a&&s?"x2 and y2":a?"x2":"y2"}. We will use the rule mark (line segments) instead.`)),i({...e,mark:t.isObject(o)?{...o,type:"rule"}:"rule"},n)}}function Dl(e){let{parentEncoding:n,encoding:i={},layer:r}=e,o={};if(n){const e=new Set([...D(n),...D(i)]);for(const a of e){const e=i[a],s=n[a];if(oa(e)){const t={...s,...e};o[a]=t}else Ko(e)?o[a]={...e,condition:{...s,...e.condition}}:e||null===e?o[a]=e:(r||sa(s)||wn(s)||oa(s)||t.isArray(s))&&(o[a]=s)}}else o=i;return!o||S(o)?void 0:o}function Fl(e){const{parentProjection:t,projection:n}=e;return t&&n&&Si(function(e){const{parentProjection:t,projection:n}=e;return`Layer's shared projection ${Q(t)} is overridden by a child projection ${Q(n)}.`}({parentProjection:t,projection:n})),n??t}function Ol(e){return J(e,"filter")}function zl(e){return J(e,"lookup")}function Cl(e){return J(e,"pivot")}function _l(e){return J(e,"density")}function Pl(e){return J(e,"quantile")}function Nl(e){return J(e,"regression")}function Al(e){return J(e,"loess")}function Tl(e){return J(e,"sample")}function jl(e){return J(e,"window")}function El(e){return J(e,"joinaggregate")}function Ml(e){return J(e,"flatten")}function Rl(e){return J(e,"calculate")}function Ll(e){return J(e,"bin")}function ql(e){return J(e,"impute")}function Ul(e){return J(e,"timeUnit")}function Wl(e){return J(e,"aggregate")}function Il(e){return J(e,"stack")}function Bl(e){return J(e,"fold")}function Vl(e){return J(e,"extent")&&!J(e,"density")&&!J(e,"regression")}function Hl(e,t){const{transform:n,...i}=e;if(n){return{...i,transform:n.map((e=>{if(Ol(e))return{filter:Xl(e,t)};if(Ll(e)&&gn(e.bin))return{...e,bin:Yl(e.bin)};if(zl(e)){const{selection:t,...n}=e.from;return t?{...e,from:{param:t,...n}}:e}return e}))}}return e}function Gl(e,n){const i=l(e);if(Zo(i)&&gn(i.bin)&&(i.bin=Yl(i.bin)),la(i)&&i.scale?.domain?.selection){const{selection:e,...t}=i.scale.domain;i.scale.domain={...t,...e?{param:e}:{}}}if(Qo(i))if(t.isArray(i.condition))i.condition=i.condition.map((e=>{const{selection:t,param:i,test:r,...o}=e;return i?e:{...o,test:Xl(e,n)}}));else{const{selection:e,param:t,test:r,...o}=Gl(i.condition,n);i.condition=t?i.condition:{...o,test:Xl(i.condition,n)}}return i}function Yl(e){const t=e.extent;if(t?.selection){const{selection:n,...i}=t;return{...e,extent:{...i,param:n}}}return e}function Xl(e,t){const n=e=>s(e,(e=>{const n={param:e,empty:t.emptySelections[e]??!0};return t.selectionPredicates[e]??=[],t.selectionPredicates[e].push(n),n}));return e.selection?n(e.selection):s(e.test||e.filter,(e=>e.selection?n(e.selection):e))}class Ql extends rl{map(e,t){const n=t.selections??[];if(e.params&&!Ua(e)){const t=[];for(const i of e.params)Ns(i)?n.push(i):t.push(i);e.params=t}return t.selections=n,super.map(e,t)}mapUnit(e,n){const i=n.selections;if(!i||!i.length)return e;const r=(n.path??[]).concat(e.name),o=[];for(const n of i)if(n.views&&n.views.length)for(const i of n.views)(t.isString(i)&&(i===e.name||r.includes(i))||t.isArray(i)&&i.map((e=>r.indexOf(e))).every(((e,t,n)=>-1!==e&&(0===t||e>n[t-1]))))&&o.push(n);else o.push(n);return o.length&&(e.params=o),e}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=Ql.prototype[e];Ql.prototype[e]=function(e,n){return t.call(this,e,Jl(e,n))}}function Jl(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}:t}function Kl(e,t){void 0===t&&(t=Js(e.config));const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={config:t};return tc.map(Zl.map(ec.map(e,n),n),n)}(e,t),{width:i,height:r}=e,o=function(e,t,n){let{width:i,height:r}=t;const o=Ua(e)||il(e),a={};o?"container"==i&&"container"==r?(a.type="fit",a.contains="padding"):"container"==i?(a.type="fit-x",a.contains="padding"):"container"==r&&(a.type="fit-y",a.contains="padding"):("container"==i&&(Si(Hn("width")),i=void 0),"container"==r&&(Si(Hn("height")),r=void 0));const s={type:"pad",...a,...n?nc(n.autosize):{},...nc(e.autosize)};"fit"!==s.type||o||(Si(Vn),s.type="pad");"container"==i&&"fit"!=s.type&&"fit-x"!=s.type&&Si(Gn("width"));"container"==r&&"fit"!=s.type&&"fit-y"!=s.type&&Si(Gn("height"));if(X(s,{type:"pad"}))return;return s}(n,{width:i,height:r,autosize:e.autosize},t);return{...n,...o?{autosize:o}:{}}}const Zl=new class extends rl{nonFacetUnitNormalizers=(()=>[as,fs,ys,new hl,new Sl])();map(e,t){if(Ua(e)){const n=Ia(e.encoding,K),i=Ia(e.encoding,Z),r=Ia(e.encoding,ee);if(n||i||r)return this.mapFacetedUnit(e,t)}return super.map(e,t)}mapUnit(e,t){const{parentEncoding:n,parentProjection:i}=t,r=vl(e.encoding,t.repeater),o={...e,...e.name?{name:[t.repeaterPrefix,e.name].filter((e=>e)).join("_")}:{},...r?{encoding:r}:{}};if(n||i)return this.mapUnitWithParentEncodingOrProjection(o,t);const a=this.mapLayerOrUnit.bind(this);for(const e of this.nonFacetUnitNormalizers)if(e.hasMatchingType(o,t.config))return e.run(o,t,a);return o}mapRepeat(e,n){return function(e){return!t.isArray(e.repeat)&&J(e.repeat,"layer")}(e)?this.mapLayerRepeat(e,n):this.mapNonLayerRepeat(e,n)}mapLayerRepeat(e,t){const{repeat:n,spec:i,...r}=e,{row:o,column:a,layer:s}=n,{repeater:l={},repeaterPrefix:c=""}=t;return o||a?this.mapRepeat({...e,repeat:{...o?{row:o}:{},...a?{column:a}:{}},spec:{repeat:{layer:s},spec:i}},t):{...r,layer:s.map((e=>{const n={...l,layer:e},r=`${(i.name?`${i.name}_`:"")+c}child__layer_${C(e)}`,o=this.mapLayerOrUnit(i,{...t,repeater:n,repeaterPrefix:r});return o.name=r,o}))}}mapNonLayerRepeat(e,n){const{repeat:i,spec:r,data:o,...a}=e;!t.isArray(i)&&e.columns&&(e=f(e,["columns"]),Si(ei("repeat")));const s=[],{repeater:l={},repeaterPrefix:c=""}=n,u=!t.isArray(i)&&i.row||[l?l.row:null],d=!t.isArray(i)&&i.column||[l?l.column:null],m=t.isArray(i)&&i||[l?l.repeat:null];for(const e of m)for(const o of u)for(const a of d){const u={repeat:e,row:o,column:a,layer:l.layer},d=(r.name?`${r.name}_`:"")+c+"child__"+(t.isArray(i)?`${C(e)}`:(i.row?`row_${C(o)}`:"")+(i.column?`column_${C(a)}`:"")),m=this.map(r,{...n,repeater:u,repeaterPrefix:d});m.name=d,s.push(f(m,["data"]))}const p=t.isArray(i)?e.columns:i.column?i.column.length:1;return{data:r.data??o,align:"all",...a,columns:p,concat:s}}mapFacet(e,t){const{facet:n}=e;return Uo(n)&&e.columns&&(e=f(e,["columns"]),Si(ei("facet"))),super.mapFacet(e,t)}mapUnitWithParentEncodingOrProjection(e,t){const{encoding:n,projection:i}=e,{parentEncoding:r,parentProjection:o,config:a}=t,s=Fl({parentProjection:o,projection:i}),l=Dl({parentEncoding:r,encoding:vl(n,t.repeater)});return this.mapUnit({...e,...s?{projection:s}:{},...l?{encoding:l}:{}},{config:a})}mapFacetedUnit(e,t){const{row:n,column:i,facet:r,...o}=e.encoding,{mark:a,width:s,projection:l,height:c,view:u,params:f,encoding:d,...m}=e,{facetMapping:p,layout:g}=this.getFacetMappingAndLayout({row:n,column:i,facet:r},t),h=vl(o,t.repeater);return this.mapFacet({...m,...g,facet:p,spec:{...s?{width:s}:{},...c?{height:c}:{},...u?{view:u}:{},...l?{projection:l}:{},mark:a,encoding:h,...f?{params:f}:{}}},t)}getFacetMappingAndLayout(e,t){const{row:n,column:i,facet:r}=e;if(n||i){r&&Si(`Facet encoding dropped as ${(o=[...n?[K]:[],...i?[Z]:[]]).join(" and ")} ${o.length>1?"are":"is"} also specified.`);const t={},a={};for(const n of[K,Z]){const i=e[n];if(i){const{align:e,center:r,spacing:o,columns:s,...l}=i;t[n]=l;for(const e of["align","center","spacing"])void 0!==i[e]&&(a[e]??={},a[e][n]=i[e])}}return{facetMapping:t,layout:a}}{const{align:e,center:n,spacing:i,columns:o,...a}=r;return{facetMapping:yl(a,t.repeater),layout:{...e?{align:e}:{},...n?{center:n}:{},...i?{spacing:i}:{},...o?{columns:o}:{}}}}var o}mapLayer(e,t){let{parentEncoding:n,parentProjection:i,...r}=t;const{encoding:o,projection:a,...s}=e,l={...r,parentEncoding:Dl({parentEncoding:n,encoding:o,layer:!0}),parentProjection:Fl({parentProjection:i,projection:a})};return super.mapLayer({...s,...e.name?{name:[l.repeaterPrefix,e.name].filter((e=>e)).join("_")}:{}},l)}},ec=new class extends rl{map(e,t){return t.emptySelections??={},t.selectionPredicates??={},e=Hl(e,t),super.map(e,t)}mapLayerOrUnit(e,t){if((e=Hl(e,t)).encoding){const n={};for(const[i,r]of O(e.encoding))n[i]=Gl(r,t);e={...e,encoding:n}}return super.mapLayerOrUnit(e,t)}mapUnit(e,t){const{selection:n,...i}=e;return n?{...i,params:O(n).map((e=>{let[n,i]=e;const{init:r,bind:o,empty:a,...s}=i;"single"===s.type?(s.type="point",s.toggle=!1):"multi"===s.type&&(s.type="point"),t.emptySelections[n]="none"!==a;for(const e of F(t.selectionPredicates[n]??{}))e.empty="none"!==a;return{name:n,value:r,select:s,bind:o}}))}:e}},tc=new Ql;function nc(e){return t.isString(e)?{type:e}:e??{}}const ic=["background","padding"];function rc(e,t){const n={};for(const t of ic)e&&void 0!==e[t]&&(n[t]=Cn(e[t]));return t&&(n.params=e.params),n}class oc{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.explicit=e,this.implicit=t}clone(){return new oc(l(this.explicit),l(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(e){return U(this.explicit[e],this.implicit[e])}getWithExplicit(e){return void 0!==this.explicit[e]?{explicit:!0,value:this.explicit[e]}:void 0!==this.implicit[e]?{explicit:!1,value:this.implicit[e]}:{explicit:!1,value:void 0}}setWithExplicit(e,t){let{value:n,explicit:i}=t;void 0!==n&&this.set(e,n,i)}set(e,t,n){return delete this[n?"implicit":"explicit"][e],this[n?"explicit":"implicit"][e]=t,this}copyKeyFromSplit(e,t){let{explicit:n,implicit:i}=t;void 0!==n[e]?this.set(e,n[e],!0):void 0!==i[e]&&this.set(e,i[e],!1)}copyKeyFromObject(e,t){void 0!==t[e]&&this.set(e,t[e],!0)}copyAll(e){for(const t of D(e.combine())){const n=e.getWithExplicit(t);this.setWithExplicit(t,n)}}}function ac(e){return{explicit:!0,value:e}}function sc(e){return{explicit:!1,value:e}}function lc(e){return(t,n,i,r)=>{const o=e(t.value,n.value);return o>0?t:o<0?n:cc(t,n,i,r)}}function cc(e,t,n,i){return e.explicit&&t.explicit&&Si(function(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${Q(n)} and ${Q(i)}). Using ${Q(n)}.`}(n,i,e.value,t.value)),e}function uc(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:cc;return void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:X(e.value,t.value)?e:r(e,t,n,i)}class fc extends oc{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];super(e,t),this.explicit=e,this.implicit=t,this.parseNothing=n}clone(){const e=super.clone();return e.parseNothing=this.parseNothing,e}}function dc(e){return J(e,"url")}function mc(e){return J(e,"values")}function pc(e){return J(e,"name")&&!dc(e)&&!mc(e)&&!gc(e)}function gc(e){return e&&(hc(e)||yc(e)||vc(e))}function hc(e){return J(e,"sequence")}function yc(e){return J(e,"sphere")}function vc(e){return J(e,"graticule")}let bc=function(e){return e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup",e[e.PreFilterInvalid=5]="PreFilterInvalid",e[e.PostFilterInvalid=6]="PostFilterInvalid",e}({});function xc(e){let{invalid:t,isPath:n}=e;switch(po(t,{isPath:n})){case"filter":return{marks:"exclude-invalid-values",scales:"exclude-invalid-values"};case"break-paths-show-domains":return{marks:n?"include-invalid-values":"exclude-invalid-values",scales:"include-invalid-values"};case"break-paths-filter-domains":return{marks:n?"include-invalid-values":"exclude-invalid-values",scales:"exclude-invalid-values"};case"show":return{marks:"include-invalid-values",scales:"include-invalid-values"}}}class $c{_children=[];_parent=null;constructor(e,t){this.debugName=t,e&&(this.parent=e)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(e){this._parent=e,e&&e.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(e,t){this._children.includes(e)?Si("Attempt to add the same child twice."):void 0!==t?this._children.splice(t,0,e):this._children.push(e)}removeChild(e){const t=this._children.indexOf(e);return this._children.splice(t,1),t}remove(){let e=this._parent.removeChild(this);for(const t of this._children)t._parent=this._parent,this._parent.addChild(t,e++)}insertAsParentOf(e){const t=e.parent;t.removeChild(this),this.parent=t,e.parent=this}swapWithParent(){const e=this._parent,t=e.parent;for(const t of this._children)t.parent=e;this._children=[],e.removeChild(this);const n=e.parent.removeChild(e);this._parent=t,t.addChild(this,n),e.parent=this}}class wc extends $c{clone(){const e=new this.constructor;return e.debugName=`clone_${this.debugName}`,e._source=this._source,e._name=`clone_${this._name}`,e.type=this.type,e.refCounts=this.refCounts,e.refCounts[e._name]=0,e}constructor(e,t,n,i){super(e,t),this.type=n,this.refCounts=i,this._source=this._name=t,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}dependentFields(){return new Set}producedFields(){return new Set}hash(){return void 0===this._hash&&(this._hash=`Output ${I()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(e){this._source=e}}function kc(e){return void 0!==e.as}function Sc(e){return`${e}_end`}class Dc extends $c{clone(){return new Dc(null,l(this.timeUnits))}constructor(e,t){super(e),this.timeUnits=t}static makeFromEncoding(e,t){const n=t.reduceFieldDef(((e,n,i)=>{const{field:r,timeUnit:o}=n;if(o){let a;if(Ti(o)){if(qm(t)){const{mark:e,markDef:i,config:s}=t,l=Ho({fieldDef:n,markDef:i,config:s});(eo(e)||l)&&(a={timeUnit:Ii(o),field:r})}}else a={as:ma(n,{forAs:!0}),field:r,timeUnit:o};if(qm(t)){const{mark:e,markDef:r,config:o}=t,s=Ho({fieldDef:n,markDef:r,config:o});eo(e)&&_t(i)&&.5!==s&&(a.rectBandPosition=s)}a&&(e[d(a)]=a)}return e}),{});return S(n)?null:new Dc(e,n)}static makeFromTransform(e,t){const{timeUnit:n,...i}={...t},r={...i,timeUnit:Ii(n)};return new Dc(e,{[d(r)]:r})}merge(e){this.timeUnits={...this.timeUnits};for(const t in e.timeUnits)this.timeUnits[t]||(this.timeUnits[t]=e.timeUnits[t]);for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}removeFormulas(e){const t={};for(const[n,i]of O(this.timeUnits)){const r=kc(i)?i.as:`${i.field}_end`;e.has(r)||(t[n]=i)}this.timeUnits=t}producedFields(){return new Set(F(this.timeUnits).map((e=>kc(e)?e.as:Sc(e.field))))}dependentFields(){return new Set(F(this.timeUnits).map((e=>e.field)))}hash(){return`TimeUnit ${d(this.timeUnits)}`}assemble(){const e=[];for(const t of F(this.timeUnits)){const{rectBandPosition:n}=t,i=Ii(t.timeUnit);if(kc(t)){const{field:r,as:o}=t,{unit:a,utc:s,...l}=i,c=[o,`${o}_end`];e.push({field:M(r),type:"timeunit",...a?{units:Ri(a)}:{},...s?{timezone:"utc"}:{},...l,as:c}),e.push(...Cc(c,n,i))}else if(t){const{field:r}=t,o=r.replaceAll("\\.","."),a=zc({timeUnit:i,field:o}),s=Sc(o);e.push({type:"formula",expr:a,as:s}),e.push(...Cc([o,s],n,i))}}return e}}const Fc="offsetted_rect_start",Oc="offsetted_rect_end";function zc(e){let{timeUnit:t,field:n,reverse:i}=e;const{unit:r,utc:o}=t,a=Li(r),{part:s,step:l}=Hi(a,t.step);return`${o?"utcOffset":"timeOffset"}('${s}', ${j(n)}, ${i?-l:l})`}function Cc(e,t,n){let[i,r]=e;if(void 0!==t&&.5!==t){const e=j(i),o=j(r);return[{type:"formula",expr:_c([zc({timeUnit:n,field:i,reverse:!0}),e],t+.5),as:`${i}_${Fc}`},{type:"formula",expr:_c([e,o],t+.5),as:`${i}_${Oc}`}]}return[]}function _c(e,t){let[n,i]=e;return`${1-t} * ${n} + ${t} * ${i}`}const Pc="_tuple_fields";class Nc{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n!0,parse:(e,n,i)=>{const r=n.name,o=n.project??=new Nc,a={},s={},l=new Set,c=(e,t)=>{const n="visual"===t?e.channel:e.field;let i=C(`${r}_${n}`);for(let e=1;l.has(i);e++)i=C(`${r}_${n}_${e}`);return l.add(i),{[t]:i}},u=n.type,f=e.config.selection[u],m=void 0!==i.value?t.array(i.value):null;let{fields:p,encodings:g}=t.isObject(i.select)?i.select:{};if(!p&&!g&&m)for(const e of m)if(t.isObject(e))for(const n of D(e))h=n,t.hasOwnProperty(et,h)?(g||(g=[])).push(n):"interval"===u?(Si('Interval selections should be initialized using "x", "y", "longitude", or "latitude" keys.'),g=f.encodings):(p??=[]).push(n);var h;p||g||(g=f.encodings,"fields"in f&&(p=f.fields));for(const t of g??[]){const n=e.fieldDef(t);if(n){let i=n.field;if(n.aggregate){Si(Jn(t,n.aggregate));continue}if(!i){Si(Qn(t));continue}if(n.timeUnit&&!Ti(n.timeUnit)){i=e.vgField(t);const r={timeUnit:n.timeUnit,as:i,field:n.field};s[d(r)]=r}if(!a[i]){const r={field:i,channel:t,type:"interval"===u&&Qt(t)&&Sr(e.getScaleComponent(t).get("type"))?"R":n.bin?"R-RE":"E",index:o.items.length};r.signals={...c(r,"data"),...c(r,"visual")},o.items.push(a[i]=r),o.hasField[i]=a[i],o.hasSelectionId=o.hasSelectionId||i===zs,Le(t)?(r.geoChannel=t,r.channel=Re(t),o.hasChannel[r.channel]=a[i]):o.hasChannel[t]=a[i]}}else Si(Qn(t))}for(const e of p??[]){if(o.hasField[e])continue;const t={type:"E",field:e,index:o.items.length};t.signals={...c(t,"data")},o.items.push(t),o.hasField[e]=t,o.hasSelectionId=o.hasSelectionId||e===zs}m&&(n.init=m.map((e=>o.items.map((n=>t.isObject(e)?void 0!==e[n.geoChannel||n.channel]?e[n.geoChannel||n.channel]:e[n.field]:e))))),S(s)||(o.timeUnit=new Dc(null,s))},signals:(e,t,n)=>{const i=t.name+Pc;return n.filter((e=>e.name===i)).length>0||t.project.hasSelectionId?n:n.concat({name:i,value:t.project.items.map(Bc)})}},Tc="_curr",jc="anim_value",Ec="anim_clock",Mc="eased_anim_clock",Rc="min_extent",Lc="max_range_extent",qc="last_tick_at",Uc="is_playing",Wc=1/60*1e3,Ic={defined:e=>"point"===e.type,topLevelSignals:(e,t,n)=>(af(t)&&(n=n.concat([{name:Ec,init:"0",on:[{events:{type:"timer",throttle:Wc},update:`${Uc} ? (${Ec} + (now() - ${qc}) > ${Lc} ? 0 : ${Ec} + (now() - ${qc})) : ${Ec}`}]},{name:qc,init:"now()",on:[{events:[{signal:Ec},{signal:Uc}],update:"now()"}]},{name:Uc,init:"true"}])),n),signals:(e,n,i)=>{const r=n.name,o=r+Pc,a=n.project,s="(item().isVoronoi ? datum.datum : datum)",l=F(e.component.selection??{}).reduce(((e,t)=>"interval"===t.type?e.concat(t.name+Zc):e),[]).map((e=>`indexof(item().mark.name, '${e}') < 0`)).join(" && "),c="datum && item().mark.marktype !== 'group' && indexof(item().mark.role, 'legend') < 0"+(l?` && ${l}`:"");let u=`unit: ${nf(e)}, `;if(n.project.hasSelectionId)u+=`${zs}: ${s}[${t.stringValue(zs)}]`;else if(af(n))u+=`fields: ${o}, values: [${jc} ? ${jc} : ${Rc}]`;else{u+=`fields: ${o}, values: [${a.items.map((n=>{const i=e.fieldDef(n.channel);return i?.bin?`[${s}[${t.stringValue(e.vgField(n.channel,{}))}], ${s}[${t.stringValue(e.vgField(n.channel,{binSuffix:"end"}))}]]`:`${s}[${t.stringValue(n.field)}]`})).join(", ")}]`}if(af(n))return i.concat((f=n.name,d=e.scaleName(ge),[{name:Mc,update:Ec},{name:`${f}_domain`,init:`domain('${d}')`},{name:Rc,init:`extent(${f}_domain)[0]`},{name:Lc,init:`extent(range('${d}'))[1]`},{name:jc,update:`invert('${d}', ${Mc})`}]),[{name:r+Ku,on:[{events:[{signal:Mc},{signal:jc}],update:`{${u}}`,force:!0}]}]);{const e=n.events;return i.concat([{name:r+Ku,on:e?[{events:e,update:`${c} ? {${u}} : null`,force:!0}]:[]}])}var f,d}};function Bc(e){const{signals:t,hasLegend:n,index:i,...r}=e;return r.field=M(r.field),r}function Vc(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.identity;if(t.isArray(e)){const t=e.map((e=>Vc(e,n,i)));return n?`[${t.join(", ")}]`:t}return Di(e)?i(n?Pi(e):function(e){const t=_i(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}(e)):n?i(Q(e)):e}function Hc(e,n){for(const i of F(e.component.selection??{})){const r=i.name;let o=`${r}${Ku}, ${"global"===i.resolve?"true":`{unit: ${nf(e)}}`}`;for(const t of tf)t.defined(i)&&(t.signals&&(n=t.signals(e,i,n)),t.modifyExpr&&(o=t.modifyExpr(e,i,o)));n.push({name:r+Zu,on:[{events:{signal:i.name+Ku},update:`modify(${t.stringValue(i.name+Ju)}, ${o})`}]})}return Xc(n)}function Gc(e,n){if(e.component.selection&&D(e.component.selection).length){const i=t.stringValue(e.getName("cell"));n.unshift({name:"facet",value:{},on:[{events:t.parseSelector("pointermove","scope"),update:`isTuple(facet) ? facet : group(${i}).datum`}]})}return Xc(n)}function Yc(e,t){for(const n of F(e.component.selection??{}))for(const i of tf)i.defined(n)&&i.marks&&(t=i.marks(e,n,t));return t}function Xc(e){return e.map((e=>(e.on&&!e.on.length&&delete e.on,e)))}const Qc={defined:e=>"interval"===e.type&&"global"===e.resolve&&e.bind&&"scales"===e.bind,parse:(e,t)=>{const n=t.scales=[];for(const i of t.project.items){const r=i.channel;if(!Qt(r))continue;const o=e.getScaleComponent(r),a=o?o.get("type"):void 0;"sequential"==a&&Si("Sequntial scales are deprecated. The available quantitative scale type values are linear, log, pow, sqrt, symlog, time and utc"),o&&Sr(a)?(o.set("selectionExtent",{param:t.name,field:i.field},!0),n.push(i)):Si("Scale bindings are currently only supported for scales with unbinned, continuous domains.")}},topLevelSignals:(e,n,i)=>{const r=n.scales.filter((e=>0===i.filter((t=>t.name===e.signals.data)).length));if(!e.parent||Kc(e)||0===r.length)return i;const o=i.find((e=>e.name===n.name));let a=o.update;if(a.includes(ef))o.update=`{${r.map((e=>`${t.stringValue(M(e.field))}: ${e.signals.data}`)).join(", ")}}`;else{for(const e of r){const n=`${t.stringValue(M(e.field))}: ${e.signals.data}`;a.includes(n)||(a=`${a.substring(0,a.length-1)}, ${n}}`)}o.update=a}return i.concat(r.map((e=>({name:e.signals.data}))))},signals:(e,t,n)=>{if(e.parent&&!Kc(e))for(const e of t.scales){const t=n.find((t=>t.name===e.signals.data));t.push="outer",delete t.value,delete t.update}return n}};function Jc(e,n){return`domain(${t.stringValue(e.scaleName(n))})`}function Kc(e){return e.parent&&Im(e.parent)&&(!e.parent.parent||Kc(e.parent.parent))}const Zc="_brush",eu="_scale_trigger",tu="geo_interval_init_tick",nu="_init",iu={defined:e=>"interval"===e.type,parse:(e,n,i)=>{if(e.hasProjection){const e={...t.isObject(i.select)?i.select:{}};e.fields=[zs],e.encodings||(e.encodings=i.value?D(i.value):[de,fe]),i.select={type:"interval",...e}}if(n.translate&&!Qc.defined(n)){const e=`!event.item || event.item.mark.name !== ${t.stringValue(n.name+Zc)}`;for(const i of n.events){if(!i.between){Si(`${i} is not an ordered event stream for interval selections.`);continue}const n=t.array(i.between[0].filter??=[]);n.includes(e)||n.push(e)}}},signals:(e,n,i)=>{const r=n.name,o=r+Ku,a=F(n.project.hasChannel).filter((e=>e.channel===te||e.channel===ne)),s=n.init?n.init[0]:null;if(i.push(...a.reduce(((i,r)=>i.concat(function(e,n,i,r){const o=!e.hasProjection,a=i.channel,s=i.signals.visual,l=t.stringValue(o?e.scaleName(a):e.projectionName()),c=e=>`scale(${l}, ${e})`,u=e.getSizeSignalRef(a===te?"width":"height").signal,f=`${a}(unit)`,d=n.events.reduce(((e,t)=>[...e,{events:t.between[0],update:`[${f}, ${f}]`},{events:t,update:`[${s}[0], clamp(${f}, 0, ${u})]`}]),[]);if(o){const t=i.signals.data,o=Qc.defined(n),u=e.getScaleComponent(a),f=u?u.get("type"):void 0,m=r?{init:Vc(r,!0,c)}:{value:[]};return d.push({events:{signal:n.name+eu},update:Sr(f)?`[${c(`${t}[0]`)}, ${c(`${t}[1]`)}]`:"[0, 0]"}),o?[{name:t,on:[]}]:[{name:s,...m,on:d},{name:t,...r?{init:Vc(r)}:{},on:[{events:{signal:s},update:`${s}[0] === ${s}[1] ? null : invert(${l}, ${s})`}]}]}{const e=a===te?0:1,t=n.name+nu;return[{name:s,...r?{init:`[${t}[0][${e}], ${t}[1][${e}]]`}:{value:[]},on:d}]}}(e,n,r,s&&s[r.index]))),[])),e.hasProjection){const l=t.stringValue(e.projectionName()),c=e.projectionName()+"_center",{x:u,y:f}=n.project.hasChannel,d=u&&u.signals.visual,m=f&&f.signals.visual,p=u?s&&s[u.index]:`${c}[0]`,g=f?s&&s[f.index]:`${c}[1]`,h=t=>e.getSizeSignalRef(t).signal,y=`[[${d?d+"[0]":"0"}, ${m?m+"[0]":"0"}],[${d?d+"[1]":h("width")}, ${m?m+"[1]":h("height")}]]`;if(s&&(i.unshift({name:r+nu,init:`[scale(${l}, [${u?p[0]:p}, ${f?g[0]:g}]), scale(${l}, [${u?p[1]:p}, ${f?g[1]:g}])]`}),!u||!f)){i.find((e=>e.name===c))||i.unshift({name:c,update:`invert(${l}, [${h("width")}/2, ${h("height")}/2])`})}const v=`vlSelectionTuples(${`intersect(${y}, {markname: ${t.stringValue(e.getName("marks"))}}, unit.mark)`}, ${`{unit: ${nf(e)}}`})`,b=a.map((e=>e.signals.visual));return i.concat({name:o,on:[{events:[...b.length?[{signal:b.join(" || ")}]:[],...s?[{signal:tu}]:[]],update:v}]})}{if(!Qc.defined(n)){const n=r+eu,o=a.map((n=>{const i=n.channel,{data:r,visual:o}=n.signals,a=t.stringValue(e.scaleName(i)),s=Sr(e.getScaleComponent(i).get("type"))?"+":"";return`(!isArray(${r}) || (${s}invert(${a}, ${o})[0] === ${s}${r}[0] && ${s}invert(${a}, ${o})[1] === ${s}${r}[1]))`}));o.length&&i.push({name:n,value:{},on:[{events:a.map((t=>({scale:e.scaleName(t.channel)}))),update:o.join(" && ")+` ? ${n} : {}`}]})}const l=a.map((e=>e.signals.data)),c=`unit: ${nf(e)}, fields: ${r+Pc}, values`;return i.concat({name:o,...s?{init:`{${c}: ${Vc(s)}}`}:{},...l.length?{on:[{events:[{signal:l.join(" || ")}],update:`${l.join(" && ")} ? {${c}: [${l}]} : null`}]}:{}})}},topLevelSignals:(e,t,n)=>{if(qm(e)&&e.hasProjection&&t.init){n.filter((e=>e.name===tu)).length||n.unshift({name:tu,value:null,on:[{events:"timer{1}",update:`${tu} === null ? {} : ${tu}`}]})}return n},marks:(e,n,i)=>{const r=n.name,{x:o,y:a}=n.project.hasChannel,s=o?.signals.visual,l=a?.signals.visual,c=`data(${t.stringValue(n.name+Ju)})`;if(Qc.defined(n)||!o&&!a)return i;const u={x:void 0!==o?{signal:`${s}[0]`}:{value:0},y:void 0!==a?{signal:`${l}[0]`}:{value:0},x2:void 0!==o?{signal:`${s}[1]`}:{field:{group:"width"}},y2:void 0!==a?{signal:`${l}[1]`}:{field:{group:"height"}}};if("global"===n.resolve)for(const t of D(u))u[t]=[{test:`${c}.length && ${c}[0].unit === ${nf(e)}`,...u[t]},{value:0}];const{fill:f,fillOpacity:d,cursor:m,...p}=n.mark,g=D(p).reduce(((e,t)=>(e[t]=[{test:[void 0!==o&&`${s}[0] !== ${s}[1]`,void 0!==a&&`${l}[0] !== ${l}[1]`].filter((e=>e)).join(" && "),value:p[t]},{value:null}],e)),{}),h=m??(n.translate?"move":null);return[{name:`${r+Zc}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:f},fillOpacity:{value:d}},update:u}},...i,{name:r+Zc,type:"rect",clip:!0,encode:{enter:{...h?{cursor:{value:h}}:{},fill:{value:"transparent"}},update:{...u,...g}}}]}};function ru(e){let{model:n,channelDef:i,vgChannel:r,invalidValueRef:o,mainRefFn:a}=e;const s=Qo(i)&&i.condition;let l=[];if(s){l=t.array(s).map((e=>{const t=a(e);if(function(e){return J(e,"param")}(e)){const{param:i,empty:r}=e;return{test:ff(n,{param:i,empty:r}),...t}}return{test:mf(n,e.test),...t}}))}void 0!==o&&l.push(o);const c=a(i);return void 0!==c&&l.push(c),l.length>1||1===l.length&&Boolean(l[0].test)?{[r]:l}:1===l.length?{[r]:l[0]}:{}}function ou(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";const n=e.encoding[t];return ru({model:e,channelDef:n,vgChannel:t,mainRefFn:t=>au(t,e.config),invalidValueRef:void 0})}function au(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"datum";if(e){if(sa(e))return Pn(e.value);if(oa(e)){const{format:i,formatType:r}=$a(e);return Oo({fieldOrDatumDef:e,format:i,formatType:r,expr:n,config:t})}}}function su(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{encoding:i,markDef:r,config:o,stack:a}=e,s=i.tooltip;if(t.isArray(s))return{tooltip:cu({tooltip:s},a,o,n)};{const l=n.reactiveGeom?"datum.datum":"datum";return ru({model:e,channelDef:s,vgChannel:"tooltip",mainRefFn:e=>{const s=au(e,o,l);if(s)return s;if(null===e)return;let c=En("tooltip",r,o);return!0===c&&(c={content:"encoding"}),t.isString(c)?{value:c}:t.isObject(c)?wn(c)?c:"encoding"===c.content?cu(i,a,o,n):{signal:l}:void 0},invalidValueRef:void 0})}}function lu(e,n,i){let{reactiveGeom:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o={...i,...i.tooltipFormat},a=new Set,s=r?"datum.datum":"datum",l=[];function c(i,r){const c=rt(r),u=aa(i)?i:{...i,type:e[c].type},f=u.title||xa(u,o),d=t.array(f).join(", ").replaceAll(/"/g,'\\"');let m;if(_t(r)){const t="x"===r?"x2":"y2",n=wa(e[t]);if(pn(u.bin)&&n){const e=ma(u,{expr:s}),i=ma(n,{expr:s}),{format:r,formatType:l}=$a(u);m=jo(e,i,r,l,o),a.add(t)}}if((_t(r)||r===ce||r===se)&&n&&n.fieldChannel===r&&"normalize"===n.offset){const{format:e,formatType:t}=$a(u);m=Oo({fieldOrDatumDef:u,format:e,formatType:t,expr:s,config:o,normalizeStack:!0}).signal}m??=au(u,o,s).signal,l.push({channel:r,key:d,value:m})}Qa(e,((e,t)=>{Zo(e)?c(e,t):Jo(e)&&c(e.condition,t)}));const u={};for(const{channel:e,key:t,value:n}of l)a.has(e)||u[t]||(u[t]=n);return u}function cu(e,t,n){let{reactiveGeom:i}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=lu(e,t,n,{reactiveGeom:i}),o=O(r).map((e=>{let[t,n]=e;return`"${t}": ${n}`}));return o.length>0?{signal:`{${o.join(", ")}}`}:void 0}function uu(e){const{markDef:t,config:n}=e,i=En("aria",t,n);return!1===i?{}:{...i?{aria:i}:{},...fu(e),...du(e)}}function fu(e){const{mark:n,markDef:i,config:r}=e;if(!1===r.aria)return{};const o=En("ariaRoleDescription",i,r);return null!=o?{ariaRoleDescription:{value:o}}:t.hasOwnProperty(Fn,n)?{}:{ariaRoleDescription:{value:n}}}function du(e){const{encoding:t,markDef:n,config:i,stack:r}=e,o=t.description;if(o)return ru({model:e,channelDef:o,vgChannel:"description",mainRefFn:t=>au(t,e.config),invalidValueRef:void 0});const a=En("description",n,i);if(null!=a)return{description:Pn(a)};if(!1===i.aria)return{};const s=lu(t,r,i);return S(s)?void 0:{description:{signal:O(s).map(((e,t)=>{let[n,i]=e;return`"${t>0?"; ":""}${n}: " + (${i})`})).join(" + ")}}}function mu(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{markDef:i,encoding:r,config:o}=t,{vgChannel:a}=n;let{defaultRef:s,defaultValue:l}=n;const c=r[e];void 0===s&&(l??=En(e,i,o,{vgChannel:a,ignoreVgConfig:!Qo(c)}),void 0!==l&&(s=Pn(l)));const u={markDef:i,config:o,scaleName:t.scaleName(e),scale:t.getScaleComponent(e)},f=yo({...u,scaleChannel:e,channelDef:c});return ru({model:t,channelDef:c,vgChannel:a??e,invalidValueRef:f,mainRefFn:t=>wo({...u,channel:e,channelDef:t,stack:null,defaultRef:s})})}function pu(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{filled:void 0};const{markDef:n,encoding:i,config:r}=e,{type:o}=n,a=t.filled??En("filled",n,r),s=p(["bar","point","circle","square","geoshape"],o)?"transparent":void 0,l=En(!0===a?"color":void 0,n,r,{vgChannel:"fill"})??r.mark[!0===a&&"color"]??s,c=En(!1===a?"color":void 0,n,r,{vgChannel:"stroke"})??r.mark[!1===a&&"color"],u=a?"fill":"stroke",f={...l?{fill:Pn(l)}:{},...c?{stroke:Pn(c)}:{}};return n.color&&(a?n.fill:n.stroke)&&Si(ai("property",{fill:"fill"in n,stroke:"stroke"in n})),{...f,...mu("color",e,{vgChannel:u,defaultValue:a?l:c}),...mu("fill",e,{defaultValue:i.fill?l:void 0}),...mu("stroke",e,{defaultValue:i.stroke?c:void 0})}}function gu(e){const{encoding:t,mark:n}=e,i=t.order;return!Zr(n)&&sa(i)?ru({model:e,channelDef:i,vgChannel:"zindex",mainRefFn:e=>Pn(e.value),invalidValueRef:void 0}):{}}function hu(e){let{channel:t,markDef:n,encoding:i={},model:r,bandPosition:o}=e;const a=`${t}Offset`,s=n[a],l=i[a];if(("xOffset"===a||"yOffset"===a)&&l){return{offsetType:"encoding",offset:wo({channel:a,channelDef:l,markDef:n,config:r?.config,scaleName:r.scaleName(a),scale:r.getScaleComponent(a),stack:null,defaultRef:Pn(s),bandPosition:o})}}const c=n[a];return c?{offsetType:"visual",offset:c}:{}}function yu(e,t,n){let{defaultPos:i,vgChannel:r}=n;const{encoding:o,markDef:a,config:s,stack:l}=t,c=o[e],u=o[at(e)],f=t.scaleName(e),d=t.getScaleComponent(e),{offset:m,offsetType:p}=hu({channel:e,markDef:a,encoding:o,model:t,bandPosition:.5}),g=vu({model:t,defaultPos:i,channel:e,scaleName:f,scale:d}),h=!c&&_t(e)&&(o.latitude||o.longitude)?{field:t.getName(e)}:function(e){const{channel:t,channelDef:n,scaleName:i,stack:r,offset:o,markDef:a}=e;if(oa(n)&&r&&t===r.fieldChannel){if(Zo(n)){let e=n.bandPosition;if(void 0!==e||"text"!==a.type||"radius"!==t&&"theta"!==t||(e=.5),void 0!==e)return $o({scaleName:i,fieldOrDatumDef:n,startSuffix:"start",bandPosition:e,offset:o})}return xo(n,i,{suffix:"end"},{offset:o})}return bo(e)}({channel:e,channelDef:c,channel2Def:u,markDef:a,config:s,scaleName:f,scale:d,stack:l,offset:m,defaultRef:g,bandPosition:"encoding"===p?0:void 0});return h?{[r||e]:h}:void 0}function vu(e){let{model:t,defaultPos:n,channel:i,scaleName:r,scale:o}=e;const{markDef:a,config:s}=t;return()=>{const e=rt(i),l=ot(i),c=En(i,a,s,{vgChannel:l});if(void 0!==c)return ko(i,c);switch(n){case"zeroOrMin":return bu({scaleName:r,scale:o,mode:"zeroOrMin",mainChannel:e,config:s});case"zeroOrMax":return bu({scaleName:r,scale:o,mode:{zeroOrMax:{widthSignal:t.width.signal,heightSignal:t.height.signal}},mainChannel:e,config:s});case"mid":return{...t[st(i)],mult:.5}}}}function bu(e){let{mainChannel:t,config:n,...i}=e;const r=ho(i),{mode:o}=i;if(r)return r;switch(t){case"radius":{if("zeroOrMin"===o)return{value:0};const{widthSignal:e,heightSignal:t}=o.zeroOrMax;return{signal:`min(${e},${t})/2`}}case"theta":return"zeroOrMin"===o?{value:0}:{signal:"2*PI"};case"x":return"zeroOrMin"===o?{value:0}:{field:{group:"width"}};case"y":return"zeroOrMin"===o?{field:{group:"height"}}:{value:0}}}const xu={left:"x",center:"xc",right:"x2"},$u={top:"y",middle:"yc",bottom:"y2"};function wu(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"middle";if("radius"===e||"theta"===e)return ot(e);const r="x"===e?"align":"baseline",o=En(r,t,n);let a;return wn(o)?(Si(function(e){return`The ${e} for range marks cannot be an expression`}(r)),a=void 0):a=o,"x"===e?xu[a||("top"===i?"left":"center")]:$u[a||i]}function ku(e,t,n){let{defaultPos:i,defaultPos2:r,range:o}=n;return o?Su(e,t,{defaultPos:i,defaultPos2:r}):yu(e,t,{defaultPos:i})}function Su(e,t,n){let{defaultPos:i,defaultPos2:r}=n;const{markDef:o,config:a}=t,s=at(e),l=st(e),c=function(e,t,n){const{encoding:i,mark:r,markDef:o,stack:a,config:s}=e,l=rt(n),c=st(n),u=ot(n),f=i[l],d=e.scaleName(l),m=e.getScaleComponent(l),{offset:p}=hu(n in i||n in o?{channel:n,markDef:o,encoding:i,model:e}:{channel:l,markDef:o,encoding:i,model:e});if(!f&&("x2"===n||"y2"===n)&&(i.latitude||i.longitude)){const t=st(n),i=e.markDef[t];return null!=i?{[t]:{value:i}}:{[u]:{field:e.getName(n)}}}const g=function(e){let{channel:t,channelDef:n,channel2Def:i,markDef:r,config:o,scaleName:a,scale:s,stack:l,offset:c,defaultRef:u}=e;if(oa(n)&&l&&t.charAt(0)===l.fieldChannel.charAt(0))return xo(n,a,{suffix:"start"},{offset:c});return bo({channel:t,channelDef:i,scaleName:a,scale:s,stack:l,markDef:r,config:o,offset:c,defaultRef:u})}({channel:n,channelDef:f,channel2Def:i[n],markDef:o,config:s,scaleName:d,scale:m,stack:a,offset:p,defaultRef:void 0});if(void 0!==g)return{[u]:g};return Du(n,o)||Du(n,{[n]:Rn(n,o,s.style),[c]:Rn(c,o,s.style)})||Du(n,s[r])||Du(n,s.mark)||{[u]:vu({model:e,defaultPos:t,channel:n,scaleName:d,scale:m})()}}(t,r,s);return{...yu(e,t,{defaultPos:i,vgChannel:c[l]?wu(e,o,a):ot(e)}),...c}}function Du(e,t){const n=st(e),i=ot(e);if(void 0!==t[i])return{[i]:ko(e,t[i])};if(void 0!==t[e])return{[i]:ko(e,t[e])};if(t[n]){const i=t[n];if(!lo(i))return{[n]:ko(e,i)};Si(function(e){return`Position range does not support relative band size for ${e}.`}(n))}}function Fu(e,n){const{config:i,encoding:r,markDef:o}=e,a=o.type,s=at(n),l=st(n),c=r[n],u=r[s],f=e.getScaleComponent(n),d=f?f.get("type"):void 0,m=o.orient,p=r[l]??r.size??En("size",o,i,{vgChannel:l}),g=lt(n),h="bar"===a&&("x"===n?"vertical"===m:"horizontal"===m)||"tick"===a&&("y"===n?"vertical"===m:"horizontal"===m);return!Zo(c)||!(mn(c.bin)||pn(c.bin)||c.timeUnit&&!u)||p&&!lo(p)||r[g]||kr(d)?(oa(c)&&kr(d)||h)&&!u?function(e,n,i){const{markDef:r,encoding:o,config:a,stack:s}=i,l=r.orient,c=i.scaleName(n),u=i.getScaleComponent(n),f=st(n),d=at(n),m=lt(n),p=i.scaleName(m),g=i.getScaleComponent(ct(n)),h="tick"===r.type||"horizontal"===l&&"y"===n||"vertical"===l&&"x"===n;let y;(o.size||r.size)&&(h?y=mu("size",i,{vgChannel:f,defaultRef:Pn(r.size)}):Si(function(e){return`Cannot apply size to non-oriented mark "${e}".`}(r.type)));const v=!!y,b=Go({channel:n,fieldDef:e,markDef:r,config:a,scaleType:(u||g)?.get("type"),useVlSizeChannel:h});y=y||{[f]:Ou(f,p||c,g||u,a,b,!!e,r.type)};const x="band"===(u||g)?.get("type")&&lo(b)&&!v?"top":"middle",$=wu(n,r,a,x),w="xc"===$||"yc"===$,{offset:k,offsetType:S}=hu({channel:n,markDef:r,encoding:o,model:i,bandPosition:w?.5:0}),D=bo({channel:n,channelDef:e,markDef:r,config:a,scaleName:c,scale:u,stack:s,offset:k,defaultRef:vu({model:i,defaultPos:"mid",channel:n,scaleName:c,scale:u}),bandPosition:w?"encoding"===S?0:.5:wn(b)?{signal:`(1-${b})/2`}:lo(b)?(1-b.band)/2:0});if(f)return{[$]:D,...y};{const e=ot(d),n=y[f],i=k?{...n,offset:k}:n;return{[$]:D,[e]:t.isArray(D)?[D[0],{...D[1],offset:i}]:{...D,offset:i}}}}(c,n,e):Su(n,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"}):function(e){let{fieldDef:t,fieldDef2:n,channel:i,model:r}=e;const{config:o,markDef:a,encoding:s}=r,l=r.getScaleComponent(i),c=r.scaleName(i),u=l?l.get("type"):void 0,f=l.get("reverse"),d=Go({channel:i,fieldDef:t,markDef:a,config:o,scaleType:u}),m=r.component.axes[i]?.[0],p=m?.get("translate")??.5,g=_t(i)?En("binSpacing",a,o)??0:0,h=at(i),y=ot(i),v=ot(h),b=Mn("minBandSize",a,o),{offset:x}=hu({channel:i,markDef:a,encoding:s,model:r,bandPosition:0}),{offset:$}=hu({channel:h,markDef:a,encoding:s,model:r,bandPosition:0}),w=function(e){let{scaleName:t,fieldDef:n}=e;const i=ma(n,{expr:"datum"});return`abs(scale("${t}", ${ma(n,{expr:"datum",suffix:"end"})}) - scale("${t}", ${i}))`}({fieldDef:t,scaleName:c}),k=zu(i,g,f,p,x,b,w),S=zu(h,g,f,p,$??x,b,w),D=wn(d)?{signal:`(1-${d.signal})/2`}:lo(d)?(1-d.band)/2:.5,F=Ho({fieldDef:t,fieldDef2:n,markDef:a,config:o});if(mn(t.bin)||t.timeUnit){const e=t.timeUnit&&.5!==F;return{[v]:Cu({fieldDef:t,scaleName:c,bandPosition:D,offset:S,useRectOffsetField:e}),[y]:Cu({fieldDef:t,scaleName:c,bandPosition:wn(D)?{signal:`1-${D.signal}`}:1-D,offset:k,useRectOffsetField:e})}}if(pn(t.bin)){const e=xo(t,c,{},{offset:S});if(Zo(n))return{[v]:e,[y]:xo(n,c,{},{offset:k})};if(gn(t.bin)&&t.bin.step)return{[v]:e,[y]:{signal:`scale("${c}", ${ma(t,{expr:"datum"})} + ${t.bin.step})`,offset:k}}}return void Si(xi(h))}({fieldDef:c,fieldDef2:u,channel:n,model:e})}function Ou(e,n,i,r,o,a,s){if(lo(o)){if(!i)return{mult:o.band,field:{group:e}};{const e=i.get("type");if("band"===e){let e=`bandwidth('${n}')`;1!==o.band&&(e=`${o.band} * ${e}`);const t=Mn("minBandSize",{type:s},r);return{signal:t?`max(${An(t)}, ${e})`:e}}1!==o.band&&(Si(function(e){return`Cannot use the relative band size with ${e} scale.`}(e)),o=void 0)}}else{if(wn(o))return o;if(o)return{value:o}}if(i){const e=i.get("range");if(kn(e)&&t.isNumber(e.step))return{value:e.step-2}}if(!a){const{bandPaddingInner:n,barBandPaddingInner:i,rectBandPaddingInner:o,tickBandPaddingInner:a}=r.scale,l=U(n,"tick"===s?a:"bar"===s?i:o);if(wn(l))return{signal:`(1 - (${l.signal})) * ${e}`};if(t.isNumber(l))return{signal:`${1-l} * ${e}`}}return{value:Ws(r.view,e)-2}}function zu(e,t,n,i,r,o,a){if(Ee(e))return 0;const s="x"===e||"y2"===e,l=s?-t/2:t/2;if(wn(n)||wn(r)||wn(i)||o){const e=An(n),t=An(r),c=An(i),u=An(o),f=o?`(${a} < ${u} ? ${s?"":"-"}0.5 * (${u} - (${a})) : ${l})`:l;return{signal:(c?`${c} + `:"")+(e?`(${e} ? -1 : 1) * `:"")+(t?`(${t} + ${f})`:f)}}return r=r||0,i+(n?-r-l:+r+l)}function Cu(e){let{fieldDef:t,scaleName:n,bandPosition:i,offset:r,useRectOffsetField:o}=e;return $o({scaleName:n,fieldOrDatumDef:t,bandPosition:i,offset:r,...o?{startSuffix:Fc,endSuffix:Oc}:{}})}const _u=new Set(["aria","width","height"]);function Pu(e,t){const{fill:n,stroke:i}="include"===t.color?pu(e):{};return{...Au(e.markDef,t),...Nu("fill",n),...Nu("stroke",i),...mu("opacity",e),...mu("fillOpacity",e),...mu("strokeOpacity",e),...mu("strokeWidth",e),...mu("strokeDash",e),...gu(e),...su(e),...ou(e,"href"),...uu(e)}}function Nu(e,t){return t?{[e]:t}:{}}function Au(e,t){return Dn.reduce(((n,i)=>(!_u.has(i)&&J(e,i)&&"ignore"!==t[i]&&(n[i]=Pn(e[i])),n)),{})}function Tu(e){const{config:t,markDef:n}=e,i=new Set;if(e.forEachFieldDef(((r,o)=>{let a;if(!Qt(o)||!(a=e.getScaleType(o)))return;const s=cn(r.aggregate),l=go({scaleChannel:o,markDef:n,config:t,scaleType:a,isCountAggregate:s});if("break-paths-filter-domains"===(c=l)||"break-paths-show-domains"===c){const t=e.vgField(o,{expr:"datum",binSuffix:e.stack?.impute?"mid":void 0});t&&i.add(t)}var c})),i.size>0){return{defined:{signal:[...i].map((e=>ir(e,!0))).join(" && ")}}}}function ju(e,t){if(void 0!==t)return{[e]:Pn(t)}}const Eu="voronoi",Mu={defined:e=>"point"===e.type&&e.nearest,parse:(e,t)=>{if(t.events)for(const n of t.events)n.markname=e.getName(Eu)},marks:(e,t,n)=>{const{x:i,y:r}=t.project.hasChannel,o=e.mark;if(Zr(o))return Si(`The "nearest" transform is not supported for ${o} marks.`),n;const a={name:e.getName(Eu),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...su(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:i||!r?"datum.datum.x || 0":"0"},y:{expr:r||!i?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let s=0,l=!1;return n.forEach(((t,n)=>{const i=t.name??"";i===e.component.mark[0].name?s=n:i.includes(Eu)&&(l=!0)})),l||n.splice(s+1,0,a),n}},Ru={defined:e=>"point"===e.type&&"global"===e.resolve&&e.bind&&"scales"!==e.bind&&!_s(e.bind),parse:(e,t,n)=>of(t,n),topLevelSignals:(e,n,i)=>{const r=n.name,o=n.project,a=n.bind,s=n.init&&n.init[0],l=Mu.defined(n)?"(item().isVoronoi ? datum.datum : datum)":"datum";return o.items.forEach(((e,o)=>{const c=C(`${r}_${e.field}`);i.filter((e=>e.name===c)).length||i.unshift({name:c,...s?{init:Vc(s[o])}:{value:null},on:n.events?[{events:n.events,update:`datum && item().mark.marktype !== 'group' ? ${l}[${t.stringValue(e.field)}] : null`}]:[],bind:a[e.field]??a[e.channel]??a})})),i},signals:(e,t,n)=>{const i=t.name,r=t.project,o=n.find((e=>e.name===i+Ku)),a=i+Pc,s=r.items.map((e=>C(`${i}_${e.field}`))),l=s.map((e=>`${e} !== null`)).join(" && ");return s.length&&(o.update=`${l} ? {fields: ${a}, values: [${s.join(", ")}]} : null`),delete o.value,delete o.on,n}},Lu="_toggle",qu={defined:e=>"point"===e.type&&!af(e)&&!!e.toggle,signals:(e,t,n)=>n.concat({name:t.name+Lu,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const n=t.name+Ku,i=t.name+Lu;return`${i} ? null : ${n}, `+("global"===t.resolve?`${i} ? null : true, `:`${i} ? null : {unit: ${nf(e)}}, `)+`${i} ? ${n} : null`}},Uu={defined:e=>void 0!==e.clear&&!1!==e.clear&&!af(e),parse:(e,n)=>{n.clear&&(n.clear=t.isString(n.clear)?t.parseSelector(n.clear,"view"):n.clear)},topLevelSignals:(e,t,n)=>{if(Ru.defined(t))for(const e of t.project.items){const i=n.findIndex((n=>n.name===C(`${t.name}_${e.field}`)));-1!==i&&n[i].on.push({events:t.clear,update:"null"})}return n},signals:(e,t,n)=>{function i(e,i){-1!==e&&n[e].on&&n[e].on.push({events:t.clear,update:i})}if("interval"===t.type)for(const e of t.project.items){const t=n.findIndex((t=>t.name===e.signals.visual));if(i(t,"[0, 0]"),-1===t){i(n.findIndex((t=>t.name===e.signals.data)),"null")}}else{let e=n.findIndex((e=>e.name===t.name+Ku));i(e,"null"),qu.defined(t)&&(e=n.findIndex((e=>e.name===t.name+Lu)),i(e,"false"))}return n}},Wu={defined:e=>{const t="global"===e.resolve&&e.bind&&_s(e.bind),n=1===e.project.items.length&&e.project.items[0].field!==zs;return t&&!n&&Si("Legend bindings are only supported for selections over an individual field or encoding channel."),t&&n},parse:(e,n,i)=>{const r=l(i);if(r.select=t.isString(r.select)?{type:r.select,toggle:n.toggle}:{...r.select,toggle:n.toggle},of(n,r),t.isObject(i.select)&&(i.select.on||i.select.clear)){const e='event.item && indexof(event.item.mark.role, "legend") < 0';for(const i of n.events)i.filter=t.array(i.filter??[]),i.filter.includes(e)||i.filter.push(e)}const o=Ps(n.bind)?n.bind.legend:"click",a=t.isString(o)?t.parseSelector(o,"view"):t.array(o);n.bind={legend:{merge:a}}},topLevelSignals:(e,t,n)=>{const i=t.name,r=Ps(t.bind)&&t.bind.legend,o=e=>t=>{const n=l(t);return n.markname=e,n};for(const e of t.project.items){if(!e.hasLegend)continue;const a=`${C(e.field)}_legend`,s=`${i}_${a}`;if(0===n.filter((e=>e.name===s)).length){const e=r.merge.map(o(`${a}_symbols`)).concat(r.merge.map(o(`${a}_labels`))).concat(r.merge.map(o(`${a}_entries`)));n.unshift({name:s,...t.init?{}:{value:null},on:[{events:e,update:"isDefined(datum.value) ? datum.value : item().items[0].items[0].datum.value",force:!0},{events:r.merge,update:`!event.item || !datum ? null : ${s}`,force:!0}]})}}return n},signals:(e,t,n)=>{const i=t.name,r=t.project,o=n.find((e=>e.name===i+Ku)),a=i+Pc,s=r.items.filter((e=>e.hasLegend)).map((e=>C(`${i}_${C(e.field)}_legend`))),l=`${s.map((e=>`${e} !== null`)).join(" && ")} ? {fields: ${a}, values: [${s.join(", ")}]} : null`;t.events&&s.length>0?o.on.push({events:s.map((e=>({signal:e}))),update:l}):s.length>0&&(o.update=l,delete o.value,delete o.on);const c=n.find((e=>e.name===i+Lu)),u=Ps(t.bind)&&t.bind.legend;return c&&(t.events?c.on.push({...c.on[0],events:u}):c.on[0].events=u),n}};const Iu="_translate_anchor",Bu="_translate_delta",Vu={defined:e=>"interval"===e.type&&e.translate,signals:(e,n,i)=>{const r=n.name,o=Qc.defined(n),a=r+Iu,{x:s,y:l}=n.project.hasChannel;let c=t.parseSelector(n.translate,"scope");return o||(c=c.map((e=>(e.between[0].markname=r+Zc,e)))),i.push({name:a,value:{},on:[{events:c.map((e=>e.between[0])),update:"{x: x(unit), y: y(unit)"+(void 0!==s?`, extent_x: ${o?Jc(e,te):`slice(${s.signals.visual})`}`:"")+(void 0!==l?`, extent_y: ${o?Jc(e,ne):`slice(${l.signals.visual})`}`:"")+"}"}]},{name:r+Bu,value:{},on:[{events:c,update:`{x: ${a}.x - x(unit), y: ${a}.y - y(unit)}`}]}),void 0!==s&&Hu(e,n,s,"width",i),void 0!==l&&Hu(e,n,l,"height",i),i}};function Hu(e,t,n,i,r){const o=t.name,a=o+Iu,s=o+Bu,l=n.channel,c=Qc.defined(t),u=r.find((e=>e.name===n.signals[c?"data":"visual"])),f=e.getSizeSignalRef(i).signal,d=e.getScaleComponent(l),m=d&&d.get("type"),p=d&&d.get("reverse"),g=`${a}.extent_${l}`,h=`${c&&d?"log"===m?"panLog":"symlog"===m?"panSymlog":"pow"===m?"panPow":"panLinear":"panLinear"}(${g}, ${`${c?l===te?p?"":"-":p?"-":"":""}${s}.${l} / ${c?`${f}`:`span(${g})`}`}${c?"pow"===m?`, ${d.get("exponent")??1}`:"symlog"===m?`, ${d.get("constant")??1}`:"":""})`;u.on.push({events:{signal:s},update:c?h:`clampRange(${h}, 0, ${f})`})}const Gu="_zoom_anchor",Yu="_zoom_delta",Xu={defined:e=>"interval"===e.type&&e.zoom,signals:(e,n,i)=>{const r=n.name,o=Qc.defined(n),a=r+Yu,{x:s,y:l}=n.project.hasChannel,c=t.stringValue(e.scaleName(te)),u=t.stringValue(e.scaleName(ne));let f=t.parseSelector(n.zoom,"scope");return o||(f=f.map((e=>(e.markname=r+Zc,e)))),i.push({name:r+Gu,on:[{events:f,update:o?"{"+[c?`x: invert(${c}, x(unit))`:"",u?`y: invert(${u}, y(unit))`:""].filter((e=>e)).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:a,on:[{events:f,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==s&&Qu(e,n,s,"width",i),void 0!==l&&Qu(e,n,l,"height",i),i}};function Qu(e,t,n,i,r){const o=t.name,a=n.channel,s=Qc.defined(t),l=r.find((e=>e.name===n.signals[s?"data":"visual"])),c=e.getSizeSignalRef(i).signal,u=e.getScaleComponent(a),f=u&&u.get("type"),d=s?Jc(e,a):l.name,m=o+Yu,p=`${s&&u?"log"===f?"zoomLog":"symlog"===f?"zoomSymlog":"pow"===f?"zoomPow":"zoomLinear":"zoomLinear"}(${d}, ${`${o}${Gu}.${a}`}, ${m}${s?"pow"===f?`, ${u.get("exponent")??1}`:"symlog"===f?`, ${u.get("constant")??1}`:"":""})`;l.on.push({events:{signal:m},update:s?p:`clampRange(${p}, 0, ${c})`})}const Ju="_store",Ku="_tuple",Zu="_modify",ef="vlSelectionResolve",tf=[Ic,iu,Ac,qu,Ru,Qc,Wu,Uu,Vu,Xu,Mu];function nf(e){let{escape:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{escape:!0},i=n?t.stringValue(e.name):e.name;const r=function(e){let t=e.parent;for(;t&&!Um(t);)t=t.parent;return t}(e);if(r){const{facet:e}=r;for(const n of Be)e[n]&&(i+=` + '__facet_${n}_' + (facet[${t.stringValue(r.vgField(n))}])`)}return i}function rf(e){return F(e.component.selection??{}).reduce(((e,t)=>e||t.project.hasSelectionId),!1)}function of(e,n){!t.isString(n.select)&&n.select.on||delete e.events,!t.isString(n.select)&&n.select.clear||delete e.clear,!t.isString(n.select)&&n.select.toggle||delete e.toggle}function af(e){return e.events?.find((e=>"type"in e&&"timer"===e.type))}function sf(e){const t=[];return"Identifier"===e.type?[e.name]:"Literal"===e.type?[e.value]:("MemberExpression"===e.type&&(t.push(...sf(e.object)),t.push(...sf(e.property))),t)}function lf(e){return"MemberExpression"===e.object.type?lf(e.object):"datum"===e.object.name}function cf(e){const n=t.parseExpression(e),i=new Set;return n.visit((e=>{"MemberExpression"===e.type&&lf(e)&&i.add(sf(e).slice(1).join("."))})),i}class uf extends $c{clone(){return new uf(null,this.model,l(this.filter))}constructor(e,t,n){super(e),this.model=t,this.filter=n,this.expr=mf(this.model,this.filter,this),this._dependentFields=cf(this.expr)}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function ff(e,n,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"datum";const o=t.isString(n)?n:n.param,a=C(o),s=t.stringValue(a+Ju);let l;try{l=e.getSelectionComponent(a,o)}catch(e){return`!!${a}`}if(l.project.timeUnit){const t=i??e.component.data.raw,n=l.project.timeUnit.clone();t.parent?n.insertAsParentOf(t):t.parent=n}const c=`${l.project.hasSelectionId?"vlSelectionIdTest(":"vlSelectionTest("}${s}, ${r}${"global"===l.resolve?")":`, ${t.stringValue(l.resolve)})`}`,u=`length(data(${s}))`;return!1===n.empty?`${u} && ${c}`:`!${u} || ${c}`}function df(e,n,i){const r=C(n),o=i.encoding;let a,s=i.field;try{a=e.getSelectionComponent(r,n)}catch(e){return r}if(o||s){if(o&&!s){const e=a.project.items.filter((e=>e.channel===o));!e.length||e.length>1?(s=a.project.items[0].field,Si(function(e,n,i,r){return(e.length?"Multiple ":"No ")+`matching ${t.stringValue(n)} encoding found for selection ${t.stringValue(i.param)}. `+`Using "field": ${t.stringValue(r)}.`}(e,o,i,s))):s=e[0].field}}else s=a.project.items[0].field,a.project.items.length>1&&Si(function(e){return`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${t.stringValue(e)}.`}(s));return`${a.name}[${t.stringValue(M(s))}]`}function mf(e,n,i){return _(n,(n=>t.isString(n)?n:function(e){return J(e,"param")}(n)?ff(e,n,i):nr(n)))}function pf(e,t,n,i){e.encode??={},e.encode[t]??={},e.encode[t].update??={},e.encode[t].update[n]=i}function gf(e,n,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{header:!1};const{disable:o,orient:a,scale:s,labelExpr:l,title:c,zindex:u,...f}=e.combine();if(!o){for(const e in f){const i=e,r=Ea[i],o=f[i];if(r&&r!==n&&"both"!==r)delete f[i];else if(Ta(o)){const{condition:e,...n}=o,r=t.array(e),a=Aa[i];if(a){const{vgProp:e,part:t}=a;pf(f,t,e,[...r.map((e=>{const{test:t,...n}=e;return{test:mf(null,t),...n}})),n]),delete f[i]}else if(null===a){const e={signal:r.map((e=>{const{test:t,...n}=e;return`${mf(null,t)} ? ${Nn(n)} : `})).join("")+Nn(n)};f[i]=e}}else if(wn(o)){const e=Aa[i];if(e){const{vgProp:t,part:n}=e;pf(f,n,t,o),delete f[i]}}p(["labelAlign","labelBaseline"],i)&&null===f[i]&&delete f[i]}if("grid"===n){if(!f.grid)return;if(f.encode){const{grid:e}=f.encode;f.encode={...e?{grid:e}:{}},S(f.encode)&&delete f.encode}return{scale:s,orient:a,...f,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:U(u,0)}}{if(!r.header&&e.mainExtracted)return;if(void 0!==l){let e=l;f.encode?.labels?.update&&wn(f.encode.labels.update.text)&&(e=R(l,"datum.label",f.encode.labels.update.text.signal)),pf(f,"labels","text",{signal:e})}if(null===f.labelAlign&&delete f.labelAlign,f.encode){for(const t of ja)e.hasAxisPart(t)||delete f.encode[t];S(f.encode)&&delete f.encode}const n=function(e,n){if(e)return t.isArray(e)&&!$n(e)?e.map((e=>xa(e,n))).join(", "):e}(c,i);return{scale:s,orient:a,grid:!1,...n?{title:n}:{},...f,...!1===i.aria?{aria:!1}:{},zindex:U(u,0)}}}}function hf(e){const{axes:t}=e.component,n=[];for(const i of Ct)if(t[i])for(const r of t[i])if(!r.get("disable")&&!r.get("gridScale")){const t="x"===i?"height":"width",r=e.getSizeSignalRef(t).signal;t!==r&&n.push({name:t,update:r})}return n}function yf(e,t,n,i){return Object.assign.apply(null,[{},...e.map((e=>{if("axisOrient"===e){const e="x"===n?"bottom":"left",r=t["x"===n?"axisBottom":"axisLeft"]||{},o=t["x"===n?"axisTop":"axisRight"]||{},a=new Set([...D(r),...D(o)]),s={};for(const t of a.values())s[t]={signal:`${i.signal} === "${e}" ? ${An(r[t])} : ${An(o[t])}`};return s}return t[e]}))])}function vf(e,n){const i=[{}];for(const r of e){let e=n[r]?.style;if(e){e=t.array(e);for(const t of e)i.push(n.style[t])}}return Object.assign.apply(null,i)}function bf(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=Ln(e,n,t);if(void 0!==r)return{configFrom:"style",configValue:r};for(const t of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(void 0!==i[t]?.[e])return{configFrom:t,configValue:i[t][e]};return{}}const xf={scale:e=>{let{model:t,channel:n}=e;return t.scaleName(n)},format:e=>{let{format:t}=e;return t},formatType:e=>{let{formatType:t}=e;return t},grid:e=>{let{fieldOrDatumDef:t,axis:n,scaleType:i}=e;return n.grid??function(e,t){return!kr(e)&&Zo(t)&&!mn(t?.bin)&&!pn(t?.bin)}(i,t)},gridScale:e=>{let{model:t,channel:n}=e;return function(e,t){const n="x"===t?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n);return}(t,n)},labelAlign:e=>{let{axis:t,labelAngle:n,orient:i,channel:r}=e;return t.labelAlign||kf(n,i,r)},labelAngle:e=>{let{labelAngle:t}=e;return t},labelBaseline:e=>{let{axis:t,labelAngle:n,orient:i,channel:r}=e;return t.labelBaseline||wf(n,i,r)},labelFlush:e=>{let{axis:t,fieldOrDatumDef:n,channel:i}=e;return t.labelFlush??function(e,t){if("x"===t&&p(["quantitative","temporal"],e))return!0;return}(n.type,i)},labelOverlap:e=>{let{axis:n,fieldOrDatumDef:i,scaleType:r}=e;return n.labelOverlap??function(e,n,i,r){if(i&&!t.isObject(r)||"nominal"!==e&&"ordinal"!==e)return"log"!==n&&"symlog"!==n||"greedy";return}(i.type,r,Zo(i)&&!!i.timeUnit,Zo(i)?i.sort:void 0)},orient:e=>{let{orient:t}=e;return t},tickCount:e=>{let{channel:t,model:n,axis:i,fieldOrDatumDef:r,scaleType:o}=e;const a="x"===t?"width":"y"===t?"height":void 0,s=a?n.getSizeSignalRef(a):void 0;return i.tickCount??function(e){let{fieldOrDatumDef:t,scaleType:n,size:i,values:r}=e;if(!r&&!kr(n)&&"log"!==n){if(Zo(t)){if(mn(t.bin))return{signal:`ceil(${i.signal}/10)`};if(t.timeUnit&&p(["month","hours","day","quarter"],Ii(t.timeUnit)?.unit))return}return{signal:`ceil(${i.signal}/40)`}}return}({fieldOrDatumDef:r,scaleType:o,size:s,values:i.values})},tickMinStep:function(e){let{format:t,fieldOrDatumDef:n}=e;if("d"===t)return 1;if(Zo(n)){const{timeUnit:e}=n;if(e){const t=Bi(e);if(t)return{signal:t}}}return},title:e=>{let{axis:t,model:n,channel:i}=e;if(void 0!==t.title)return t.title;const r=Sf(n,i);if(void 0!==r)return r;const o=n.typedFieldDef(i),a="x"===i?"x2":"y2",s=n.fieldDef(a);return Un(o?[Bo(o)]:[],Zo(s)?[Bo(s)]:[])},values:e=>{let{axis:n,fieldOrDatumDef:i}=e;return function(e,n){const i=e.values;if(t.isArray(i))return Pa(n,i);if(wn(i))return i;return}(n,i)},zindex:e=>{let{axis:t,fieldOrDatumDef:n,mark:i}=e;return t.zindex??function(e,t){if("rect"===e&&pa(t))return 1;return 0}(i,n)}};function $f(e){return`(((${e.signal} % 360) + 360) % 360)`}function wf(e,t,n,i){if(void 0!==e){if("x"===n){if(wn(e)){const n=$f(e);return{signal:`(45 < ${n} && ${n} < 135) || (225 < ${n} && ${n} < 315) ? "middle" :(${n} <= 45 || 315 <= ${n}) === ${wn(t)?`(${t.signal} === "top")`:"top"===t} ? "bottom" : "top"`}}if(45{if(la(t)&&qo(t.sort)){const{field:i,timeUnit:r}=t,o=t.sort,a=o.map(((e,t)=>`${nr({field:i,timeUnit:r,equal:e})} ? ${t} : `)).join("")+o.length;e=new Df(e,{calculate:a,as:Ff(t,n,{forAs:!0})})}})),e}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${d(this.transform)}`}}function Ff(e,t,n){return ma(e,{prefix:t,suffix:"sort_index",...n})}function Of(e,t){return p(["top","bottom"],t)?"column":p(["left","right"],t)||"row"===e?"row":"column"}function zf(e,t,n,i){const r="row"===i?n.headerRow:"column"===i?n.headerColumn:n.headerFacet;return U((t||{})[e],r[e],n.header[e])}function Cf(e,t,n,i){const r={};for(const o of e){const e=zf(o,t||{},n,i);void 0!==e&&(r[o]=e)}return r}const _f=["row","column"],Pf=["header","footer"];function Nf(e,t){const n=e.component.layoutHeaders[t].title,i=e.config?e.config:void 0,r=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:o,titleAngle:a,titleOrient:s}=Cf(["titleAnchor","titleAngle","titleOrient"],r.header,i,t),l=Of(t,s),c=H(a);return{name:`${t}-title`,type:"group",role:`${l}-title`,title:{text:n,..."row"===t?{orient:"left"}:{},style:"guide-title",...Tf(c,l),...Af(l,c,o),...Uf(i,r,t,Ss,ws)}}}function Af(e,t){switch(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"middle"){case"start":return{align:"left"};case"end":return{align:"right"}}const n=kf(t,"row"===e?"left":"top","row"===e?"y":"x");return n?{align:n}:{}}function Tf(e,t){const n=wf(e,"row"===t?"left":"top","row"===t?"y":"x",!0);return n?{baseline:n}:{}}function jf(e,t){const n=e.component.layoutHeaders[t],i=[];for(const r of Pf)if(n[r])for(const o of n[r]){const a=Rf(e,t,r,n,o);null!=a&&i.push(a)}return i}function Ef(e,n){const{sort:i}=e;return Lo(i)?{field:ma(i,{expr:"datum"}),order:i.order??"ascending"}:t.isArray(i)?{field:Ff(e,n,{expr:"datum"}),order:"ascending"}:{field:ma(e,{expr:"datum"}),order:i??"ascending"}}function Mf(e,t,n){const{format:i,formatType:r,labelAngle:o,labelAnchor:a,labelOrient:s,labelExpr:l}=Cf(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,n,t),c=Oo({fieldOrDatumDef:e,format:i,formatType:r,expr:"parent",config:n}).signal,u=Of(t,s);return{text:{signal:l?R(R(l,"datum.label",c),"datum.value",ma(e,{expr:"parent"})):c},..."row"===t?{orient:"left"}:{},style:"guide-label",frame:"group",...Tf(o,u),...Af(u,o,a),...Uf(n,e,t,Ds,ks)}}function Rf(e,t,n,i,r){if(r){let o=null;const{facetFieldDef:a}=i,s=e.config?e.config:void 0;if(a&&r.labels){const{labelOrient:e}=Cf(["labelOrient"],a.header,s,t);("row"===t&&!p(["top","bottom"],e)||"column"===t&&!p(["left","right"],e))&&(o=Mf(a,t,s))}const l=Um(e)&&!Uo(e.facet),c=r.axes,u=c?.length>0;if(o||u){const s="row"===t?"height":"width";return{name:e.getName(`${t}_${n}`),type:"group",role:`${t}-${n}`,...i.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:Ef(a,t)}:{},...u&&l?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...o?{title:o}:{},...r.sizeSignal?{encode:{update:{[s]:r.sizeSignal}}}:{},...u?{axes:c}:{}}}}return null}const Lf={column:{start:0,end:1},row:{start:1,end:0}};function qf(e,t){return Lf[t][e]}function Uf(e,t,n,i,r){const o={};for(const a of i){if(!r[a])continue;const i=zf(a,t?.header,e,n);void 0!==i&&(o[r[a]]=i)}return o}function Wf(e){return[...If(e,"width"),...If(e,"height"),...If(e,"childWidth"),...If(e,"childHeight")]}function If(e,t){const n="width"===t?"x":"y",i=e.component.layoutSize.get(t);if(!i||"merged"===i)return[];const r=e.getSizeSignalRef(t).signal;if("step"===i){const t=e.getScaleComponent(n);if(t){const i=t.get("type"),o=t.get("range");if(kr(i)&&kn(o)){const i=e.scaleName(n);if(Um(e.parent)){if("independent"===e.parent.component.resolve.scale[n])return[Bf(i,o)]}return[Bf(i,o),{name:r,update:Vf(i,t,`domain('${i}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==i){const t=r.endsWith("width"),n=t?"containerSize()[0]":"containerSize()[1]",i=`isFinite(${n}) ? ${n} : ${Us(e.config.view,t?"width":"height")}`;return[{name:r,init:i,on:[{update:i,events:"window:resize"}]}]}return[{name:r,value:i}]}function Bf(e,t){const n=`${e}_step`;return wn(t.step)?{name:n,update:t.step.signal}:{name:n,value:t.step}}function Vf(e,t,n){const i=t.get("type"),r=t.get("padding"),o=U(t.get("paddingOuter"),r);let a=t.get("paddingInner");return a="band"===i?void 0!==a?a:r:1,`bandspace(${n}, ${An(a)}, ${An(o)}) * ${e}_step`}function Hf(e){return"childWidth"===e?"width":"childHeight"===e?"height":e}function Gf(e,t){return D(e).reduce(((n,i)=>({...n,...ru({model:t,channelDef:e[i],vgChannel:i,mainRefFn:e=>Pn(e.value),invalidValueRef:void 0})})),{})}function Yf(e,t){if(Um(t))return"theta"===e?"independent":"shared";if(Im(t))return"shared";if(Wm(t))return _t(e)||"theta"===e||"radius"===e?"independent":"shared";throw new Error("invalid model type for resolve")}function Xf(e,t){const n=e.scale[t],i=_t(t)?"axis":"legend";return"independent"===n?("shared"===e[i][t]&&Si(function(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}(t)),"independent"):e[i][t]||"shared"}const Qf=D({aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1});class Jf extends oc{}const Kf={symbols:function(e,n){let{fieldOrDatumDef:i,model:r,channel:o,legendCmpt:a,legendType:s}=n;if("symbol"!==s)return;const{markDef:l,encoding:c,config:u,mark:f}=r,d=l.filled&&"trail"!==f;let m={...Tn({},r,io),...pu(r,{filled:d})};const p=a.get("symbolOpacity")??u.legend.symbolOpacity,g=a.get("symbolFillColor")??u.legend.symbolFillColor,h=a.get("symbolStrokeColor")??u.legend.symbolStrokeColor,y=void 0===p?Zf(c.opacity)??l.opacity:void 0;if(m.fill)if("fill"===o||d&&o===he)delete m.fill;else if(J(m.fill,"field"))g?delete m.fill:(m.fill=Pn(u.legend.symbolBaseFillColor??"black"),m.fillOpacity=Pn(y??1));else if(t.isArray(m.fill)){const e=ed(c.fill??c.color)??l.fill??(d&&l.color);e&&(m.fill=Pn(e))}if(m.stroke)if("stroke"===o||!d&&o===he)delete m.stroke;else if(J(m.stroke,"field")||h)delete m.stroke;else if(t.isArray(m.stroke)){const e=U(ed(c.stroke||c.color),l.stroke,d?l.color:void 0);e&&(m.stroke={value:e})}if(o!==we){const e=Zo(i)&&nd(r,a,i);e?m.opacity=[{test:e,...Pn(y??1)},Pn(u.legend.unselectedOpacity)]:y&&(m.opacity=Pn(y))}return m={...m,...e},S(m)?void 0:m},gradient:function(e,t){let{model:n,legendType:i,legendCmpt:r}=t;if("gradient"!==i)return;const{config:o,markDef:a,encoding:s}=n;let l={};const c=void 0===(r.get("gradientOpacity")??o.legend.gradientOpacity)?Zf(s.opacity)||a.opacity:void 0;c&&(l.opacity=Pn(c));return l={...l,...e},S(l)?void 0:l},labels:function(e,t){let{fieldOrDatumDef:n,model:i,channel:r,legendCmpt:o}=t;const a=i.legend(r)||{},s=i.config,l=Zo(n)?nd(i,o,n):void 0,c=l?[{test:l,value:1},{value:s.legend.unselectedOpacity}]:void 0,{format:u,formatType:f}=a;let d;So(f)?d=Co({fieldOrDatumDef:n,field:"datum.value",format:u,formatType:f,config:s}):void 0===u&&void 0===f&&s.customFormatTypes&&("quantitative"===n.type&&s.numberFormatType?d=Co({fieldOrDatumDef:n,field:"datum.value",format:s.numberFormat,formatType:s.numberFormatType,config:s}):"temporal"===n.type&&s.timeFormatType&&Zo(n)&&void 0===n.timeUnit&&(d=Co({fieldOrDatumDef:n,field:"datum.value",format:s.timeFormat,formatType:s.timeFormatType,config:s})));const m={...c?{opacity:c}:{},...d?{text:d}:{},...e};return S(m)?void 0:m},entries:function(e,t){let{legendCmpt:n}=t;const i=n.get("selections");return i?.length?{...e,fill:{value:"transparent"}}:e}};function Zf(e){return td(e,((e,t)=>Math.max(e,t.value)))}function ed(e){return td(e,((e,t)=>U(e,t.value)))}function td(e,n){return function(e){const n=e?.condition;return!!n&&(t.isArray(n)||sa(n))}(e)?t.array(e.condition).reduce(n,e.value):sa(e)?e.value:void 0}function nd(e,n,i){const r=n.get("selections");if(!r?.length)return;const o=t.stringValue(i.field);return r.map((e=>`(!length(data(${t.stringValue(C(e)+Ju)})) || (${e}[${o}] && indexof(${e}[${o}], datum.value) >= 0))`)).join(" || ")}const id={direction:e=>{let{direction:t}=e;return t},format:e=>{let{fieldOrDatumDef:t,legend:n,config:i}=e;const{format:r,formatType:o}=n;return _o(t,t.type,r,o,i,!1)},formatType:e=>{let{legend:t,fieldOrDatumDef:n,scaleType:i}=e;const{formatType:r}=t;return Po(r,n,i)},gradientLength:e=>{const{legend:t,legendConfig:n}=e;return t.gradientLength??n.gradientLength??function(e){let{legendConfig:t,model:n,direction:i,orient:r,scaleType:o}=e;const{gradientHorizontalMaxLength:a,gradientHorizontalMinLength:s,gradientVerticalMaxLength:l,gradientVerticalMinLength:c}=t;if(Dr(o))return"horizontal"===i?"top"===r||"bottom"===r?ad(n,"width",s,a):s:ad(n,"height",c,l);return}(e)},labelOverlap:e=>{let{legend:t,legendConfig:n,scaleType:i}=e;return t.labelOverlap??n.labelOverlap??function(e){if(p(["quantile","threshold","log","symlog"],e))return"greedy";return}(i)},symbolType:e=>{let{legend:t,markDef:n,channel:i,encoding:r}=e;return t.symbolType??function(e,t,n,i){if("shape"!==t){const e=ed(n)??i;if(e)return e}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}(n.type,i,r.shape,n.shape)},title:e=>{let{fieldOrDatumDef:t,config:n}=e;return va(t,n,{allowDisabling:!0})},type:e=>{let{legendType:t,scaleType:n,channel:i}=e;if(We(i)&&Dr(n)){if("gradient"===t)return}else if("symbol"===t)return;return t},values:e=>{let{fieldOrDatumDef:n,legend:i}=e;return function(e,n){const i=e.values;if(t.isArray(i))return Pa(n,i);if(wn(i))return i;return}(i,n)}};function rd(e){const{legend:t}=e;return U(t.type,function(e){let{channel:t,timeUnit:n,scaleType:i}=e;if(We(t)){if(p(["quarter","month","day"],n))return"symbol";if(Dr(i))return"gradient"}return"symbol"}(e))}function od(e){let{legendConfig:t,legendType:n,orient:i,legend:r}=e;return r.direction??t[n?"gradientDirection":"symbolDirection"]??function(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===t?"horizontal":void 0}}(i,n)}function ad(e,t,n,i){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${n}, ${i})`}}function sd(e){const t=qm(e)?function(e){const{encoding:t}=e,n={};for(const i of[he,...Os]){const r=ka(t[i]);r&&e.getScaleComponent(i)&&(i===be&&Zo(r)&&r.type===fr||(n[i]=cd(e,i)))}return n}(e):function(e){const{legends:t,resolve:n}=e.component;for(const i of e.children){sd(i);for(const r of D(i.component.legends))n.legend[r]=Xf(e.component.resolve,r),"shared"===n.legend[r]&&(t[r]=ud(t[r],i.component.legends[r]),t[r]||(n.legend[r]="independent",delete t[r]))}for(const i of D(t))for(const t of e.children)t.component.legends[i]&&"shared"===n.legend[i]&&delete t.component.legends[i];return t}(e);return e.component.legends=t,t}function ld(e,t,n,i){switch(t){case"disable":return void 0!==n;case"values":return!!n?.values;case"title":if("title"===t&&e===i?.title)return!0}return e===(n||{})[t]}function cd(e,t){let n=e.legend(t);const{markDef:i,encoding:r,config:o}=e,a=o.legend,s=new Jf({},function(e,t){const n=e.scaleName(t);if("trail"===e.mark){if("color"===t)return{stroke:n};if("size"===t)return{strokeWidth:n}}return"color"===t?e.markDef.filled?{fill:n}:{stroke:n}:{[t]:n}}(e,t));!function(e,t,n){const i=e.fieldDef(t)?.field;for(const r of F(e.component.selection??{})){const e=r.project.hasField[i]??r.project.hasChannel[t];if(e&&Wu.defined(r)){const t=n.get("selections")??[];t.push(r.name),n.set("selections",t,!1),e.hasLegend=!0}}}(e,t,s);const l=void 0!==n?!n:a.disable;if(s.set("disable",l,void 0!==n),l)return s;n=n||{};const c=e.getScaleComponent(t).get("type"),u=ka(r[t]),f=Zo(u)?Ii(u.timeUnit)?.unit:void 0,d=n.orient||o.legend.orient||"right",m=rd({legend:n,channel:t,timeUnit:f,scaleType:c}),p={legend:n,channel:t,model:e,markDef:i,encoding:r,fieldOrDatumDef:u,legendConfig:a,config:o,scaleType:c,orient:d,legendType:m,direction:od({legend:n,legendType:m,orient:d,legendConfig:a})};for(const i of Qf){if("gradient"===m&&i.startsWith("symbol")||"symbol"===m&&i.startsWith("gradient"))continue;const r=i in id?id[i](p):n[i];if(void 0!==r){const a=ld(r,i,n,e.fieldDef(t));(a||void 0===o.legend[i])&&s.set(i,r,a)}}const g=n?.encoding??{},h=s.get("selections"),y={},v={fieldOrDatumDef:u,model:e,channel:t,legendCmpt:s,legendType:m};for(const t of["labels","legend","title","symbols","gradient","entries"]){const n=Gf(g[t]??{},e),i=t in Kf?Kf[t](n,v):n;void 0===i||S(i)||(y[t]={...h?.length&&Zo(u)?{name:`${C(u.field)}_legend_${t}`}:{},...h?.length?{interactive:!!h}:{},update:i})}return S(y)||s.set("encode",y,!!n?.encoding),s}function ud(e,t){if(!e)return t.clone();const n=e.getWithExplicit("orient"),i=t.getWithExplicit("orient");if(n.explicit&&i.explicit&&n.value!==i.value)return;let r=!1;for(const n of Qf){const i=uc(e.getWithExplicit(n),t.getWithExplicit(n),n,"legend",((e,t)=>{switch(n){case"symbolType":return fd(e,t);case"title":return In(e,t);case"type":return r=!0,sc("symbol")}return cc(e,t,n,"legend")}));e.setWithExplicit(n,i)}return r&&(e.implicit?.encode?.gradient&&P(e.implicit,["encode","gradient"]),e.explicit?.encode?.gradient&&P(e.explicit,["encode","gradient"])),e}function fd(e,t){return"circle"===t.value?t:e}function dd(e){const t=e.component.legends,n={};for(const i of D(t)){const r=Q(e.getScaleComponent(i).get("domains"));if(n[r])for(const e of n[r]){ud(e,t[i])||n[r].push(t[i])}else n[r]=[t[i].clone()]}return F(n).flat().map((t=>function(e,t){const{disable:n,labelExpr:i,selections:r,...o}=e.combine();if(n)return;!1===t.aria&&null==o.aria&&(o.aria=!1);if(o.encode?.symbols){const e=o.encode.symbols.update;!e.fill||"transparent"===e.fill.value||e.stroke||o.stroke||(e.stroke={value:"transparent"});for(const t of Os)o[t]&&delete e[t]}o.title||delete o.title;if(void 0!==i){let e=i;o.encode?.labels?.update&&wn(o.encode.labels.update.text)&&(e=R(i,"datum.label",o.encode.labels.update.text.signal)),function(e,t,n,i){e.encode??={},e.encode[t]??={},e.encode[t].update??={},e.encode[t].update[n]=i}(o,"labels","text",{signal:e})}return o}(t,e.config))).filter((e=>void 0!==e))}function md(e){return Im(e)||Wm(e)?function(e){return e.children.reduce(((e,t)=>e.concat(t.assembleProjections())),pd(e))}(e):pd(e)}function pd(e){const t=e.component.projection;if(!t||t.merged)return[];const n=t.combine(),{name:i}=n;if(t.data){const r={signal:`[${t.size.map((e=>e.signal)).join(", ")}]`},o=t.data.reduce(((t,n)=>{const i=wn(n)?n.signal:`data('${e.lookupDataSource(n)}')`;return p(t,i)||t.push(i),t}),[]);if(o.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:i,size:r,fit:{signal:o.length>1?`[${o.join(", ")}]`:o[0]},...n}]}return[{name:i,translate:{signal:"[width / 2, height / 2]"},...n}]}const gd=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class hd extends oc{merged=!1;constructor(e,t,n,i){super({...t},{name:e}),this.specifiedProjection=t,this.size=n,this.data=i}get isFit(){return!!this.data}}function yd(e){e.component.projection=qm(e)?function(e){if(e.hasProjection){const t=bn(e.specifiedProjection),n=!(t&&(null!=t.scale||null!=t.translate)),i=n?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,r=n?function(e){const t=[],{encoding:n}=e;for(const i of[[de,fe],[pe,me]])(ka(n[i[0]])||ka(n[i[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});e.channelHasField(be)&&e.typedFieldDef(be).type===fr&&t.push({signal:e.getName(`geojson_${t.length}`)});0===t.length&&t.push(e.requestDataName(bc.Main));return t}(e):void 0,o=new hd(e.projectionName(!0),{...bn(e.config.projection),...t},i,r);return o.get("type")||o.set("type","equalEarth",!1),o}return}(e):function(e){if(0===e.children.length)return;let n;for(const t of e.children)yd(t);const i=h(e.children,(e=>{const i=e.component.projection;if(i){if(n){const e=function(e,n){const i=h(gd,(i=>!t.hasOwnProperty(e.explicit,i)&&!t.hasOwnProperty(n.explicit,i)||!!(t.hasOwnProperty(e.explicit,i)&&t.hasOwnProperty(n.explicit,i)&&X(e.get(i),n.get(i)))));if(X(e.size,n.size)){if(i)return e;if(X(e.explicit,{}))return n;if(X(n.explicit,{}))return e}return null}(n,i);return e&&(n=e),!!e}return n=i,!0}return!0}));if(n&&i){const t=e.projectionName(!0),i=new hd(t,n.specifiedProjection,n.size,l(n.data));for(const n of e.children){const e=n.component.projection;e&&(e.isFit&&i.data.push(...n.component.projection.data),n.renameProjection(e.get("name"),t),e.merged=!0)}return i}return}(e)}function vd(e,t,n,i){if(Na(t,n)){const r=qm(e)?e.axis(n)??e.legend(n)??{}:{},o=ma(t,{expr:"datum"}),a=ma(t,{expr:"datum",binSuffix:"end"});return{formulaAs:ma(t,{binSuffix:"range",forAs:!0}),formula:jo(o,a,r.format,r.formatType,i)}}return{}}function bd(e,t){return`${dn(e)}_${t}`}function xd(e,t,n){const i=bd(Oa(n,void 0)??{},t);return e.getName(`${i}_bins`)}function $d(e,n,i){let r,o;r=function(e){return"as"in e}(e)?t.isString(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:[ma(e,{forAs:!0}),ma(e,{binSuffix:"end",forAs:!0})];const a={...Oa(n,void 0)},s=bd(a,e.field),{signal:l,extentSignal:c}=function(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}(i,s);if(hn(a.extent)){const e=a.extent;o=df(i,e.param,e),delete a.extent}return{key:s,binComponent:{bin:a,field:e.field,as:[r],...l?{signal:l}:{},...c?{extentSignal:c}:{},...o?{span:o}:{}}}}class wd extends $c{clone(){return new wd(null,l(this.bins))}constructor(e,t){super(e),this.bins=t}static makeFromEncoding(e,t){const n=t.reduceFieldDef(((e,n,i)=>{if(aa(n)&&mn(n.bin)){const{key:r,binComponent:o}=$d(n,n.bin,t);e[r]={...o,...e[r],...vd(t,n,i,t.config)}}return e}),{});return S(n)?null:new wd(e,n)}static makeFromTransform(e,t,n){const{key:i,binComponent:r}=$d(t,t.bin,n);return new wd(e,{[i]:r})}merge(e,t){for(const n of D(e.bins))n in this.bins?(t(e.bins[n].signal,this.bins[n].signal),this.bins[n].as=b([...this.bins[n].as,...e.bins[n].as],d)):this.bins[n]=e.bins[n];for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}producedFields(){return new Set(F(this.bins).map((e=>e.as)).flat(2))}dependentFields(){return new Set(F(this.bins).map((e=>e.field)))}hash(){return`Bin ${d(this.bins)}`}assemble(){return F(this.bins).flatMap((e=>{const t=[],[n,...i]=e.as,{extent:r,...o}=e.bin,a={type:"bin",field:M(e.field),as:n,signal:e.signal,...hn(r)?{extent:null}:{extent:r},...e.span?{span:{signal:`span(${e.span})`}}:{},...o};!r&&e.extentSignal&&(t.push({type:"extent",field:M(e.field),signal:e.extentSignal}),a.extent={signal:e.extentSignal}),t.push(a);for(const e of i)for(let i=0;i<2;i++)t.push({type:"formula",expr:ma({field:n[i]},{expr:"datum"}),as:e[i]});return e.formula&&t.push({type:"formula",expr:e.formula,as:e.formulaAs}),t}))}}function kd(e,n,i,r){const o=qm(r)?r.encoding[at(n)]:void 0;if(aa(i)&&qm(r)&&Yo(i,o,r.markDef,r.config)){e.add(ma(i,{})),e.add(ma(i,{suffix:"end"}));const{mark:t,markDef:o,config:a}=r,s=Ho({fieldDef:i,markDef:o,config:a});eo(t)&&.5!==s&&_t(n)&&(e.add(ma(i,{suffix:Fc})),e.add(ma(i,{suffix:Oc}))),i.bin&&Na(i,n)&&e.add(ma(i,{binSuffix:"range"}))}else if(Le(n)){const t=Re(n);e.add(r.getName(t))}else e.add(ma(i));return la(i)&&function(e){return t.isObject(e)&&"field"in e}(i.scale?.range)&&e.add(i.scale.range.field),e}class Sd extends $c{clone(){return new Sd(null,new Set(this.dimensions),l(this.measures))}constructor(e,t,n){super(e),this.dimensions=t,this.measures=n}get groupBy(){return this.dimensions}static makeFromEncoding(e,t){let n=!1;t.forEachFieldDef((e=>{e.aggregate&&(n=!0)}));const i={},r=new Set;return n?(t.forEachFieldDef(((e,n)=>{const{aggregate:o,field:a}=e;if(o)if("count"===o)i["*"]??={},i["*"].count=new Set([ma(e,{forAs:!0})]);else{if(on(o)||an(o)){const e=on(o)?"argmin":"argmax",t=o[e];i[t]??={},i[t][e]=new Set([ma({op:e,field:t},{forAs:!0})])}else i[a]??={},i[a][o]=new Set([ma(e,{forAs:!0})]);Qt(n)&&"unaggregated"===t.scaleDomain(n)&&(i[a]??={},i[a].min=new Set([ma({field:a,aggregate:"min"},{forAs:!0})]),i[a].max=new Set([ma({field:a,aggregate:"max"},{forAs:!0})]))}else kd(r,n,e,t)})),r.size+D(i).length===0?null:new Sd(e,r,i)):null}static makeFromTransform(e,t){const n=new Set,i={};for(const e of t.aggregate){const{op:t,field:n,as:r}=e;t&&("count"===t?(i["*"]??={},i["*"].count=new Set([r||ma(e,{forAs:!0})])):(i[n]??={},i[n][t]??=new Set,i[n][t].add(r||ma(e,{forAs:!0}))))}for(const e of t.groupby??[])n.add(e);return n.size+D(i).length===0?null:new Sd(e,n,i)}merge(e){return x(this.dimensions,e.dimensions)?(function(e,t){for(const n of D(t)){const i=t[n];for(const t of D(i))n in e?e[n][t]=new Set([...e[n][t]??[],...i[t]]):e[n]={[t]:i[t]}}}(this.measures,e.measures),!0):(function(){wi.debug(...arguments)}("different dimensions, cannot merge"),!1)}addDimensions(e){e.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...D(this.measures)])}producedFields(){const e=new Set;for(const t of D(this.measures))for(const n of D(this.measures[t])){const i=this.measures[t][n];0===i.size?e.add(`${n}_${t}`):i.forEach(e.add,e)}return e}hash(){return`Aggregate ${d({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const e=[],t=[],n=[];for(const i of D(this.measures))for(const r of D(this.measures[i]))for(const o of this.measures[i][r])n.push(o),e.push(r),t.push("*"===i?null:M(i));return{type:"aggregate",groupby:[...this.dimensions].map(M),ops:e,fields:t,as:n}}}class Dd extends $c{constructor(e,n,i,r){super(e),this.model=n,this.name=i,this.data=r;for(const e of Be){const i=n.facet[e];if(i){const{bin:r,sort:o}=i;this[e]={name:n.getName(`${e}_domain`),fields:[ma(i),...mn(r)?[ma(i,{binSuffix:"end"})]:[]],...Lo(o)?{sortField:o}:t.isArray(o)?{sortIndexField:Ff(i,e)}:{}}}}this.childModel=n.child}hash(){let e="Facet";for(const t of Be)this[t]&&(e+=` ${t.charAt(0)}:${d(this[t])}`);return e}get fields(){const e=[];for(const t of Be)this[t]?.fields&&e.push(...this[t].fields);return e}dependentFields(){const e=new Set(this.fields);for(const t of Be)this[t]&&(this[t].sortField&&e.add(this[t].sortField.field),this[t].sortIndexField&&e.add(this[t].sortIndexField));return e}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const e={};for(const t of Ct){const n=this.childModel.component.scales[t];if(n&&!n.merged){const i=n.get("type"),r=n.get("range");if(kr(i)&&kn(r)){const n=ym(vm(this.childModel,t));n?e[t]=n:Si(Xn(t))}}}return e}assembleRowColumnHeaderData(e,t,n){const i={row:"y",column:"x",facet:void 0}[e],r=[],o=[],a=[];i&&n&&n[i]&&(t?(r.push(`distinct_${n[i]}`),o.push("max")):(r.push(n[i]),o.push("distinct")),a.push(`distinct_${n[i]}`));const{sortField:s,sortIndexField:l}=this[e];if(s){const{op:e=Eo,field:t}=s;r.push(t),o.push(e),a.push(ma(s,{forAs:!0}))}else l&&(r.push(l),o.push("max"),a.push(l));return{name:this[e].name,source:t??this.data,transform:[{type:"aggregate",groupby:this[e].fields,...r.length?{fields:r,ops:o,as:a}:{}}]}}assembleFacetHeaderData(e){const{columns:t}=this.model.layout,{layoutHeaders:n}=this.model.component,i=[],r={};for(const e of _f){for(const t of Pf){const i=(n[e]&&n[e][t])??[];for(const t of i)if(t.axes?.length>0){r[e]=!0;break}}if(r[e]){const n=`length(data("${this.facet.name}"))`,r="row"===e?t?{signal:`ceil(${n} / ${t})`}:1:t?{signal:`min(${n}, ${t})`}:{signal:n};i.push({name:`${this.facet.name}_${e}`,transform:[{type:"sequence",start:0,stop:r}]})}}const{row:o,column:a}=r;return(o||a)&&i.unshift(this.assembleRowColumnHeaderData("facet",null,e)),i}assemble(){const e=[];let t=null;const n=this.getChildIndependentFieldsWithStep(),{column:i,row:r,facet:o}=this;if(i&&r&&(n.x||n.y)){t=`cross_${this.column.name}_${this.row.name}`;const i=[].concat(n.x??[],n.y??[]),r=i.map((()=>"distinct"));e.push({name:t,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:i,ops:r}]})}for(const i of[Z,K])this[i]&&e.push(this.assembleRowColumnHeaderData(i,t,n));if(o){const t=this.assembleFacetHeaderData(n);t&&e.push(...t)}return e}}function Fd(e){return e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function Od(e){const n={};return a(e.filter,(e=>{if(er(e)){let i=null;Gi(e)?i=Cn(e.equal):Xi(e)?i=Cn(e.lte):Yi(e)?i=Cn(e.lt):Qi(e)?i=Cn(e.gt):Ji(e)?i=Cn(e.gte):Ki(e)?i=e.range[0]:Zi(e)&&(i=(e.oneOf??e.in)[0]),i&&(Di(i)?n[e.field]="date":t.isNumber(i)?n[e.field]="number":t.isString(i)&&(n[e.field]="string")),e.timeUnit&&(n[e.field]="date")}})),n}function zd(e){const n={};function i(e){var i;Ca(e)?n[e.field]="date":"quantitative"===e.type&&(i=e.aggregate,t.isString(i)&&p(["min","max"],i))?n[e.field]="number":q(e.field)>1?e.field in n||(n[e.field]="flatten"):la(e)&&Lo(e.sort)&&q(e.sort.field)>1&&(e.sort.field in n||(n[e.sort.field]="flatten"))}if((qm(e)||Um(e))&&e.forEachFieldDef(((t,n)=>{if(aa(t))i(t);else{const r=rt(n),o=e.fieldDef(r);i({...t,type:o.type})}})),qm(e)){const{mark:t,markDef:i,encoding:r}=e;if(Zr(t)&&!e.encoding.order){const e=r["horizontal"===i.orient?"y":"x"];Zo(e)&&"quantitative"===e.type&&!(e.field in n)&&(n[e.field]="number")}}return n}class Cd extends $c{clone(){return new Cd(null,l(this._parse))}constructor(e,t){super(e),this._parse=t}hash(){return`Parse ${d(this._parse)}`}static makeExplicit(e,t,n){let i={};const r=t.data;return!gc(r)&&r?.format?.parse&&(i=r.format.parse),this.makeWithAncestors(e,i,{},n)}static makeWithAncestors(e,t,n,i){for(const e of D(n)){const t=i.getWithExplicit(e);void 0!==t.value&&(t.explicit||t.value===n[e]||"derived"===t.value||"flatten"===n[e]?delete n[e]:Si(ni(e,n[e],t.value)))}for(const e of D(t)){const n=i.get(e);void 0!==n&&(n===t[e]?delete t[e]:Si(ni(e,t[e],n)))}const r=new oc(t,n);i.copyAll(r);const o={};for(const e of D(r.combine())){const t=r.get(e);null!==t&&(o[e]=t)}return 0===D(o).length||i.parseNothing?null:new Cd(e,o)}get parse(){return this._parse}merge(e){this._parse={...this._parse,...e.parse},e.remove()}assembleFormatParse(){const e={};for(const t of D(this._parse)){const n=this._parse[t];1===q(t)&&(e[t]=n)}return e}producedFields(){return new Set(D(this._parse))}dependentFields(){return new Set(D(this._parse))}assembleTransforms(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return D(this._parse).filter((t=>!e||q(t)>1)).map((e=>{const t=function(e,t){const n=A(e);if("number"===t)return`toNumber(${n})`;if("boolean"===t)return`toBoolean(${n})`;if("string"===t)return`toString(${n})`;if("date"===t)return`toDate(${n})`;if("flatten"===t)return n;if(t.startsWith("date:"))return`timeParse(${n},'${Fd(t.slice(5,t.length))}')`;if(t.startsWith("utc:"))return`utcParse(${n},'${Fd(t.slice(4,t.length))}')`;return Si(`Unrecognized parse "${t}".`),null}(e,this._parse[e]);if(!t)return null;return{type:"formula",expr:t,as:L(e)}})).filter((e=>null!==e))}}class _d extends $c{clone(){return new _d(null)}constructor(e){super(e)}dependentFields(){return new Set}producedFields(){return new Set([zs])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:zs}}}class Pd extends $c{clone(){return new Pd(null,this.params)}constructor(e,t){super(e),this.params=t}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${d(this.params)}`}assemble(){return{type:"graticule",...!0===this.params?{}:this.params}}}class Nd extends $c{clone(){return new Nd(null,this.params)}constructor(e,t){super(e),this.params=t}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${d(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class Ad extends $c{constructor(e){let t;if(super(null),e??={name:"source"},gc(e)||(t=e.format?{...f(e.format,["parse"])}:{}),mc(e))this._data={values:e.values};else if(dc(e)){if(this._data={url:e.url},!t.type){let n=/(?:\.([^.]+))?$/.exec(e.url)[1];p(["json","csv","tsv","dsv","topojson"],n)||(n="json"),t.type=n}}else yc(e)?this._data={values:[{type:"Sphere"}]}:(pc(e)||gc(e))&&(this._data={});this._generator=gc(e),e.name&&(this._name=e.name),t&&!S(t)&&(this._data.format=t)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(e){this._name=e}set parent(e){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return{name:this._name,...this._data,transform:[]}}}function Td(e){return e instanceof Ad||e instanceof Pd||e instanceof Nd}class jd{#e;constructor(){this.#e=!1}setModified(){this.#e=!0}get modifiedFlag(){return this.#e}}class Ed extends jd{getNodeDepths(e,t,n){n.set(e,t);for(const i of e.children)this.getNodeDepths(i,t+1,n);return n}optimize(e){const t=[...this.getNodeDepths(e,0,new Map).entries()].sort(((e,t)=>t[1]-e[1]));for(const e of t)this.run(e[0]);return this.modifiedFlag}}class Md extends jd{optimize(e){this.run(e);for(const t of e.children)this.optimize(t);return this.modifiedFlag}}class Rd extends Md{mergeNodes(e,t){const n=t.shift();for(const i of t)e.removeChild(i),i.parent=n,i.remove()}run(e){const t=e.children.map((e=>e.hash())),n={};for(let i=0;i1&&(this.setModified(),this.mergeNodes(e,n[t]))}}class Ld extends Md{constructor(e){super(),this.requiresSelectionId=e&&rf(e)}run(e){e instanceof _d&&(this.requiresSelectionId&&(Td(e.parent)||e.parent instanceof Sd||e.parent instanceof Cd)||(this.setModified(),e.remove()))}}class qd extends jd{optimize(e){return this.run(e,new Set),this.modifiedFlag}run(e,t){let n=new Set;e instanceof Dc&&(n=e.producedFields(),$(n,t)&&(this.setModified(),e.removeFormulas(t),0===e.producedFields.length&&e.remove()));for(const i of e.children)this.run(i,new Set([...t,...n]))}}class Ud extends Md{constructor(){super()}run(e){e instanceof wc&&!e.isRequired()&&(this.setModified(),e.remove())}}class Wd extends Ed{run(e){if(!(Td(e)||e.numChildren()>1))for(const t of e.children)if(t instanceof Cd)if(e instanceof Cd)this.setModified(),e.merge(t);else{if(k(e.producedFields(),t.dependentFields()))continue;this.setModified(),t.swapWithParent()}}}class Id extends Ed{run(e){const t=[...e.children],n=e.children.filter((e=>e instanceof Cd));if(e.numChildren()>1&&n.length>=1){const i={},r=new Set;for(const e of n){const t=e.parse;for(const e of D(t))e in i?i[e]!==t[e]&&r.add(e):i[e]=t[e]}for(const e of r)delete i[e];if(!S(i)){this.setModified();const n=new Cd(e,i);for(const r of t){if(r instanceof Cd)for(const e of D(i))delete r.parse[e];e.removeChild(r),r.parent=n,r instanceof Cd&&0===D(r.parse).length&&r.remove()}}}}}class Bd extends Ed{run(e){e instanceof wc||e.numChildren()>0||e instanceof Dd||e instanceof Ad||(this.setModified(),e.remove())}}class Vd extends Ed{run(e){const t=e.children.filter((e=>e instanceof Dc)),n=t.pop();for(const e of t)this.setModified(),n.merge(e)}}class Hd extends Ed{run(e){const t=e.children.filter((e=>e instanceof Sd)),n={};for(const e of t){const t=d(e.groupBy);t in n||(n[t]=[]),n[t].push(e)}for(const t of D(n)){const i=n[t];if(i.length>1){const t=i.pop();for(const n of i)t.merge(n)&&(e.removeChild(n),n.parent=t,n.remove(),this.setModified())}}}}class Gd extends Ed{constructor(e){super(),this.model=e}run(e){const t=!(Td(e)||e instanceof uf||e instanceof Cd||e instanceof _d),n=[],i=[];for(const r of e.children)r instanceof wd&&(t&&!k(e.producedFields(),r.dependentFields())?n.push(r):i.push(r));if(n.length>0){const t=n.pop();for(const e of n)t.merge(e,this.model.renameSignal.bind(this.model));this.setModified(),e instanceof wd?e.merge(t,this.model.renameSignal.bind(this.model)):t.swapWithParent()}if(i.length>1){const e=i.pop();for(const t of i)e.merge(t,this.model.renameSignal.bind(this.model));this.setModified()}}}class Yd extends Ed{run(e){const t=[...e.children];if(!g(t,(e=>e instanceof wc))||e.numChildren()<=1)return;const n=[];let i;for(const r of t)if(r instanceof wc){let t=r;for(;1===t.numChildren();){const[e]=t.children;if(!(e instanceof wc))break;t=e}n.push(...t.children),i?(e.removeChild(r),r.parent=i.parent,i.parent.removeChild(i),i.parent=t,this.setModified()):i=t}else n.push(r);if(n.length){this.setModified();for(const e of n)e.parent.removeChild(e),e.parent=i}}}class Xd extends $c{clone(){return new Xd(null,l(this.transform))}constructor(e,t){super(e),this.transform=t}addDimensions(e){this.transform.groupby=b(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return this.transform.groupby&&this.transform.groupby.forEach(e.add,e),this.transform.joinaggregate.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(e){return e.as??ma(e)}hash(){return`JoinAggregateTransform ${d(this.transform)}`}assemble(){const e=[],t=[],n=[];for(const i of this.transform.joinaggregate)t.push(i.op),n.push(this.getDefaultName(i)),e.push(void 0===i.field?null:i.field);const i=this.transform.groupby;return{type:"joinaggregate",as:n,ops:t,fields:e,...void 0!==i?{groupby:i}:{}}}}class Qd extends $c{clone(){return new Qd(null,{...this.filter})}constructor(e,t){super(e),this.filter=t}static make(e,t,n){const{config:i,markDef:r}=t,{marks:o,scales:a}=n;if("include-invalid-values"===o&&"include-invalid-values"===a)return null;const s=t.reduceFieldDef(((e,n,o)=>{const a=Qt(o)&&t.getScaleComponent(o);if(a){const t=a.get("type"),{aggregate:s}=n,l=go({scaleChannel:o,markDef:r,config:i,scaleType:t,isCountAggregate:cn(s)});"show"!==l&&"always-valid"!==l&&(e[n.field]=n)}return e}),{});return D(s).length?new Qd(e,s):null}dependentFields(){return new Set(D(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${d(this.filter)}`}assemble(){const e=D(this.filter).reduce(((e,t)=>{const n=this.filter[t],i=ma(n,{expr:"datum"});return null!==n&&("temporal"===n.type?e.push(`(isDate(${i}) || (${Jd(i)}))`):"quantitative"===n.type&&e.push(Jd(i))),e}),[]);return e.length>0?{type:"filter",expr:e.join(" && ")}:null}}function Jd(e){return`isValid(${e}) && isFinite(+${e})`}class Kd extends $c{clone(){return new Kd(null,l(this._stack))}constructor(e,t){super(e),this._stack=t}static makeFromTransform(e,n){const{stack:i,groupby:r,as:o,offset:a="zero"}=n,s=[],l=[];if(void 0!==n.sort)for(const e of n.sort)s.push(e.field),l.push(U(e.order,"ascending"));const c={field:s,order:l};let u;return u=function(e){return t.isArray(e)&&e.every((e=>t.isString(e)))&&e.length>1}(o)?o:t.isString(o)?[o,`${o}_end`]:[`${n.stack}_start`,`${n.stack}_end`],new Kd(e,{dimensionFieldDefs:[],stackField:i,groupby:r,offset:a,sort:c,facetby:[],as:u})}static makeFromEncoding(e,n){const i=n.stack,{encoding:r}=n;if(!i)return null;const{groupbyChannels:o,fieldChannel:a,offset:s,impute:l}=i,c=o.map((e=>wa(r[e]))).filter((e=>!!e)),u=function(e){return e.stack.stackBy.reduce(((e,t)=>{const n=ma(t.fieldDef);return n&&e.push(n),e}),[])}(n),f=n.encoding.order;let d;if(t.isArray(f)||Zo(f))d=qn(f);else{const e=Xo(f)?f.sort:"y"===a?"descending":"ascending";d=u.reduce(((t,n)=>(t.field.includes(n)||(t.field.push(n),t.order.push(e)),t)),{field:[],order:[]})}return new Kd(e,{dimensionFieldDefs:c,stackField:n.vgField(a),facetby:[],stackby:u,sort:d,offset:s,impute:l,as:[n.vgField(a,{suffix:"start",forAs:!0}),n.vgField(a,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(e){this._stack.facetby.push(...e)}dependentFields(){const e=new Set;return e.add(this._stack.stackField),this.getGroupbyFields().forEach(e.add,e),this._stack.facetby.forEach(e.add,e),this._stack.sort.field.forEach(e.add,e),e}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${d(this._stack)}`}getGroupbyFields(){const{dimensionFieldDefs:e,impute:t,groupby:n}=this._stack;return e.length>0?e.map((e=>e.bin?t?[ma(e,{binSuffix:"mid"})]:[ma(e,{}),ma(e,{binSuffix:"end"})]:[ma(e)])).flat():n??[]}assemble(){const e=[],{facetby:t,dimensionFieldDefs:n,stackField:i,stackby:r,sort:o,offset:a,impute:s,as:l}=this._stack;if(s)for(const o of n){const{bandPosition:n=.5,bin:a}=o;if(a){const t=ma(o,{expr:"datum"}),i=ma(o,{expr:"datum",binSuffix:"end"});e.push({type:"formula",expr:`${Jd(t)} ? ${n}*${t}+${1-n}*${i} : ${t}`,as:ma(o,{binSuffix:"mid",forAs:!0})})}e.push({type:"impute",field:i,groupby:[...r,...t],key:ma(o,{binSuffix:"mid"}),method:"value",value:0})}return e.push({type:"stack",groupby:[...this.getGroupbyFields(),...t],field:i,sort:o,as:l,offset:a}),e}}class Zd extends $c{clone(){return new Zd(null,l(this.transform))}constructor(e,t){super(e),this.transform=t}addDimensions(e){this.transform.groupby=b(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return(this.transform.groupby??[]).forEach(e.add,e),(this.transform.sort??[]).forEach((t=>e.add(t.field))),this.transform.window.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(e){return e.as??ma(e)}hash(){return`WindowTransform ${d(this.transform)}`}assemble(){const e=[],t=[],n=[],i=[];for(const r of this.transform.window)t.push(r.op),n.push(this.getDefaultName(r)),i.push(void 0===r.param?null:r.param),e.push(void 0===r.field?null:r.field);const r=this.transform.frame,o=this.transform.groupby;if(r&&null===r[0]&&null===r[1]&&t.every((e=>sn(e))))return{type:"joinaggregate",as:n,ops:t,fields:e,...void 0!==o?{groupby:o}:{}};const a=[],s=[];if(void 0!==this.transform.sort)for(const e of this.transform.sort)a.push(e.field),s.push(e.order??"ascending");const l={field:a,order:s},c=this.transform.ignorePeers;return{type:"window",params:i,as:n,ops:t,fields:e,sort:l,...void 0!==c?{ignorePeers:c}:{},...void 0!==o?{groupby:o}:{},...void 0!==r?{frame:r}:{}}}}function em(e){if(e instanceof Dd)if(1!==e.numChildren()||e.children[0]instanceof wc){const n=e.model.component.data.main;tm(n);const i=(t=e,function e(n){if(!(n instanceof Dd)){const i=n.clone();if(i instanceof wc){const e=nm+i.getSource();i.setSource(e),t.model.component.data.outputNodes[e]=i}else(i instanceof Sd||i instanceof Kd||i instanceof Zd||i instanceof Xd)&&i.addDimensions(t.fields);for(const t of n.children.flatMap(e))t.parent=i;return[i]}return n.children.flatMap(e)}),r=e.children.map(i).flat();for(const e of r)e.parent=n}else{const t=e.children[0];(t instanceof Sd||t instanceof Kd||t instanceof Zd||t instanceof Xd)&&t.addDimensions(e.fields),t.swapWithParent(),em(e)}else e.children.map(em);var t}function tm(e){if(e instanceof wc&&e.type===bc.Main&&1===e.numChildren()){const t=e.children[0];t instanceof Dd||(t.swapWithParent(),tm(e))}}const nm="scale_",im=5;function rm(e){for(const t of e){for(const e of t.children)if(e.parent!==t)return!1;if(!rm(t.children))return!1}return!0}function om(e,t){let n=!1;for(const i of t)n=e.optimize(i)||n;return n}function am(e,t,n){let i=e.sources,r=!1;return r=om(new Ud,i)||r,r=om(new Ld(t),i)||r,i=i.filter((e=>e.numChildren()>0)),r=om(new Bd,i)||r,i=i.filter((e=>e.numChildren()>0)),n||(r=om(new Wd,i)||r,r=om(new Gd(t),i)||r,r=om(new qd,i)||r,r=om(new Id,i)||r,r=om(new Hd,i)||r,r=om(new Vd,i)||r,r=om(new Rd,i)||r,r=om(new Yd,i)||r),e.sources=i,r}class sm{constructor(e){Object.defineProperty(this,"signal",{enumerable:!0,get:e})}static fromName(e,t){return new sm((()=>e(t)))}}function lm(e){qm(e)?function(e){const t=e.component.scales;for(const n of D(t)){const i=cm(e,n);if(t[n].setWithExplicit("domains",i),mm(e,n),e.component.data.isFaceted){let t=e;for(;!Um(t)&&t.parent;)t=t.parent;if("shared"===t.component.resolve.scale[n])for(const e of i.value)Sn(e)&&(e.data=nm+e.data.replace(nm,""))}}}(e):function(e){for(const t of e.children)lm(t);const t=e.component.scales;for(const n of D(t)){let i,r=null;for(const t of e.children){const e=t.component.scales[n];if(e){i=void 0===i?e.getWithExplicit("domains"):uc(i,e.getWithExplicit("domains"),"domains","scale",gm);const t=e.get("selectionExtent");r&&t&&r.param!==t.param&&Si(Zn),r=t}}t[n].setWithExplicit("domains",i),r&&t[n].set("selectionExtent",r,!0)}}(e)}function cm(e,t){const n=e.getScaleComponent(t).get("type"),{encoding:i}=e,r=function(e,t,n,i){if("unaggregated"===e){const{valid:e,reason:i}=pm(t,n);if(!e)return void Si(i)}else if(void 0===e&&i.useUnaggregatedDomain){const{valid:e}=pm(t,n);if(e)return"unaggregated"}return e}(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return r!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:r}),"x"===t&&ka(i.x2)?ka(i.x)?uc(fm(n,r,e,"x"),fm(n,r,e,"x2"),"domain","scale",gm):fm(n,r,e,"x2"):"y"===t&&ka(i.y2)?ka(i.y)?uc(fm(n,r,e,"y"),fm(n,r,e,"y2"),"domain","scale",gm):fm(n,r,e,"y2"):fm(n,r,e,t)}function um(e,t,n){const i=Ii(n)?.unit;return"temporal"===t||i?function(e,t,n){return e.map((e=>({signal:`{data: ${_a(e,{timeUnit:n,type:t})}}`})))}(e,t,i):[e]}function fm(e,n,i,r){const{encoding:o,markDef:a,mark:s,config:l,stack:c}=i,u=ka(o[r]),{type:f}=u,d=u.timeUnit,m=function(e){const{marks:t,scales:n}=xc(e);return t===n?bc.Main:"include-invalid-values"===n?bc.PreFilterInvalid:bc.PostFilterInvalid}({invalid:Mn("invalid",a,l),isPath:Zr(s)});if(function(e){return J(e,"unionWith")}(n)){const t=fm(e,void 0,i,r);return ac([...um(n.unionWith,f,d),...t.value])}if(wn(n))return ac([n]);if(n&&"unaggregated"!==n&&!Or(n))return ac(um(n,f,d));if(c&&r===c.fieldChannel){if("normalize"===c.offset)return sc([[0,1]]);const e=i.requestDataName(m);return sc([{data:e,field:i.vgField(r,{suffix:"start"})},{data:e,field:i.vgField(r,{suffix:"end"})}])}const g=Qt(r)&&Zo(u)?function(e,t,n){if(!kr(n))return;const i=e.fieldDef(t),r=i.sort;if(qo(r))return{op:"min",field:Ff(i,t),order:"ascending"};const{stack:o}=e,a=o?new Set([...o.groupbyFields,...o.stackBy.map((e=>e.fieldDef.field))]):void 0;if(Lo(r)){return dm(r,o&&!a.has(r.field))}if(function(e){return J(e,"encoding")}(r)){const{encoding:t,order:n}=r,i=e.fieldDef(t),{aggregate:s,field:l}=i,c=o&&!a.has(l);if(on(s)||an(s))return dm({field:ma(i),order:n},c);if(sn(s)||!s)return dm({op:s,field:l,order:n},c)}else{if("descending"===r)return{op:"min",field:e.vgField(t),order:"descending"};if(p(["ascending",void 0],r))return!0}return}(i,r,e):void 0;if(ta(u)){return sc(um([u.datum],f,d))}const h=u;if("unaggregated"===n){const{field:e}=u;return sc([{data:i.requestDataName(m),field:ma({field:e,aggregate:"min"})},{data:i.requestDataName(m),field:ma({field:e,aggregate:"max"})}])}if(mn(h.bin)){if(kr(e))return sc("bin-ordinal"===e?[]:[{data:z(g)?i.requestDataName(m):i.requestDataName(bc.Raw),field:i.vgField(r,Na(h,r)?{binSuffix:"range"}:{}),sort:!0!==g&&t.isObject(g)?g:{field:i.vgField(r,{}),op:"min"}}]);{const{bin:e}=h;if(mn(e)){const t=xd(i,h.field,e);return sc([new sm((()=>{const e=i.getSignalName(t);return`[${e}.start, ${e}.stop]`}))])}return sc([{data:i.requestDataName(m),field:i.vgField(r,{})}])}}if(h.timeUnit&&p(["time","utc"],e)){const e=o[at(r)];if(Yo(h,e,a,l)){const t=i.requestDataName(m),n=Ho({fieldDef:h,fieldDef2:e,markDef:a,config:l}),o=eo(s)&&.5!==n&&_t(r);return sc([{data:t,field:i.vgField(r,o?{suffix:Fc}:{})},{data:t,field:i.vgField(r,{suffix:o?Oc:"end"})}])}}return sc(g?[{data:z(g)?i.requestDataName(m):i.requestDataName(bc.Raw),field:i.vgField(r),sort:g}]:[{data:i.requestDataName(m),field:i.vgField(r)}])}function dm(e,t){const{op:n,field:i,order:r}=e;return{op:n??(t?"sum":Eo),...i?{field:M(i)}:{},...r?{order:r}:{}}}function mm(e,t){const n=e.component.scales[t],i=e.specifiedScales[t].domain,r=e.fieldDef(t)?.bin,o=Or(i)?i:void 0,a=gn(r)&&hn(r.extent)?r.extent:void 0;(o||a)&&n.set("selectionExtent",o??a,!0)}function pm(e,n){const{aggregate:i,type:r}=e;return i?t.isString(i)&&!fn.has(i)?{valid:!1,reason:mi(i)}:"quantitative"===r&&"log"===n?{valid:!1,reason:pi(e)}:{valid:!0}:{valid:!1,reason:di(e)}}function gm(e,t,n,i){return e.explicit&&t.explicit&&Si(function(e,t,n,i){return`Conflicting ${t.toString()} property "${e.toString()}" (${Q(n)} and ${Q(i)}). Using the union of the two domains.`}(n,i,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function hm(e){const n=b(e.map((e=>{if(Sn(e)){const{sort:t,...n}=e;return n}return e})),d),i=b(e.map((e=>{if(Sn(e)){const t=e.sort;return void 0===t||z(t)||("op"in t&&"count"===t.op&&delete t.field,"ascending"===t.order&&delete t.order),t}})).filter((e=>void 0!==e)),d);if(0===n.length)return;if(1===n.length){const n=e[0];if(Sn(n)&&i.length>0){let e=i[0];if(i.length>1){Si(yi);const n=i.filter((e=>t.isObject(e)&&"op"in e&&"min"!==e.op));e=!i.every((e=>t.isObject(e)&&"op"in e))||1!==n.length||n[0]}else if(t.isObject(e)&&"field"in e){const t=e.field;n.field===t&&(e=!e.order||{order:e.order})}return{...n,sort:e}}return n}const r=b(i.map((e=>z(e)||!("op"in e)||t.isString(e.op)&&t.hasOwnProperty(rn,e.op)?e:(Si(function(e){return`Dropping sort property ${Q(e)} as unioned domains only support boolean or op "count", "min", and "max".`}(e)),!0))),d);let o;1===r.length?o=r[0]:r.length>1&&(Si(yi),o=!0);const a=b(e.map((e=>Sn(e)?e.data:null)),(e=>e));if(1===a.length&&null!==a[0]){return{data:a[0],fields:n.map((e=>e.field)),...o?{sort:o}:{}}}return{fields:n,...o?{sort:o}:{}}}function ym(e){if(Sn(e)&&t.isString(e.field))return e.field;if(function(e){return!t.isArray(e)&&J(e,"fields")&&!J(e,"data")}(e)){let n;for(const i of e.fields)if(Sn(i)&&t.isString(i.field))if(n){if(n!==i.field)return Si("Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect."),n}else n=i.field;return Si("Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect."),n}if(function(e){return!t.isArray(e)&&J(e,"fields")&&J(e,"data")}(e)){Si("Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.");const n=e.fields[0];return t.isString(n)?n:void 0}}function vm(e,t){const n=e.component.scales[t].get("domains").map((t=>(Sn(t)&&(t.data=e.lookupDataSource(t.data)),t)));return hm(n)}function bm(e){return Im(e)||Wm(e)?e.children.reduce(((e,t)=>e.concat(bm(t))),xm(e)):xm(e)}function xm(e){return D(e.component.scales).reduce(((n,i)=>{const r=e.component.scales[i];if(r.merged)return n;const o=r.combine(),{name:a,type:s,selectionExtent:l,domains:c,range:u,reverse:f,...d}=o,m=function(e,n,i,r){if(_t(i)){if(kn(e))return{step:{signal:`${n}_step`}}}else if(t.isObject(e)&&Sn(e))return{...e,data:r.lookupDataSource(e.data)};return e}(o.range,a,i,e),p=vm(e,i),g=l?function(e,n,i,r){const o=df(e,n.param,n);return{signal:Sr(i.get("type"))&&t.isArray(r)&&r[0]>r[1]?`isValid(${o}) && reverse(${o})`:o}}(e,l,r,p):null;return n.push({name:a,type:s,...p?{domain:p}:{},...g?{domainRaw:g}:{},range:m,...void 0!==f?{reverse:f}:{},...d}),n}),[])}class $m extends oc{merged=!1;constructor(e,t){super({},{name:e}),this.setWithExplicit("type",t)}domainHasZero(){const e=this.get("type");if(p([dr.LOG,dr.TIME,dr.UTC],e))return"definitely-not";const n=this.get("zero");if(!0===n||void 0===n&&p([dr.LINEAR,dr.SQRT,dr.POW],e))return"definitely";const i=this.get("domains");if(i.length>0){let e=!1,n=!1,r=!1;for(const o of i){if(t.isArray(o)){const i=o[0],r=o[o.length-1];if(t.isNumber(i)&&t.isNumber(r)){if(i<=0&&r>=0){e=!0;continue}n=!0;continue}}r=!0}if(e)return"definitely";if(n&&!r)return"definitely-not"}return"maybe"}}const wm=["range","scheme"];function km(e,n){const i=e.fieldDef(n);if(i?.bin){const{bin:r,field:o}=i,a=st(n),s=e.getName(a);if(t.isObject(r)&&r.binned&&void 0!==r.step)return new sm((()=>{const t=e.scaleName(n),i=`(domain("${t}")[1] - domain("${t}")[0]) / ${r.step}`;return`${e.getSignalName(s)} / (${i})`}));if(mn(r)){const t=xd(e,o,r);return new sm((()=>{const n=e.getSignalName(t),i=`(${n}.stop - ${n}.start) / ${n}.step`;return`${e.getSignalName(s)} / (${i})`}))}}}function Sm(e,n){const i=n.specifiedScales[e],{size:r}=n,o=n.getScaleComponent(e).get("type");for(const r of wm)if(void 0!==i[r]){const a=Er(o,r),s=Mr(e,r);if(a)if(s)Si(s);else switch(r){case"range":{const r=i.range;if(t.isArray(r)){if(_t(e))return ac(r.map((e=>{if("width"===e||"height"===e){const t=n.getName(e),i=n.getSignalName.bind(n);return sm.fromName(i,t)}return e})))}else if(t.isObject(r))return ac({data:n.requestDataName(bc.Main),field:r.field,sort:{op:"min",field:n.vgField(e)}});return ac(r)}case"scheme":return ac(Dm(i[r]))}else Si(gi(o,r,e))}const a=e===te||"xOffset"===e?"width":"height",s=r[a];if(Rs(s))if(_t(e))if(kr(o)){const t=Om(s,n,e);if(t)return ac({step:t})}else Si(hi(a));else if(jt(e)){const t=e===oe?"x":"y";if("band"===n.getScaleComponent(t).get("type")){const e=zm(s,o);if(e)return ac(e)}}const{rangeMin:l,rangeMax:u}=i,f=function(e,n){const{size:i,config:r,mark:o,encoding:a}=n,{type:s}=ka(a[e]),l=n.getScaleComponent(e),u=l.get("type"),{domain:f,domainMid:d}=n.specifiedScales[e];switch(e){case te:case ne:if(p(["point","band"],u)){const t=Cm(e,i,r.view);if(Rs(t)){return{step:Om(t,n,e)}}}return Fm(e,n,u);case oe:case ae:return function(e,t,n){const i=e===oe?"x":"y",r=t.getScaleComponent(i);if(!r)return Fm(i,t,n,{center:!0});const o=r.get("type"),a=t.scaleName(i),{markDef:s,config:l}=t;if("band"===o){const e=Cm(i,t.size,t.config.view);if(Rs(e)){const t=zm(e,n);if(t)return t}return[0,{signal:`bandwidth('${a}')`}]}{const n=t.encoding[i];if(Zo(n)&&n.timeUnit){const e=Bi(n.timeUnit,(e=>`scale('${a}', ${e})`)),i=t.config.scale.bandWithNestedOffsetPaddingInner,r=Ho({fieldDef:n,markDef:s,config:l})-.5,o=0!==r?` + ${r}`:"";if(i){return[{signal:`${wn(i)?`${i.signal}/2`+o:`${i/2+r}`} * (${e})`},{signal:`${wn(i)?`(1 - ${i.signal}/2)`+o:`${1-i/2+r}`} * (${e})`}]}return[0,{signal:e}]}return c(`Cannot use ${e} scale if ${i} scale is not discrete.`)}}(e,n,u);case xe:{const a=function(e,t){switch(e){case"bar":case"tick":return t.scale.minBandSize;case"line":case"trail":case"rule":return t.scale.minStrokeWidth;case"text":return t.scale.minFontSize;case"point":case"square":case"circle":return t.scale.minSize}throw new Error(li("size",e))}(o,r),s=function(e,n,i,r){const o={x:km(i,"x"),y:km(i,"y")};switch(e){case"bar":case"tick":{if(void 0!==r.scale.maxBandSize)return r.scale.maxBandSize;const e=Pm(n,o,r.view);return t.isNumber(e)?e-1:new sm((()=>`${e.signal} - 1`))}case"line":case"trail":case"rule":return r.scale.maxStrokeWidth;case"text":return r.scale.maxFontSize;case"point":case"square":case"circle":{if(r.scale.maxSize)return r.scale.maxSize;const e=Pm(n,o,r.view);return t.isNumber(e)?Math.pow(_m*e,2):new sm((()=>`pow(${_m} * ${e.signal}, 2)`))}}throw new Error(li("size",e))}(o,i,n,r);return Fr(u)?function(e,t,n){const i=()=>{const i=An(t),r=An(e),o=`(${i} - ${r}) / (${n} - 1)`;return`sequence(${r}, ${i} + ${o}, ${o})`};return wn(t)?new sm(i):{signal:i()}}(a,s,function(e,n,i,r){switch(e){case"quantile":return n.scale.quantileCount;case"quantize":return n.scale.quantizeCount;case"threshold":return void 0!==i&&t.isArray(i)?i.length+1:(Si(function(e){return`Domain for ${e} is required for threshold scale.`}(r)),3)}}(u,r,f,e)):[a,s]}case ce:return[0,2*Math.PI];case $e:return[0,360];case se:return[0,new sm((()=>`min(${n.getSignalName(Um(n.parent)?"child_width":"width")},${n.getSignalName(Um(n.parent)?"child_height":"height")})/2`))];case ge:return{step:1e3/r.scale.framesPerSecond};case De:return[r.scale.minStrokeWidth,r.scale.maxStrokeWidth];case Fe:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case be:return"symbol";case he:case ye:case ve:return"ordinal"===u?"nominal"===s?"category":"ordinal":void 0!==d?"diverging":"rect"===o||"geoshape"===o?"heatmap":"ramp";case we:case ke:case Se:return[r.scale.minOpacity,r.scale.maxOpacity]}}(e,n);return(void 0!==l||void 0!==u)&&Er(o,"rangeMin")&&t.isArray(f)&&2===f.length?ac([l??f[0],u??f[1]]):sc(f)}function Dm(e){return function(e){return!t.isString(e)&&J(e,"name")}(e)?{scheme:e.name,...f(e,["name"])}:{scheme:e}}function Fm(e,t,n){let{center:i}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const r=st(e),o=t.getName(r),a=t.getSignalName.bind(t);return e===ne&&Sr(n)?i?[sm.fromName((e=>`${a(e)}/2`),o),sm.fromName((e=>`-${a(e)}/2`),o)]:[sm.fromName(a,o),0]:i?[sm.fromName((e=>`-${a(e)}/2`),o),sm.fromName((e=>`${a(e)}/2`),o)]:[0,sm.fromName(a,o)]}function Om(e,n,i){const{encoding:r}=n,o=n.getScaleComponent(i),a=ct(i),s=r[a];if("offset"===Ms({step:e,offsetIsDiscrete:oa(s)&&ar(s.type)})&&Ba(r,a)){const i=n.getScaleComponent(a);let r=`domain('${n.scaleName(a)}').length`;if("band"===i.get("type")){r=`bandspace(${r}, ${i.get("paddingInner")??i.get("padding")??0}, ${i.get("paddingOuter")??i.get("padding")??0})`}const s=o.get("paddingInner")??o.get("padding");return{signal:`${e.step} * ${r} / (1-${l=s,wn(l)?l.signal:t.stringValue(l)})`}}return e.step;var l}function zm(e,t){if("offset"===Ms({step:e,offsetIsDiscrete:kr(t)}))return{step:e.step}}function Cm(e,t,n){const i=e===te?"width":"height",r=t[i];return r||Is(n,i)}const _m=.95;function Pm(e,t,n){const i=Rs(e.width)?e.width.step:Ws(n,"width"),r=Rs(e.height)?e.height.step:Ws(n,"height");return t.x||t.y?new sm((()=>`min(${[t.x?t.x.signal:i,t.y?t.y.signal:r].join(", ")})`)):Math.min(i,r)}function Nm(e,t){qm(e)?function(e,t){const n=e.component.scales,{config:i,encoding:r,markDef:o,specifiedScales:a}=e;for(const s of D(n)){const l=a[s],c=n[s],u=e.getScaleComponent(s),f=ka(r[s]),d=l[t],m=u.get("type"),p=u.get("padding"),g=u.get("paddingInner"),h=Er(m,t),y=Mr(s,t);if(void 0!==d&&(h?y&&Si(y):Si(gi(m,t,s))),h&&void 0===y)if(void 0!==d){const e=f.timeUnit,n=f.type;switch(t){case"domainMax":case"domainMin":Di(l[t])||"temporal"===n||e?c.set(t,{signal:_a(l[t],{type:n,timeUnit:e})},!0):c.set(t,l[t],!0);break;default:c.copyKeyFromObject(t,l)}}else{const n=J(Am,t)?Am[t]({model:e,channel:s,fieldOrDatumDef:f,scaleType:m,scalePadding:p,scalePaddingInner:g,domain:l.domain,domainMin:l.domainMin,domainMax:l.domainMax,markDef:o,config:i,hasNestedOffsetScale:Va(r,s),hasSecondaryRangeChannel:!!r[at(s)]}):i.scale[t];void 0!==n&&c.set(t,n,!1)}}}(e,t):jm(e,t)}const Am={bins:e=>{let{model:t,fieldOrDatumDef:n}=e;return Zo(n)?function(e,t){const n=t.bin;if(mn(n)){const i=xd(e,t.field,n);return new sm((()=>e.getSignalName(i)))}if(pn(n)&&gn(n)&&void 0!==n.step)return{step:n.step};return}(t,n):void 0},interpolate:e=>{let{channel:t,fieldOrDatumDef:n}=e;return function(e,t){if(p([he,ye,ve],e)&&"nominal"!==t)return"hcl";return}(t,n.type)},nice:e=>{let{scaleType:n,channel:i,domain:r,domainMin:o,domainMax:a,fieldOrDatumDef:s}=e;return function(e,n,i,r,o,a){if(wa(a)?.bin||t.isArray(i)||null!=o||null!=r||p([dr.TIME,dr.UTC],e))return;return!!_t(n)||void 0}(n,i,r,o,a,s)},padding:e=>{let{channel:t,scaleType:n,fieldOrDatumDef:i,markDef:r,config:o}=e;return function(e,t,n,i,r,o){if(_t(e)){if(Dr(t)){if(void 0!==n.continuousPadding)return n.continuousPadding;const{type:t,orient:a}=r;if("bar"===t&&(!Zo(i)||!i.bin&&!i.timeUnit)&&("vertical"===a&&"x"===e||"horizontal"===a&&"y"===e))return o.continuousBandSize}if(t===dr.POINT)return n.pointPadding}return}(t,n,o.scale,i,r,o.bar)},paddingInner:e=>{let{scalePadding:t,channel:n,markDef:i,scaleType:r,config:o,hasNestedOffsetScale:a}=e;return function(e,t,n,i,r){let o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(void 0!==e)return;if(_t(t)){const{bandPaddingInner:e,barBandPaddingInner:t,rectBandPaddingInner:i,tickBandPaddingInner:a,bandWithNestedOffsetPaddingInner:s}=r;return o?s:U(e,"bar"===n?t:"tick"===n?a:i)}if(jt(t)&&i===dr.BAND)return r.offsetBandPaddingInner;return}(t,n,i.type,r,o.scale,a)},paddingOuter:e=>{let{scalePadding:t,channel:n,scaleType:i,scalePaddingInner:r,config:o,hasNestedOffsetScale:a}=e;return function(e,t,n,i,r){let o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(void 0!==e)return;if(_t(t)){const{bandPaddingOuter:e,bandWithNestedOffsetPaddingOuter:t}=r;if(o)return t;if(n===dr.BAND)return U(e,wn(i)?{signal:`${i.signal}/2`}:i/2)}else if(jt(t)){if(n===dr.POINT)return.5;if(n===dr.BAND)return r.offsetBandPaddingOuter}return}(t,n,i,r,o.scale,a)},reverse:e=>{let{fieldOrDatumDef:t,scaleType:n,channel:i,config:r}=e;return function(e,t,n,i){if("x"===n&&void 0!==i.xReverse)return Sr(e)&&"descending"===t?wn(i.xReverse)?{signal:`!${i.xReverse.signal}`}:!i.xReverse:i.xReverse;if(Sr(e)&&"descending"===t)return!0;return}(n,Zo(t)?t.sort:void 0,i,r.scale)},zero:e=>{let{channel:n,fieldOrDatumDef:i,domain:r,markDef:o,scaleType:a,config:s,hasSecondaryRangeChannel:l}=e;return function(e,n,i,r,o,a,s){if(i&&"unaggregated"!==i&&Sr(o)){if(t.isArray(i)){const e=i[0],n=i[i.length-1];if(t.isNumber(e)&&e<=0&&t.isNumber(n)&&n>=0)return!0}return!1}if("size"===e&&"quantitative"===n.type&&!Fr(o))return!0;if((!Zo(n)||!n.bin)&&p([...Ct,...Nt],e)){const{orient:t,type:n}=r;return(!p(["bar","area","line","trail"],n)||!("horizontal"===t&&"y"===e||"vertical"===t&&"x"===e))&&(!(!p(["bar","area"],n)||s)||a?.zero)}return!1}(n,i,r,o,a,s.scale,l)}};function Tm(e){qm(e)?function(e){const t=e.component.scales;for(const n of Xt){const i=t[n];if(!i)continue;const r=Sm(n,e);i.setWithExplicit("range",r)}}(e):jm(e,"range")}function jm(e,t){const n=e.component.scales;for(const n of e.children)"range"===t?Tm(n):Nm(n,t);for(const i of D(n)){let r;for(const n of e.children){const e=n.component.scales[i];if(e){r=uc(r,e.getWithExplicit(t),t,"scale",lc(((e,n)=>"range"===t&&e.step&&n.step?e.step-n.step:0)))}}n[i].setWithExplicit(t,r)}}function Em(e,t,n,i){const r=function(e,t,n,i){switch(t.type){case"nominal":case"ordinal":if(We(e)||"discrete"===tn(e))return"shape"===e&&"ordinal"===t.type&&Si(fi(e,"ordinal")),"ordinal";if(Mt(e))return"band";if(_t(e)||jt(e)){if(p(["rect","bar","image","rule","tick"],n.type))return"band";if(i)return"band"}else if("arc"===n.type&&e in Pt)return"band";return lo(n[st(e)])||ca(t)&&t.axis?.tickBand?"band":"point";case"temporal":return We(e)?"time":"discrete"===tn(e)?(Si(fi(e,"temporal")),"ordinal"):Zo(t)&&t.timeUnit&&Ii(t.timeUnit).utc?"utc":Mt(e)?"band":"time";case"quantitative":return We(e)?Zo(t)&&mn(t.bin)?"bin-ordinal":"linear":"discrete"===tn(e)?(Si(fi(e,"quantitative")),"ordinal"):Mt(e)?"band":"linear";case"geojson":return}throw new Error(oi(t.type))}(t,n,i,arguments.length>4&&void 0!==arguments[4]&&arguments[4]),{type:o}=e;return Qt(t)?void 0!==o?function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!Qt(e))return!1;switch(e){case te:case ne:case oe:case ae:case ce:case se:return!!Dr(t)||"band"===t||"point"===t&&!n;case ge:return p(["linear","band"],t);case xe:case De:case we:case ke:case Se:case $e:return Dr(t)||Fr(t)||p(["band","point","ordinal"],t);case he:case ye:case ve:return"band"!==t;case Fe:case be:return"ordinal"===t||Fr(t)}}(t,o)?Zo(n)&&(a=o,s=n.type,!(p([lr,ur],s)?void 0===a||kr(a):s===cr?p([dr.TIME,dr.UTC,void 0],a):s!==sr||br(a)||Fr(a)||void 0===a))?(Si(function(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}(o,r)),r):o:(Si(function(e,t,n){return`Channel "${e}" does not work with "${t}" scale. We are using "${n}" scale instead.`}(t,o,r)),r):r:null;var a,s}function Mm(e){qm(e)?e.component.scales=function(e){const{encoding:t,mark:n,markDef:i}=e,r={};for(const o of Xt){const a=ka(t[o]);if(a&&n===Kr&&o===be&&a.type===fr)continue;let s=a&&a.scale;if(a&&null!==s&&!1!==s){s??={};const n=Em(s,o,a,i,Va(t,o));r[o]=new $m(e.scaleName(`${o}`,!0),{value:n,explicit:s.type===n})}}return r}(e):e.component.scales=function(e){const t=e.component.scales={},n={},i=e.component.resolve;for(const t of e.children){Mm(t);for(const r of D(t.component.scales))if(i.scale[r]??=Yf(r,e),"shared"===i.scale[r]){const e=n[r],o=t.component.scales[r].getWithExplicit("type");e?pr(e.value,o.value)?n[r]=uc(e,o,"type","scale",Rm):(i.scale[r]="independent",delete n[r]):n[r]=o}}for(const i of D(n)){const r=e.scaleName(i,!0),o=n[i];t[i]=new $m(r,o);for(const t of e.children){const e=t.component.scales[i];e&&(t.renameScale(e.get("name"),r),e.merged=!0)}}return t}(e)}const Rm=lc(((e,t)=>hr(e)-hr(t)));class Lm{constructor(){this.nameMap={}}rename(e,t){this.nameMap[e]=t}has(e){return void 0!==this.nameMap[e]}get(e){for(;this.nameMap[e]&&e!==this.nameMap[e];)e=this.nameMap[e];return e}}function qm(e){return"unit"===e?.type}function Um(e){return"facet"===e?.type}function Wm(e){return"concat"===e?.type}function Im(e){return"layer"===e?.type}class Bm{constructor(e,n,i,r,o,a,c){this.type=n,this.parent=i,this.config=o,this.parent=i,this.config=o,this.view=bn(c),this.name=e.name??r,this.title=$n(e.title)?{text:e.title}:e.title?bn(e.title):void 0,this.scaleNameMap=i?i.scaleNameMap:new Lm,this.projectionNameMap=i?i.projectionNameMap:new Lm,this.signalNameMap=i?i.signalNameMap:new Lm,this.data=e.data,this.description=e.description,this.transforms=(e.transform??[]).map((e=>Ol(e)?{filter:s(e.filter,rr)}:e)),this.layout="layer"===n||"unit"===n?{}:function(e,n,i){const r=i[n],o={},{spacing:a,columns:s}=r;void 0!==a&&(o.spacing=a),void 0!==s&&(Io(e)&&!Uo(e.facet)||Ts(e))&&(o.columns=s),js(e)&&(o.columns=1);for(const n of qs)if(void 0!==e[n])if("spacing"===n){const i=e[n];o[n]=t.isNumber(i)?i:{row:i.row??a,column:i.column??a}}else o[n]=e[n];return o}(e,n,o),this.component={data:{sources:i?i.component.data.sources:[],outputNodes:i?i.component.data.outputNodes:{},outputNodeRefCounts:i?i.component.data.outputNodeRefCounts:{},isFaceted:Io(e)||i?.component.data.isFaceted&&void 0===e.data},layoutSize:new oc,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...a?l(a):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){!function(e){let{ignoreRange:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Mm(e),lm(e);for(const t of jr)Nm(e,t);t||Tm(e)}(this)}parseProjection(){yd(this)}renameTopLevelLayoutSizeSignal(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}parseLegends(){sd(this)}assembleEncodeFromView(e){const{style:t,...n}=e,i={};for(const e of D(n)){const t=n[e];void 0!==t&&(i[e]=Pn(t))}return i}assembleGroupEncodeEntry(e){let t={};return this.view&&(t=this.assembleEncodeFromView(this.view)),e||(this.description&&(t.description=Pn(this.description)),"unit"!==this.type&&"layer"!==this.type)?S(t)?void 0:t:{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...t}}assembleLayout(){if(!this.layout)return;const{spacing:e,...t}=this.layout,{component:n,config:i}=this,r=function(e,t){const n={};for(const i of Be){const r=e[i];if(r?.facetFieldDef){const{titleAnchor:e,titleOrient:o}=Cf(["titleAnchor","titleOrient"],r.facetFieldDef.header,t,i),a=Of(i,o),s=qf(e,a);void 0!==s&&(n[a]=s)}}return S(n)?void 0:n}(n.layoutHeaders,i);return{padding:e,...this.assembleDefaultLayout(),...t,...r?{titleBand:r}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:e}=this.component;let t=[];for(const n of Be)e[n].title&&t.push(Nf(this,n));for(const e of _f)t=t.concat(jf(this,e));return t}assembleAxes(){return function(e,t){const{x:n=[],y:i=[]}=e;return[...n.map((e=>gf(e,"grid",t))),...i.map((e=>gf(e,"grid",t))),...n.map((e=>gf(e,"main",t))),...i.map((e=>gf(e,"main",t)))].filter((e=>e))}(this.component.axes,this.config)}assembleLegends(){return dd(this)}assembleProjections(){return md(this)}assembleTitle(){const{encoding:e,...t}=this.title??{},n={...xn(this.config.title).nonMarkTitleProperties,...t,...e?{encode:{update:e}}:{}};if(n.text)return p(["unit","layer"],this.type)?p(["middle",void 0],n.anchor)&&(n.frame??="group"):n.anchor??="start",S(n)?void 0:n}assembleGroup(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={};e=e.concat(this.assembleSignals()),e.length>0&&(t.signals=e);const n=this.assembleLayout();n&&(t.layout=n),t.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const i=!this.parent||Um(this.parent)?bm(this):[];i.length>0&&(t.scales=i);const r=this.assembleAxes();r.length>0&&(t.axes=r);const o=this.assembleLegends();return o.length>0&&(t.legends=o),t}getName(e){return C((this.name?`${this.name}_`:"")+e)}getDataName(e){return this.getName(bc[e].toLowerCase())}requestDataName(e){const t=this.getDataName(e),n=this.component.data.outputNodeRefCounts;return n[t]=(n[t]||0)+1,t}getSizeSignalRef(e){if(Um(this.parent)){const t=At(Hf(e)),n=this.component.scales[t];if(n&&!n.merged){const e=n.get("type"),i=n.get("range");if(kr(e)&&kn(i)){const e=n.get("name"),i=ym(vm(this,t));if(i){return{signal:Vf(e,n,ma({aggregate:"distinct",field:i},{expr:"datum"}))}}return Si(Xn(t)),null}}}return{signal:this.signalNameMap.get(this.getName(e))}}lookupDataSource(e){const t=this.component.data.outputNodes[e];return t?t.getSource():e}getSignalName(e){return this.signalNameMap.get(e)}renameSignal(e,t){this.signalNameMap.rename(e,t)}renameScale(e,t){this.scaleNameMap.rename(e,t)}renameProjection(e,t){this.projectionNameMap.rename(e,t)}scaleName(e,t){return t?this.getName(e):tt(e)&&Qt(e)&&this.component.scales[e]||this.scaleNameMap.has(this.getName(e))?this.scaleNameMap.get(this.getName(e)):void 0}projectionName(e){return e?this.getName("projection"):this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection"))?this.projectionNameMap.get(this.getName("projection")):void 0}getScaleComponent(e){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const t=this.component.scales[e];return t&&!t.merged?t:this.parent?this.parent.getScaleComponent(e):void 0}getScaleType(e){const t=this.getScaleComponent(e);return t?t.get("type"):void 0}getSelectionComponent(e,t){let n=this.component.selection[e];if(!n&&this.parent&&(n=this.parent.getSelectionComponent(e,t)),!n)throw new Error(function(e){return`Cannot find a selection named "${e}".`}(t));return n}hasAxisOrientSignalRef(){return this.component.axes.x?.some((e=>e.hasOrientSignalRef()))||this.component.axes.y?.some((e=>e.hasOrientSignalRef()))}}class Vm extends Bm{vgField(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.fieldDef(e);if(n)return ma(n,t)}reduceFieldDef(e,n){return function(e,n,i,r){return e?D(e).reduce(((i,o)=>{const a=e[o];return t.isArray(a)?a.reduce(((e,t)=>n.call(r,e,t,o)),i):n.call(r,i,a,o)}),i):i}(this.getMapping(),((t,n,i)=>{const r=wa(n);return r?e(t,r,i):t}),n)}forEachFieldDef(e,t){Qa(this.getMapping(),((t,n)=>{const i=wa(t);i&&e(i,n)}),t)}}class Hm extends $c{clone(){return new Hm(null,l(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=l(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??"value",n[1]??"density"];const i=this.transform.resolve??"shared";this.transform.resolve=i}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${d(this.transform)}`}assemble(){const{density:e,...t}=this.transform,n={type:"kde",field:e,...t};return n.resolve=this.transform.resolve,n}}class Gm extends $c{clone(){return new Gm(null,l(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=l(t)}dependentFields(){return new Set([this.transform.extent])}producedFields(){return new Set([])}hash(){return`ExtentTransform ${d(this.transform)}`}assemble(){const{extent:e,param:t}=this.transform;return{type:"extent",field:e,signal:t}}}class Ym extends $c{clone(){return new Ym(this.parent,l(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=l(t);const{flatten:n,as:i=[]}=this.transform;this.transform.as=n.map(((e,t)=>i[t]??e))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${d(this.transform)}`}assemble(){const{flatten:e,as:t}=this.transform;return{type:"flatten",fields:e,as:t}}}class Xm extends $c{clone(){return new Xm(null,l(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=l(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??"key",n[1]??"value"]}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${d(this.transform)}`}assemble(){const{fold:e,as:t}=this.transform;return{type:"fold",fields:e,as:t}}}class Qm extends $c{clone(){return new Qm(null,l(this.fields),this.geojson,this.signal)}static parseAll(e,t){if(t.component.projection&&!t.component.projection.isFit)return e;let n=0;for(const i of[[de,fe],[pe,me]]){const r=i.map((e=>{const n=ka(t.encoding[e]);return Zo(n)?n.field:ta(n)?{expr:`${n.datum}`}:sa(n)?{expr:`${n.value}`}:void 0}));(r[0]||r[1])&&(e=new Qm(e,r,null,t.getName("geojson_"+n++)))}if(t.channelHasField(be)){const i=t.typedFieldDef(be);i.type===fr&&(e=new Qm(e,null,i.field,t.getName("geojson_"+n++)))}return e}constructor(e,t,n,i){super(e),this.fields=t,this.geojson=n,this.signal=i}dependentFields(){const e=(this.fields??[]).filter(t.isString);return new Set([...this.geojson?[this.geojson]:[],...e])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${d(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}class Jm extends $c{clone(){return new Jm(null,this.projection,l(this.fields),l(this.as))}constructor(e,t,n,i){super(e),this.projection=t,this.fields=n,this.as=i}static parseAll(e,t){if(!t.projectionName())return e;for(const n of[[de,fe],[pe,me]]){const i=n.map((e=>{const n=ka(t.encoding[e]);return Zo(n)?n.field:ta(n)?{expr:`${n.datum}`}:sa(n)?{expr:`${n.value}`}:void 0})),r=n[0]===pe?"2":"";(i[0]||i[1])&&(e=new Jm(e,t.projectionName(),i,[t.getName(`x${r}`),t.getName(`y${r}`)]))}return e}dependentFields(){return new Set(this.fields.filter(t.isString))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${d(this.fields)} ${d(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class Km extends $c{clone(){return new Km(null,l(this.transform))}constructor(e,t){super(e),this.transform=t}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(e){const{start:t=0,stop:n,step:i}=e;return{signal:`sequence(${[t,n,...i?[i]:[]].join(",")})`}}static makeFromTransform(e,t){return new Km(e,t)}static makeFromEncoding(e,t){const n=t.encoding,i=n.x,r=n.y;if(Zo(i)&&Zo(r)){const o=i.impute?i:r.impute?r:void 0;if(void 0===o)return;const a=i.impute?r:r.impute?i:void 0,{method:s,value:l,frame:c,keyvals:u}=o.impute,f=Ja(t.mark,n);return new Km(e,{impute:o.field,key:a.field,...s?{method:s}:{},...void 0!==l?{value:l}:{},...c?{frame:c}:{},...void 0!==u?{keyvals:u}:{},...f.length?{groupby:f}:{}})}return null}hash(){return`Impute ${d(this.transform)}`}assemble(){const{impute:e,key:t,keyvals:n,method:i,groupby:r,value:o,frame:a=[null,null]}=this.transform,s={type:"impute",field:e,key:t,...n?{keyvals:(l=n,J(l,"stop")?this.processSequence(n):n)}:{},method:"value",...r?{groupby:r}:{},value:i&&"value"!==i?null:o};var l;if(i&&"value"!==i){return[s,{type:"window",as:[`imputed_${e}_value`],ops:[i],fields:[e],frame:a,ignorePeers:!1,...r?{groupby:r}:{}},{type:"formula",expr:`datum.${e} === null ? datum.imputed_${e}_value : datum.${e}`,as:e}]}return[s]}}class Zm extends $c{clone(){return new Zm(null,l(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=l(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??t.on,n[1]??t.loess]}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${d(this.transform)}`}assemble(){const{loess:e,on:t,...n}=this.transform;return{type:"loess",x:t,y:e,...n}}}class ep extends $c{clone(){return new ep(null,l(this.transform),this.secondary)}constructor(e,t,n){super(e),this.transform=t,this.secondary=n}static make(e,t,n,i){const r=t.component.data.sources,{from:o}=n;let a=null;if(function(e){return J(e,"data")}(o)){let e=gp(o.data,r);e||(e=new Ad(o.data),r.push(e));const n=t.getName(`lookup_${i}`);a=new wc(e,n,bc.Lookup,t.component.data.outputNodeRefCounts),t.component.data.outputNodes[n]=a}else if(function(e){return J(e,"param")}(o)){const e=o.param;let i;n={as:e,...n};try{i=t.getSelectionComponent(C(e),e)}catch(t){throw new Error(function(e){return`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`}(e))}if(a=i.materialized,!a)throw new Error(function(e){return`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`}(e))}return new ep(e,n,a.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?t.array(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${d({transform:this.transform,secondary:this.secondary})}`}assemble(){let e;if(this.transform.from.fields)e={values:this.transform.from.fields,...this.transform.as?{as:t.array(this.transform.as)}:{}};else{let n=this.transform.as;t.isString(n)||(Si('If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.'),n="_lookup"),e={as:[n]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...e,...this.transform.default?{default:this.transform.default}:{}}}}class tp extends $c{clone(){return new tp(null,l(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=l(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??"prob",n[1]??"value"]}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${d(this.transform)}`}assemble(){const{quantile:e,...t}=this.transform;return{type:"quantile",field:e,...t}}}class np extends $c{clone(){return new np(null,l(this.transform))}constructor(e,t){super(e),this.transform=t,this.transform=l(t);const n=this.transform.as??[void 0,void 0];this.transform.as=[n[0]??t.on,n[1]??t.regression]}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${d(this.transform)}`}assemble(){const{regression:e,on:t,...n}=this.transform;return{type:"regression",x:t,y:e,...n}}}class ip extends $c{clone(){return new ip(null,l(this.transform))}constructor(e,t){super(e),this.transform=t}addDimensions(e){this.transform.groupby=b((this.transform.groupby??[]).concat(e),(e=>e))}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${d(this.transform)}`}assemble(){const{pivot:e,value:t,groupby:n,limit:i,op:r}=this.transform;return{type:"pivot",field:e,value:t,...void 0!==i?{limit:i}:{},...void 0!==r?{op:r}:{},...void 0!==n?{groupby:n}:{}}}}class rp extends $c{clone(){return new rp(null,l(this.transform))}constructor(e,t){super(e),this.transform=t}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${d(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function op(e){let t=0;return function n(i,r){if(i instanceof Ad&&!i.isGenerator&&!dc(i.data)){e.push(r);r={name:null,source:r.name,transform:[]}}if(i instanceof Cd&&(i.parent instanceof Ad&&!r.source?(r.format={...r.format,parse:i.assembleFormatParse()},r.transform.push(...i.assembleTransforms(!0))):r.transform.push(...i.assembleTransforms())),i instanceof Dd)return r.name||(r.name="data_"+t++),!r.source||r.transform.length>0?(e.push(r),i.data=r.name):i.data=r.source,void e.push(...i.assemble());if((i instanceof Pd||i instanceof Nd||i instanceof Qd||i instanceof uf||i instanceof Df||i instanceof Jm||i instanceof Sd||i instanceof ep||i instanceof Zd||i instanceof Xd||i instanceof Xm||i instanceof Ym||i instanceof Hm||i instanceof Zm||i instanceof tp||i instanceof np||i instanceof _d||i instanceof rp||i instanceof ip||i instanceof Gm)&&r.transform.push(i.assemble()),(i instanceof wd||i instanceof Dc||i instanceof Km||i instanceof Kd||i instanceof Qm)&&r.transform.push(...i.assemble()),i instanceof wc)if(r.source&&0===r.transform.length)i.setSource(r.source);else if(i.parent instanceof wc)i.setSource(r.name);else if(r.name||(r.name="data_"+t++),i.setSource(r.name),1===i.numChildren()){e.push(r);r={name:null,source:r.name,transform:[]}}switch(i.numChildren()){case 0:i instanceof wc&&(!r.source||r.transform.length>0)&&e.push(r);break;case 1:n(i.children[0],r);break;default:{r.name||(r.name="data_"+t++);let o=r.name;!r.source||r.transform.length>0?e.push(r):o=r.source;for(const e of i.children){n(e,{name:null,source:o,transform:[]})}break}}}}function ap(e){return"top"===e||"left"===e||wn(e)?"header":"footer"}function sp(e,n){const{facet:i,config:r,child:o,component:a}=e;if(e.channelHasField(n)){const s=i[n],l=zf("title",null,r,n);let c=va(s,r,{allowDisabling:!0,includeDefault:void 0===l||!!l});o.component.layoutHeaders[n].title&&(c=t.isArray(c)?c.join(", "):c,c+=` / ${o.component.layoutHeaders[n].title}`,o.component.layoutHeaders[n].title=null);const u=zf("labelOrient",s.header,r,n),f=null!==s.header&&U(s.header?.labels,r.header.labels,!0),d=p(["bottom","right"],u)?"footer":"header";a.layoutHeaders[n]={title:null!==s.header?c:null,facetFieldDef:s,[d]:"facet"===n?[]:[lp(e,n,f)]}}}function lp(e,t,n){const i="row"===t?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(i)?e.child.getSizeSignalRef(i):void 0,axes:[]}}function cp(e,t){const{child:n}=e;if(n.component.axes[t]){const{layoutHeaders:i,resolve:r}=e.component;if(r.axis[t]=Xf(r,t),"shared"===r.axis[t]){const r="x"===t?"column":"row",o=i[r];for(const i of n.component.axes[t]){const t=ap(i.get("orient"));o[t]??=[lp(e,r,!1)];const n=gf(i,"main",e.config,{header:!0});n&&o[t][0].axes.push(n),i.mainExtracted=!0}}}}function up(e){for(const t of e.children)t.parseLayoutSize()}function fp(e,t){const n=Hf(t),i=At(n),r=e.component.resolve,o=e.component.layoutSize;let a;for(const t of e.children){const o=t.component.layoutSize.getWithExplicit(n),s=r.scale[i]??Yf(i,e);if("independent"===s&&"step"===o.value){a=void 0;break}if(a){if("independent"===s&&a.value!==o.value){a=void 0;break}a=uc(a,o,n,"")}else a=o}if(a){for(const i of e.children)e.renameSignal(i.getName(n),e.getName(t)),i.component.layoutSize.set(n,"merged",!1);o.setWithExplicit(t,a)}else o.setWithExplicit(t,{explicit:!1,value:void 0})}function dp(e,t){const n="width"===t?"x":"y",i=e.config,r=e.getScaleComponent(n);if(r){const e=r.get("type"),n=r.get("range");if(kr(e)){const e=Is(i.view,t);return kn(n)||Rs(e)?"step":e}return Us(i.view,t)}if(e.hasProjection||"arc"===e.mark)return Us(i.view,t);{const e=Is(i.view,t);return Rs(e)?e.step:e}}function mp(e,t,n){return ma(t,{suffix:`by_${ma(e)}`,...n})}class pp extends Vm{constructor(e,t,n,i){super(e,"facet",t,n,i,e.resolve),this.child=Up(e.spec,this,this.getName("child"),void 0,i),this.children=[this.child],this.facet=this.initFacet(e.facet)}initFacet(e){if(!Uo(e))return{facet:this.initFacetFieldDef(e,"facet")};const t=D(e),n={};for(const i of t){if(![K,Z].includes(i)){Si(li(i,"facet"));break}const t=e[i];if(void 0===t.field){Si(si(t,i));break}n[i]=this.initFacetFieldDef(t,i)}return n}initFacetFieldDef(e,t){const n=Fa(e,t);return n.header?n.header=bn(n.header):null===n.header&&(n.header=null),n}channelHasField(e){return J(this.facet,e)}fieldDef(e){return this.facet[e]}parseData(){this.component.data=hp(this),this.child.parseData()}parseLayoutSize(){up(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection,Object.values(this.component.selection).some((e=>af(e)))&&ki(ti)}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),function(e){for(const t of Be)sp(e,t);cp(e,"x"),cp(e,"y")}(this)}assembleSelectionTopLevelSignals(e){return this.child.assembleSelectionTopLevelSignals(e)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(e){return this.child.assembleSelectionData(e)}getHeaderLayoutMixins(){const e={};for(const t of Be)for(const n of Pf){const i=this.component.layoutHeaders[t],r=i[n],{facetFieldDef:o}=i;if(o){const n=zf("titleOrient",o.header,this.config,t);if(["right","bottom"].includes(n)){const i=Of(t,n);e.titleAnchor??={},e.titleAnchor[i]="end"}}if(r?.[0]){const r="row"===t?"height":"width",o="header"===n?"headerBand":"footerBand";"facet"===t||this.child.component.layoutSize.get(r)||(e[o]??={},e[o][t]=.5),i.title&&(e.offset??={},e.offset["row"===t?"rowTitle":"columnTitle"]=10)}}return e}assembleDefaultLayout(){const{column:e,row:t}=this.facet,n=e?this.columnDistinctSignal():t?1:void 0;let i="all";return(t||"independent"!==this.component.resolve.scale.x)&&(e||"independent"!==this.component.resolve.scale.y)||(i="none"),{...this.getHeaderLayoutMixins(),...n?{columns:n}:{},bounds:"full",align:i}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof pp)){return{signal:`length(data('${this.getName("column_domain")}'))`}}}assembleGroupStyle(){}assembleGroup(e){return this.parent&&this.parent instanceof pp?{...this.channelHasField("column")?{encode:{update:{columns:{field:ma(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(e)}:super.assembleGroup(e)}getCardinalityAggregateForChild(){const e=[],t=[],n=[];if(this.child instanceof pp){if(this.child.channelHasField("column")){const i=ma(this.child.facet.column);e.push(i),t.push("distinct"),n.push(`distinct_${i}`)}}else for(const i of Ct){const r=this.child.component.scales[i];if(r&&!r.merged){const o=r.get("type"),a=r.get("range");if(kr(o)&&kn(a)){const r=ym(vm(this.child,i));r?(e.push(r),t.push("distinct"),n.push(`distinct_${r}`)):Si(Xn(i))}}}return{fields:e,ops:t,as:n}}assembleFacet(){const{name:e,data:n}=this.component.data.facetRoot,{row:i,column:r}=this.facet,{fields:o,ops:a,as:s}=this.getCardinalityAggregateForChild(),l=[];for(const e of Be){const n=this.facet[e];if(n){l.push(ma(n));const{bin:c,sort:u}=n;if(mn(c)&&l.push(ma(n,{binSuffix:"end"})),Lo(u)){const{field:e,op:t=Eo}=u,l=mp(n,u);i&&r?(o.push(l),a.push("max"),s.push(l)):(o.push(e),a.push(t),s.push(l))}else if(t.isArray(u)){const t=Ff(n,e);o.push(t),a.push("max"),s.push(t)}}}const c=!!i&&!!r;return{name:e,data:n,groupby:l,...c||o.length>0?{aggregate:{...c?{cross:c}:{},...o.length?{fields:o,ops:a,as:s}:{}}}:{}}}facetSortFields(e){const{facet:n}=this,i=n[e];return i?Lo(i.sort)?[mp(i,i.sort,{expr:"datum"})]:t.isArray(i.sort)?[Ff(i,e,{expr:"datum"})]:[ma(i,{expr:"datum"})]:[]}facetSortOrder(e){const{facet:n}=this,i=n[e];if(i){const{sort:e}=i;return[(Lo(e)?e.order:!t.isArray(e)&&e)||"ascending"]}return[]}assembleLabelTitle(){const{facet:e,config:t}=this;if(e.facet)return Mf(e.facet,"facet",t);const n={row:["top","bottom"],column:["left","right"]};for(const i of _f)if(e[i]){const r=zf("labelOrient",e[i]?.header,t,i);if(n[i].includes(r))return Mf(e[i],i,t)}}assembleMarks(){const{child:e}=this,t=function(e){const t=[],n=op(t);for(const t of e.children)n(t,{source:e.name,name:null,transform:[]});return t}(this.component.data.facetRoot),n=e.assembleGroupEncodeEntry(!1),i=this.assembleLabelTitle()||e.assembleTitle(),r=e.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...i?{title:i}:{},...r?{style:r}:{},from:{facet:this.assembleFacet()},sort:{field:Be.map((e=>this.facetSortFields(e))).flat(),order:Be.map((e=>this.facetSortOrder(e))).flat()},...t.length>0?{data:t}:{},...n?{encode:{update:n}}:{},...e.assembleGroup(Gc(this,[]))}]}getMapping(){return this.facet}}function gp(e,t){for(const n of t){const t=n.data;if(e.name&&n.hasName()&&e.name!==n.dataName)continue;const i=e.format?.mesh,r=t.format?.feature;if(i&&r)continue;const o=e.format?.feature;if((o||r)&&o!==r)continue;const a=t.format?.mesh;if(!i&&!a||i===a)if(mc(e)&&mc(t)){if(X(e.values,t.values))return n}else if(dc(e)&&dc(t)){if(e.url===t.url)return n}else if(pc(e)&&e.name===n.dataName)return n}return null}function hp(e){let t=function(e,t){if(e.data||!e.parent){if(null===e.data){const e=new Ad({values:[]});return t.push(e),e}const n=gp(e.data,t);if(n)return gc(e.data)||(n.data.format=y({},e.data.format,n.data.format)),!n.hasName()&&e.data.name&&(n.dataName=e.data.name),n;{const n=new Ad(e.data);return t.push(n),n}}return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}(e,e.component.data.sources);const{outputNodes:n,outputNodeRefCounts:i}=e.component.data,r=e.data,o=!(r&&(gc(r)||dc(r)||mc(r)))&&e.parent?e.parent.component.data.ancestorParse.clone():new fc;gc(r)?(hc(r)?t=new Nd(t,r.sequence):vc(r)&&(t=new Pd(t,r.graticule)),o.parseNothing=!0):null===r?.format?.parse&&(o.parseNothing=!0),t=Cd.makeExplicit(t,e,o)??t,t=new _d(t);const a=e.parent&&Im(e.parent);(qm(e)||Um(e))&&a&&(t=wd.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=function(e,t,n){let i=0;for(const r of t.transforms){let o,a;if(Rl(r))a=e=new Df(e,r),o="derived";else if(Ol(r)){const i=Od(r);a=e=Cd.makeWithAncestors(e,{},i,n)??e,e=new uf(e,t,r.filter)}else if(Ll(r))a=e=wd.makeFromTransform(e,r,t),o="number";else if(Ul(r))o="date",void 0===n.getWithExplicit(r.field).value&&(e=new Cd(e,{[r.field]:o}),n.set(r.field,o,!1)),a=e=Dc.makeFromTransform(e,r);else if(Wl(r))a=e=Sd.makeFromTransform(e,r),o="number",rf(t)&&(e=new _d(e));else if(zl(r))a=e=ep.make(e,t,r,i++),o="derived";else if(jl(r))a=e=new Zd(e,r),o="number";else if(El(r))a=e=new Xd(e,r),o="number";else if(Il(r))a=e=Kd.makeFromTransform(e,r),o="derived";else if(Bl(r))a=e=new Xm(e,r),o="derived";else if(Vl(r))a=e=new Gm(e,r),o="derived";else if(Ml(r))a=e=new Ym(e,r),o="derived";else if(Cl(r))a=e=new ip(e,r),o="derived";else if(Tl(r))e=new rp(e,r);else if(ql(r))a=e=Km.makeFromTransform(e,r),o="derived";else if(_l(r))a=e=new Hm(e,r),o="derived";else if(Pl(r))a=e=new tp(e,r),o="derived";else if(Nl(r))a=e=new np(e,r),o="derived";else{if(!Al(r)){Si(`Ignoring an invalid transform: ${Q(r)}.`);continue}a=e=new Zm(e,r),o="derived"}if(a&&void 0!==o)for(const e of a.producedFields()??[])n.set(e,o,!1)}return e}(t,e,o));const s=function(e){const t={};if(qm(e)&&e.component.selection)for(const n of D(e.component.selection)){const i=e.component.selection[n];for(const e of i.project.items)!e.channel&&q(e.field)>1&&(t[e.field]="flatten")}return t}(e),l=zd(e);t=Cd.makeWithAncestors(t,{},{...s,...l},o)??t,qm(e)&&(t=Qm.parseAll(t,e),t=Jm.parseAll(t,e)),(qm(e)||Um(e))&&(a||(t=wd.makeFromEncoding(t,e)??t),t=Dc.makeFromEncoding(t,e)??t,t=Df.parseAllForSortIndex(t,e));const c=t=yp(bc.Raw,e,t);if(qm(e)){const n=Sd.makeFromEncoding(t,e);n&&(t=n,rf(e)&&(t=new _d(t))),t=Km.makeFromEncoding(t,e)??t,t=Kd.makeFromEncoding(t,e)??t}let u,f;if(qm(e)){const{markDef:n,mark:i,config:r}=e,o=En("invalid",n,r),{marks:a,scales:s}=f=xc({invalid:o,isPath:Zr(i)});a!==s&&"include-invalid-values"===s&&(u=t=yp(bc.PreFilterInvalid,e,t)),"exclude-invalid-values"===a&&(t=Qd.make(t,e,f)??t)}const d=t=yp(bc.Main,e,t);let m;if(qm(e)&&f){const{marks:n,scales:i}=f;"include-invalid-values"===n&&"exclude-invalid-values"===i&&(t=Qd.make(t,e,f)??t,m=t=yp(bc.PostFilterInvalid,e,t))}qm(e)&&function(e,t){for(const[n,i]of O(e.component.selection??{})){const r=e.getName(`lookup_${n}`);e.component.data.outputNodes[r]=i.materialized=new wc(new uf(t,e,{param:n}),r,bc.Lookup,e.component.data.outputNodeRefCounts)}}(e,d);let p=null;if(Um(e)){const i=e.getName("facet");t=function(e,t){const{row:n,column:i}=t;if(n&&i){let t=null;for(const r of[n,i])if(Lo(r.sort)){const{field:n,op:i=Eo}=r.sort;e=t=new Xd(e,{joinaggregate:[{op:i,field:n,as:mp(r,r.sort,{forAs:!0})}],groupby:[ma(r)]})}return t}return null}(t,e.facet)??t,p=new Dd(t,e,i,d.getSource()),n[i]=p}return{...e.component.data,outputNodes:n,outputNodeRefCounts:i,raw:c,main:d,facetRoot:p,ancestorParse:o,preFilterInvalid:u,postFilterInvalid:m}}function yp(e,t,n){const{outputNodes:i,outputNodeRefCounts:r}=t.component.data,o=t.getDataName(e),a=new wc(n,o,e,r);return i[o]=a,a}class vp extends Bm{constructor(e,t,n,i){super(e,"concat",t,n,i,e.resolve),"shared"!==e.resolve?.axis?.x&&"shared"!==e.resolve?.axis?.y||Si("Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415)."),this.children=this.getChildren(e).map(((e,t)=>Up(e,this,this.getName(`concat_${t}`),void 0,i)))}parseData(){this.component.data=hp(this);for(const e of this.children)e.parseData()}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of D(e.component.selection))this.component.selection[t]=e.component.selection[t]}Object.values(this.component.selection).some((e=>af(e)))&&ki(ti)}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){for(const e of this.children)e.parseAxesAndHeaders()}getChildren(e){return js(e)?e.vconcat:Es(e)?e.hconcat:e.concat}parseLayoutSize(){!function(e){up(e);const t=1===e.layout.columns?"width":"childWidth",n=void 0===e.layout.columns?"height":"childHeight";fp(e,t),fp(e,n)}(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.forEach((e=>e.assembleSignals())),[]}assembleLayoutSignals(){const e=Wf(this);for(const t of this.children)e.push(...t.assembleLayoutSignals());return e}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleMarks(){return this.children.map((e=>{const t=e.assembleTitle(),n=e.assembleGroupStyle(),i=e.assembleGroupEncodeEntry(!1);return{type:"group",name:e.getName("group"),...t?{title:t}:{},...n?{style:n}:{},...i?{encode:{update:i}}:{},...e.assembleGroup()}}))}assembleGroupStyle(){}assembleDefaultLayout(){const e=this.layout.columns;return{...null!=e?{columns:e}:{},bounds:"full",align:"each"}}}const bp={disable:1,gridScale:1,scale:1,...Ma,labelExpr:1,encode:1},xp=D(bp);class $p extends oc{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];super(),this.explicit=e,this.implicit=t,this.mainExtracted=n}clone(){return new $p(l(this.explicit),l(this.implicit),this.mainExtracted)}hasAxisPart(e){return"axis"===e||("grid"===e||"title"===e?!!this.get(e):!(!1===(t=this.get(e))||null===t));var t}hasOrientSignalRef(){return wn(this.explicit.orient)}}const wp={bottom:"top",top:"bottom",left:"right",right:"left"};function kp(e,t){if(!e)return t.map((e=>e.clone()));{if(e.length!==t.length)return;const n=e.length;for(let i=0;i{switch(n){case"title":return In(e,t);case"gridScale":return{explicit:e.explicit,value:U(e.value,t.value)}}return cc(e,t,n,"axis")}));e.setWithExplicit(n,i)}return e}function Dp(e,t,n,i,r){if("disable"===t)return void 0!==n;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===(wn(n.labelAngle)?n.labelAngle:H(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===Sf(i,r))return!0}return e===n[t]}const Fp=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function Op(e,t){let n=t.axis(e);const i=new $p,r=ka(t.encoding[e]),{mark:o,config:a}=t,s=n?.orient||a["x"===e?"axisX":"axisY"]?.orient||a.axis?.orient||function(e){return"x"===e?"bottom":"left"}(e),l=t.getScaleComponent(e).get("type"),c=function(e,t,n,i){const r="band"===t?["axisDiscrete","axisBand"]:"point"===t?["axisDiscrete","axisPoint"]:br(t)?["axisQuantitative"]:"time"===t||"utc"===t?["axisTemporal"]:[],o="x"===e?"axisX":"axisY",a=wn(n)?"axisOrient":`axis${N(n)}`,s=[...r,...r.map((e=>o+e.substr(4)))],l=["axis",a,o];return{vlOnlyAxisConfig:yf(s,i,e,n),vgAxisConfig:yf(l,i,e,n),axisConfigStyle:vf([...l,...s],i)}}(e,l,s,t.config),u=void 0!==n?!n:bf("disable",a.style,n?.style,c).configValue;if(i.set("disable",u,void 0!==n),u)return i;n=n||{};const f=function(e,t,n,i,r){const o=t?.labelAngle;if(void 0!==o)return wn(o)?o:H(o);{const{configValue:o}=bf("labelAngle",i,t?.style,r);return void 0!==o?H(o):n!==te||!p([ur,lr],e.type)||Zo(e)&&e.timeUnit?void 0:270}}(r,n,e,a.style,c),d=Po(n.formatType,r,l),m=_o(r,r.type,n.format,n.formatType,a,!0),g={fieldOrDatumDef:r,axis:n,channel:e,model:t,scaleType:l,orient:s,labelAngle:f,format:m,formatType:d,mark:o,config:a};for(const r of xp){const o=r in xf?xf[r](g):La(r)?n[r]:void 0,s=void 0!==o,l=Dp(o,r,n,t,e);if(s&&l)i.set(r,o,l);else{const{configValue:e,configFrom:t}=La(r)&&"values"!==r?bf(r,a.style,n.style,c):{},u=void 0!==e;s&&!u?i.set(r,o,l):("vgAxisConfig"!==t||Fp.has(r)&&u||Ta(e)||wn(e))&&i.set(r,e,!1)}}const h=n.encoding??{},y=ja.reduce(((n,r)=>{if(!i.hasAxisPart(r))return n;const o=Gf(h[r]??{},t),a="labels"===r?function(e,t,n){const{encoding:i,config:r}=e,o=ka(i[t])??ka(i[at(t)]),a=e.axis(t)||{},{format:s,formatType:l}=a;if(So(l))return{text:Co({fieldOrDatumDef:o,field:"datum.value",format:s,formatType:l,config:r}),...n};if(void 0===s&&void 0===l&&r.customFormatTypes){if("quantitative"===ea(o)){if(ca(o)&&"normalize"===o.stack&&r.normalizedNumberFormatType)return{text:Co({fieldOrDatumDef:o,field:"datum.value",format:r.normalizedNumberFormat,formatType:r.normalizedNumberFormatType,config:r}),...n};if(r.numberFormatType)return{text:Co({fieldOrDatumDef:o,field:"datum.value",format:r.numberFormat,formatType:r.numberFormatType,config:r}),...n}}if("temporal"===ea(o)&&r.timeFormatType&&Zo(o)&&!o.timeUnit)return{text:Co({fieldOrDatumDef:o,field:"datum.value",format:r.timeFormat,formatType:r.timeFormatType,config:r}),...n}}return n}(t,e,o):o;return void 0===a||S(a)||(n[r]={update:a}),n}),{});return S(y)||i.set("encode",y,!!n.encoding||void 0!==n.labelAngle),i}function zp(e,t){const{config:n}=e;return{...Pu(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...yu("x",e,{defaultPos:"mid"}),...yu("y",e,{defaultPos:"mid"}),...mu("size",e),...mu("angle",e),...Cp(e,n,t)}}function Cp(e,t,n){return n?{shape:{value:n}}:mu("shape",e)}const _p={vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,n=t.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?{...Pu(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...ku("x",e,{defaultPos:"horizontal"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==n}),...ku("y",e,{defaultPos:"vertical"===n?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==n}),...mu("size",e,{vgChannel:"strokeWidth"})}:{}}};function Pp(e,t,n){if(void 0===En("align",e,n))return"center"}function Np(e,t,n){if(void 0===En("baseline",e,n))return"middle"}const Ap={vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:n}=e,i=n.orient,r="horizontal"===i?"x":"y",o="horizontal"===i?"y":"x",a="horizontal"===i?"height":"width";return{...Pu(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Fu(e,r),...yu(o,e,{defaultPos:"mid",vgChannel:"y"===o?"yc":"xc"}),[a]:Pn(En("thickness",n,t))}}},Tp={arc:{vgMark:"arc",encodeEntry:e=>({...Pu(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...yu("x",e,{defaultPos:"mid"}),...yu("y",e,{defaultPos:"mid"}),...Fu(e,"radius"),...Fu(e,"theta")})},area:{vgMark:"area",encodeEntry:e=>({...Pu(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...ku("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===e.markDef.orient}),...ku("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===e.markDef.orient}),...Tu(e)})},bar:{vgMark:"rect",encodeEntry:e=>({...Pu(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Fu(e,"x"),...Fu(e,"y")})},circle:{vgMark:"symbol",encodeEntry:e=>zp(e,"circle")},geoshape:{vgMark:"shape",encodeEntry:e=>({...Pu(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,n=t.shape;return[{type:"geoshape",projection:e.projectionName(),...n&&Zo(n)&&n.type===fr?{field:ma(n,{expr:"datum"})}:{}}]}},image:{vgMark:"image",encodeEntry:e=>({...Pu(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...Fu(e,"x"),...Fu(e,"y"),...ou(e,"url")})},line:{vgMark:"line",encodeEntry:e=>({...Pu(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...yu("x",e,{defaultPos:"mid"}),...yu("y",e,{defaultPos:"mid"}),...mu("size",e,{vgChannel:"strokeWidth"}),...Tu(e)})},point:{vgMark:"symbol",encodeEntry:e=>zp(e)},rect:{vgMark:"rect",encodeEntry:e=>({...Pu(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...Fu(e,"x"),...Fu(e,"y")})},rule:_p,square:{vgMark:"symbol",encodeEntry:e=>zp(e,"square")},text:{vgMark:"text",encodeEntry:e=>{const{config:t,encoding:n}=e;return{...Pu(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...yu("x",e,{defaultPos:"mid"}),...yu("y",e,{defaultPos:"mid"}),...ou(e),...mu("size",e,{vgChannel:"fontSize"}),...mu("angle",e),...ju("align",Pp(e.markDef,n,t)),...ju("baseline",Np(e.markDef,n,t)),...yu("radius",e,{defaultPos:null}),...yu("theta",e,{defaultPos:null})}}},tick:Ap,trail:{vgMark:"trail",encodeEntry:e=>({...Pu(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...yu("x",e,{defaultPos:"mid"}),...yu("y",e,{defaultPos:"mid"}),...mu("size",e),...Tu(e)})}};function jp(e){if(p([Ir,qr,Xr],e.mark)){const t=Ja(e.mark,e.encoding);if(t.length>0)return function(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:Ep+e.requestDataName(bc.Main),data:e.requestDataName(bc.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:Rp(e,{fromPrefix:Ep})}]}(e,t)}else if(e.mark===Ur){const t=On.some((t=>En(t,e.markDef,e.config)));if(e.stack&&!e.fieldDef("size")&&t)return function(e){const[t]=Rp(e,{fromPrefix:Mp}),n=e.scaleName(e.stack.fieldChannel),i=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.vgField(e.stack.fieldChannel,t)},r=(e,t)=>`${e}(${[i({prefix:"min",suffix:"start",expr:t}),i({prefix:"max",suffix:"start",expr:t}),i({prefix:"min",suffix:"end",expr:t}),i({prefix:"max",suffix:"end",expr:t})].map((e=>`scale('${n}',${e})`)).join(",")})`;let o,a;"x"===e.stack.fieldChannel?(o={...u(t.encode.update,["y","yc","y2","height",...On]),x:{signal:r("min","datum")},x2:{signal:r("max","datum")},clip:{value:!0}},a={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...f(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(o={...u(t.encode.update,["x","xc","x2","width"]),y:{signal:r("min","datum")},y2:{signal:r("max","datum")},clip:{value:!0}},a={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...f(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const n of On){const i=Mn(n,e.markDef,e.config);t.encode.update[n]?(o[n]=t.encode.update[n],delete t.encode.update[n]):i&&(o[n]=Pn(i)),i&&(t.encode.update[n]={value:0})}const s=[];if(e.stack.groupbyChannels?.length>0)for(const t of e.stack.groupbyChannels){const n=e.fieldDef(t),i=ma(n);i&&s.push(i),(n?.bin||n?.timeUnit)&&s.push(ma(n,{binSuffix:"end"}))}o=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce(((n,i)=>{if(t.encode.update[i])return{...n,[i]:t.encode.update[i]};{const t=Mn(i,e.markDef,e.config);return void 0!==t?{...n,[i]:Pn(t)}:n}}),o),o.stroke&&(o.strokeForeground={value:!0},o.strokeOffset={value:0});return[{type:"group",from:{facet:{data:e.requestDataName(bc.Main),name:Mp+e.requestDataName(bc.Main),groupby:s,aggregate:{fields:[i({suffix:"start"}),i({suffix:"start"}),i({suffix:"end"}),i({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:o},marks:[{type:"group",encode:{update:a},marks:[t]}]}]}(e)}return Rp(e)}const Ep="faceted_path_";const Mp="stack_group_";function Rp(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fromPrefix:""};const{mark:i,markDef:r,encoding:o,config:a}=e,s=U(r.clip,function(e){const t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return!(!t?.get("selectionExtent")&&!n?.get("selectionExtent"))||void 0}(e),function(e){const t=e.component.projection;return!(!t||t.isFit)||void 0}(e)),l=jn(r),c=o.key,u=function(e){const{encoding:n,stack:i,mark:r,markDef:o,config:a}=e,s=n.order;if(!(!t.isArray(s)&&sa(s)&&m(s.value)||!s&&m(En("order",o,a)))){if((t.isArray(s)||Zo(s))&&!i)return qn(s,{expr:"datum"});if(Zr(r)){const e="horizontal"===o.orient?"y":"x";if(Zo(n[e]))return{field:e}}}}(e),f=function(e){if(!e.component.selection)return null;const t=D(e.component.selection).length;let n=t,i=e.parent;for(;i&&0===n;)n=D(i.component.selection).length,i=i.parent;return n?{interactive:t>0||"geoshape"===e.mark||!!e.encoding.tooltip||!!e.markDef.tooltip}:null}(e),d=En("aria",r,a),p=Tp[i].postEncodingTransform?Tp[i].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:Tp[i].vgMark,...s?{clip:s}:{},...l?{style:l}:{},...c?{key:c.field}:{},...u?{sort:u}:{},...f||{},...!1===d?{aria:d}:{},from:{data:n.fromPrefix+e.requestDataName(bc.Main)},encode:{update:Tp[i].encodeEntry(e)},...p?{transform:p}:{}}]}class Lp extends Vm{specifiedScales={};specifiedAxes={};specifiedLegends={};specifiedProjection={};selection=[];children=[];constructor(e,n,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0;super(e,"unit",n,i,o,void 0,Ls(e)?e.view:void 0);const a=no(e.mark)?{...e.mark}:{type:e.mark},s=a.type;void 0===a.filled&&(a.filled=function(e,t,n){let{graticule:i}=n;if(i)return!1;const r=Mn("filled",e,t),o=e.type;return U(r,o!==Br&&o!==Ir&&o!==Hr)}(a,o,{graticule:e.data&&vc(e.data)}));const l=this.encoding=function(e,n,i,r){const o={};for(const t of D(e))tt(t)||Si(`${a=t}-encoding is dropped as ${a} is not a valid encoding channel.`);var a;for(let a of ft){if(!e[a])continue;const s=e[a];if(jt(a)){const e=ut(a),t=o[e];if(Zo(t)&&or(t.type)&&Zo(s)&&!t.timeUnit){Si(ri(e));continue}}if("angle"!==a||"arc"!==n||e.theta||(Si("Arc marks uses theta channel rather than angle, replacing angle with theta."),a=ce),Ya(e,a,n)){if(a===xe&&"line"===n){const t=wa(e[a]);if(t?.aggregate){Si("Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.");continue}}if(a===he&&(i?"fill"in e:"stroke"in e))Si(ai("encoding",{fill:"fill"in e,stroke:"stroke"in e}));else if(a===Ce||a===ze&&!t.isArray(s)&&!sa(s)||a===Pe&&t.isArray(s)){if(s){if(a===ze){const t=e[a];if(Xo(t)){o[a]=t;continue}}o[a]=t.array(s).reduce(((e,t)=>(Zo(t)?e.push(Fa(t,a)):Si(si(t,a)),e)),[])}}else{if(a===Pe&&null===s)o[a]=null;else if(!(Zo(s)||ta(s)||sa(s)||Qo(s)||wn(s))){Si(si(s,a));continue}o[a]=Sa(s,a,r)}}else Si(li(a,n))}return o}(e.encoding||{},s,a.filled,o);this.markDef=fl(a,l,o),this.size=function(e){let{encoding:t,size:n}=e;for(const e of Ct){const i=st(e);Rs(n[i])&&na(t[e])&&(delete n[i],Si(hi(i)))}return n}({encoding:l,size:Ls(e)?{...r,...e.width?{width:e.width}:{},...e.height?{height:e.height}:{}}:r}),this.stack=ul(this.markDef,l),this.specifiedScales=this.initScales(s,l),this.specifiedAxes=this.initAxes(l),this.specifiedLegends=this.initLegends(l),this.specifiedProjection=e.projection,this.selection=(e.params??[]).filter((e=>Ns(e)))}get hasProjection(){const{encoding:e}=this,t=this.mark===Kr,n=e&&qe.some((t=>oa(e[t])));return t||n}scaleDomain(e){const t=this.specifiedScales[e];return t?t.domain:void 0}axis(e){return this.specifiedAxes[e]}legend(e){return this.specifiedLegends[e]}initScales(e,t){return Xt.reduce(((e,n)=>{const i=ka(t[n]);return i&&(e[n]=this.initScale(i.scale??{})),e}),{})}initScale(e){const{domain:n,range:i}=e,r=bn(e);return t.isArray(n)&&(r.domain=n.map(Cn)),t.isArray(i)&&(r.range=i.map(Cn)),r}initAxes(e){return Ct.reduce(((t,n)=>{const i=e[n];if(oa(i)||n===te&&oa(e.x2)||n===ne&&oa(e.y2)){const e=oa(i)?i.axis:void 0;t[n]=e?this.initAxis({...e}):e}return t}),{})}initAxis(e){const t=D(e),n={};for(const i of t){const t=e[i];n[i]=Ta(t)?zn(t):Cn(t)}return n}initLegends(e){return Gt.reduce(((t,n)=>{const i=ka(e[n]);if(i&&function(e){switch(e){case he:case ye:case ve:case xe:case be:case we:case De:case Fe:return!0;case ke:case Se:case $e:case ge:return!1}}(n)){const e=i.legend;t[n]=e?bn(e):e}return t}),{})}parseData(){this.component.data=hp(this)}parseLayoutSize(){!function(e){const{size:t,component:n}=e;for(const i of Ct){const r=st(i);if(t[r]){const e=t[r];n.layoutSize.set(r,Rs(e)?"step":e,!0)}else{const t=dp(e,r);n.layoutSize.set(r,t,!1)}}}(this)}parseSelections(){this.component.selection=function(e,n){const i={},r=e.config.selection;if(!n||!n.length)return i;let o=0;for(const a of n){const n=C(a.name),s=a.select,c=t.isString(s)?s:s.type,u=t.isObject(s)?l(s):{type:c},f=r[c];for(const e in f)"fields"!==e&&"encodings"!==e&&("mark"===e&&(u.mark={...f.mark,...u.mark}),void 0!==u[e]&&!0!==u[e]||(u[e]=l(f[e]??u[e])));const d=i[n]={...u,name:n,type:c,init:a.value,bind:a.bind,events:t.isString(u.on)?t.parseSelector(u.on,"scope"):t.array(l(u.on))};if(af(d)&&(o++,o>1)){delete i[n];continue}const m=l(a);for(const t of tf)t.defined(d)&&t.parse&&t.parse(e,d,m)}return o>1&&Si("Multiple timer selections in one unit spec are not supported. Ignoring all but the first."),i}(this,this.selection)}parseMarkGroup(){this.component.mark=jp(this)}parseAxesAndHeaders(){var e;this.component.axes=(e=this,Ct.reduce(((t,n)=>(e.component.scales[n]&&(t[n]=[Op(n,e)]),t)),{}))}assembleSelectionTopLevelSignals(e){return function(e,n){let i=!1;for(const r of F(e.component.selection??{})){const o=r.name,a=t.stringValue(o+Ju);if(0===n.filter((e=>e.name===o)).length){const e="global"===r.resolve?"union":r.resolve,i="point"===r.type?", true, true)":")";n.push({name:r.name,update:`${ef}(${a}, ${t.stringValue(e)}${i}`})}i=!0;for(const t of tf)t.defined(r)&&t.topLevelSignals&&(n=t.topLevelSignals(e,r,n))}i&&0===n.filter((e=>"unit"===e.name)).length&&n.unshift({name:"unit",value:{},on:[{events:"pointermove",update:"isTuple(group()) ? group() : unit"}]});return Xc(n)}(this,e)}assembleSignals(){return[...hf(this),...Hc(this,[])]}assembleSelectionData(e){return function(e,t){const n=[],i=[],r=nf(e,{escape:!1});for(const o of F(e.component.selection??{})){const a={name:o.name+Ju};if(o.project.hasSelectionId&&(a.transform=[{type:"collect",sort:{field:zs}}]),o.init){const e=o.project.items.map(Bc);a.values=o.project.hasSelectionId?o.init.map((e=>({unit:r,[zs]:Vc(e,!1)[0]}))):o.init.map((t=>({unit:r,fields:e,values:Vc(t,!1)})))}if([...n,...t].filter((e=>e.name===o.name+Ju)).length||n.push(a),af(o)&&t.length){const n=e.lookupDataSource(e.getDataName(bc.Main)),r=t.find((e=>e.name===n)),o=r.transform.find((e=>"filter"===e.type&&e.expr.includes("vlSelectionTest")));if(o){r.transform=r.transform.filter((e=>e!==o));const e={name:r.name+Tc,source:r.name,transform:[o]};i.push(e)}}}return n.concat(t,i)}(this,e)}assembleLayout(){return null}assembleLayoutSignals(){return Wf(this)}correctDataNames=e=>(e.from?.data&&(e.from.data=this.lookupDataSource(e.from.data),"time"in this.encoding&&(e.from.data=e.from.data+Tc)),e.from?.facet?.data&&(e.from.facet.data=this.lookupDataSource(e.from.facet.data)),e);assembleMarks(){let e=this.component.mark??[];return this.parent&&Im(this.parent)||(e=Yc(this,e)),e.map(this.correctDataNames)}assembleGroupStyle(){const{style:e}=this.view||{};return void 0!==e?e:this.encoding.x||this.encoding.y?"cell":"view"}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(e){return Ia(this.encoding,e)}fieldDef(e){return wa(this.encoding[e])}typedFieldDef(e){const t=this.fieldDef(e);return aa(t)?t:null}}class qp extends Bm{constructor(e,t,n,i,r){super(e,"layer",t,n,r,e.resolve,e.view);const o={...i,...e.width?{width:e.width}:{},...e.height?{height:e.height}:{}};this.children=e.layer.map(((e,t)=>{if(il(e))return new qp(e,this,this.getName(`layer_${t}`),o,r);if(Ua(e))return new Lp(e,this,this.getName(`layer_${t}`),o,r);throw new Error(Bn(e))}))}parseData(){this.component.data=hp(this);for(const e of this.children)e.parseData()}parseLayoutSize(){var e;up(e=this),fp(e,"width"),fp(e,"height")}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of D(e.component.selection))this.component.selection[t]=e.component.selection[t]}Object.values(this.component.selection).some((e=>af(e)))&&ki(ti)}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){!function(e){const{axes:t,resolve:n}=e.component,i={top:0,bottom:0,right:0,left:0};for(const i of e.children){i.parseAxesAndHeaders();for(const r of D(i.component.axes))n.axis[r]=Xf(e.component.resolve,r),"shared"===n.axis[r]&&(t[r]=kp(t[r],i.component.axes[r]),t[r]||(n.axis[r]="independent",delete t[r]))}for(const r of Ct){for(const o of e.children)if(o.component.axes[r]){if("independent"===n.axis[r]){t[r]=(t[r]??[]).concat(o.component.axes[r]);for(const e of o.component.axes[r]){const{value:t,explicit:n}=e.getWithExplicit("orient");if(!wn(t)){if(i[t]>0&&!n){const n=wp[t];i[t]>i[n]&&e.set("orient",n,!1)}i[t]++}}}delete o.component.axes[r]}if("independent"===n.axis[r]&&t[r]&&t[r].length>1)for(const[e,n]of(t[r]||[]).entries())e>0&&n.get("grid")&&!n.explicit.grid&&(n.implicit.grid=!1)}}(this)}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleSignals())),hf(this))}assembleLayoutSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleLayoutSignals())),Wf(this))}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleGroupStyle(){const e=new Set;for(const n of this.children)for(const i of t.array(n.assembleGroupStyle()))e.add(i);const n=Array.from(e);return n.length>1?n:1===n.length?n[0]:void 0}assembleTitle(){let e=super.assembleTitle();if(e)return e;for(const t of this.children)if(e=t.assembleTitle(),e)return e}assembleLayout(){return null}assembleMarks(){return function(e,t){for(const n of e.children)qm(n)&&(t=Yc(n,t));return t}(this,this.children.flatMap((e=>e.assembleMarks())))}assembleLegends(){return this.children.reduce(((e,t)=>e.concat(t.assembleLegends())),dd(this))}}function Up(e,t,n,i,r){if(Io(e))return new pp(e,t,n,r);if(il(e))return new qp(e,t,n,i,r);if(Ua(e))return new Lp(e,t,n,i,r);if(function(e){return js(e)||Es(e)||Ts(e)}(e))return new vp(e,t,n,r);throw new Error(Bn(e))}const Wp=n;e.accessPathDepth=q,e.accessPathWithDatum=A,e.accessWithDatumToUnescapedPath=j,e.compile=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;n.logger&&(i=n.logger,wi=i),n.fieldTitle&&ya(n.fieldTitle);try{const i=Js(t.mergeConfig(n.config,e.config)),r=Kl(e,i),o=Up(r,null,"",void 0,i);o.parse(),function(e,t){rm(e.sources);let n=0,i=0;for(let i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;const r=e.config?tl(e.config):void 0,o=function(e,t){const n=[],i=op(n);let r=0;for(const t of e.sources){t.hasName()||(t.dataName="source_"+r++);const e=t.assemble();i(t,e)}for(const e of n)0===e.transform.length&&delete e.transform;let o=0;for(const[e,t]of n.entries())0!==(t.transform??[]).length||t.source||n.splice(o++,0,n.splice(e,1)[0]);for(const t of n)for(const n of t.transform??[])"lookup"===n.type&&(n.from=e.outputNodes[n.from].getSource());for(const e of n)e.name in t&&(e.values=t[e.name]);return n}(e.component.data,n),a=e.assembleSelectionData(o),s=e.assembleProjections(),l=e.assembleTitle(),c=e.assembleGroupStyle(),u=e.assembleGroupEncodeEntry(!0);let f=e.assembleLayoutSignals();f=f.filter((e=>"width"!==e.name&&"height"!==e.name||void 0===e.value||(t[e.name]=+e.value,!1)));const{params:d,...m}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...m,...l?{title:l}:{},...c?{style:c}:{},...u?{encode:{update:u}}:{},data:a,...s.length>0?{projections:s}:{},...e.assembleGroup([...f,...e.assembleSelectionTopLevelSignals([]),...As(d)]),...r?{config:r}:{},...i?{usermeta:i}:{}}}(o,function(e,n,i,r){const o=r.component.layoutSize.get("width"),a=r.component.layoutSize.get("height");void 0===n?(n={type:"pad"},r.hasAxisOrientSignalRef()&&(n.resize=!0)):t.isString(n)&&(n={type:n});if(o&&a&&(s=n.type,["fit","fit-x","fit-y"].includes(s)))if("step"===o&&"step"===a)Si(Yn()),n.type="pad";else if("step"===o||"step"===a){const e="step"===o?"width":"height";Si(Yn(At(e)));const t="width"===e?"height":"width";n.type=function(e){return e?`fit-${At(e)}`:"fit"}(t)}var s;return{...1===D(n).length&&n.type?"pad"===n.type?{}:{autosize:n.type}:{autosize:n},...rc(i,!1),...rc(e,!0)}}(e,r.autosize,i,o),e.datasets,e.usermeta);return{spec:a,normalized:r}}finally{n.logger&&(wi=$i),n.fieldTitle&&ya(ga)}},e.contains=p,e.deepEqual=X,e.deleteNestedProperty=P,e.duplicate=l,e.entries=O,e.every=h,e.fieldIntersection=k,e.flatAccessWithDatum=T,e.getFirstDefined=U,e.hasIntersection=$,e.hasProperty=J,e.hash=d,e.internalField=B,e.isBoolean=z,e.isEmpty=S,e.isEqual=function(e,t){const n=D(e),i=D(t);if(n.length!==i.length)return!1;for(const i of n)if(e[i]!==t[i])return!1;return!0},e.isInternalField=V,e.isNullOrFalse=m,e.isNumeric=G,e.keys=D,e.logicalExpr=_,e.mergeDeep=y,e.never=c,e.normalize=Kl,e.normalizeAngle=H,e.omit=f,e.pick=u,e.prefixGenerator=w,e.removePathFromField=L,e.replaceAll=R,e.replacePathInField=M,e.resetIdCounter=function(){W=42},e.setEqual=x,e.some=g,e.stringify=Q,e.titleCase=N,e.unique=b,e.uniqueId=I,e.vals=F,e.varName=C,e.version=Wp})); -//# sourceMappingURL=vega-lite.min.js.map diff --git a/assets/vendor/vega.min.js b/assets/vendor/vega.min.js deleted file mode 100644 index 414a0f8..0000000 --- a/assets/vendor/vega.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).vega={})}(this,(function(t){"use strict";function e(t,e,n){return t.fields=e||[],t.fname=n,t}function n(t){return null==t?null:t.fname}function r(t){return null==t?null:t.fields}function i(t){return 1===t.length?o(t[0]):a(t)}const o=t=>function(e){return e[t]},a=t=>{const e=t.length;return function(n){for(let r=0;rr&&c(),u=r=i+1):"]"===o&&(u||s("Access path missing open bracket: "+t),u>0&&c(),u=0,r=i+1):i>r?c():r=i+1}return u&&s("Access path missing closing bracket: "+t),a&&s("Access path missing closing quote: "+t),i>r&&(i++,c()),e}function l(t,n,r){const o=u(t);return t=1===o.length?o[0]:t,e((r&&r.get||i)(o),[t],n||t)}const c=l("id"),f=e((t=>t),[],"identity"),h=e((()=>0),[],"zero"),d=e((()=>1),[],"one"),p=e((()=>!0),[],"true"),g=e((()=>!1),[],"false"),m=new Set(Object.getOwnPropertyNames(Object.prototype));function y(t,e,n){const r=[e].concat([].slice.call(n));console[t].apply(console,r)}const v=0,_=1,x=2,b=3,w=4;function k(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y,r=t||v;return{level(t){return arguments.length?(r=+t,this):r},error(){return r>=_&&n(e||"error","ERROR",arguments),this},warn(){return r>=x&&n(e||"warn","WARN",arguments),this},info(){return r>=b&&n(e||"log","INFO",arguments),this},debug(){return r>=w&&n(e||"log","DEBUG",arguments),this}}}var A=Array.isArray;function M(t){return t===Object(t)}const E=t=>"__proto__"!==t;function D(){for(var t=arguments.length,e=new Array(t),n=0;n{for(const n in e)if("signals"===n)t.signals=F(t.signals,e.signals);else{const r="legend"===n?{layout:1}:"style"===n||null;C(t,n,e[n],r)}return t}),{})}function C(t,e,n,r){if(!E(e))return;let i,o;if(M(n)&&!A(n))for(i in o=M(t[e])?t[e]:t[e]={},n)r&&(!0===r||r[i])?C(o,i,n[i]):E(i)&&(o[i]=n[i]);else t[e]=n}function F(t,e){if(null==t)return e;const n={},r=[];function i(t){n[t.name]||(n[t.name]=1,r.push(t))}return e.forEach(i),t.forEach(i),r}function S(t){return t[t.length-1]}function $(t){return null==t||""===t?null:+t}const T=t=>e=>t*Math.exp(e),B=t=>e=>Math.log(t*e),N=t=>e=>Math.sign(e)*Math.log1p(Math.abs(e/t)),z=t=>e=>Math.sign(e)*Math.expm1(Math.abs(e))*t,O=t=>e=>e<0?-Math.pow(-e,t):Math.pow(e,t);function R(t,e,n,r){const i=n(t[0]),o=n(S(t)),a=(o-i)*e;return[r(i-a),r(o-a)]}function L(t,e){return R(t,e,$,f)}function U(t,e){var n=Math.sign(t[0]);return R(t,e,B(n),T(n))}function q(t,e,n){return R(t,e,O(n),O(1/n))}function P(t,e,n){return R(t,e,N(n),z(n))}function j(t,e,n,r,i){const o=r(t[0]),a=r(S(t)),s=null!=e?r(e):(o+a)/2;return[i(s+(o-s)*n),i(s+(a-s)*n)]}function I(t,e,n){return j(t,e,n,$,f)}function W(t,e,n){const r=Math.sign(t[0]);return j(t,e,n,B(r),T(r))}function H(t,e,n,r){return j(t,e,n,O(r),O(1/r))}function Y(t,e,n,r){return j(t,e,n,N(r),z(r))}function G(t){return 1+~~(new Date(t).getMonth()/3)}function V(t){return 1+~~(new Date(t).getUTCMonth()/3)}function X(t){return null!=t?A(t)?t:[t]:[]}function J(t,e,n){let r,i=t[0],o=t[1];return o=n-e?[e,n]:[i=Math.min(Math.max(i,e),n-r),i+r]}function Z(t){return"function"==typeof t}const Q="descending";function K(t,n,i){i=i||{},n=X(n)||[];const o=[],a=[],s={},u=i.comparator||et;return X(t).forEach(((t,e)=>{null!=t&&(o.push(n[e]===Q?-1:1),a.push(t=Z(t)?t:l(t,null,i)),(r(t)||[]).forEach((t=>s[t]=1)))})),0===a.length?null:e(u(a,o),Object.keys(s))}const tt=(t,e)=>(te||null==e)&&null!=t?1:(e=e instanceof Date?+e:e,(t=t instanceof Date?+t:t)!==t&&e==e?-1:e!=e&&t==t?1:0),et=(t,e)=>1===t.length?nt(t[0],e[0]):rt(t,e,t.length),nt=(t,e)=>function(n,r){return tt(t(n),t(r))*e},rt=(t,e,n)=>(e.push(0),function(r,i){let o,a=0,s=-1;for(;0===a&&++st}function ot(t,e){let n;return r=>{n&&clearTimeout(n),n=setTimeout((()=>(e(r),n=null)),t)}}function at(t){for(let e,n,r=1,i=arguments.length;ro&&(o=r))}else{for(r=e(t[a]);ao&&(o=r))}return[i,o]}function ut(t,e){const n=t.length;let r,i,o,a,s,u=-1;if(null==e){for(;++u=i){r=o=i;break}if(u===n)return[-1,-1];for(a=s=u;++ui&&(r=i,a=u),o=i){r=o=i;break}if(u===n)return[-1,-1];for(a=s=u;++ui&&(r=i,a=u),or(t)?n[t]:void 0,set(t,e){return r(t)||(++i.size,n[t]===ct&&--i.empty),n[t]=e,this},delete(t){return r(t)&&(--i.size,++i.empty,n[t]=ct),this},clear(){i.size=i.empty=0,i.object=n={}},test(t){return arguments.length?(e=t,i):e},clean(){const t={};let r=0;for(const i in n){const o=n[i];o===ct||e&&e(o)||(t[i]=o,++r)}i.size=r,i.empty=0,i.object=n=t}};return t&&Object.keys(t).forEach((e=>{i.set(e,t[e])})),i}function ht(t,e,n,r,i,o){if(!n&&0!==n)return o;const a=+n;let s,u=t[0],l=S(t);la&&(i=o,o=a,a=i),r=void 0===r||r,((n=void 0===n||n)?o<=t:ot.replace(/\\(.)/g,"$1"))):X(t));const o=t&&t.length,a=r&&r.get||i,s=t=>a(n?[t]:u(t));let l;if(o)if(1===o){const e=s(t[0]);l=function(t){return""+e(t)}}else{const e=t.map(s);l=function(t){let n=""+e[0](t),r=0;for(;++r{e={},n={},r=0},o=(i,o)=>(++r>t&&(n=e,e={},r=1),e[i]=o);return i(),{clear:i,has:t=>lt(e,t)||lt(n,t),get:t=>lt(e,t)?e[t]:lt(n,t)?o(t,n[t]):void 0,set:(t,n)=>lt(e,t)?e[t]=n:o(t,n)}}function At(t,e,n,r){const i=e.length,o=n.length;if(!o)return e;if(!i)return n;const a=r||new e.constructor(i+o);let s=0,u=0,l=0;for(;s0?n[u++]:e[s++];for(;s=0;)n+=t;return n}function Et(t,e,n,r){const i=n||" ",o=t+"",a=e-o.length;return a<=0?o:"left"===r?Mt(i,a)+o:"center"===r?Mt(i,~~(a/2))+o+Mt(i,Math.ceil(a/2)):o+Mt(i,a)}function Dt(t){return t&&S(t)-t[0]||0}function Ct(t){return A(t)?"["+t.map(Ct)+"]":M(t)||xt(t)?JSON.stringify(t).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):t}function Ft(t){return null==t||""===t?null:!(!t||"false"===t||"0"===t)&&!!t}const St=t=>vt(t)||mt(t)?t:Date.parse(t);function $t(t,e){return e=e||St,null==t||""===t?null:e(t)}function Tt(t){return null==t||""===t?null:t+""}function Bt(t){const e={},n=t.length;for(let r=0;r9999?"+"+It(e,6):It(e,4))+"-"+It(t.getUTCMonth()+1,2)+"-"+It(t.getUTCDate(),2)+(o?"T"+It(n,2)+":"+It(r,2)+":"+It(i,2)+"."+It(o,3)+"Z":i?"T"+It(n,2)+":"+It(r,2)+":"+It(i,2)+"Z":r||n?"T"+It(n,2)+":"+It(r,2)+"Z":"")}function Ht(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,s=0,u=o<=0,l=!1;function c(){if(u)return Rt;if(l)return l=!1,Ot;var e,r,i=a;if(t.charCodeAt(i)===Lt){for(;a++=o?u=!0:(r=t.charCodeAt(a++))===Ut?l=!0:r===qt&&(l=!0,t.charCodeAt(a)===Ut&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a1)r=function(t,e,n){var r,i=[],o=[];function a(t){var e=t<0?~t:t;(o[e]||(o[e]=[])).push({i:t,g:r})}function s(t){t.forEach(a)}function u(t){t.forEach(s)}function l(t){t.forEach(u)}function c(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(c);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":u(t.arcs);break;case"MultiPolygon":l(t.arcs)}}return c(e),o.forEach(null==n?function(t){i.push(t[0].i)}:function(t){n(t[0].g,t[t.length-1].g)&&i.push(t[0].i)}),i}(0,e,n);else for(i=0,r=new Array(o=t.arcs.length);ie?1:t>=e?0:NaN}function te(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function ee(t){let e,n,r;function i(t,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(i>>1;n(t[e],r)<0?i=e+1:o=e}while(iKt(t(e),n),r=(e,n)=>t(e)-n):(e=t===Kt||t===te?t:ne,n=t,r=t),{left:i,center:function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const o=i(t,e,n,(arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length)-1);return o>n&&r(t[o-1],e)>-r(t[o],e)?o-1:o},right:function(t,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(i>>1;n(t[e],r)<=0?i=e+1:o=e}while(i0){for(o=t[--i];i>0&&(e=o,n=t[--i],o=e+n,r=n-(o-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=o+n,n==e-o&&(o=e))}return o}}class ue extends Map{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:de;if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(ce(this,t))}has(t){return super.has(ce(this,t))}set(t,e){return super.set(fe(this,t),e)}delete(t){return super.delete(he(this,t))}}class le extends Set{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:de;if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const e of t)this.add(e)}has(t){return super.has(ce(this,t))}add(t){return super.add(fe(this,t))}delete(t){return super.delete(he(this,t))}}function ce(t,e){let{_intern:n,_key:r}=t;const i=r(e);return n.has(i)?n.get(i):e}function fe(t,e){let{_intern:n,_key:r}=t;const i=r(e);return n.has(i)?n.get(i):(n.set(i,e),e)}function he(t,e){let{_intern:n,_key:r}=t;const i=r(e);return n.has(i)&&(e=n.get(i),n.delete(i)),e}function de(t){return null!==t&&"object"==typeof t?t.valueOf():t}function pe(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(te?1:0)}const ge=Math.sqrt(50),me=Math.sqrt(10),ye=Math.sqrt(2);function ve(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=ge?10:o>=me?5:o>=ye?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(t*l),u=Math.round(e*l),s/le&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(t/l),u=Math.round(e/l),s*le&&--u),u0))return[];if((t=+t)===(e=+e))return[t];const r=e=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let t=0;t=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}function ke(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function Ae(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,i=arguments.length>4?arguments[4]:void 0;if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?pe:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Kt;if(t===Kt)return pe;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}(i);r>n;){if(r-n>600){const o=r-n+1,a=e-n+1,s=Math.log(o),u=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*u*(o-u)/o)*(a-o/2<0?-1:1);Ae(t,e,Math.max(n,Math.floor(e-a*u/o+l)),Math.min(r,Math.floor(e+(o-a)*u/o+l)),i)}const o=t[e];let a=n,s=r;for(Me(t,n,e),i(t[r],o)>0&&Me(t,n,r);a0;)--s}0===i(t[n],o)?Me(t,n,s):(++s,Me(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Me(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Ee(t,e,n){if(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n)),(r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return ke(t);if(e>=1)return we(t);var r,i=(r-1)*e,o=Math.floor(i),a=we(Ae(t,o).subarray(0,o+1));return a+(ke(t.subarray(o+1))-a)*(i-o)}}function De(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:re;if((r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}}function Ce(t,e){return Ee(t,.5,e)}function Fe(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function Se(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Ne(t){return(t=Be(Math.abs(t)))?t[1]:NaN}var ze,Oe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Re(t){if(!(e=Oe.exec(t)))throw new Error("invalid format: "+t);var e;return new Le({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Le(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Ue(t,e){var n=Be(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Re.prototype=Le.prototype,Le.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var qe={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Ue(100*t,e),r:Ue,s:function(t,e){var n=Be(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ze=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Be(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Pe(t){return t}var je,Ie,We,He=Array.prototype.map,Ye=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ge(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Pe:(e=He.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Pe:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(He.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Re(t)).fill,n=t.align,f=t.sign,h=t.symbol,d=t.zero,p=t.width,g=t.comma,m=t.precision,y=t.trim,v=t.type;"n"===v?(g=!0,v="g"):qe[v]||(void 0===m&&(m=12),y=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?o:/[%p]/.test(v)?u:"",b=qe[v],w=/[defgprs%]/.test(v);function k(t){var i,o,u,h=_,k=x;if("c"===v)k=b(t)+k,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:b(Math.abs(t),m),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),A&&0==+t&&"+"!==f&&(A=!1),h=(A?"("===f?f:l:"-"===f||"("===f?"":f)+h,k=("s"===v?Ye[8+ze/3]:"")+k+(A&&"("===f?")":""),w)for(i=-1,o=t.length;++i(u=t.charCodeAt(i))||u>57){k=(46===u?a+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var M=h.length+t.length+k.length,E=M>1)+h+t+k+E.slice(M);break;default:t=E+h+t+k}return s(t)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),k.toString=function(){return t+""},k}return{format:f,formatPrefix:function(t,e){var n=f(((t=Re(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ne(e)/3))),i=Math.pow(10,-r),o=Ye[8+r/3];return function(t){return n(i*t)+o}}}}function Ve(t){return Math.max(0,-Ne(Math.abs(t)))}function Xe(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ne(e)/3)))-Ne(Math.abs(t)))}function Je(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ne(e)-Ne(t))+1}!function(t){je=Ge(t),Ie=je.format,We=je.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const Ze=new Date,Qe=new Date;function Ke(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n0))return a;let s;do{a.push(s=new Date(+n)),e(n,o),t(n)}while(sKe((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(Ze.setTime(+e),Qe.setTime(+r),t(Ze),t(Qe),Math.floor(n(Ze,Qe))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const tn=Ke((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));tn.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Ke((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):tn:null),tn.range;const en=1e3,nn=6e4,rn=36e5,on=864e5,an=6048e5,sn=2592e6,un=31536e6,ln=Ke((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*en)}),((t,e)=>(e-t)/en),(t=>t.getUTCSeconds()));ln.range;const cn=Ke((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*en)}),((t,e)=>{t.setTime(+t+e*nn)}),((t,e)=>(e-t)/nn),(t=>t.getMinutes()));cn.range;const fn=Ke((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*nn)}),((t,e)=>(e-t)/nn),(t=>t.getUTCMinutes()));fn.range;const hn=Ke((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*en-t.getMinutes()*nn)}),((t,e)=>{t.setTime(+t+e*rn)}),((t,e)=>(e-t)/rn),(t=>t.getHours()));hn.range;const dn=Ke((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*rn)}),((t,e)=>(e-t)/rn),(t=>t.getUTCHours()));dn.range;const pn=Ke((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*nn)/on),(t=>t.getDate()-1));pn.range;const gn=Ke((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/on),(t=>t.getUTCDate()-1));gn.range;const mn=Ke((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/on),(t=>Math.floor(t/on)));function yn(t){return Ke((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*nn)/an))}mn.range;const vn=yn(0),_n=yn(1),xn=yn(2),bn=yn(3),wn=yn(4),kn=yn(5),An=yn(6);function Mn(t){return Ke((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/an))}vn.range,_n.range,xn.range,bn.range,wn.range,kn.range,An.range;const En=Mn(0),Dn=Mn(1),Cn=Mn(2),Fn=Mn(3),Sn=Mn(4),$n=Mn(5),Tn=Mn(6);En.range,Dn.range,Cn.range,Fn.range,Sn.range,$n.range,Tn.range;const Bn=Ke((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));Bn.range;const Nn=Ke((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));Nn.range;const zn=Ke((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));zn.every=t=>isFinite(t=Math.floor(t))&&t>0?Ke((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null,zn.range;const On=Ke((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Rn(t,e,n,r,i,o){const a=[[ln,1,en],[ln,5,5e3],[ln,15,15e3],[ln,30,3e4],[o,1,nn],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,rn],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,on],[r,2,1728e5],[n,1,an],[e,1,sn],[e,3,7776e6],[t,1,un]];function s(e,n,r){const i=Math.abs(n-e)/r,o=ee((t=>{let[,,e]=t;return e})).right(a,i);if(o===a.length)return t.every(be(e/un,n/un,r));if(0===o)return tn.every(Math.max(be(e,n,r),1));const[s,u]=a[i/a[o-1][2]isFinite(t=Math.floor(t))&&t>0?Ke((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null,On.range;const[Ln,Un]=Rn(On,Nn,En,mn,dn,fn),[qn,Pn]=Rn(zn,Bn,vn,pn,hn,cn),jn="year",In="quarter",Wn="month",Hn="week",Yn="date",Gn="day",Vn="dayofyear",Xn="hours",Jn="minutes",Zn="seconds",Qn="milliseconds",Kn=[jn,In,Wn,Hn,Yn,Gn,Vn,Xn,Jn,Zn,Qn],tr=Kn.reduce(((t,e,n)=>(t[e]=1+n,t)),{});function er(t){const e=X(t).slice(),n={};e.length||s("Missing time unit."),e.forEach((t=>{lt(tr,t)?n[t]=1:s(`Invalid time unit: ${t}.`)}));return(n[Hn]||n[Gn]?1:0)+(n[In]||n[Wn]||n[Yn]?1:0)+(n[Vn]?1:0)>1&&s(`Incompatible time units: ${t}`),e.sort(((t,e)=>tr[t]-tr[e])),e}const nr={[jn]:"%Y ",[In]:"Q%q ",[Wn]:"%b ",[Yn]:"%d ",[Hn]:"W%U ",[Gn]:"%a ",[Vn]:"%j ",[Xn]:"%H:00",[Jn]:"00:%M",[Zn]:":%S",[Qn]:".%L",[`${jn}-${Wn}`]:"%Y-%m ",[`${jn}-${Wn}-${Yn}`]:"%Y-%m-%d ",[`${Xn}-${Jn}`]:"%H:%M"};function rr(t,e){const n=at({},nr,e),r=er(t),i=r.length;let o,a,s="",u=0;for(u=0;uu;--o)if(a=r.slice(u,o).join("-"),null!=n[a]){s+=n[a],u=o;break}return s.trim()}const ir=new Date;function or(t){return ir.setFullYear(t),ir.setMonth(0),ir.setDate(1),ir.setHours(0,0,0,0),ir}function ar(t){return ur(new Date(t))}function sr(t){return lr(new Date(t))}function ur(t){return pn.count(or(t.getFullYear())-1,t)}function lr(t){return vn.count(or(t.getFullYear())-1,t)}function cr(t){return or(t).getDay()}function fr(t,e,n,r,i,o,a){if(0<=t&&t<100){const s=new Date(-1,e,n,r,i,o,a);return s.setFullYear(t),s}return new Date(t,e,n,r,i,o,a)}function hr(t){return pr(new Date(t))}function dr(t){return gr(new Date(t))}function pr(t){const e=Date.UTC(t.getUTCFullYear(),0,1);return gn.count(e-1,t)}function gr(t){const e=Date.UTC(t.getUTCFullYear(),0,1);return En.count(e-1,t)}function mr(t){return ir.setTime(Date.UTC(t,0,1)),ir.getUTCDay()}function yr(t,e,n,r,i,o,a){if(0<=t&&t<100){const t=new Date(Date.UTC(-1,e,n,r,i,o,a));return t.setUTCFullYear(n.y),t}return new Date(Date.UTC(t,e,n,r,i,o,a))}function vr(t,e,n,r,i){const o=e||1,a=S(t),s=(t,e,i)=>function(t,e,n,r){const i=n<=1?t:r?(e,i)=>r+n*Math.floor((t(e,i)-r)/n):(e,r)=>n*Math.floor(t(e,r)/n);return e?(t,n)=>e(i(t,n),n):i}(n[i=i||t],r[i],t===a&&o,e),u=new Date,l=Bt(t),c=l[jn]?s(jn):it(2012),f=l[Wn]?s(Wn):l[In]?s(In):h,p=l[Hn]&&l[Gn]?s(Gn,1,Hn+Gn):l[Hn]?s(Hn,1):l[Gn]?s(Gn,1):l[Yn]?s(Yn,1):l[Vn]?s(Vn,1):d,g=l[Xn]?s(Xn):h,m=l[Jn]?s(Jn):h,y=l[Zn]?s(Zn):h,v=l[Qn]?s(Qn):h;return function(t){u.setTime(+t);const e=c(u);return i(e,f(u),p(u,e),g(u),m(u),y(u),v(u))}}function _r(t,e,n){return e+7*t-(n+6)%7}const xr={[jn]:t=>t.getFullYear(),[In]:t=>Math.floor(t.getMonth()/3),[Wn]:t=>t.getMonth(),[Yn]:t=>t.getDate(),[Xn]:t=>t.getHours(),[Jn]:t=>t.getMinutes(),[Zn]:t=>t.getSeconds(),[Qn]:t=>t.getMilliseconds(),[Vn]:t=>ur(t),[Hn]:t=>lr(t),[Hn+Gn]:(t,e)=>_r(lr(t),t.getDay(),cr(e)),[Gn]:(t,e)=>_r(1,t.getDay(),cr(e))},br={[In]:t=>3*t,[Hn]:(t,e)=>_r(t,0,cr(e))};function wr(t,e){return vr(t,e||1,xr,br,fr)}const kr={[jn]:t=>t.getUTCFullYear(),[In]:t=>Math.floor(t.getUTCMonth()/3),[Wn]:t=>t.getUTCMonth(),[Yn]:t=>t.getUTCDate(),[Xn]:t=>t.getUTCHours(),[Jn]:t=>t.getUTCMinutes(),[Zn]:t=>t.getUTCSeconds(),[Qn]:t=>t.getUTCMilliseconds(),[Vn]:t=>pr(t),[Hn]:t=>gr(t),[Gn]:(t,e)=>_r(1,t.getUTCDay(),mr(e)),[Hn+Gn]:(t,e)=>_r(gr(t),t.getUTCDay(),mr(e))},Ar={[In]:t=>3*t,[Hn]:(t,e)=>_r(t,0,mr(e))};function Mr(t,e){return vr(t,e||1,kr,Ar,yr)}const Er={[jn]:zn,[In]:Bn.every(3),[Wn]:Bn,[Hn]:vn,[Yn]:pn,[Gn]:pn,[Vn]:pn,[Xn]:hn,[Jn]:cn,[Zn]:ln,[Qn]:tn},Dr={[jn]:On,[In]:Nn.every(3),[Wn]:Nn,[Hn]:En,[Yn]:gn,[Gn]:gn,[Vn]:gn,[Xn]:dn,[Jn]:fn,[Zn]:ln,[Qn]:tn};function Cr(t){return Er[t]}function Fr(t){return Dr[t]}function Sr(t,e,n){return t?t.offset(e,n):void 0}function $r(t,e,n){return Sr(Cr(t),e,n)}function Tr(t,e,n){return Sr(Fr(t),e,n)}function Br(t,e,n,r){return t?t.range(e,n,r):void 0}function Nr(t,e,n,r){return Br(Cr(t),e,n,r)}function zr(t,e,n,r){return Br(Fr(t),e,n,r)}const Or=1e3,Rr=6e4,Lr=36e5,Ur=864e5,qr=2592e6,Pr=31536e6,jr=[jn,Wn,Yn,Xn,Jn,Zn,Qn],Ir=jr.slice(0,-1),Wr=Ir.slice(0,-1),Hr=Wr.slice(0,-1),Yr=Hr.slice(0,-1),Gr=[jn,Wn],Vr=[jn],Xr=[[Ir,1,Or],[Ir,5,5e3],[Ir,15,15e3],[Ir,30,3e4],[Wr,1,Rr],[Wr,5,3e5],[Wr,15,9e5],[Wr,30,18e5],[Hr,1,Lr],[Hr,3,108e5],[Hr,6,216e5],[Hr,12,432e5],[Yr,1,Ur],[[jn,Hn],1,6048e5],[Gr,1,qr],[Gr,3,7776e6],[Vr,1,Pr]];function Jr(t){const e=t.extent,n=t.maxbins||40,r=Math.abs(Dt(e))/n;let i,o,a=ee((t=>t[2])).right(Xr,r);return a===Xr.length?(i=Vr,o=be(e[0]/Pr,e[1]/Pr,n)):a?(a=Xr[r/Xr[a-1][2]=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:wo,s:ko,S:ji,u:Ii,U:Wi,V:Yi,w:Gi,W:Vi,x:null,X:null,y:Xi,Y:Zi,Z:Ki,"%":bo},x={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:to,e:to,f:oo,g:yo,G:_o,H:eo,I:no,j:ro,L:io,m:ao,M:so,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:wo,s:ko,S:uo,u:lo,U:co,V:ho,w:po,W:go,x:null,X:null,y:mo,Y:vo,Z:xo,"%":bo},b={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return A(t,e,n,r)},d:Ai,e:Ai,f:Si,g:xi,G:_i,H:Ei,I:Ei,j:Mi,L:Fi,m:ki,M:Di,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:wi,Q:Ti,s:Bi,S:Ci,u:gi,U:mi,V:yi,w:pi,W:vi,x:function(t,e,r){return A(t,n,e,r)},X:function(t,e,n){return A(t,r,e,n)},y:xi,Y:_i,Z:bi,"%":$i};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Qr(Kr(o.y,0,1))).getUTCDay(),r=i>4||0===i?Dn.ceil(r):Dn(r),r=gn.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Zr(Kr(o.y,0,1))).getDay(),r=i>4||0===i?_n.ceil(r):_n(r),r=pn.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Qr(Kr(o.y,0,1)).getUTCDay():Zr(Kr(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Qr(o)):Zr(o)}}function A(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=b[i in ai?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=w(n,_),_.X=w(r,_),_.c=w(e,_),x.x=w(n,x),x.X=w(r,x),x.c=w(e,x),{format:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var ei,ni,ri,ii,oi,ai={"-":"",_:" ",0:"0"},si=/^\s*\d+/,ui=/^%/,li=/[\\^$*+?|[\]().{}]/g;function ci(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o[t.toLowerCase(),e])))}function pi(t,e,n){var r=si.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function gi(t,e,n){var r=si.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function mi(t,e,n){var r=si.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function yi(t,e,n){var r=si.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function vi(t,e,n){var r=si.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function _i(t,e,n){var r=si.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function xi(t,e,n){var r=si.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function bi(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function wi(t,e,n){var r=si.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function ki(t,e,n){var r=si.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ai(t,e,n){var r=si.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Mi(t,e,n){var r=si.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ei(t,e,n){var r=si.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Di(t,e,n){var r=si.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Ci(t,e,n){var r=si.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Fi(t,e,n){var r=si.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Si(t,e,n){var r=si.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function $i(t,e,n){var r=ui.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ti(t,e,n){var r=si.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Bi(t,e,n){var r=si.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ni(t,e){return ci(t.getDate(),e,2)}function zi(t,e){return ci(t.getHours(),e,2)}function Oi(t,e){return ci(t.getHours()%12||12,e,2)}function Ri(t,e){return ci(1+pn.count(zn(t),t),e,3)}function Li(t,e){return ci(t.getMilliseconds(),e,3)}function Ui(t,e){return Li(t,e)+"000"}function qi(t,e){return ci(t.getMonth()+1,e,2)}function Pi(t,e){return ci(t.getMinutes(),e,2)}function ji(t,e){return ci(t.getSeconds(),e,2)}function Ii(t){var e=t.getDay();return 0===e?7:e}function Wi(t,e){return ci(vn.count(zn(t)-1,t),e,2)}function Hi(t){var e=t.getDay();return e>=4||0===e?wn(t):wn.ceil(t)}function Yi(t,e){return t=Hi(t),ci(wn.count(zn(t),t)+(4===zn(t).getDay()),e,2)}function Gi(t){return t.getDay()}function Vi(t,e){return ci(_n.count(zn(t)-1,t),e,2)}function Xi(t,e){return ci(t.getFullYear()%100,e,2)}function Ji(t,e){return ci((t=Hi(t)).getFullYear()%100,e,2)}function Zi(t,e){return ci(t.getFullYear()%1e4,e,4)}function Qi(t,e){var n=t.getDay();return ci((t=n>=4||0===n?wn(t):wn.ceil(t)).getFullYear()%1e4,e,4)}function Ki(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ci(e/60|0,"0",2)+ci(e%60,"0",2)}function to(t,e){return ci(t.getUTCDate(),e,2)}function eo(t,e){return ci(t.getUTCHours(),e,2)}function no(t,e){return ci(t.getUTCHours()%12||12,e,2)}function ro(t,e){return ci(1+gn.count(On(t),t),e,3)}function io(t,e){return ci(t.getUTCMilliseconds(),e,3)}function oo(t,e){return io(t,e)+"000"}function ao(t,e){return ci(t.getUTCMonth()+1,e,2)}function so(t,e){return ci(t.getUTCMinutes(),e,2)}function uo(t,e){return ci(t.getUTCSeconds(),e,2)}function lo(t){var e=t.getUTCDay();return 0===e?7:e}function co(t,e){return ci(En.count(On(t)-1,t),e,2)}function fo(t){var e=t.getUTCDay();return e>=4||0===e?Sn(t):Sn.ceil(t)}function ho(t,e){return t=fo(t),ci(Sn.count(On(t),t)+(4===On(t).getUTCDay()),e,2)}function po(t){return t.getUTCDay()}function go(t,e){return ci(Dn.count(On(t)-1,t),e,2)}function mo(t,e){return ci(t.getUTCFullYear()%100,e,2)}function yo(t,e){return ci((t=fo(t)).getUTCFullYear()%100,e,2)}function vo(t,e){return ci(t.getUTCFullYear()%1e4,e,4)}function _o(t,e){var n=t.getUTCDay();return ci((t=n>=4||0===n?Sn(t):Sn.ceil(t)).getUTCFullYear()%1e4,e,4)}function xo(){return"+0000"}function bo(){return"%"}function wo(t){return+t}function ko(t){return Math.floor(+t/1e3)}function Ao(t){const e={};return n=>e[n]||(e[n]=t(n))}function Mo(t){const e=Ao(t.format),n=t.formatPrefix;return{format:e,formatPrefix:n,formatFloat(t){const n=Re(t||",");if(null==n.precision){switch(n.precision=12,n.type){case"%":n.precision-=2;break;case"e":n.precision-=1}return r=e(n),i=e(".1f")(1)[1],t=>{const e=r(t),n=e.indexOf(i);if(n<0)return e;let o=function(t,e){let n,r=t.lastIndexOf("e");if(r>0)return r;for(r=t.length;--r>e;)if(n=t.charCodeAt(r),n>=48&&n<=57)return r+1}(e,n);const a=on;)if("0"!==e[o]){++o;break}return e.slice(0,o)+a}}return e(n);var r,i},formatSpan(t,r,i,o){o=Re(null==o?",f":o);const a=be(t,r,i),s=Math.max(Math.abs(t),Math.abs(r));let u;if(null==o.precision)switch(o.type){case"s":return isNaN(u=Xe(a,s))||(o.precision=u),n(o,s);case"":case"e":case"g":case"p":case"r":isNaN(u=Je(a,s))||(o.precision=u-("e"===o.type));break;case"f":case"%":isNaN(u=Ve(a))||(o.precision=u-2*("%"===o.type))}return e(o)}}}let Eo,Do;function Co(){return Eo=Mo({format:Ie,formatPrefix:We})}function Fo(t){return Mo(Ge(t))}function So(t){return arguments.length?Eo=Fo(t):Eo}function $o(t,e,n){M(n=n||{})||s(`Invalid time multi-format specifier: ${n}`);const r=e(Zn),i=e(Jn),o=e(Xn),a=e(Yn),u=e(Hn),l=e(Wn),c=e(In),f=e(jn),h=t(n[Qn]||".%L"),d=t(n[Zn]||":%S"),p=t(n[Jn]||"%I:%M"),g=t(n[Xn]||"%I %p"),m=t(n[Yn]||n[Gn]||"%a %d"),y=t(n[Hn]||"%b %d"),v=t(n[Wn]||"%B"),_=t(n[In]||"%B"),x=t(n[jn]||"%Y");return t=>(r(t)xt(t)?e(t):$o(e,Cr,t),utcFormat:t=>xt(t)?n(t):$o(n,Fr,t),timeParse:Ao(t.parse),utcParse:Ao(t.utcParse)}}function Bo(){return Do=To({format:ni,parse:ri,utcFormat:ii,utcParse:oi})}function No(t){return To(ti(t))}function zo(t){return arguments.length?Do=No(t):Do}!function(t){ei=ti(t),ni=ei.format,ri=ei.parse,ii=ei.utcFormat,oi=ei.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Co(),Bo();const Oo=(t,e)=>at({},t,e);function Ro(t,e){const n=t?Fo(t):So(),r=e?No(e):zo();return Oo(n,r)}function Lo(t,e){const n=arguments.length;return n&&2!==n&&s("defaultLocale expects either zero or two arguments."),n?Oo(So(t),zo(e)):Oo(So(),zo())}const Uo=/^(data:|([A-Za-z]+:)?\/\/)/,qo=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,Po=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,jo="file://";async function Io(t,e){const n=await this.sanitize(t,e),r=n.href;return n.localFile?this.file(r):this.http(r,e)}async function Wo(t,e){e=at({},this.options,e);const n=this.fileAccess,r={href:null};let i,o,a;const u=qo.test(t.replace(Po,""));null!=t&&"string"==typeof t&&u||s("Sanitize failure, invalid URI: "+Ct(t));const l=Uo.test(t);return(a=e.baseURL)&&!l&&(t.startsWith("/")||a.endsWith("/")||(t="/"+t),t=a+t),o=(i=t.startsWith(jo))||"file"===e.mode||"http"!==e.mode&&!l&&n,i?t=t.slice(jo.length):t.startsWith("//")&&("file"===e.defaultProtocol?(t=t.slice(2),o=!0):t=(e.defaultProtocol||"http")+":"+t),Object.defineProperty(r,"localFile",{value:!!o}),r.href=t,e.target&&(r.target=e.target+""),e.rel&&(r.rel=e.rel+""),"image"===e.context&&e.crossOrigin&&(r.crossOrigin=e.crossOrigin+""),r}function Ho(t){return Yo}async function Yo(){s("No file system access.")}function Go(t){return t?async function(e,n){const r=at({},this.options.http,n),i=n&&n.response,o=await t(e,r);return o.ok?Z(o[i])?o[i]():o.text():s(o.status+""+o.statusText)}:Vo}async function Vo(){s("No HTTP fetch method available.")}const Xo=t=>null!=t&&t==t,Jo=t=>!(Number.isNaN(+t)||t instanceof Date),Zo={boolean:Ft,integer:$,number:$,date:$t,string:Tt,unknown:f},Qo=[t=>"true"===t||"false"===t||!0===t||!1===t,t=>Jo(t)&&Number.isInteger(+t),Jo,t=>!Number.isNaN(Date.parse(t))],Ko=["boolean","integer","number","date"];function ta(t,e){if(!t||!t.length)return"unknown";const n=t.length,r=Qo.length,i=Qo.map(((t,e)=>e+1));for(let o,a,s=0,u=0;s0===t?e:t),0)-1]}function ea(t,e){return e.reduce(((e,n)=>(e[n]=ta(t,n),e)),{})}function na(t){const e=function(e,n){const r={delimiter:t};return ra(e,n?at(n,r):r)};return e.responseType="text",e}function ra(t,e){return e.header&&(t=e.header.map(Ct).join(e.delimiter)+"\n"+t),Ht(e.delimiter).parse(t+"")}function ia(t,e){const n=e&&e.property?l(e.property):f;return!M(t)||(r=t,"function"==typeof Buffer&&Z(Buffer.isBuffer)&&Buffer.isBuffer(r))?n(JSON.parse(t)):function(t,e){!A(t)&&yt(t)&&(t=[...t]);return e&&e.copy?JSON.parse(JSON.stringify(t)):t}(n(t),e);var r}ra.responseType="text",ia.responseType="json";const oa={interior:(t,e)=>t!==e,exterior:(t,e)=>t===e};function aa(t,e){let n,r,i,o;return t=ia(t,e),e&&e.feature?(n=Gt,i=e.feature):e&&e.mesh?(n=Zt,i=e.mesh,o=oa[e.filter]):s("Missing TopoJSON feature or mesh parameter."),r=(r=t.objects[i])?n(t,r,o):s("Invalid TopoJSON object: "+i),r&&r.features||[r]}aa.responseType="json";const sa={dsv:ra,csv:na(","),tsv:na("\t"),json:ia,topojson:aa};function ua(t,e){return arguments.length>1?(sa[t]=e,this):lt(sa,t)?sa[t]:null}function la(t){const e=ua(t);return e&&e.responseType||"text"}function ca(t,e,n,r){const i=ua((e=e||{}).type||"json");return i||s("Unknown data format type: "+e.type),t=i(t,e),e.parse&&function(t,e,n,r){if(!t.length)return;const i=zo();n=n||i.timeParse,r=r||i.utcParse;let o,a,s,u,l,c,f=t.columns||Object.keys(t[0]);"auto"===e&&(e=ea(t,f));f=Object.keys(e);const h=f.map((t=>{const i=e[t];let o,a;if(i&&(i.startsWith("date:")||i.startsWith("utc:"))){o=i.split(/:(.+)?/,2),a=o[1],("'"===a[0]&&"'"===a[a.length-1]||'"'===a[0]&&'"'===a[a.length-1])&&(a=a.slice(1,-1));return("utc"===o[0]?r:n)(a)}if(!Zo[i])throw Error("Illegal format pattern: "+t+":"+i);return Zo[i]}));for(s=0,l=t.length,c=f.length;s({options:e||{},sanitize:Wo,load:Io,fileAccess:!1,file:Ho(),http:Go(t)})}("undefined"!=typeof fetch&&fetch);function ha(t){const e=t||f,n=[],r={};return n.add=t=>{const i=e(t);return r[i]||(r[i]=1,n.push(t)),n},n.remove=t=>{const i=e(t);if(r[i]){r[i]=0;const e=n.indexOf(t);e>=0&&n.splice(e,1)}return n},n}async function da(t,e){try{await e(t)}catch(e){t.error(e)}}const pa=Symbol("vega_id");let ga=1;function ma(t){return!(!t||!ya(t))}function ya(t){return t[pa]}function va(t,e){return t[pa]=e,t}function _a(t){const e=t===Object(t)?t:{data:t};return ya(e)?e:va(e,ga++)}function xa(t){return ba(t,_a({}))}function ba(t,e){for(const n in t)e[n]=t[n];return e}function wa(t,e){return va(e,ya(t))}function ka(t,e){return t?e?(n,r)=>t(n,r)||ya(e(n))-ya(e(r)):(e,n)=>t(e,n)||ya(e)-ya(n):null}function Aa(t){return t&&t.constructor===Ma}function Ma(){const t=[],e=[],n=[],r=[],i=[];let o=null,a=!1;return{constructor:Ma,insert(e){const n=X(e),r=n.length;for(let e=0;e{p(t)&&(l[ya(t)]=-1)}));for(f=0,h=t.length;f0&&(y(g,p,d.value),s.modifies(p));for(f=0,h=i.length;f{p(t)&&l[ya(t)]>0&&y(t,d.field,d.value)})),s.modifies(d.field);if(a)s.mod=e.length||r.length?u.filter((t=>l[ya(t)]>0)):u.slice();else for(m in c)s.mod.push(c[m]);return(o||null==o&&(e.length||r.length))&&s.clean(!0),s}}}const Ea="_:mod:_";function Da(){Object.defineProperty(this,Ea,{writable:!0,value:{}})}Da.prototype={set(t,e,n,r){const i=this,o=i[t],a=i[Ea];return null!=e&&e>=0?(o[e]!==n||r)&&(o[e]=n,a[e+":"+t]=-1,a[t]=-1):(o!==n||r)&&(i[t]=n,a[t]=A(n)?1+n.length:-1),i},modified(t,e){const n=this[Ea];if(!arguments.length){for(const t in n)if(n[t])return!0;return!1}if(A(t)){for(let e=0;e=0?e+1{a instanceof Sa?(a!==this&&(e&&a.targets().add(this),o.push(a)),i.push({op:a,name:t,index:n})):r.set(t,n,a)};for(a in t)if(u=t[a],"pulse"===a)X(u).forEach((t=>{t instanceof Sa?t!==this&&(t.targets().add(this),o.push(t)):s("Pulse parameters must be operator instances.")})),this.source=u;else if(A(u))for(r.set(a,-1,Array(l=u.length)),c=0;c{const n=Date.now();return n-e>t?(e=n,1):0}))},debounce(t){const e=Na();return this.targets().add(Na(null,null,ot(t,(t=>{const n=t.dataflow;e.receive(t),n&&n.run&&n.run()})))),e},between(t,e){let n=!1;return t.targets().add(Na(null,null,(()=>n=!0))),e.targets().add(Na(null,null,(()=>n=!1))),this.filter((()=>n))},detach(){this._filter=p,this._targets=null}};const za={skip:!0};function Oa(t,e,n,r,i,o){const a=at({},o,za);let s,u;Z(n)||(n=it(n)),void 0===r?s=e=>t.touch(n(e)):Z(r)?(u=new Sa(null,r,i,!1),s=e=>{u.evaluate(e);const r=n(e),i=u.value;Aa(i)?t.pulse(r,i,o):t.update(r,i,a)}):s=e=>t.update(n(e),r,a),e.apply(s)}function Ra(t,e,n,r,i,o){if(void 0===r)e.targets().add(n);else{const a=o||{},s=new Sa(null,function(t,e){return e=Z(e)?e:it(e),t?function(n,r){const i=e(n,r);return t.skip()||(t.skip(i!==this.value).value=i),i}:e}(n,r),i,!1);s.modified(a.force),s.rank=e.rank,e.targets().add(s),n&&(s.skip(!0),s.value=n.value,s.targets().add(n),t.connect(n,[s]))}}const La={};function Ua(t,e,n){this.dataflow=t,this.stamp=null==e?-1:e,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}function qa(t,e){const n=[];return zt(t,e,(t=>n.push(t))),n}function Pa(t,e){const n={};return t.visit(e,(t=>{n[ya(t)]=1})),t=>n[ya(t)]?null:t}function ja(t,e){return t?(n,r)=>t(n,r)&&e(n,r):e}function Ia(t,e,n,r){const i=this;let o=0;this.dataflow=t,this.stamp=e,this.fields=null,this.encode=r||null,this.pulses=n;for(const t of n)if(t.stamp===e){if(t.fields){const e=i.fields||(i.fields={});for(const n in t.fields)e[n]=1}t.changed(i.ADD)&&(o|=i.ADD),t.changed(i.REM)&&(o|=i.REM),t.changed(i.MOD)&&(o|=i.MOD)}this.changes=o}function Wa(t){return t.error("Dataflow already running. Use runAsync() to chain invocations."),t}Ua.prototype={StopPropagation:La,ADD:1,REM:2,MOD:4,ADD_REM:3,ADD_MOD:5,ALL:7,REFLOW:8,SOURCE:16,NO_SOURCE:32,NO_FIELDS:64,fork(t){return new Ua(this.dataflow).init(this,t)},clone(){const t=this.fork(7);return t.add=t.add.slice(),t.rem=t.rem.slice(),t.mod=t.mod.slice(),t.source&&(t.source=t.source.slice()),t.materialize(23)},addAll(){let t=this;return!t.source||t.add===t.rem||!t.rem.length&&t.source.length===t.add.length||(t=new Ua(this.dataflow).init(this),t.add=t.source,t.rem=[]),t},init(t,e){const n=this;return n.stamp=t.stamp,n.encode=t.encode,!t.fields||64&e||(n.fields=t.fields),1&e?(n.addF=t.addF,n.add=t.add):(n.addF=null,n.add=[]),2&e?(n.remF=t.remF,n.rem=t.rem):(n.remF=null,n.rem=[]),4&e?(n.modF=t.modF,n.mod=t.mod):(n.modF=null,n.mod=[]),32&e?(n.srcF=null,n.source=null):(n.srcF=t.srcF,n.source=t.source,t.cleans&&(n.cleans=t.cleans)),n},runAfter(t){this.dataflow.runAfter(t)},changed(t){const e=t||7;return 1&e&&this.add.length||2&e&&this.rem.length||4&e&&this.mod.length},reflow(t){if(t)return this.fork(7).reflow();const e=this.add.length,n=this.source&&this.source.length;return n&&n!==e&&(this.mod=this.source,e&&this.filter(4,Pa(this,1))),this},clean(t){return arguments.length?(this.cleans=!!t,this):this.cleans},modifies(t){const e=this.fields||(this.fields={});return A(t)?t.forEach((t=>e[t]=!0)):e[t]=!0,this},modified(t,e){const n=this.fields;return!(!e&&!this.mod.length||!n)&&(arguments.length?A(t)?t.some((t=>n[t])):n[t]:!!n)},filter(t,e){const n=this;return 1&t&&(n.addF=ja(n.addF,e)),2&t&&(n.remF=ja(n.remF,e)),4&t&&(n.modF=ja(n.modF,e)),16&t&&(n.srcF=ja(n.srcF,e)),n},materialize(t){const e=this;return 1&(t=t||7)&&e.addF&&(e.add=qa(e.add,e.addF),e.addF=null),2&t&&e.remF&&(e.rem=qa(e.rem,e.remF),e.remF=null),4&t&&e.modF&&(e.mod=qa(e.mod,e.modF),e.modF=null),16&t&&e.srcF&&(e.source=e.source.filter(e.srcF),e.srcF=null),e},visit(t,e){const n=this,r=e;if(16&t)return zt(n.source,n.srcF,r),n;1&t&&zt(n.add,n.addF,r),2&t&&zt(n.rem,n.remF,r),4&t&&zt(n.mod,n.modF,r);const i=n.source;if(8&t&&i){const t=n.add.length+n.mod.length;t===i.length||zt(i,t?Pa(n,5):n.srcF,r)}return n}},dt(Ia,Ua,{fork(t){const e=new Ua(this.dataflow).init(this,t&this.NO_FIELDS);return void 0!==t&&(t&e.ADD&&this.visit(e.ADD,(t=>e.add.push(t))),t&e.REM&&this.visit(e.REM,(t=>e.rem.push(t))),t&e.MOD&&this.visit(e.MOD,(t=>e.mod.push(t)))),e},changed(t){return this.changes&t},modified(t){const e=this,n=e.fields;return n&&e.changes&e.MOD?A(t)?t.some((t=>n[t])):n[t]:0},filter(){s("MultiPulse does not support filtering.")},materialize(){s("MultiPulse does not support materialization.")},visit(t,e){const n=this,r=n.pulses,i=r.length;let o=0;if(t&n.SOURCE)for(;oe=[],size:()=>e.length,peek:()=>e[0],push:n=>(e.push(n),Ga(e,0,e.length-1,t)),pop:()=>{const n=e.pop();let r;return e.length?(r=e[0],e[0]=n,function(t,e,n){const r=e,i=t.length,o=t[e];let a,s=1+(e<<1);for(;s=0&&(s=a),t[e]=t[s],s=1+((e=s)<<1);t[e]=o,Ga(t,r,e,n)}(e,0,t)):r=n,r}}}function Ga(t,e,n,r){let i,o;const a=t[n];for(;n>e&&(o=n-1>>1,i=t[o],r(a,i)<0);)t[n]=i,n=o;return t[n]=a}function Va(){this.logger(k()),this.logLevel(_),this._clock=0,this._rank=0,this._locale=Lo();try{this._loader=fa()}catch(t){}this._touched=ha(c),this._input={},this._pulse=null,this._heap=Ya(((t,e)=>t.qrank-e.qrank)),this._postrun=[]}function Xa(t){return function(){return this._log[t].apply(this,arguments)}}function Ja(t,e){Sa.call(this,t,null,e)}Va.prototype={stamp(){return this._clock},loader(t){return arguments.length?(this._loader=t,this):this._loader},locale(t){return arguments.length?(this._locale=t,this):this._locale},logger(t){return arguments.length?(this._log=t,this):this._log},error:Xa("error"),warn:Xa("warn"),info:Xa("info"),debug:Xa("debug"),logLevel:Xa("level"),cleanThreshold:1e4,add:function(t,e,n,r){let i,o=1;return t instanceof Sa?i=t:t&&t.prototype instanceof Sa?i=new t:Z(t)?i=new Sa(null,t):(o=0,i=new Sa(t,e)),this.rank(i),o&&(r=n,n=e),n&&this.connect(i,i.parameters(n,r)),this.touch(i),i},connect:function(t,e){const n=t.rank,r=e.length;for(let i=0;i=0;)e.push(n=r[i]),n===t&&s("Cycle detected in dataflow graph.")},pulse:function(t,e,n){this.touch(t,n||Ha);const r=new Ua(this,this._clock+(this._pulse?0:1)),i=t.pulse&&t.pulse.source||[];return r.target=t,this._input[t.id]=e.pulse(r,i),this},touch:function(t,e){const n=e||Ha;return this._pulse?this._enqueue(t):this._touched.add(t),n.skip&&t.skip(!0),this},update:function(t,e,n){const r=n||Ha;return(t.set(e)||r.force)&&this.touch(t,r),this},changeset:Ma,ingest:function(t,e,n){return e=this.parse(e,n),this.pulse(t,this.changeset().insert(e))},parse:function(t,e){const n=this.locale();return ca(t,e,n.timeParse,n.utcParse)},preload:async function(t,e,n){const r=this,i=r._pending||function(t){let e;const n=new Promise((t=>e=t));return n.requests=0,n.done=()=>{0==--n.requests&&(t._pending=null,e(t))},t._pending=n}(r);i.requests+=1;const o=await r.request(e,n);return r.pulse(t,r.changeset().remove(p).insert(o.data||[])),i.done(),o},request:async function(t,e){const n=this;let r,i=0;try{r=await n.loader().load(t,{context:"dataflow",response:la(e&&e.type)});try{r=n.parse(r,e)}catch(e){i=-2,n.warn("Data ingestion failed",t,e)}}catch(e){i=-1,n.warn("Loading failed",t,e)}return{data:r,status:i}},events:function(t,e,n,r){const i=this,o=Na(n,r),a=function(t){t.dataflow=i;try{o.receive(t)}catch(t){i.error(t)}finally{i.run()}};let s;s="string"==typeof t&&"undefined"!=typeof document?document.querySelectorAll(t):X(t);const u=s.length;for(let t=0;tr._enqueue(t,!0))),r._touched=ha(c);let a,s,u,l=0;try{for(;r._heap.size()>0;)a=r._heap.pop(),a.rank===a.qrank?(s=a.run(r._getPulse(a,t)),s.then?s=await s:s.async&&(i.push(s.async),s=La),s!==La&&a._targets&&a._targets.forEach((t=>r._enqueue(t))),++l):r._enqueue(a,!0)}catch(t){r._heap.clear(),u=t}if(r._input={},r._pulse=null,r.debug(`Pulse ${o}: ${l} operators`),u&&(r._postrun=[],r.error(u)),r._postrun.length){const t=r._postrun.sort(((t,e)=>e.priority-t.priority));r._postrun=[];for(let e=0;er.runAsync(null,(()=>{t.forEach((t=>{try{t(r)}catch(t){r.error(t)}}))})))),r},run:function(t,e,n){return this._pulse?Wa(this):(this.evaluate(t,e,n),this)},runAsync:async function(t,e,n){for(;this._running;)await this._running;const r=()=>this._running=null;return(this._running=this.evaluate(t,e,n)).then(r,r),this._running},runAfter:function(t,e,n){if(this._pulse||e)this._postrun.push({priority:n||0,callback:t});else try{t(this)}catch(t){this.error(t)}},_enqueue:function(t,e){const n=t.stampt.pulse)),e):this._input[t.id]||function(t,e){if(e&&e.stamp===t.stamp)return e;t=t.fork(),e&&e!==La&&(t.source=e.source);return t}(this._pulse,n&&n.pulse)}},dt(Ja,Sa,{run(t){if(t.stampthis.pulse=t)):e!==t.StopPropagation&&(this.pulse=e),e},evaluate(t){const e=this.marshall(t.stamp),n=this.transform(e,t);return e.clear(),n},transform(){}});const Za={};function Qa(t){const e=Ka(t);return e&&e.Definition||null}function Ka(t){return t=t&&t.toLowerCase(),lt(Za,t)?Za[t]:null}function*ts(t,e){if(null==e)for(let e of t)null!=e&&""!==e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)r=e(r,++n,t),null!=r&&""!==r&&(r=+r)>=r&&(yield r)}}function es(t,e,n){const r=Float64Array.from(ts(t,n));return r.sort(Kt),e.map((t=>De(r,t)))}function ns(t,e){return es(t,[.25,.5,.75],e)}function rs(t,e){const n=t.length,r=function(t,e){const n=function(t,e){let n,r=0,i=0,o=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,o+=n*(e-i));else{let a=-1;for(let s of t)null!=(s=e(s,++a,t))&&(s=+s)>=s&&(n=s-i,i+=n/++r,o+=n*(s-i))}if(r>1)return o/(r-1)}(t,e);return n?Math.sqrt(n):n}(t,e),i=ns(t,e),o=(i[2]-i[0])/1.34;return 1.06*(Math.min(r,o)||r||Math.abs(i[0])||1)*Math.pow(n,-.2)}function is(t){const e=t.maxbins||20,n=t.base||10,r=Math.log(n),i=t.divide||[5,2];let o,a,s,u,l,c,f=t.extent[0],h=t.extent[1];const d=t.span||h-f||Math.abs(f)||1;if(t.step)o=t.step;else if(t.steps){for(u=d/e,l=0,c=t.steps.length;le;)o*=n;for(l=0,c=i.length;l=s&&d/u<=e&&(o=u)}u=Math.log(o);const p=u>=0?0:1+~~(-u/r),g=Math.pow(n,-p-1);return(t.nice||void 0===t.nice)&&(u=Math.floor(f/o+g)*o,f=ft);const i=t.length,o=new Float64Array(i);let a,s=0,u=1,l=r(t[0]),c=l,f=l+e;for(;u=f){for(c=(l+c)/2;s>1);ia;)t[i--]=t[o]}o=a,a=r}return t}(o,e+e/4):o}t.random=Math.random;const ss=Math.sqrt(2*Math.PI),us=Math.SQRT2;let ls=NaN;function cs(e,n){e=e||0,n=null==n?1:n;let r,i,o=0,a=0;if(ls==ls)o=ls,ls=NaN;else{do{o=2*t.random()-1,a=2*t.random()-1,r=o*o+a*a}while(0===r||r>1);i=Math.sqrt(-2*Math.log(r)/r),o*=i,ls=a*i}return e+o*n}function fs(t,e,n){const r=(t-(e||0))/(n=null==n?1:n);return Math.exp(-.5*r*r)/(n*ss)}function hs(t,e,n){const r=(t-(e=e||0))/(n=null==n?1:n),i=Math.abs(r);let o;if(i>37)o=0;else{const t=Math.exp(-i*i/2);let e;i<7.07106781186547?(e=.0352624965998911*i+.700383064443688,e=e*i+6.37396220353165,e=e*i+33.912866078383,e=e*i+112.079291497871,e=e*i+221.213596169931,e=e*i+220.206867912376,o=t*e,e=.0883883476483184*i+1.75566716318264,e=e*i+16.064177579207,e=e*i+86.7807322029461,e=e*i+296.564248779674,e=e*i+637.333633378831,e=e*i+793.826512519948,e=e*i+440.413735824752,o/=e):(e=i+.65,e=i+4/e,e=i+3/e,e=i+2/e,e=i+1/e,o=t/e/2.506628274631)}return r>0?1-o:o}function ds(t,e,n){return t<0||t>1?NaN:(e||0)+(null==n?1:n)*us*function(t){let e,n=-Math.log((1-t)*(1+t));n<6.25?(n-=3.125,e=-364441206401782e-35,e=e*n-16850591381820166e-35,e=128584807152564e-32+e*n,e=11157877678025181e-33+e*n,e=e*n-1333171662854621e-31,e=20972767875968562e-33+e*n,e=6637638134358324e-30+e*n,e=e*n-4054566272975207e-29,e=e*n-8151934197605472e-29,e=26335093153082323e-28+e*n,e=e*n-12975133253453532e-27,e=e*n-5415412054294628e-26,e=1.0512122733215323e-9+e*n,e=e*n-4.112633980346984e-9,e=e*n-2.9070369957882005e-8,e=4.2347877827932404e-7+e*n,e=e*n-13654692000834679e-22,e=e*n-13882523362786469e-21,e=.00018673420803405714+e*n,e=e*n-.000740702534166267,e=e*n-.006033670871430149,e=.24015818242558962+e*n,e=1.6536545626831027+e*n):n<16?(n=Math.sqrt(n)-3.25,e=2.2137376921775787e-9,e=9.075656193888539e-8+e*n,e=e*n-2.7517406297064545e-7,e=1.8239629214389228e-8+e*n,e=15027403968909828e-22+e*n,e=e*n-4013867526981546e-21,e=29234449089955446e-22+e*n,e=12475304481671779e-21+e*n,e=e*n-47318229009055734e-21,e=6828485145957318e-20+e*n,e=24031110387097894e-21+e*n,e=e*n-.0003550375203628475,e=.0009532893797373805+e*n,e=e*n-.0016882755560235047,e=.002491442096107851+e*n,e=e*n-.003751208507569241,e=.005370914553590064+e*n,e=1.0052589676941592+e*n,e=3.0838856104922208+e*n):Number.isFinite(n)?(n=Math.sqrt(n)-5,e=-27109920616438573e-27,e=e*n-2.555641816996525e-10,e=1.5076572693500548e-9+e*n,e=e*n-3.789465440126737e-9,e=7.61570120807834e-9+e*n,e=e*n-1.496002662714924e-8,e=2.914795345090108e-8+e*n,e=e*n-6.771199775845234e-8,e=2.2900482228026655e-7+e*n,e=e*n-9.9298272942317e-7,e=4526062597223154e-21+e*n,e=e*n-1968177810553167e-20,e=7599527703001776e-20+e*n,e=e*n-.00021503011930044477,e=e*n-.00013871931833623122,e=1.0103004648645344+e*n,e=4.849906401408584+e*n):e=1/0;return e*t}(2*t-1)}function ps(t,e){let n,r;const i={mean(t){return arguments.length?(n=t||0,i):n},stdev(t){return arguments.length?(r=null==t?1:t,i):r},sample:()=>cs(n,r),pdf:t=>fs(t,n,r),cdf:t=>hs(t,n,r),icdf:t=>ds(t,n,r)};return i.mean(t).stdev(e)}function gs(e,n){const r=ps();let i=0;const o={data(t){return arguments.length?(e=t,i=t?t.length:0,o.bandwidth(n)):e},bandwidth(t){return arguments.length?(!(n=t)&&e&&(n=rs(e)),o):n},sample:()=>e[~~(t.random()*i)]+n*r.sample(),pdf(t){let o=0,a=0;for(;ams(n,r),pdf:t=>ys(t,n,r),cdf:t=>vs(t,n,r),icdf:t=>_s(t,n,r)};return i.mean(t).stdev(e)}function bs(e,n){let r,i=0;const o={weights(t){return arguments.length?(r=function(t){const e=[];let n,r=0;for(n=0;n=e&&t<=n?1/(n-e):0}function As(t,e,n){return null==n&&(n=null==e?1:e,e=0),tn?1:(t-e)/(n-e)}function Ms(t,e,n){return null==n&&(n=null==e?1:e,e=0),t>=0&&t<=1?e+t*(n-e):NaN}function Es(t,e){let n,r;const i={min(t){return arguments.length?(n=t||0,i):n},max(t){return arguments.length?(r=null==t?1:t,i):r},sample:()=>ws(n,r),pdf:t=>ks(t,n,r),cdf:t=>As(t,n,r),icdf:t=>Ms(t,n,r)};return null==e&&(e=null==t?1:t,t=0),i.min(t).max(e)}function Ds(t,e,n){let r=0,i=0;for(const o of t){const t=n(o);null==e(o)||null==t||isNaN(t)||(r+=(t-r)/++i)}return{coef:[r],predict:()=>r,rSquared:0}}function Cs(t,e,n,r){const i=r-t*t,o=Math.abs(i)<1e-24?0:(n-t*e)/i;return[e-o*t,o]}function Fs(t,e,n,r){t=t.filter((t=>{let r=e(t),i=n(t);return null!=r&&(r=+r)>=r&&null!=i&&(i=+i)>=i})),r&&t.sort(((t,n)=>e(t)-e(n)));const i=t.length,o=new Float64Array(i),a=new Float64Array(i);let s,u,l,c=0,f=0,h=0;for(l of t)o[c]=s=+e(l),a[c]=u=+n(l),++c,f+=(s-f)/c,h+=(u-h)/c;for(c=0;c=i&&null!=o&&(o=+o)>=o&&r(i,o,++a)}function $s(t,e,n,r,i){let o=0,a=0;return Ss(t,e,n,((t,e)=>{const n=e-i(t),s=e-r;o+=n*n,a+=s*s})),1-o/a}function Ts(t,e,n){let r=0,i=0,o=0,a=0,s=0;Ss(t,e,n,((t,e)=>{++s,r+=(t-r)/s,i+=(e-i)/s,o+=(t*e-o)/s,a+=(t*t-a)/s}));const u=Cs(r,i,o,a),l=t=>u[0]+u[1]*t;return{coef:u,predict:l,rSquared:$s(t,e,n,i,l)}}function Bs(t,e,n){let r=0,i=0,o=0,a=0,s=0;Ss(t,e,n,((t,e)=>{++s,t=Math.log(t),r+=(t-r)/s,i+=(e-i)/s,o+=(t*e-o)/s,a+=(t*t-a)/s}));const u=Cs(r,i,o,a),l=t=>u[0]+u[1]*Math.log(t);return{coef:u,predict:l,rSquared:$s(t,e,n,i,l)}}function Ns(t,e,n){const[r,i,o,a]=Fs(t,e,n);let s,u,l,c=0,f=0,h=0,d=0,p=0;Ss(t,e,n,((t,e)=>{s=r[p++],u=Math.log(e),l=s*e,c+=(e*u-c)/p,f+=(l-f)/p,h+=(l*u-h)/p,d+=(s*l-d)/p}));const[g,m]=Cs(f/a,c/a,h/a,d/a),y=t=>Math.exp(g+m*(t-o));return{coef:[Math.exp(g-m*o),m],predict:y,rSquared:$s(t,e,n,a,y)}}function zs(t,e,n){let r=0,i=0,o=0,a=0,s=0,u=0;Ss(t,e,n,((t,e)=>{const n=Math.log(t),l=Math.log(e);++u,r+=(n-r)/u,i+=(l-i)/u,o+=(n*l-o)/u,a+=(n*n-a)/u,s+=(e-s)/u}));const l=Cs(r,i,o,a),c=t=>l[0]*Math.pow(t,l[1]);return l[0]=Math.exp(l[0]),{coef:l,predict:c,rSquared:$s(t,e,n,s,c)}}function Os(t,e,n){const[r,i,o,a]=Fs(t,e,n),s=r.length;let u,l,c,f,h=0,d=0,p=0,g=0,m=0;for(u=0;u_*(t-=o)*t+x*t+b+a;return{coef:[b-x*o+_*o*o+a,x-2*_*o,_],predict:w,rSquared:$s(t,e,n,a,w)}}function Rs(t,e,n,r){if(0===r)return Ds(t,e,n);if(1===r)return Ts(t,e,n);if(2===r)return Os(t,e,n);const[i,o,a,s]=Fs(t,e,n),u=i.length,l=[],c=[],f=r+1;let h,d,p,g,m;for(h=0;hMath.abs(t[r][a])&&(a=i);for(o=r;o=r;o--)t[o][i]-=t[o][r]*t[r][i]/t[r][r]}for(i=e-1;i>=0;--i){for(s=0,o=i+1;o{t-=a;let e=s+y[0]+y[1]*t+y[2]*t*t;for(h=3;h=0;--o)for(s=e[o],u=1,i[o]+=s,a=1;a<=o;++a)u*=(o+1-a)/a,i[o-a]+=s*Math.pow(n,a)*u;return i[0]+=r,i}function Us(t,e,n,r){const[i,o,a,s]=Fs(t,e,n,!0),u=i.length,l=Math.max(2,~~(r*u)),c=new Float64Array(u),f=new Float64Array(u),h=new Float64Array(u).fill(1);for(let t=-1;++t<=2;){const e=[0,l-1];for(let t=0;ti[a]-n?r:a;let u=0,l=0,d=0,p=0,g=0;const m=1/Math.abs(i[s]-n||1);for(let t=r;t<=a;++t){const e=i[t],r=o[t],a=qs(Math.abs(n-e)*m)*h[t],s=e*a;u+=a,l+=s,d+=r*a,p+=r*s,g+=e*s}const[y,v]=Cs(l/u,d/u,p/u,g/u);c[t]=y+v*n,f[t]=Math.abs(o[t]-c[t]),Ps(i,t+1,e)}if(2===t)break;const n=Ce(f);if(Math.abs(n)<1e-12)break;for(let t,e,r=0;r=1?1e-12:(e=1-t*t)*e}return function(t,e,n,r){const i=t.length,o=[];let a,s=0,u=0,l=[];for(;s=t.length))for(;e>i&&t[o]-r<=r-t[i];)n[0]=++i,n[1]=o,++o}const js=.5*Math.PI/180;function Is(t,e,n,r){n=n||25,r=Math.max(n,r||200);const i=e=>[e,t(e)],o=e[0],a=e[1],s=a-o,u=s/r,l=[i(o)],c=[];if(n===r){for(let t=1;t0;)c.push(i(o+t/n*s));let f=l[0],h=c[c.length-1];const d=1/s,p=function(t,e){let n=t,r=t;const i=e.length;for(let t=0;tr&&(r=i)}return 1/(r-n)}(f[1],c);for(;h;){const t=i((f[0]+h[0])/2);t[0]-f[0]>=u&&Ws(f,t,h,d,p)>js?c.push(t):(f=h,l.push(h),c.pop()),h=c[c.length-1]}return l}function Ws(t,e,n,r,i){const o=Math.atan2(i*(n[1]-t[1]),r*(n[0]-t[0])),a=Math.atan2(i*(e[1]-t[1]),r*(e[0]-t[0]));return Math.abs(o-a)}function Hs(t){return t&&t.length?1===t.length?t[0]:(e=t,t=>{const n=e.length;let r=1,i=String(e[0](t));for(;r{},Vs={init:Gs,add:Gs,rem:Gs,idx:0},Xs={values:{init:t=>t.cell.store=!0,value:t=>t.cell.data.values(),idx:-1},count:{value:t=>t.cell.num},__count__:{value:t=>t.missing+t.valid},missing:{value:t=>t.missing},valid:{value:t=>t.valid},sum:{init:t=>t.sum=0,value:t=>t.valid?t.sum:void 0,add:(t,e)=>t.sum+=+e,rem:(t,e)=>t.sum-=e},product:{init:t=>t.product=1,value:t=>t.valid?t.product:void 0,add:(t,e)=>t.product*=e,rem:(t,e)=>t.product/=e},mean:{init:t=>t.mean=0,value:t=>t.valid?t.mean:void 0,add:(t,e)=>(t.mean_d=e-t.mean,t.mean+=t.mean_d/t.valid),rem:(t,e)=>(t.mean_d=e-t.mean,t.mean-=t.valid?t.mean_d/t.valid:t.mean)},average:{value:t=>t.valid?t.mean:void 0,req:["mean"],idx:1},variance:{init:t=>t.dev=0,value:t=>t.valid>1?t.dev/(t.valid-1):void 0,add:(t,e)=>t.dev+=t.mean_d*(e-t.mean),rem:(t,e)=>t.dev-=t.mean_d*(e-t.mean),req:["mean"],idx:1},variancep:{value:t=>t.valid>1?t.dev/t.valid:void 0,req:["variance"],idx:2},stdev:{value:t=>t.valid>1?Math.sqrt(t.dev/(t.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:t=>t.valid>1?Math.sqrt(t.dev/t.valid):void 0,req:["variance"],idx:2},stderr:{value:t=>t.valid>1?Math.sqrt(t.dev/(t.valid*(t.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:t=>t.cell.data.distinct(t.get),req:["values"],idx:3},ci0:{value:t=>t.cell.data.ci0(t.get),req:["values"],idx:3},ci1:{value:t=>t.cell.data.ci1(t.get),req:["values"],idx:3},median:{value:t=>t.cell.data.q2(t.get),req:["values"],idx:3},q1:{value:t=>t.cell.data.q1(t.get),req:["values"],idx:3},q3:{value:t=>t.cell.data.q3(t.get),req:["values"],idx:3},min:{init:t=>t.min=void 0,value:t=>t.min=Number.isNaN(t.min)?t.cell.data.min(t.get):t.min,add:(t,e)=>{(e{e<=t.min&&(t.min=NaN)},req:["values"],idx:4},max:{init:t=>t.max=void 0,value:t=>t.max=Number.isNaN(t.max)?t.cell.data.max(t.get):t.max,add:(t,e)=>{(e>t.max||void 0===t.max)&&(t.max=e)},rem:(t,e)=>{e>=t.max&&(t.max=NaN)},req:["values"],idx:4},argmin:{init:t=>t.argmin=void 0,value:t=>t.argmin||t.cell.data.argmin(t.get),add:(t,e,n)=>{e{e<=t.min&&(t.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:t=>t.argmax=void 0,value:t=>t.argmax||t.cell.data.argmax(t.get),add:(t,e,n)=>{e>t.max&&(t.argmax=n)},rem:(t,e)=>{e>=t.max&&(t.argmax=void 0)},req:["max","values"],idx:3},exponential:{init:(t,e)=>{t.exp=0,t.exp_r=e},value:t=>t.valid?t.exp*(1-t.exp_r)/(1-t.exp_r**t.valid):void 0,add:(t,e)=>t.exp=t.exp_r*t.exp+e,rem:(t,e)=>t.exp=(t.exp-e/t.exp_r**(t.valid-1))/t.exp_r},exponentialb:{value:t=>t.valid?t.exp*(1-t.exp_r):void 0,req:["exponential"],idx:1}},Js=Object.keys(Xs).filter((t=>"__count__"!==t));function Zs(t,e,n){return Xs[t](n,e)}function Qs(t,e){return t.idx-e.idx}function Ks(){this.valid=0,this.missing=0,this._ops.forEach((t=>null==t.aggregate_param?t.init(this):t.init(this,t.aggregate_param)))}function tu(t,e){null!=t&&""!==t?t==t&&(++this.valid,this._ops.forEach((n=>n.add(this,t,e)))):++this.missing}function eu(t,e){null!=t&&""!==t?t==t&&(--this.valid,this._ops.forEach((n=>n.rem(this,t,e)))):--this.missing}function nu(t){return this._out.forEach((e=>t[e.out]=e.value(this))),t}function ru(t,e){const n=e||f,r=function(t){const e={};t.forEach((t=>e[t.name]=t));const n=t=>{t.req&&t.req.forEach((t=>{e[t]||n(e[t]=Xs[t]())}))};return t.forEach(n),Object.values(e).sort(Qs)}(t),i=t.slice().sort(Qs);function o(t){this._ops=r,this._out=i,this.cell=t,this.init()}return o.prototype.init=Ks,o.prototype.add=tu,o.prototype.rem=eu,o.prototype.set=nu,o.prototype.get=n,o.fields=t.map((t=>t.out)),o}function iu(t){this._key=t?l(t):ya,this.reset()}[...Js,"__count__"].forEach((t=>{Xs[t]=function(t,e){return(n,r)=>at({name:t,aggregate_param:r,out:n||t},Vs,e)}(t,Xs[t])}));const ou=iu.prototype;function au(t){Ja.call(this,null,t),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}ou.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},ou.add=function(t){this._add.push(t)},ou.rem=function(t){this._rem.push(t)},ou.values=function(){if(this._get=null,0===this._rem.length)return this._add;const t=this._add,e=this._rem,n=this._key,r=t.length,i=e.length,o=Array(r-i),a={};let s,u,l;for(s=0;s=0;)r=t(e[i])+"",lt(n,r)||(n[r]=1,++o);return o},ou.extent=function(t){if(this._get!==t||!this._ext){const e=this.values(),n=ut(e,t);this._ext=[e[n[0]],e[n[1]]],this._get=t}return this._ext},ou.argmin=function(t){return this.extent(t)[0]||{}},ou.argmax=function(t){return this.extent(t)[1]||{}},ou.min=function(t){const e=this.extent(t)[0];return null!=e?t(e):void 0},ou.max=function(t){const e=this.extent(t)[1];return null!=e?t(e):void 0},ou.quartile=function(t){return this._get===t&&this._q||(this._q=ns(this.values(),t),this._get=t),this._q},ou.q1=function(t){return this.quartile(t)[0]},ou.q2=function(t){return this.quartile(t)[1]},ou.q3=function(t){return this.quartile(t)[2]},ou.ci=function(t){return this._get===t&&this._ci||(this._ci=os(this.values(),1e3,.05,t),this._get=t),this._ci},ou.ci0=function(t){return this.ci(t)[0]},ou.ci1=function(t){return this.ci(t)[1]},au.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:Js},{name:"aggregate_params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]},dt(au,Ja,{transform(t,e){const n=this,r=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=t.modified();return n.stamp=r.stamp,n.value&&(i||e.modified(n._inputs,!0))?(n._prev=n.value,n.value=i?n.init(t):Object.create(null),e.visit(e.SOURCE,(t=>n.add(t)))):(n.value=n.value||n.init(t),e.visit(e.REM,(t=>n.rem(t))),e.visit(e.ADD,(t=>n.add(t)))),r.modifies(n._outputs),n._drop=!1!==t.drop,t.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),e.clean()&&n._drop&&r.clean(!0).runAfter((()=>this.clean())),n.changes(r)},cross(){const t=this,e=t.value,n=t._dnames,r=n.map((()=>({}))),i=n.length;function o(t){let e,o,a,s;for(e in t)for(a=t[e].tuple,o=0;o{const e=n(t);return a(t),i.push(e),e})),this.cellkey=t.key?t.key:Hs(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const u=t.fields||[null],l=t.ops||["count"],c=t.aggregate_params||[null],f=t.as||[],h=u.length,d={};let p,g,m,y,v,_,x;for(h!==l.length&&s("Unmatched number of fields and aggregate ops."),x=0;xru(t,t.field))),Object.create(null)},cellkey:Hs(),cell(t,e){let n=this.value[t];return n?0===n.num&&this._drop&&n.stampo.push(t),remove:t=>a[r(t)]=++s,size:()=>i.length,data:(t,e)=>(s&&(i=i.filter((t=>!a[r(t)])),a={},s=0),e&&t&&i.sort(t),o.length&&(i=t?At(t,i,o.sort(t)):i.concat(o),o=[]),i)}}function lu(t){Ja.call(this,[],t)}function cu(t){Sa.call(this,null,fu,t)}function fu(t){return this.value&&!t.modified()?this.value:K(t.fields,t.orders)}function hu(t){Ja.call(this,null,t)}function du(t){Ja.call(this,null,t)}su.Definition={type:"Bin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"anchor",type:"number"},{name:"maxbins",type:"number",default:20},{name:"base",type:"number",default:10},{name:"divide",type:"number",array:!0,default:[5,2]},{name:"extent",type:"number",array:!0,length:2,required:!0},{name:"span",type:"number"},{name:"step",type:"number"},{name:"steps",type:"number",array:!0},{name:"minstep",type:"number",default:0},{name:"nice",type:"boolean",default:!0},{name:"name",type:"string"},{name:"as",type:"string",array:!0,length:2,default:["bin0","bin1"]}]},dt(su,Ja,{transform(t,e){const n=!1!==t.interval,i=this._bins(t),o=i.start,a=i.step,s=t.as||["bin0","bin1"],u=s[0],l=s[1];let c;return c=t.modified()?(e=e.reflow(!0)).SOURCE:e.modified(r(t.field))?e.ADD_MOD:e.ADD,e.visit(c,n?t=>{const e=i(t);t[u]=e,t[l]=null==e?null:o+a*(1+(e-o)/a)}:t=>t[u]=i(t)),e.modifies(n?s:u)},_bins(t){if(this.value&&!t.modified())return this.value;const i=t.field,o=is(t),a=o.step;let s,u,l=o.start,c=l+Math.ceil((o.stop-l)/a)*a;null!=(s=t.anchor)&&(u=s-(l+a*Math.floor((s-l)/a)),l+=u,c+=u);const f=function(t){let e=$(i(t));return null==e?null:ec?1/0:(e=Math.max(l,Math.min(e,c-a)),l+a*Math.floor(1e-14+(e-l)/a))};return f.start=l,f.stop=o.stop,f.step=a,this.value=e(f,r(i),t.name||"bin_"+n(i))}}),lu.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},dt(lu,Ja,{transform(t,e){const n=e.fork(e.ALL),r=uu(ya,this.value,n.materialize(n.ADD).add),i=t.sort,o=e.changed()||i&&(t.modified("sort")||e.modified(i.fields));return n.visit(n.REM,r.remove),this.modified(o),this.value=n.source=r.data(ka(i),o),e.source&&e.source.root&&(this.value.root=e.source.root),n}}),dt(cu,Sa),hu.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]},dt(hu,Ja,{transform(t,e){const n=e=>n=>{for(var r,i=function(t,e,n){switch(e){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase()}return t.match(n)}(s(n),t.case,o)||[],u=0,l=i.length;ui[t]=1+(i[t]||0))),c=n((t=>i[t]-=1));return r?e.visit(e.SOURCE,l):(e.visit(e.ADD,l),e.visit(e.REM,c)),this._finish(e,u)},_parameterCheck(t,e){let n=!1;return!t.modified("stopwords")&&this._stop||(this._stop=new RegExp("^"+(t.stopwords||"")+"$","i"),n=!0),!t.modified("pattern")&&this._match||(this._match=new RegExp(t.pattern||"[\\w']+","g"),n=!0),(t.modified("field")||e.modified(t.field.fields))&&(n=!0),n&&(this._counts={}),n},_finish(t,e){const n=this._counts,r=this._tuples||(this._tuples={}),i=e[0],o=e[1],a=t.fork(t.NO_SOURCE|t.NO_FIELDS);let s,u,l;for(s in n)u=r[s],l=n[s]||0,!u&&l?(r[s]=u=_a({}),u[i]=s,u[o]=l,a.add.push(u)):0===l?(u&&a.rem.push(u),n[s]=null,r[s]=null):u[o]!==l&&(u[o]=l,a.mod.push(u));return a.modifies(e)}}),du.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},dt(du,Ja,{transform(t,e){const n=e.fork(e.NO_SOURCE),r=t.as||["a","b"],i=r[0],o=r[1],a=!this.value||e.changed(e.ADD_REM)||t.modified("as")||t.modified("filter");let s=this.value;return a?(s&&(n.rem=s),s=e.materialize(e.SOURCE).source,n.add=this.value=function(t,e,n,r){for(var i,o,a=[],s={},u=t.length,l=0;lmu(t,e)))):typeof r[n]===gu&&r[n](t[n]);return r}function yu(t){Ja.call(this,null,t)}const vu=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],_u={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:vu},{name:"weights",type:"number",array:!0}]};function xu(t,e){return t?t.map(((t,r)=>e[r]||n(t))):null}function bu(t,e,n){const r=[],i=t=>t(u);let o,a,s,u,l,c;if(null==e)r.push(t.map(n));else for(o={},a=0,s=t.length;at.materialize(t.SOURCE).source}(e)),i=t.steps||t.minsteps||25,o=t.steps||t.maxsteps||200;let a=t.method||"pdf";"pdf"!==a&&"cdf"!==a&&s("Invalid density method: "+a),t.extent||r.data||s("Missing density extent parameter."),a=r[a];const u=t.as||["value","density"],l=Is(a,t.extent||st(r.data()),i,o).map((t=>{const e={};return e[u[0]]=t[0],e[u[1]]=t[1],_a(e)}));this.value&&(n.rem=this.value),this.value=n.add=n.source=l}return n}});function wu(t){Ja.call(this,null,t)}wu.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:"bin"}]};function ku(t){Sa.call(this,null,Au,t),this.modified(!0)}function Au(t){const i=t.expr;return this.value&&!t.modified("expr")?this.value:e((e=>i(e,t)),r(i),n(i))}function Mu(t){Ja.call(this,[void 0,void 0],t)}function Eu(t,e){Sa.call(this,t),this.parent=e,this.count=0}function Du(t){Ja.call(this,{},t),this._keys=ft();const e=this._targets=[];e.active=0,e.forEach=t=>{for(let n=0,r=e.active;nl(t))):l(t.name,t.as)}function Su(t){Ja.call(this,ft(),t)}function $u(t){Ja.call(this,[],t)}function Tu(t){Ja.call(this,[],t)}function Bu(t){Ja.call(this,null,t)}function Nu(t){Ja.call(this,[],t)}dt(wu,Ja,{transform(t,e){if(this.value&&!t.modified()&&!e.changed())return e;const n=e.materialize(e.SOURCE).source,r=bu(e.source,t.groupby,f),i=t.smooth||!1,o=t.field,a=t.step||((t,e)=>Dt(st(t,e))/30)(n,o),s=ka(((t,e)=>o(t)-o(e))),u=t.as||"bin",l=r.length;let c,h=1/0,d=-1/0,p=0;for(;pd&&(d=e),t[++c][u]=e}return this.value={start:h,stop:d,step:a},e.reflow(!0).modifies(u)}}),dt(ku,Sa),Mu.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},dt(Mu,Ja,{transform(t,e){const r=this.value,i=t.field,o=e.changed()||e.modified(i.fields)||t.modified("field");let a=r[0],s=r[1];if((o||null==a)&&(a=1/0,s=-1/0),e.visit(o?e.SOURCE:e.ADD,(t=>{const e=$(i(t));null!=e&&(es&&(s=e))})),!Number.isFinite(a)||!Number.isFinite(s)){let t=n(i);t&&(t=` for field "${t}"`),e.dataflow.warn(`Infinite extent${t}: [${a}, ${s}]`),a=s=void 0}this.value=[a,s]}}),dt(Eu,Sa,{connect(t){return this.detachSubflow=t.detachSubflow,this.targets().add(t),t.source=this},add(t){this.count+=1,this.value.add.push(t)},rem(t){this.count-=1,this.value.rem.push(t)},mod(t){this.value.mod.push(t)},init(t){this.value.init(t,t.NO_SOURCE)},evaluate(){return this.value}}),dt(Du,Ja,{activate(t){this._targets[this._targets.active++]=t},subflow(t,e,n,r){const i=this.value;let o,a,s=lt(i,t)&&i[t];return s?s.value.stampt&&t.count>0));this.initTargets(t)}},initTargets(t){const e=this._targets,n=e.length,r=t?t.length:0;let i=0;for(;ithis.subflow(t,i,e);return this._group=t.group||{},this.initTargets(),e.visit(e.REM,(t=>{const e=ya(t),n=o.get(e);void 0!==n&&(o.delete(e),s(n).rem(t))})),e.visit(e.ADD,(t=>{const e=r(t);o.set(ya(t),e),s(e).add(t)})),a||e.modified(r.fields)?e.visit(e.MOD,(t=>{const e=ya(t),n=o.get(e),i=r(t);n===i?s(i).mod(t):(o.set(e,i),s(n).rem(t),s(i).add(t))})):e.changed(e.MOD)&&e.visit(e.MOD,(t=>{s(o.get(ya(t))).mod(t)})),a&&e.visit(e.REFLOW,(t=>{const e=ya(t),n=o.get(e),i=r(t);n!==i&&(o.set(e,i),s(n).rem(t),s(i).add(t))})),e.clean()?n.runAfter((()=>{this.clean(),o.clean()})):o.empty>n.cleanThreshold&&n.runAfter(o.clean),e}}),dt(Cu,Sa),Su.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},dt(Su,Ja,{transform(t,e){const n=e.dataflow,r=this.value,i=e.fork(),o=i.add,a=i.rem,s=i.mod,u=t.expr;let l=!0;function c(e){const n=ya(e),i=u(e,t),c=r.get(n);i&&c?(r.delete(n),o.push(e)):i||c?l&&i&&!c&&s.push(e):(r.set(n,1),a.push(e))}return e.visit(e.REM,(t=>{const e=ya(t);r.has(e)?r.delete(e):a.push(t)})),e.visit(e.ADD,(e=>{u(e,t)?o.push(e):r.set(ya(e),1)})),e.visit(e.MOD,c),t.modified()&&(l=!1,e.visit(e.REFLOW,c)),r.empty>n.cleanThreshold&&n.runAfter(r.clean),i}}),$u.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},dt($u,Ja,{transform(t,e){const n=e.fork(e.NO_SOURCE),r=t.fields,i=xu(r,t.as||[]),o=t.index||null,a=i.length;return n.rem=this.value,e.visit(e.SOURCE,(t=>{const e=r.map((e=>e(t))),s=e.reduce(((t,e)=>Math.max(t,e.length)),0);let u,l,c,f=0;for(;f{for(let e,n=0;ne[r]=n(e,t)))}}),dt(Nu,Ja,{transform(t,e){const n=e.fork(e.ALL),r=t.generator;let i,o,a,s=this.value,u=t.size-s.length;if(u>0){for(i=[];--u>=0;)i.push(a=_a(r(t))),s.push(a);n.add=n.add.length?n.materialize(n.ADD).add.concat(i):i}else o=s.slice(0,-u),n.rem=n.rem.length?n.materialize(n.REM).rem.concat(o):o,s=s.slice(-u);return n.source=this.value=s,n}});const zu={value:"value",median:Ce,mean:function(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n},min:ke,max:we},Ou=[];function Ru(t){Ja.call(this,[],t)}function Lu(t){au.call(this,t)}function Uu(t){Ja.call(this,null,t)}function qu(t){Sa.call(this,null,Pu,t)}function Pu(t){return this.value&&!t.modified()?this.value:bt(t.fields,t.flat)}function ju(t){Ja.call(this,[],t),this._pending=null}function Iu(t,e,n){n.forEach(_a);const r=e.fork(e.NO_FIELDS&e.NO_SOURCE);return r.rem=t.value,t.value=r.source=r.add=n,t._pending=null,r.rem.length&&r.clean(!0),r}function Wu(t){Ja.call(this,{},t)}function Hu(t){Sa.call(this,null,Yu,t)}function Yu(t){if(this.value&&!t.modified())return this.value;const e=t.extents,n=e.length;let r,i,o=1/0,a=-1/0;for(r=0;ra&&(a=i[1]);return[o,a]}function Gu(t){Sa.call(this,null,Vu,t)}function Vu(t){return this.value&&!t.modified()?this.value:t.values.reduce(((t,e)=>t.concat(e)),[])}function Xu(t){Ja.call(this,null,t)}function Ju(t){au.call(this,t)}function Zu(t){Du.call(this,t)}function Qu(t){Ja.call(this,null,t)}function Ku(t){Ja.call(this,null,t)}function tl(t){Ja.call(this,null,t)}Ru.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},dt(Ru,Ja,{transform(t,e){var r,i,o,a,u,l,c,f,h,d,p=e.fork(e.ALL),g=function(t){var e,n=t.method||zu.value;if(null!=zu[n])return n===zu.value?(e=void 0!==t.value?t.value:0,()=>e):zu[n];s("Unrecognized imputation method: "+n)}(t),m=function(t){const e=t.field;return t=>t?e(t):NaN}(t),y=n(t.field),v=n(t.key),_=(t.groupby||[]).map(n),x=function(t,e,n,r){var i,o,a,s,u,l,c,f,h=t=>t(f),d=[],p=r?r.slice():[],g={},m={};for(p.forEach(((t,e)=>g[t]=e+1)),s=0,c=t.length;sn.add(t)))):(i=n.value=n.value||this.init(t),e.visit(e.REM,(t=>n.rem(t))),e.visit(e.ADD,(t=>n.add(t)))),n.changes(),e.visit(e.SOURCE,(t=>{at(t,i[n.cellkey(t)].tuple)})),e.reflow(r).modifies(this._outputs)},changes(){const t=this._adds,e=this._mods;let n,r;for(n=0,r=this._alen;n{const n=gs(e,u)[l],r=t.counts?e.length:1;Is(n,h||st(e),d,p).forEach((t=>{const n={};for(let t=0;t(this._pending=X(t.data),t=>t.touch(this))));return{async:e}}return n.request(t.url,t.format).then((t=>Iu(this,e,X(t.data))))}}),Wu.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]},dt(Wu,Ja,{transform(t,e){const r=t.fields,i=t.index,o=t.values,a=null==t.default?null:t.default,u=t.modified(),l=r.length;let c,f,h,d=u?e.SOURCE:e.ADD,p=e,g=t.as;return o?(f=o.length,l>1&&!g&&s('Multi-field lookup requires explicit "as" parameter.'),g&&g.length!==l*f&&s('The "as" parameter has too few output field names.'),g=g||o.map(n),c=function(t){for(var e,n,s=0,u=0;se.modified(t.fields))),d|=h?e.MOD:0),e.visit(d,c),p.modifies(g)}}),dt(Hu,Sa),dt(Gu,Sa),dt(Xu,Ja,{transform(t,e){return this.modified(t.modified()),this.value=t,e.fork(e.NO_SOURCE|e.NO_FIELDS)}}),Ju.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:Js,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},dt(Ju,au,{_transform:au.prototype.transform,transform(t,n){return this._transform(function(t,n){const i=t.field,o=t.value,a=("count"===t.op?"__count__":t.op)||"sum",s=r(i).concat(r(o)),u=function(t,e,n){const r={},i=[];return n.visit(n.SOURCE,(e=>{const n=t(e);r[n]||(r[n]=1,i.push(n))})),i.sort(tt),e?i.slice(0,e):i}(i,t.limit||0,n);n.changed()&&t.set("__pivot__",null,null,!0);return{key:t.key,groupby:t.groupby,ops:u.map((()=>a)),fields:u.map((t=>function(t,n,r,i){return e((e=>n(e)===t?r(e):NaN),i,t+"")}(t,i,o,s))),as:u.map((t=>t+"")),modified:t.modified.bind(t)}}(t,n),n)}}),dt(Zu,Du,{transform(t,e){const n=t.subflow,i=t.field,o=t=>this.subflow(ya(t),n,e,t);return(t.modified("field")||i&&e.modified(r(i)))&&s("PreFacet does not support field modification."),this.initTargets(),i?(e.visit(e.MOD,(t=>{const e=o(t);i(t).forEach((t=>e.mod(t)))})),e.visit(e.ADD,(t=>{const e=o(t);i(t).forEach((t=>e.add(_a(t))))})),e.visit(e.REM,(t=>{const e=o(t);i(t).forEach((t=>e.rem(t)))}))):(e.visit(e.MOD,(t=>o(t).mod(t))),e.visit(e.ADD,(t=>o(t).add(t))),e.visit(e.REM,(t=>o(t).rem(t)))),e.clean()&&e.runAfter((()=>this.clean())),e}}),Qu.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},dt(Qu,Ja,{transform(t,e){const n=e.fork(e.NO_SOURCE),r=t.fields,i=xu(t.fields,t.as||[]),o=r?(t,e)=>function(t,e,n,r){for(let i=0,o=n.length;i{const e=ya(t);n.rem.push(a[e]),a[e]=null})),e.visit(e.ADD,(t=>{const e=o(t,_a({}));a[ya(t)]=e,n.add.push(e)})),e.visit(e.MOD,(t=>{n.mod.push(o(t,a[ya(t)]))})),n}}),dt(Ku,Ja,{transform(t,e){return this.value=t.value,t.modified("value")?e.fork(e.NO_SOURCE|e.NO_FIELDS):e.StopPropagation}}),tl.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]};function el(t){Ja.call(this,null,t)}function nl(t){Ja.call(this,[],t),this.count=0}function rl(t){Ja.call(this,null,t)}function il(t){Ja.call(this,null,t),this.modified(!0)}function ol(t){Ja.call(this,null,t)}dt(tl,Ja,{transform(t,e){const r=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=t.as||["prob","value"];if(this.value&&!t.modified()&&!e.changed())return r.source=this.value,r;const o=bu(e.materialize(e.SOURCE).source,t.groupby,t.field),a=(t.groupby||[]).map(n),s=[],u=t.step||.01,l=t.probs||Se(u/2,1-1e-14,u),c=l.length;return o.forEach((t=>{const e=es(t,l);for(let n=0;n{const e=ya(t);n.rem.push(r[e]),r[e]=null})),e.visit(e.ADD,(t=>{const e=xa(t);r[ya(t)]=e,n.add.push(e)})),e.visit(e.MOD,(t=>{const e=r[ya(t)];for(const r in t)e[r]=t[r],n.modifies(r);n.mod.push(e)}))),n}}),nl.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},dt(nl,Ja,{transform(e,n){const r=n.fork(n.NO_SOURCE),i=e.modified("size"),o=e.size,a=this.value.reduce(((t,e)=>(t[ya(e)]=1,t)),{});let s=this.value,u=this.count,l=0;function c(e){let n,i;s.length=l&&(n=s[i],a[ya(n)]&&r.rem.push(n),s[i]=e)),++u}if(n.rem.length&&(n.visit(n.REM,(t=>{const e=ya(t);a[e]&&(a[e]=-1,r.rem.push(t)),--u})),s=s.filter((t=>-1!==a[ya(t)]))),(n.rem.length||i)&&s.length{a[ya(t)]||c(t)})),l=-1),i&&s.length>o){const t=s.length-o;for(let e=0;e{a[ya(t)]&&r.mod.push(t)})),n.add.length&&n.visit(n.ADD,c),(n.add.length||l<0)&&(r.add=s.filter((t=>!a[ya(t)]))),this.count=u,this.value=r.source=s,r}}),rl.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]},dt(rl,Ja,{transform(t,e){if(this.value&&!t.modified())return;const n=e.materialize().fork(e.MOD),r=t.as||"data";return n.rem=this.value?e.rem.concat(this.value):e.rem,this.value=Se(t.start,t.stop,t.step||1).map((t=>{const e={};return e[r]=t,_a(e)})),n.add=e.add.concat(this.value),n}}),dt(il,Ja,{transform(t,e){return this.value=e.source,e.changed()?e.fork(e.NO_SOURCE|e.NO_FIELDS):e.StopPropagation}});const al=["unit0","unit1"];function sl(t){Ja.call(this,ft(),t)}function ul(t){Ja.call(this,null,t)}ol.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:Kn,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:al}]},dt(ol,Ja,{transform(t,e){const n=t.field,i=!1!==t.interval,o="utc"===t.timezone,a=this._floor(t,e),s=(o?Fr:Cr)(a.unit).offset,u=t.as||al,l=u[0],c=u[1],f=a.step;let h=a.start||1/0,d=a.stop||-1/0,p=e.ADD;return(t.modified()||e.changed(e.REM)||e.modified(r(n)))&&(p=(e=e.reflow(!0)).SOURCE,h=1/0,d=-1/0),e.visit(p,(t=>{const e=n(t);let r,o;null==e?(t[l]=null,i&&(t[c]=null)):(t[l]=r=o=a(e),i&&(t[c]=o=s(r,f)),rd&&(d=o))})),a.start=h,a.stop=d,e.modifies(i?u:l)},_floor(t,e){const n="utc"===t.timezone,{units:r,step:i}=t.units?{units:t.units,step:t.step||1}:Jr({extent:t.extent||st(e.materialize(e.SOURCE).source,t.field),maxbins:t.maxbins}),o=er(r),a=this.value||{},s=(n?Mr:wr)(o,i);return s.unit=S(o),s.units=o,s.step=i,s.start=a.start,s.stop=a.stop,this.value=s}}),dt(sl,Ja,{transform(t,e){const n=e.dataflow,r=t.field,i=this.value,o=t=>i.set(r(t),t);let a=!0;return t.modified("field")||e.modified(r.fields)?(i.clear(),e.visit(e.SOURCE,o)):e.changed()?(e.visit(e.REM,(t=>i.delete(r(t)))),e.visit(e.ADD,o)):a=!1,this.modified(a),i.empty>n.cleanThreshold&&n.runAfter(i.clean),e.fork()}}),dt(ul,Ja,{transform(t,e){(!this.value||t.modified("field")||t.modified("sort")||e.changed()||t.sort&&e.modified(t.sort.fields))&&(this.value=(t.sort?e.source.slice().sort(ka(t.sort)):e.source).map(t.field))}});const ll={row_number:function(){return{next:t=>t.index+1}},rank:function(){let t;return{init:()=>t=1,next:e=>{const n=e.index,r=e.data;return n&&e.compare(r[n-1],r[n])?t=n+1:t}}},dense_rank:function(){let t;return{init:()=>t=1,next:e=>{const n=e.index,r=e.data;return n&&e.compare(r[n-1],r[n])?++t:t}}},percent_rank:function(){const t=ll.rank(),e=t.next;return{init:t.init,next:t=>(e(t)-1)/(t.data.length-1)}},cume_dist:function(){let t;return{init:()=>t=0,next:e=>{const n=e.data,r=e.compare;let i=e.index;if(t0||s("ntile num must be greater than zero.");const n=ll.cume_dist(),r=n.next;return{init:n.init,next:t=>Math.ceil(e*r(t))}},lag:function(t,e){return e=+e||1,{next:n=>{const r=n.index-e;return r>=0?t(n.data[r]):null}}},lead:function(t,e){return e=+e||1,{next:n=>{const r=n.index+e,i=n.data;return rt(e.data[e.i0])}},last_value:function(t){return{next:e=>t(e.data[e.i1-1])}},nth_value:function(t,e){return(e=+e)>0||s("nth_value nth must be greater than zero."),{next:n=>{const r=n.i0+(e-1);return re=null,next:n=>{const r=t(n.data[n.index]);return null!=r?e=r:e}}},next_value:function(t){let e,n;return{init:()=>(e=null,n=-1),next:r=>{const i=r.data;return r.index<=n?e:(n=function(t,e,n){for(let r=e.length;nf[t]=1))}y(t.sort),e.forEach(((t,e)=>{const r=i[e],f=o[e],v=a[e]||null,_=n(r),x=Ys(t,_,u[e]);if(y(r),l.push(x),lt(ll,t))c.push(function(t,e,n,r){const i=ll[t](e,n);return{init:i.init||h,update:function(t,e){e[r]=i.next(t)}}}(t,r,f,x));else{if(null==r&&"count"!==t&&s("Null aggregate field specified."),"count"===t)return void p.push(x);m=!1;let e=d[_];e||(e=d[_]=[],e.field=r,g.push(e)),e.push(Zs(t,v,x))}})),(p.length||g.length)&&(this.cell=function(t,e,n){t=t.map((t=>ru(t,t.field)));const r={num:0,agg:null,store:!1,count:e};if(!n)for(var i=t.length,o=r.agg=Array(i),a=0;a0&&!i(o[n],o[n-1])&&(t.i0=e.left(o,o[n])),rt.init())),this.cell&&this.cell.init()},hl.update=function(t,e){const n=this.cell,r=this.windows,i=t.data,o=r&&r.length;let a;if(n){for(a=t.p0;athis.group(i(t));let a=this.state;a&&!n||(a=this.state=new fl(t)),n||e.modified(a.inputs)?(this.value={},e.visit(e.SOURCE,(t=>o(t).add(t)))):(e.visit(e.REM,(t=>o(t).remove(t))),e.visit(e.ADD,(t=>o(t).add(t))));for(let e=0,n=this._mlen;e=1?Cl:t<=-1?-Cl:Math.asin(t)}const $l=Math.PI,Tl=2*$l,Bl=1e-6,Nl=Tl-Bl;function zl(t){this._+=t[0];for(let e=1,n=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return zl;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eBl)if(Math.abs(c*s-u*l)>Bl&&i){let h=n-o,d=r-a,p=s*s+u*u,g=h*h+d*d,m=Math.sqrt(p),y=Math.sqrt(f),v=i*Math.tan(($l-Math.acos((p+f-g)/(2*m*y)))/2),_=v/y,x=v/m;Math.abs(_-1)>Bl&&this._append`L${t+_*l},${e+_*c}`,this._append`A${i},${i},0,0,${+(c*h>l*d)},${this._x1=t+x*s},${this._y1=e+x*u}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,r,i,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${u},${l}`:(Math.abs(this._x1-u)>Bl||Math.abs(this._y1-l)>Bl)&&this._append`L${u},${l}`,n&&(f<0&&(f=f%Tl+Tl),f>Nl?this._append`A${n},${n},0,1,${c},${t-a},${e-s}A${n},${n},0,1,${c},${this._x1=u},${this._y1=l}`:f>Bl&&this._append`A${n},${n},0,${+(f>=$l)},${c},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Rl(){return new Ol}function Ll(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Ol(e)}function Ul(t){return t.innerRadius}function ql(t){return t.outerRadius}function Pl(t){return t.startAngle}function jl(t){return t.endAngle}function Il(t){return t&&t.padAngle}function Wl(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/Ml(s*s+u*u),c=l*u,f=-l*s,h=t+c,d=e+f,p=n+c,g=r+f,m=(h+p)/2,y=(d+g)/2,v=p-h,_=g-d,x=v*v+_*_,b=i-o,w=h*g-p*d,k=(_<0?-1:1)*Ml(wl(0,b*b*x-w*w)),A=(w*_-v*k)/x,M=(-w*v-_*k)/x,E=(w*_+v*k)/x,D=(-w*v+_*k)/x,C=A-m,F=M-y,S=E-m,$=D-y;return C*C+F*F>S*S+$*$&&(A=E,M=D),{cx:A,cy:M,x01:-c,y01:-f,x11:A*(i/b-1),y11:M*(i/b-1)}}function Hl(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Yl(t){this._context=t}function Gl(t){return new Yl(t)}function Vl(t){return t[0]}function Xl(t){return t[1]}function Jl(t,e){var n=vl(!0),r=null,i=Gl,o=null,a=Ll(s);function s(s){var u,l,c,f=(s=Hl(s)).length,h=!1;for(null==r&&(o=i(c=a())),u=0;u<=f;++u)!(u=f;--h)s.point(y[h],v[h]);s.lineEnd(),s.areaEnd()}m&&(y[c]=+t(d,c,l),v[c]=+e(d,c,l),s.point(r?+r(d,c,l):y[c],n?+n(d,c,l):v[c]))}if(p)return s=null,p+""||null}function c(){return Jl().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?Vl:vl(+t),e="function"==typeof e?e:vl(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Xl:vl(+n),l.x=function(e){return arguments.length?(t="function"==typeof e?e:vl(+e),r=null,l):t},l.x0=function(e){return arguments.length?(t="function"==typeof e?e:vl(+e),l):t},l.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:vl(+t),l):r},l.y=function(t){return arguments.length?(e="function"==typeof t?t:vl(+t),n=null,l):e},l.y0=function(t){return arguments.length?(e="function"==typeof t?t:vl(+t),l):e},l.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:vl(+t),l):n},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(n)},l.lineX1=function(){return c().x(r).y(e)},l.defined=function(t){return arguments.length?(i="function"==typeof t?t:vl(!!t),l):i},l.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),l):a},l.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),l):o},l}Rl.prototype=Ol.prototype,Yl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Ql={draw(t,e){const n=Ml(e/Dl);t.moveTo(n,0),t.arc(0,0,n,0,Fl)}};function Kl(){}function tc(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ec(t){this._context=t}function nc(t){this._context=t}function rc(t){this._context=t}function ic(t,e){this._basis=new ec(t),this._beta=e}ec.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:tc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:tc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},nc.prototype={areaStart:Kl,areaEnd:Kl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:tc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},rc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:tc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ic.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,s=e[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*a),this._beta*e[u]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var oc=function t(e){function n(t){return 1===e?new ec(t):new ic(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function ac(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function sc(t,e){this._context=t,this._k=(1-e)/6}sc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ac(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ac(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var uc=function t(e){function n(t){return new sc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function lc(t,e){this._context=t,this._k=(1-e)/6}lc.prototype={areaStart:Kl,areaEnd:Kl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ac(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var cc=function t(e){function n(t){return new lc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function fc(t,e){this._context=t,this._k=(1-e)/6}fc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ac(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var hc=function t(e){function n(t){return new fc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function dc(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>El){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>El){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*l+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function pc(t,e){this._context=t,this._alpha=e}pc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:dc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var gc=function t(e){function n(t){return e?new pc(t,e):new sc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function mc(t,e){this._context=t,this._alpha=e}mc.prototype={areaStart:Kl,areaEnd:Kl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:dc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var yc=function t(e){function n(t){return e?new mc(t,e):new lc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function vc(t,e){this._context=t,this._alpha=e}vc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:dc(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _c=function t(e){function n(t){return e?new vc(t,e):new fc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function xc(t){this._context=t}function bc(t){return t<0?-1:1}function wc(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(bc(o)+bc(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function kc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ac(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Mc(t){this._context=t}function Ec(t){this._context=new Dc(t)}function Dc(t){this._context=t}function Cc(t){this._context=t}function Fc(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};const Tc=()=>"undefined"!=typeof Image?Image:null;function Bc(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Nc(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}const zc=Symbol("implicit");function Oc(){var t=new ue,e=[],n=[],r=zc;function i(i){let o=t.get(i);if(void 0===o){if(r!==zc)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new ue;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Oc(e,n).unknown(r)},Bc.apply(i,arguments),i}function Rc(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Lc(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Uc(){}var qc=.7,Pc=1/qc,jc="\\s*([+-]?\\d+)\\s*",Ic="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Hc=/^#([0-9a-f]{3,8})$/,Yc=new RegExp(`^rgb\\(${jc},${jc},${jc}\\)$`),Gc=new RegExp(`^rgb\\(${Wc},${Wc},${Wc}\\)$`),Vc=new RegExp(`^rgba\\(${jc},${jc},${jc},${Ic}\\)$`),Xc=new RegExp(`^rgba\\(${Wc},${Wc},${Wc},${Ic}\\)$`),Jc=new RegExp(`^hsl\\(${Ic},${Wc},${Wc}\\)$`),Zc=new RegExp(`^hsla\\(${Ic},${Wc},${Wc},${Ic}\\)$`),Qc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Kc(){return this.rgb().formatHex()}function tf(){return this.rgb().formatRgb()}function ef(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Hc.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?nf(e):3===n?new sf(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rf(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rf(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Yc.exec(t))?new sf(e[1],e[2],e[3],1):(e=Gc.exec(t))?new sf(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Vc.exec(t))?rf(e[1],e[2],e[3],e[4]):(e=Xc.exec(t))?rf(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Jc.exec(t))?df(e[1],e[2]/100,e[3]/100,1):(e=Zc.exec(t))?df(e[1],e[2]/100,e[3]/100,e[4]):Qc.hasOwnProperty(t)?nf(Qc[t]):"transparent"===t?new sf(NaN,NaN,NaN,0):null}function nf(t){return new sf(t>>16&255,t>>8&255,255&t,1)}function rf(t,e,n,r){return r<=0&&(t=e=n=NaN),new sf(t,e,n,r)}function of(t){return t instanceof Uc||(t=ef(t)),t?new sf((t=t.rgb()).r,t.g,t.b,t.opacity):new sf}function af(t,e,n,r){return 1===arguments.length?of(t):new sf(t,e,n,null==r?1:r)}function sf(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function uf(){return`#${hf(this.r)}${hf(this.g)}${hf(this.b)}`}function lf(){const t=cf(this.opacity);return`${1===t?"rgb(":"rgba("}${ff(this.r)}, ${ff(this.g)}, ${ff(this.b)}${1===t?")":`, ${t})`}`}function cf(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ff(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hf(t){return((t=ff(t))<16?"0":"")+t.toString(16)}function df(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new mf(t,e,n,r)}function pf(t){if(t instanceof mf)return new mf(t.h,t.s,t.l,t.opacity);if(t instanceof Uc||(t=ef(t)),!t)return new mf;if(t instanceof mf)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n0&&u<1?0:a,new mf(a,s,u,t.opacity)}function gf(t,e,n,r){return 1===arguments.length?pf(t):new mf(t,e,n,null==r?1:r)}function mf(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function yf(t){return(t=(t||0)%360)<0?t+360:t}function vf(t){return Math.max(0,Math.min(1,t||0))}function _f(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Rc(Uc,ef,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Kc,formatHex:Kc,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return pf(this).formatHsl()},formatRgb:tf,toString:tf}),Rc(sf,af,Lc(Uc,{brighter(t){return t=null==t?Pc:Math.pow(Pc,t),new sf(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?qc:Math.pow(qc,t),new sf(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new sf(ff(this.r),ff(this.g),ff(this.b),cf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uf,formatHex:uf,formatHex8:function(){return`#${hf(this.r)}${hf(this.g)}${hf(this.b)}${hf(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:lf,toString:lf})),Rc(mf,gf,Lc(Uc,{brighter(t){return t=null==t?Pc:Math.pow(Pc,t),new mf(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?qc:Math.pow(qc,t),new mf(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new sf(_f(t>=240?t-240:t+120,i,r),_f(t,i,r),_f(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new mf(yf(this.h),vf(this.s),vf(this.l),cf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=cf(this.opacity);return`${1===t?"hsl(":"hsla("}${yf(this.h)}, ${100*vf(this.s)}%, ${100*vf(this.l)}%${1===t?")":`, ${t})`}`}}));const xf=Math.PI/180,bf=180/Math.PI,wf=.96422,kf=1,Af=.82521,Mf=4/29,Ef=6/29,Df=3*Ef*Ef,Cf=Ef*Ef*Ef;function Ff(t){if(t instanceof $f)return new $f(t.l,t.a,t.b,t.opacity);if(t instanceof Rf)return Lf(t);t instanceof sf||(t=of(t));var e,n,r=zf(t.r),i=zf(t.g),o=zf(t.b),a=Tf((.2225045*r+.7168786*i+.0606169*o)/kf);return r===i&&i===o?e=n=a:(e=Tf((.4360747*r+.3850649*i+.1430804*o)/wf),n=Tf((.0139322*r+.0971045*i+.7141733*o)/Af)),new $f(116*a-16,500*(e-a),200*(a-n),t.opacity)}function Sf(t,e,n,r){return 1===arguments.length?Ff(t):new $f(t,e,n,null==r?1:r)}function $f(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Tf(t){return t>Cf?Math.pow(t,1/3):t/Df+Mf}function Bf(t){return t>Ef?t*t*t:Df*(t-Mf)}function Nf(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function zf(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Of(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Rf)return new Rf(t.h,t.c,t.l,t.opacity);if(t instanceof $f||(t=Ff(t)),0===t.a&&0===t.b)return new Rf(NaN,0=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r()=>t;function Kf(t,e){return function(n){return t+n*e}}function th(t,e){var n=e-t;return n?Kf(t,n>180||n<-180?n-360*Math.round(n/360):n):Qf(isNaN(t)?e:t)}function eh(t){return 1==(t=+t)?nh:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Qf(isNaN(e)?n:e)}}function nh(t,e){var n=e-t;return n?Kf(t,n):Qf(isNaN(t)?e:t)}var rh=function t(e){var n=eh(e);function r(t,e){var r=n((t=af(t)).r,(e=af(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=nh(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function ih(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;no&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:fh(n,r)})),o=ph.lastIndex;return o180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:fh(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:fh(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:fh(t,n)},{i:s-2,x:fh(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++ne&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(a[0],a[t-1])),r=t>2?Ih:jh,i=o=null,f}function f(e){return null==e||isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(l(e)))}return f.invert=function(n){return l(e((o||(o=r(s,a.map(t),fh)))(n)))},f.domain=function(t){return arguments.length?(a=Array.from(t,Lh),c()):a.slice()},f.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},f.rangeRound=function(t){return s=Array.from(t),u=yh,c()},f.clamp=function(t){return arguments.length?(l=!!t||qh,c()):l!==qh},f.interpolate=function(t){return arguments.length?(u=t,c()):u},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,c()}}function Yh(){return Hh()(qh,qh)}function Gh(t,e,n,r){var i,o=be(t,e,n);switch((r=Re(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=Xe(o,a))||(r.precision=i),We(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=Je(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=Ve(o))||(r.precision=i-2*("%"===r.type))}return Ie(r)}function Vh(t){var e=t.domain;return t.ticks=function(t){var n=e();return _e(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Gh(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),a=0,s=o.length-1,u=o[a],l=o[s],c=10;for(l0;){if((i=xe(u,l,n))===r)return o[a]=u,o[s]=l,e(o);if(i>0)u=Math.floor(u/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,l=Math.floor(l*i)/i}r=i}return t},t}function Xh(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a-t(-e,n)}function nd(t){const e=t(Jh,Zh),n=e.domain;let r,i,o=10;function a(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(o),i=function(t){return 10===t?td:t===Math.E?Math.exp:e=>Math.pow(t,e)}(o),n()[0]<0?(r=ed(r),i=ed(i),t(Qh,Kh)):t(Jh,Zh),e}return e.base=function(t){return arguments.length?(o=+t,a()):o},e.domain=function(t){return arguments.length?(n(t),a()):n()},e.ticks=t=>{const e=n();let a=e[0],s=e[e.length-1];const u=s0){for(;f<=h;++f)for(l=1;ls)break;p.push(c)}}else for(;f<=h;++f)for(l=o-1;l>=1;--l)if(c=f>0?l/i(-f):l*i(f),!(cs)break;p.push(c)}2*p.length{if(null==t&&(t=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=Re(n)).precision||(n.trim=!0),n=Ie(n)),t===1/0)return n;const a=Math.max(1,o*t/e.ticks().length);return t=>{let e=t/i(Math.round(r(t)));return e*on(Xh(n(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),e}function rd(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function id(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function od(t){var e=1,n=t(rd(e),id(e));return n.constant=function(n){return arguments.length?t(rd(e=+n),id(e)):e},Vh(n)}function ad(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function sd(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function ud(t){return t<0?-t*t:t*t}function ld(t){var e=t(qh,qh),n=1;return e.exponent=function(e){return arguments.length?1===(n=+e)?t(qh,qh):.5===n?t(sd,ud):t(ad(n),ad(1/n)):n},Vh(e)}function cd(){var t=ld(Hh());return t.copy=function(){return Wh(t,cd()).exponent(t.exponent())},Bc.apply(t,arguments),t}function fd(t){return new Date(t)}function hd(t){return t instanceof Date?+t:+new Date(+t)}function dd(t,e,n,r,i,o,a,s,u,l){var c=Yh(),f=c.invert,h=c.domain,d=l(".%L"),p=l(":%S"),g=l("%I:%M"),m=l("%I %p"),y=l("%a %d"),v=l("%b %d"),_=l("%B"),x=l("%Y");function b(t){return(u(t)0?r:1:0}const Td="linear",Bd="log",Nd="pow",zd="sqrt",Od="symlog",Rd="time",Ld="utc",Ud="sequential",qd="diverging",Pd="quantile",jd="quantize",Id="threshold",Wd="ordinal",Hd="point",Yd="band",Gd="bin-ordinal",Vd="continuous",Xd="discrete",Jd="discretizing",Zd="interpolating",Qd="temporal";function Kd(){const t=Oc().unknown(void 0),e=t.domain,n=t.range;let r,i,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){const t=e().length,c=o[1]d+r*t));return n(c?p.reverse():p)}return delete t.unknown,t.domain=function(t){return arguments.length?(e(t),c()):e()},t.range=function(t){return arguments.length?(o=[+t[0],+t[1]],c()):o.slice()},t.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,c()},t.bandwidth=function(){return i},t.step=function(){return r},t.round=function(t){return arguments.length?(a=!!t,c()):a},t.padding=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),s=u,c()):s},t.paddingInner=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),c()):s},t.paddingOuter=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),c()):u},t.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),c()):l},t.invertRange=function(t){if(null==t[0]||null==t[1])return;const r=o[1]o[1-r])?void 0:(u=Math.max(0,oe(a,f)-1),l=f===h?u:oe(a,h)-1,f-a[u]>i+1e-10&&++u,r&&(c=u,u=s-l,l=s-c),u>l?void 0:e().slice(u,l+1))},t.invert=function(e){const n=t.invertRange([e,e]);return n?n[0]:n},t.copy=function(){return Kd().domain(e()).range(o).round(a).paddingInner(s).paddingOuter(u).align(l)},c()}function tp(t){const e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return tp(e())},t}var ep=Array.prototype.map;const np=Array.prototype.slice;const rp=new Map,ip=Symbol("vega_scale");function op(t){return t[ip]=!0,t}function ap(t){return t&&!0===t[ip]}function sp(t,e,n){return arguments.length>1?(rp.set(t,function(t,e,n){const r=function(){const n=e();return n.invertRange||(n.invertRange=n.invert?function(t){return function(e){let n,r=e[0],i=e[1];return i=s&&n[o]<=u&&(l<0&&(l=o),r=o);if(!(l<0))return s=t.invertExtent(n[l]),u=t.invertExtent(n[r]),[void 0===s[0]?s[1]:s[0],void 0===u[1]?u[0]:u[1]]}}(n):void 0),n.type=t,op(n)};return r.metadata=Bt(X(n)),r}(t,e,n)),this):up(t)?rp.get(t):void 0}function up(t){return rp.has(t)}function lp(t,e){const n=rp.get(t);return n&&n.metadata[e]}function cp(t){return lp(t,Vd)}function fp(t){return lp(t,Xd)}function hp(t){return lp(t,Jd)}function dp(t){return lp(t,Bd)}function pp(t){return lp(t,Zd)}function gp(t){return lp(t,Pd)}sp("identity",(function t(e){var n;function r(t){return null==t||isNaN(t=+t)?n:t}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(e=Array.from(t,Lh),r):e.slice()},r.unknown=function(t){return arguments.length?(n=t,r):n},r.copy=function(){return t(e).unknown(n)},e=arguments.length?Array.from(e,Lh):[0,1],Vh(r)})),sp(Td,(function t(){var e=Yh();return e.copy=function(){return Wh(e,t())},Bc.apply(e,arguments),Vh(e)}),Vd),sp(Bd,(function t(){const e=nd(Hh()).domain([1,10]);return e.copy=()=>Wh(e,t()).base(e.base()),Bc.apply(e,arguments),e}),[Vd,Bd]),sp(Nd,cd,Vd),sp(zd,(function(){return cd.apply(null,arguments).exponent(.5)}),Vd),sp(Od,(function t(){var e=od(Hh());return e.copy=function(){return Wh(e,t()).constant(e.constant())},Bc.apply(e,arguments)}),Vd),sp(Rd,(function(){return Bc.apply(dd(qn,Pn,zn,Bn,vn,pn,hn,cn,ln,ni).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}),[Vd,Qd]),sp(Ld,(function(){return Bc.apply(dd(Ln,Un,On,Nn,En,gn,dn,fn,ln,ii).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}),[Vd,Qd]),sp(Ud,md,[Vd,Zd]),sp(`${Ud}-${Td}`,md,[Vd,Zd]),sp(`${Ud}-${Bd}`,(function t(){var e=nd(pd()).domain([1,10]);return e.copy=function(){return gd(e,t()).base(e.base())},Nc.apply(e,arguments)}),[Vd,Zd,Bd]),sp(`${Ud}-${Nd}`,yd,[Vd,Zd]),sp(`${Ud}-${zd}`,(function(){return yd.apply(null,arguments).exponent(.5)}),[Vd,Zd]),sp(`${Ud}-${Od}`,(function t(){var e=od(pd());return e.copy=function(){return gd(e,t()).constant(e.constant())},Nc.apply(e,arguments)}),[Vd,Zd]),sp(`${qd}-${Td}`,(function t(){var e=Vh(vd()(qh));return e.copy=function(){return gd(e,t())},Nc.apply(e,arguments)}),[Vd,Zd]),sp(`${qd}-${Bd}`,(function t(){var e=nd(vd()).domain([.1,1,10]);return e.copy=function(){return gd(e,t()).base(e.base())},Nc.apply(e,arguments)}),[Vd,Zd,Bd]),sp(`${qd}-${Nd}`,_d,[Vd,Zd]),sp(`${qd}-${zd}`,(function(){return _d.apply(null,arguments).exponent(.5)}),[Vd,Zd]),sp(`${qd}-${Od}`,(function t(){var e=od(vd());return e.copy=function(){return gd(e,t()).constant(e.constant())},Nc.apply(e,arguments)}),[Vd,Zd]),sp(Pd,(function t(){var e,n=[],r=[],i=[];function o(){var t=0,e=Math.max(1,r.length);for(i=new Array(e-1);++t0?i[e-1]:n[0],e=i?[o[i-1],r]:[o[e-1],o[e]]},s.unknown=function(t){return arguments.length?(e=t,s):s},s.thresholds=function(){return o.slice()},s.copy=function(){return t().domain([n,r]).range(a).unknown(e)},Bc.apply(Vh(s),arguments)}),Jd),sp(Id,(function t(){var e,n=[.5],r=[0,1],i=1;function o(t){return null!=t&&t<=t?r[oe(n,t,0,i)]:e}return o.domain=function(t){return arguments.length?(n=Array.from(t),i=Math.min(n.length,r.length-1),o):n.slice()},o.range=function(t){return arguments.length?(r=Array.from(t),i=Math.min(n.length,r.length-1),o):r.slice()},o.invertExtent=function(t){var e=r.indexOf(t);return[n[e-1],n[e]]},o.unknown=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return t().domain(n).range(r).unknown(e)},Bc.apply(o,arguments)}),Jd),sp(Gd,(function t(){let e=[],n=[];function r(t){return null==t||t!=t?void 0:n[(oe(e,t)-1)%n.length]}return r.domain=function(t){return arguments.length?(e=function(t){return ep.call(t,$)}(t),r):e.slice()},r.range=function(t){return arguments.length?(n=np.call(t),r):n.slice()},r.tickFormat=function(t,n){return Gh(e[0],S(e),null==t?10:t,n)},r.copy=function(){return t().domain(r.domain()).range(r.range())},r}),[Xd,Jd]),sp(Wd,Oc,Xd),sp(Yd,Kd,Xd),sp(Hd,(function(){return tp(Kd().paddingInner(1))}),Xd);const mp=["clamp","base","constant","exponent"];function yp(t,e){const n=e[0],r=S(e)-n;return function(e){return t(n+e*r)}}function vp(t,e,n){return Oh(bp(e||"rgb",n),t)}function _p(t,e){const n=new Array(e),r=e+1;for(let i=0;it[e]?a[e](t[e]()):0)),a):it(.5)}function bp(t,e){const n=Rh[function(t){return"interpolate"+t.toLowerCase().split("-").map((t=>t[0].toUpperCase()+t.slice(1))).join("")}(t)];return null!=e&&n&&n.gamma?n.gamma(e):n}function wp(t){if(A(t))return t;const e=t.length/6|0,n=new Array(e);for(let r=0;r1?(Ap[t]=e,this):Ap[t]}kp({accent:wd,category10:bd,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:kd,observable10:Ad,paired:Md,pastel1:Ed,pastel2:Dd,set1:Cd,set2:Fd,set3:Sd,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"},wp),kp({blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},(t=>vp(wp(t))));const Ep="symbol",Dp="discrete",Cp=t=>A(t)?t.map((t=>String(t))):String(t),Fp=(t,e)=>t[1]-e[1],Sp=(t,e)=>e[1]-t[1];function $p(t,e,n){let r;return vt(e)&&(t.bins&&(e=Math.max(e,t.bins.length)),null!=n&&(e=Math.min(e,Math.floor(Dt(t.domain())/n||1)+1))),M(e)&&(r=e.step,e=e.interval),xt(e)&&(e=t.type===Rd?Cr(e):t.type==Ld?Fr(e):s("Only time and utc scales accept interval strings."),r&&(e=e.every(r))),e}function Tp(t,e,n){let r=t.range(),i=r[0],o=S(r),a=Fp;if(i>o&&(r=o,o=i,i=r,a=Sp),i=Math.floor(i),o=Math.ceil(o),e=e.map((e=>[e,t(e)])).filter((t=>i<=t[1]&&t[1]<=o)).sort(a).map((t=>t[0])),n>0&&e.length>1){const t=[e[0],S(e)];for(;e.length>n&&e.length>=3;)e=e.filter(((t,e)=>!(e%2)));e.length<3&&(e=t)}return e}function Bp(t,e){return t.bins?Tp(t,t.bins,e):t.ticks?t.ticks(e):t.domain()}function Np(t,e,n,r,i,o){const a=e.type;let s=Cp;if(a===Rd||i===Rd)s=t.timeFormat(r);else if(a===Ld||i===Ld)s=t.utcFormat(r);else if(dp(a)){const i=t.formatFloat(r);if(o||e.bins)s=i;else{const t=zp(e,n,!1);s=e=>t(e)?i(e):""}}else if(e.tickFormat){const i=e.domain();s=t.formatSpan(i[0],i[i.length-1],n,r)}else r&&(s=t.format(r));return s}function zp(t,e,n){const r=Bp(t,e),i=t.base(),o=Math.log(i),a=Math.max(1,i*e/r.length),s=t=>{let e=t/Math.pow(i,Math.round(Math.log(t)/o));return e*iOp[t.type]||t.bins;function qp(t,e,n,r,i,o,a){const s=Rp[e.type]&&o!==Rd&&o!==Ld?function(t,e,n){const r=e[Rp[e.type]](),i=r.length;let o,a=i>1?r[1]-r[0]:r[0];for(o=1;o(e,n,r)=>{const i=jp(r[n+1],jp(r.max,1/0)),o=Hp(e,t),a=Hp(i,t);return o&&a?o+" – "+a:a?"< "+a:"≥ "+o},jp=(t,e)=>null!=t?t:e,Ip=t=>(e,n)=>n?t(e):null,Wp=t=>e=>t(e),Hp=(t,e)=>Number.isFinite(t)?e(t):null;function Yp(t,e,n,r){const i=r||e.type;return xt(n)&&function(t){return lp(t,Qd)}(i)&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),n||i!==Rd?n||i!==Ld?qp(t,e,5,null,n,r,!0):t.utcFormat("%A, %d %B %Y, %X UTC"):t.timeFormat("%A, %d %B %Y, %X")}function Gp(t,e,n){n=n||{};const r=Math.max(3,n.maxlen||7),i=Yp(t,e,n.format,n.formatType);if(hp(e.type)){const t=Lp(e).slice(1).map(i),n=t.length;return`${n} boundar${1===n?"y":"ies"}: ${t.join(", ")}`}if(fp(e.type)){const t=e.domain(),n=t.length;return`${n} value${1===n?"":"s"}: ${n>r?t.slice(0,r-2).map(i).join(", ")+", ending with "+t.slice(-1).map(i):t.map(i).join(", ")}`}{const t=e.domain();return`values from ${i(t[0])} to ${i(S(t))}`}}let Vp=0;const Xp="p_";function Jp(t){return t&&t.gradient}function Zp(t,e,n){const r=t.gradient;let i=t.id,o="radial"===r?Xp:"";return i||(i=t.id="gradient_"+Vp++,"radial"===r?(t.x1=Qp(t.x1,.5),t.y1=Qp(t.y1,.5),t.r1=Qp(t.r1,0),t.x2=Qp(t.x2,.5),t.y2=Qp(t.y2,.5),t.r2=Qp(t.r2,.5),o=Xp):(t.x1=Qp(t.x1,0),t.y1=Qp(t.y1,0),t.x2=Qp(t.x2,1),t.y2=Qp(t.y2,0))),e[i]=t,"url("+(n||"")+"#"+o+i+")"}function Qp(t,e){return null!=t?t:e}function Kp(t,e){var n,r=[];return n={gradient:"linear",x1:t?t[0]:0,y1:t?t[1]:0,x2:e?e[0]:1,y2:e?e[1]:0,stops:r,stop:function(t,e){return r.push({offset:t,color:e}),n}}}const tg={basis:{curve:function(t){return new ec(t)}},"basis-closed":{curve:function(t){return new nc(t)}},"basis-open":{curve:function(t){return new rc(t)}},bundle:{curve:oc,tension:"beta",value:.85},cardinal:{curve:uc,tension:"tension",value:0},"cardinal-open":{curve:hc,tension:"tension",value:0},"cardinal-closed":{curve:cc,tension:"tension",value:0},"catmull-rom":{curve:gc,tension:"alpha",value:.5},"catmull-rom-closed":{curve:yc,tension:"alpha",value:.5},"catmull-rom-open":{curve:_c,tension:"alpha",value:.5},linear:{curve:Gl},"linear-closed":{curve:function(t){return new xc(t)}},monotone:{horizontal:function(t){return new Ec(t)},vertical:function(t){return new Mc(t)}},natural:{curve:function(t){return new Cc(t)}},step:{curve:function(t){return new Sc(t,.5)}},"step-after":{curve:function(t){return new Sc(t,1)}},"step-before":{curve:function(t){return new Sc(t,0)}}};function eg(t,e,n){var r=lt(tg,t)&&tg[t],i=null;return r&&(i=r.curve||r[e||"vertical"],r.tension&&null!=n&&(i=i[r.tension](n))),i}const ng={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7},rg=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi,ig=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/,og=/^((\s+,?\s*)|(,\s*))/,ag=/^[01]/;function sg(t){const e=[];return(t.match(rg)||[]).forEach((t=>{let n=t[0];const r=n.toLowerCase(),i=ng[r],o=function(t,e,n){const r=[];for(let i=0;e&&i1&&(g=Math.sqrt(g),n*=g,r*=g);const m=h/n,y=f/n,v=-f/r,_=h/r,x=m*s+y*u,b=v*s+_*u,w=m*t+y*e,k=v*t+_*e;let A=1/((w-x)*(w-x)+(k-b)*(k-b))-.25;A<0&&(A=0);let M=Math.sqrt(A);o==i&&(M=-M);const E=.5*(x+w)-M*(k-b),D=.5*(b+k)+M*(w-x),C=Math.atan2(b-D,x-E);let F=Math.atan2(k-D,w-E)-C;F<0&&1===o?F+=cg:F>0&&0===o&&(F-=cg);const S=Math.ceil(Math.abs(F/(lg+.001))),$=[];for(let t=0;t+t}function Sg(t,e,n){return Math.max(e,Math.min(t,n))}function $g(){var t=Mg,e=Eg,n=Dg,r=Cg,i=Fg(0),o=i,a=i,s=i,u=null;function l(l,c,f){var h,d=null!=c?c:+t.call(this,l),p=null!=f?f:+e.call(this,l),g=+n.call(this,l),m=+r.call(this,l),y=Math.min(g,m)/2,v=Sg(+i.call(this,l),0,y),_=Sg(+o.call(this,l),0,y),x=Sg(+a.call(this,l),0,y),b=Sg(+s.call(this,l),0,y);if(u||(u=h=Rl()),v<=0&&_<=0&&x<=0&&b<=0)u.rect(d,p,g,m);else{var w=d+g,k=p+m;u.moveTo(d+v,p),u.lineTo(w-_,p),u.bezierCurveTo(w-Ag*_,p,w,p+Ag*_,w,p+_),u.lineTo(w,k-b),u.bezierCurveTo(w,k-Ag*b,w-Ag*b,k,w-b,k),u.lineTo(d+x,k),u.bezierCurveTo(d+Ag*x,k,d,k-Ag*x,d,k-x),u.lineTo(d,p+v),u.bezierCurveTo(d,p+Ag*v,d+Ag*v,p,d+v,p),u.closePath()}if(h)return u=null,h+""||null}return l.x=function(e){return arguments.length?(t=Fg(e),l):t},l.y=function(t){return arguments.length?(e=Fg(t),l):e},l.width=function(t){return arguments.length?(n=Fg(t),l):n},l.height=function(t){return arguments.length?(r=Fg(t),l):r},l.cornerRadius=function(t,e,n,r){return arguments.length?(i=Fg(t),o=null!=e?Fg(e):i,s=null!=n?Fg(n):i,a=null!=r?Fg(r):o,l):i},l.context=function(t){return arguments.length?(u=null==t?null:t,l):u},l}function Tg(){var t,e,n,r,i,o,a,s,u=null;function l(t,e,n){const r=n/2;if(i){var l=a-e,c=t-o;if(l||c){var f=Math.hypot(l,c),h=(l/=f)*s,d=(c/=f)*s,p=Math.atan2(c,l);u.moveTo(o-h,a-d),u.lineTo(t-l*r,e-c*r),u.arc(t,e,r,p-Math.PI,p),u.lineTo(o+h,a+d),u.arc(o,a,s,p,p+Math.PI)}else u.arc(t,e,r,0,cg);u.closePath()}else i=1;o=t,a=e,s=r}function c(o){var a,s,c,f=o.length,h=!1;for(null==u&&(u=c=Rl()),a=0;a<=f;++a)!(at.x||0,zg=t=>t.y||0,Og=t=>!(!1===t.defined),Rg=function(){var t=Ul,e=ql,n=vl(0),r=null,i=Pl,o=jl,a=Il,s=null,u=Ll(l);function l(){var l,c,f=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-Cl,p=o.apply(this,arguments)-Cl,g=_l(p-d),m=p>d;if(s||(s=l=u()),hEl)if(g>Fl-El)s.moveTo(h*bl(d),h*Al(d)),s.arc(0,0,h,d,p,!m),f>El&&(s.moveTo(f*bl(p),f*Al(p)),s.arc(0,0,f,p,d,m));else{var y,v,_=d,x=p,b=d,w=p,k=g,A=g,M=a.apply(this,arguments)/2,E=M>El&&(r?+r.apply(this,arguments):Ml(f*f+h*h)),D=kl(_l(h-f)/2,+n.apply(this,arguments)),C=D,F=D;if(E>El){var S=Sl(E/f*Al(M)),$=Sl(E/h*Al(M));(k-=2*S)>El?(b+=S*=m?1:-1,w-=S):(k=0,b=w=(d+p)/2),(A-=2*$)>El?(_+=$*=m?1:-1,x-=$):(A=0,_=x=(d+p)/2)}var T=h*bl(_),B=h*Al(_),N=f*bl(w),z=f*Al(w);if(D>El){var O,R=h*bl(x),L=h*Al(x),U=f*bl(b),q=f*Al(b);if(g1?0:t<-1?Dl:Math.acos(t)}((P*I+j*W)/(Ml(P*P+j*j)*Ml(I*I+W*W)))/2),Y=Ml(O[0]*O[0]+O[1]*O[1]);C=kl(D,(f-Y)/(H-1)),F=kl(D,(h-Y)/(H+1))}else C=F=0}A>El?F>El?(y=Wl(U,q,T,B,h,F,m),v=Wl(R,L,N,z,h,F,m),s.moveTo(y.cx+y.x01,y.cy+y.y01),FEl&&k>El?C>El?(y=Wl(N,z,R,L,f,-C,m),v=Wl(T,B,U,q,f,-C,m),s.lineTo(y.cx+y.x01,y.cy+y.y01),Ct.startAngle||0)).endAngle((t=>t.endAngle||0)).padAngle((t=>t.padAngle||0)).innerRadius((t=>t.innerRadius||0)).outerRadius((t=>t.outerRadius||0)).cornerRadius((t=>t.cornerRadius||0)),Lg=Zl().x(Ng).y1(zg).y0((t=>(t.y||0)+(t.height||0))).defined(Og),Ug=Zl().y(zg).x1(Ng).x0((t=>(t.x||0)+(t.width||0))).defined(Og),qg=Jl().x(Ng).y(zg).defined(Og),Pg=$g().x(Ng).y(zg).width((t=>t.width||0)).height((t=>t.height||0)).cornerRadius((t=>Bg(t.cornerRadiusTopLeft,t.cornerRadius)||0),(t=>Bg(t.cornerRadiusTopRight,t.cornerRadius)||0),(t=>Bg(t.cornerRadiusBottomRight,t.cornerRadius)||0),(t=>Bg(t.cornerRadiusBottomLeft,t.cornerRadius)||0)),jg=function(t,e){let n=null,r=Ll(i);function i(){let i;if(n||(n=i=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return t="function"==typeof t?t:vl(t||Ql),e="function"==typeof e?e:vl(void 0===e?64:+e),i.type=function(e){return arguments.length?(t="function"==typeof e?e:vl(e),i):t},i.size=function(t){return arguments.length?(e="function"==typeof t?t:vl(+t),i):e},i.context=function(t){return arguments.length?(n=null==t?null:t,i):n},i}().type((t=>wg(t.shape||"circle"))).size((t=>Bg(t.size,64))),Ig=Tg().x(Ng).y(zg).defined(Og).size((t=>t.size||1));function Wg(t){return t.cornerRadius||t.cornerRadiusTopLeft||t.cornerRadiusTopRight||t.cornerRadiusBottomRight||t.cornerRadiusBottomLeft}function Hg(t,e,n,r){return Pg.context(t)(e,n,r)}var Yg=1;function Gg(){Yg=1}function Vg(t,e,n){var r=e.clip,i=t._defs,o=e.clip_id||(e.clip_id="clip"+Yg++),a=i.clipping[o]||(i.clipping[o]={id:o});return Z(r)?a.path=r(null):Wg(n)?a.path=Hg(null,n,0,0):(a.width=n.width||0,a.height=n.height||0),"url(#"+o+")"}function Xg(t){this.clear(),t&&this.union(t)}function Jg(t){this.mark=t,this.bounds=this.bounds||new Xg}function Zg(t){Jg.call(this,t),this.items=this.items||[]}Xg.prototype={clone(){return new Xg(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2},set(t,e,n,r){return nthis.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},expand(t){return this.x1-=t,this.y1-=t,this.x2+=t,this.y2+=t,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(t){return this.x1*=t,this.y1*=t,this.x2*=t,this.y2*=t,this},translate(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},rotate(t,e,n){const r=this.rotatedPoints(t,e,n);return this.clear().add(r[0],r[1]).add(r[2],r[3]).add(r[4],r[5]).add(r[6],r[7])},rotatedPoints(t,e,n){var{x1:r,y1:i,x2:o,y2:a}=this,s=Math.cos(t),u=Math.sin(t),l=e-e*s+n*u,c=n-e*u-n*s;return[s*r-u*i+l,u*r+s*i+c,s*r-u*a+l,u*r+s*a+c,s*o-u*i+l,u*o+s*i+c,s*o-u*a+l,u*o+s*a+c]},union(t){return t.x1this.x2&&(this.x2=t.x2),t.y2>this.y2&&(this.y2=t.y2),this},intersect(t){return t.x1>this.x1&&(this.x1=t.x1),t.y1>this.y1&&(this.y1=t.y1),t.x2=t.x2&&this.y1<=t.y1&&this.y2>=t.y2},alignsWith(t){return t&&(this.x1==t.x1||this.x2==t.x2||this.y1==t.y1||this.y2==t.y2)},intersects(t){return t&&!(this.x2t.x2||this.y2t.y2)},contains(t,e){return!(tthis.x2||ethis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}},dt(Zg,Jg);class Qg{constructor(t){this._pending=0,this._loader=t||fa()}pending(){return this._pending}sanitizeURL(t){const e=this;return Kg(e),e._loader.sanitize(t,{context:"href"}).then((t=>(tm(e),t))).catch((()=>(tm(e),null)))}loadImage(t){const e=this,n=Tc();return Kg(e),e._loader.sanitize(t,{context:"image"}).then((t=>{const r=t.href;if(!r||!n)throw{url:r};const i=new n,o=lt(t,"crossOrigin")?t.crossOrigin:"anonymous";return null!=o&&(i.crossOrigin=o),i.onload=()=>tm(e),i.onerror=()=>tm(e),i.src=r,i})).catch((t=>(tm(e),{complete:!1,width:0,height:0,src:t&&t.url||""})))}ready(){const t=this;return new Promise((e=>{!function n(r){t.pending()?setTimeout((()=>{n(!0)}),10):e(r)}(!1)}))}}function Kg(t){t._pending+=1}function tm(t){t._pending-=1}function em(t,e,n){if(e.stroke&&0!==e.opacity&&0!==e.strokeOpacity){const r=null!=e.strokeWidth?+e.strokeWidth:1;t.expand(r+(n?function(t,e){return t.strokeJoin&&"miter"!==t.strokeJoin?0:e}(e,r):0))}return t}const nm=cg-1e-8;let rm,im,om,am,sm,um,lm,cm;const fm=(t,e)=>rm.add(t,e),hm=(t,e)=>fm(im=t,om=e),dm=t=>fm(t,rm.y1),pm=t=>fm(rm.x1,t),gm=(t,e)=>sm*t+lm*e,mm=(t,e)=>um*t+cm*e,ym=(t,e)=>fm(gm(t,e),mm(t,e)),vm=(t,e)=>hm(gm(t,e),mm(t,e));function _m(t,e){return rm=t,e?(am=e*ug,sm=cm=Math.cos(am),um=Math.sin(am),lm=-um):(sm=cm=1,am=um=lm=0),xm}const xm={beginPath(){},closePath(){},moveTo:vm,lineTo:vm,rect(t,e,n,r){am?(ym(t+n,e),ym(t+n,e+r),ym(t,e+r),vm(t,e)):(fm(t+n,e+r),hm(t,e))},quadraticCurveTo(t,e,n,r){const i=gm(t,e),o=mm(t,e),a=gm(n,r),s=mm(n,r);bm(im,i,a,dm),bm(om,o,s,pm),hm(a,s)},bezierCurveTo(t,e,n,r,i,o){const a=gm(t,e),s=mm(t,e),u=gm(n,r),l=mm(n,r),c=gm(i,o),f=mm(i,o);wm(im,a,u,c,dm),wm(om,s,l,f,pm),hm(c,f)},arc(t,e,n,r,i,o){if(r+=am,i+=am,im=n*Math.cos(i)+t,om=n*Math.sin(i)+e,Math.abs(i-r)>nm)fm(t-n,e-n),fm(t+n,e+n);else{const a=r=>fm(n*Math.cos(r)+t,n*Math.sin(r)+e);let s,u;if(a(r),a(i),i!==r)if((r%=cg)<0&&(r+=cg),(i%=cg)<0&&(i+=cg),ii;++u,s-=lg)a(s);else for(s=r-r%lg+lg,u=0;u<4&&s1e-14?(u=a*a+s*o,u>=0&&(u=Math.sqrt(u),l=(-a+u)/o,c=(-a-u)/o)):l=.5*s/a,0m)return!1;d>g&&(g=d)}else if(f>0){if(d0&&(t.globalAlpha=n,t.fillStyle=Nm(t,e,e.fill),!0)}var Om=[];function Rm(t,e,n){var r=null!=(r=e.strokeWidth)?r:1;return!(r<=0)&&((n*=null==e.strokeOpacity?1:e.strokeOpacity)>0&&(t.globalAlpha=n,t.strokeStyle=Nm(t,e,e.stroke),t.lineWidth=r,t.lineCap=e.strokeCap||"butt",t.lineJoin=e.strokeJoin||"miter",t.miterLimit=e.strokeMiterLimit||10,t.setLineDash&&(t.setLineDash(e.strokeDash||Om),t.lineDashOffset=e.strokeDashOffset||0),!0))}function Lm(t,e){return t.zindex-e.zindex||t.index-e.index}function Um(t){if(!t.zdirty)return t.zitems;var e,n,r,i=t.items,o=[];for(n=0,r=i.length;n=0;)if(n=e(i[r]))return n;if(i===o)for(r=(i=t.items).length;--r>=0;)if(!i[r].zindex&&(n=e(i[r])))return n;return null}function jm(t){return function(e,n,r){qm(n,(n=>{r&&!r.intersects(n.bounds)||Wm(t,e,n,n)}))}}function Im(t){return function(e,n,r){!n.items.length||r&&!r.intersects(n.bounds)||Wm(t,e,n.items[0],n.items)}}function Wm(t,e,n,r){var i=null==n.opacity?1:n.opacity;0!==i&&(t(e,r)||($m(e,n),n.fill&&zm(e,n,i)&&e.fill(),n.stroke&&Rm(e,n,i)&&e.stroke()))}function Hm(t){return t=t||p,function(e,n,r,i,o,a){return r*=e.pixelRatio,i*=e.pixelRatio,Pm(n,(n=>{const s=n.bounds;if((!s||s.contains(o,a))&&s)return t(e,n,r,i,o,a)?n:void 0}))}}function Ym(t,e){return function(n,r,i,o){var a,s,u=Array.isArray(r)?r[0]:r,l=null==e?u.fill:e,c=u.stroke&&n.isPointInStroke;return c&&(a=u.strokeWidth,s=u.strokeCap,n.lineWidth=null!=a?a:1,n.lineCap=null!=s?s:"butt"),!t(n,r)&&(l&&n.isPointInPath(i,o)||c&&n.isPointInStroke(i,o))}}function Gm(t){return Hm(Ym(t))}function Vm(t,e){return"translate("+t+","+e+")"}function Xm(t){return"rotate("+t+")"}function Jm(t){return Vm(t.x||0,t.y||0)}function Zm(t,e,n){function r(t,n){var r=n.x||0,i=n.y||0,o=n.angle||0;t.translate(r,i),o&&t.rotate(o*=ug),t.beginPath(),e(t,n),o&&t.rotate(-o),t.translate(-r,-i)}return{type:t,tag:"path",nested:!1,attr:function(t,n){t("transform",function(t){return Vm(t.x||0,t.y||0)+(t.angle?" "+Xm(t.angle):"")}(n)),t("d",e(null,n))},bound:function(t,n){return e(_m(t,n.angle),n),em(t,n).translate(n.x||0,n.y||0)},draw:jm(r),pick:Gm(r),isect:n||Em(r)}}var Qm=Zm("arc",(function(t,e){return Rg.context(t)(e)}));function Km(t,e,n){function r(t,n){t.beginPath(),e(t,n)}const i=Ym(r);return{type:t,tag:"path",nested:!0,attr:function(t,n){var r=n.mark.items;r.length&&t("d",e(null,r))},bound:function(t,n){var r=n.items;return 0===r.length?t:(e(_m(t),r),em(t,r[0]))},draw:Im(r),pick:function(t,e,n,r,o,a){var s=e.items,u=e.bounds;return!s||!s.length||u&&!u.contains(o,a)?null:(n*=t.pixelRatio,r*=t.pixelRatio,i(t,s,n,r)?s[0]:null)},isect:Dm,tip:n}}var ty=Km("area",(function(t,e){const n=e[0],r=n.interpolate||"linear";return("horizontal"===n.orient?Ug:Lg).curve(eg(r,n.orient,n.tension)).context(t)(e)}),(function(t,e){for(var n,r,i="horizontal"===t[0].orient?e[1]:e[0],o="horizontal"===t[0].orient?"y":"x",a=t.length,s=1/0;--a>=0;)!1!==t[a].defined&&(r=Math.abs(t[a][o]-i)).5&&e<1.5?.5-Math.abs(e-1):0}function ry(t,e){const n=ny(e);t("d",Hg(null,e,n,n))}function iy(t,e,n,r){const i=ny(e);t.beginPath(),Hg(t,e,(n||0)+i,(r||0)+i)}const oy=Ym(iy),ay=Ym(iy,!1),sy=Ym(iy,!0);var uy={type:"group",tag:"g",nested:!1,attr:function(t,e){t("transform",Jm(e))},bound:function(t,e){if(!e.clip&&e.items){const n=e.items,r=n.length;for(let e=0;e{const i=e.x||0,o=e.y||0,a=e.strokeForeground,s=null==e.opacity?1:e.opacity;(e.stroke||e.fill)&&s&&(iy(t,e,i,o),$m(t,e),e.fill&&zm(t,e,s)&&t.fill(),e.stroke&&!a&&Rm(t,e,s)&&t.stroke()),t.save(),t.translate(i,o),e.clip&&ey(t,e),n&&n.translate(-i,-o),qm(e,(e=>{("group"===e.marktype||null==r||r.includes(e.marktype))&&this.draw(t,e,n,r)})),n&&n.translate(i,o),t.restore(),a&&e.stroke&&s&&(iy(t,e,i,o),$m(t,e),Rm(t,e,s)&&t.stroke())}))},pick:function(t,e,n,r,i,o){if(e.bounds&&!e.bounds.contains(i,o)||!e.items)return null;const a=n*t.pixelRatio,s=r*t.pixelRatio;return Pm(e,(u=>{let l,c,f;const h=u.bounds;if(h&&!h.contains(i,o))return;c=u.x||0,f=u.y||0;const d=c+(u.width||0),p=f+(u.height||0),g=u.clip;if(g&&(id||op))return;if(t.save(),t.translate(c,f),c=i-c,f=o-f,g&&Wg(u)&&!sy(t,u,a,s))return t.restore(),null;const m=u.strokeForeground,y=!1!==e.interactive;return y&&m&&u.stroke&&ay(t,u,a,s)?(t.restore(),u):(l=Pm(u,(t=>function(t,e,n){return(!1!==t.interactive||"group"===t.marktype)&&t.bounds&&t.bounds.contains(e,n)}(t,c,f)?this.pick(t,n,r,c,f):null)),!l&&y&&(u.fill||!m&&u.stroke)&&oy(t,u,a,s)&&(l=u),t.restore(),l||null)}))},isect:Cm,content:function(t,e,n){t("clip-path",e.clip?Vg(n,e,e):null)},background:function(t,e){t("class","background"),t("aria-hidden",!0),ry(t,e)},foreground:function(t,e){t("class","foreground"),t("aria-hidden",!0),e.strokeForeground?ry(t,e):t("d","")}},ly={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function cy(t,e){var n=t.image;return(!n||t.url&&t.url!==n.url)&&(n={complete:!1,width:0,height:0},e.loadImage(t.url).then((e=>{t.image=e,t.image.url=t.url}))),n}function fy(t,e){return null!=t.width?t.width:e&&e.width?!1!==t.aspect&&t.height?t.height*e.width/e.height:e.width:0}function hy(t,e){return null!=t.height?t.height:e&&e.height?!1!==t.aspect&&t.width?t.width*e.height/e.width:e.height:0}function dy(t,e){return"center"===t?e/2:"right"===t?e:0}function py(t,e){return"middle"===t?e/2:"bottom"===t?e:0}var gy={type:"image",tag:"image",nested:!1,attr:function(t,e,n){const r=cy(e,n),i=fy(e,r),o=hy(e,r),a=(e.x||0)-dy(e.align,i),s=(e.y||0)-py(e.baseline,o);t("href",!r.src&&r.toDataURL?r.toDataURL():r.src||"",ly["xmlns:xlink"],"xlink:href"),t("transform",Vm(a,s)),t("width",i),t("height",o),t("preserveAspectRatio",!1===e.aspect?"none":"xMidYMid")},bound:function(t,e){const n=e.image,r=fy(e,n),i=hy(e,n),o=(e.x||0)-dy(e.align,r),a=(e.y||0)-py(e.baseline,i);return t.set(o,a,o+r,a+i)},draw:function(t,e,n){qm(e,(e=>{if(n&&!n.intersects(e.bounds))return;const r=cy(e,this);let i=fy(e,r),o=hy(e,r);if(0===i||0===o)return;let a,s,u,l,c=(e.x||0)-dy(e.align,i),f=(e.y||0)-py(e.baseline,o);!1!==e.aspect&&(s=r.width/r.height,u=e.width/e.height,s==s&&u==u&&s!==u&&(u=0;)if(!1!==t[o].defined&&(n=t[o].x-e[0])*n+(r=t[o].y-e[1])*r{if(!n||n.intersects(e.bounds)){var r=null==e.opacity?1:e.opacity;r&&by(t,e,r)&&($m(t,e),t.stroke())}}))},pick:Hm((function(t,e,n,r){return!!t.isPointInStroke&&(by(t,e,1)&&t.isPointInStroke(n,r))})),isect:Fm},ky=Zm("shape",(function(t,e){return(e.mark.shape||e.shape).context(t)(e)})),Ay=Zm("symbol",(function(t,e){return jg.context(t)(e)}),Dm);const My=kt();var Ey={height:Ty,measureWidth:Sy,estimateWidth:Cy,width:Cy,canvas:Dy};function Dy(t){Ey.width=t&&Am?Sy:Cy}function Cy(t,e){return Fy(Oy(t,e),Ty(t))}function Fy(t,e){return~~(.8*t.length*e)}function Sy(t,e){return Ty(t)<=0||!(e=Oy(t,e))?0:$y(e,Ly(t))}function $y(t,e){const n=`(${e}) ${t}`;let r=My.get(n);return void 0===r&&(Am.font=e,r=Am.measureText(t).width,My.set(n,r)),r}function Ty(t){return null!=t.fontSize?+t.fontSize||0:11}function By(t){return null!=t.lineHeight?t.lineHeight:Ty(t)+2}function Ny(t){return e=t.lineBreak&&t.text&&!A(t.text)?t.text.split(t.lineBreak):t.text,A(e)?e.length>1?e:e[0]:e;var e}function zy(t){const e=Ny(t);return(A(e)?e.length-1:0)*By(t)}function Oy(t,e){const n=null==e?"":(e+"").trim();return t.limit>0&&n.length?function(t,e){var n=+t.limit,r=function(t){if(Ey.width===Sy){const e=Ly(t);return t=>$y(t,e)}if(Ey.width===Cy){const e=Ty(t);return t=>Fy(t,e)}return e=>Ey.width(t,e)}(t);if(r(e)>>1,r(e.slice(i))>n?s=i+1:u=i;return o+e.slice(s)}for(;s>>1),r(e.slice(0,i))Math.max(t,Ey.width(e,n))),0)):r=Ey.width(e,f),"center"===o?l-=r/2:"right"===o&&(l-=r),t.set(l+=s,c+=u,l+r,c+i),e.angle&&!n)t.rotate(e.angle*ug,s,u);else if(2===n)return t.rotatedPoints(e.angle*ug,s,u);return t}var Wy={type:"text",tag:"text",nested:!1,attr:function(t,e){var n,r=e.dx||0,i=(e.dy||0)+Uy(e),o=jy(e),a=o.x1,s=o.y1,u=e.angle||0;t("text-anchor",qy[e.align]||"start"),u?(n=Vm(a,s)+" "+Xm(u),(r||i)&&(n+=" "+Vm(r,i))):n=Vm(a+r,s+i),t("transform",n)},bound:Iy,draw:function(t,e,n){qm(e,(e=>{var r,i,o,a,s,u,l,c=null==e.opacity?1:e.opacity;if(!(n&&!n.intersects(e.bounds)||0===c||e.fontSize<=0||null==e.text||0===e.text.length)){if(t.font=Ly(e),t.textAlign=e.align||"left",i=(r=jy(e)).x1,o=r.y1,e.angle&&(t.save(),t.translate(i,o),t.rotate(e.angle*ug),i=o=0),i+=e.dx||0,o+=(e.dy||0)+Uy(e),u=Ny(e),$m(t,e),A(u))for(s=By(e),a=0;a=0;)if(!1!==t[i].defined&&(n=t[i].x-e[0])*n+(r=t[i].y-e[1])*r<(n=t[i].size||1)*n)return t[i];return null})),Yy={arc:Qm,area:ty,group:uy,image:gy,line:my,path:vy,rect:xy,rule:wy,shape:ky,symbol:Ay,text:Wy,trail:Hy};function Gy(t,e,n){var r=Yy[t.mark.marktype],i=e||r.bound;return r.nested&&(t=t.mark),i(t.bounds||(t.bounds=new Xg),t,n)}var Vy={mark:null};function Xy(t,e,n){var r,i,o,a,s=Yy[t.marktype],u=s.bound,l=t.items,c=l&&l.length;if(s.nested)return c?o=l[0]:(Vy.mark=t,o=Vy),a=Gy(o,u,n),e=e&&e.union(a)||a;if(e=e||t.bounds&&t.bounds.clear()||new Xg,c)for(r=0,i=l.length;re;)t.removeChild(n[--r]);return t}function av(t){return"mark-"+t.marktype+(t.role?" role-"+t.role:"")+(t.name?" "+t.name:"")}function sv(t,e){const n=e.getBoundingClientRect();return[t.clientX-n.left-(e.clientLeft||0),t.clientY-n.top-(e.clientTop||0)]}class uv{constructor(t,e){this._active=null,this._handlers={},this._loader=t||fa(),this._tooltip=e||lv}initialize(t,e,n){return this._el=t,this._obj=n||null,this.origin(e)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}origin(t){return arguments.length?(this._origin=t||[0,0],this):this._origin.slice()}scene(t){return arguments.length?(this._scene=t,this):this._scene}on(){}off(){}_handlerIndex(t,e,n){for(let r=t?t.length:0;--r>=0;)if(t[r].type===e&&(!n||t[r].handler===n))return r;return-1}handlers(t){const e=this._handlers,n=[];if(t)n.push(...e[this.eventName(t)]);else for(const t in e)n.push(...e[t]);return n}eventName(t){const e=t.indexOf(".");return e<0?t:t.slice(0,e)}handleHref(t,e,n){this._loader.sanitize(n,{context:"href"}).then((e=>{const n=new MouseEvent(t.type,t),r=nv(null,"a");for(const t in e)r.setAttribute(t,e[t]);r.dispatchEvent(n)})).catch((()=>{}))}handleTooltip(t,e,n){if(e&&null!=e.tooltip){e=function(t,e,n,r){var i,o,a=t&&t.mark;if(a&&(i=Yy[a.marktype]).tip){for((o=sv(e,n))[0]-=r[0],o[1]-=r[1];t=t.mark.group;)o[0]-=t.x||0,o[1]-=t.y||0;t=i.tip(a.items,o)}return t}(e,t,this.canvas(),this._origin);const r=n&&e&&e.tooltip||null;this._tooltip.call(this._obj,this,t,e,r)}}getItemBoundingClientRect(t){const e=this.canvas();if(!e)return;const n=e.getBoundingClientRect(),r=this._origin,i=t.bounds,o=i.width(),a=i.height();let s=i.x1+r[0]+n.left,u=i.y1+r[1]+n.top;for(;t.mark&&(t=t.mark.group);)s+=t.x||0,u+=t.y||0;return{x:s,y:u,width:o,height:a,left:s,top:u,right:s+o,bottom:u+a}}}function lv(t,e,n,r){t.element().setAttribute("title",r||"")}class cv{constructor(t){this._el=null,this._bgcolor=null,this._loader=new Qg(t)}initialize(t,e,n,r,i){return this._el=t,this.resize(e,n,r,i)}element(){return this._el}canvas(){return this._el&&this._el.firstChild}background(t){return 0===arguments.length?this._bgcolor:(this._bgcolor=t,this)}resize(t,e,n,r){return this._width=t,this._height=e,this._origin=n||[0,0],this._scale=r||1,this}dirty(){}render(t,e){const n=this;return n._call=function(){n._render(t,e)},n._call(),n._call=null,n}_render(){}renderAsync(t,e){const n=this.render(t,e);return this._ready?this._ready.then((()=>n)):Promise.resolve(n)}_load(t,e){var n=this,r=n._loader[t](e);if(!n._ready){const t=n._call;n._ready=n._loader.ready().then((e=>{e&&t(),n._ready=null}))}return r}sanitizeURL(t){return this._load("sanitizeURL",t)}loadImage(t){return this._load("loadImage",t)}}const fv="dragenter",hv="dragleave",dv="dragover",pv="pointerdown",gv="pointermove",mv="pointerout",yv="pointerover",vv="mousedown",_v="mousemove",xv="mouseout",bv="mouseover",wv="click",kv="mousewheel",Av="touchstart",Mv="touchmove",Ev="touchend",Dv=["keydown","keypress","keyup",fv,hv,dv,pv,"pointerup",gv,mv,yv,vv,"mouseup",_v,xv,bv,wv,"dblclick","wheel",kv,Av,Mv,Ev],Cv=gv,Fv=xv,Sv=wv;class $v extends uv{constructor(t,e){super(t,e),this._down=null,this._touch=null,this._first=!0,this._events={},this.events=Dv,this.pointermove=zv([gv,_v],[yv,bv],[mv,xv]),this.dragover=zv([dv],[fv],[hv]),this.pointerout=Ov([mv,xv]),this.dragleave=Ov([hv])}initialize(t,e,n){return this._canvas=t&&rv(t,"canvas"),[wv,vv,pv,gv,mv,hv].forEach((t=>Bv(this,t))),super.initialize(t,e,n)}canvas(){return this._canvas}context(){return this._canvas.getContext("2d")}DOMMouseScroll(t){this.fire(kv,t)}pointerdown(t){this._down=this._active,this.fire(pv,t)}mousedown(t){this._down=this._active,this.fire(vv,t)}click(t){this._down===this._active&&(this.fire(wv,t),this._down=null)}touchstart(t){this._touch=this.pickEvent(t.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(Av,t,!0)}touchmove(t){this.fire(Mv,t,!0)}touchend(t){this.fire(Ev,t,!0),this._touch=null}fire(t,e,n){const r=n?this._touch:this._active,i=this._handlers[t];if(e.vegaType=t,t===Sv&&r&&r.href?this.handleHref(e,r,r.href):t!==Cv&&t!==Fv||this.handleTooltip(e,r,t!==Fv),i)for(let t=0,n=i.length;t=0&&r.splice(i,1),this}pickEvent(t){const e=sv(t,this._canvas),n=this._origin;return this.pick(this._scene,e[0],e[1],e[0]-n[0],e[1]-n[1])}pick(t,e,n,r,i){const o=this.context();return Yy[t.marktype].pick.call(this,o,t,e,n,r,i)}}const Tv=t=>t===Av||t===Mv||t===Ev?[Av,Mv,Ev]:[t];function Bv(t,e){Tv(e).forEach((e=>function(t,e){const n=t.canvas();n&&!t._events[e]&&(t._events[e]=1,n.addEventListener(e,t[e]?n=>t[e](n):n=>t.fire(e,n)))}(t,e)))}function Nv(t,e,n){e.forEach((e=>t.fire(e,n)))}function zv(t,e,n){return function(r){const i=this._active,o=this.pickEvent(r);o===i||(i&&i.exit||Nv(this,n,r),this._active=o,Nv(this,e,r)),Nv(this,t,r)}}function Ov(t){return function(e){Nv(this,t,e),this._active=null}}function Rv(t,e,n,r,i,o){const a="undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&null!=t.parentNode,s=t.getContext("2d"),u=a?"undefined"!=typeof window&&window.devicePixelRatio||1:i;t.width=e*u,t.height=n*u;for(const t in o)s[t]=o[t];return a&&1!==u&&(t.style.width=e+"px",t.style.height=n+"px"),s.pixelRatio=u,s.setTransform(u,0,0,u,u*r[0],u*r[1]),t}class Lv extends cv{constructor(t){super(t),this._options={},this._redraw=!1,this._dirty=new Xg,this._tempb=new Xg}initialize(t,e,n,r,i,o){return this._options=o||{},this._canvas=this._options.externalContext?null:$c(1,1,this._options.type),t&&this._canvas&&(ov(t,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),super.initialize(t,e,n,r,i)}resize(t,e,n,r){if(super.resize(t,e,n,r),this._canvas)Rv(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const t=this._options.externalContext;t||s("CanvasRenderer is missing a valid canvas or context"),t.scale(this._scale,this._scale),t.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this}canvas(){return this._canvas}context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)}dirty(t){const e=this._tempb.clear().union(t.bounds);let n=t.mark.group;for(;n;)e.translate(n.x||0,n.y||0),n=n.mark.group;this._dirty.union(e)}_render(t,e){const n=this.context(),r=this._origin,i=this._width,o=this._height,a=this._dirty,s=Uv(r,i,o);n.save();const u=this._redraw||a.empty()?(this._redraw=!1,s.expand(1)):function(t,e,n){e.expand(1).round(),t.pixelRatio%1&&e.scale(t.pixelRatio).round().scale(1/t.pixelRatio);return e.translate(-n[0]%1,-n[1]%1),t.beginPath(),t.rect(e.x1,e.y1,e.width(),e.height()),t.clip(),e}(n,s.intersect(a),r);return this.clear(-r[0],-r[1],i,o),this.draw(n,t,u,e),n.restore(),a.clear(),this}draw(t,e,n,r){if("group"!==e.marktype&&null!=r&&!r.includes(e.marktype))return;const i=Yy[e.marktype];e.clip&&function(t,e){var n=e.clip;t.save(),Z(n)?(t.beginPath(),n(t),t.clip()):ey(t,e.group)}(t,e),i.draw.call(this,t,e,n,r),e.clip&&t.restore()}clear(t,e,n,r){const i=this._options,o=this.context();"pdf"===i.type||i.externalContext||o.clearRect(t,e,n,r),null!=this._bgcolor&&(o.fillStyle=this._bgcolor,o.fillRect(t,e,n,r))}}const Uv=(t,e,n)=>(new Xg).set(0,0,e,n).translate(-t[0],-t[1]);class qv extends uv{constructor(t,e){super(t,e);const n=this;n._hrefHandler=Pv(n,((t,e)=>{e&&e.href&&n.handleHref(t,e,e.href)})),n._tooltipHandler=Pv(n,((t,e)=>{n.handleTooltip(t,e,t.type!==Fv)}))}initialize(t,e,n){let r=this._svg;return r&&(r.removeEventListener(Sv,this._hrefHandler),r.removeEventListener(Cv,this._tooltipHandler),r.removeEventListener(Fv,this._tooltipHandler)),this._svg=r=t&&rv(t,"svg"),r&&(r.addEventListener(Sv,this._hrefHandler),r.addEventListener(Cv,this._tooltipHandler),r.addEventListener(Fv,this._tooltipHandler)),super.initialize(t,e,n)}canvas(){return this._svg}on(t,e){const n=this.eventName(t),r=this._handlers;if(this._handlerIndex(r[n],t,e)<0){const i={type:t,handler:e,listener:Pv(this,e)};(r[n]||(r[n]=[])).push(i),this._svg&&this._svg.addEventListener(n,i.listener)}return this}off(t,e){const n=this.eventName(t),r=this._handlers[n],i=this._handlerIndex(r,t,e);return i>=0&&(this._svg&&this._svg.removeEventListener(n,r[i].listener),r.splice(i,1)),this}}const Pv=(t,e)=>n=>{let r=n.target.__data__;r=Array.isArray(r)?r[0]:r,n.vegaType=n.type,e.call(t._obj,n,r)},jv="aria-hidden",Iv="aria-label",Wv="role",Hv="aria-roledescription",Yv="graphics-object",Gv="graphics-symbol",Vv=(t,e,n)=>({[Wv]:t,[Hv]:e,[Iv]:n||void 0}),Xv=Bt(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Jv={axis:{desc:"axis",caption:function(t){const e=t.datum,n=t.orient,r=e.title?e_(t):null,i=t.context,o=i.scales[e.scale].value,a=i.dataflow.locale(),s=o.type;return("left"===n||"right"===n?"Y":"X")+"-axis"+(r?` titled '${r}'`:"")+` for a ${fp(s)?"discrete":s} scale`+` with ${Gp(a,o,t)}`}},legend:{desc:"legend",caption:function(t){const e=t.datum,n=e.title?e_(t):null,r=`${e.type||""} legend`.trim(),i=e.scales,o=Object.keys(i),a=t.context,s=a.scales[i[o[0]]].value,u=a.dataflow.locale();return l=r,(l.length?l[0].toUpperCase()+l.slice(1):l)+(n?` titled '${n}'`:"")+` for ${function(t){return t=t.map((t=>t+("fill"===t||"stroke"===t?" color":""))),t.length<2?t[0]:t.slice(0,-1).join(", ")+" and "+S(t)}(o)}`+` with ${Gp(u,s,t)}`;var l}},"title-text":{desc:"title",caption:t=>`Title text '${t_(t)}'`},"title-subtitle":{desc:"subtitle",caption:t=>`Subtitle text '${t_(t)}'`}},Zv={ariaRole:Wv,ariaRoleDescription:Hv,description:Iv};function Qv(t,e){const n=!1===e.aria;if(t(jv,n||void 0),n||null==e.description)for(const e in Zv)t(Zv[e],void 0);else{const n=e.mark.marktype;t(Iv,e.description),t(Wv,e.ariaRole||("group"===n?Yv:Gv)),t(Hv,e.ariaRoleDescription||`${n} mark`)}}function Kv(t){return!1===t.aria?{[jv]:!0}:Xv[t.role]?null:Jv[t.role]?function(t,e){try{const n=t.items[0],r=e.caption||(()=>"");return Vv(e.role||Gv,e.desc,n.description||r(n))}catch(t){return null}}(t,Jv[t.role]):function(t){const e=t.marktype,n="group"===e||"text"===e||t.items.some((t=>null!=t.description&&!1!==t.aria));return Vv(n?Yv:Gv,`${e} mark container`,t.description)}(t)}function t_(t){return X(t.text).join(" ")}function e_(t){try{return X(S(t.items).items[0].text).join(" ")}catch(t){return null}}const n_=t=>(t+"").replace(/&/g,"&").replace(//g,">");function r_(){let t="",e="",n="";const r=[],i=()=>e=n="",o=(t,n)=>{var r;return null!=n&&(e+=` ${t}="${r=n,n_(r).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ")}"`),a},a={open(s){(o=>{e&&(t+=`${e}>${n}`,i()),r.push(o)})(s),e="<"+s;for(var u=arguments.length,l=new Array(u>1?u-1:0),c=1;c${n}`:"/>"):``,i(),a},attr:o,text:t=>(n+=n_(t),a),toString:()=>t};return a}const i_=t=>o_(r_(),t)+"";function o_(t,e){if(t.open(e.tagName),e.hasAttributes()){const n=e.attributes,r=n.length;for(let e=0;e{t.dirty=e}))),r.zdirty||(n.exit?(o.nested&&r.items.length?(u=r.items[0],u._svg&&this._update(o,u._svg,u)):n._svg&&(u=n._svg.parentNode,u&&u.removeChild(n._svg)),n._svg=null):(n=o.nested?r.items[0]:n,n._update!==e&&(n._svg&&n._svg.ownerSVGElement?this._update(o,n._svg,n):(this._dirtyAll=!1,h_(n,e)),n._update=e)));return!this._dirtyAll}mark(t,e,n,r){if(!this.isDirty(e))return e._svg;const i=this._svg,o=e.marktype,a=Yy[o],s=!1===e.interactive?"none":null,u="g"===a.tag,l=g_(e,t,n,"g",i);if("group"!==o&&null!=r&&!r.includes(o))return ov(l,0),e._svg;l.setAttribute("class",av(e));const c=Kv(e);for(const t in c)w_(l,t,c[t]);u||w_(l,"pointer-events",s),w_(l,"clip-path",e.clip?Vg(this,e,e.group):null);let f=null,h=0;const d=t=>{const e=this.isDirty(t),n=g_(t,l,f,a.tag,i);e&&(this._update(a,n,t),u&&function(t,e,n,r){e=e.lastChild.previousSibling;let i,o=0;qm(n,(n=>{i=t.mark(e,n,i,r),++o})),ov(e,1+o)}(this,n,t,r)),f=n,++h};return a.nested?e.items.length&&d(e.items[0]):qm(e,d),ov(l,h),l}_update(t,e,n){m_=e,y_=e.__values__,Qv(__,n),t.attr(__,n,this);const r=v_[t.type];r&&r.call(this,t,e,n),m_&&this.style(m_,n)}style(t,e){if(null!=e){for(const n in a_){let r="font"===n?Ry(e):e[n];if(r===y_[n])continue;const i=a_[n];null==r?t.removeAttribute(i):(Jp(r)&&(r=Zp(r,this._defs.gradient,k_())),t.setAttribute(i,r+"")),y_[n]=r}for(const n in s_)x_(t,s_[n],e[n])}}defs(){const t=this._svg,e=this._defs;let n=e.el,r=0;for(const i in e.gradient)n||(e.el=n=iv(t,1,"defs",c_)),r=d_(n,e.gradient[i],r);for(const i in e.clipping)n||(e.el=n=iv(t,1,"defs",c_)),r=p_(n,e.clipping[i],r);n&&(0===r?(t.removeChild(n),e.el=null):ov(n,r))}_clearDefs(){const t=this._defs;t.gradient={},t.clipping={}}}function h_(t,e){for(;t&&t.dirty!==e;t=t.mark.group){if(t.dirty=e,!t.mark||t.mark.dirty===e)return;t.mark.dirty=e}}function d_(t,e,n){let r,i,o;if("radial"===e.gradient){let r=iv(t,n++,"pattern",c_);b_(r,{id:Xp+e.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),r=iv(r,0,"rect",c_),b_(r,{width:1,height:1,fill:`url(${k_()}#${e.id})`}),b_(t=iv(t,n++,"radialGradient",c_),{id:e.id,fx:e.x1,fy:e.y1,fr:e.r1,cx:e.x2,cy:e.y2,r:e.r2})}else b_(t=iv(t,n++,"linearGradient",c_),{id:e.id,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2});for(r=0,i=e.stops.length;r1&&t.previousSibling!=e}(a,n))&&e.insertBefore(a,n?n.nextSibling:e.firstChild),a}let m_=null,y_=null;const v_={group(t,e,n){const r=m_=e.childNodes[2];y_=r.__values__,t.foreground(__,n,this),y_=e.__values__,m_=e.childNodes[1],t.content(__,n,this);const i=m_=e.childNodes[0];t.background(__,n,this);const o=!1===n.mark.interactive?"none":null;if(o!==y_.events&&(w_(r,"pointer-events",o),w_(i,"pointer-events",o),y_.events=o),n.strokeForeground&&n.stroke){const t=n.fill;w_(r,"display",null),this.style(i,n),w_(i,"stroke",null),t&&(n.fill=null),y_=r.__values__,this.style(r,n),t&&(n.fill=t),m_=null}else w_(r,"display","none")},image(t,e,n){!1===n.smooth?(x_(e,"image-rendering","optimizeSpeed"),x_(e,"image-rendering","pixelated")):x_(e,"image-rendering",null)},text(t,e,n){const r=Ny(n);let i,o,a,s;A(r)?(o=r.map((t=>Oy(n,t))),i=o.join("\n"),i!==y_.text&&(ov(e,0),a=e.ownerDocument,s=By(n),o.forEach(((t,r)=>{const i=nv(a,"tspan",c_);i.__data__=n,i.textContent=t,r&&(i.setAttribute("x",0),i.setAttribute("dy",s)),e.appendChild(i)})),y_.text=i)):(o=Oy(n,r),o!==y_.text&&(e.textContent=o,y_.text=o)),w_(e,"font-family",Ry(n)),w_(e,"font-size",Ty(n)+"px"),w_(e,"font-style",n.fontStyle),w_(e,"font-variant",n.fontVariant),w_(e,"font-weight",n.fontWeight)}};function __(t,e,n){e!==y_[t]&&(n?function(t,e,n,r){null!=n?t.setAttributeNS(r,e,n):t.removeAttributeNS(r,e)}(m_,t,e,n):w_(m_,t,e),y_[t]=e)}function x_(t,e,n){n!==y_[e]&&(null==n?t.style.removeProperty(e):t.style.setProperty(e,n+""),y_[e]=n)}function b_(t,e){for(const n in e)w_(t,n,e[n])}function w_(t,e,n){null!=n?t.setAttribute(e,n):t.removeAttribute(e)}function k_(){let t;return"undefined"==typeof window?"":(t=window.location).hash?t.href.slice(0,-t.hash.length):t.href}class A_ extends cv{constructor(t){super(t),this._text=null,this._defs={gradient:{},clipping:{}}}svg(){return this._text}_render(t){const e=r_();e.open("svg",at({},ly,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const n=this._bgcolor;return n&&"transparent"!==n&&"none"!==n&&e.open("rect",{width:this._width,height:this._height,fill:n}).close(),e.open("g",u_,{transform:"translate("+this._origin+")"}),this.mark(e,t),e.close(),this.defs(e),this._text=e.close()+"",this}mark(t,e){const n=Yy[e.marktype],r=n.tag,i=[Qv,n.attr];t.open("g",{class:av(e),"clip-path":e.clip?Vg(this,e,e.group):null},Kv(e),{"pointer-events":"g"!==r&&!1===e.interactive?"none":null});const o=o=>{const a=this.href(o);if(a&&t.open("a",a),t.open(r,this.attr(e,o,i,"g"!==r?r:null)),"text"===r){const e=Ny(o);if(A(e)){const n={x:0,dy:By(o)};for(let r=0;rthis.mark(t,e))),t.close(),r&&a?(i&&(o.fill=null),o.stroke=a,t.open("path",this.attr(e,o,n.foreground,"bgrect")).close(),i&&(o.fill=i)):t.open("path",this.attr(e,o,n.foreground,"bgfore")).close()}t.close(),a&&t.close()};return n.nested?e.items&&e.items.length&&o(e.items[0]):qm(e,o),t.close()}href(t){const e=t.href;let n;if(e){if(n=this._hrefs&&this._hrefs[e])return n;this.sanitizeURL(e).then((t=>{t["xlink:href"]=t.href,t.href=null,(this._hrefs||(this._hrefs={}))[e]=t}))}return null}attr(t,e,n,r){const i={},o=(t,e,n,r)=>{i[r||t]=e};return Array.isArray(n)?n.forEach((t=>t(o,e,this))):n(o,e,this),r&&function(t,e,n,r,i){let o;if(null==e)return t;"bgrect"===r&&!1===n.interactive&&(t["pointer-events"]="none");if("bgfore"===r&&(!1===n.interactive&&(t["pointer-events"]="none"),t.display="none",null!==e.fill))return t;"image"===r&&!1===e.smooth&&(o=["image-rendering: optimizeSpeed;","image-rendering: pixelated;"]);"text"===r&&(t["font-family"]=Ry(e),t["font-size"]=Ty(e)+"px",t["font-style"]=e.fontStyle,t["font-variant"]=e.fontVariant,t["font-weight"]=e.fontWeight);for(const n in a_){let r=e[n];const o=a_[n];("transparent"!==r||"fill"!==o&&"stroke"!==o)&&null!=r&&(Jp(r)&&(r=Zp(r,i.gradient,"")),t[o]=r)}for(const t in s_){const n=e[t];null!=n&&(o=o||[],o.push(`${s_[t]}: ${n};`))}o&&(t.style=o.join(" "))}(i,e,t,r,this._defs),i}defs(t){const e=this._defs.gradient,n=this._defs.clipping;if(0!==Object.keys(e).length+Object.keys(n).length){t.open("defs");for(const n in e){const r=e[n],i=r.stops;"radial"===r.gradient?(t.open("pattern",{id:Xp+n,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),t.open("rect",{width:"1",height:"1",fill:"url(#"+n+")"}).close(),t.close(),t.open("radialGradient",{id:n,fx:r.x1,fy:r.y1,fr:r.r1,cx:r.x2,cy:r.y2,r:r.r2})):t.open("linearGradient",{id:n,x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2});for(let e=0;e!M_.svgMarkTypes.includes(t)));this._svgRenderer.render(t,M_.svgMarkTypes),this._canvasRenderer.render(t,n)}resize(t,e,n,r){return super.resize(t,e,n,r),this._svgRenderer.resize(t,e,n,r),this._canvasRenderer.resize(t,e,n,r),this}background(t){return M_.svgOnTop?this._canvasRenderer.background(t):this._svgRenderer.background(t),this}}class D_ extends $v{constructor(t,e){super(t,e)}initialize(t,e,n){const r=iv(iv(t,0,"div"),M_.svgOnTop?0:1,"div");return super.initialize(r,e,n)}}const C_="canvas",F_="hybrid",S_="none",$_={Canvas:C_,PNG:"png",SVG:"svg",Hybrid:F_,None:S_},T_={};function B_(t,e){return t=String(t||"").toLowerCase(),arguments.length>1?(T_[t]=e,this):T_[t]}function N_(t,e,n){const r=[],i=(new Xg).union(e),o=t.marktype;return o?z_(t,i,n,r):"group"===o?O_(t,i,n,r):s("Intersect scene must be mark node or group item.")}function z_(t,e,n,r){if(function(t,e,n){return t.bounds&&e.intersects(t.bounds)&&("group"===t.marktype||!1!==t.interactive&&(!n||n(t)))}(t,e,n)){const i=t.items,o=t.marktype,a=i.length;let s=0;if("group"===o)for(;s=0;r--)if(i[r]!=o[r])return!1;for(r=i.length-1;r>=0;r--)if(!P_(t[n=i[r]],e[n],n))return!1;return typeof t==typeof e}(t,e):t==e)}function j_(t,e){return P_(sg(t),sg(e))}const I_="top",W_="left",H_="right",Y_="bottom",G_="top-left",V_="top-right",X_="bottom-left",J_="bottom-right",Z_="start",Q_="middle",K_="end",tx="x",ex="y",nx="group",rx="axis",ix="title",ox="frame",ax="scope",sx="legend",ux="row-header",lx="row-footer",cx="row-title",fx="column-header",hx="column-footer",dx="column-title",px="padding",gx="symbol",mx="fit",yx="fit-x",vx="fit-y",_x="pad",xx="none",bx="all",wx="each",kx="flush",Ax="column",Mx="row";function Ex(t){Ja.call(this,null,t)}function Dx(t,e,n){return e(t.bounds.clear(),t,n)}dt(Ex,Ja,{transform(t,e){const n=e.dataflow,r=t.mark,i=r.marktype,o=Yy[i],a=o.bound;let s,u=r.bounds;if(o.nested)r.items.length&&n.dirty(r.items[0]),u=Dx(r,a),r.items.forEach((t=>{t.bounds.clear().union(u)}));else if(i===nx||t.modified())switch(e.visit(e.MOD,(t=>n.dirty(t))),u.clear(),r.items.forEach((t=>u.union(Dx(t,a)))),r.role){case rx:case sx:case ix:e.reflow()}else s=e.changed(e.REM),e.visit(e.ADD,(t=>{u.union(Dx(t,a))})),e.visit(e.MOD,(t=>{s=s||u.alignsWith(t.bounds),n.dirty(t),u.union(Dx(t,a))})),s&&(u.clear(),r.items.forEach((t=>u.union(t.bounds))));return U_(r),e.modifies("bounds")}});const Cx=":vega_identifier:";function Fx(t){Ja.call(this,0,t)}function Sx(t){Ja.call(this,null,t)}function $x(t){Ja.call(this,null,t)}Fx.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},dt(Fx,Ja,{transform(t,e){const n=(i=e.dataflow)._signals[Cx]||(i._signals[Cx]=i.add(0)),r=t.as;var i;let o=n.value;return e.visit(e.ADD,(t=>t[r]=t[r]||++o)),n.set(this.value=o),e}}),dt(Sx,Ja,{transform(t,e){let n=this.value;n||(n=e.dataflow.scenegraph().mark(t.markdef,function(t){const e=t.groups,n=t.parent;return e&&1===e.size?e.get(Object.keys(e.object)[0]):e&&n?e.lookup(n):null}(t),t.index),n.group.context=t.context,t.context.group||(t.context.group=n.group),n.source=this.source,n.clip=t.clip,n.interactive=t.interactive,this.value=n);const r=n.marktype===nx?Zg:Jg;return e.visit(e.ADD,(t=>r.call(t,n))),(t.modified("clip")||t.modified("interactive"))&&(n.clip=t.clip,n.interactive=!!t.interactive,n.zdirty=!0,e.reflow()),n.items=e.source,e}});const Tx={parity:t=>t.filter(((t,e)=>e%2?t.opacity=0:1)),greedy:(t,e)=>{let n;return t.filter(((t,r)=>r&&Bx(n.bounds,t.bounds,e)?t.opacity=0:(n=t,1)))}},Bx=(t,e,n)=>n>Math.max(e.x1-t.x2,t.x1-e.x2,e.y1-t.y2,t.y1-e.y2),Nx=(t,e)=>{for(var n,r=1,i=t.length,o=t[0].bounds;r{const e=t.bounds;return e.width()>1&&e.height()>1},Ox=t=>(t.forEach((t=>t.opacity=1)),t),Rx=(t,e)=>t.reflow(e.modified()).modifies("opacity");function Lx(t){Ja.call(this,null,t)}dt($x,Ja,{transform(t,e){const n=Tx[t.method]||Tx.parity,r=t.separation||0;let i,o,a=e.materialize(e.SOURCE).source;if(!a||!a.length)return;if(!t.method)return t.modified("method")&&(Ox(a),e=Rx(e,t)),e;if(a=a.filter(zx),!a.length)return;if(t.sort&&(a=a.slice().sort(t.sort)),i=Ox(a),e=Rx(e,t),i.length>=3&&Nx(i,r)){do{i=n(i,r)}while(i.length>=3&&Nx(i,r));i.length<3&&!S(a).opacity&&(i.length>1&&(S(i).opacity=0),S(a).opacity=1)}t.boundScale&&t.boundTolerance>=0&&(o=((t,e,n)=>{var r=t.range(),i=new Xg;return e===I_||e===Y_?i.set(r[0],-1/0,r[1],1/0):i.set(-1/0,r[0],1/0,r[1]),i.expand(n||1),t=>i.encloses(t.bounds)})(t.boundScale,t.boundOrient,+t.boundTolerance),a.forEach((t=>{o(t)||(t.opacity=0)})));const s=i[0].mark.bounds.clear();return a.forEach((t=>{t.opacity&&s.union(t.bounds)})),e}}),dt(Lx,Ja,{transform(t,e){const n=e.dataflow;if(e.visit(e.ALL,(t=>n.dirty(t))),e.fields&&e.fields.zindex){const t=e.source&&e.source[0];t&&(t.mark.zdirty=!0)}}});const Ux=new Xg;function qx(t,e,n){return t[e]===n?0:(t[e]=n,1)}function Px(t){var e=t.items[0].orient;return e===W_||e===H_}function jx(t,e,n,r){var i,o,a=e.items[0],s=a.datum,u=null!=a.translate?a.translate:.5,l=a.orient,c=function(t){let e=+t.grid;return[t.ticks?e++:-1,t.labels?e++:-1,e+ +t.domain]}(s),f=a.range,h=a.offset,d=a.position,p=a.minExtent,g=a.maxExtent,m=s.title&&a.items[c[2]].items[0],y=a.titlePadding,v=a.bounds,_=m&&zy(m),x=0,b=0;switch(Ux.clear().union(v),v.clear(),(i=c[0])>-1&&v.union(a.items[i].bounds),(i=c[1])>-1&&v.union(a.items[i].bounds),l){case I_:x=d||0,b=-h,o=Math.max(p,Math.min(g,-v.y1)),v.add(0,-o).add(f,0),m&&Ix(t,m,o,y,_,0,-1,v);break;case W_:x=-h,b=d||0,o=Math.max(p,Math.min(g,-v.x1)),v.add(-o,0).add(0,f),m&&Ix(t,m,o,y,_,1,-1,v);break;case H_:x=n+h,b=d||0,o=Math.max(p,Math.min(g,v.x2)),v.add(0,0).add(o,f),m&&Ix(t,m,o,y,_,1,1,v);break;case Y_:x=d||0,b=r+h,o=Math.max(p,Math.min(g,v.y2)),v.add(0,0).add(f,o),m&&Ix(t,m,o,y,0,0,1,v);break;default:x=a.x,b=a.y}return em(v.translate(x,b),a),qx(a,"x",x+u)|qx(a,"y",b+u)&&(a.bounds=Ux,t.dirty(a),a.bounds=v,t.dirty(a)),a.mark.bounds.clear().union(v)}function Ix(t,e,n,r,i,o,a,s){const u=e.bounds;if(e.auto){const s=a*(n+i+r);let l=0,c=0;t.dirty(e),o?l=(e.x||0)-(e.x=s):c=(e.y||0)-(e.y=s),e.mark.bounds.clear().union(u.translate(-l,-c)),t.dirty(e)}s.union(u)}const Wx=(t,e)=>Math.floor(Math.min(t,e)),Hx=(t,e)=>Math.ceil(Math.max(t,e));function Yx(t){return(new Xg).set(0,0,t.width||0,t.height||0)}function Gx(t){const e=t.bounds.clone();return e.empty()?e.set(0,0,0,0):e.translate(-(t.x||0),-(t.y||0))}function Vx(t,e,n){const r=M(t)?t[e]:t;return null!=r?r:void 0!==n?n:0}function Xx(t){return t<0?Math.ceil(-t):0}function Jx(t,e,n){var r,i,o,a,s,u,l,c,f,h,d,p=!n.nodirty,g=n.bounds===kx?Yx:Gx,m=Ux.set(0,0,0,0),y=Vx(n.align,Ax),v=Vx(n.align,Mx),_=Vx(n.padding,Ax),x=Vx(n.padding,Mx),b=n.columns||e.length,w=b<=0?1:Math.ceil(e.length/b),k=e.length,A=Array(k),M=Array(b),E=0,D=Array(k),C=Array(w),F=0,S=Array(k),$=Array(k),T=Array(k);for(i=0;i1)for(i=0;i0&&(S[i]+=f/2);if(v&&Vx(n.center,Mx)&&1!==b)for(i=0;i0&&($[i]+=h/2);for(i=0;ii&&(t.warn("Grid headers exceed limit: "+i),e=e.slice(0,i)),A+=o,g=0,y=e.length;g=0&&null==(x=n[m]);m-=h);s?(b=null==d?x.x:Math.round(x.bounds.x1+d*x.bounds.width()),w=A):(b=A,w=null==d?x.y:Math.round(x.bounds.y1+d*x.bounds.height())),v.union(_.bounds.translate(b-(_.x||0),w-(_.y||0))),_.x=b,_.y=w,t.dirty(_),M=a(M,v[l])}return M}function eb(t,e,n,r,i,o){if(e){t.dirty(e);var a=n,s=n;r?a=Math.round(i.x1+o*i.width()):s=Math.round(i.y1+o*i.height()),e.bounds.translate(a-(e.x||0),s-(e.y||0)),e.mark.bounds.clear().union(e.bounds),e.x=a,e.y=s,t.dirty(e)}}function nb(t,e,n,r,i,o,a){const s=function(t,e){const n=t[e]||{};return(e,r)=>null!=n[e]?n[e]:null!=t[e]?t[e]:r}(n,e),u=function(t,e){let n=-1/0;return t.forEach((t=>{null!=t.offset&&(n=Math.max(n,t.offset))})),n>-1/0?n:e}(t,s("offset",0)),l=s("anchor",Z_),c=l===K_?1:l===Q_?.5:0,f={align:wx,bounds:s("bounds",kx),columns:"vertical"===s("direction")?1:t.length,padding:s("margin",8),center:s("center"),nodirty:!0};switch(e){case W_:f.anchor={x:Math.floor(r.x1)-u,column:K_,y:c*(a||r.height()+2*r.y1),row:l};break;case H_:f.anchor={x:Math.ceil(r.x2)+u,y:c*(a||r.height()+2*r.y1),row:l};break;case I_:f.anchor={y:Math.floor(i.y1)-u,row:K_,x:c*(o||i.width()+2*i.x1),column:l};break;case Y_:f.anchor={y:Math.ceil(i.y2)+u,x:c*(o||i.width()+2*i.x1),column:l};break;case G_:f.anchor={x:u,y:u};break;case V_:f.anchor={x:o-u,y:u,column:K_};break;case X_:f.anchor={x:u,y:a-u,row:K_};break;case J_:f.anchor={x:o-u,y:a-u,column:K_,row:K_}}return f}function rb(t,e){var n,r,i=e.items[0],o=i.datum,a=i.orient,s=i.bounds,u=i.x,l=i.y;return i._bounds?i._bounds.clear().union(s):i._bounds=s.clone(),s.clear(),function(t,e,n){var r=e.padding,i=r-n.x,o=r-n.y;if(e.datum.title){var a=e.items[1].items[0],s=a.anchor,u=e.titlePadding||0,l=r-a.x,c=r-a.y;switch(a.orient){case W_:i+=Math.ceil(a.bounds.width())+u;break;case H_:case Y_:break;default:o+=a.bounds.height()+u}switch((i||o)&&ob(t,n,i,o),a.orient){case W_:c+=ib(e,n,a,s,1,1);break;case H_:l+=ib(e,n,a,K_,0,0)+u,c+=ib(e,n,a,s,1,1);break;case Y_:l+=ib(e,n,a,s,0,0),c+=ib(e,n,a,K_,-1,0,1)+u;break;default:l+=ib(e,n,a,s,0,0)}(l||c)&&ob(t,a,l,c),(l=Math.round(a.bounds.x1-r))<0&&(ob(t,n,-l,0),ob(t,a,-l,0))}else(i||o)&&ob(t,n,i,o)}(t,i,i.items[0].items[0]),s=function(t,e){return t.items.forEach((t=>e.union(t.bounds))),e.x1=t.padding,e.y1=t.padding,e}(i,s),n=2*i.padding,r=2*i.padding,s.empty()||(n=Math.ceil(s.width()+n),r=Math.ceil(s.height()+r)),o.type===gx&&function(t){const e=t.reduce(((t,e)=>(t[e.column]=Math.max(e.bounds.x2-e.x,t[e.column]||0),t)),{});t.forEach((t=>{t.width=e[t.column],t.height=t.bounds.y2-t.y}))}(i.items[0].items[0].items[0].items),a!==xx&&(i.x=u=0,i.y=l=0),i.width=n,i.height=r,em(s.set(u,l,u+n,l+r),i),i.mark.bounds.clear().union(s),i}function ib(t,e,n,r,i,o,a){const s="symbol"!==t.datum.type,u=n.datum.vgrad,l=(!s||!o&&u||a?e:e.items[0]).bounds[i?"y2":"x2"]-t.padding,c=u&&o?l:0,f=u&&o?0:l,h=i<=0?0:zy(n);return Math.round(r===Z_?c:r===K_?f-h:.5*(l-h))}function ob(t,e,n,r){e.x+=n,e.y+=r,e.bounds.translate(n,r),e.mark.bounds.translate(n,r),t.dirty(e)}function ab(t){Ja.call(this,null,t)}dt(ab,Ja,{transform(t,e){const n=e.dataflow;return t.mark.items.forEach((e=>{t.layout&&Zx(n,e,t.layout),function(t,e,n){var r,i,o,a,s,u=e.items,l=Math.max(0,e.width||0),c=Math.max(0,e.height||0),f=(new Xg).set(0,0,l,c),h=f.clone(),d=f.clone(),p=[];for(a=0,s=u.length;a{(o=t.orient||H_)!==xx&&(e[o]||(e[o]=[])).push(t)}));for(const r in e){const i=e[r];Jx(t,i,nb(i,r,n.legends,h,d,l,c))}p.forEach((e=>{const r=e.bounds;if(r.equals(e._bounds)||(e.bounds=e._bounds,t.dirty(e),e.bounds=r,t.dirty(e)),!n.autosize||n.autosize.type!==mx&&n.autosize.type!==yx&&n.autosize.type!==vx)f.union(r);else switch(e.orient){case W_:case H_:f.add(r.x1,0).add(r.x2,0);break;case I_:case Y_:f.add(0,r.y1).add(0,r.y2)}}))}f.union(h).union(d),r&&f.union(function(t,e,n,r,i){var o,a=e.items[0],s=a.frame,u=a.orient,l=a.anchor,c=a.offset,f=a.padding,h=a.items[0].items[0],d=a.items[1]&&a.items[1].items[0],p=u===W_||u===H_?r:n,g=0,m=0,y=0,v=0,_=0;if(s!==nx?u===W_?(g=i.y2,p=i.y1):u===H_?(g=i.y1,p=i.y2):(g=i.x1,p=i.x2):u===W_&&(g=r,p=0),o=l===Z_?g:l===K_?p:(g+p)/2,d&&d.text){switch(u){case I_:case Y_:_=h.bounds.height()+f;break;case W_:v=h.bounds.width()+f;break;case H_:v=-h.bounds.width()-f}Ux.clear().union(d.bounds),Ux.translate(v-(d.x||0),_-(d.y||0)),qx(d,"x",v)|qx(d,"y",_)&&(t.dirty(d),d.bounds.clear().union(Ux),d.mark.bounds.clear().union(Ux),t.dirty(d)),Ux.clear().union(d.bounds)}else Ux.clear();switch(Ux.union(h.bounds),u){case I_:m=o,y=i.y1-Ux.height()-c;break;case W_:m=i.x1-Ux.width()-c,y=o;break;case H_:m=i.x2+Ux.width()+c,y=o;break;case Y_:m=o,y=i.y2+c;break;default:m=a.x,y=a.y}return qx(a,"x",m)|qx(a,"y",y)&&(Ux.translate(m,y),t.dirty(a),a.bounds.clear().union(Ux),e.bounds.clear().union(Ux),t.dirty(a)),a.bounds}(t,r,l,c,f));e.clip&&f.set(0,0,e.width||0,e.height||0);!function(t,e,n,r){const i=r.autosize||{},o=i.type;if(t._autosize<1||!o)return;let a=t._width,s=t._height,u=Math.max(0,e.width||0),l=Math.max(0,Math.ceil(-n.x1)),c=Math.max(0,e.height||0),f=Math.max(0,Math.ceil(-n.y1));const h=Math.max(0,Math.ceil(n.x2-u)),d=Math.max(0,Math.ceil(n.y2-c));if(i.contains===px){const e=t.padding();a-=e.left+e.right,s-=e.top+e.bottom}o===xx?(l=0,f=0,u=a,c=s):o===mx?(u=Math.max(0,a-l-h),c=Math.max(0,s-f-d)):o===yx?(u=Math.max(0,a-l-h),s=c+f+d):o===vx?(a=u+l+h,c=Math.max(0,s-f-d)):o===_x&&(a=u+l+h,s=c+f+d);t._resizeView(a,s,u,c,[l,f],i.resize)}(t,e,f,n)}(n,e,t)})),function(t){return t&&"legend-entry"!==t.mark.role}(t.mark.group)?e.reflow():e}});var sb=Object.freeze({__proto__:null,bound:Ex,identifier:Fx,mark:Sx,overlap:$x,render:Lx,viewlayout:ab});function ub(t){Ja.call(this,null,t)}function lb(t){Ja.call(this,null,t)}function cb(){return _a({})}function fb(t){Ja.call(this,null,t)}function hb(t){Ja.call(this,[],t)}dt(ub,Ja,{transform(t,e){if(this.value&&!t.modified())return e.StopPropagation;var n=e.dataflow.locale(),r=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=this.value,o=t.scale,a=$p(o,null==t.count?t.values?t.values.length:10:t.count,t.minstep),s=t.format||Np(n,o,a,t.formatSpecifier,t.formatType,!!t.values),u=t.values?Tp(o,t.values,a):Bp(o,a);return i&&(r.rem=i),i=u.map(((t,e)=>_a({index:e/(u.length-1||1),value:t,label:s(t)}))),t.extra&&i.length&&i.push(_a({index:-1,extra:{value:i[0].value},label:""})),r.source=i,r.add=i,this.value=i,r}}),dt(lb,Ja,{transform(t,e){var n=e.dataflow,r=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=t.item||cb,o=t.key||ya,a=this.value;return A(r.encode)&&(r.encode=null),a&&(t.modified("key")||e.modified(o))&&s("DataJoin does not support modified key function or fields."),a||(e=e.addAll(),this.value=a=function(t){const e=ft().test((t=>t.exit));return e.lookup=n=>e.get(t(n)),e}(o)),e.visit(e.ADD,(t=>{const e=o(t);let n=a.get(e);n?n.exit?(a.empty--,r.add.push(n)):r.mod.push(n):(n=i(t),a.set(e,n),r.add.push(n)),n.datum=t,n.exit=!1})),e.visit(e.MOD,(t=>{const e=o(t),n=a.get(e);n&&(n.datum=t,r.mod.push(n))})),e.visit(e.REM,(t=>{const e=o(t),n=a.get(e);t!==n.datum||n.exit||(r.rem.push(n),n.exit=!0,++a.empty)})),e.changed(e.ADD_MOD)&&r.modifies("datum"),(e.clean()||t.clean&&a.empty>n.cleanThreshold)&&n.runAfter(a.clean),r}}),dt(fb,Ja,{transform(t,e){var n=e.fork(e.ADD_REM),r=t.mod||!1,i=t.encoders,o=e.encode;if(A(o)){if(!n.changed()&&!o.every((t=>i[t])))return e.StopPropagation;o=o[0],n.encode=null}var a="enter"===o,s=i.update||g,u=i.enter||g,l=i.exit||g,c=(o&&!a?i[o]:s)||g;if(e.changed(e.ADD)&&(e.visit(e.ADD,(e=>{u(e,t),s(e,t)})),n.modifies(u.output),n.modifies(s.output),c!==g&&c!==s&&(e.visit(e.ADD,(e=>{c(e,t)})),n.modifies(c.output))),e.changed(e.REM)&&l!==g&&(e.visit(e.REM,(e=>{l(e,t)})),n.modifies(l.output)),a||c!==g){const i=e.MOD|(t.modified()?e.REFLOW:0);a?(e.visit(i,(e=>{const i=u(e,t)||r;(c(e,t)||i)&&n.mod.push(e)})),n.mod.length&&n.modifies(u.output)):e.visit(i,(e=>{(c(e,t)||r)&&n.mod.push(e)})),n.mod.length&&n.modifies(c.output)}return n.changed()?n:e.StopPropagation}}),dt(hb,Ja,{transform(t,e){if(null!=this.value&&!t.modified())return e.StopPropagation;var n,r,i,o,a,s=e.dataflow.locale(),u=e.fork(e.NO_SOURCE|e.NO_FIELDS),l=this.value,c=t.type||Ep,f=t.scale,h=+t.limit,d=$p(f,null==t.count?5:t.count,t.minstep),p=!!t.values||c===Ep,g=t.format||qp(s,f,d,c,t.formatSpecifier,t.formatType,p),m=t.values||Lp(f,d);return l&&(u.rem=l),c===Ep?(h&&m.length>h?(e.dataflow.warn("Symbol legend count exceeds limit, filtering items."),l=m.slice(0,h-1),a=!0):l=m,Z(i=t.size)?(t.values||0!==f(l[0])||(l=l.slice(1)),o=l.reduce(((e,n)=>Math.max(e,i(n,t))),0)):i=it(o=i||8),l=l.map(((e,n)=>_a({index:n,label:g(e,n,l),value:e,offset:o,size:i(e,t)}))),a&&(a=m[l.length],l.push(_a({index:l.length,label:`…${m.length-l.length} entries`,value:a,offset:o,size:i(a,t)})))):"gradient"===c?(n=f.domain(),r=xp(f,n[0],S(n)),m.length<3&&!t.values&&n[0]!==S(n)&&(m=[n[0],S(n)]),l=m.map(((t,e)=>_a({index:e,label:g(t,e,m),value:t,perc:r(t)})))):(i=m.length-1,r=function(t){const e=t.domain(),n=e.length-1;let r=+e[0],i=+S(e),o=i-r;if(t.type===Id){const t=n?o/n:.1;r-=t,i+=t,o=i-r}return t=>(t-r)/o}(f),l=m.map(((t,e)=>_a({index:e,label:g(t,e,m),value:t,perc:e?r(t):0,perc2:e===i?1:r(m[e+1])})))),u.source=l,u.add=l,this.value=l,u}});const db=t=>t.source.x,pb=t=>t.source.y,gb=t=>t.target.x,mb=t=>t.target.y;function yb(t){Ja.call(this,{},t)}yb.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},dt(yb,Ja,{transform(t,e){var n=t.sourceX||db,r=t.sourceY||pb,i=t.targetX||gb,o=t.targetY||mb,a=t.as||"path",u=t.orient||"vertical",l=t.shape||"line",c=bb.get(l+"-"+u)||bb.get(l);return c||s("LinkPath unsupported type: "+t.shape+(t.orient?"-"+t.orient:"")),e.visit(e.SOURCE,(t=>{t[a]=c(n(t),r(t),i(t),o(t))})),e.reflow(t.modified()).modifies(a)}});const vb=(t,e,n,r)=>"M"+t+","+e+"L"+n+","+r,_b=(t,e,n,r)=>{var i=n-t,o=r-e,a=Math.hypot(i,o)/2;return"M"+t+","+e+"A"+a+","+a+" "+180*Math.atan2(o,i)/Math.PI+" 0 1 "+n+","+r},xb=(t,e,n,r)=>{const i=n-t,o=r-e,a=.2*(i+o),s=.2*(o-i);return"M"+t+","+e+"C"+(t+a)+","+(e+s)+" "+(n+s)+","+(r-a)+" "+n+","+r},bb=ft({line:vb,"line-radial":(t,e,n,r)=>vb(e*Math.cos(t),e*Math.sin(t),r*Math.cos(n),r*Math.sin(n)),arc:_b,"arc-radial":(t,e,n,r)=>_b(e*Math.cos(t),e*Math.sin(t),r*Math.cos(n),r*Math.sin(n)),curve:xb,"curve-radial":(t,e,n,r)=>xb(e*Math.cos(t),e*Math.sin(t),r*Math.cos(n),r*Math.sin(n)),"orthogonal-horizontal":(t,e,n,r)=>"M"+t+","+e+"V"+r+"H"+n,"orthogonal-vertical":(t,e,n,r)=>"M"+t+","+e+"H"+n+"V"+r,"orthogonal-radial":(t,e,n,r)=>{const i=Math.cos(t),o=Math.sin(t),a=Math.cos(n),s=Math.sin(n);return"M"+e*i+","+e*o+"A"+e+","+e+" 0 0,"+((Math.abs(n-t)>Math.PI?n<=t:n>t)?1:0)+" "+e*a+","+e*s+"L"+r*a+","+r*s},"diagonal-horizontal":(t,e,n,r)=>{const i=(t+n)/2;return"M"+t+","+e+"C"+i+","+e+" "+i+","+r+" "+n+","+r},"diagonal-vertical":(t,e,n,r)=>{const i=(e+r)/2;return"M"+t+","+e+"C"+t+","+i+" "+n+","+i+" "+n+","+r},"diagonal-radial":(t,e,n,r)=>{const i=Math.cos(t),o=Math.sin(t),a=Math.cos(n),s=Math.sin(n),u=(e+r)/2;return"M"+e*i+","+e*o+"C"+u*i+","+u*o+" "+u*a+","+u*s+" "+r*a+","+r*s}});function wb(t){Ja.call(this,null,t)}wb.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},dt(wb,Ja,{transform(t,e){var n,r,i,o=t.as||["startAngle","endAngle"],a=o[0],s=o[1],u=t.field||d,l=t.startAngle||0,c=null!=t.endAngle?t.endAngle:2*Math.PI,f=e.source,h=f.map(u),p=h.length,g=l,m=(c-l)/$e(h),y=Se(p);for(t.sort&&y.sort(((t,e)=>h[t]-h[e])),n=0;nt+(e<0?-1:e>0?1:0)),0))!==e.length&&n.warn("Log scale domain includes zero: "+Ct(e)));return e}function Cb(t,e,n){return Z(t)&&(e||n)?yp(t,Fb(e||[0,1],n)):t}function Fb(t,e){return e?t.slice().reverse():t}function Sb(t){Ja.call(this,null,t)}dt(Eb,Ja,{transform(t,e){var n=e.dataflow,r=this.value,i=function(t){var e,n=t.type,r="";if(n===Ud)return Ud+"-"+Td;(function(t){const e=t.type;return cp(e)&&e!==Rd&&e!==Ld&&(t.scheme||t.range&&t.range.length&&t.range.every(xt))})(t)&&(r=2===(e=t.rawDomain?t.rawDomain.length:t.domain?t.domain.length+ +(null!=t.domainMid):0)?Ud+"-":3===e?qd+"-":"");return(r+n||Td).toLowerCase()}(t);for(i in r&&i===r.type||(this.value=r=sp(i)()),t)if(!Mb[i]){if("padding"===i&&Ab(r.type))continue;Z(r[i])?r[i](t[i]):n.warn("Unsupported scale property: "+i)}return function(t,e,n){var r=t.type,i=e.round||!1,o=e.range;if(null!=e.rangeStep)o=function(t,e,n){t!==Yd&&t!==Hd&&s("Only band and point scales support rangeStep.");var r=(null!=e.paddingOuter?e.paddingOuter:e.padding)||0,i=t===Hd?1:(null!=e.paddingInner?e.paddingInner:e.padding)||0;return[0,e.rangeStep*$d(n,i,r)]}(r,e,n);else if(e.scheme&&(o=function(t,e,n){var r,i=e.schemeExtent;A(e.scheme)?r=vp(e.scheme,e.interpolate,e.interpolateGamma):(r=Mp(e.scheme.toLowerCase()))||s(`Unrecognized scheme name: ${e.scheme}`);return n=t===Id?n+1:t===Gd?n-1:t===Pd||t===jd?+e.schemeCount||kb:n,pp(t)?Cb(r,i,e.reverse):Z(r)?_p(Cb(r,i),n):t===Wd?r:r.slice(0,n)}(r,e,n),Z(o))){if(t.interpolator)return t.interpolator(o);s(`Scale type ${r} does not support interpolating color schemes.`)}if(o&&pp(r))return t.interpolator(vp(Fb(o,e.reverse),e.interpolate,e.interpolateGamma));o&&e.interpolate&&t.interpolate?t.interpolate(bp(e.interpolate,e.interpolateGamma)):Z(t.round)?t.round(i):Z(t.rangeRound)&&t.interpolate(i?yh:mh);o&&t.range(Fb(o,e.reverse))}(r,t,function(t,e,n){let r=e.bins;if(r&&!A(r)){const e=t.domain(),n=e[0],i=S(e),o=r.step;let a=null==r.start?n:r.start,u=null==r.stop?i:r.stop;o||s("Scale bins parameter missing step property."),ai&&(u=o*Math.floor(i/o)),r=Se(a,u+o/2,o)}r?t.bins=r:t.bins&&delete t.bins;t.type===Gd&&(r?e.domain||e.domainRaw||(t.domain(r),n=r.length):t.bins=t.domain());return n}(r,t,function(t,e,n){const r=function(t,e,n){return e?(t.domain(Db(t.type,e,n)),e.length):-1}(t,e.domainRaw,n);if(r>-1)return r;var i,o,a=e.domain,s=t.type,u=e.zero||void 0===e.zero&&function(t){const e=t.type;return!t.bins&&(e===Td||e===Nd||e===zd)}(t);if(!a)return 0;if((u||null!=e.domainMin||null!=e.domainMax||null!=e.domainMid)&&(i=(a=a.slice()).length-1||1,u&&(a[0]>0&&(a[0]=0),a[i]<0&&(a[i]=0)),null!=e.domainMin&&(a[0]=e.domainMin),null!=e.domainMax&&(a[i]=e.domainMax),null!=e.domainMid)){const t=(o=e.domainMid)>a[i]?i+1:ot(u);if(null==e)d.push(t.slice());else for(i={},o=0,a=t.length;oh&&(h=f),n&&c.sort(n)}return d.max=h,d}(e.source,t.groupby,l,c),r=0,i=n.length,o=n.max;r0?1:t<0?-1:0},ow=Math.sqrt,aw=Math.tan;function sw(t){return t>1?0:t<-1?jb:Math.acos(t)}function uw(t){return t>1?Ib:t<-1?-Ib:Math.asin(t)}function lw(){}function cw(t,e){t&&hw.hasOwnProperty(t.type)&&hw[t.type](t,e)}var fw={Feature:function(t,e){cw(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=Zb(e=(e*=Gb)/2+Wb),a=rw(e),s=xw*a,u=_w*o+s*Zb(i),l=s*r*rw(i);Tw.add(Jb(l,u)),vw=t,_w=o,xw=a}function Uw(t){return[Jb(t[1],t[0]),uw(t[2])]}function qw(t){var e=t[0],n=t[1],r=Zb(n);return[r*Zb(e),r*rw(e),rw(n)]}function Pw(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jw(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Iw(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ww(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Hw(t){var e=ow(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Yw,Gw,Vw,Xw,Jw,Zw,Qw,Kw,tk,ek,nk,rk,ik,ok,ak,sk,uk={point:lk,lineStart:fk,lineEnd:hk,polygonStart:function(){uk.point=dk,uk.lineStart=pk,uk.lineEnd=gk,Fw=new se,Nw.polygonStart()},polygonEnd:function(){Nw.polygonEnd(),uk.point=lk,uk.lineStart=fk,uk.lineEnd=hk,Tw<0?(bw=-(kw=180),ww=-(Aw=90)):Fw>qb?Aw=90:Fw<-1e-6&&(ww=-90),$w[0]=bw,$w[1]=kw},sphere:function(){bw=-(kw=180),ww=-(Aw=90)}};function lk(t,e){Sw.push($w=[bw=t,kw=t]),eAw&&(Aw=e)}function ck(t,e){var n=qw([t*Gb,e*Gb]);if(Cw){var r=jw(Cw,n),i=jw([r[1],-r[0],0],r);Hw(i),i=Uw(i);var o,a=t-Mw,s=a>0?1:-1,u=i[0]*Yb*s,l=Vb(a)>180;l^(s*MwAw&&(Aw=o):l^(s*Mw<(u=(u+360)%360-180)&&uAw&&(Aw=e)),l?tmk(bw,kw)&&(kw=t):mk(t,kw)>mk(bw,kw)&&(bw=t):kw>=bw?(tkw&&(kw=t)):t>Mw?mk(bw,t)>mk(bw,kw)&&(kw=t):mk(t,kw)>mk(bw,kw)&&(bw=t)}else Sw.push($w=[bw=t,kw=t]);eAw&&(Aw=e),Cw=n,Mw=t}function fk(){uk.point=ck}function hk(){$w[0]=bw,$w[1]=kw,uk.point=lk,Cw=null}function dk(t,e){if(Cw){var n=t-Mw;Fw.add(Vb(n)>180?n+(n>0?360:-360):n)}else Ew=t,Dw=e;Nw.point(t,e),ck(t,e)}function pk(){Nw.lineStart()}function gk(){dk(Ew,Dw),Nw.lineEnd(),Vb(Fw)>qb&&(bw=-(kw=180)),$w[0]=bw,$w[1]=kw,Cw=null}function mk(t,e){return(e-=t)<0?e+360:e}function yk(t,e){return t[0]-e[0]}function vk(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:ejb&&(t-=Math.round(t/Hb)*Hb),[t,e]}function Tk(t,e,n){return(t%=Hb)?e||n?Sk(Nk(t),zk(e,n)):Nk(t):e||n?zk(e,n):$k}function Bk(t){return function(e,n){return Vb(e+=t)>jb&&(e-=Math.round(e/Hb)*Hb),[e,n]}}function Nk(t){var e=Bk(t);return e.invert=Bk(-t),e}function zk(t,e){var n=Zb(t),r=rw(t),i=Zb(e),o=rw(e);function a(t,e){var a=Zb(e),s=Zb(t)*a,u=rw(t)*a,l=rw(e),c=l*n+s*r;return[Jb(u*i-c*o,s*n-l*r),uw(c*i+u*o)]}return a.invert=function(t,e){var a=Zb(e),s=Zb(t)*a,u=rw(t)*a,l=rw(e),c=l*i-u*o;return[Jb(u*i+l*o,s*n+c*r),uw(c*n-s*r)]},a}function Ok(t,e){(e=qw(e))[0]-=t,Hw(e);var n=sw(-e[1]);return((-e[2]<0?-n:n)+Hb-qb)%Hb}function Rk(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:lw,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Lk(t,e){return Vb(t[0]-e[0])=0;--o)i.point((c=l[o])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function Pk(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,E=M*A,D=E>jb,C=m*w;if(u.add(Jb(C*M*rw(E),y*k+C*Zb(E))),a+=D?A+M*Hb:A,D^p>=n^x>=n){var F=jw(qw(d),qw(_));Hw(F);var S=jw(o,F);Hw(S);var $=(D^A>=0?-1:1)*uw(S[2]);(r>$||r===$&&(F[0]||F[1]))&&(s+=D^A>=0?1:-1)}}return(a<-1e-6||a0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t1&&2&u&&h.push(h.pop().concat(h.shift())),a.push(h.filter(Wk))}return h}}function Wk(t){return t.length>1}function Hk(t,e){return((t=t.x)[0]<0?t[1]-Ib-qb:Ib-t[1])-((e=e.x)[0]<0?e[1]-Ib-qb:Ib-e[1])}$k.invert=$k;var Yk=Ik((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?jb:-jb,u=Vb(o-n);Vb(u-jb)0?Ib:-Ib),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&u>=jb&&(Vb(n-i)qb?Xb((rw(e)*(o=Zb(r))*rw(n)-rw(r)*(i=Zb(e))*rw(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Ib,r.point(-jb,i),r.point(0,i),r.point(jb,i),r.point(jb,0),r.point(jb,-i),r.point(0,-i),r.point(-jb,-i),r.point(-jb,0),r.point(-jb,i);else if(Vb(t[0]-e[0])>qb){var o=t[0]0,i=Vb(e)>qb;function o(t,n){return Zb(t)*Zb(n)>e}function a(t,n,r){var i=[1,0,0],o=jw(qw(t),qw(n)),a=Pw(o,o),s=o[0],u=a-s*s;if(!u)return!r&&t;var l=e*a/u,c=-e*s/u,f=jw(i,o),h=Ww(i,l);Iw(h,Ww(o,c));var d=f,p=Pw(h,d),g=Pw(d,d),m=p*p-g*(Pw(h,h)-1);if(!(m<0)){var y=ow(m),v=Ww(d,(-p-y)/g);if(Iw(v,h),v=Uw(v),!r)return v;var _,x=t[0],b=n[0],w=t[1],k=n[1];b0^v[1]<(Vb(v[0]-x)jb^(x<=v[0]&&v[0]<=b)){var E=Ww(d,(-p+y)/g);return Iw(E,h),[v,Uw(E)]}}}function s(e,n){var i=r?t:jb-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Ik(o,(function(t){var e,n,u,l,c;return{lineStart:function(){l=u=!1,c=1},point:function(f,h){var d,p=[f,h],g=o(f,h),m=r?g?0:s(f,h):g?s(f+(f<0?jb:-jb),h):0;if(!e&&(l=u=g)&&t.lineStart(),g!==u&&(!(d=a(e,p))||Lk(e,d)||Lk(p,d))&&(p[2]=1),g!==u)c=0,g?(t.lineStart(),d=a(p,e),t.point(d[0],d[1])):(d=a(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var y;m&n||!(y=a(p,e,!0))||(c=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&Lk(e,p)||t.point(p[0],p[1]),e=p,u=g,n=m},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return c|(l&&u)<<1}}}),(function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var a=Zb(e),s=rw(e),u=r*n;null==i?(i=e+r*Hb,o=e-u/2):(i=Ok(a,i),o=Ok(a,o),(r>0?io)&&(i+=r*Hb));for(var l,c=i;r>0?c>o:c0)do{l.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+s+4)%4)!==f);else l.point(o[0],o[1])}function a(r,i){return Vb(r[0]-t)0?0:3:Vb(r[0]-n)0?2:1:Vb(r[1]-e)0?1:0:i>0?3:2}function s(t,e){return u(t.x,e.x)}function u(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var u,l,c,f,h,d,p,g,m,y,v,_=a,x=Rk(),b={point:w,lineStart:function(){b.point=k,l&&l.push(c=[]);y=!0,m=!1,p=g=NaN},lineEnd:function(){u&&(k(f,h),d&&m&&x.rejoin(),u.push(x.result()));b.point=w,m&&_.lineEnd()},polygonStart:function(){_=x,u=[],l=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=l.length;nr&&(h-o)*(r-a)>(d-a)*(t-o)&&++e:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--e;return e}(),n=v&&e,i=(u=Fe(u)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&qk(u,s,e,o,a),a.polygonEnd());_=a,u=l=c=null}};function w(t,e){i(t,e)&&_.point(t,e)}function k(o,a){var s=i(o,a);if(l&&c.push([o,a]),y)f=o,h=a,d=s,y=!1,s&&(_.lineStart(),_.point(o,a));else if(s&&m)_.point(o,a);else{var u=[p=Math.max(Xk,Math.min(Vk,p)),g=Math.max(Xk,Math.min(Vk,g))],x=[o=Math.max(Xk,Math.min(Vk,o)),a=Math.max(Xk,Math.min(Vk,a))];!function(t,e,n,r,i,o){var a,s=t[0],u=t[1],l=0,c=1,f=e[0]-s,h=e[1]-u;if(a=n-s,f||!(a>0)){if(a/=f,f<0){if(a0){if(a>c)return;a>l&&(l=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>l&&(l=a)}else if(f>0){if(a0)){if(a/=h,h<0){if(a0){if(a>c)return;a>l&&(l=a)}if(a=o-u,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>l&&(l=a)}else if(h>0){if(a0&&(t[0]=s+l*f,t[1]=u+l*h),c<1&&(e[0]=s+c*f,e[1]=u+c*h),!0}}}}}(u,x,t,e,n,r)?s&&(_.lineStart(),_.point(o,a),v=!1):(m||(_.lineStart(),_.point(u[0],u[1])),_.point(x[0],x[1]),s||_.lineEnd(),v=!1)}p=o,g=a,m=s}return b}}function Zk(t,e,n){var r=Se(t,e-qb,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Qk(t,e,n){var r=Se(t,e-qb,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}var Kk,tA,eA,nA,rA=t=>t,iA=new se,oA=new se,aA={point:lw,lineStart:lw,lineEnd:lw,polygonStart:function(){aA.lineStart=sA,aA.lineEnd=cA},polygonEnd:function(){aA.lineStart=aA.lineEnd=aA.point=lw,iA.add(Vb(oA)),oA=new se},result:function(){var t=iA/2;return iA=new se,t}};function sA(){aA.point=uA}function uA(t,e){aA.point=lA,Kk=eA=t,tA=nA=e}function lA(t,e){oA.add(nA*t-eA*e),eA=t,nA=e}function cA(){lA(Kk,tA)}var fA=1/0,hA=fA,dA=-fA,pA=dA,gA={point:function(t,e){tdA&&(dA=t);epA&&(pA=e)},lineStart:lw,lineEnd:lw,polygonStart:lw,polygonEnd:lw,result:function(){var t=[[fA,hA],[dA,pA]];return dA=pA=-(hA=fA=1/0),t}};var mA,yA,vA,_A,xA=0,bA=0,wA=0,kA=0,AA=0,MA=0,EA=0,DA=0,CA=0,FA={point:SA,lineStart:$A,lineEnd:NA,polygonStart:function(){FA.lineStart=zA,FA.lineEnd=OA},polygonEnd:function(){FA.point=SA,FA.lineStart=$A,FA.lineEnd=NA},result:function(){var t=CA?[EA/CA,DA/CA]:MA?[kA/MA,AA/MA]:wA?[xA/wA,bA/wA]:[NaN,NaN];return xA=bA=wA=kA=AA=MA=EA=DA=CA=0,t}};function SA(t,e){xA+=t,bA+=e,++wA}function $A(){FA.point=TA}function TA(t,e){FA.point=BA,SA(vA=t,_A=e)}function BA(t,e){var n=t-vA,r=e-_A,i=ow(n*n+r*r);kA+=i*(vA+t)/2,AA+=i*(_A+e)/2,MA+=i,SA(vA=t,_A=e)}function NA(){FA.point=SA}function zA(){FA.point=RA}function OA(){LA(mA,yA)}function RA(t,e){FA.point=LA,SA(mA=vA=t,yA=_A=e)}function LA(t,e){var n=t-vA,r=e-_A,i=ow(n*n+r*r);kA+=i*(vA+t)/2,AA+=i*(_A+e)/2,MA+=i,EA+=(i=_A*t-vA*e)*(vA+t),DA+=i*(_A+e),CA+=3*i,SA(vA=t,_A=e)}function UA(t){this._context=t}UA.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Hb)}},result:lw};var qA,PA,jA,IA,WA,HA=new se,YA={point:lw,lineStart:function(){YA.point=GA},lineEnd:function(){qA&&VA(PA,jA),YA.point=lw},polygonStart:function(){qA=!0},polygonEnd:function(){qA=null},result:function(){var t=+HA;return HA=new se,t}};function GA(t,e){YA.point=VA,PA=IA=t,jA=WA=e}function VA(t,e){IA-=t,WA-=e,HA.add(ow(IA*IA+WA*WA)),IA=t,WA=e}let XA,JA,ZA,QA;class KA{constructor(t){this._append=null==t?tM:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return tM;if(e!==XA){const t=10**e;XA=e,JA=function(e){let n=1;this._+=e[0];for(const r=e.length;n=0))throw new RangeError(`invalid digits: ${t}`);i=e}return null===e&&(r=new KA(i)),a},a.projection(t).digits(i).context(e)}function nM(t){return function(e){var n=new rM;for(var r in t)n[r]=t[r];return n.stream=e,n}}function rM(){}function iM(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),gw(n,t.stream(gA)),e(gA.result()),null!=r&&t.clipExtent(r),t}function oM(t,e,n){return iM(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,s])}),n)}function aM(t,e,n){return oM(t,[[0,0],e],n)}function sM(t,e,n){return iM(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function uM(t,e,n){return iM(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}rM.prototype={constructor:rM,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var lM=16,cM=Zb(30*Gb);function fM(t,e){return+e?function(t,e){function n(r,i,o,a,s,u,l,c,f,h,d,p,g,m){var y=l-r,v=c-i,_=y*y+v*v;if(_>4*e&&g--){var x=a+h,b=s+d,w=u+p,k=ow(x*x+b*b+w*w),A=uw(w/=k),M=Vb(Vb(w)-1)e||Vb((y*F+v*S)/_-.5)>.3||a*h+s*d+u*p2?t[2]%360*Gb:0,F()):[m*Yb,y*Yb,v*Yb]},D.angle=function(t){return arguments.length?(_=t%360*Gb,F()):_*Yb},D.reflectX=function(t){return arguments.length?(x=t?-1:1,F()):x<0},D.reflectY=function(t){return arguments.length?(b=t?-1:1,F()):b<0},D.precision=function(t){return arguments.length?(a=fM(s,E=t*t),S()):ow(E)},D.fitExtent=function(t,e){return oM(D,t,e)},D.fitSize=function(t,e){return aM(D,t,e)},D.fitWidth=function(t,e){return sM(D,t,e)},D.fitHeight=function(t,e){return uM(D,t,e)},function(){return e=t.apply(this,arguments),D.invert=e.invert&&C,F()}}function mM(t){var e=0,n=jb/3,r=gM(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Gb,n=t[1]*Gb):[e*Yb,n*Yb]},i}function yM(t,e){var n=rw(t),r=(n+rw(e))/2;if(Vb(r)2?t[2]*Gb:0),e.invert=function(e){return(e=t.invert(e[0]*Gb,e[1]*Gb))[0]*=Yb,e[1]*=Yb,e},e}(i.rotate()).invert([0,0]));return u(null==l?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===AM?[[Math.max(s[0]-o,l),e],[Math.min(s[0]+o,n),r]]:[[l,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),c()):a()},i.translate=function(t){return arguments.length?(s(t),c()):s()},i.center=function(t){return arguments.length?(o(t),c()):o()},i.clipExtent=function(t){return arguments.length?(null==t?l=e=n=r=null:(l=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),c()):null==l?null:[[l,e],[n,r]]},c()}function EM(t){return aw((Ib+t)/2)}function DM(t,e){var n=Zb(t),r=t===e?rw(t):ew(n/Zb(e))/ew(EM(e)/EM(t)),i=n*nw(EM(t),r)/r;if(!r)return AM;function o(t,e){i>0?e<-Ib+qb&&(e=-Ib+qb):e>Ib-qb&&(e=Ib-qb);var n=i/nw(EM(e),r);return[n*rw(r*t),i-n*Zb(r*t)]}return o.invert=function(t,e){var n=i-e,o=iw(r)*ow(t*t+n*n),a=Jb(t,Vb(n))*iw(n);return n*r<0&&(a-=jb*iw(t)*iw(n)),[a/r,2*Xb(nw(i/o,1/r))-Ib]},o}function CM(t,e){return[t,e]}function FM(t,e){var n=Zb(t),r=t===e?rw(t):(n-Zb(e))/(e-t),i=n/r+t;if(Vb(r)qb&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},LM.invert=bM(uw),UM.invert=bM((function(t){return 2*Xb(t)})),qM.invert=function(t,e){return[-e,2*Xb(Kb(t))-Ib]};var PM=Math.abs,jM=Math.cos,IM=Math.sin,WM=1e-6,HM=Math.PI,YM=HM/2,GM=function(t){return t>0?Math.sqrt(t):0}(2);function VM(t){return t>1?YM:t<-1?-YM:Math.asin(t)}function XM(t,e){var n,r=t*IM(e),i=30;do{e-=n=(e+IM(e)-r)/(1+jM(e))}while(PM(n)>WM&&--i>0);return e/2}var JM=function(t,e,n){function r(r,i){return[t*r*jM(i=XM(n,i)),e*IM(i)]}return r.invert=function(r,i){return i=VM(i/e),[r/(t*jM(i)),VM((2*i+IM(2*i))/n)]},r}(GM/YM,GM,HM);const ZM=eM(),QM=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function KM(t,e){if(!t||"string"!=typeof t)throw new Error("Projection type must be a name string.");return t=t.toLowerCase(),arguments.length>1?(eE[t]=function(t,e){return function n(){const r=e();return r.type=t,r.path=eM().projection(r),r.copy=r.copy||function(){const t=n();return QM.forEach((e=>{r[e]&&t[e](r[e]())})),t.path.pointRadius(r.path.pointRadius()),t},op(r)}}(t,e),this):eE[t]||null}function tE(t){return t&&t.path||ZM}const eE={albers:_M,albersusa:function(){var t,e,n,r,i,o,a=_M(),s=vM().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=vM().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,e){o=[t,e]}};function c(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,c}return c.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:a).invert(t)},c.stream=function(n){return t&&e===n?t:(r=[a.stream(e=n),s.stream(n),u.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}};for(const t in eE)KM(t,eE[t]);function nE(){}const rE=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function iE(){var t=1,e=1,n=a;function r(t,e){return e.map((e=>i(t,e)))}function i(r,i){var a=[],s=[];return function(n,r,i){var a,s,u,l,c,f,h=[],d=[];a=s=-1,l=n[0]>=r,rE[l<<1].forEach(p);for(;++a=r,rE[u|l<<1].forEach(p);rE[l<<0].forEach(p);for(;++s=r,c=n[s*t]>=r,rE[l<<1|c<<2].forEach(p);++a=r,f=c,c=n[s*t+a+1]>=r,rE[u|l<<1|c<<2|f<<3].forEach(p);rE[l|c<<3].forEach(p)}a=-1,c=n[s*t]>=r,rE[c<<2].forEach(p);for(;++a=r,rE[c<<2|f<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],u=[t[1][0]+a,t[1][1]+s],l=o(r),c=o(u);(e=d[l])?(n=h[c])?(delete d[e.end],delete h[n.start],e===n?(e.ring.push(u),i(e.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(u),d[e.end=c]=e):(e=h[c])?(n=d[l])?(delete h[e.start],delete d[n.end],e===n?(e.ring.push(u),i(e.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete h[e.start],e.ring.unshift(r),h[e.start=l]=e):h[l]=d[c]={start:l,end:c,ring:[r,u]}}rE[c<<3].forEach(p)}(r,i,(t=>{n(t,r,i),function(t){var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];for(;++e0?a.push([t]):s.push(t)})),s.forEach((t=>{for(var e,n=0,r=a.length;n{var o,a=n[0],s=n[1],u=0|a,l=0|s,c=r[l*t+u];a>0&&a0&&s=0&&o>=0||s("invalid size"),t=i,e=o,r},r.smooth=function(t){return arguments.length?(n=t?a:nE,r):n===a},r}function oE(t,e){for(var n,r=-1,i=e.length;++rr!=d>r&&n<(h-l)*(r-c)/(d-c)+l&&(i=-i)}return i}function sE(t,e,n){var r,i,o,a;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],o=n[r],a=e[r],i<=o&&o<=a||a<=o&&o<=i)}function uE(t,e,n){return function(r){var i=st(r),o=n?Math.min(i[0],0):i[0],a=i[1],s=a-o,u=e?be(o,a,t):s/(t+1);return Se(o+u,a,u)}}function lE(t){Ja.call(this,null,t)}function cE(t,e,n,r,i){const o=t.x1||0,a=t.y1||0,s=e*n<0;function u(t){t.forEach(l)}function l(t){s&&t.reverse(),t.forEach(c)}function c(t){t[0]=(t[0]-o)*e+r,t[1]=(t[1]-a)*n+i}return function(t){return t.coordinates.forEach(u),t}}function fE(t,e,n){const r=t>=0?t:rs(e,n);return Math.round((Math.sqrt(4*r*r+1)-1)/2)}function hE(t){return Z(t)?t:it(+t)}function dE(){var t=t=>t[0],e=t=>t[1],n=d,r=[-1,-1],i=960,o=500,a=2;function u(s,u){const l=fE(r[0],s,t)>>a,c=fE(r[1],s,e)>>a,f=l?l+2:0,h=c?c+2:0,d=2*f+(i>>a),p=2*h+(o>>a),g=new Float32Array(d*p),m=new Float32Array(d*p);let y=g;s.forEach((r=>{const i=f+(+t(r)>>a),o=h+(+e(r)>>a);i>=0&&i=0&&o0&&c>0?(pE(d,p,g,m,l),gE(d,p,m,g,c),pE(d,p,g,m,l),gE(d,p,m,g,c),pE(d,p,g,m,l),gE(d,p,m,g,c)):l>0?(pE(d,p,g,m,l),pE(d,p,m,g,l),pE(d,p,g,m,l),y=m):c>0&&(gE(d,p,g,m,c),gE(d,p,m,g,c),gE(d,p,g,m,c),y=m);const v=u?Math.pow(2,-2*a):1/$e(y);for(let t=0,e=d*p;t>a),y2:h+(o>>a)}}return u.x=function(e){return arguments.length?(t=hE(e),u):t},u.y=function(t){return arguments.length?(e=hE(t),u):e},u.weight=function(t){return arguments.length?(n=hE(t),u):n},u.size=function(t){if(!arguments.length)return[i,o];var e=+t[0],n=+t[1];return e>=0&&n>=0||s("invalid size"),i=e,o=n,u},u.cellSize=function(t){return arguments.length?((t=+t)>=1||s("invalid cell size"),a=Math.floor(Math.log(t)/Math.LN2),u):1<=i&&(e>=o&&(s-=n[e-o+a*t]),r[e-i+a*t]=s/Math.min(e+1,t-1+o-e,o))}function gE(t,e,n,r,i){const o=1+(i<<1);for(let a=0;a=i&&(s>=o&&(u-=n[a+(s-o)*t]),r[a+(s-i)*t]=u/Math.min(s+1,e-1+o-s,o))}function mE(t){Ja.call(this,null,t)}lE.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},dt(lE,Ja,{transform(t,e){if(this.value&&!e.changed()&&!t.modified())return e.StopPropagation;var n=e.fork(e.NO_SOURCE|e.NO_FIELDS),r=e.materialize(e.SOURCE).source,i=t.field||f,o=iE().smooth(!1!==t.smooth),a=t.thresholds||function(t,e,n){const r=uE(n.levels||10,n.nice,!1!==n.zero);return"shared"!==n.resolve?r:r(t.map((t=>we(e(t).values))))}(r,i,t),s=null===t.as?null:t.as||"contour",u=[];return r.forEach((e=>{const n=i(e),r=o.size([n.width,n.height])(n.values,A(a)?a:a(n.values));!function(t,e,n,r){let i=r.scale||e.scale,o=r.translate||e.translate;Z(i)&&(i=i(n,r));Z(o)&&(o=o(n,r));if((1===i||null==i)&&!o)return;const a=(vt(i)?i:i[0])||1,s=(vt(i)?i:i[1])||1,u=o&&o[0]||0,l=o&&o[1]||0;t.forEach(cE(e,a,s,u,l))}(r,n,e,t),r.forEach((t=>{u.push(ba(e,_a(null!=s?{[s]:t}:t)))}))})),this.value&&(n.rem=this.value),this.value=n.source=n.add=u,n}}),mE.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const yE=["x","y","weight","size","cellSize","bandwidth"];function vE(t,e){return yE.forEach((n=>null!=e[n]?t[n](e[n]):0)),t}function _E(t){Ja.call(this,null,t)}dt(mE,Ja,{transform(t,e){if(this.value&&!e.changed()&&!t.modified())return e.StopPropagation;var r,i=e.fork(e.NO_SOURCE|e.NO_FIELDS),o=function(t,e){var n,r,i,o,a,s,u=[],l=t=>t(o);if(null==e)u.push(t);else for(n={},r=0,i=t.length;r_a(function(t,e){for(let n=0;nqb})).map(u)).concat(Se(Qb(o/d)*d,i,d).filter((function(t){return Vb(t%g)>qb})).map(l))}return y.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(a).slice(1),c(n).reverse().slice(1),f(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),y.precision(m)):[[r,s],[n,a]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),y.precision(m)):[[e,o],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],y):[p,g]},y.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],y):[h,d]},y.precision=function(h){return arguments.length?(m=+h,u=Zk(o,i,90),l=Qk(e,t,m),c=Zk(s,a,90),f=Qk(r,n,m),y):m},y.extentMajor([[-180,-90+qb],[180,90-qb]]).extentMinor([[-180,-80-qb],[180,80+qb]])}()}function DE(t){Ja.call(this,null,t)}function CE(t){if(!Z(t))return!1;const e=Bt(r(t));return e.$x||e.$y||e.$value||e.$max}function FE(t){Ja.call(this,null,t),this.modified(!0)}function SE(t,e,n){Z(t[e])&&t[e](n)}wE.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},dt(wE,Ja,{transform(t,e){var n,i=this._features,o=this._points,a=t.fields,s=a&&a[0],u=a&&a[1],l=t.geojson||!a&&f,c=e.ADD;n=t.modified()||e.changed(e.REM)||e.modified(r(l))||s&&e.modified(r(s))||u&&e.modified(r(u)),this.value&&!n||(c=e.SOURCE,this._features=i=[],this._points=o=[]),l&&e.visit(c,(t=>i.push(l(t)))),s&&u&&(e.visit(c,(t=>{var e=s(t),n=u(t);null!=e&&null!=n&&(e=+e)===e&&(n=+n)===n&&o.push([e,n])})),i=i.concat({type:xE,geometry:{type:"MultiPoint",coordinates:o}})),this.value={type:bE,features:i}}}),kE.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},dt(kE,Ja,{transform(t,e){var n=e.fork(e.ALL),r=this.value,i=t.field||f,o=t.as||"path",a=n.SOURCE;!r||t.modified()?(this.value=r=tE(t.projection),n.materialize().reflow()):a=i===f||e.modified(i.fields)?n.ADD_MOD:n.ADD;const s=function(t,e){const n=t.pointRadius();t.context(null),null!=e&&t.pointRadius(e);return n}(r,t.pointRadius);return n.visit(a,(t=>t[o]=r(i(t)))),r.pointRadius(s),n.modifies(o)}}),AE.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},dt(AE,Ja,{transform(t,e){var n,r=t.projection,i=t.fields[0],o=t.fields[1],a=t.as||["x","y"],s=a[0],u=a[1];function l(t){const e=r([i(t),o(t)]);e?(t[s]=e[0],t[u]=e[1]):(t[s]=void 0,t[u]=void 0)}return t.modified()?e=e.materialize().reflow(!0).visit(e.SOURCE,l):(n=e.modified(i.fields)||e.modified(o.fields),e.visit(n?e.ADD_MOD:e.ADD,l)),e.modifies(a)}}),ME.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},dt(ME,Ja,{transform(t,e){var n=e.fork(e.ALL),r=this.value,i=t.as||"shape",o=n.ADD;return r&&!t.modified()||(this.value=r=function(t,e,n){const r=null==n?n=>t(e(n)):r=>{var i=t.pointRadius(),o=t.pointRadius(n)(e(r));return t.pointRadius(i),o};return r.context=e=>(t.context(e),r),r}(tE(t.projection),t.field||l("datum"),t.pointRadius),n.materialize().reflow(),o=n.SOURCE),n.visit(o,(t=>t[i]=r)),n.modifies(i)}}),EE.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},dt(EE,Ja,{transform(t,e){var n,r=this.value,i=this.generator;if(!r.length||t.modified())for(const e in t)Z(i[e])&&i[e](t[e]);return n=i(),r.length?e.mod.push(wa(r[0],n)):e.add.push(_a(n)),r[0]=n,e}}),DE.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},dt(DE,Ja,{transform(t,e){if(!e.changed()&&!t.modified())return e.StopPropagation;var n=e.materialize(e.SOURCE).source,r="shared"===t.resolve,i=t.field||f,o=function(t,e){let n;Z(t)?(n=n=>t(n,e),n.dep=CE(t)):t?n=it(t):(n=t=>t.$value/t.$max||0,n.dep=!0);return n}(t.opacity,t),a=function(t,e){let n;Z(t)?(n=n=>af(t(n,e)),n.dep=CE(t)):n=it(af(t||"#888"));return n}(t.color,t),s=t.as||"image",u={$x:0,$y:0,$value:0,$max:r?we(n.map((t=>we(i(t).values)))):0};return n.forEach((t=>{const e=i(t),n=at({},t,u);r||(n.$max=we(e.values||[])),t[s]=function(t,e,n,r){const i=t.width,o=t.height,a=t.x1||0,s=t.y1||0,u=t.x2||i,l=t.y2||o,c=t.values,f=c?t=>c[t]:h,d=$c(u-a,l-s),p=d.getContext("2d"),g=p.getImageData(0,0,u-a,l-s),m=g.data;for(let t=s,o=0;t{null!=t[e]&&SE(n,e,t[e])}))):QM.forEach((e=>{t.modified(e)&&SE(n,e,t[e])})),null!=t.pointRadius&&n.path.pointRadius(t.pointRadius),t.fit&&function(t,e){const n=function(t){return t=X(t),1===t.length?t[0]:{type:bE,features:t.reduce(((t,e)=>t.concat(function(t){return t.type===bE?t.features:X(t).filter((t=>null!=t)).map((t=>t.type===xE?t:{type:xE,geometry:t}))}(e))),[])}}(e.fit);e.extent?t.fitExtent(e.extent,n):e.size&&t.fitSize(e.size,n)}(n,t),e.fork(e.NO_SOURCE|e.NO_FIELDS)}});var $E=Object.freeze({__proto__:null,contour:_E,geojson:wE,geopath:kE,geopoint:AE,geoshape:ME,graticule:EE,heatmap:DE,isocontour:lE,kde2d:mE,projection:FE});function TE(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,s,u,l,c,f,h,d=t._root,p={data:r},g=t._x0,m=t._y0,y=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((l=e>=(o=(g+y)/2))?g=o:y=o,(c=n>=(a=(m+v)/2))?m=a:v=a,i=d,!(d=d[f=c<<1|l]))return i[f]=p,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===s&&n===u)return p.next=d,i?i[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(l=e>=(o=(g+y)/2))?g=o:y=o,(c=n>=(a=(m+v)/2))?m=a:v=a}while((f=c<<1|l)==(h=(u>=a)<<1|s>=o));return i[h]=d,i[f]=p,t}function BE(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function NE(t){return t[0]}function zE(t){return t[1]}function OE(t,e,n){var r=new RE(null==e?NE:e,null==n?zE:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function RE(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function LE(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var UE=OE.prototype=RE.prototype;function qE(t){return function(){return t}}function PE(t){return 1e-6*(t()-.5)}function jE(t){return t.x+t.vx}function IE(t){return t.y+t.vy}function WE(t){return t.index}function HE(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}UE.copy=function(){var t,e,n=new RE(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=LE(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=LE(e));return n},UE.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return TE(this.cover(e,n),e,n,t)},UE.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),s=new Array(o),u=1/0,l=1/0,c=-1/0,f=-1/0;for(n=0;nc&&(c=r),if&&(f=i));if(u>c||l>f)return this;for(this.cover(u,l).cover(c,f),n=0;nt||t>=i||r>e||e>=o;)switch(s=(eh||(o=u.y0)>d||(a=u.x1)=y)<<1|t>=m)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=u)}else{var v=t-+this._x.call(null,g.data),_=e-+this._y.call(null,g.data),x=v*v+_*_;if(x=(s=(p+m)/2))?p=s:m=s,(c=a>=(u=(g+y)/2))?g=u:y=u,e=d,!(d=d[f=c<<1|l]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},UE.removeAll=function(t){for(var e=0,n=t.length;e{}};function GE(){for(var t,e=0,n=arguments.length,r={};e=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var n,r,i=new Array(n),o=0;o=0&&e._call.call(void 0,t),e=e._next;--KE}()}finally{KE=0,function(){var t,e,n=ZE,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ZE=e);QE=t,pD(r)}(),iD=0}}function dD(){var t=aD.now(),e=t-rD;e>nD&&(oD-=e,rD=t)}function pD(t){KE||(tD&&(tD=clearTimeout(tD)),t-iD>24?(t<1/0&&(tD=setTimeout(hD,t-aD.now()-oD)),eD&&(eD=clearInterval(eD))):(eD||(rD=aD.now(),eD=setInterval(dD,nD)),KE=1,sD(hD)))}cD.prototype=fD.prototype={constructor:cD,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?uD():+n)+(null==e?0:+e),this._next||QE===this||(QE?QE._next=this:ZE=this,QE=this),this._call=t,this._time=n,pD()},stop:function(){this._call&&(this._call=null,this._time=1/0,pD())}};const gD=1664525,mD=1013904223,yD=4294967296;function vD(t){return t.x}function _D(t){return t.y}var xD=10,bD=Math.PI*(3-Math.sqrt(5));function wD(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,u=fD(f),l=GE("tick","end"),c=function(){let t=1;return()=>(t=(gD*t+mD)%yD)/yD}();function f(){h(),l.call("tick",e),n1?(null==n?s.delete(t):s.set(t,p(n)),e):s.get(t)},find:function(e,n,r){var i,o,a,s,u,l=0,c=t.length;for(null==r?r=1/0:r*=r,l=0;l1?(l.on(t,n),e):l.on(t)}}}const kD={center:function(t,e){var n,r=1;function i(){var i,o,a=n.length,s=0,u=0;for(i=0;il+p||oc+p||au.index){var g=l-s.x-s.vx,m=c-s.y-s.vy,y=g*g+m*m;yt.r&&(t.r=t[e].r)}function u(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r=s)){(t.data!==e||t.next)&&(0===f&&(p+=(f=PE(n))*f),0===h&&(p+=(h=PE(n))*h),p[s(t,e,r),t])));for(a=0,i=new Array(l);ae(t,n):e)}CD.Definition={type:"Force",metadata:{modifies:!0},params:[{name:"static",type:"boolean",default:!1},{name:"restart",type:"boolean",default:!1},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:!0,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:!0},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30,expr:!0},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:!0},{name:"strength",type:"number",expr:!0},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:!0,modify:!1,default:DD}]},dt(CD,Ja,{transform(t,e){var n,r,i=this.value,o=e.changed(e.ADD_REM),a=t.modified(MD),s=t.iterations||300;if(i?(o&&(e.modifies("index"),i.nodes(e.source)),(a||e.changed(e.MOD))&&FD(i,t,0,e)):(this.value=i=function(t,e){const n=wD(t),r=n.stop,i=n.restart;let o=!1;return n.stopped=()=>o,n.restart=()=>(o=!1,i()),n.stop=()=>(o=!0,r()),FD(n,e,!0).on("end",(()=>o=!0))}(e.source,t),i.on("tick",(n=e.dataflow,r=this,()=>n.touch(r).run())),t.static||(o=!0,i.tick()),e.modifies("index")),a||o||t.modified(ED)||e.changed()&&t.restart)if(i.alpha(Math.max(i.alpha(),t.alpha||1)).alphaDecay(1-Math.pow(i.alphaMin(),1/s)),t.static)for(i.stop();--s>=0;)i.tick();else if(i.stopped()&&i.restart(),!o)return e.StopPropagation;return this.finish(t,e)},finish(t,e){const n=e.dataflow;for(let t,e=this._argops,s=0,u=e.length;s=0;)e+=n[r].value;else e=1;t.value=e}function LD(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=qD)):void 0===e&&(e=UD);for(var n,r,i,o,a,s=new ID(t),u=[s];n=u.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)u.push(r=i[o]=new ID(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(jD)}function UD(t){return t.children}function qD(t){return Array.isArray(t)?t[1]:null}function PD(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function jD(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function ID(t){this.data=t,this.depth=this.height=0,this.parent=null}function WD(t){return null==t?null:HD(t)}function HD(t){if("function"!=typeof t)throw new Error;return t}function YD(){return 0}function GD(t){return function(){return t}}ID.prototype=LD.prototype={constructor:ID,count:function(){return this.eachAfter(RD)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],s=[],u=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return LD(this).eachBefore(PD)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n0&&n*n>r*r+i*i}function tC(t,e){for(var n=0;n1e-6?(D+Math.sqrt(D*D-4*E*C))/(2*E):C/D);return{x:r+w+k*F,y:i+A+M*F,r:F}}function iC(t,e,n){var r,i,o,a,s=t.x-e.x,u=t.y-e.y,l=s*s+u*u;l?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(l+a-i)/(2*l),o=Math.sqrt(Math.max(0,a/l-r*r)),n.x=t.x-r*s-o*u,n.y=t.y-r*u+o*s):(r=(l+i-a)/(2*l),o=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-o*u,n.y=e.y+r*u+o*s)):(n.x=e.x+n.r,n.y=e.y)}function oC(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function aC(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function sC(t){this._=t,this.next=null,this.previous=null}function uC(t,e){if(!(o=(t=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(t)).length))return 0;var n,r,i,o,a,s,u,l,c,f,h;if((n=t[0]).x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;iC(r,n,i=t[2]),n=new sC(n),r=new sC(r),i=new sC(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;ufunction(t){t=`${t}`;let e=t.length;wC(t,e-1)&&!wC(t,e-2)&&(t=t.slice(0,-1));return"/"===t[0]?t:`/${t}`}(t(e,n,r)))),n=e.map(bC),i=new Set(e).add("");for(const t of n)i.has(t)||(i.add(t),e.push(t),n.push(bC(t)),h.push(yC));d=(t,n)=>e[n],p=(t,e)=>n[e]}for(a=0,i=h.length;a=0&&(l=h[t]).data===yC;--t)l.data=null}if(s.parent=gC,s.eachBefore((function(t){t.depth=t.parent.depth+1,--i})).eachBefore(jD),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(t){return arguments.length?(e=WD(t),r):e},r.parentId=function(t){return arguments.length?(n=WD(t),r):n},r.path=function(e){return arguments.length?(t=WD(e),r):t},r}function bC(t){let e=t.length;if(e<2)return"";for(;--e>1&&!wC(t,e););return t.slice(0,e)}function wC(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if(0==(1&n))return!0}return!1}function kC(t,e){return t.parent===e.parent?1:2}function AC(t){var e=t.children;return e?e[0]:t.t}function MC(t){var e=t.children;return e?e[e.length-1]:t.t}function EC(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function DC(t,e,n){return t.a.parent===e.parent?t.a:n}function CC(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function FC(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++sh&&(h=s),m=c*c*g,(d=Math.max(h/m,m/f))>p){c-=s;break}p=d}y.push(a={value:c,dice:u1?e:1)},n}(SC);var BC=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,s,u,l,c,f=-1,h=a.length,d=t.value;++f1?e:1)},n}(SC);function NC(t,e,n){const r={};return t.each((t=>{const i=t.data;n(i)&&(r[e(i)]=t)})),t.lookup=r,t}function zC(t){Ja.call(this,null,t)}zC.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const OC=t=>t.values;function RC(){const t=[],e={entries:t=>r(n(t,0),0),key:n=>(t.push(n),e)};function n(e,r){if(r>=t.length)return e;const i=e.length,o=t[r++],a={},s={};let u,l,c,f=-1;for(;++ft.length)return e;const i=[];for(const t in e)i.push({key:t,values:r(e[t],n)});return i}return e}function LC(t){Ja.call(this,null,t)}dt(zC,Ja,{transform(t,e){e.source||s("Nest transform requires an upstream data source.");var n=t.generate,r=t.modified(),i=e.clone(),o=this.value;return(!o||r||e.changed())&&(o&&o.each((t=>{t.children&&ma(t.data)&&i.rem.push(t.data)})),this.value=o=LD({values:X(t.keys).reduce(((t,e)=>(t.key(e),t)),RC()).entries(i.source)},OC),n&&o.each((t=>{t.children&&(t=_a(t.data),i.add.push(t),i.source.push(t))})),NC(o,ya,ya)),i.source.root=o,i}});const UC=(t,e)=>t.parent===e.parent?1:2;dt(LC,Ja,{transform(t,e){e.source&&e.source.root||s(this.constructor.name+" transform requires a backing tree data source.");const n=this.layout(t.method),r=this.fields,i=e.source.root,o=t.as||r;t.field?i.sum(t.field):i.count(),t.sort&&i.sort(ka(t.sort,(t=>t.data))),function(t,e,n){for(let r,i=0,o=e.length;ifunction(t,e,n){const r=t.data,i=e.length-1;for(let o=0;o(t=(VD*t+XD)%JD)/JD}();return i.x=e/2,i.y=n/2,t?i.eachBefore(cC(t)).eachAfter(fC(r,.5,o)).eachBefore(hC(1)):i.eachBefore(cC(lC)).eachAfter(fC(YD,1,o)).eachAfter(fC(r,i.r/Math.min(e,n),o)).eachBefore(hC(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=WD(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:GD(+t),i):r},i},params:["radius","size","padding"],fields:qC});const jC=["x0","y0","x1","y1","depth","children"];function IC(t){LC.call(this,t)}function WC(t){Ja.call(this,null,t)}IC.Definition={type:"Partition",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:jC.length,default:jC}]},dt(IC,LC,{layout:function(){var t=1,e=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/o,i.eachBefore(function(t,e){return function(r){r.children&&pC(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,o=r.y0,a=r.x1-n,s=r.y1-n;a=0;--i)s.push(n=e.children[i]=new CC(r[i],i)),n.parent=e;return(a.parent=new CC(null,0)).children=[a],a}(i);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),r)i.eachBefore(s);else{var l=i,c=i,f=i;i.eachBefore((function(t){t.xc.x&&(c=t),t.depth>f.depth&&(f=t)}));var h=l===c?1:t(l,c)/2,d=h-l.x,p=e/(c.x+h+d),g=n/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,u=o.parent.children[0],l=o.m,c=a.m,f=s.m,h=u.m;s=MC(s),o=AC(o),s&&o;)u=AC(u),(a=MC(a)).a=e,(i=s.z+f-o.z-l+t(s._,o._))>0&&(EC(DC(s,e,r),e,i),l+=i,c+=i),f+=s.m,l+=o.m,h+=u.m,c+=a.m;s&&!MC(a)&&(a.t=s,a.m+=f-c),o&&!AC(u)&&(u.t=o,u.m+=l-h,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},cluster:function(){var t=ND,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(zD,0)/t.length}(n),e.y=function(t){return 1+t.reduce(OD,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),l=s.x-t(s,u)/2,c=u.x+t(u,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-l)/(c-l)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}},YC=["x","y","depth","children"];function GC(t){LC.call(this,t)}function VC(t){Ja.call(this,[],t)}GC.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:YC.length,default:YC}]},dt(GC,LC,{layout(t){const e=t||"tidy";if(lt(HC,e))return HC[e]();s("Unrecognized Tree layout method: "+e)},params:["size","nodeSize"],fields:YC}),VC.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},dt(VC,Ja,{transform(t,e){const n=this.value,r=e.source&&e.source.root,i=e.fork(e.NO_SOURCE),o={};return r||s("TreeLinks transform requires a tree data source."),e.changed(e.ADD_REM)?(i.rem=n,e.visit(e.SOURCE,(t=>o[ya(t)]=1)),r.each((t=>{const e=t.data,n=t.parent&&t.parent.data;n&&o[ya(e)]&&o[ya(n)]&&i.add.push(_a({source:n,target:e}))})),this.value=i.add):e.changed(e.MOD)&&(e.visit(e.MOD,(t=>o[ya(t)]=1)),n.forEach((t=>{(o[ya(t.source)]||o[ya(t.target)])&&i.mod.push(t)}))),i}});const XC={binary:function(t,e,n,r,i){var o,a,s=t.children,u=s.length,l=new Array(u+1);for(l[0]=a=o=0;o=n-1){var c=s[e];return c.x0=i,c.y0=o,c.x1=a,void(c.y1=u)}var f=l[e],h=r/2+f,d=e+1,p=n-1;for(;d>>1;l[g]u-o){var v=r?(i*y+a*m)/r:a;t(e,d,m,i,o,v,u),t(d,n,y,v,o,a,u)}else{var _=r?(o*y+u*m)/r:u;t(e,d,m,i,o,a,_),t(d,n,y,i,_,a,u)}}(0,u,t.value,e,n,r,i)},dice:pC,slice:FC,slicedice:function(t,e,n,r,i){(1&t.depth?FC:pC)(t,e,n,r,i)},squarify:TC,resquarify:BC},JC=["x0","y0","x1","y1","depth","children"];function ZC(t){LC.call(this,t)}ZC.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:JC.length,default:JC}]},dt(ZC,LC,{layout(){const t=function(){var t=TC,e=!1,n=1,r=1,i=[0],o=YD,a=YD,s=YD,u=YD,l=YD;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(dC),t}function f(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,f=e.x1-n,h=e.y1-n;f{const n=t.tile();n.ratio&&t.tile(n.ratio(e))},t.method=e=>{lt(XC,e)?t.tile(XC[e]):s("Unrecognized Treemap layout method: "+e)},t},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:JC});var QC=Object.freeze({__proto__:null,nest:zC,pack:PC,partition:IC,stratify:WC,tree:GC,treelinks:VC,treemap:ZC});const KC=4278190080;function tF(t,e,n){return new Uint32Array(t.getImageData(0,0,e,n).data.buffer)}function eF(t,e,n){if(!e.length)return;const r=e[0].mark.marktype;"group"===r?e.forEach((e=>{e.items.forEach((e=>eF(t,e.items,n)))})):Yy[r].draw(t,{items:n?e.map(nF):e})}function nF(t){const e=ba(t,{});return e.stroke&&0!==e.strokeOpacity||e.fill&&0!==e.fillOpacity?{...e,strokeOpacity:1,stroke:"#000",fillOpacity:0}:e}const rF=5,iF=31,oF=32,aF=new Uint32Array(oF+1),sF=new Uint32Array(oF+1);sF[0]=0,aF[0]=~sF[0];for(let t=1;t<=oF;++t)sF[t]=sF[t-1]<<1|1,aF[t]=~sF[t];function uF(t,e,n){const r=Math.max(1,Math.sqrt(t*e/1e6)),i=~~((t+2*n+r)/r),o=~~((e+2*n+r)/r),a=t=>~~((t+n)/r);return a.invert=t=>t*r-n,a.bitmap=()=>function(t,e){const n=new Uint32Array(~~((t*e+oF)/oF));function r(t,e){n[t]|=e}function i(t,e){n[t]&=e}return{array:n,get:(e,r)=>{const i=r*t+e;return n[i>>>rF]&1<<(i&iF)},set:(e,n)=>{const i=n*t+e;r(i>>>rF,1<<(i&iF))},clear:(e,n)=>{const r=n*t+e;i(r>>>rF,~(1<<(r&iF)))},getRange:(e,r,i,o)=>{let a,s,u,l,c=o;for(;c>=r;--c)if(a=c*t+e,s=c*t+i,u=a>>>rF,l=s>>>rF,u===l){if(n[u]&aF[a&iF]&sF[1+(s&iF)])return!0}else{if(n[u]&aF[a&iF])return!0;if(n[l]&sF[1+(s&iF)])return!0;for(let t=u+1;t{let a,s,u,l,c;for(;n<=o;++n)if(a=n*t+e,s=n*t+i,u=a>>>rF,l=s>>>rF,u===l)r(u,aF[a&iF]&sF[1+(s&iF)]);else for(r(u,aF[a&iF]),r(l,sF[1+(s&iF)]),c=u+1;c{let a,s,u,l,c;for(;n<=o;++n)if(a=n*t+e,s=n*t+r,u=a>>>rF,l=s>>>rF,u===l)i(u,sF[a&iF]|aF[1+(s&iF)]);else for(i(u,sF[a&iF]),i(l,aF[1+(s&iF)]),c=u+1;cn<0||r<0||o>=e||i>=t}}(i,o),a.ratio=r,a.padding=n,a.width=t,a.height=e,a}function lF(t,e,n,r,i,o){let a=n/2;return t-a<0||t+a>i||e-(a=r/2)<0||e+a>o}function cF(t,e,n,r,i,o,a,s){const u=i*o/(2*r),l=t(e-u),c=t(e+u),f=t(n-(o/=2)),h=t(n+o);return a.outOfBounds(l,f,c,h)||a.getRange(l,f,c,h)||s&&s.getRange(l,f,c,h)}const fF=[-1,-1,1,1],hF=[-1,1,-1,1];const dF=["right","center","left"],pF=["bottom","middle","top"];function gF(t,e,n,r,i,o,a,s,u,l,c,f){return!(i.outOfBounds(t,n,e,r)||(f&&o||i).getRange(t,n,e,r))}const mF={"top-left":0,top:1,"top-right":2,left:4,middle:5,right:6,"bottom-left":8,bottom:9,"bottom-right":10},yF={naive:function(t,e,n,r){const i=t.width,o=t.height;return function(t){const e=t.datum.datum.items[r].items,n=e.length,a=t.datum.fontSize,s=Ey.width(t.datum,t.datum.text);let u,l,c,f,h,d,p,g=0;for(let r=0;r=g&&(g=p,t.x=h,t.y=d);return h=s/2,d=a/2,u=t.x-h,l=t.x+h,c=t.y-d,f=t.y+d,t.align="center",u<0&&l<=i?t.align="left":0<=u&&i=1;)h=(d+p)/2,cF(t,c,f,l,u,h,a,s)?p=h:d=h;if(d>r)return[c,f,d,!0]}}return function(e){const s=e.datum.datum.items[r].items,l=s.length,c=e.datum.fontSize,f=Ey.width(e.datum,e.datum.text);let h,d,p,g,m,y,v,_,x,b,w,k,A,M,E,D,C,F=n?c:0,S=!1,$=!1,T=0;for(let r=0;rd&&(C=h,h=d,d=C),p>g&&(C=p,p=g,g=C),x=t(h),w=t(d),b=~~((x+w)/2),k=t(p),M=t(g),A=~~((k+M)/2),v=b;v>=x;--v)for(_=A;_>=k;--_)D=u(v,_,F,f,c),D&&([e.x,e.y,F,S]=D);for(v=b;v<=w;++v)for(_=A;_<=M;++_)D=u(v,_,F,f,c),D&&([e.x,e.y,F,S]=D);S||n||(E=Math.abs(d-h+g-p),m=(h+d)/2,y=(p+g)/2,E>=T&&!lF(m,y,f,c,i,o)&&!cF(t,m,y,c,f,c,a,null)&&(T=E,e.x=m,e.y=y,$=!0))}return!(!S&&!$)&&(m=f/2,y=c/2,a.setRange(t(e.x-m),t(e.y-y),t(e.x+m),t(e.y+y)),e.align="center",e.baseline="middle",!0)}},floodfill:function(t,e,n,r){const i=t.width,o=t.height,a=e[0],s=e[1],u=t.bitmap();return function(e){const l=e.datum.datum.items[r].items,c=l.length,f=e.datum.fontSize,h=Ey.width(e.datum,e.datum.text),d=[];let p,g,m,y,v,_,x,b,w,k,A,M,E=n?f:0,D=!1,C=!1,F=0;for(let r=0;r=1;)A=(w+k)/2,cF(t,v,_,f,h,A,a,s)?k=A:w=A;w>E&&(e.x=v,e.y=_,E=w,D=!0)}}D||n||(M=Math.abs(g-p+y-m),v=(p+g)/2,_=(m+y)/2,M>=F&&!lF(v,_,h,f,i,o)&&!cF(t,v,_,f,h,f,a,null)&&(F=M,e.x=v,e.y=_,C=!0))}return!(!D&&!C)&&(v=h/2,_=f/2,a.setRange(t(e.x-v),t(e.y-_),t(e.x+v),t(e.y+_)),e.align="center",e.baseline="middle",!0)}}};function vF(t,e,n,r,i,o,a,s,u,l,c){if(!t.length)return t;const f=Math.max(r.length,i.length),h=function(t,e){const n=new Float64Array(e),r=t.length;for(let e=0;e[t.x,t.x,t.x,t.y,t.y,t.y];return t?"line"===t||"area"===t?t=>i(t.datum):"line"===e?t=>{const e=t.datum.items[r].items;return i(e.length?e["start"===n?0:e.length-1]:{x:NaN,y:NaN})}:t=>{const e=t.datum.bounds;return[e.x1,(e.x1+e.x2)/2,e.x2,e.y1,(e.y1+e.y2)/2,e.y2]}:i}(p,g,s,u),v=null===l||l===1/0,_=m&&"naive"===c;var x;let b=-1,w=-1;const k=t.map((t=>{const e=v?Ey.width(t,t.text):void 0;return b=Math.max(b,e),w=Math.max(w,t.fontSize),{datum:t,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:y(t),textWidth:e}}));l=null===l||l===1/0?Math.max(b,w)+Math.max(...r):l;const A=uF(e[0],e[1],l);let M;if(!_){n&&k.sort(((t,e)=>n(t.datum,e.datum)));let e=!1;for(let t=0;tt.datum));M=o.length||r?function(t,e,n,r,i){const o=t.width,a=t.height,s=r||i,u=$c(o,a).getContext("2d"),l=$c(o,a).getContext("2d"),c=s&&$c(o,a).getContext("2d");n.forEach((t=>eF(u,t,!1))),eF(l,e,!1),s&&eF(c,e,!0);const f=tF(u,o,a),h=tF(l,o,a),d=s&&tF(c,o,a),p=t.bitmap(),g=s&&t.bitmap();let m,y,v,_,x,b,w,k;for(y=0;yn.set(t(e.boundary[0]),t(e.boundary[3])))),[n,void 0]}(A,a&&k)}const E=m?yF[c](A,M,a,u):function(t,e,n,r){const i=t.width,o=t.height,a=e[0],s=e[1],u=r.length;return function(e){const l=e.boundary,c=e.datum.fontSize;if(l[2]<0||l[5]<0||l[0]>i||l[3]>o)return!1;let f,h,d,p,g,m,y,v,_,x,b,w,k,A,M,E=e.textWidth??0;for(let i=0;i>>2&3)-1,d=0===f&&0===h||r[i]<0,p=f&&h?Math.SQRT1_2:1,g=r[i]<0?-1:1,m=l[1+f]+r[i]*f*p,b=l[4+h]+g*c*h/2+r[i]*h*p,v=b-c/2,_=b+c/2,w=t(m),A=t(v),M=t(_),!E){if(!gF(w,w,A,M,a,s,0,0,0,0,0,d))continue;E=Ey.width(e.datum,e.datum.text)}if(x=m+g*E*f/2,m=x-E/2,y=x+E/2,w=t(m),k=t(y),gF(w,k,A,M,a,s,0,0,0,0,0,d))return e.x=f?f*g<0?y:m:x,e.y=h?h*g<0?_:v:b,e.align=dF[f*g+1],e.baseline=pF[h*g+1],a.setRange(w,A,k,M),!0}return!1}}(A,M,d,h);return k.forEach((t=>t.opacity=+E(t))),k}const _F=["x","y","opacity","align","baseline"],xF=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function bF(t){Ja.call(this,null,t)}bF.Definition={type:"Label",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:!0,default:xF},{name:"offset",type:"number",array:!0,default:[1]},{name:"padding",type:"number",default:0,null:!0},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:!0},{name:"avoidMarks",type:"data",array:!0},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:!0,length:_F.length,default:_F}]},dt(bF,Ja,{transform(t,e){const n=t.modified();if(!(n||e.changed(e.ADD_REM)||function(n){const r=t[n];return Z(r)&&e.modified(r.fields)}("sort")))return;t.size&&2===t.size.length||s("Size parameter should be specified as a [width, height] array.");const r=t.as||_F;return vF(e.materialize(e.SOURCE).source||[],t.size,t.sort,X(null==t.offset?1:t.offset),X(t.anchor||xF),t.avoidMarks||[],!1!==t.avoidBaseMark,t.lineAnchor||"end",t.markIndex||0,void 0===t.padding?0:t.padding,t.method||"naive").forEach((t=>{const e=t.datum;e[r[0]]=t.x,e[r[1]]=t.y,e[r[2]]=t.opacity,e[r[3]]=t.align,e[r[4]]=t.baseline})),e.reflow(n).modifies(r)}});var wF=Object.freeze({__proto__:null,label:bF});function kF(t,e){var n,r,i,o,a,s,u=[],l=function(t){return t(o)};if(null==e)u.push(t);else for(n={},r=0,i=t.length;r{Us(e,t.x,t.y,t.bandwidth||.3).forEach((t=>{const n={};for(let t=0;t"poly"===t?e:"quad"===t?2:1)(a,u),c=t.as||[n(t.x),n(t.y)],f=MF[a],h=[];let d=t.extent;lt(MF,a)||s("Invalid regression method: "+a),null!=d&&"log"===a&&d[0]<=0&&(e.dataflow.warn("Ignoring extent with values <= 0 for log regression."),d=null),i.forEach((n=>{if(n.length<=l)return void e.dataflow.warn("Skipping regression with more parameters than data points.");const r=f(n,t.x,t.y,u);if(t.params)return void h.push(_a({keys:n.dims,coef:r.coef,rSquared:r.rSquared}));const i=d||st(n,t.x),s=t=>{const e={};for(let t=0;ts([t,r.predict(t)]))):Is(r.predict,i,25,200).forEach(s)})),this.value&&(r.rem=this.value),this.value=r.add=r.source=h}return r}});var DF=Object.freeze({__proto__:null,loess:AF,regression:EF});const CF=134217729,FF=33306690738754706e-32;function SF(t,e,n,r,i){let o,a,s,u,l=e[0],c=r[0],f=0,h=0;c>l==c>-l?(o=l,l=e[++f]):(o=c,c=r[++h]);let d=0;if(fl==c>-l?(a=l+o,s=o-(a-l),l=e[++f]):(a=c+o,s=o-(a-c),c=r[++h]),o=a,0!==s&&(i[d++]=s);fl==c>-l?(a=o+l,u=a-o,s=o-(a-u)+(l-u),l=e[++f]):(a=o+c,u=a-o,s=o-(a-u)+(c-u),c=r[++h]),o=a,0!==s&&(i[d++]=s);for(;f0!=s>0)return u;const l=Math.abs(a+s);return Math.abs(u)>=33306690738754716e-32*l?u:-function(t,e,n,r,i,o,a){let s,u,l,c,f,h,d,p,g,m,y,v,_,x,b,w,k,A;const M=t-i,E=n-i,D=e-o,C=r-o;x=M*C,h=CF*M,d=h-(h-M),p=M-d,h=CF*C,g=h-(h-C),m=C-g,b=p*m-(x-d*g-p*g-d*m),w=D*E,h=CF*D,d=h-(h-D),p=D-d,h=CF*E,g=h-(h-E),m=E-g,k=p*m-(w-d*g-p*g-d*m),y=b-k,f=b-y,NF[0]=b-(y+f)+(f-k),v=x+y,f=v-x,_=x-(v-f)+(y-f),y=_-w,f=_-y,NF[1]=_-(y+f)+(f-w),A=v+y,f=A-v,NF[2]=v-(A-f)+(y-f),NF[3]=A;let F=function(t,e){let n=e[0];for(let r=1;r=S||-F>=S)return F;if(f=t-M,s=t-(M+f)+(f-i),f=n-E,l=n-(E+f)+(f-i),f=e-D,u=e-(D+f)+(f-o),f=r-C,c=r-(C+f)+(f-o),0===s&&0===u&&0===l&&0===c)return F;if(S=BF*a+FF*Math.abs(F),F+=M*c+C*s-(D*l+E*u),F>=S||-F>=S)return F;x=s*C,h=CF*s,d=h-(h-s),p=s-d,h=CF*C,g=h-(h-C),m=C-g,b=p*m-(x-d*g-p*g-d*m),w=u*E,h=CF*u,d=h-(h-u),p=u-d,h=CF*E,g=h-(h-E),m=E-g,k=p*m-(w-d*g-p*g-d*m),y=b-k,f=b-y,LF[0]=b-(y+f)+(f-k),v=x+y,f=v-x,_=x-(v-f)+(y-f),y=_-w,f=_-y,LF[1]=_-(y+f)+(f-w),A=v+y,f=A-v,LF[2]=v-(A-f)+(y-f),LF[3]=A;const $=SF(4,NF,4,LF,zF);x=M*c,h=CF*M,d=h-(h-M),p=M-d,h=CF*c,g=h-(h-c),m=c-g,b=p*m-(x-d*g-p*g-d*m),w=D*l,h=CF*D,d=h-(h-D),p=D-d,h=CF*l,g=h-(h-l),m=l-g,k=p*m-(w-d*g-p*g-d*m),y=b-k,f=b-y,LF[0]=b-(y+f)+(f-k),v=x+y,f=v-x,_=x-(v-f)+(y-f),y=_-w,f=_-y,LF[1]=_-(y+f)+(f-w),A=v+y,f=A-v,LF[2]=v-(A-f)+(y-f),LF[3]=A;const T=SF($,zF,4,LF,OF);x=s*c,h=CF*s,d=h-(h-s),p=s-d,h=CF*c,g=h-(h-c),m=c-g,b=p*m-(x-d*g-p*g-d*m),w=u*l,h=CF*u,d=h-(h-u),p=u-d,h=CF*l,g=h-(h-l),m=l-g,k=p*m-(w-d*g-p*g-d*m),y=b-k,f=b-y,LF[0]=b-(y+f)+(f-k),v=x+y,f=v-x,_=x-(v-f)+(y-f),y=_-w,f=_-y,LF[1]=_-(y+f)+(f-w),A=v+y,f=A-v,LF[2]=v-(A-f)+(y-f),LF[3]=A;const B=SF(T,OF,4,LF,RF);return RF[B-1]}(t,e,n,r,i,o,l)}const qF=Math.pow(2,-52),PF=new Uint32Array(512);class jF{static from(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:VF,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:XF;const r=t.length,i=new Float64Array(2*r);for(let o=0;o>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:r,_hullHash:i}=this,o=t.length>>1;let a=1/0,s=1/0,u=-1/0,l=-1/0;for(let e=0;eu&&(u=n),r>l&&(l=r),this._ids[e]=e}const c=(a+u)/2,f=(s+l)/2;let h,d,p,g=1/0;for(let e=0;e0&&(d=e,g=n)}let v=t[2*d],_=t[2*d+1],x=1/0;for(let e=0;er&&(e[n++]=i,r=this._dists[i])}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(UF(m,y,v,_,b,w)<0){const t=d,e=v,n=_;d=p,v=b,_=w,p=t,b=e,w=n}const k=function(t,e,n,r,i,o){const a=n-t,s=r-e,u=i-t,l=o-e,c=a*a+s*s,f=u*u+l*l,h=.5/(a*l-s*u),d=t+(l*c-s*f)*h,p=e+(a*f-u*c)*h;return{x:d,y:p}}(m,y,v,_,b,w);this._cx=k.x,this._cy=k.y;for(let e=0;e0&&Math.abs(l-o)<=qF&&Math.abs(c-a)<=qF)continue;if(o=l,a=c,u===h||u===d||u===p)continue;let f=0;for(let t=0,e=this._hashKey(l,c);t=0;)if(m=g,m===f){m=-1;break}if(-1===m)continue;let y=this._addTriangle(m,u,n[m],-1,-1,r[m]);r[u]=this._legalize(y+2),r[m]=y,A++;let v=n[m];for(;g=n[v],UF(l,c,t[2*v],t[2*v+1],t[2*g],t[2*g+1])<0;)y=this._addTriangle(v,u,g,r[u],-1,r[v]),r[u]=this._legalize(y+2),n[v]=v,A--,v=g;if(m===f)for(;g=e[m],UF(l,c,t[2*g],t[2*g+1],t[2*m],t[2*m+1])<0;)y=this._addTriangle(g,u,m,-1,r[m],r[g]),this._legalize(y+2),r[g]=y,n[m]=m,A--,m=g;this._hullStart=e[u]=m,n[m]=e[v]=u,n[u]=v,i[this._hashKey(l,c)]=u,i[this._hashKey(t[2*m],t[2*m+1])]=m}this.hull=new Uint32Array(A);for(let t=0,e=this._hullStart;t0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const a=n[t],s=t-t%3;if(o=s+(t+2)%3,-1===a){if(0===i)break;t=PF[--i];continue}const u=a-a%3,l=s+(t+1)%3,c=u+(a+2)%3,f=e[o],h=e[t],d=e[l],p=e[c];if(WF(r[2*f],r[2*f+1],r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*p],r[2*p+1])){e[t]=p,e[a]=f;const r=n[c];if(-1===r){let e=this._hullStart;do{if(this._hullTri[e]===c){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,r),this._link(a,n[o]),this._link(o,c);const s=u+(a+1)%3;i=n&&e[t[a]]>o;)t[a+1]=t[a--];t[a+1]=r}else{let i=n+1,o=r;GF(t,n+r>>1,i),e[t[n]]>e[t[r]]&&GF(t,n,r),e[t[i]]>e[t[r]]&&GF(t,i,r),e[t[n]]>e[t[i]]&&GF(t,n,i);const a=t[i],s=e[a];for(;;){do{i++}while(e[t[i]]s);if(o=o-n?(YF(t,e,i,r),YF(t,e,n,o-1)):(YF(t,e,n,o-1),YF(t,e,i,r))}}function GF(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function VF(t){return t[0]}function XF(t){return t[1]}const JF=1e-6;class ZF{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`}arc(t,e,n){const r=(t=+t)+(n=+n),i=e=+e;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>JF||Math.abs(this._y1-i)>JF)&&(this._+="L"+r+","+i),n&&(this._+=`A${n},${n},0,1,1,${t-n},${e}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,e,n,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class QF{constructor(){this._=[]}moveTo(t,e){this._.push([t,e])}closePath(){this._.push(this._[0].slice())}lineTo(t,e){this._.push([t,e])}value(){return this._.length?this._:null}}let KF=class{constructor(t){let[e,n,r,i]=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,960,500];if(!((r=+r)>=(e=+e)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=e,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:e,triangles:n},vectors:r}=this;let i,o;const a=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r,s,u=0,l=0,c=n.length;u1;)i-=2;for(let t=2;t0){if(e>=this.ymax)return null;(i=(this.ymax-e)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/n)this.xmax?2:0)|(ethis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:nS,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rS,r=arguments.length>3?arguments[3]:void 0;return new oS("length"in t?function(t,e,n,r){const i=t.length,o=new Float64Array(2*i);for(let a=0;a2&&function(t){const{triangles:e,coords:n}=t;for(let t=0;t1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:e.length/2},((t,e)=>e)).sort(((t,n)=>e[2*t]-e[2*n]||e[2*t+1]-e[2*n+1]));const t=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[e[2*t],e[2*t+1],e[2*n],e[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,n=e.length/2;t0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,2===r.length&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new KF(this,t)}*neighbors(t){const{inedges:e,hull:n,_hullIndex:r,halfedges:i,triangles:o,collinear:a}=this;if(a){const e=a.indexOf(t);return e>0&&(yield a[e-1]),void(e2&&void 0!==arguments[2]?arguments[2]:0;if((t=+t)!=t||(e=+e)!=e)return-1;const r=n;let i;for(;(i=this._step(n,t,e))>=0&&i!==n&&i!==r;)n=i;return i}_step(t,e,n){const{inedges:r,hull:i,_hullIndex:o,halfedges:a,triangles:s,points:u}=this;if(-1===r[t]||!u.length)return(t+1)%(u.length>>1);let l=t,c=eS(e-u[2*t],2)+eS(n-u[2*t+1],2);const f=r[t];let h=f;do{let r=s[h];const f=eS(e-u[2*r],2)+eS(n-u[2*r+1],2);if(f=f));)if(e.x=a+i,e.y=l+o,!(e.x+e.x0<0||e.y+e.y0<0||e.x+e.x1>s[0]||e.y+e.y1>s[1])&&(!n||!gS(e,t,s[0]))&&(!n||yS(e,n))){for(var g,m=e.sprite,y=e.width>>5,v=s[0]>>5,_=e.x-(y<<4),x=127&_,b=32-x,w=e.y1-e.y0,k=(e.y+e.y0)*v+(_>>5),A=0;A>>x:0);k+=v}return e.sprite=null,!0}return!1}return f.layout=function(){for(var u=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=(fS<<5)/e,t.height=hS/e;var n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}($c()),f=function(t){var e=[],n=-1;for(;++n>5)*s[1]),d=null,p=l.length,g=-1,m=[],y=l.map((s=>({text:t(s),font:e(s),style:r(s),weight:i(s),rotate:o(s),size:~~(n(s)+1e-14),padding:a(s),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:s}))).sort(((t,e)=>e.size-t.size));++g>1,v.y=s[1]*(c()+.5)>>1,pS(u,v,y,g),v.hasText&&h(f,v,d)&&(m.push(v),d?mS(d,v):d=[{x:v.x+v.x0,y:v.y+v.y0},{x:v.x+v.x1,y:v.y+v.y1}],v.x-=s[0]>>1,v.y-=s[1]>>1)}return m},f.words=function(t){return arguments.length?(l=t,f):l},f.size=function(t){return arguments.length?(s=[+t[0],+t[1]],f):s},f.font=function(t){return arguments.length?(e=_S(t),f):e},f.fontStyle=function(t){return arguments.length?(r=_S(t),f):r},f.fontWeight=function(t){return arguments.length?(i=_S(t),f):i},f.rotate=function(t){return arguments.length?(o=_S(t),f):o},f.text=function(e){return arguments.length?(t=_S(e),f):t},f.spiral=function(t){return arguments.length?(u=xS[t]||t,f):u},f.fontSize=function(t){return arguments.length?(n=_S(t),f):n},f.padding=function(t){return arguments.length?(a=_S(t),f):a},f.random=function(t){return arguments.length?(c=t,f):c},f}function pS(t,e,n,r){if(!e.sprite){var i=t.context,o=t.ratio;i.clearRect(0,0,(fS<<5)/o,hS/o);var a,s,u,l,c,f=0,h=0,d=0,p=n.length;for(--r;++r>5<<5,u=~~Math.max(Math.abs(v+_),Math.abs(v-_))}else a=a+31>>5<<5;if(u>d&&(d=u),f+a>=fS<<5&&(f=0,h+=d,d=0),h+u>=hS)break;i.translate((f+(a>>1))/o,(h+(u>>1))/o),e.rotate&&i.rotate(e.rotate*cS),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=a,e.height=u,e.xoff=f,e.yoff=h,e.x1=a>>1,e.y1=u>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,f+=a}for(var b=i.getImageData(0,0,(fS<<5)/o,hS/o).data,w=[];--r>=0;)if((e=n[r]).hasText){for(s=(a=e.width)>>5,u=e.y1-e.y0,l=0;l>5),E=b[(h+c)*(fS<<5)+(f+l)<<2]?1<<31-l%32:0;w[M]|=E,k|=E}k?A=c:(e.y0++,u--,c--,h++)}e.y1=e.y0+A,e.sprite=w.slice(0,(e.y1-e.y0)*s)}}}function gS(t,e,n){n>>=5;for(var r,i=t.sprite,o=t.width>>5,a=t.x-(o<<4),s=127&a,u=32-s,l=t.y1-t.y0,c=(t.y+t.y0)*n+(a>>5),f=0;f>>s:0))&e[c+h])return!0;c+=n}return!1}function mS(t,e){var n=t[0],r=t[1];e.x+e.x0r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function yS(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0e[0].y&&t.y+t.y0e(t(n))}i.forEach((t=>{t[a[0]]=NaN,t[a[1]]=NaN,t[a[3]]=0}));const c=o.words(i).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(l).random(t.random).layout(),f=o.size(),h=f[0]>>1,d=f[1]>>1,p=c.length;for(let t,e,n=0;nnew Uint8Array(t),ES=t=>new Uint16Array(t),DS=t=>new Uint32Array(t);function CS(t,e,n){const r=(e<257?MS:e<65537?ES:DS)(t);return n&&r.set(n),r}function FS(t,e,n){const r=1<{const r=t[e],i=t[n];return ri?1:0})),function(t,e){return Array.from(e,(e=>t[e]))}(t,e)}(h,u),a)l=e,c=t,e=Array(a+s),t=DS(a+s),function(t,e,n,r,i,o,a,s,u){let l,c=0,f=0;for(l=0;c0)for(f=0;ft,size:()=>n}}function $S(t){Ja.call(this,function(){let t=8,e=[],n=DS(0),r=CS(0,t),i=CS(0,t);return{data:()=>e,seen:()=>n=function(t,e,n){return t.length>=e?t:((n=n||new t.constructor(e)).set(t),n)}(n,e.length),add(t){for(let n,r=0,i=e.length,o=t.length;re.length,curr:()=>r,prev:()=>i,reset:t=>i[t]=r[t],all:()=>t<257?255:t<65537?65535:4294967295,set(t,e){r[t]|=e},clear(t,e){r[t]&=~e},resize(e,n){(e>r.length||n>t)&&(t=Math.max(n,t),r=CS(e,t,r),i=CS(e,t))}}}(),t),this._indices=null,this._dims=null}function TS(t){Ja.call(this,null,t)}$S.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]},dt($S,Ja,{transform(t,e){return this._dims?t.modified("fields")||t.fields.some((t=>e.modified(t.fields)))?this.reinit(t,e):this.eval(t,e):this.init(t,e)},init(t,e){const n=t.fields,r=t.query,i=this._indices={},o=this._dims=[],a=r.length;let s,u,l=0;for(;l{const t=i.remove(e,n);for(const e in r)r[e].reindex(t)}))},update(t,e,n){const r=this._dims,i=t.query,o=e.stamp,a=r.length;let s,u,l=0;for(n.filters=0,u=0;ud)for(m=d,y=Math.min(f,p);mp)for(m=Math.max(f,p),y=h;mc)for(d=c,p=Math.min(u,f);df)for(d=Math.max(u,f),p=l;ds[t]&n?null:a[t];return o.filter(o.MOD,l),i&i-1?(o.filter(o.ADD,(t=>{const e=s[t]&n;return!e&&e^u[t]&n?a[t]:null})),o.filter(o.REM,(t=>{const e=s[t]&n;return e&&!(e^e^u[t]&n)?a[t]:null}))):(o.filter(o.ADD,l),o.filter(o.REM,(t=>(s[t]&n)===i?a[t]:null))),o.filter(o.SOURCE,(t=>l(t._index)))}});var BS=Object.freeze({__proto__:null,crossfilter:$S,resolvefilter:TS});const NS="Literal",zS="Property",OS="ArrayExpression",RS="BinaryExpression",LS="CallExpression",US="ConditionalExpression",qS="LogicalExpression",PS="MemberExpression",jS="ObjectExpression",IS="UnaryExpression";function WS(t){this.type=t}var HS,YS,GS,VS,XS;WS.prototype.visit=function(t){let e,n,r;if(t(this))return 1;for(e=function(t){switch(t.type){case OS:return t.elements;case RS:case qS:return[t.left,t.right];case LS:return[t.callee].concat(t.arguments);case US:return[t.test,t.consequent,t.alternate];case PS:return[t.object,t.property];case jS:return t.properties;case zS:return[t.key,t.value];case IS:return[t.argument];default:return[]}}(this),n=0,r=e.length;n",HS[QS]="Identifier",HS[KS]="Keyword",HS[t$]="Null",HS[e$]="Numeric",HS[n$]="Punctuator",HS[r$]="String",HS[9]="RegularExpression";var i$="ArrayExpression",o$="BinaryExpression",a$="CallExpression",s$="ConditionalExpression",u$="Identifier",l$="Literal",c$="LogicalExpression",f$="MemberExpression",h$="ObjectExpression",d$="Property",p$="UnaryExpression",g$="Unexpected token %0",m$="Unexpected number",y$="Unexpected string",v$="Unexpected identifier",_$="Unexpected reserved word",x$="Unexpected end of input",b$="Invalid regular expression",w$="Invalid regular expression: missing /",k$="Octal literals are not allowed in strict mode.",A$="Duplicate data property in object literal not allowed in strict mode",M$="ILLEGAL",E$="Disabled.",D$=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),C$=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function F$(t,e){if(!t)throw new Error("ASSERT: "+e)}function S$(t){return t>=48&&t<=57}function $$(t){return"0123456789abcdefABCDEF".includes(t)}function T$(t){return"01234567".includes(t)}function B$(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(t)}function N$(t){return 10===t||13===t||8232===t||8233===t}function z$(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&D$.test(String.fromCharCode(t))}function O$(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&C$.test(String.fromCharCode(t))}const R$={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function L$(){for(;GS1114111||"}"!==t)&&eT({},g$,M$),e<=65535?String.fromCharCode(e):(n=55296+(e-65536>>10),r=56320+(e-65536&1023),String.fromCharCode(n,r))}function P$(){var t,e;for(t=YS.charCodeAt(GS++),e=String.fromCharCode(t),92===t&&(117!==YS.charCodeAt(GS)&&eT({},g$,M$),++GS,(t=U$("u"))&&"\\"!==t&&z$(t.charCodeAt(0))||eT({},g$,M$),e=t);GS>>="===(r=YS.substr(GS,4))?{type:n$,value:r,start:i,end:GS+=4}:">>>"===(n=r.substr(0,3))||"<<="===n||">>="===n?{type:n$,value:n,start:i,end:GS+=3}:a===(e=n.substr(0,2))[1]&&"+-<>&|".includes(a)||"=>"===e?{type:n$,value:e,start:i,end:GS+=2}:("//"===e&&eT({},g$,M$),"<>=!+-*%&|^/".includes(a)?(++GS,{type:n$,value:a,start:i,end:GS}):void eT({},g$,M$))}function W$(){var t,e,n;if(F$(S$((n=YS[GS]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),e=GS,t="","."!==n){if(t=YS[GS++],n=YS[GS],"0"===t){if("x"===n||"X"===n)return++GS,function(t){let e="";for(;GS=0&&eT({},b$,n),{value:n,literal:e}}(),r=function(t,e){let n=t;e.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,((t,e)=>{if(parseInt(e,16)<=1114111)return"x";eT({},b$)})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch(t){eT({},b$)}try{return new RegExp(t,e)}catch(t){return null}}(e.value,n.value),{literal:e.literal+n.literal,value:r,regex:{pattern:e.value,flags:n.value},start:t,end:GS}}function Y$(){if(L$(),GS>=VS)return{type:ZS,start:GS,end:GS};const t=YS.charCodeAt(GS);return z$(t)?j$():40===t||41===t||59===t?I$():39===t||34===t?function(){var t,e,n,r,i="",o=!1;for(F$("'"===(t=YS[GS])||'"'===t,"String literal must starts with a quote"),e=GS,++GS;GS(F$(e":case"<=":case">=":case"instanceof":case"in":e=7;break;case"<<":case">>":case">>>":e=8;break;case"+":case"-":e=9;break;case"*":case"/":case"%":e=11}return e}function vT(){var t,e;return t=function(){var t,e,n,r,i,o,a,s,u,l;if(t=XS,u=mT(),0===(i=yT(r=XS)))return u;for(r.prec=i,G$(),e=[t,XS],o=[u,r,a=mT()];(i=yT(XS))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,u=o.pop(),e.pop(),n=X$(s,u,a),o.push(n);(r=G$()).prec=i,o.push(r),e.push(XS),n=mT(),o.push(n)}for(n=o[l=o.length-1],e.pop();l>1;)e.pop(),n=X$(o[l-1].value,o[l-2],n),l-=2;return n}(),iT("?")&&(G$(),e=vT(),rT(":"),t=function(t,e,n){const r=new WS(s$);return r.test=t,r.consequent=e,r.alternate=n,r}(t,e,vT())),t}function _T(){const t=vT();if(iT(","))throw new Error(E$);return t}function xT(t){GS=0,VS=(YS=t).length,XS=null,V$();const e=_T();if(XS.type!==ZS)throw new Error("Unexpect token after expression.");return e}var bT={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function wT(t){function e(e,n,r){return i=>function(e,n,r,i){let o=t(n[0]);return r&&(o=r+"("+o+")",0===r.lastIndexOf("new ",0)&&(o="("+o+")")),o+"."+e+(i<0?"":0===i?"()":"("+n.slice(1).map(t).join(",")+")")}(e,i,n,r)}const n="new Date",r="String",i="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(e){e.length<3&&s("Missing arguments to clamp function."),e.length>3&&s("Too many arguments to clamp function.");const n=e.map(t);return"Math.max("+n[1]+", Math.min("+n[2]+","+n[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:n,date:e("getDate",n,0),day:e("getDay",n,0),year:e("getFullYear",n,0),month:e("getMonth",n,0),hours:e("getHours",n,0),minutes:e("getMinutes",n,0),seconds:e("getSeconds",n,0),milliseconds:e("getMilliseconds",n,0),time:e("getTime",n,0),timezoneoffset:e("getTimezoneOffset",n,0),utcdate:e("getUTCDate",n,0),utcday:e("getUTCDay",n,0),utcyear:e("getUTCFullYear",n,0),utcmonth:e("getUTCMonth",n,0),utchours:e("getUTCHours",n,0),utcminutes:e("getUTCMinutes",n,0),utcseconds:e("getUTCSeconds",n,0),utcmilliseconds:e("getUTCMilliseconds",n,0),length:e("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:e("toUpperCase",r,0),lower:e("toLowerCase",r,0),substring:e("substring",r),split:e("split",r),trim:e("trim",r,0),btoa:"btoa",atob:"atob",regexp:i,test:e("test",i),if:function(e){e.length<3&&s("Missing arguments to if function."),e.length>3&&s("Too many arguments to if function.");const n=e.map(t);return"("+n[0]+"?"+n[1]+":"+n[2]+")"}}}function kT(t){const e=(t=t||{}).allowed?Bt(t.allowed):{},n=t.forbidden?Bt(t.forbidden):{},r=t.constants||bT,i=(t.functions||wT)(h),o=t.globalvar,a=t.fieldvar,u=Z(o)?o:t=>`${o}["${t}"]`;let l={},c={},f=0;function h(t){if(xt(t))return t;const e=d[t.type];return null==e&&s("Unsupported type: "+t.type),e(t)}const d={Literal:t=>t.raw,Identifier:t=>{const i=t.name;return f>0?i:lt(n,i)?s("Illegal identifier: "+i):lt(r,i)?r[i]:lt(e,i)?i:(l[i]=1,u(i))},MemberExpression:t=>{const e=!t.computed,n=h(t.object);e&&(f+=1);const r=h(t.property);return n===a&&(c[function(t){const e=t&&t.length-1;return e&&('"'===t[0]&&'"'===t[e]||"'"===t[0]&&"'"===t[e])?t.slice(1,-1):t}(r)]=1),e&&(f-=1),n+(e?"."+r:"["+r+"]")},CallExpression:t=>{"Identifier"!==t.callee.type&&s("Illegal callee type: "+t.callee.type);const e=t.callee.name,n=t.arguments,r=lt(i,e)&&i[e];return r||s("Unrecognized function: "+e),Z(r)?r(n):r+"("+n.map(h).join(",")+")"},ArrayExpression:t=>"["+t.elements.map(h).join(",")+"]",BinaryExpression:t=>"("+h(t.left)+" "+t.operator+" "+h(t.right)+")",UnaryExpression:t=>"("+t.operator+h(t.argument)+")",ConditionalExpression:t=>"("+h(t.test)+"?"+h(t.consequent)+":"+h(t.alternate)+")",LogicalExpression:t=>"("+h(t.left)+t.operator+h(t.right)+")",ObjectExpression:t=>{for(const e of t.properties){const t=e.key.name;m.has(t)&&s("Illegal property: "+t)}return"{"+t.properties.map(h).join(",")+"}"},Property:t=>{f+=1;const e=h(t.key);return f-=1,e+":"+h(t.value)}};function p(t){const e={code:h(t),globals:Object.keys(l),fields:Object.keys(c)};return l={},c={},e}return p.functions=i,p.constants=r,p}const AT=Symbol("vega_selection_getter");function MT(t){return t.getter&&t.getter[AT]||(t.getter=l(t.field),t.getter[AT]=!0),t.getter}const ET="intersect",DT="union",CT="_vgsid_",FT=l(CT),ST="E",$T="R",TT="R-E",BT="R-LE",NT="R-RE",zT="E-LT",OT="E-LTE",RT="E-GT",LT="E-GTE",UT="E-VALID",qT="E-ONE",PT="index:unit";function jT(t,e){for(var n,r,i=e.fields,o=e.values,a=i.length,s=0;s=o[s])return!1}else if(r.type===OT){if(n>o[s])return!1}else if(r.type===RT){if(n<=o[s])return!1}else if(r.type===LT){if(n1?e-1:0),r=1;re.includes(t))):e},R_union:function(t,e){var n=$(e[0]),r=$(e[1]);return n>r&&(n=e[1],r=e[0]),t.length?(t[0]>n&&(t[0]=n),t[1]r&&(n=e[1],r=e[0]),t.length?rr&&(t[1]=r),t):[n,r]}};function GT(t,e,n,r){e[0].type!==NS&&s("First argument to selection functions must be a string literal.");const i=e[0].value,o="unit",a="@"+o,u=":"+i;(e.length>=2&&S(e).value)!==ET||lt(r,a)||(r[a]=n.getData(i).indataRef(n,o)),lt(r,u)||(r[u]=n.getData(i).tuplesRef())}function VT(t){const e=this.context.data[t];return e?e.values.value:[]}const XT=t=>function(e,n){const r=this.context.dataflow.locale();return null===e?"null":r[t](n)(e)},JT=XT("format"),ZT=XT("timeFormat"),QT=XT("utcFormat"),KT=XT("timeParse"),tB=XT("utcParse"),eB=new Date(2e3,0,1);function nB(t,e,n){return Number.isInteger(t)&&Number.isInteger(e)?(eB.setYear(2e3),eB.setMonth(t),eB.setDate(e),ZT.call(this,eB,n)):""}const rB="%",iB="$";function oB(t,e,n,r){e[0].type!==NS&&s("First argument to data functions must be a string literal.");const i=e[0].value,o=":"+i;if(!lt(o,r))try{r[o]=n.getData(i).tuplesRef()}catch(t){}}function aB(t,e,n,r){if(e[0].type===NS)sB(n,r,e[0].value);else for(t in n.scales)sB(n,r,t)}function sB(t,e,n){const r=rB+n;if(!lt(e,r))try{e[r]=t.scaleRef(n)}catch(t){}}function uB(t,e){if(xt(t)){const n=e.scales[t];return n&&ap(n.value)?n.value:void 0}if(Z(t))return ap(t)?t:void 0}function lB(t,e,n){e.__bandwidth=t=>t&&t.bandwidth?t.bandwidth():0,n._bandwidth=aB,n._range=aB,n._scale=aB;const r=e=>"_["+(e.type===NS?Ct(rB+e.value):Ct(rB)+"+"+t(e))+"]";return{_bandwidth:t=>`this.__bandwidth(${r(t[0])})`,_range:t=>`${r(t[0])}.range()`,_scale:e=>`${r(e[0])}(${t(e[1])})`}}function cB(t,e){return function(n,r,i){if(n){const e=uB(n,(i||this).context);return e&&e.path[t](r)}return e(r)}}const fB=cB("area",(function(t){return Bw=new se,gw(t,Nw),2*Bw})),hB=cB("bounds",(function(t){var e,n,r,i,o,a,s;if(Aw=kw=-(bw=ww=1/0),Sw=[],gw(t,uk),n=Sw.length){for(Sw.sort(yk),e=1,o=[r=Sw[0]];emk(r[0],r[1])&&(r[1]=i[1]),mk(i[0],r[1])>mk(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(s=mk(r[1],i[0]))>a&&(a=s,bw=i[0],kw=r[1])}return Sw=$w=null,bw===1/0||ww===1/0?[[NaN,NaN],[NaN,NaN]]:[[bw,ww],[kw,Aw]]})),dB=cB("centroid",(function(t){Yw=Gw=Vw=Xw=Jw=Zw=Qw=Kw=0,tk=new se,ek=new se,nk=new se,gw(t,_k);var e=+tk,n=+ek,r=+nk,i=tw(e,n,r);return ivB(t,e)}const xB={};function bB(t){return A(t)||ArrayBuffer.isView(t)?t:null}function wB(t){return bB(t)||(xt(t)?t:null)}const kB=t=>t.data;function AB(t,e){const n=VT.call(e,t);return n.root&&n.root.lookup||{}}const MB=()=>"undefined"!=typeof window&&window||null;function EB(t,e,n){if(!t)return[];const[r,i]=t,o=(new Xg).set(r[0],r[1],i[0],i[1]);return N_(n||this.context.dataflow.scenegraph().root,o,function(t){let e=null;if(t){const n=X(t.marktype),r=X(t.markname);e=t=>(!n.length||n.some((e=>t.marktype===e)))&&(!r.length||r.some((e=>t.name===e)))}return e}(e))}const DB={random:()=>t.random(),cumulativeNormal:hs,cumulativeLogNormal:vs,cumulativeUniform:As,densityNormal:fs,densityLogNormal:ys,densityUniform:ks,quantileNormal:ds,quantileLogNormal:_s,quantileUniform:Ms,sampleNormal:cs,sampleLogNormal:ms,sampleUniform:ws,isArray:A,isBoolean:gt,isDate:mt,isDefined:t=>void 0!==t,isNumber:vt,isObject:M,isRegExp:_t,isString:xt,isTuple:ma,isValid:t=>null!=t&&t==t,toBoolean:Ft,toDate:t=>$t(t),toNumber:$,toString:Tt,indexof:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;rst(t),inScope:function(t){const e=this.context.group;let n=!1;if(e)for(;t;){if(t===e){n=!0;break}t=t.mark.group}return n},intersect:EB,clampRange:J,pinchDistance:function(t){const e=t.touches,n=e[0].clientX-e[1].clientX,r=e[0].clientY-e[1].clientY;return Math.hypot(n,r)},pinchAngle:function(t){const e=t.touches;return Math.atan2(e[0].clientY-e[1].clientY,e[0].clientX-e[1].clientX)},screen:function(){const t=MB();return t?t.screen:{}},containerSize:function(){const t=this.context.dataflow,e=t.container&&t.container();return e?[e.clientWidth,e.clientHeight]:[void 0,void 0]},windowSize:function(){const t=MB();return t?[t.innerWidth,t.innerHeight]:[void 0,void 0]},bandspace:function(t,e,n){return $d(t||0,e||0,n||0)},setdata:function(t,e){const n=this.context.dataflow,r=this.context.data[t].input;return n.pulse(r,n.changeset().remove(p).insert(e)),1},pathShape:function(t){let e=null;return function(n){return n?vg(n,e=e||sg(t)):t}},panLinear:L,panLog:U,panPow:q,panSymlog:P,zoomLinear:I,zoomLog:W,zoomPow:H,zoomSymlog:Y,encode:function(t,e,n){if(t){const n=this.context.dataflow,r=t.mark.source;n.pulse(r,n.changeset().encode(t,e))}return void 0!==n?n:t},modify:function(t,e,n,r,i,o){const a=this.context.dataflow,s=this.context.data[t],u=s.input,l=a.stamp();let c,f,h=s.changes;if(!1===a._trigger||!(u.value.length||e||r))return 0;if((!h||h.stamp{s.modified=!0,a.pulse(u,h).run()}),!0,1)),n&&(c=!0===n?p:A(n)||ma(n)?n:_B(n),h.remove(c)),e&&h.insert(e),r&&(c=_B(r),u.value.some(c)?h.remove(c):h.insert(r)),i)for(f in o)h.modify(i,f,o[f]);return 1},lassoAppend:function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5;const i=(t=X(t))[t.length-1];return void 0===i||Math.hypot(i[0]-e,i[1]-n)>r?[...t,[e,n]]:t},lassoPath:function(t){return X(t).reduce(((e,n,r)=>{let[i,o]=n;return e+(0==r?`M ${i},${o} `:r===t.length-1?" Z":`L ${i},${o} `)}),"")},intersectLasso:function(t,e,n){const{x:r,y:i,mark:o}=n,a=(new Xg).set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[t,n]of e)ta.x2&&(a.x2=t),na.y2&&(a.y2=n);return a.translate(r,i),EB([[a.x1,a.y1],[a.x2,a.y2]],t,o).filter((t=>function(t,e,n){let r=0;for(let i=0,o=n.length-1;ie!=s>e&&t<(a-u)*(e-l)/(s-l)+u&&r++}return 1&r}(t.x,t.y,e)))}},CB=["view","item","group","xy","x","y"],FB="this.",SB={},$B={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:t=>`_[${Ct(iB+t)}]`,functions:function(t){const e=wT(t);CB.forEach((t=>e[t]="event.vega."+t));for(const t in DB)e[t]=FB+t;return at(e,lB(t,DB,SB)),e},constants:bT,visitors:SB},TB=kT($B);function BB(t,e,n){return 1===arguments.length?DB[t]:(DB[t]=e,n&&(SB[t]=n),TB&&(TB.functions[t]=FB+t),this)}function NB(t,e){const n={};let r;try{r=xT(t=xt(t)?t:Ct(t)+"")}catch(e){s("Expression parse error: "+t)}r.visit((t=>{if(t.type!==LS)return;const r=t.callee.name,i=$B.visitors[r];i&&i(r,t.arguments,e,n)}));const i=TB(r);return i.globals.forEach((t=>{const r=iB+t;!lt(n,r)&&e.getSignal(t)&&(n[r]=e.signalRef(t))})),{$expr:at({code:i.code},e.options.ast?{ast:r}:null),$fields:i.fields,$params:n}}BB("bandwidth",(function(t,e){const n=uB(t,(e||this).context);return n&&n.bandwidth?n.bandwidth():0}),aB),BB("copy",(function(t,e){const n=uB(t,(e||this).context);return n?n.copy():void 0}),aB),BB("domain",(function(t,e){const n=uB(t,(e||this).context);return n?n.domain():[]}),aB),BB("range",(function(t,e){const n=uB(t,(e||this).context);return n&&n.range?n.range():[]}),aB),BB("invert",(function(t,e,n){const r=uB(t,(n||this).context);return r?A(e)?(r.invertRange||r.invert)(e):(r.invert||r.invertExtent)(e):void 0}),aB),BB("scale",(function(t,e,n){const r=uB(t,(n||this).context);return r?r(e):void 0}),aB),BB("gradient",(function(t,e,n,r,i){t=uB(t,(i||this).context);const o=Kp(e,n);let a=t.domain(),s=a[0],u=S(a),l=f;return u-s?l=xp(t,s,u):t=(t.interpolator?sp("sequential")().interpolator(t.interpolator()):sp("linear")().interpolate(t.interpolate()).range(t.range())).domain([s=0,u=1]),t.ticks&&(a=t.ticks(+r||15),s!==a[0]&&a.unshift(s),u!==S(a)&&a.push(u)),a.forEach((e=>o.stop(l(e),t(e)))),o}),aB),BB("geoArea",fB,aB),BB("geoBounds",hB,aB),BB("geoCentroid",dB,aB),BB("geoShape",(function(t,e,n){const r=uB(t,(n||this).context);return function(t){return r?r.path.context(t)(e):""}}),aB),BB("geoScale",(function(t,e){const n=uB(t,(e||this).context);return n&&n.scale()}),aB),BB("indata",(function(t,e,n){const r=this.context.data[t]["index:"+e],i=r?r.value.get(n):void 0;return i?i.count:i}),(function(t,e,n,r){e[0].type!==NS&&s("First argument to indata must be a string literal."),e[1].type!==NS&&s("Second argument to indata must be a string literal.");const i=e[0].value,o=e[1].value,a="@"+o;lt(a,r)||(r[a]=n.getData(i).indataRef(n,o))})),BB("data",VT,oB),BB("treePath",(function(t,e,n){const r=AB(t,this),i=r[e],o=r[n];return i&&o?i.path(o).map(kB):void 0}),oB),BB("treeAncestors",(function(t,e){const n=AB(t,this)[e];return n?n.ancestors().map(kB):void 0}),oB),BB("vlSelectionTest",(function(t,e,n){for(var r,i,o,a,s,u=this.context.data[t],l=u?u.values.value:[],c=u?u[PT]&&u[PT].value:void 0,f=n===ET,h=l.length,d=0;d(t[o[n].field]=e,t)),{}))}else u=CT,l=FT(i),(f=(c=v[u]||(v[u]={}))[s]||(c[s]=[])).push(l),n&&(f=_[s]||(_[s]=[])).push({[CT]:l});if(e=e||DT,v[CT]?v[CT]=YT[`${CT}_${e}`](...Object.values(v[CT])):Object.keys(v).forEach((t=>{v[t]=Object.keys(v[t]).map((e=>v[t][e])).reduce(((n,r)=>void 0===n?r:YT[`${x[t]}_${e}`](n,r)))})),y=Object.keys(_),n&&y.length){v[r?"vlPoint":"vlMulti"]=e===DT?{or:y.reduce(((t,e)=>(t.push(..._[e]),t)),[])}:{and:y.map((t=>({or:_[t]})))}}return v}),GT),BB("vlSelectionTuples",(function(t,e){return A(t)||s("First argument to selectionTuples must be an array."),M(e)||s("Second argument to selectionTuples must be an object."),t.map((t=>at(e.fields?{values:e.fields.map((e=>MT(e)(t.datum)))}:{[CT]:FT(t.datum)},e)))}));const zB=Bt(["rule"]),OB=Bt(["group","image","rect"]);function RB(t){return(t+"").toLowerCase()}function LB(t,e,n){n.endsWith(";")||(n="return("+n+");");const r=Function(...e.concat(n));return t&&t.functions?r.bind(t.functions):r}var UB={operator:(t,e)=>LB(t,["_"],e.code),parameter:(t,e)=>LB(t,["datum","_"],e.code),event:(t,e)=>LB(t,["event"],e.code),handler:(t,e)=>LB(t,["_","event"],`var datum=event.item&&event.item.datum;return ${e.code};`),encode:(t,e)=>{const{marktype:n,channels:r}=e;let i="var o=item,datum=o.datum,m=0,$;";for(const t in r){const e="o["+Ct(t)+"]";i+=`$=${r[t].code};if(${e}!==$)${e}=$,m=1;`}return i+=function(t,e){let n="";return zB[e]||(t.x2&&(t.x?(OB[e]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),t.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),t.y2&&(t.y?(OB[e]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),t.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}(r,n),i+="return m;",LB(t,["item","_"],i)},codegen:{get(t){const e=`[${t.map(Ct).join("][")}]`,n=Function("_",`return _${e};`);return n.path=e,n},comparator(t,e){let n;const r=Function("a","b","var u, v; return "+t.map(((t,r)=>{const i=e[r];let o,a;return t.path?(o=`a${t.path}`,a=`b${t.path}`):((n=n||{})["f"+r]=t,o=`this.f${r}(a)`,a=`this.f${r}(b)`),function(t,e,n,r){return`((u = ${t}) < (v = ${e}) || u == null) && v != null ? ${n}\n : (u > v || v == null) && u != null ? ${r}\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${n}\n : v !== v && u === u ? ${r} : `}(o,a,-i,i)})).join("")+"0;");return n?r.bind(n):r}}};function qB(t,e,n){if(!t||!M(t))return t;for(let r,i=0,o=PB.length;it&&t.$tupleid?ya:t));return e.fn[n]||(e.fn[n]=K(r,t.$order,e.expr.codegen))}},{key:"$context",parse:function(t,e){return e}},{key:"$subflow",parse:function(t,e){const n=t.$subflow;return function(t,r,i){const o=e.fork().parse(n),a=o.get(n.operators[0].id),s=o.signals.parent;return s&&s.set(i),a.detachSubflow=()=>e.detach(o),a}}},{key:"$tupleid",parse:function(){return ya}}];const jB={skip:!0};function IB(t,e,n,r){return new WB(t,e,n,r)}function WB(t,e,n,r){this.dataflow=t,this.transforms=e,this.events=t.events.bind(t),this.expr=r||UB,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function HB(t){this.dataflow=t.dataflow,this.transforms=t.transforms,this.events=t.events,this.expr=t.expr,this.signals=Object.create(t.signals),this.scales=Object.create(t.scales),this.nodes=Object.create(t.nodes),this.data=Object.create(t.data),this.fn=Object.create(t.fn),t.functions&&(this.functions=Object.create(t.functions),this.functions.context=this)}function YB(t,e){t&&(null==e?t.removeAttribute("aria-label"):t.setAttribute("aria-label",e))}WB.prototype=HB.prototype={fork(){const t=new HB(this);return(this.subcontext||(this.subcontext=[])).push(t),t},detach(t){this.subcontext=this.subcontext.filter((e=>e!==t));const e=Object.keys(t.nodes);for(const n of e)t.nodes[n]._targets=null;for(const n of e)t.nodes[n].detach();t.nodes=null},get(t){return this.nodes[t]},set(t,e){return this.nodes[t]=e},add(t,e){const n=this,r=n.dataflow,i=t.value;if(n.set(t.id,e),function(t){return"collect"===RB(t)}(t.type)&&i&&(i.$ingest?r.ingest(e,i.$ingest,i.$format):i.$request?r.preload(e,i.$request,i.$format):r.pulse(e,r.changeset().insert(i))),t.root&&(n.root=e),t.parent){let i=n.get(t.parent.$ref);i?(r.connect(i,[e]),e.targets().add(i)):(n.unresolved=n.unresolved||[]).push((()=>{i=n.get(t.parent.$ref),r.connect(i,[e]),e.targets().add(i)}))}if(t.signal&&(n.signals[t.signal]=e),t.scale&&(n.scales[t.scale]=e),t.data)for(const r in t.data){const i=n.data[r]||(n.data[r]={});t.data[r].forEach((t=>i[t]=e))}},resolve(){return(this.unresolved||[]).forEach((t=>t())),delete this.unresolved,this},operator(t,e){this.add(t,this.dataflow.add(t.value,e))},transform(t,e){this.add(t,this.dataflow.add(this.transforms[RB(e)]))},stream(t,e){this.set(t.id,e)},update(t,e,n,r,i){this.dataflow.on(e,n,r,i,t.options)},operatorExpression(t){return this.expr.operator(this,t)},parameterExpression(t){return this.expr.parameter(this,t)},eventExpression(t){return this.expr.event(this,t)},handlerExpression(t){return this.expr.handler(this,t)},encodeExpression(t){return this.expr.encode(this,t)},parse:function(t){const e=this,n=t.operators||[];return t.background&&(e.background=t.background),t.eventConfig&&(e.eventConfig=t.eventConfig),t.locale&&(e.locale=t.locale),n.forEach((t=>e.parseOperator(t))),n.forEach((t=>e.parseOperatorParameters(t))),(t.streams||[]).forEach((t=>e.parseStream(t))),(t.updates||[]).forEach((t=>e.parseUpdate(t))),e.resolve()},parseOperator:function(t){const e=this;!function(t){return"operator"===RB(t)}(t.type)&&t.type?e.transform(t,t.type):e.operator(t,t.update?e.operatorExpression(t.update):null)},parseOperatorParameters:function(t){const e=this;if(t.params){const n=e.get(t.id);n||s("Invalid operator id: "+t.id),e.dataflow.connect(n,n.parameters(e.parseParameters(t.params),t.react,t.initonly))}},parseParameters:function(t,e){e=e||{};const n=this;for(const r in t){const i=t[r];e[r]=A(i)?i.map((t=>qB(t,n,e))):qB(i,n,e)}return e},parseStream:function(t){var e,n=this,r=null!=t.filter?n.eventExpression(t.filter):void 0,i=null!=t.stream?n.get(t.stream):void 0;t.source?i=n.events(t.source,t.type,r):t.merge&&(i=(e=t.merge.map((t=>n.get(t))))[0].merge.apply(e[0],e.slice(1))),t.between&&(e=t.between.map((t=>n.get(t))),i=i.between(e[0],e[1])),t.filter&&(i=i.filter(r)),null!=t.throttle&&(i=i.throttle(+t.throttle)),null!=t.debounce&&(i=i.debounce(+t.debounce)),null==i&&s("Invalid stream definition: "+JSON.stringify(t)),t.consume&&i.consume(!0),n.stream(t,i)},parseUpdate:function(t){var e,n=this,r=M(r=t.source)?r.$ref:r,i=n.get(r),o=t.update,a=void 0;i||s("Source not defined: "+t.source),e=t.target&&t.target.$expr?n.eventExpression(t.target.$expr):n.get(t.target),o&&o.$expr&&(o.$params&&(a=n.parseParameters(o.$params)),o=n.handlerExpression(o.$expr)),n.update(t,i,e,o,a)},getState:function(t){var e=this,n={};if(t.signals){var r=n.signals={};Object.keys(e.signals).forEach((n=>{const i=e.signals[n];t.signals(n,i)&&(r[n]=i.value)}))}if(t.data){var i=n.data={};Object.keys(e.data).forEach((n=>{const r=e.data[n];t.data(n,r)&&(i[n]=r.input.value)}))}return e.subcontext&&!1!==t.recurse&&(n.subcontext=e.subcontext.map((e=>e.getState(t)))),n},setState:function(t){var e=this,n=e.dataflow,r=t.data,i=t.signals;Object.keys(i||{}).forEach((t=>{n.update(e.signals[t],i[t],jB)})),Object.keys(r||{}).forEach((t=>{n.pulse(e.data[t].input,n.changeset().remove(p).insert(r[t]))})),(t.subcontext||[]).forEach(((t,n)=>{const r=e.subcontext[n];r&&r.setState(t)}))}};const GB="default";function VB(t,e){const n=t.globalCursor()?"undefined"!=typeof document&&document.body:t.container();if(n)return null==e?n.style.removeProperty("cursor"):n.style.cursor=e}function XB(t,e){var n=t._runtime.data;return lt(n,e)||s("Unrecognized data set: "+e),n[e]}function JB(t,e){Aa(e)||s("Second argument to changes must be a changeset.");const n=XB(this,t);return n.modified=!0,this.pulse(n.input,e)}function ZB(t){var e=t.padding();return Math.max(0,t._viewWidth+e.left+e.right)}function QB(t){var e=t.padding();return Math.max(0,t._viewHeight+e.top+e.bottom)}function KB(t){var e=t.padding(),n=t._origin;return[e.left+n[0],e.top+n[1]]}function tN(t,e,n){var r,i,o=t._renderer,a=o&&o.canvas();return a&&(i=KB(t),(r=sv(e.changedTouches?e.changedTouches[0]:e,a))[0]-=i[0],r[1]-=i[1]),e.dataflow=t,e.item=n,e.vega=function(t,e,n){const r=e?"group"===e.mark.marktype?e:e.mark.group:null;function i(t){var n,i=r;if(t)for(n=e;n;n=n.mark.group)if(n.mark.name===t){i=n;break}return i&&i.mark&&i.mark.interactive?i:{}}function o(t){if(!t)return n;xt(t)&&(t=i(t));const e=n.slice();for(;t;)e[0]-=t.x||0,e[1]-=t.y||0,t=t.mark&&t.mark.group;return e}return{view:it(t),item:it(e||{}),group:i,xy:o,x:t=>o(t)[0],y:t=>o(t)[1]}}(t,n,r),e}const eN="view",nN={trap:!1};function rN(t,e,n,r){t._eventListeners.push({type:n,sources:X(e),handler:r})}function iN(t,e,n){const r=t._eventConfig&&t._eventConfig[e];return!(!1===r||M(r)&&!r[n])||(t.warn(`Blocked ${e} ${n} event listener.`),!1)}function oN(t){return t.item}function aN(t){return t.item.mark.source}function sN(t){return function(e,n){return n.vega.view().changeset().encode(n.item,t)}}function uN(t,e,n){const r=document.createElement(t);for(const t in e)r.setAttribute(t,e[t]);return null!=n&&(r.textContent=n),r}const lN="vega-bind",cN="vega-bind-name",fN="vega-bind-radio";function hN(t,e,n,r){const i=n.event||"input",o=()=>t.update(e.value);r.signal(n.signal,e.value),e.addEventListener(i,o),rN(r,e,i,o),t.set=t=>{e.value=t,e.dispatchEvent(function(t){return"undefined"!=typeof Event?new Event(t):{type:t}}(i))}}function dN(t,e,n,r){const i=r.signal(n.signal),o=uN("div",{class:lN}),a="radio"===n.input?o:o.appendChild(uN("label"));a.appendChild(uN("span",{class:cN},n.name||n.signal)),e.appendChild(o);let s=pN;switch(n.input){case"checkbox":s=gN;break;case"select":s=mN;break;case"radio":s=yN;break;case"range":s=vN}s(t,a,n,i)}function pN(t,e,n,r){const i=uN("input");for(const t in n)"signal"!==t&&"element"!==t&&i.setAttribute("input"===t?"type":t,n[t]);i.setAttribute("name",n.signal),i.value=r,e.appendChild(i),i.addEventListener("input",(()=>t.update(i.value))),t.elements=[i],t.set=t=>i.value=t}function gN(t,e,n,r){const i={type:"checkbox",name:n.signal};r&&(i.checked=!0);const o=uN("input",i);e.appendChild(o),o.addEventListener("change",(()=>t.update(o.checked))),t.elements=[o],t.set=t=>o.checked=!!t||null}function mN(t,e,n,r){const i=uN("select",{name:n.signal}),o=n.labels||[];n.options.forEach(((t,e)=>{const n={value:t};_N(t,r)&&(n.selected=!0),i.appendChild(uN("option",n,(o[e]||t)+""))})),e.appendChild(i),i.addEventListener("change",(()=>{t.update(n.options[i.selectedIndex])})),t.elements=[i],t.set=t=>{for(let e=0,r=n.options.length;e{const s={type:"radio",name:n.signal,value:e};_N(e,r)&&(s.checked=!0);const u=uN("input",s);u.addEventListener("change",(()=>t.update(e)));const l=uN("label",{},(o[a]||e)+"");return l.prepend(u),i.appendChild(l),u})),t.set=e=>{const n=t.elements,r=n.length;for(let t=0;t{u.textContent=s.value,t.update(+s.value)};s.addEventListener("input",l),s.addEventListener("change",l),t.elements=[s],t.set=t=>{s.value=t,u.textContent=t}}function _N(t,e){return t===e||t+""==e+""}function xN(t,e,n,r,i,o){return(e=e||new r(t.loader())).initialize(n,ZB(t),QB(t),KB(t),i,o).background(t.background())}function bN(t,e){return e?function(){try{e.apply(this,arguments)}catch(e){t.error(e)}}:null}function wN(t,e,n){if("string"==typeof e){if("undefined"==typeof document)return t.error("DOM document instance not found."),null;if(!(e=document.querySelector(e)))return t.error("Signal bind element not found: "+e),null}if(e&&n)try{e.textContent=""}catch(n){e=null,t.error(n)}return e}const kN=t=>+t||0;function AN(t){return M(t)?{top:kN(t.top),bottom:kN(t.bottom),left:kN(t.left),right:kN(t.right)}:(t=>({top:t,bottom:t,left:t,right:t}))(kN(t))}async function MN(t,e,n,r){const i=B_(e),o=i&&i.headless;return o||s("Unrecognized renderer type: "+e),await t.runAsync(),xN(t,null,null,o,n,r).renderAsync(t._scenegraph.root)}var EN="width",DN="height",CN="padding",FN={skip:!0};function SN(t,e){var n=t.autosize(),r=t.padding();return e-(n&&n.contains===CN?r.left+r.right:0)}function $N(t,e){var n=t.autosize(),r=t.padding();return e-(n&&n.contains===CN?r.top+r.bottom:0)}function TN(t,e){return e.modified&&A(e.input.value)&&!t.startsWith("_:vega:_")}function BN(t,e){return!("parent"===t||e instanceof Za.proxy)}function NN(t,e,n,r){const i=t.element();i&&i.setAttribute("title",function(t){return null==t?"":A(t)?zN(t):M(t)&&!mt(t)?(e=t,Object.keys(e).map((t=>{const n=e[t];return t+": "+(A(n)?zN(n):ON(n))})).join("\n")):t+"";var e}(r))}function zN(t){return"["+t.map(ON).join(", ")+"]"}function ON(t){return A(t)?"[…]":M(t)&&!mt(t)?"{…}":t}function RN(t,e){const n=this;if(e=e||{},Va.call(n),e.loader&&n.loader(e.loader),e.logger&&n.logger(e.logger),null!=e.logLevel&&n.logLevel(e.logLevel),e.locale||t.locale){const r=at({},t.locale,e.locale);n.locale(Ro(r.number,r.time))}n._el=null,n._elBind=null,n._renderType=e.renderer||$_.Canvas,n._scenegraph=new tv;const r=n._scenegraph.root;n._renderer=null,n._tooltip=e.tooltip||NN,n._redraw=!0,n._handler=(new $v).scene(r),n._globalCursor=!1,n._preventDefault=!1,n._timers=[],n._eventListeners=[],n._resizeListeners=[],n._eventConfig=function(t){const e=at({defaults:{}},t),n=(t,e)=>{e.forEach((e=>{A(t[e])&&(t[e]=Bt(t[e]))}))};return n(e.defaults,["prevent","allow"]),n(e,["view","window","selector"]),e}(t.eventConfig),n.globalCursor(n._eventConfig.globalCursor);const i=function(t,e,n){return IB(t,Za,DB,n).parse(e)}(n,t,e.expr);n._runtime=i,n._signals=i.signals,n._bind=(t.bindings||[]).map((t=>({state:null,param:at({},t)}))),i.root&&i.root.set(r),r.source=i.data.root.input,n.pulse(i.data.root.input,n.changeset().insert(r.items)),n._width=n.width(),n._height=n.height(),n._viewWidth=SN(n,n._width),n._viewHeight=$N(n,n._height),n._origin=[0,0],n._resize=0,n._autosize=1,function(t){var e=t._signals,n=e[EN],r=e[DN],i=e[CN];function o(){t._autosize=t._resize=1}t._resizeWidth=t.add(null,(e=>{t._width=e.size,t._viewWidth=SN(t,e.size),o()}),{size:n}),t._resizeHeight=t.add(null,(e=>{t._height=e.size,t._viewHeight=$N(t,e.size),o()}),{size:r});const a=t.add(null,o,{pad:i});t._resizeWidth.rank=n.rank+1,t._resizeHeight.rank=r.rank+1,a.rank=i.rank+1}(n),function(t){t.add(null,(e=>(t._background=e.bg,t._resize=1,e.bg)),{bg:t._signals.background})}(n),function(t){const e=t._signals.cursor||(t._signals.cursor=t.add({user:GB,item:null}));t.on(t.events("view","pointermove"),e,((t,n)=>{const r=e.value,i=r?xt(r)?r:r.user:GB,o=n.item&&n.item.cursor||null;return r&&i===r.user&&o==r.item?r:{user:i,item:o}})),t.add(null,(function(e){let n=e.cursor,r=this.value;return xt(n)||(r=n.item,n=n.user),VB(t,n&&n!==GB?n:r||n),r}),{cursor:e})}(n),n.description(t.description),e.hover&&n.hover(),e.container&&n.initialize(e.container,e.bind),e.watchPixelRatio&&n._watchPixelRatio()}function LN(t,e){return lt(t._signals,e)?t._signals[e]:s("Unrecognized signal name: "+Ct(e))}function UN(t,e){const n=(t._targets||[]).filter((t=>t._update&&t._update.handler===e));return n.length?n[0]:null}function qN(t,e,n,r){let i=UN(n,r);return i||(i=bN(t,(()=>r(e,n.value))),i.handler=r,t.on(n,null,i)),t}function PN(t,e,n){const r=UN(e,n);return r&&e._targets.remove(r),t}dt(RN,Va,{async evaluate(t,e,n){if(await Va.prototype.evaluate.call(this,t,e),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,function(t){var e=KB(t),n=ZB(t),r=QB(t);t._renderer.background(t.background()),t._renderer.resize(n,r,e),t._handler.origin(e),t._resizeListeners.forEach((e=>{try{e(n,r)}catch(e){t.error(e)}}))}(this)),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(t){this.error(t)}return n&&da(this,n),this},dirty(t){this._redraw=!0,this._renderer&&this._renderer.dirty(t)},description(t){if(arguments.length){const e=null!=t?t+"":null;return e!==this._desc&&YB(this._el,this._desc=e),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(t,e,n){const r=LN(this,t);return 1===arguments.length?r.value:this.update(r,e,n)},width(t){return arguments.length?this.signal("width",t):this.signal("width")},height(t){return arguments.length?this.signal("height",t):this.signal("height")},padding(t){return arguments.length?this.signal("padding",AN(t)):AN(this.signal("padding"))},autosize(t){return arguments.length?this.signal("autosize",t):this.signal("autosize")},background(t){return arguments.length?this.signal("background",t):this.signal("background")},renderer(t){return arguments.length?(B_(t)||s("Unrecognized renderer type: "+t),t!==this._renderType&&(this._renderType=t,this._resetRenderer()),this):this._renderType},tooltip(t){return arguments.length?(t!==this._tooltip&&(this._tooltip=t,this._resetRenderer()),this):this._tooltip},loader(t){return arguments.length?(t!==this._loader&&(Va.prototype.loader.call(this,t),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(LN(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:function(t,e,n,r,i,o){this.runAfter((a=>{let s=0;a._autosize=0,a.width()!==n&&(s=1,a.signal(EN,n,FN),a._resizeWidth.skip(!0)),a.height()!==r&&(s=1,a.signal(DN,r,FN),a._resizeHeight.skip(!0)),a._viewWidth!==t&&(a._resize=1,a._viewWidth=t),a._viewHeight!==e&&(a._resize=1,a._viewHeight=e),a._origin[0]===i[0]&&a._origin[1]===i[1]||(a._resize=1,a._origin=i),s&&a.run("enter"),o&&a.runAfter((t=>t.resize()))}),!1,1)},addEventListener(t,e,n){let r=e;return n&&!1===n.trap||(r=bN(this,e),r.raw=e),this._handler.on(t,r),this},removeEventListener(t,e){for(var n,r,i=this._handler.handlers(t),o=i.length;--o>=0;)if(r=i[o].type,n=i[o].handler,t===r&&(e===n||e===n.raw)){this._handler.off(r,n);break}return this},addResizeListener(t){const e=this._resizeListeners;return e.includes(t)||e.push(t),this},removeResizeListener(t){var e=this._resizeListeners,n=e.indexOf(t);return n>=0&&e.splice(n,1),this},addSignalListener(t,e){return qN(this,t,LN(this,t),e)},removeSignalListener(t,e){return PN(this,LN(this,t),e)},addDataListener(t,e){return qN(this,t,XB(this,t).values,e)},removeDataListener(t,e){return PN(this,XB(this,t).values,e)},globalCursor(t){if(arguments.length){if(this._globalCursor!==!!t){const e=VB(this,null);this._globalCursor=!!t,e&&VB(this,e)}return this}return this._globalCursor},preventDefault(t){return arguments.length?(this._preventDefault=t,this):this._preventDefault},timer:function(t,e){this._timers.push(function(t,e,n){var r=new cD,i=e;return null==e?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(t,e,n){e=+e,n=null==n?uD():+n,r._restart((function o(a){a+=i,r._restart(o,i+=e,n),t(a)}),e,n)},r.restart(t,e,n),r)}((function(e){t({timestamp:Date.now(),elapsed:e})}),e))},events:function(t,e,n){var r,i=this,o=new Ba(n),a=function(n,r){i.runAsync(null,(()=>{t===eN&&function(t,e){var n=t._eventConfig.defaults,r=n.prevent,i=n.allow;return!1!==r&&!0!==i&&(!0===r||!1===i||(r?r[e]:i?!i[e]:t.preventDefault()))}(i,e)&&n.preventDefault(),o.receive(tN(i,n,r))}))};if("timer"===t)iN(i,"timer",e)&&i.timer(a,e);else if(t===eN)iN(i,"view",e)&&i.addEventListener(e,a,nN);else if("window"===t?iN(i,"window",e)&&"undefined"!=typeof window&&(r=[window]):"undefined"!=typeof document&&iN(i,"selector",e)&&(r=Array.from(document.querySelectorAll(t))),r){for(var s=0,u=r.length;s=0;)a[t].stop();for(t=u.length;--t>=0;)for(e=(n=u[t]).sources.length;--e>=0;)n.sources[e].removeEventListener(n.type,n.handler);for(o&&o.call(this,this._handler,null,null,null),t=s.length;--t>=0;)i=s[t].type,r=s[t].handler,this._handler.off(i,r);return this},hover:function(t,e){return e=[e||"update",(t=[t||"hover"])[0]],this.on(this.events("view","pointerover",oN),aN,sN(t)),this.on(this.events("view","pointerout",oN),aN,sN(e)),this},data:function(t,e){return arguments.length<2?XB(this,t).values.value:JB.call(this,t,Ma().remove(p).insert(e))},change:JB,insert:function(t,e){return JB.call(this,t,Ma().insert(e))},remove:function(t,e){return JB.call(this,t,Ma().remove(e))},scale:function(t){var e=this._runtime.scales;return lt(e,t)||s("Unrecognized scale or projection: "+t),e[t].value},initialize:function(t,e){const n=this,r=n._renderType,i=n._eventConfig.bind,o=B_(r);t=n._el=t?wN(n,t,!0):null,function(t){const e=t.container();e&&(e.setAttribute("role","graphics-document"),e.setAttribute("aria-roleDescription","visualization"),YB(e,t.description()))}(n),o||n.error("Unrecognized renderer type: "+r);const a=o.handler||$v,s=t?o.renderer:o.headless;return n._renderer=s?xN(n,n._renderer,t,s):null,n._handler=function(t,e,n,r){const i=new r(t.loader(),bN(t,t.tooltip())).scene(t.scenegraph().root).initialize(n,KB(t),t);return e&&e.handlers().forEach((t=>{i.on(t.type,t.handler)})),i}(n,n._handler,t,a),n._redraw=!0,t&&"none"!==i&&(e=e?n._elBind=wN(n,e,!0):t.appendChild(uN("form",{class:"vega-bindings"})),n._bind.forEach((t=>{t.param.element&&"container"!==i&&(t.element=wN(n,t.param.element,!!t.param.input))})),n._bind.forEach((t=>{!function(t,e,n){if(!e)return;const r=n.param;let i=n.state;i||(i=n.state={elements:null,active:!1,set:null,update:e=>{e!=t.signal(r.signal)&&t.runAsync(null,(()=>{i.source=!0,t.signal(r.signal,e)}))}},r.debounce&&(i.update=ot(r.debounce,i.update))),(null==r.input&&r.element?hN:dN)(i,e,r,t),i.active||(t.on(t._signals[r.signal],null,(()=>{i.source?i.source=!1:i.set(t.signal(r.signal))})),i.active=!0)}(n,t.element||e,t)}))),n},toImageURL:async function(t,e){t!==$_.Canvas&&t!==$_.SVG&&t!==$_.PNG&&s("Unrecognized image type: "+t);const n=await MN(this,t,e);return t===$_.SVG?function(t,e){const n=new Blob([t],{type:e});return window.URL.createObjectURL(n)}(n.svg(),"image/svg+xml"):n.canvas().toDataURL("image/png")},toCanvas:async function(t,e){return(await MN(this,$_.Canvas,t,e)).canvas()},toSVG:async function(t){return(await MN(this,$_.SVG,t)).svg()},getState:function(t){return this._runtime.getState(t||{data:TN,signals:BN,recurse:!0})},setState:function(t){return this.runAsync(null,(e=>{e._trigger=!1,e._runtime.setState(t)}),(t=>{t._trigger=!0})),this},_watchPixelRatio:function(){if("canvas"===this.renderer()&&this._renderer._canvas){let t=null;const e=()=>{null!=t&&t();const n=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);n.addEventListener("change",e),t=()=>{n.removeEventListener("change",e)},this._renderer._canvas.getContext("2d").pixelRatio=window.devicePixelRatio||1,this._redraw=!0,this._resize=1,this.resize().runAsync()};e()}}});const jN="view",IN="[",WN="]",HN="{",YN="}",GN=":",VN=",",XN="@",JN=">",ZN=/[[\]{}]/,QN={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let KN,tz;function ez(t,e,n){return KN=e||jN,tz=n||QN,rz(t.trim()).map(iz)}function nz(t,e,n,r,i){const o=t.length;let a,s=0;for(;e' after between selector: "+t;n=n.map(iz);const i=iz(t.slice(1).trim());if(i.between)return{between:n,stream:i};i.between=n;return i}(t):function(t){const e={source:KN},n=[];let r,i,o=[0,0],a=0,s=0,u=t.length,l=0;if(t[u-1]===YN){if(l=t.lastIndexOf(HN),!(l>=0))throw"Unmatched right brace: "+t;try{o=function(t){const e=t.split(VN);if(!t.length||e.length>2)throw t;return e.map((e=>{const n=+e;if(n!=n)throw t;return n}))}(t.substring(l+1,u-1))}catch(e){throw"Invalid throttle specification: "+t}u=(t=t.slice(0,l).trim()).length,l=0}if(!u)throw t;t[0]===XN&&(a=++l);r=nz(t,l,GN),r1?(e.type=n[1],a?e.markname=n[0].slice(1):!function(t){return tz[t]}(n[0])?e.source=n[0]:e.marktype=n[0]):e.type=n[0];"!"===e.type.slice(-1)&&(e.consume=!0,e.type=e.type.slice(0,-1));null!=i&&(e.filter=i);o[0]&&(e.throttle=o[0]);o[1]&&(e.debounce=o[1]);return e}(t)}function oz(t){return M(t)?t:{type:t||"pad"}}const az=t=>+t||0,sz=t=>({top:t,bottom:t,left:t,right:t});function uz(t){return M(t)?t.signal?t:{top:az(t.top),bottom:az(t.bottom),left:az(t.left),right:az(t.right)}:sz(az(t))}const lz=t=>M(t)&&!A(t)?at({},t):{value:t};function cz(t,e,n,r){if(null!=n){return M(n)&&!A(n)||A(n)&&n.length&&M(n[0])?t.update[e]=n:t[r||"enter"][e]={value:n},1}return 0}function fz(t,e,n){for(const n in e)cz(t,n,e[n]);for(const e in n)cz(t,e,n[e],"update")}function hz(t,e,n){for(const r in e)n&<(n,r)||(t[r]=at(t[r]||{},e[r]));return t}function dz(t,e){return e&&(e.enter&&e.enter[t]||e.update&&e.update[t])}const pz="mark",gz="frame",mz="scope",yz="axis",vz="axis-domain",_z="axis-grid",xz="axis-label",bz="axis-tick",wz="axis-title",kz="legend",Az="legend-band",Mz="legend-entry",Ez="legend-gradient",Dz="legend-label",Cz="legend-symbol",Fz="legend-title",Sz="title",$z="title-text",Tz="title-subtitle";function Bz(t,e,n){t[e]=n&&n.signal?{signal:n.signal}:{value:n}}const Nz=t=>xt(t)?Ct(t):t.signal?`(${t.signal})`:Lz(t);function zz(t){if(null!=t.gradient)return function(t){const e=[t.start,t.stop,t.count].map((t=>null==t?null:Ct(t)));for(;e.length&&null==S(e);)e.pop();return e.unshift(Nz(t.gradient)),`gradient(${e.join(",")})`}(t);let e=t.signal?`(${t.signal})`:t.color?function(t){return t.c?Oz("hcl",t.h,t.c,t.l):t.h||t.s?Oz("hsl",t.h,t.s,t.l):t.l||t.a?Oz("lab",t.l,t.a,t.b):t.r||t.g||t.b?Oz("rgb",t.r,t.g,t.b):null}(t.color):null!=t.field?Lz(t.field):void 0!==t.value?Ct(t.value):void 0;return null!=t.scale&&(e=function(t,e){const n=Nz(t.scale);null!=t.range?e=`lerp(_range(${n}), ${+t.range})`:(void 0!==e&&(e=`_scale(${n}, ${e})`),t.band&&(e=(e?e+"+":"")+`_bandwidth(${n})`+(1==+t.band?"":"*"+Rz(t.band)),t.extra&&(e=`(datum.extra ? _scale(${n}, datum.extra.value) : ${e})`)),null==e&&(e="0"));return e}(t,e)),void 0===e&&(e=null),null!=t.exponent&&(e=`pow(${e},${Rz(t.exponent)})`),null!=t.mult&&(e+=`*${Rz(t.mult)}`),null!=t.offset&&(e+=`+${Rz(t.offset)}`),t.round&&(e=`round(${e})`),e}const Oz=(t,e,n,r)=>`(${t}(${[e,n,r].map(zz).join(",")})+'')`;function Rz(t){return M(t)?"("+zz(t)+")":t}function Lz(t){return Uz(M(t)?t:{datum:t})}function Uz(t){let e,n,r;if(t.signal)e="datum",r=t.signal;else if(t.group||t.parent){for(n=Math.max(1,t.level||1),e="item";n-- >0;)e+=".mark.group";t.parent?(r=t.parent,e+=".datum"):r=t.group}else t.datum?(e="datum",r=t.datum):s("Invalid field reference: "+Ct(t));return t.signal||(r=xt(r)?u(r).map(Ct).join("]["):Uz(r)),e+"["+r+"]"}function qz(t,e,n,r,i,o){const a={};(o=o||{}).encoders={$encode:a},t=function(t,e,n,r,i){const o={},a={};let s,u,l,c;for(u in u="lineBreak","text"!==e||null==i[u]||dz(u,t)||Bz(o,u,i[u]),("legend"==n||String(n).startsWith("axis"))&&(n=null),c=n===gz?i.group:n===pz?at({},i.mark,i[e]):null,c)l=dz(u,t)||("fill"===u||"stroke"===u)&&(dz("fill",t)||dz("stroke",t)),l||Bz(o,u,c[u]);for(u in X(r).forEach((e=>{const n=i.style&&i.style[e];for(const e in n)dz(e,t)||Bz(o,e,n[e])})),t=at({},t),o)c=o[u],c.signal?(s=s||{})[u]=c:a[u]=c;return t.enter=at(a,t.enter),s&&(t.update=at(s,t.update)),t}(t,e,n,r,i.config);for(const n in t)a[n]=Pz(t[n],e,o,i);return o}function Pz(t,e,n,r){const i={},o={};for(const e in t)null!=t[e]&&(i[e]=jz((a=t[e],A(a)?function(t){let e="";return t.forEach((t=>{const n=zz(t);e+=t.test?`(${t.test})?${n}:`:n})),":"===S(e)&&(e+="null"),e}(a):zz(a)),r,n,o));var a;return{$expr:{marktype:e,channels:i},$fields:Object.keys(o),$output:Object.keys(t)}}function jz(t,e,n,r){const i=NB(t,e);return i.$fields.forEach((t=>r[t]=1)),at(n,i.$params),i.$expr}const Iz="outer",Wz=["value","update","init","react","bind"];function Hz(t,e){s(t+' for "outer" push: '+Ct(e))}function Yz(t,e){const n=t.name;if(t.push===Iz)e.signals[n]||Hz("No prior signal definition",n),Wz.forEach((e=>{void 0!==t[e]&&Hz("Invalid property ",e)}));else{const r=e.addSignal(n,t.value);!1===t.react&&(r.react=!1),t.bind&&e.addBinding(n,t.bind)}}function Gz(t,e,n,r){this.id=-1,this.type=t,this.value=e,this.params=n,r&&(this.parent=r)}function Vz(t,e,n,r){return new Gz(t,e,n,r)}function Xz(t,e){return Vz("operator",t,e)}function Jz(t){const e={$ref:t.id};return t.id<0&&(t.refs=t.refs||[]).push(e),e}function Zz(t,e){return e?{$field:t,$name:e}:{$field:t}}const Qz=Zz("key");function Kz(t,e){return{$compare:t,$order:e}}const tO="descending";function eO(t,e){return(t&&t.signal?"$"+t.signal:t||"")+(t&&e?"_":"")+(e&&e.signal?"$"+e.signal:e||"")}const nO="scope",rO="view";function iO(t){return t&&t.signal}function oO(t){if(iO(t))return!0;if(M(t))for(const e in t)if(oO(t[e]))return!0;return!1}function aO(t,e){return null!=t?t:e}function sO(t){return t&&t.signal||t}const uO="timer";function lO(t,e){return(t.merge?cO:t.stream?fO:t.type?hO:s("Invalid stream specification: "+Ct(t)))(t,e)}function cO(t,e){const n=dO({merge:t.merge.map((t=>lO(t,e)))},t,e);return e.addStream(n).id}function fO(t,e){const n=dO({stream:lO(t.stream,e)},t,e);return e.addStream(n).id}function hO(t,e){let n;t.type===uO?(n=e.event(uO,t.throttle),t={between:t.between,filter:t.filter}):n=e.event(function(t){return t===nO?rO:t||rO}(t.source),t.type);const r=dO({stream:n},t,e);return 1===Object.keys(r).length?n:e.addStream(r).id}function dO(t,e,n){let r=e.between;return r&&(2!==r.length&&s('Stream "between" parameter must have 2 entries: '+Ct(e)),t.between=[lO(r[0],n),lO(r[1],n)]),r=e.filter?[].concat(e.filter):[],(e.marktype||e.markname||e.markrole)&&r.push(function(t,e,n){const r="event.item";return r+(t&&"*"!==t?"&&"+r+".mark.marktype==='"+t+"'":"")+(n?"&&"+r+".mark.role==='"+n+"'":"")+(e?"&&"+r+".mark.name==='"+e+"'":"")}(e.marktype,e.markname,e.markrole)),e.source===nO&&r.push("inScope(event.item)"),r.length&&(t.filter=NB("("+r.join(")&&(")+")",n).$expr),null!=(r=e.throttle)&&(t.throttle=+r),null!=(r=e.debounce)&&(t.debounce=+r),e.consume&&(t.consume=!0),t}const pO={code:"_.$value",ast:{type:"Identifier",value:"value"}};function gO(t,e,n){const r=t.encode,i={target:n};let o=t.events,a=t.update,u=[];o||s("Signal update missing events specification."),xt(o)&&(o=ez(o,e.isSubscope()?nO:rO)),o=X(o).filter((t=>t.signal||t.scale?(u.push(t),0):1)),u.length>1&&(u=[mO(u)]),o.length&&u.push(o.length>1?{merge:o}:o[0]),null!=r&&(a&&s("Signal encode and update are mutually exclusive."),a="encode(item(),"+Ct(r)+")"),i.update=xt(a)?NB(a,e):null!=a.expr?NB(a.expr,e):null!=a.value?a.value:null!=a.signal?{$expr:pO,$params:{$value:e.signalRef(a.signal)}}:s("Invalid signal update specification."),t.force&&(i.options={force:!0}),u.forEach((t=>e.addUpdate(at(function(t,e){return{source:t.signal?e.signalRef(t.signal):t.scale?e.scaleRef(t.scale):lO(t,e)}}(t,e),i))))}function mO(t){return{signal:"["+t.map((t=>t.scale?'scale("'+t.scale+'")':t.signal))+"]"}}const yO=t=>(e,n,r)=>Vz(t,n,e||void 0,r),vO=yO("aggregate"),_O=yO("axisticks"),xO=yO("bound"),bO=yO("collect"),wO=yO("compare"),kO=yO("datajoin"),AO=yO("encode"),MO=yO("expression"),EO=yO("facet"),DO=yO("field"),CO=yO("key"),FO=yO("legendentries"),SO=yO("load"),$O=yO("mark"),TO=yO("multiextent"),BO=yO("multivalues"),NO=yO("overlap"),zO=yO("params"),OO=yO("prefacet"),RO=yO("projection"),LO=yO("proxy"),UO=yO("relay"),qO=yO("render"),PO=yO("scale"),jO=yO("sieve"),IO=yO("sortitems"),WO=yO("viewlayout"),HO=yO("values");let YO=0;const GO={min:"min",max:"max",count:"sum"};function VO(t,e){const n=e.getScale(t.name).params;let r;for(r in n.domain=QO(t.domain,t,e),null!=t.range&&(n.range=aR(t,e,n)),null!=t.interpolate&&function(t,e){e.interpolate=XO(t.type||t),null!=t.gamma&&(e.interpolateGamma=XO(t.gamma))}(t.interpolate,n),null!=t.nice&&(n.nice=function(t,e){return t.signal?e.signalRef(t.signal):M(t)?{interval:XO(t.interval),step:XO(t.step)}:XO(t)}(t.nice,e)),null!=t.bins&&(n.bins=function(t,e){return t.signal||A(t)?JO(t,e):e.objectProperty(t)}(t.bins,e)),t)lt(n,r)||"name"===r||(n[r]=XO(t[r],e))}function XO(t,e){return M(t)?t.signal?e.signalRef(t.signal):s("Unsupported object: "+Ct(t)):t}function JO(t,e){return t.signal?e.signalRef(t.signal):t.map((t=>XO(t,e)))}function ZO(t){s("Can not find data set: "+Ct(t))}function QO(t,e,n){if(t)return t.signal?n.signalRef(t.signal):(A(t)?KO:t.fields?eR:tR)(t,e,n);null==e.domainMin&&null==e.domainMax||s("No scale domain defined for domainMin/domainMax to override.")}function KO(t,e,n){return t.map((t=>XO(t,n)))}function tR(t,e,n){const r=n.getData(t.data);return r||ZO(t.data),fp(e.type)?r.valuesRef(n,t.field,rR(t.sort,!1)):gp(e.type)?r.domainRef(n,t.field):r.extentRef(n,t.field)}function eR(t,e,n){const r=t.data,i=t.fields.reduce(((t,e)=>(e=xt(e)?{data:r,field:e}:A(e)||e.signal?function(t,e){const n="_:vega:_"+YO++,r=bO({});if(A(t))r.value={$ingest:t};else if(t.signal){const i="setdata("+Ct(n)+","+t.signal+")";r.params.input=e.signalRef(i)}return e.addDataPipeline(n,[r,jO({})]),{data:n,field:"data"}}(e,n):e,t.push(e),t)),[]);return(fp(e.type)?nR:gp(e.type)?iR:oR)(t,n,i)}function nR(t,e,n){const r=rR(t.sort,!0);let i,o;const a=n.map((t=>{const n=e.getData(t.data);return n||ZO(t.data),n.countsRef(e,t.field,r)})),s={groupby:Qz,pulse:a};r&&(i=r.op||"count",o=r.field?eO(i,r.field):"count",s.ops=[GO[i]],s.fields=[e.fieldRef(o)],s.as=[o]),i=e.add(vO(s));const u=e.add(bO({pulse:Jz(i)}));return o=e.add(HO({field:Qz,sort:e.sortRef(r),pulse:Jz(u)})),Jz(o)}function rR(t,e){return t&&(t.field||t.op?t.field||"count"===t.op?e&&t.field&&t.op&&!GO[t.op]&&s("Multiple domain scales can not be sorted using "+t.op):s("No field provided for sort aggregate op: "+t.op):M(t)?t.field="key":t={field:"key"}),t}function iR(t,e,n){const r=n.map((t=>{const n=e.getData(t.data);return n||ZO(t.data),n.domainRef(e,t.field)}));return Jz(e.add(BO({values:r})))}function oR(t,e,n){const r=n.map((t=>{const n=e.getData(t.data);return n||ZO(t.data),n.extentRef(e,t.field)}));return Jz(e.add(TO({extents:r})))}function aR(t,e,n){const r=e.config.range;let i=t.range;if(i.signal)return e.signalRef(i.signal);if(xt(i)){if(r&<(r,i))return aR(t=at({},t,{range:r[i]}),e,n);"width"===i?i=[0,{signal:"width"}]:"height"===i?i=fp(t.type)?[0,{signal:"height"}]:[{signal:"height"},0]:s("Unrecognized scale range value: "+Ct(i))}else{if(i.scheme)return n.scheme=A(i.scheme)?JO(i.scheme,e):XO(i.scheme,e),i.extent&&(n.schemeExtent=JO(i.extent,e)),void(i.count&&(n.schemeCount=XO(i.count,e)));if(i.step)return void(n.rangeStep=XO(i.step,e));if(fp(t.type)&&!A(i))return QO(i,t,e);A(i)||s("Unsupported range type: "+Ct(i))}return i.map((t=>(A(t)?JO:XO)(t,e)))}function sR(t,e,n){return A(t)?t.map((t=>sR(t,e,n))):M(t)?t.signal?n.signalRef(t.signal):"fit"===e?t:s("Unsupported parameter object: "+Ct(t)):t}const uR="top",lR="left",cR="right",fR="bottom",hR="center",dR="vertical",pR="start",gR="end",mR="index",yR="label",vR="offset",_R="perc",xR="perc2",bR="value",wR="guide-label",kR="guide-title",AR="group-title",MR="group-subtitle",ER="symbol",DR="gradient",CR="discrete",FR="size",SR=[FR,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],$R={name:1,style:1,interactive:1},TR={value:0},BR={value:1},NR="group",zR="rect",OR="rule",RR="symbol",LR="text";function UR(t){return t.type=NR,t.interactive=t.interactive||!1,t}function qR(t,e){const n=(n,r)=>aO(t[n],aO(e[n],r));return n.isVertical=n=>dR===aO(t.direction,e.direction||(n?e.symbolDirection:e.gradientDirection)),n.gradientLength=()=>aO(t.gradientLength,e.gradientLength||e.gradientWidth),n.gradientThickness=()=>aO(t.gradientThickness,e.gradientThickness||e.gradientHeight),n.entryColumns=()=>aO(t.columns,aO(e.columns,+n.isVertical(!0))),n}function PR(t,e){const n=e&&(e.update&&e.update[t]||e.enter&&e.enter[t]);return n&&n.signal?n:n?n.value:null}function jR(t,e,n){return`item.anchor === '${pR}' ? ${t} : item.anchor === '${gR}' ? ${e} : ${n}`}const IR=jR(Ct(lR),Ct(cR),Ct(hR));function WR(t,e){return e?t?M(t)?Object.assign({},t,{offset:WR(t.offset,e)}):{value:t,offset:e}:e:t}function HR(t,e){return e?(t.name=e.name,t.style=e.style||t.style,t.interactive=!!e.interactive,t.encode=hz(t.encode,e,$R)):t.interactive=!1,t}function YR(t,e,n,r){const i=qR(t,n),o=i.isVertical(),a=i.gradientThickness(),s=i.gradientLength();let u,l,c,f,h;o?(l=[0,1],c=[0,0],f=a,h=s):(l=[0,0],c=[1,0],f=s,h=a);const d={enter:u={opacity:TR,x:TR,y:TR,width:lz(f),height:lz(h)},update:at({},u,{opacity:BR,fill:{gradient:e,start:l,stop:c}}),exit:{opacity:TR}};return fz(d,{stroke:i("gradientStrokeColor"),strokeWidth:i("gradientStrokeWidth")},{opacity:i("gradientOpacity")}),HR({type:zR,role:Ez,encode:d},r)}function GR(t,e,n,r,i){const o=qR(t,n),a=o.isVertical(),s=o.gradientThickness(),u=o.gradientLength();let l,c,f,h,d="";a?(l="y",f="y2",c="x",h="width",d="1-"):(l="x",f="x2",c="y",h="height");const p={opacity:TR,fill:{scale:e,field:bR}};p[l]={signal:d+"datum."+_R,mult:u},p[c]=TR,p[f]={signal:d+"datum."+xR,mult:u},p[h]=lz(s);const g={enter:p,update:at({},p,{opacity:BR}),exit:{opacity:TR}};return fz(g,{stroke:o("gradientStrokeColor"),strokeWidth:o("gradientStrokeWidth")},{opacity:o("gradientOpacity")}),HR({type:zR,role:Az,key:bR,from:i,encode:g},r)}const VR=`datum.${_R}<=0?"${lR}":datum.${_R}>=1?"${cR}":"${hR}"`,XR=`datum.${_R}<=0?"${fR}":datum.${_R}>=1?"${uR}":"middle"`;function JR(t,e,n,r){const i=qR(t,e),o=i.isVertical(),a=lz(i.gradientThickness()),s=i.gradientLength();let u,l,c,f,h=i("labelOverlap"),d="";const p={enter:u={opacity:TR},update:l={opacity:BR,text:{field:yR}},exit:{opacity:TR}};return fz(p,{fill:i("labelColor"),fillOpacity:i("labelOpacity"),font:i("labelFont"),fontSize:i("labelFontSize"),fontStyle:i("labelFontStyle"),fontWeight:i("labelFontWeight"),limit:aO(t.labelLimit,e.gradientLabelLimit)}),o?(u.align={value:"left"},u.baseline=l.baseline={signal:XR},c="y",f="x",d="1-"):(u.align=l.align={signal:VR},u.baseline={value:"top"},c="x",f="y"),u[c]=l[c]={signal:d+"datum."+_R,mult:s},u[f]=l[f]=a,a.offset=aO(t.labelOffset,e.gradientLabelOffset)||0,h=h?{separation:i("labelSeparation"),method:h,order:"datum."+mR}:void 0,HR({type:LR,role:Dz,style:wR,key:bR,from:r,encode:p,overlap:h},n)}function ZR(t,e,n,r,i){const o=qR(t,e),a=n.entries,s=!(!a||!a.interactive),u=a?a.name:void 0,l=o("clipHeight"),c=o("symbolOffset"),f={data:"value"},h=`(${i}) ? datum.${vR} : datum.${FR}`,d=l?lz(l):{field:FR},p=`datum.${mR}`,g=`max(1, ${i})`;let m,y,v,_,x;d.mult=.5,m={enter:y={opacity:TR,x:{signal:h,mult:.5,offset:c},y:d},update:v={opacity:BR,x:y.x,y:y.y},exit:{opacity:TR}};let b=null,w=null;t.fill||(b=e.symbolBaseFillColor,w=e.symbolBaseStrokeColor),fz(m,{fill:o("symbolFillColor",b),shape:o("symbolType"),size:o("symbolSize"),stroke:o("symbolStrokeColor",w),strokeDash:o("symbolDash"),strokeDashOffset:o("symbolDashOffset"),strokeWidth:o("symbolStrokeWidth")},{opacity:o("symbolOpacity")}),SR.forEach((e=>{t[e]&&(v[e]=y[e]={scale:t[e],field:bR})}));const k=HR({type:RR,role:Cz,key:bR,from:f,clip:!!l||void 0,encode:m},n.symbols),A=lz(c);A.offset=o("labelOffset"),m={enter:y={opacity:TR,x:{signal:h,offset:A},y:d},update:v={opacity:BR,text:{field:yR},x:y.x,y:y.y},exit:{opacity:TR}},fz(m,{align:o("labelAlign"),baseline:o("labelBaseline"),fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontStyle:o("labelFontStyle"),fontWeight:o("labelFontWeight"),limit:o("labelLimit")});const M=HR({type:LR,role:Dz,style:wR,key:bR,from:f,encode:m},n.labels);return m={enter:{noBound:{value:!l},width:TR,height:l?lz(l):TR,opacity:TR},exit:{opacity:TR},update:v={opacity:BR,row:{signal:null},column:{signal:null}}},o.isVertical(!0)?(_=`ceil(item.mark.items.length / ${g})`,v.row.signal=`${p}%${_}`,v.column.signal=`floor(${p} / ${_})`,x={field:["row",p]}):(v.row.signal=`floor(${p} / ${g})`,v.column.signal=`${p} % ${g}`,x={field:p}),v.column.signal=`(${i})?${v.column.signal}:${p}`,UR({role:mz,from:r={facet:{data:r,name:"value",groupby:mR}},encode:hz(m,a,$R),marks:[k,M],name:u,interactive:s,sort:x})}const QR='item.orient === "left"',KR='item.orient === "right"',tL=`(${QR} || ${KR})`,eL=`datum.vgrad && ${tL}`,nL=jR('"top"','"bottom"','"middle"'),rL=`datum.vgrad && ${KR} ? (${jR('"right"','"left"','"center"')}) : (${tL} && !(datum.vgrad && ${QR})) ? "left" : ${IR}`,iL=`item._anchor || (${tL} ? "middle" : "start")`,oL=`${eL} ? (${QR} ? -90 : 90) : 0`,aL=`${tL} ? (datum.vgrad ? (${KR} ? "bottom" : "top") : ${nL}) : "top"`;function sL(t,e){let n;return M(t)&&(t.signal?n=t.signal:t.path?n="pathShape("+uL(t.path)+")":t.sphere&&(n="geoShape("+uL(t.sphere)+', {type: "Sphere"})')),n?e.signalRef(n):!!t}function uL(t){return M(t)&&t.signal?t.signal:Ct(t)}function lL(t){const e=t.role||"";return e.startsWith("axis")||e.startsWith("legend")||e.startsWith("title")?e:t.type===NR?mz:e||pz}function cL(t){return{marktype:t.type,name:t.name||void 0,role:t.role||lL(t),zindex:+t.zindex||void 0,aria:t.aria,description:t.description}}function fL(t,e){return t&&t.signal?e.signalRef(t.signal):!1!==t}function hL(t,e){const n=Qa(t.type);n||s("Unrecognized transform type: "+Ct(t.type));const r=Vz(n.type.toLowerCase(),null,dL(n,t,e));return t.signal&&e.addSignal(t.signal,e.proxy(r)),r.metadata=n.metadata||{},r}function dL(t,e,n){const r={},i=t.params.length;for(let o=0;omL(t,e,n)))):mL(t,r,n)}(t,e,n):"projection"===r?n.projectionRef(e[t.name]):t.array&&!iO(i)?i.map((e=>gL(t,e,n))):gL(t,i,n):void(t.required&&s("Missing required "+Ct(e.type)+" parameter: "+Ct(t.name)))}function gL(t,e,n){const r=t.type;if(iO(e))return xL(r)?s("Expression references can not be signals."):bL(r)?n.fieldRef(e):wL(r)?n.compareRef(e):n.signalRef(e.signal);{const i=t.expr||bL(r);return i&&yL(e)?n.exprRef(e.expr,e.as):i&&vL(e)?Zz(e.field,e.as):xL(r)?NB(e,n):_L(r)?Jz(n.getData(e).values):bL(r)?Zz(e):wL(r)?n.compareRef(e):e}}function mL(t,e,n){const r=t.params.length;let i;for(let n=0;nt&&t.expr,vL=t=>t&&t.field,_L=t=>"data"===t,xL=t=>"expr"===t,bL=t=>"field"===t,wL=t=>"compare"===t;function kL(t,e){return t.$ref?t:t.data&&t.data.$ref?t.data:Jz(e.getData(t.data).output)}function AL(t,e,n,r,i){this.scope=t,this.input=e,this.output=n,this.values=r,this.aggregate=i,this.index={}}function ML(t){return xt(t)?t:null}function EL(t,e,n){const r=eO(n.op,n.field);let i;if(e.ops){for(let t=0,n=e.as.length;tnull==t?"null":t)).join(",")+"),0)",e);u.update=l.$expr,u.params=l.$params}function FL(t,e){const n=lL(t),r=t.type===NR,i=t.from&&t.from.facet,o=t.overlap;let a,u,l,c,f,h,d,p=t.layout||n===mz||n===gz;const g=n===pz||p||i,m=function(t,e,n){let r,i,o,a,u;return t?(r=t.facet)&&(e||s("Only group marks can be faceted."),null!=r.field?a=u=kL(r,n):(t.data?u=Jz(n.getData(t.data).aggregate):(o=hL(at({type:"aggregate",groupby:X(r.groupby)},r.aggregate),n),o.params.key=n.keyRef(r.groupby),o.params.pulse=kL(r,n),a=u=Jz(n.add(o))),i=n.keyRef(r.groupby,!0))):a=Jz(n.add(bO(null,[{}]))),a||(a=kL(t,n)),{key:i,pulse:a,parent:u}}(t.from,r,e);u=e.add(kO({key:m.key||(t.key?Zz(t.key):void 0),pulse:m.pulse,clean:!r}));const y=Jz(u);u=l=e.add(bO({pulse:y})),u=e.add($O({markdef:cL(t),interactive:fL(t.interactive,e),clip:sL(t.clip,e),context:{$context:!0},groups:e.lookup(),parent:e.signals.parent?e.signalRef("parent"):null,index:e.markpath(),pulse:Jz(u)}));const v=Jz(u);u=c=e.add(AO(qz(t.encode,t.type,n,t.style,e,{mod:!1,pulse:v}))),u.params.parent=e.encode(),t.transform&&t.transform.forEach((t=>{const n=hL(t,e),r=n.metadata;(r.generates||r.changes)&&s("Mark transforms should not generate new data."),r.nomod||(c.params.mod=!0),n.params.pulse=Jz(u),e.add(u=n)})),t.sort&&(u=e.add(IO({sort:e.compareRef(t.sort),pulse:Jz(u)})));const _=Jz(u);(i||p)&&(p=e.add(WO({layout:e.objectProperty(t.layout),legends:e.legends,mark:v,pulse:_})),h=Jz(p));const x=e.add(xO({mark:v,pulse:h||_}));d=Jz(x),r&&(g&&(a=e.operators,a.pop(),p&&a.pop()),e.pushState(_,h||d,y),i?function(t,e,n){const r=t.from.facet,i=r.name,o=kL(r,e);let a;r.name||s("Facet must have a name: "+Ct(r)),r.data||s("Facet must reference a data set: "+Ct(r)),r.field?a=e.add(OO({field:e.fieldRef(r.field),pulse:o})):r.groupby?a=e.add(EO({key:e.keyRef(r.groupby),group:Jz(e.proxy(n.parent)),pulse:o})):s("Facet must specify groupby or field: "+Ct(r));const u=e.fork(),l=u.add(bO()),c=u.add(jO({pulse:Jz(l)}));u.addData(i,new AL(u,l,l,c)),u.addSignal("parent",null),a.params.subflow={$subflow:u.parse(t).toRuntime()}}(t,e,m):g?function(t,e,n){const r=e.add(OO({pulse:n.pulse})),i=e.fork();i.add(jO()),i.addSignal("parent",null),r.params.subflow={$subflow:i.parse(t).toRuntime()}}(t,e,m):e.parse(t),e.popState(),g&&(p&&a.push(p),a.push(x))),o&&(d=function(t,e,n){const r=t.method,i=t.bound,o=t.separation,a={separation:iO(o)?n.signalRef(o.signal):o,method:iO(r)?n.signalRef(r.signal):r,pulse:e};t.order&&(a.sort=n.compareRef({field:t.order}));if(i){const t=i.tolerance;a.boundTolerance=iO(t)?n.signalRef(t.signal):+t,a.boundScale=n.scaleRef(i.scale),a.boundOrient=i.orient}return Jz(n.add(NO(a)))}(o,d,e));const b=e.add(qO({pulse:d})),w=e.add(jO({pulse:Jz(b)},void 0,e.parent()));null!=t.name&&(f=t.name,e.addData(f,new AL(e,l,b,w)),t.on&&t.on.forEach((t=>{(t.insert||t.remove||t.toggle)&&s("Marks only support modify triggers."),CL(t,e,f)})))}function SL(t,e){const n=e.config.legend,r=t.encode||{},i=qR(t,n),o=r.legend||{},a=o.name||void 0,u=o.interactive,l=o.style,c={};let f,h,d,p=0;SR.forEach((e=>t[e]?(c[e]=t[e],p=p||t[e]):0)),p||s("Missing valid scale for legend.");const g=function(t,e){let n=t.type||ER;t.type||1!==function(t){return SR.reduce(((e,n)=>e+(t[n]?1:0)),0)}(t)||!t.fill&&!t.stroke||(n=cp(e)?DR:hp(e)?CR:ER);return n!==DR?n:hp(e)?CR:DR}(t,e.scaleType(p)),m={title:null!=t.title,scales:c,type:g,vgrad:"symbol"!==g&&i.isVertical()},y=Jz(e.add(bO(null,[m]))),v=Jz(e.add(FO(h={type:g,scale:e.scaleRef(p),count:e.objectProperty(i("tickCount")),limit:e.property(i("symbolLimit")),values:e.objectProperty(t.values),minstep:e.property(t.tickMinStep),formatType:e.property(t.formatType),formatSpecifier:e.property(t.format)})));return g===DR?(d=[YR(t,p,n,r.gradient),JR(t,n,r.labels,v)],h.count=h.count||e.signalRef(`max(2,2*floor((${sO(i.gradientLength())})/100))`)):g===CR?d=[GR(t,p,n,r.gradient,v),JR(t,n,r.labels,v)]:(f=function(t,e){const n=qR(t,e);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}(t,n),d=[ZR(t,n,r,v,sO(f.columns))],h.size=function(t,e,n){const r=sO(TL("size",t,n)),i=sO(TL("strokeWidth",t,n)),o=sO(function(t,e,n){return PR("fontSize",t)||function(t,e,n){const r=e.config.style[n];return r&&r[t]}("fontSize",e,n)}(n[1].encode,e,wR));return NB(`max(ceil(sqrt(${r})+${i}),${o})`,e)}(t,e,d[0].marks)),d=[UR({role:Mz,from:y,encode:{enter:{x:{value:0},y:{value:0}}},marks:d,layout:f,interactive:u})],m.title&&d.push(function(t,e,n,r){const i=qR(t,e),o={enter:{opacity:TR},update:{opacity:BR,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:TR}};return fz(o,{orient:i("titleOrient"),_anchor:i("titleAnchor"),anchor:{signal:iL},angle:{signal:oL},align:{signal:rL},baseline:{signal:aL},text:t.title,fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),baseline:i("titleBaseline")}),HR({type:LR,role:Fz,style:kR,from:r,encode:o},n)}(t,n,r.title,y)),FL(UR({role:kz,from:y,encode:hz($L(i,t,n),o,$R),marks:d,aria:i("aria"),description:i("description"),zindex:i("zindex"),name:a,interactive:u,style:l}),e)}function $L(t,e,n){const r={enter:{},update:{}};return fz(r,{orient:t("orient"),offset:t("offset"),padding:t("padding"),titlePadding:t("titlePadding"),cornerRadius:t("cornerRadius"),fill:t("fillColor"),stroke:t("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:t("legendX"),y:t("legendY"),format:e.format,formatType:e.formatType}),r}function TL(t,e,n){return e[t]?`scale("${e[t]}",datum)`:PR(t,n[0].encode)}AL.fromEntries=function(t,e){const n=e.length,r=e[n-1],i=e[n-2];let o=e[0],a=null,s=1;for(o&&"load"===o.type&&(o=e[1]),t.add(e[0]);s{n.push(hL(t,e))})),t.on&&t.on.forEach((n=>{CL(n,e,t.name)})),e.addDataPipeline(t.name,function(t,e,n){const r=[];let i,o,a,s,u,l=null,c=!1,f=!1;t.values?iO(t.values)||oO(t.format)?(r.push(LL(e,t)),r.push(l=RL())):r.push(l=RL({$ingest:t.values,$format:t.format})):t.url?oO(t.url)||oO(t.format)?(r.push(LL(e,t)),r.push(l=RL())):r.push(l=RL({$request:t.url,$format:t.format})):t.source&&(l=i=X(t.source).map((t=>Jz(e.getData(t).output))),r.push(null));for(o=0,a=n.length;ot===fR||t===uR,qL=(t,e,n)=>iO(t)?GL(t.signal,e,n):t===lR||t===uR?e:n,PL=(t,e,n)=>iO(t)?HL(t.signal,e,n):UL(t)?e:n,jL=(t,e,n)=>iO(t)?YL(t.signal,e,n):UL(t)?n:e,IL=(t,e,n)=>iO(t)?VL(t.signal,e,n):t===uR?{value:e}:{value:n},WL=(t,e,n)=>iO(t)?XL(t.signal,e,n):t===cR?{value:e}:{value:n},HL=(t,e,n)=>JL(`${t} === '${uR}' || ${t} === '${fR}'`,e,n),YL=(t,e,n)=>JL(`${t} !== '${uR}' && ${t} !== '${fR}'`,e,n),GL=(t,e,n)=>QL(`${t} === '${lR}' || ${t} === '${uR}'`,e,n),VL=(t,e,n)=>QL(`${t} === '${uR}'`,e,n),XL=(t,e,n)=>QL(`${t} === '${cR}'`,e,n),JL=(t,e,n)=>(e=null!=e?lz(e):e,n=null!=n?lz(n):n,ZL(e)&&ZL(n)?{signal:`${t} ? (${e=e?e.signal||Ct(e.value):null}) : (${n=n?n.signal||Ct(n.value):null})`}:[at({test:t},e)].concat(n||[])),ZL=t=>null==t||1===Object.keys(t).length,QL=(t,e,n)=>({signal:`${t} ? (${tU(e)}) : (${tU(n)})`}),KL=(t,e,n,r,i)=>({signal:(null!=r?`${t} === '${lR}' ? (${tU(r)}) : `:"")+(null!=n?`${t} === '${fR}' ? (${tU(n)}) : `:"")+(null!=i?`${t} === '${cR}' ? (${tU(i)}) : `:"")+(null!=e?`${t} === '${uR}' ? (${tU(e)}) : `:"")+"(null)"}),tU=t=>iO(t)?t.signal:null==t?null:Ct(t),eU=(t,e)=>0===e?0:iO(t)?{signal:`(${t.signal}) * ${e}`}:{value:t*e},nU=(t,e)=>{const n=t.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+e.signal}:t};function rU(t,e,n,r){let i;if(e&<(e,t))return e[t];if(lt(n,t))return n[t];if(t.startsWith("title")){switch(t){case"titleColor":i="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":i=t[5].toLowerCase()+t.slice(6)}return r[kR][i]}if(t.startsWith("label")){switch(t){case"labelColor":i="fill";break;case"labelFont":case"labelFontSize":i=t[5].toLowerCase()+t.slice(6)}return r[wR][i]}return null}function iU(t){const e={};for(const n of t)if(n)for(const t in n)e[t]=1;return Object.keys(e)}function oU(t,e){return{scale:t.scale,range:e}}function aU(t,e,n,r,i){const o=qR(t,e),a=t.orient,s=t.gridScale,u=qL(a,1,-1),l=function(t,e){if(1===e);else if(M(t)){let n=t=at({},t);for(;null!=n.mult;){if(!M(n.mult))return n.mult=iO(e)?{signal:`(${n.mult}) * (${e.signal})`}:n.mult*e,t;n=n.mult=at({},n.mult)}n.mult=e}else t=iO(e)?{signal:`(${e.signal}) * (${t||0})`}:e*(t||0);return t}(t.offset,u);let c,f,h;const d={enter:c={opacity:TR},update:h={opacity:BR},exit:f={opacity:TR}};fz(d,{stroke:o("gridColor"),strokeCap:o("gridCap"),strokeDash:o("gridDash"),strokeDashOffset:o("gridDashOffset"),strokeOpacity:o("gridOpacity"),strokeWidth:o("gridWidth")});const p={scale:t.scale,field:bR,band:i.band,extra:i.extra,offset:i.offset,round:o("tickRound")},g=PL(a,{signal:"height"},{signal:"width"}),m=s?{scale:s,range:0,mult:u,offset:l}:{value:0,offset:l},y=s?{scale:s,range:1,mult:u,offset:l}:at(g,{mult:u,offset:l});return c.x=h.x=PL(a,p,m),c.y=h.y=jL(a,p,m),c.x2=h.x2=jL(a,y),c.y2=h.y2=PL(a,y),f.x=PL(a,p),f.y=jL(a,p),HR({type:OR,role:_z,key:bR,from:r,encode:d},n)}function sU(t,e,n,r,i){return{signal:'flush(range("'+t+'"), scale("'+t+'", datum.value), '+e+","+n+","+r+","+i+")"}}function uU(t,e,n,r){const i=qR(t,e),o=t.orient,a=qL(o,-1,1);let s,u;const l={enter:s={opacity:TR,anchor:lz(i("titleAnchor",null)),align:{signal:IR}},update:u=at({},s,{opacity:BR,text:lz(t.title)}),exit:{opacity:TR}},c={signal:`lerp(range("${t.scale}"), ${jR(0,1,.5)})`};return u.x=PL(o,c),u.y=jL(o,c),s.angle=PL(o,TR,eU(a,90)),s.baseline=PL(o,IL(o,fR,uR),{value:fR}),u.angle=s.angle,u.baseline=s.baseline,fz(l,{fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),angle:i("titleAngle"),baseline:i("titleBaseline")}),function(t,e,n,r){const i=(t,e)=>null!=t?(n.update[e]=nU(lz(t),n.update[e]),!1):!dz(e,r),o=i(t("titleX"),"x"),a=i(t("titleY"),"y");n.enter.auto=a===o?lz(a):PL(e,lz(a),lz(o))}(i,o,l,n),l.update.align=nU(l.update.align,s.align),l.update.angle=nU(l.update.angle,s.angle),l.update.baseline=nU(l.update.baseline,s.baseline),HR({type:LR,role:wz,style:kR,from:r,encode:l},n)}function lU(t,e){const n=function(t,e){var n,r,i,o=e.config,a=o.style,s=o.axis,u="band"===e.scaleType(t.scale)&&o.axisBand,l=t.orient;if(iO(l)){const t=iU([o.axisX,o.axisY]),e=iU([o.axisTop,o.axisBottom,o.axisLeft,o.axisRight]);for(i of(n={},t))n[i]=PL(l,rU(i,o.axisX,s,a),rU(i,o.axisY,s,a));for(i of(r={},e))r[i]=KL(l.signal,rU(i,o.axisTop,s,a),rU(i,o.axisBottom,s,a),rU(i,o.axisLeft,s,a),rU(i,o.axisRight,s,a))}else n=l===uR||l===fR?o.axisX:o.axisY,r=o["axis"+l[0].toUpperCase()+l.slice(1)];return n||r||u?at({},s,n,r,u):s}(t,e),r=t.encode||{},i=r.axis||{},o=i.name||void 0,a=i.interactive,s=i.style,u=qR(t,n),l=function(t){const e=t("tickBand");let n,r,i=t("tickOffset");return e?e.signal?(n={signal:`(${e.signal}) === 'extent' ? 1 : 0.5`},r={signal:`(${e.signal}) === 'extent'`},M(i)||(i={signal:`(${e.signal}) === 'extent' ? 0 : ${i}`})):"extent"===e?(n=1,r=!0,i=0):(n=.5,r=!1):(n=t("bandPosition"),r=t("tickExtra")),{extra:r,band:n,offset:i}}(u),c={scale:t.scale,ticks:!!u("ticks"),labels:!!u("labels"),grid:!!u("grid"),domain:!!u("domain"),title:null!=t.title},f=Jz(e.add(bO({},[c]))),h=Jz(e.add(_O({scale:e.scaleRef(t.scale),extra:e.property(l.extra),count:e.objectProperty(t.tickCount),values:e.objectProperty(t.values),minstep:e.property(t.tickMinStep),formatType:e.property(t.formatType),formatSpecifier:e.property(t.format)}))),d=[];let p;return c.grid&&d.push(aU(t,n,r.grid,h,l)),c.ticks&&(p=u("tickSize"),d.push(function(t,e,n,r,i,o){const a=qR(t,e),s=t.orient,u=qL(s,-1,1);let l,c,f;const h={enter:l={opacity:TR},update:f={opacity:BR},exit:c={opacity:TR}};fz(h,{stroke:a("tickColor"),strokeCap:a("tickCap"),strokeDash:a("tickDash"),strokeDashOffset:a("tickDashOffset"),strokeOpacity:a("tickOpacity"),strokeWidth:a("tickWidth")});const d=lz(i);d.mult=u;const p={scale:t.scale,field:bR,band:o.band,extra:o.extra,offset:o.offset,round:a("tickRound")};return f.y=l.y=PL(s,TR,p),f.y2=l.y2=PL(s,d),c.x=PL(s,p),f.x=l.x=jL(s,TR,p),f.x2=l.x2=jL(s,d),c.y=jL(s,p),HR({type:OR,role:bz,key:bR,from:r,encode:h},n)}(t,n,r.ticks,h,p,l))),c.labels&&(p=c.ticks?p:0,d.push(function(t,e,n,r,i,o){const a=qR(t,e),s=t.orient,u=t.scale,l=qL(s,-1,1),c=sO(a("labelFlush")),f=sO(a("labelFlushOffset")),h=a("labelAlign"),d=a("labelBaseline");let p,g=0===c||!!c;const m=lz(i);m.mult=l,m.offset=lz(a("labelPadding")||0),m.offset.mult=l;const y={scale:u,field:bR,band:.5,offset:WR(o.offset,a("labelOffset"))},v=PL(s,g?sU(u,c,'"left"','"right"','"center"'):{value:"center"},WL(s,"left","right")),_=PL(s,IL(s,"bottom","top"),g?sU(u,c,'"top"','"bottom"','"middle"'):{value:"middle"}),x=sU(u,c,`-(${f})`,f,0);g=g&&f;const b={opacity:TR,x:PL(s,y,m),y:jL(s,y,m)},w={enter:b,update:p={opacity:BR,text:{field:yR},x:b.x,y:b.y,align:v,baseline:_},exit:{opacity:TR,x:b.x,y:b.y}};fz(w,{dx:!h&&g?PL(s,x):null,dy:!d&&g?jL(s,x):null}),fz(w,{angle:a("labelAngle"),fill:a("labelColor"),fillOpacity:a("labelOpacity"),font:a("labelFont"),fontSize:a("labelFontSize"),fontWeight:a("labelFontWeight"),fontStyle:a("labelFontStyle"),limit:a("labelLimit"),lineHeight:a("labelLineHeight")},{align:h,baseline:d});const k=a("labelBound");let A=a("labelOverlap");return A=A||k?{separation:a("labelSeparation"),method:A,order:"datum.index",bound:k?{scale:u,orient:s,tolerance:k}:null}:void 0,p.align!==v&&(p.align=nU(p.align,v)),p.baseline!==_&&(p.baseline=nU(p.baseline,_)),HR({type:LR,role:xz,style:wR,key:bR,from:r,encode:w,overlap:A},n)}(t,n,r.labels,h,p,l))),c.domain&&d.push(function(t,e,n,r){const i=qR(t,e),o=t.orient;let a,s;const u={enter:a={opacity:TR},update:s={opacity:BR},exit:{opacity:TR}};fz(u,{stroke:i("domainColor"),strokeCap:i("domainCap"),strokeDash:i("domainDash"),strokeDashOffset:i("domainDashOffset"),strokeWidth:i("domainWidth"),strokeOpacity:i("domainOpacity")});const l=oU(t,0),c=oU(t,1);return a.x=s.x=PL(o,l,TR),a.x2=s.x2=PL(o,c),a.y=s.y=jL(o,l,TR),a.y2=s.y2=jL(o,c),HR({type:OR,role:vz,from:r,encode:u},n)}(t,n,r.domain,f)),c.title&&d.push(uU(t,n,r.title,f)),FL(UR({role:yz,from:f,encode:hz(cU(u,t),i,$R),marks:d,aria:u("aria"),description:u("description"),zindex:u("zindex"),name:o,interactive:a,style:s}),e)}function cU(t,e){const n={enter:{},update:{}};return fz(n,{orient:t("orient"),offset:t("offset")||0,position:aO(e.position,0),titlePadding:t("titlePadding"),minExtent:t("minExtent"),maxExtent:t("maxExtent"),range:{signal:`abs(span(range("${e.scale}")))`},translate:t("translate"),format:e.format,formatType:e.formatType}),n}function fU(t,e,n){const r=X(t.signals),i=X(t.scales);return n||r.forEach((t=>Yz(t,e))),X(t.projections).forEach((t=>function(t,e){const n=e.config.projection||{},r={};for(const n in t)"name"!==n&&(r[n]=sR(t[n],n,e));for(const t in n)null==r[t]&&(r[t]=sR(n[t],t,e));e.addProjection(t.name,r)}(t,e))),i.forEach((t=>function(t,e){const n=t.type||"linear";up(n)||s("Unrecognized scale type: "+Ct(n)),e.addScale(t.name,{type:n,domain:void 0})}(t,e))),X(t.data).forEach((t=>OL(t,e))),i.forEach((t=>VO(t,e))),(n||r).forEach((t=>function(t,e){const n=e.getSignal(t.name);let r=t.update;t.init&&(r?s("Signals can not include both init and update expressions."):(r=t.init,n.initonly=!0)),r&&(r=NB(r,e),n.update=r.$expr,n.params=r.$params),t.on&&t.on.forEach((t=>gO(t,e,n.id)))}(t,e))),X(t.axes).forEach((t=>lU(t,e))),X(t.marks).forEach((t=>FL(t,e))),X(t.legends).forEach((t=>SL(t,e))),t.title&&NL(t.title,e),e.parseLambdas(),e}const hU=t=>hz({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},t);function dU(t,e){const n=e.config,r=Jz(e.root=e.add(Xz())),i=function(t,e){const n=n=>aO(t[n],e[n]),r=[pU("background",n("background")),pU("autosize",oz(n("autosize"))),pU("padding",uz(n("padding"))),pU("width",n("width")||0),pU("height",n("height")||0)],i=r.reduce(((t,e)=>(t[e.name]=e,t)),{}),o={};return X(t.signals).forEach((t=>{lt(i,t.name)?t=at(i[t.name],t):r.push(t),o[t.name]=t})),X(e.signals).forEach((t=>{lt(o,t.name)||lt(i,t.name)||r.push(t)})),r}(t,n);i.forEach((t=>Yz(t,e))),e.description=t.description||n.description,e.eventConfig=n.events,e.legends=e.objectProperty(n.legend&&n.legend.layout),e.locale=n.locale;const o=e.add(bO()),a=e.add(AO(qz(hU(t.encode),NR,gz,t.style,e,{pulse:Jz(o)}))),s=e.add(WO({layout:e.objectProperty(t.layout),legends:e.legends,autosize:e.signalRef("autosize"),mark:r,pulse:Jz(a)}));e.operators.pop(),e.pushState(Jz(a),Jz(s),null),fU(t,e,i),e.operators.push(s);let u=e.add(xO({mark:r,pulse:Jz(s)}));return u=e.add(qO({pulse:Jz(u)})),u=e.add(jO({pulse:Jz(u)})),e.addData("root",new AL(e,o,o,u)),e}function pU(t,e){return e&&e.signal?{name:t,update:e.signal}:{name:t,value:e}}function gU(t,e){this.config=t||{},this.options=e||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function mU(t){this.config=t.config,this.options=t.options,this.legends=t.legends,this.field=Object.create(t.field),this.signals=Object.create(t.signals),this.lambdas=Object.create(t.lambdas),this.scales=Object.create(t.scales),this.events=Object.create(t.events),this.data=Object.create(t.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++t._nextsub[0],this._nextsub=t._nextsub,this._parent=t._parent.slice(),this._encode=t._encode.slice(),this._lookup=t._lookup.slice(),this._markpath=t._markpath}function yU(t){return(A(t)?vU:_U)(t)}function vU(t){const e=t.length;let n="[";for(let r=0;r0?",":"")+(M(e)?e.signal||yU(e):Ct(e))}return n+"]"}function _U(t){let e,n,r="{",i=0;for(e in t)n=t[e],r+=(++i>1?",":"")+Ct(e)+":"+(M(n)?n.signal||yU(n):Ct(n));return r+"}"}gU.prototype=mU.prototype={parse(t){return fU(t,this)},fork(){return new mU(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(t){return this.operators.push(t),t.id=this.id(),t.refs&&(t.refs.forEach((e=>{e.$ref=t.id})),t.refs=null),t},proxy(t){const e=t instanceof Gz?Jz(t):t;return this.add(LO({value:e}))},addStream(t){return this.streams.push(t),t.id=this.id(),t},addUpdate(t){return this.updates.push(t),t},finish(){let t,e;for(t in this.root&&(this.root.root=!0),this.signals)this.signals[t].signal=t;for(t in this.scales)this.scales[t].scale=t;function n(t,e,n){let r,i;t&&(r=t.data||(t.data={}),i=r[e]||(r[e]=[]),i.push(n))}for(t in this.data){e=this.data[t],n(e.input,t,"input"),n(e.output,t,"output"),n(e.values,t,"values");for(const r in e.index)n(e.index[r],t,"index:"+r)}return this},pushState(t,e,n){this._encode.push(Jz(this.add(jO({pulse:t})))),this._parent.push(e),this._lookup.push(n?Jz(this.proxy(n)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return S(this._parent)},encode(){return S(this._encode)},lookup(){return S(this._lookup)},markpath(){const t=this._markpath;return++t[t.length-1]},fieldRef(t,e){if(xt(t))return Zz(t,e);t.signal||s("Unsupported field reference: "+Ct(t));const n=t.signal;let r=this.field[n];if(!r){const t={name:this.signalRef(n)};e&&(t.as=e),this.field[n]=r=Jz(this.add(DO(t)))}return r},compareRef(t){let e=!1;const n=t=>iO(t)?(e=!0,this.signalRef(t.signal)):function(t){return t&&t.expr}(t)?(e=!0,this.exprRef(t.expr)):t,r=X(t.field).map(n),i=X(t.order).map(n);return e?Jz(this.add(wO({fields:r,orders:i}))):Kz(r,i)},keyRef(t,e){let n=!1;const r=this.signals;return t=X(t).map((t=>iO(t)?(n=!0,Jz(r[t.signal])):t)),n?Jz(this.add(CO({fields:t,flat:e}))):function(t,e){const n={$key:t};return e&&(n.$flat=!0),n}(t,e)},sortRef(t){if(!t)return t;const e=eO(t.op,t.field),n=t.order||"ascending";return n.signal?Jz(this.add(wO({fields:e,orders:this.signalRef(n.signal)}))):Kz(e,n)},event(t,e){const n=t+":"+e;if(!this.events[n]){const r=this.id();this.streams.push({id:r,source:t,type:e}),this.events[n]=r}return this.events[n]},hasOwnSignal(t){return lt(this.signals,t)},addSignal(t,e){this.hasOwnSignal(t)&&s("Duplicate signal name: "+Ct(t));const n=e instanceof Gz?e:this.add(Xz(e));return this.signals[t]=n},getSignal(t){return this.signals[t]||s("Unrecognized signal name: "+Ct(t)),this.signals[t]},signalRef(t){return this.signals[t]?Jz(this.signals[t]):(lt(this.lambdas,t)||(this.lambdas[t]=this.add(Xz(null))),Jz(this.lambdas[t]))},parseLambdas(){const t=Object.keys(this.lambdas);for(let e=0,n=t.length;er+Math.floor(o*t.random()),pdf:t=>t===Math.floor(t)&&t>=r&&t=i?1:(e-r+1)/o},icdf:t=>t>=0&&t<=1?r-1+Math.floor(t*o):NaN};return a.min(e).max(n)},t.randomKDE=gs,t.randomLCG=function(t){return function(){return(t=(1103515245*t+12345)%2147483647)/2147483647}},t.randomLogNormal=xs,t.randomMixture=bs,t.randomNormal=ps,t.randomUniform=Es,t.read=ca,t.regressionConstant=Ds,t.regressionExp=Ns,t.regressionLinear=Ts,t.regressionLoess=Us,t.regressionLog=Bs,t.regressionPoly=Rs,t.regressionPow=zs,t.regressionQuad=Os,t.renderModule=B_,t.repeat=Mt,t.resetDefaultLocale=function(){return Co(),Bo(),Lo()},t.resetSVGClipId=Gg,t.resetSVGDefIds=function(){Gg(),Vp=0},t.responseType=la,t.runtimeContext=IB,t.sampleCurve=Is,t.sampleLogNormal=ms,t.sampleNormal=cs,t.sampleUniform=ws,t.scale=sp,t.sceneEqual=P_,t.sceneFromJSON=Qy,t.scenePickVisit=Pm,t.sceneToJSON=Zy,t.sceneVisit=qm,t.sceneZOrder=Um,t.scheme=Mp,t.serializeXML=i_,t.setHybridRendererOptions=function(t){M_.svgMarkTypes=t.svgMarkTypes??["text"],M_.svgOnTop=t.svgOnTop??!0,M_.debug=t.debug??!1},t.setRandom=function(e){t.random=e},t.span=Dt,t.splitAccessPath=u,t.stringValue=Ct,t.textMetrics=Ey,t.timeBin=Jr,t.timeFloor=wr,t.timeFormatLocale=zo,t.timeInterval=Cr,t.timeOffset=$r,t.timeSequence=Nr,t.timeUnitSpecifier=rr,t.timeUnits=er,t.toBoolean=Ft,t.toDate=$t,t.toNumber=$,t.toSet=Bt,t.toString=Tt,t.transform=Ka,t.transforms=Za,t.truncate=Nt,t.truthy=p,t.tupleid=ya,t.typeParsers=Zo,t.utcFloor=Mr,t.utcInterval=Fr,t.utcOffset=Tr,t.utcSequence=zr,t.utcdayofyear=hr,t.utcquarter=V,t.utcweek=dr,t.version="5.33.1",t.visitArray=zt,t.week=sr,t.writeConfig=C,t.zero=h,t.zoomLinear=I,t.zoomLog=W,t.zoomPow=H,t.zoomSymlog=Y})); -//# sourceMappingURL=vega.min.js.map diff --git a/assets/wallclock-strip-2026-w37.en.png b/assets/wallclock-strip-2026-w37.en.png deleted file mode 100644 index 56af5e5..0000000 Binary files a/assets/wallclock-strip-2026-w37.en.png and /dev/null differ diff --git a/assets/wallclock-strip-2026-w37.png b/assets/wallclock-strip-2026-w37.png deleted file mode 100644 index b2340c8..0000000 Binary files a/assets/wallclock-strip-2026-w37.png and /dev/null differ diff --git a/astro.config.mjs b/astro.config.mjs deleted file mode 100644 index d07dc33..0000000 --- a/astro.config.mjs +++ /dev/null @@ -1,21 +0,0 @@ -import { defineConfig } from 'astro/config'; -import sitemap from '@astrojs/sitemap'; - -export default defineConfig({ - site: 'https://askclaw.dev', - base: process.env.SITE_BASE || '/', - trailingSlash: 'always', - output: 'static', - integrations: [ - sitemap({ - i18n: { - defaultLocale: 'zh-CN', - locales: { - 'zh-CN': 'zh-CN', - en: 'en', - }, - }, - namespaces: { xhtml: true }, - }), - ], -}); diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..3898da3 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,9 @@ +# AskClaw Docs + +## Architecture + +- [Multi-agent shared learning memory](architecture/multi-agent-shared-learning-memory.md) + +## Research + +- [Knowledge base source analysis](research/knowledge-base-source-analysis.md) diff --git a/docs/architecture/multi-agent-shared-learning-memory.md b/docs/architecture/multi-agent-shared-learning-memory.md new file mode 100644 index 0000000..2b72655 --- /dev/null +++ b/docs/architecture/multi-agent-shared-learning-memory.md @@ -0,0 +1,309 @@ +# Multi-agent Shared Learning Memory + +## Decision + +Multiple agents should not rely on private agent memory to share a learner's progress. + +Use three separate layers: + +```text +Skills = shared behavior / procedure +Knowledge DB = shared user progress and learning state +Agent memory = small preference cache only +``` + +For English Coach, the learner's journey belongs to the learner, not to Agent A, Agent B, or one Hermes profile. + +## Problem + +If many agents install `BlueBirdBack/english-coach`, they need to answer two different questions: + +1. **Skill freshness** — do I have the latest teaching procedure? +2. **Learner continuity** — what has this learner already seen, missed, reviewed, or mastered? + +Those are different systems. + +A skill update should change how agents teach. +A learning-memory update should change what the learner sees next. + +## Target architecture + +```mermaid +flowchart LR + subgraph Agents + A[Agent A] + B[Agent B] + C[Agent C] + end + + SkillRepo[GitHub skill repo
BlueBirdBack/english-coach] + Registry[Skill registry / updater] + API[English Coach KB API] + DB[(Learning KB
events + reviews + search)] + Extension[Chrome extension] + User[User] + + SkillRepo --> Registry + Registry --> A + Registry --> B + Registry --> C + + A <--> API + B <--> API + C <--> API + Extension <--> API + API <--> DB + User <--> Extension + User <--> A + User <--> B + User <--> C +``` + +## Skill update model + +`english-coach/SKILL.md` is the canonical teaching behavior. + +Each installed agent should track: + +```text +skill_name: english-coach +source_repo: BlueBirdBack/english-coach +installed_version: 0.x.y +installed_commit: +last_checked_at: +``` + +Update paths: + +```text +Manual: hermes skills check && hermes skills update +Cron: scheduled update check per profile/host +Webhook: GitHub release/push event → notify/update agents +``` + +Important rule: + +```text +Running sessions do not assume live skill reload. +Skill updates take effect on new session, /reset, or gateway restart. +``` + +## Learning-memory model + +Every teaching interaction appends events to a shared KB. + +Example event: + +```json +{ + "learner_id": "telegram:", + "agent_id": "ash-23", + "skill": "english-coach", + "skill_version": "0.3.1", + "event_type": "term_seen", + "term": "plausible", + "context": "The story sounds plausible.", + "source": "telegram", + "timestamp": "2026-04-28T12:00:00+08:00" +} +``` + +Agent A may teach `plausible`. +Agent B may teach `resilience`. +Both write to the same learner record, so the next agent can see both. + +## Minimal database shape + +```text +learners + id + display_name + native_language + target_language + level_estimate + preferences + +terms + id + normalized_term + language + cefr + ipa + meaning + +encounters + id + learner_id + term_id + agent_id + skill_version + source + context + created_at + +corrections + id + learner_id + original_text + corrected_text + issue_tags + explanation + created_at + +review_cards + id + learner_id + term_id + state + due_at + stability + difficulty + seen_count + mistake_count + +review_events + id + learner_id + card_id + rating + response + reviewed_at + +agent_runs + id + agent_id + learner_id + skill_name + skill_version + input_ref + output_ref + created_at + +skill_versions + skill_name + version + git_sha + released_at +``` + +## Retrieval before answering + +Before an English Coach agent answers, it should load a compact learner context: + +```text +learner level +known terms +weak terms +due reviews +recent corrections +repeated mistake patterns +preferred examples/style +``` + +Then it can answer with continuity without bloating the LLM context. + +## Chrome extension role + +The Chrome extension should be a UI/client, not the source of truth. + +```text +Hermes agents ──read/write──> English Coach KB/API <──read/write── Chrome extension +``` + +Useful extension features: + +- Select text on any webpage → explain, save, or practice. +- Sidebar search across saved terms, corrections, examples, and reviews. +- “Seen before?” indicator for words on the current page. +- Review-due list. +- Page-context capture: URL, title, sentence, timestamp. +- One-click ask: send selected text to English Coach with learner context. + +## Search model + +Use both exact and semantic search: + +```text +Full-text search: + terms, contexts, corrections, source titles + +Vector search: + similar examples, repeated mistake patterns, related phrases + +Filters: + due today, weak terms, B2+, from current site, corrected before +``` + +## Spaced repetition + +Review scheduling should be centralized. + +Good enough MVP: + +```text +SM-2-style scheduler +``` + +Better later: + +```text +FSRS-style scheduler +``` + +Agents should not each maintain their own repetition queue. They should ask the KB: + +```text +What is due for this learner now? +What weak terms should appear naturally in today's examples? +What mistakes should I watch for? +``` + +## Privacy and permissions + +Learning memory can contain personal writing, browsing context, and mistakes. Treat it as sensitive. + +Rules: + +- Store learner data per user, not globally. +- Keep raw private text out of public logs. +- Let the user delete terms, events, or all history. +- Avoid sending sensitive/private text to external TTS or image tools by default. +- Record which agent wrote each event. +- Record which skill version produced each explanation or correction. + +## MVP + +Build the smallest useful version: + +1. Shared KB API with SQLite/Postgres. +2. Event append endpoint. +3. Learner context endpoint. +4. Search endpoint. +5. Review-due endpoint. +6. Chrome side panel for search + save selected text. +7. Hermes English Coach wrapper that reads/writes the KB. + +Demo line: + +```text +Multiple English Coach agents, one learner memory. +``` + +## AskClaw relevance + +This is not just an English-learning feature. + +It is the same architecture AskClaw needs for one-person-company work: + +```text +many agents +one human +shared project memory +shared progress +auditable events +small useful interfaces +``` + +English Coach is a clean demo domain because progress is visible: words seen, mistakes fixed, reviews due, and improvement over time. + +See also: [Knowledge base source analysis](../research/knowledge-base-source-analysis.md). diff --git a/docs/research/knowledge-base-source-analysis.md b/docs/research/knowledge-base-source-analysis.md new file mode 100644 index 0000000..530c077 --- /dev/null +++ b/docs/research/knowledge-base-source-analysis.md @@ -0,0 +1,547 @@ +# Knowledge Base Source Analysis + +Last updated: 2026-04-28 + +This note tracks GitHub repos, X posts, and tools that may help design AskClaw / English Coach shared knowledge memory. + +## Evaluation lens + +We compare each source against the English Coach shared-KB goal: + +```text +many agents +one learner +shared progress +searchable memory +review scheduling +auditable updates +small browser UI +``` + +Key questions: + +1. Does it compound knowledge over time, or only retrieve chunks at query time? +2. Does it support multiple agents safely writing to the same knowledge base? +3. Does it separate raw sources, synthesized knowledge, and per-user progress? +4. Does it expose search/query APIs suitable for a Chrome extension? +5. Does it track provenance, versioning, and update history? +6. Can it support spaced repetition or learner-state updates? + +--- + +## 1. Karpathy — LLM Knowledge Bases / LLM Wiki + +Source: + +- X post: +- Gist: + +### Core idea + +Karpathy's pattern is not classic RAG. + +Classic RAG: + +```text +raw docs -> chunk/retrieve at query time -> answer +``` + +LLM Wiki: + +```text +raw sources -> LLM compiles persistent markdown wiki -> future queries read compiled knowledge +``` + +The important shift is **compiled, persistent, maintained knowledge**. The agent does not rediscover the same facts on every query. It updates entity pages, concept pages, comparisons, indexes, logs, and contradiction notes as new sources arrive. + +### Architecture + +Karpathy's three layers: + +```text +raw sources = immutable source truth +wiki = LLM-owned markdown synthesis +schema = rules/instructions for maintaining the wiki +``` + +Operations: + +- **Ingest** — add source to raw collection, summarize, update relevant wiki pages, update index/log. +- **Query** — read index + relevant pages, synthesize answer, optionally file the answer back into the wiki. +- **Lint** — find contradictions, stale claims, orphan pages, missing links, missing pages, and data gaps. + +Suggested UI/tools: + +- Obsidian as frontend/IDE. +- Obsidian Web Clipper for article-to-markdown capture. +- Local images under `raw/assets/`. +- Git for version history. +- Optional local search such as `qmd` for hybrid BM25/vector search. + +### Strengths for AskClaw / English Coach + +- Strong mental model: **knowledge should compile and accumulate**, not disappear into chat history. +- Markdown makes the KB inspectable by humans and agents. +- `index.md` and `log.md` give agents a cheap orientation layer. +- Linting maps well to agent maintenance tasks. +- Great for concept knowledge: grammar explanations, learner mistake taxonomies, article/book notes, source-derived vocabulary, phrase examples. + +### Gaps for English Coach + +Karpathy's pattern is source/wiki-first, not learner-state-first. + +It does not directly solve: + +- per-learner review scheduling +- term exposure counts +- mistake counts +- due dates +- multi-agent write conflicts +- transactional event append +- Chrome extension API/search UX +- permissions and privacy per learner + +For English Coach, use LLM Wiki as the **compiled knowledge layer**, not as the only storage layer. + +Recommended adaptation: + +```text +DB event log = source of truth for learner progress +Markdown wiki = compiled, human-readable knowledge synthesis +Search index/API = query layer for agents + Chrome extension +``` + +--- + +## 2. NousResearch/hermes-agent — bundled `llm-wiki` skill + +Source: + +- Repo: +- Local clone inspected: `/home/computebox/work/kb-source-analysis/hermes-agent` +- Commit inspected: `e0e67a99` +- Key file: `skills/research/llm-wiki/SKILL.md` + +### What it implements + +Hermes implements Karpathy's idea as a **skill**, not as a standalone KB backend. + +The skill file is a 506-line procedural spec that tells Hermes agents how to: + +- initialize a wiki +- orient before touching an existing wiki +- ingest raw sources +- update entity/concept/comparison/query pages +- maintain `SCHEMA.md`, `index.md`, and `log.md` +- run lint/health checks +- integrate with Obsidian and `obsidian-headless` + +Default wiki path: + +```bash +WIKI="${WIKI_PATH:-$HOME/wiki}" +``` + +Recommended wiki shape: + +```text +wiki/ +├── SCHEMA.md +├── index.md +├── log.md +├── raw/ +│ ├── articles/ +│ ├── papers/ +│ ├── transcripts/ +│ └── assets/ +├── entities/ +├── concepts/ +├── comparisons/ +└── queries/ +``` + +### Important implementation details found in code + +Hermes skills become slash commands through `agent/skill_commands.py`: + +- `scan_skill_commands()` scans installed `SKILL.md` files. +- Skill names are normalized into slash commands. +- `llm-wiki` becomes `/llm-wiki`. +- Telegram-style underscore commands also resolve: `/llm_wiki` resolves to `/llm-wiki`. + +Verified locally with a temporary Hermes home: + +```text +copied_count 81 +has_llm_wiki True +/llm-wiki registered True +llm_wiki resolves to /llm-wiki +``` + +Targeted tests run: + +```text +python3 -m pytest tests/agent/test_skill_commands.py tests/tools/test_skills_sync.py -q +80 passed in 1.51s +``` + +### Skill update machinery relevant to multi-agent installs + +Hermes has two update paths. + +#### Bundled skills + +Implemented in `tools/skills_sync.py`. + +Bundled skills are copied from the Hermes repo into `~/.hermes/skills/` and tracked by: + +```text +~/.hermes/skills/.bundled_manifest +``` + +The manifest stores skill name + origin hash. + +Update behavior: + +- New bundled skill → copied. +- User copy unchanged and bundled version changed → updated. +- User modified local copy → skipped to avoid overwriting user changes. +- User deleted skill → respected. +- Removed upstream bundled skill → manifest cleaned. + +This is useful for agent fleets because it gives a hash-based freshness check for bundled skills, but it depends on Hermes update/sync reaching every profile/host. + +#### Hub-installed skills + +Implemented in `tools/skills_hub.py`. + +Hub-installed skills are tracked in: + +```text +~/.hermes/skills/.hub/lock.json +``` + +The lock records: + +```text +source +identifier +trust_level +scan_verdict +content_hash +install_path +files +metadata +installed_at +updated_at +``` + +`hermes skills check` compares installed `content_hash` against the latest fetched bundle hash. + +`hermes skills update` reinstalls skills where `status == update_available`. + +This is closer to what `BlueBirdBack/english-coach` needs if the skill is distributed as a GitHub/hub skill. + +### Strengths for AskClaw / English Coach + +- Already encodes the right orientation discipline: read schema, index, recent log before acting. +- Explicit raw/source immutability. +- Built-in update/index/log/lint conventions. +- Strong provenance concepts: raw frontmatter, hashes, sources, confidence, contested claims. +- Obsidian-compatible by default. +- Works with normal Hermes skill loading and slash commands. + +### Limitations + +Hermes `llm-wiki` is a **behavior spec**, not a data system. + +It does not provide: + +- DB schema +- API server +- browser extension +- locking/concurrency control +- vector/BM25 search implementation +- per-user permissions +- per-learner SRS state +- event-sourced progress history + +Multiple agents can all follow the skill, but if they write the same markdown repo concurrently, `index.md` and `log.md` can race. Git helps with history, but not with transactional concurrent writes. + +### Fit for English Coach + +Use it, but only for one layer. + +Good use: + +```text +English Coach Wiki +├── raw/ # articles, transcripts, user-approved examples +├── concepts/ # grammar concepts, pronunciation issues, idioms +├── entities/ # maybe books/courses/sources, not users +├── comparisons/ # phrase/collocation comparisons +├── queries/ # useful saved explanations +├── index.md +├── log.md +└── SCHEMA.md +``` + +Not enough for: + +```text +term seen_count +mistake_count +next_due +review history +browser-page encounters +multi-agent writes +``` + +Those belong in a shared DB/API. + +--- + +## 3. MemPalace/mempalace — local-first AI memory palace + +Source: + +- Repo: +- Local clone inspected: `/home/computebox/work/kb-source-analysis/mempalace` +- Branch inspected: `develop` +- Commit inspected: `fdfaf01` +- Package version: `3.3.3` + +### What it implements + +MemPalace is closer to a real memory substrate than the LLM Wiki sources. It ships a Python package, CLI, ChromaDB-backed local store, and MCP server for agents. + +Core model: + +```text +wing = person / project / top-level domain +room = topic within a wing +closet = compact index / pointer layer +drawer = verbatim stored text chunk +tunnel = cross-wing room connection +KG = temporal entity relationship graph in SQLite +``` + +The default backend is ChromaDB, behind a pluggable backend interface. Core operations are local-first and do not require an API key. Optional LLM paths exist for richer closet generation or reranking, but the advertised core retrieval path is API-free. + +### Important implementation details found in code + +- `mempalace/backends/base.py` defines a backend abstraction; `mempalace/backends/chroma.py` implements the current ChromaDB backend. +- `mempalace/miner.py` mines project files into verbatim drawers with metadata. It respects `.gitignore`, skips generated/cache directories, chunks files, and serializes writes to the same palace with file locks. +- `mempalace/convo_miner.py` mines conversation exports into exchange-pair chunks. +- `mempalace/normalize.py` supports Claude.ai JSON, ChatGPT export, Claude Code JSONL, OpenAI Codex CLI JSONL, Gemini CLI JSONL, Slack JSON, and plain text. +- `mempalace/searcher.py` uses hybrid retrieval: vector search plus BM25 reranking, closet boosting, neighbor expansion, and a SQLite BM25 fallback when HNSW/vector state is unsafe. +- `mempalace/knowledge_graph.py` provides a local SQLite temporal KG with add/query/invalidate/timeline semantics. +- `mempalace/mcp_server.py` exposes 29 MCP tools for read/write, KG, graph navigation, drawer management, agent diaries, hooks, and reconnect. +- Write operations are recorded through a redacted write-ahead log in `~/.mempalace/wal/write_log.jsonl`. +- The docs describe a 4-layer memory stack: L0 identity, L1 essential story, L2 filtered recall, L3 deep search. + +### Verification run + +Local setup and tests were run in the clone with an isolated `.venv`. + +```text +pip install -e ".[dev]" +python -m pytest -q +1461 passed, 1 skipped, 106 deselected, 1 warning in 28.26s + +ruff check . +All checks passed! + +ruff format --check . # with CI-pinned ruff 0.4.10 +115 files already formatted +``` + +One environment note: with the default `ulimit -n` of `1024`, the first full test run hit ChromaDB/SQLite open-file exhaustion. Re-running with `ulimit -n 8192` passed. That is operationally relevant for large local-memory workloads or CI containers. + +Codebase footprint, excluding venv/cache/build dirs: + +```text +Tracked files: 280 +First-party package + tests: 113 Python files, ~24k Python code lines +Full repo includes large benchmark/result JSON files and website/docs assets +``` + +### Strengths for AskClaw / English Coach + +- Strong local-first privacy posture: useful for personal transcripts, agent diaries, and sensitive user context. +- Verbatim storage is a good antidote to summary drift; agents can cite original drawer text. +- MCP interface is immediately agent-friendly. +- Hybrid vector + BM25 search is more practical than pure vector search for logs, code, and language-learning snippets. +- Temporal KG is relevant for facts that change over time. +- Agent diary tools map well to AskClaw specialist agents such as reviewer, ops, architect, or coach. +- The wake-up stack is a useful pattern: small always-loaded context plus on-demand recall. +- Ingestion adapters for Claude/Codex/Gemini/ChatGPT/Slack are directly relevant to compiling multi-agent work history. + +### Gaps for English Coach + +MemPalace is a memory/retrieval system, not a learner-progress product. + +It does not directly provide: + +- spaced-repetition scheduling +- review cards with `next_due`, ease, lapses, and interval state +- per-learner term exposure counters +- mistake/correction lifecycle +- browser-extension API +- account/auth/permissions for multiple learners +- distributed locking across VPSes or many agent hosts +- transactional event append API for multi-agent writes + +Agent diaries are separated by agent name, which is good for specialist continuity but not enough for shared learner state. For English Coach, the learner's progress must belong to the learner, not to each agent's diary wing. + +### Fit for English Coach / AskClaw + +MemPalace is a strong candidate for the **local semantic memory and agent-history layer**, not the canonical learner-progress database. + +Good adaptation: + +```text +English Coach DB/API + = learner events, review state, permissions, idempotency + +MemPalace-like memory index + = verbatim transcripts, agent diaries, semantic recall, source-backed context + +LLM Wiki + = compiled explanations, grammar concepts, reusable notes + +Chrome extension + = search/save/review UI over the DB/API, optionally querying the memory index +``` + +For AskClaw, MemPalace is more reusable as an **operator memory vault**: mine agent sessions, PR reviews, incidents, user decisions, and research sources, then expose them to agents through MCP search. + +For English Coach, copy the ideas, not the whole data model. + +### Benchmark positioning update + +The original MemPalace benchmark set is a defensible legacy/core set, but it is no longer enough to support a broad "best memory system" claim. For a MemPalace-like text memory/retrieval system, the stronger current suite should be: + +| Priority | Benchmark | Use | +|---|---|---| +| 1 | LongMemEval-cleaned | Primary long-term chat-memory benchmark. Report raw retrieval R@5/R@10 separately from end-to-end QA. | +| 2 | ConvoMem full dataset | Best scale/statistical-power benchmark in the set: 75,336 QA pairs across user facts, assistant recall, abstention, preferences, temporal changes, and implicit connections. Do not rely only on a 250-item sample unless disclosed. | +| 3 | BEAM | Important missing production-like stress test: conversations up to 10M tokens, 100 conversations, 2,000 validated questions across broad memory abilities. | +| 4 | MemBench / ACL 2025 | Good breadth benchmark for agent memory: factual and reflective memory across participation/observation scenarios, plus effectiveness, efficiency, and capacity. Keep it, but do not frame it as the cleanest external win. | +| 5 | LoCoMo | Keep for comparability, but demote as headline evidence. It is useful and widely cited, but small and easier to distort with large retrieval windows or reranking. | + +Benchmarks worth watching for product claims: + +- **Memora** — relevant for evolving memory because it tests consolidation, updates/deletions, and obsolete-memory penalties. +- **EverMemBench** — relevant for multi-party, multi-group, cross-topic memory and user-profile understanding. +- **Mem-Gallery** — relevant only if the system claims multimodal long-term memory. + +Methodology rule: + +```text +Do not compare retrieval recall against someone else's QA accuracy. +Report: dataset split, metric, top-k, token budget, latency, and LLM/no-LLM mode. +``` + +Safer public wording: + +```text +Very strong public retrieval-recall results on major long-term conversational-memory benchmarks. +``` + +Avoid: + +```text +Best memory system. +``` + +--- + +## Comparison against English Coach shared-KB design + +| Dimension | Karpathy LLM Wiki | Hermes `llm-wiki` skill | MemPalace | English Coach shared KB need | +|---|---|---|---|---| +| Primary unit | Markdown wiki page | Markdown wiki page + agent procedure | Verbatim drawer + wing/room metadata + KG triple | Learner event + review card + compiled note | +| Source of truth | Raw files + wiki | Raw files + wiki | Local ChromaDB/SQLite palace | DB event log for progress; raw/wiki/index for knowledge | +| Human UI | Obsidian | Obsidian / editor | CLI/docs; agent-facing MCP | Chrome extension + chat + optional Obsidian | +| Agent orientation | `index.md`, `log.md`, schema | Explicit required orientation steps | `mempalace_status`, wake-up stack, taxonomy/search tools | API should return compact learner context + wiki/search results | +| Search | Index file; optional qmd | `search_files`; optional external tools | Hybrid vector + BM25 + metadata filters | Full-text + vector + filters + due-review query | +| Updates | Agent edits markdown | Agent edits markdown by skill rules | Agents/CLI add drawers, KG facts, diary entries | Agents append events transactionally; compiler updates wiki/index | +| Multi-agent safety | Not addressed | Not addressed beyond conventions | Local locks and WAL; not distributed | Needs API, locking, idempotency, audit log | +| Skill freshness | N/A | Manifest / hub lock hashes | N/A for skills; package/plugin version can be tracked | Fleet-wide `english-coach` version tracking | +| SRS | N/A | N/A | N/A | Required: SM-2/FSRS-style scheduler | +| Privacy | Depends on local files | Depends on local files | Strong local-first default | Per-learner access control and deletion/export | + +## Recommendation + +Adopt the LLM Wiki pattern as the **compiled knowledge layer**, not the whole product architecture. + +Recommended stack: + +```text +1. Event DB + - learner encounters + - corrections + - review events + - agent runs + +2. Compiled Markdown Wiki + - grammar concepts + - learner-safe summaries + - source notes + - reusable explanations + - lintable knowledge graph + +3. Search/API layer + - exact search + - semantic search + - due reviews + - learner context summary + +4. Chrome extension + - save selected text + - search memory + - ask English Coach + - show seen-before / due-review state +``` + +The key design move: + +```text +Do not make every agent remember. +Make every agent write to the same event log, +then compile useful knowledge into a wiki. +``` + +## Reusable ideas to copy + +From Karpathy/Hermes: + +- `raw/` is immutable. +- `SCHEMA.md` defines agent behavior and taxonomy. +- `index.md` is required agent orientation. +- `log.md` is append-only operational memory. +- queries worth keeping get filed back into the KB. +- health checks/linting are first-class operations. +- Obsidian compatibility is a cheap high-quality human UI. + +From MemPalace: + +- verbatim drawers instead of lossy summaries +- wing/room metadata filters for scoped recall +- hybrid vector + BM25 search +- MCP-first agent interface +- temporal KG with explicit invalidation +- agent diaries as specialist continuity streams +- wake-up stack: identity + essential story + on-demand recall + deep search +- local-first privacy posture and optional LLM enrichment + +For English Coach, add: + +- central learner DB +- event append API +- review scheduler +- Chrome extension side panel +- lock/idempotency rules for multi-agent writes +- skill version recorded on every event +- distributed sync/permissions if multiple agents or VPSes write the same learner state diff --git a/en.html b/en.html deleted file mode 100644 index a058236..0000000 --- a/en.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - -AskClaw — AMBER: sealed-in-amber replay evaluation - - - - -
-
- - -
-
- -
- -
-

AMBER — real history,
sealed in amber, replayed

-

We take real, auditable incidents and freeze them at the moment before the answer was revealed. Models must redo the work with only what was knowable then, against a rubric frozen before any output existed. The cases are never published. The scores always are.

-
-
23 cases / 26 papersprivate library, hash-sealed
-
11 result reposone per vendor × endpoint
-
Updated weeklysame library, same band, public hash index
-
-
- -
-

The board right now

-

Same band (high), same 23 cases, same public hash index. Five rank tiers; ties are labeled as ties. Click the chart for details. Glossary: case = one task (from a real incident); paper = one sitting; band = reasoning-effort level.

-
-
AMBER board: five rank tiers (2026-W38)
-
Snapshot 2026-W38 · leader swe-2-max @ Devin at 18/23 (scored in W37); five-way tie at 17/23. Interactive: hover for values. details →
⚠️ Correction 2026-09-18: the bar now labeled "swe-2-high @ Devin (re-run)" was originally published as swe-2-low — that model does not exist; the server silently routed to swe-2-high.
-
-
- -
-

Same score, different shape

-

The nine-axis completion matrix: each cell is a face's pin-level completion. Tied totals hide completely different profiles — the matrix shows what the sum can't.

-
-
Nine-axis completion matrix
-
Five lanes tied at 17/23, plus doubao 16/23 and gp27b 14/23. Hover any cell. details →
-
-
- -
-

Why the scores can be trusted

-

Every weekly issue runs like an exam: cases sealed in advance, a clean-room sitting, per-paper wire audits, anonymized publication, and a public index anyone can re-check.

-
- How a result is produced -
-
- -
-

Three counterintuitive findings

-

Each comes with named boundaries and counterexamples in the original writeups.

-
-
Effort curves
-
"Think longer ≠ score better": most families backfire at top bands; swe-2 is monotone. Hover for points. details →
-
-
-
-
Score vs thinking budget
-
Same band, same library: output-token bills span 17× while scores differ by one case. Hover for points. details →
-
-
- Per-case wall clock -
A vendor's high TPS only holds on easy problems; hard ones slow the token stream down.
-
-
-
- -
-

Result repos

-

One repo per lane (model × endpoint × band), one matrix per week, wire audits and hash cross-checks included.

- -
- -
-

The rules

-
Private side, never public: the case library, oracles, transcripts, internal case IDs and variant names.
-
Public side, always checkable: scores, aggregates, verdicts, the hash index — anyone can verify the library didn't change and the scores add up.
-
Historical outcomes are evidence, not the only correct answer; runtime sealing ≠ clean training data. Both warnings are printed on every issue.
-

Read the method: AMBER Core Specification · public hash index · roadmap

-
- -
- - - - - - - - - - diff --git a/index.html b/index.html deleted file mode 100644 index b3a0e95..0000000 --- a/index.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - -AskClaw — AMBER 琥珀式封存回放评测 - - - - -
-
- - -
-
- -
- -
-

AMBER — 琥珀式封存的
历史回放评测

-

把真实、可审计的历史事件封进琥珀,精确还原到「答案揭晓之前」,让 AI 只用当时可得的信息重做一遍。评分标准在看到任何输出之前就已冻结。题目永不公开,分数永远可查。

-
-
23 案 / 26 卷私有题库,哈希封存
-
11 个成绩仓按厂商 × 端点分仓
-
每周更新同库、同档、公开哈希索引
-
-
- -
-

当前总榜

-

同档(high)、同 23 案、同公开哈希索引。五个名次档,并列如实标注。点图看明细仓。小词典:案 = 一道题(来自一件真事);卷 = 一次作答;档 = 推理力度档位。

-
-
AMBER 当前总榜:五个名次档(2026-W38,全库 23 案)
-
2026-W38 快照 · 榜首 swe-2-max @ Devin 18/23(考于 W37,该车道本周未重考);#2 并列五席 17/23。图可交互:悬停看数值。 明细仓 →
⚠️ 2026-09-18 更正:图中「swe-2-high @ Devin (二跑)」原发布为 swe-2-low——该模型不存在,服务端静默路由至 swe-2-high。
-
-
- -
-

同分 ≠ 同款

-

九轴完成度矩阵:每格 = 该面全部案子的钉级完成度。同分的几家,形状完全不同——总分看不见的东西,矩阵看得见。

-
-
九轴完成度矩阵
-
五家 17/23 + doubao 16/23 + gp27b 14/23,九轴同场。悬停读格值。 明细仓 →
-
-
- -
-

分数凭什么可信

-

每期成绩像一场考试:出卷封存、净室应考、逐卷验脑、脱敏发布、人人可核对。

-
- 一期成绩怎么炼成 -
-
- -
-

三个反直觉发现

-

都有边界,都只代表已测家族——原文里每条都标着反例。

-
-
effort 曲线
-
「想更久 ≠ 考更好」:多数家族高档反噬,swe-2 单调到底。悬停读点值。 明细仓 →
-
-
-
-
分数 × 思考预算
-
同档同库,输出 token 账单跨 17 倍,分差不过一案。悬停读点值。 明细仓 →
-
-
- 逐题耗时 -
厂商的高 TPS 只在简单题上成立;难题想得多,吐字当场变慢。
-
-
-
- -
-

成绩仓

-

每条车道(模型 × 端点 × 档位)一个仓,每期一篇矩阵,验脑记录与哈希对照齐全。

- -
- -
-

规则

-
私有面永不公开:题库、oracle、transcript、内部案号与变体名。
-
公开面永远可查:分数、聚合、裁决、哈希索引——任何人都能核对题集没换、分数可对。
-
历史结果是证据,不是唯一正解;运行时密封 ≠ 训练数据纯净——这两条警告印在每期成绩上。
-

方法全文:AMBER Core Specification · 公开哈希索引 · 路线图

-
- -
- - - - - - - - - - diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index e29c4a7..0000000 --- a/package-lock.json +++ /dev/null @@ -1,4215 +0,0 @@ -{ - "name": "askclaw.dev-astro", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "askclaw.dev-astro", - "version": "0.1.0", - "dependencies": { - "@astrojs/sitemap": "^3.7.0", - "astro": "^7.3.3" - }, - "devDependencies": { - "playwright": "^1.55.0" - } - }, - "node_modules/@astrojs/compiler-binding": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding/-/compiler-binding-0.4.1.tgz", - "integrity": "sha512-ZYVDW1P58OXyxqZbOMp+/2U9KA7y2esIx9r4pWdpZ/l6fCZhaw4ul+D7EgpRVxYLkyTWqzANbTTUFGPFP8zDHA==", - "license": "MIT", - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "optionalDependencies": { - "@astrojs/compiler-binding-android-arm64": "0.4.1", - "@astrojs/compiler-binding-darwin-arm64": "0.4.1", - "@astrojs/compiler-binding-darwin-x64": "0.4.1", - "@astrojs/compiler-binding-linux-arm64-gnu": "0.4.1", - "@astrojs/compiler-binding-linux-arm64-musl": "0.4.1", - "@astrojs/compiler-binding-linux-x64-gnu": "0.4.1", - "@astrojs/compiler-binding-linux-x64-musl": "0.4.1", - "@astrojs/compiler-binding-wasm32-wasi": "0.4.1", - "@astrojs/compiler-binding-win32-arm64-msvc": "0.4.1", - "@astrojs/compiler-binding-win32-x64-msvc": "0.4.1" - } - }, - "node_modules/@astrojs/compiler-binding-android-arm64": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-android-arm64/-/compiler-binding-android-arm64-0.4.1.tgz", - "integrity": "sha512-Wtx2DZORuNTLASLLZ8hlrjFaJe1LUloatcCn9EPq7knBhRpjMGXeJANIJMeBZG4igvz7x+3nyAJM2iwCSW9xog==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@astrojs/compiler-binding-darwin-arm64": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-darwin-arm64/-/compiler-binding-darwin-arm64-0.4.1.tgz", - "integrity": "sha512-7iwXcU+hB60Y1SvOfnWHNioT72gDsDQKaDipXh2Onwp/TvQMozhbvhy13wJR8Af940a0h6PbddCeJFpj791UDA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@astrojs/compiler-binding-darwin-x64": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-darwin-x64/-/compiler-binding-darwin-x64-0.4.1.tgz", - "integrity": "sha512-pifjICos49RXhSVKSDu5gDB0/8j0O7DmxSp1DaWW2PyLG5ekwSkcrfOZto5JqhdI7QYMZB3XOiXpsdOXpS4npA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@astrojs/compiler-binding-linux-arm64-gnu": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-arm64-gnu/-/compiler-binding-linux-arm64-gnu-0.4.1.tgz", - "integrity": "sha512-hsZMlNWc6LqWHh9LlSwTq1/XCY7pxA5rkkKIdZRV8mgbOz9OwLvjEoe5Jry13eIZjMUQO8XnQyzk8o/Pjw2YFA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@astrojs/compiler-binding-linux-arm64-musl": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-arm64-musl/-/compiler-binding-linux-arm64-musl-0.4.1.tgz", - "integrity": "sha512-a3EW27f+Z9uf57vYmpLgUriA1y9wDhKz57PT8D8XlFZt2HZEWhUxKuxI1jvKVI9p8okYee11WXEm/FHY1G9yoQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@astrojs/compiler-binding-linux-x64-gnu": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-x64-gnu/-/compiler-binding-linux-x64-gnu-0.4.1.tgz", - "integrity": "sha512-XruPTKB/SS4DFzeAjQ1ZyM0ieHDjapHkOSnnzRApZ4FXY2YAI7UY3mETjfJiIS/acyZyrnPH5jObv1gATTdUJQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@astrojs/compiler-binding-linux-x64-musl": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-linux-x64-musl/-/compiler-binding-linux-x64-musl-0.4.1.tgz", - "integrity": "sha512-E8j7lGanqNpudtkUbsFaOLJhmwFe4Ecqux7K9hkj4wULIPNZRM2bYZNcMSj8r1oWvaUiwZl8LaaNwv3+14jqhw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@astrojs/compiler-binding-wasm32-wasi": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-wasm32-wasi/-/compiler-binding-wasm32-wasi-0.4.1.tgz", - "integrity": "sha512-vNLxIv41ZE+nmPFtw24cRW5ZXG+ZPcAGtgigtjCP8lvcxKI7u2GrXoMsCgEH5fMw8WCEJpwLvsVBg15rJKAkyA==", - "cpu": [ - "wasm32" - ], - "license": "MIT", - "optional": true, - "dependencies": { - "@napi-rs/wasm-runtime": "^1.2.4" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@astrojs/compiler-binding-win32-arm64-msvc": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-win32-arm64-msvc/-/compiler-binding-win32-arm64-msvc-0.4.1.tgz", - "integrity": "sha512-/xTDgRsFDoTh0/+KFXJ74DY4Jqn8CoSHwa8UP5RAblHfnRHkenwfSl4zYDET61O9vXKLk09UzHjjq09yP20/AQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@astrojs/compiler-binding-win32-x64-msvc": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-binding-win32-x64-msvc/-/compiler-binding-win32-x64-msvc-0.4.1.tgz", - "integrity": "sha512-0x5J6iHZO0Fjo/CVzoIbXKzWnGESftDbEUQ/oXQ61HhUAFoR7+T1jfToZSNAS+gYyBXHSTpMWYC7lzarbhClcg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@astrojs/compiler-rs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/compiler-rs/-/compiler-rs-0.4.1.tgz", - "integrity": "sha512-//NmAuRhy7eU9iP0ceI5Pymy55M+nUZ//kS6XeOyhBWdDib2KbJOyFaVJ52k7sDkJwTKVox7oPu3SpYiVnGm5A==", - "license": "MIT", - "dependencies": { - "@astrojs/compiler-binding": "0.4.1" - }, - "engines": { - "node": ">=22.12.0" - } - }, - "node_modules/@astrojs/internal-helpers": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.11.0.tgz", - "integrity": "sha512-3rzxJ+xbo0+8YyqOzLziIN32wmsHdCjEVz2sGOpRxJ+Ben/KiLph4ItxBy1abEL+E8fkRzqjg0rfXmaHJGw9JA==", - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.4", - "@types/mdast": "^4.0.4", - "js-yaml": "^4.3.0", - "picomatch": "^4.0.4", - "retext-smartypants": "^6.2.0", - "shiki": "^4.0.2", - "smol-toml": "^1.6.0", - "unified": "^11.0.5" - } - }, - "node_modules/@astrojs/markdown-satteri": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@astrojs/markdown-satteri/-/markdown-satteri-0.4.1.tgz", - "integrity": "sha512-EniHbFNa6SQHDih7JnpPos3NWXO6hdt4raBcOosfGmlfc3gP9CI/sESA3VOf1PgJZ7SFfewlZW9Livn0JugEZg==", - "license": "MIT", - "dependencies": { - "@astrojs/internal-helpers": "0.11.0", - "@astrojs/prism": "4.0.2", - "github-slugger": "^2.0.0", - "satteri": "^0.10.3" - } - }, - "node_modules/@astrojs/prism": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-4.0.2.tgz", - "integrity": "sha512-KTivpmnz6lDsC6o9H4+DNm2SrE/GHzw8cNAvEJwAvUT+eoaEnn/4NtbDNfRRaxaJHdp15gf+tfHAWiXR4wB3BA==", - "license": "MIT", - "dependencies": { - "prismjs": "^1.30.0" - }, - "engines": { - "node": ">=22.12.0" - } - }, - "node_modules/@astrojs/sitemap": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/@astrojs/sitemap/-/sitemap-3.7.4.tgz", - "integrity": "sha512-LbKNC24bdUWcQf/pThB6qLlSqHojxGjZDURIzFocY8rlWnAn2t74nnhnK6S5x0NHriHoAduLEpVjRykmeGiVvA==", - "license": "MIT", - "dependencies": { - "sitemap": "^9.0.0", - "zod": "^4.3.6" - } - }, - "node_modules/@astrojs/telemetry": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@astrojs/telemetry/-/telemetry-3.3.3.tgz", - "integrity": "sha512-C1TLn5sPJr0x4vk56piHWKbnqlEB8BKyte5Y45V02U+D7BGO5eMqZDH5aPjnkXQWJggvmsTXxH03QMZ9NgWLzQ==", - "license": "MIT", - "dependencies": { - "ci-info": "^4.4.0", - "dset": "^3.1.4", - "is-docker": "^4.0.0", - "package-manager-detector": "^1.6.0" - }, - "engines": { - "node": "18.20.8 || ^20.3.0 || >=22.0.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", - "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", - "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.29.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz", - "integrity": "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.29.8" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/types": { - "version": "7.29.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", - "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.29.7", - "@babel/helper-validator-identifier": "^7.29.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bruits/satteri-darwin-arm64": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-arm64/-/satteri-darwin-arm64-0.10.5.tgz", - "integrity": "sha512-27KTVl4TJkVahMy/ohyA7qd4938G5UNneFUz/PsScYfpIhj0IVAS23mpcJXdPF44sa6nva198lmV/cKIb2YPyA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@bruits/satteri-darwin-x64": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-x64/-/satteri-darwin-x64-0.10.5.tgz", - "integrity": "sha512-IjnLe3nKspq6qaeqGgjT7MT8VrTV74yWRlaag7ZdNsI8TDAYZ0iPxMCo+9KQZHUk5EyVB+reBI/PFWL5KuFw9Q==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@bruits/satteri-linux-arm64-gnu": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-gnu/-/satteri-linux-arm64-gnu-0.10.5.tgz", - "integrity": "sha512-glkYXZCJywjP13v67eAyAMSJdF+ncvEbYvgi/wOtffL9tQ27lr/zsyzUfgs+ovjJ9d8JNQKiXeiArJcX8PJL9w==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@bruits/satteri-linux-arm64-musl": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-musl/-/satteri-linux-arm64-musl-0.10.5.tgz", - "integrity": "sha512-yWdgG1g17Nh2QyGVlFUxGRa3FEFwiMcpZEyMNWkbM3deC94cmVc+/i9OuyFpdKuWo3GkgoCtYVOoxk1uCnCZIA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@bruits/satteri-linux-x64-gnu": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-gnu/-/satteri-linux-x64-gnu-0.10.5.tgz", - "integrity": "sha512-FVaLoPT1fBgGl0J+AYebyyXJYBachGl8Oyyrf1lye4RTqCB4S0Gwkj1uM9RJyThUOvx5VUmAT1CnNh1SFHA+kw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@bruits/satteri-linux-x64-musl": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-musl/-/satteri-linux-x64-musl-0.10.5.tgz", - "integrity": "sha512-EHpVAx2bqW3GINHTKkljtxVfQmVDGWIuwOYOP5YghTj+0PkBa2o8oKPRtQ9Kbsr1Fye8jtUcDjhwj2jMNugZKg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@bruits/satteri-wasm32-wasi": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-wasm32-wasi/-/satteri-wasm32-wasi-0.10.5.tgz", - "integrity": "sha512-ypz8c/Zmipxp4IoeDa228Gstv6TLzVmNs3yC6wKCoNSOjx1iwpgzu87Y3hTkXFdwChVGU85qeUDuOIarGUZQLw==", - "cpu": [ - "wasm32" - ], - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "1.11.1", - "@emnapi/runtime": "1.11.1", - "@napi-rs/wasm-runtime": "^1.2.3" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@bruits/satteri-wasm32-wasi/node_modules/@emnapi/core": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", - "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.2", - "tslib": "^2.4.0" - } - }, - "node_modules/@bruits/satteri-wasm32-wasi/node_modules/@emnapi/runtime": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", - "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@bruits/satteri-wasm32-wasi/node_modules/@emnapi/wasi-threads": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", - "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@bruits/satteri-win32-arm64-msvc": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-arm64-msvc/-/satteri-win32-arm64-msvc-0.10.5.tgz", - "integrity": "sha512-siTV88nb0LRqNpkL2gXboqCwVdq95sLtzMHS1/3eONV2gLbB3NAK46wmSMvCO/yquBvI2lvaFIfd8P12ecsxBw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@bruits/satteri-win32-x64-msvc": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-x64-msvc/-/satteri-win32-x64-msvc-0.10.5.tgz", - "integrity": "sha512-C3IfPvfvMXmlzBxaMPKFS1XiuV9pu2mC7YqkPk7PSvTgPZ8gbdASIpHpztDLvTTQjqZ0z1Ol8tK5X+V6XXC0wQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@capsizecss/unpack": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@capsizecss/unpack/-/unpack-4.0.1.tgz", - "integrity": "sha512-CuNiSqg7+e1cO/GjffyMOm5Tt2jUF9CWHHnvQ/UkqvtkGfHdgwEC0wpmq7fkN3gxwpRnrAN0WzO3vREKmNolMQ==", - "license": "MIT", - "dependencies": { - "fontkitten": "^1.0.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@clack/core": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.5.1.tgz", - "integrity": "sha512-iHTrHA8MtVuLl2TfZySmcKv1qO2PoyC9Z7pfSDozEuV5vtY3/wcOPKJXlqJ5Oq2Cx5DDGQGAMVx6HZfRRoVEbQ==", - "license": "MIT", - "dependencies": { - "fast-wrap-ansi": "^0.2.0", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 20.12.0" - } - }, - "node_modules/@clack/prompts": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-1.8.1.tgz", - "integrity": "sha512-dlT1m5e/0yUL0kRNcQn7yGLVThkgbB0Ga/1AmfDDC/8ik6AIiSf2QLQO2zPYvefsHP0aFgxO93cVLCCfDp7kzQ==", - "license": "MIT", - "dependencies": { - "@clack/core": "1.5.1", - "fast-string-width": "^3.0.2", - "fast-wrap-ansi": "^0.2.0", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 20.12.0" - } - }, - "node_modules/@emnapi/core": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.3.tgz", - "integrity": "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@emnapi/wasi-threads": "1.2.3", - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/runtime": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", - "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@emnapi/wasi-threads": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.3.tgz", - "integrity": "sha512-ELEBe8PsLvvJ6QMr0zLt8ffvOHW/dc1m3CEzNMg7aJUv3bMaoDtw2TXyDAwkYBuroxxuHEwhRTLJSe5sya547g==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", - "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", - "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", - "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", - "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", - "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", - "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", - "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", - "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", - "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", - "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", - "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", - "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", - "cpu": [ - "loong64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", - "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", - "cpu": [ - "mips64el" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", - "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", - "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", - "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", - "cpu": [ - "s390x" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", - "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", - "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", - "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", - "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", - "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openharmony-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", - "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", - "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", - "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", - "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", - "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@img/colour": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", - "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@img/sharp-darwin-arm64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.4.tgz", - "integrity": "sha512-Uhfl4V4lhP2nbUVF9+hyH1+luj86f1gUFeo8ALYxFoULoU+G87D43BfeMP8XHsk9boxAnCY/bf2EHwhA7MuGsA==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.3.3" - } - }, - "node_modules/@img/sharp-darwin-x64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.4.tgz", - "integrity": "sha512-hWniXY3bG5qKpkKrAwPe4y+VTPmf086YQAnkxWh7uA1YrlRouWGa0M0Mxj3ZjnXFkv7/TD1bTy9lGUK26vRvWw==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.3.3" - } - }, - "node_modules/@img/sharp-freebsd-wasm32": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.4.tgz", - "integrity": "sha512-lIsKw/BU+kjB4eZjxrYrZmwOJYi3Ajrv66iAlBmUPyKc3HpnloevB1g3wxGD9P/5BbQ1brBGl65VRRrCvQDEqA==", - "license": "Apache-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "dependencies": { - "@img/sharp-wasm32": "0.35.4" - }, - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.3.tgz", - "integrity": "sha512-suTBPTDGrI9WodccaDdwZItTSaBYASlBk1NSfElSHrUfzu3szG6lvIF58+WiFvnfzuK8ZBFS5zE00PxqxnRiPg==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.3.tgz", - "integrity": "sha512-FVJZ5mITMobmXIz/hPDTw0EintTW5H3WfrxwLqEqjiIihlu+hVRyGrFQ60xl0Lxn7Bt3zdpevPaQi0HEzqz9fw==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "darwin" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.3.tgz", - "integrity": "sha512-3rbU4vqXXc3hY/OiXdl52xZvT0F1yEngWfvqudtPJg/KkyiaQw2DRsFrNzpmLvfavbwOq3qXn36GP8obHRULQA==", - "cpu": [ - "arm" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.3.tgz", - "integrity": "sha512-0DaL0A6Xu6sQSQFwe4iVCrKWU2cCTItnRsYsCdxAMm9NF6twAA9BKnoqy4hqz4+azQ0JHuA26qiUKsf1XJ/v5A==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-ppc64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.3.tgz", - "integrity": "sha512-cdn1OvUBwsXhbC0zSzJnNzf5MZ/mTrobawDvNXBTxe8VtqKAm0sRuEY2Evzovb/w9JMk4TvRxqt1mekSuJz64w==", - "cpu": [ - "ppc64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-riscv64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.3.tgz", - "integrity": "sha512-HjPVx7yKz+0lqdhDlTw1tt90wamBoxhiXpvl1XZpJLiHH4RCJ5yDTqH+VlYPv2fwFs89JFw4c1IexYOcQUi4IQ==", - "cpu": [ - "riscv64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.3.tgz", - "integrity": "sha512-neWLh+3yCNThxnfy3c4BbVBeGgt9aftno+XbT56iK28RgeDs3UOFWviLWlUu0bArYVYJaFDK+RRohbicUNCm8Q==", - "cpu": [ - "s390x" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.3.tgz", - "integrity": "sha512-4vKmvAst9nrowcqquKFAyZJUDolUaIp8uRiN0mWFguJ1IplC9/pitXtlnnlU4aa/eJw3J7i67V+pwUL+wZGdsA==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.3.tgz", - "integrity": "sha512-Y9kQaLMuNoB0bPYOOdcZMaseNrFpPodIWWMrx+CZyydf2xn68j9WYc6sWWRrDwNkzCQjKYfc68L7jKjGlHMibw==", - "cpu": [ - "arm64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.3.tgz", - "integrity": "sha512-fj8Mv0HHfD1Rr+4I68+3agJynxDWtBFgicTbSOb9Bke6pIwzGcJ+RX/yHjmiEGFMCavY/dxvem7MyNaJF+wDiw==", - "cpu": [ - "x64" - ], - "license": "LGPL-3.0-or-later", - "optional": true, - "os": [ - "linux" - ], - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-linux-arm": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.4.tgz", - "integrity": "sha512-7OAS8gI0EReKGVN2HssHlM6umJgxF5VI3xN0p9FA91p/YO+ou5hiNghLdZ5BEHztwaaK5+bLKRf8x/o2L2nk9A==", - "cpu": [ - "arm" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.3.3" - } - }, - "node_modules/@img/sharp-linux-arm64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.4.tgz", - "integrity": "sha512-De4jpEnAU8Hd5oT0j1G3uL4ZvTuipVMn7YC6vPaJhy6/7EwEae0SVAoBrUMYQbkLGDm85taVWwuPc1a44LTzCQ==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.3.3" - } - }, - "node_modules/@img/sharp-linux-ppc64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.4.tgz", - "integrity": "sha512-2oYZJeIl4kCcMGk4ouZVjnkCtFrpQFlNEtJ6GbxzhHQchwH0NH/qEb9ykmOl29dqwMq+JhFdZn+1ak2FKhI9fQ==", - "cpu": [ - "ppc64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-ppc64": "1.3.3" - } - }, - "node_modules/@img/sharp-linux-riscv64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.4.tgz", - "integrity": "sha512-cPbNChoRURAWdebDIHSenxRpgEdy7JkPydSnUxRm9VvKD7m0/xVaR/8Fzlu81pk5nHEvHH87UZUA7cTtwnbJSA==", - "cpu": [ - "riscv64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-riscv64": "1.3.3" - } - }, - "node_modules/@img/sharp-linux-s390x": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.4.tgz", - "integrity": "sha512-RY0JFY8Fd6RonCBtHz+DvadaPkXDSI1AUn6yWL9TipqkZ1vY8w8evqdgyDFnkm4/K1ve1TvZiaePP5oSd4+WVQ==", - "cpu": [ - "s390x" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.3.3" - } - }, - "node_modules/@img/sharp-linux-x64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.4.tgz", - "integrity": "sha512-9qvvEAuk8k89TfWUoX2htWjbAMX8p+NxCppjpcg5k6xMsjhBQPTsoIh36h9Qde4WRuGpJeYnOjdosDn/cnv+OA==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.3.3" - } - }, - "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.4.tgz", - "integrity": "sha512-KB5jxpfWQTr0nc3xdHtWChdbifHrBGsd2SM62Eyxrl8afikm+f5qGBU75SJIZBT/S1MC8XyacdlXBMSWq6OURA==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.3.3" - } - }, - "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.4.tgz", - "integrity": "sha512-f+eZJZIQNEEd26RPSW+76chwOf1XtA2Y/O+5ocVyLliHkeih3e+jhLVBdNTd2rS3IbNXK8+ug93Vf5ZXtF5Lxg==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.3.3" - } - }, - "node_modules/@img/sharp-wasm32": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.4.tgz", - "integrity": "sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA==", - "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", - "optional": true, - "dependencies": { - "@emnapi/runtime": "^1.11.3" - }, - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-webcontainers-wasm32": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.4.tgz", - "integrity": "sha512-ESfNkywmCfPNyaZjxooddJQiQ+l/nTpGEOGthxiLnIHXC/CmcBixnfwUleX9mCz9ovrUUvKMap/pm8RYbzfwaA==", - "cpu": [ - "wasm32" - ], - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "@img/sharp-wasm32": "0.35.4" - }, - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-arm64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.4.tgz", - "integrity": "sha512-iNdlBX9gLVvqe2I3uIJSIKTq6wckP/DYxZtcqxm09x5Gi24DnFBmPAWZmr60ZyYMG0xlzo6goG3670ar+RXvRw==", - "cpu": [ - "arm64" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-ia32": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.4.tgz", - "integrity": "sha512-kqRsbaa5CS6KHlpxnN7WhE6vAAugXyZButpRdvDWetlv6Qv4N9WTcrWzF7tXfB9T7MsoadqdI8hmwLq6UlLvtw==", - "cpu": [ - "ia32" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@img/sharp-win32-x64": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.4.tgz", - "integrity": "sha512-XtmnYhBcrORsJ4XJngyzr/EWP0hRZLAZRFaApdKuviyqF78+ylxh2y06ZmtULAMOnObJ3ucpN0AcwSWnMowTRg==", - "cpu": [ - "x64" - ], - "license": "Apache-2.0 AND LGPL-3.0-or-later", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", - "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", - "license": "MIT" - }, - "node_modules/@napi-rs/wasm-runtime": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.4.tgz", - "integrity": "sha512-AJxoUD2/15ESHbvpcyjU274nsAPLuOtPHCk0vKJM5pj//Fg/B1FXNWjPnXTT9PymCYYiHo4zPj0ZomXBKhoy7g==", - "license": "MIT", - "optional": true, - "dependencies": { - "@tybys/wasm-util": "^0.10.3" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=23.5.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" - }, - "peerDependencies": { - "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.4", - "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.4" - } - }, - "node_modules/@oslojs/encoding": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@oslojs/encoding/-/encoding-1.1.0.tgz", - "integrity": "sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==", - "license": "MIT" - }, - "node_modules/@oxc-project/types": { - "version": "0.150.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.150.0.tgz", - "integrity": "sha512-rDS5/31E9HfPl/CIzGrn0DOlvBbXFseQ5URJ9sYMfstbKLD/c6Gm9vmRzRGDdAXyOIL4zmO37lc9RIwYqVruZw==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/oxc-project" - } - }, - "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.9.tgz", - "integrity": "sha512-tNISae1QEf/vkb3xkRcjV5SEdzPE97We5IVaa2Z8jSszQPZ8U60B/YCYpw4QI7VidYsBtKavczXf+DyDs9WGxw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.9.tgz", - "integrity": "sha512-YC8YsI30o606GTZi0VyzYlsDKFP8W61i/QzayHDkLbNEz/IShqAmTa+hsJRj13xTHA0H+6fk4b2UmGn+Q/cMlg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.9.tgz", - "integrity": "sha512-IwhlH3qK5urrY8hZiEgGkHKEFN901p/p2bjxCxJlr4GyNnF7wYpUvK+Y43uaRYuC4hpfjzbR3SJC3arX1jGvmw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.9.tgz", - "integrity": "sha512-XxpJfVzFh+jilRxIXUqcfYAYcunIc/XEzIizsOL1fcJee5Sf7H3mH8WlLmfHfluz5amqR88QQo9izKtmMlavAw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.9.tgz", - "integrity": "sha512-kSfvhmgeWyfkbT3p/1s5vSgboogoah2zkm9fX2zjg2hHxSV7T4KhMWRUUaRk4OXNqoD3QAUeRqLcs1aZOK4U1g==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.9.tgz", - "integrity": "sha512-1RVzG17pxqbTfYLC352JlLt6kKLG+6Hr30n8DlIJqsnV5luUDd2Qdx9Ayw1Cabfyb1K9k0jXEZ7evxkRoT+uiw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.9.tgz", - "integrity": "sha512-BXqPvZ2drqVD+/Z8UpKwcs4Mp7grM+eGFku4CAEKrEtcbAsUpzREphK1sogCRZGreVPiMkiiBtw0n3TPteuqvw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.9.tgz", - "integrity": "sha512-11vWvo8YDwLzukt27J3aYDWU+gg2P7J+ZOmiJ0hkF5BXZDW7pVya7r40MXDy6ya0i9KamoENSVKIugvJNgFXIA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.9.tgz", - "integrity": "sha512-a1tijMkdwsIARtc0F39ApURROkf3NwqinI6TOiSSWCTR7dT96dffNvMUtDHnq64wKNTIZOIlzKrFvvFUznJiyw==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.9.tgz", - "integrity": "sha512-x6SQNdAvv4c3hWqTMaWuawzMX9myaCs/yEmlGsxJzkdClnHW7FbrjQuSiRDhuSYzEYoEMhsaJy9qHG/XNemJPQ==", - "cpu": [ - "s390x" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.9.tgz", - "integrity": "sha512-9s0AZ8BFK5/n7B/TBoa2yJE3gI3KURrbXcPBlsAsvjU4VeJKgE90y1YtNxyEUIcHPQkg6/yfF3qihUrcM/Kf0Q==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.9.tgz", - "integrity": "sha512-P7VWAmV+WdJluH7ovnRGoiv2i8To7GAZ+kGzfGup635cyL7SyYl3lSUaA3Gp5THf0n/Co5EyEqb2zbqq+nMOHQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.9.tgz", - "integrity": "sha512-1qixtsE4BK8h+yS3BfmZ09UhA7O/N4IACva6YBr7EBvCJraByTuRcgOTaiA62Tm0vey3UcKXLOaoGHtYmNGEVg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.9.tgz", - "integrity": "sha512-ok8IQjcEPs1AKZfuEUznVBrJw+gK4soq+bx8b1X2XoMqVClarc1q5JDmVtWXY1xfr6ZuHTAsPXHTgTrqKTZeww==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.9.tgz", - "integrity": "sha512-Ip2mXoU0hM0boq3Rf+ekuT653OROSo6aSYcPT1VHE4q52KvyxgFkQgrgb/IEsxOuvQ2fZZbs8khJAyCEPM24/g==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/pluginutils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", - "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", - "license": "MIT" - }, - "node_modules/@shikijs/core": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.4.3.tgz", - "integrity": "sha512-QCR4q2ZO/ILJEuwiBMel4wdcTDb1JGwfjKTxPDF6x8ixOaluPrVqIn06C99AcRPhmYlBR56d/Fb+GN58GzExpg==", - "license": "MIT", - "dependencies": { - "@shikijs/primitive": "4.4.3", - "@shikijs/types": "4.4.3", - "@shikijs/vscode-textmate": "^10.0.2", - "@types/hast": "^3.0.5", - "hast-util-to-html": "^9.0.5" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@shikijs/engine-javascript": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.4.3.tgz", - "integrity": "sha512-FbOjFJp9VLdo1Wevs10BBtVxiTWwNLqZh5Gkhjgda/ioL15YOgeSl9n+6XMa3qRlPQzfhFNe641SrynFHYG0nQ==", - "license": "MIT", - "dependencies": { - "@shikijs/types": "4.4.3", - "@shikijs/vscode-textmate": "^10.0.2", - "oniguruma-to-es": "^4.3.6" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@shikijs/engine-oniguruma": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.4.3.tgz", - "integrity": "sha512-EcOQkxdxGQrc1Row/cC2c96/v1dbZqGnEVu1qTuT/MJmp6+cXCvQussowVmCv5Tqr3KuY3c7IbM6HTW3LJ1k9w==", - "license": "MIT", - "dependencies": { - "@shikijs/types": "4.4.3", - "@shikijs/vscode-textmate": "^10.0.2" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@shikijs/langs": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.4.3.tgz", - "integrity": "sha512-ePic0yfAJGOF83D5wBHK/00EjK65oahBYxFk5epgq33WRv7X9UuxLEV8PtR0szC0z8dl7INIpIodB99JRFlR+A==", - "license": "MIT", - "dependencies": { - "@shikijs/types": "4.4.3" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@shikijs/primitive": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/@shikijs/primitive/-/primitive-4.4.3.tgz", - "integrity": "sha512-m0wBeLDQDeIxRdUmrCPdQqfuUamDwRL5isCfYbguKD6NiaKpVbsv+3J81DyIKgNW5h4WAIIr8T4EkgQrBBxvaQ==", - "license": "MIT", - "dependencies": { - "@shikijs/types": "4.4.3", - "@shikijs/vscode-textmate": "^10.0.2", - "@types/hast": "^3.0.5" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@shikijs/themes": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-4.4.3.tgz", - "integrity": "sha512-w8UHjeUnIR965KMWJHUPXOc2mNJUnK3vpVLYLvw5IYU2mnTTJ89E24OrJDBNiJDQ0qzb0tc4l7mrIXx5cFeIyw==", - "license": "MIT", - "dependencies": { - "@shikijs/types": "4.4.3" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@shikijs/types": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-4.4.3.tgz", - "integrity": "sha512-UEJxmRR++MAGR6hugn0vgVS2W/6lWAts84FFSrnlH9sP0LNol7E5+NQ792pH8liWUhyMyjhTgSUH3k7iD7tc5g==", - "license": "MIT", - "dependencies": { - "@shikijs/vscode-textmate": "^10.0.2", - "@types/hast": "^3.0.5" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@shikijs/vscode-textmate": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", - "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", - "license": "MIT" - }, - "node_modules/@tybys/wasm-util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.4.tgz", - "integrity": "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==", - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@types/estree": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", - "license": "MIT" - }, - "node_modules/@types/estree-jsx": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.5.tgz", - "integrity": "sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==", - "license": "MIT", - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/@types/hast": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz", - "integrity": "sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/mdast": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", - "integrity": "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/nlcst": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/nlcst/-/nlcst-2.0.3.tgz", - "integrity": "sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==", - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/node": { - "version": "24.13.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.6.tgz", - "integrity": "sha512-SGrw/h3KPFshy3OE6ZL53LMBG5vGQQ8/gIpiqz/kRZhPJ7HgwCEs8LBuNtWLa8dvGZVpSF7+Bf+c11HUrCb/yg==", - "license": "MIT", - "dependencies": { - "undici-types": "~7.18.0" - } - }, - "node_modules/@types/sax": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.7.tgz", - "integrity": "sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/unist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", - "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", - "license": "MIT" - }, - "node_modules/@ungap/structured-clone": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", - "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", - "license": "ISC" - }, - "node_modules/am-i-vibing": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/am-i-vibing/-/am-i-vibing-0.4.0.tgz", - "integrity": "sha512-MxT4XZL7pzLHpuvhDKdMaQHMGGkJDLluKBLsbstn+8wv9sWcFT6h+0ve9qkml95amVTZtZV83gQe2hY+ojgHLg==", - "license": "MIT", - "dependencies": { - "process-ancestry": "^0.1.0" - }, - "bin": { - "am-i-vibing": "dist/cli.mjs" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/anymatch/node_modules/picomatch": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "license": "MIT" - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" - }, - "node_modules/aria-query": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", - "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/astro": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/astro/-/astro-7.3.3.tgz", - "integrity": "sha512-NF08hk3edFkVmr9avf9HW/rQyf6NrpbVDyYj2cVN3JfijDhfJYh1ivWVTY5PUd5+rRZn/Vtu4iaeyNlP0Iv6mg==", - "license": "MIT", - "dependencies": { - "@astrojs/compiler-rs": "^0.4.0", - "@astrojs/internal-helpers": "0.11.0", - "@astrojs/markdown-satteri": "0.4.1", - "@astrojs/telemetry": "3.3.3", - "@capsizecss/unpack": "^4.0.0", - "@clack/prompts": "^1.1.0", - "@oslojs/encoding": "^1.1.0", - "am-i-vibing": "^0.4.0", - "aria-query": "^5.3.2", - "axobject-query": "^4.1.0", - "ci-info": "^4.4.0", - "clsx": "^2.1.1", - "common-ancestor-path": "^2.0.0", - "cookie": "^2.0.1", - "devalue": "^5.8.1", - "diff": "^9.0.0", - "dset": "^3.1.4", - "es-module-lexer": "^2.0.0", - "esbuild": "^0.28.0", - "find-proc": "0.2.0", - "flattie": "^1.1.1", - "fontace": "~0.4.1", - "get-tsconfig": "5.0.0-beta.4", - "github-slugger": "^2.0.0", - "html-escaper": "3.0.3", - "http-cache-semantics": "^4.2.0", - "js-yaml": "^4.3.0", - "jsonc-parser": "^3.3.1", - "magic-string": "^1.0.0", - "magicast": "^0.5.2", - "mrmime": "^2.0.1", - "neotraverse": "^1.0.1", - "obug": "^2.1.1", - "p-limit": "^7.3.0", - "p-queue": "^9.1.0", - "package-manager-detector": "^1.6.0", - "piccolore": "^0.1.3", - "picomatch": "^4.0.4", - "shiki": "^4.0.2", - "smol-toml": "^1.6.0", - "svgo": "^4.0.2", - "tinyclip": "^0.1.12", - "tinyexec": "^1.0.4", - "tinyglobby": "^0.2.15", - "ultrahtml": "^1.6.0", - "unifont": "~0.7.5", - "unstorage": "^1.17.5", - "verkit": "^0.4.0", - "vite": "^8.0.13", - "vitefu": "^1.1.2", - "xxhash-wasm": "^1.1.0", - "yargs-parser": "^22.0.0", - "zod": "^4.5.4" - }, - "bin": { - "astro": "bin/astro.mjs" - }, - "engines": { - "node": ">=22.12.0", - "npm": ">=9.6.5", - "pnpm": ">=7.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/astrodotbuild" - }, - "optionalDependencies": { - "sharp": "^0.35.4" - }, - "peerDependencies": { - "@astrojs/markdown-remark": "^7.3.0" - }, - "peerDependenciesMeta": { - "@astrojs/markdown-remark": { - "optional": true - } - } - }, - "node_modules/axobject-query": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", - "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/bail": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", - "integrity": "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "license": "ISC" - }, - "node_modules/ccount": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", - "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/character-entities-html4": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", - "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/character-entities-legacy": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", - "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/chokidar": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", - "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", - "license": "MIT", - "dependencies": { - "readdirp": "^5.0.0" - }, - "engines": { - "node": ">= 20.19.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ci-info": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.4.0.tgz", - "integrity": "sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/comma-separated-tokens": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", - "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/commander": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", - "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", - "license": "MIT", - "engines": { - "node": ">=16" - } - }, - "node_modules/common-ancestor-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-2.0.0.tgz", - "integrity": "sha512-dnN3ibLeoRf2HNC+OlCiNc5d2zxbLJXOtiZUudNFSXZrNSydxcCsSpRzXwfu7BBWCIfHPw+xTayeBvJCP/D8Ng==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">= 18" - } - }, - "node_modules/cookie": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-2.0.1.tgz", - "integrity": "sha512-yuToqVvRrj6pfDXREyQAAv8SkAEk/8GS3jQRTiUMm66TVtBYmqQeoEjL2Lmq8Rpo6271vH76InTChTitEAm65w==", - "license": "MIT", - "engines": { - "node": ">=22" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/cookie-es": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.2.3.tgz", - "integrity": "sha512-lXVyvUvrNXblMqzIRrxHb57UUVmqsSWlxqt3XIjCkUP0wDAf6uicO6KMbEgYrMNtEvWgWHwe42CKxPu9MYAnWw==", - "license": "MIT" - }, - "node_modules/crossws": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.3.5.tgz", - "integrity": "sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==", - "license": "MIT", - "dependencies": { - "uncrypto": "^0.1.3" - } - }, - "node_modules/css-select": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-6.0.0.tgz", - "integrity": "sha512-rZZVSLle8v0+EY8QAkDWrKhpgt6SA5OtHsgBnsj6ZaLb5dmDVOWUDtQitd9ydxxvEjhewNudS6eTVU7uOyzvXw==", - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^7.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.2", - "nth-check": "^2.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-tree": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz", - "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==", - "license": "MIT", - "dependencies": { - "mdn-data": "2.27.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" - } - }, - "node_modules/css-what": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-7.0.0.tgz", - "integrity": "sha512-wD5oz5xibMOPHzy13CyGmogB3phdvcDaB5t0W/Nr5Z2O/agcB8YwOz6e2Lsp10pNDzBoDO9nVa3RGs/2BttpHQ==", - "license": "BSD-2-Clause", - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/csso": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", - "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", - "license": "MIT", - "dependencies": { - "css-tree": "~2.2.0" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/csso/node_modules/css-tree": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", - "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", - "license": "MIT", - "dependencies": { - "mdn-data": "2.0.28", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/csso/node_modules/mdn-data": { - "version": "2.0.28", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", - "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", - "license": "CC0-1.0" - }, - "node_modules/defu": { - "version": "6.1.7", - "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz", - "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==", - "license": "MIT" - }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/destr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", - "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==", - "license": "MIT" - }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/devalue": { - "version": "5.9.4", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.9.4.tgz", - "integrity": "sha512-sPAT4pztbu6586/hrhOnMKS17IJrvg12mXiSPSS3W5qDeN2RGgvZ0diZCm31dBbnevfVmujNO3IM2wrS4Y2Rhg==", - "license": "MIT" - }, - "node_modules/devlop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", - "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", - "license": "MIT", - "dependencies": { - "dequal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/diff": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-9.0.0.tgz", - "integrity": "sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "BSD-2-Clause" - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", - "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/dset": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/dset/-/dset-3.1.4.tgz", - "integrity": "sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/es-module-lexer": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", - "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", - "license": "MIT" - }, - "node_modules/esbuild": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", - "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.28.2", - "@esbuild/android-arm": "0.28.2", - "@esbuild/android-arm64": "0.28.2", - "@esbuild/android-x64": "0.28.2", - "@esbuild/darwin-arm64": "0.28.2", - "@esbuild/darwin-x64": "0.28.2", - "@esbuild/freebsd-arm64": "0.28.2", - "@esbuild/freebsd-x64": "0.28.2", - "@esbuild/linux-arm": "0.28.2", - "@esbuild/linux-arm64": "0.28.2", - "@esbuild/linux-ia32": "0.28.2", - "@esbuild/linux-loong64": "0.28.2", - "@esbuild/linux-mips64el": "0.28.2", - "@esbuild/linux-ppc64": "0.28.2", - "@esbuild/linux-riscv64": "0.28.2", - "@esbuild/linux-s390x": "0.28.2", - "@esbuild/linux-x64": "0.28.2", - "@esbuild/netbsd-arm64": "0.28.2", - "@esbuild/netbsd-x64": "0.28.2", - "@esbuild/openbsd-arm64": "0.28.2", - "@esbuild/openbsd-x64": "0.28.2", - "@esbuild/openharmony-arm64": "0.28.2", - "@esbuild/sunos-x64": "0.28.2", - "@esbuild/win32-arm64": "0.28.2", - "@esbuild/win32-ia32": "0.28.2", - "@esbuild/win32-x64": "0.28.2" - } - }, - "node_modules/eventemitter3": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", - "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", - "license": "MIT" - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "license": "MIT" - }, - "node_modules/fast-string-truncated-width": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz", - "integrity": "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==", - "license": "MIT" - }, - "node_modules/fast-string-width": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz", - "integrity": "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==", - "license": "MIT", - "dependencies": { - "fast-string-truncated-width": "^3.0.2" - } - }, - "node_modules/fast-wrap-ansi": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.2.tgz", - "integrity": "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==", - "license": "MIT", - "dependencies": { - "fast-string-width": "^3.0.2" - } - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/find-proc": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/find-proc/-/find-proc-0.2.0.tgz", - "integrity": "sha512-a6h2nTrgB3g5Wrn4au9Ux4kMk7IJtyF6oA8uGn+mk3weLZssUtc1cp6meHIzzuW2o1srrBAxzkmXLbqjRkgB6w==", - "license": "MIT", - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/flattie": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flattie/-/flattie-1.1.1.tgz", - "integrity": "sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/fontace": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/fontace/-/fontace-0.4.1.tgz", - "integrity": "sha512-lDMvbAzSnHmbYMTEld5qdtvNH2/pWpICOqpean9IgC7vUbUJc3k+k5Dokp85CegamqQpFbXf0rAVkbzpyTA8aw==", - "license": "MIT", - "dependencies": { - "fontkitten": "^1.0.2" - } - }, - "node_modules/fontkitten": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/fontkitten/-/fontkitten-1.0.3.tgz", - "integrity": "sha512-Wp1zXWPVUPBmfoa3Cqc9ctaKuzKAV6uLstRqlR56kSjplf5uAce+qeyYym7F+PHbGTk+tCEdkCW6RD7DX/gBZw==", - "license": "MIT", - "dependencies": { - "tiny-inflate": "^1.0.3" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-tsconfig": { - "version": "5.0.0-beta.4", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-5.0.0-beta.4.tgz", - "integrity": "sha512-7nF7C9fIPFEMHgEMEfgIlO9wDdZ8CyHw27rWciFZfHvHDReIiPhsYuzPRXsfvBCqFy1l8RRyyWV7QLM+ZhUJsQ==", - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "engines": { - "node": ">=20.20.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/github-slugger": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz", - "integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==", - "license": "ISC" - }, - "node_modules/h3": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.11.tgz", - "integrity": "sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg==", - "license": "MIT", - "dependencies": { - "cookie-es": "^1.2.3", - "crossws": "^0.3.5", - "defu": "^6.1.6", - "destr": "^2.0.5", - "iron-webcrypto": "^1.2.1", - "node-mock-http": "^1.0.4", - "radix3": "^1.1.2", - "ufo": "^1.6.3", - "uncrypto": "^0.1.3" - } - }, - "node_modules/hast-util-to-html": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.5.tgz", - "integrity": "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==", - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/unist": "^3.0.0", - "ccount": "^2.0.0", - "comma-separated-tokens": "^2.0.0", - "hast-util-whitespace": "^3.0.0", - "html-void-elements": "^3.0.0", - "mdast-util-to-hast": "^13.0.0", - "property-information": "^7.0.0", - "space-separated-tokens": "^2.0.0", - "stringify-entities": "^4.0.0", - "zwitch": "^2.0.4" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/hast-util-whitespace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", - "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/html-escaper": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-3.0.3.tgz", - "integrity": "sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==", - "license": "MIT" - }, - "node_modules/html-void-elements": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", - "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/http-cache-semantics": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", - "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", - "license": "BSD-2-Clause" - }, - "node_modules/iron-webcrypto": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz", - "integrity": "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/brc-dd" - } - }, - "node_modules/is-docker": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-4.0.0.tgz", - "integrity": "sha512-LHE+wROyG/Y/0ZnbktRCoTix2c1RhgWaZraMZ8o1Q7zCh0VSrICJQO5oqIIISrcSBtrXv0o233w1IYwsWCjTzA==", - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/js-yaml": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz", - "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/puzrin" - }, - { - "type": "github", - "url": "https://github.com/sponsors/nodeca" - } - ], - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsonc-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", - "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", - "license": "MIT" - }, - "node_modules/lightningcss": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", - "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.33.0", - "lightningcss-darwin-arm64": "1.33.0", - "lightningcss-darwin-x64": "1.33.0", - "lightningcss-freebsd-x64": "1.33.0", - "lightningcss-linux-arm-gnueabihf": "1.33.0", - "lightningcss-linux-arm64-gnu": "1.33.0", - "lightningcss-linux-arm64-musl": "1.33.0", - "lightningcss-linux-x64-gnu": "1.33.0", - "lightningcss-linux-x64-musl": "1.33.0", - "lightningcss-win32-arm64-msvc": "1.33.0", - "lightningcss-win32-x64-msvc": "1.33.0" - } - }, - "node_modules/lightningcss-android-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", - "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", - "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", - "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", - "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", - "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", - "cpu": [ - "arm" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", - "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", - "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", - "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", - "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", - "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", - "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lru-cache": { - "version": "11.5.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", - "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/magic-string": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.1.tgz", - "integrity": "sha512-8lyCu36ErXR0J9uaGKlKQoiLZKmtI63YGLE8G2o9jyRPdr4X47LusSOwgOJOzcVtp81fTAAjxR7BwKz682Jhow==", - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.6.0" - } - }, - "node_modules/magicast": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.5.tgz", - "integrity": "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==", - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.29.7", - "@babel/types": "^7.29.7", - "source-map-js": "^1.2.1" - } - }, - "node_modules/mdast-util-to-hast": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.1.tgz", - "integrity": "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==", - "license": "MIT", - "dependencies": { - "@types/hast": "^3.0.0", - "@types/mdast": "^4.0.0", - "@ungap/structured-clone": "^1.0.0", - "devlop": "^1.0.0", - "micromark-util-sanitize-uri": "^2.0.0", - "trim-lines": "^3.0.0", - "unist-util-position": "^5.0.0", - "unist-util-visit": "^5.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/mdn-data": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz", - "integrity": "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==", - "license": "CC0-1.0" - }, - "node_modules/micromark-util-character": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.1.1.tgz", - "integrity": "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" - } - }, - "node_modules/micromark-util-encode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", - "integrity": "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-sanitize-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.1.tgz", - "integrity": "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-character": "^2.0.0", - "micromark-util-encode": "^2.0.0", - "micromark-util-symbol": "^2.0.0" - } - }, - "node_modules/micromark-util-symbol": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.1.tgz", - "integrity": "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/micromark-util-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", - "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT" - }, - "node_modules/mrmime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", - "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/nanoid": { - "version": "3.3.19", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.19.tgz", - "integrity": "sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/neotraverse": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-1.0.1.tgz", - "integrity": "sha512-WmmLty1YWwJl9yZi77v2dVIV6X2kuYV8YYBI/G3LWGKdGHmHUvL1z7FW0iDvEvGAwNEoc5x1tOOOyDnf5jJw/w==", - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/nlcst-to-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/nlcst-to-string/-/nlcst-to-string-4.0.0.tgz", - "integrity": "sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA==", - "license": "MIT", - "dependencies": { - "@types/nlcst": "^2.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/node-fetch-native": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", - "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", - "license": "MIT" - }, - "node_modules/node-mock-http": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-mock-http/-/node-mock-http-1.0.5.tgz", - "integrity": "sha512-KQyt/wLjG3TAc7DOUhpqWzgd4ERxR80JOlTK5VE5R1S12IaPVN5qkj4klBce9HPG1Njuup4Sb5bljaT34lIyjw==", - "license": "MIT" - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/obug": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.2.1.tgz", - "integrity": "sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==", - "funding": [ - "https://github.com/sponsors/sxzz", - "https://opencollective.com/debug" - ], - "license": "MIT", - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/ofetch": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.5.1.tgz", - "integrity": "sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA==", - "license": "MIT", - "dependencies": { - "destr": "^2.0.5", - "node-fetch-native": "^1.6.7", - "ufo": "^1.6.1" - } - }, - "node_modules/ohash": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.12.tgz", - "integrity": "sha512-65S/5gk9YSsaRjcyf7Nfa6h/d3E8/1gslpXfI4W7Dxn/oap8IKRuNT5VXkLQ1YFKIEg4apRY4Pj6aiwFzrDdmw==", - "license": "MIT" - }, - "node_modules/oniguruma-parser": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.2.tgz", - "integrity": "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==", - "license": "MIT" - }, - "node_modules/oniguruma-to-es": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.6.tgz", - "integrity": "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==", - "license": "MIT", - "dependencies": { - "oniguruma-parser": "^0.12.2", - "regex": "^6.1.0", - "regex-recursion": "^6.0.2" - } - }, - "node_modules/p-limit": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-7.3.3.tgz", - "integrity": "sha512-SKgVvDU5TNIxQ4r30U75BNLC6a+6GOEjngrk/ysM5+Zu3oJuk1SC5ApzIzY/7PjCEjoVPMWJ0zho/4QUiEB7TQ==", - "license": "MIT", - "dependencies": { - "yocto-queue": "^1.2.1" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-queue": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-9.3.3.tgz", - "integrity": "sha512-NXAOdnEe5FsZJfT4oK84lE1Y5cFFdWlRuOo5tww8DyNMxyRXwn39fIkUtNLKppcPC+UYU/bXujNCUGDv01y7CA==", - "license": "MIT", - "dependencies": { - "eventemitter3": "^5.0.4", - "p-timeout": "^7.0.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-timeout": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-7.0.2.tgz", - "integrity": "sha512-prbX4Z3YszrFNgH+MW5Zoeq3baXrMtP/MQnFeET90UB/GtGcGDQ5Usg9OCy6ETjTTntOw1SL2z9fMPUppN3Guw==", - "license": "MIT", - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/package-manager-detector": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.8.0.tgz", - "integrity": "sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==", - "license": "MIT" - }, - "node_modules/piccolore": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/piccolore/-/piccolore-0.1.3.tgz", - "integrity": "sha512-o8bTeDWjE086iwKrROaDf31K0qC/BENdm15/uH9usSC/uZjJOKb2YGiVHfLY4GhwsERiPI1jmwI2XrA7ACOxVw==", - "license": "ISC" - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/playwright": { - "version": "1.63.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.63.0.tgz", - "integrity": "sha512-+7ziBLidS4NaNCdt57SUDT+wYmmd5fmiQejUic/kb+YsYSCPyOOE9sebzMjNmQrsnNpDJqd4WHvV/8lfKfUDUg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright-core": "1.63.0" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/playwright-core": { - "version": "1.63.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.63.0.tgz", - "integrity": "sha512-rYCsBF/M5HjUch52bbtVONEFjv6Xu8sm8h72dNlR5bzIE1fvC/bxgspzkjSfU+MweEMmPM8KJebG6nnyxo5mCg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/postcss": { - "version": "8.5.28", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", - "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.18", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prismjs": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", - "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/process-ancestry": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/process-ancestry/-/process-ancestry-0.1.0.tgz", - "integrity": "sha512-tGqJW/UnclpYASFcM6Xh8D8l/BMtaQ9+CSG0vlJSJTcdMM4lDRv4c6H0Pdcsfted+bVczdYSfk2fdukg2gQkZg==", - "license": "MIT", - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/property-information": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.2.0.tgz", - "integrity": "sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/radix3": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz", - "integrity": "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==", - "license": "MIT" - }, - "node_modules/readdirp": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.1.1.tgz", - "integrity": "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==", - "license": "MIT", - "engines": { - "node": ">= 20.19.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/regex/-/regex-6.1.0.tgz", - "integrity": "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==", - "license": "MIT", - "dependencies": { - "regex-utilities": "^2.3.0" - } - }, - "node_modules/regex-recursion": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/regex-recursion/-/regex-recursion-6.0.2.tgz", - "integrity": "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==", - "license": "MIT", - "dependencies": { - "regex-utilities": "^2.3.0" - } - }, - "node_modules/regex-utilities": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/regex-utilities/-/regex-utilities-2.3.0.tgz", - "integrity": "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==", - "license": "MIT" - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/retext-smartypants": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/retext-smartypants/-/retext-smartypants-6.2.0.tgz", - "integrity": "sha512-kk0jOU7+zGv//kfjXEBjdIryL1Acl4i9XNkHxtM7Tm5lFiCog576fjNC9hjoR7LTKQ0DsPWy09JummSsH1uqfQ==", - "license": "MIT", - "dependencies": { - "@types/nlcst": "^2.0.0", - "nlcst-to-string": "^4.0.0", - "unist-util-visit": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/rolldown": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.9.tgz", - "integrity": "sha512-hx/Pv0N1haXRb11qkfnK5MXB/iqr7i0yjWQqmO9uHqZpBgQSqzc8UsSnEpalsh+j1I8qQ2CkXAkJC8Br3dKSlg==", - "license": "MIT", - "dependencies": { - "@oxc-project/types": "=0.150.0", - "@rolldown/pluginutils": "^1.0.0" - }, - "bin": { - "rolldown": "bin/cli.mjs" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "optionalDependencies": { - "@rolldown/binding-android-arm-eabi": "1.2.9", - "@rolldown/binding-android-arm64": "1.2.9", - "@rolldown/binding-darwin-arm64": "1.2.9", - "@rolldown/binding-darwin-x64": "1.2.9", - "@rolldown/binding-freebsd-x64": "1.2.9", - "@rolldown/binding-linux-arm-gnueabihf": "1.2.9", - "@rolldown/binding-linux-arm64-gnu": "1.2.9", - "@rolldown/binding-linux-arm64-musl": "1.2.9", - "@rolldown/binding-linux-ppc64-gnu": "1.2.9", - "@rolldown/binding-linux-s390x-gnu": "1.2.9", - "@rolldown/binding-linux-x64-gnu": "1.2.9", - "@rolldown/binding-linux-x64-musl": "1.2.9", - "@rolldown/binding-openharmony-arm64": "1.2.9", - "@rolldown/binding-win32-arm64-msvc": "1.2.9", - "@rolldown/binding-win32-x64-msvc": "1.2.9" - } - }, - "node_modules/satteri": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/satteri/-/satteri-0.10.5.tgz", - "integrity": "sha512-Ao1LKpAEa9Wdg0otgbVKViZHEq9ebdXe4DMrp3s9vQAU0HNIuHnFEuMuOcm0ZIXyV0Yzxj91NvhLpvXZJO/5ZQ==", - "license": "MIT", - "dependencies": { - "@types/estree-jsx": "^1.0.5", - "@types/hast": "^3.0.5", - "@types/mdast": "^4.0.4", - "@types/unist": "^3.0.3" - }, - "optionalDependencies": { - "@bruits/satteri-darwin-arm64": "0.10.5", - "@bruits/satteri-darwin-x64": "0.10.5", - "@bruits/satteri-linux-arm64-gnu": "0.10.5", - "@bruits/satteri-linux-arm64-musl": "0.10.5", - "@bruits/satteri-linux-x64-gnu": "0.10.5", - "@bruits/satteri-linux-x64-musl": "0.10.5", - "@bruits/satteri-wasm32-wasi": "0.10.5", - "@bruits/satteri-win32-arm64-msvc": "0.10.5", - "@bruits/satteri-win32-x64-msvc": "0.10.5" - } - }, - "node_modules/sax": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.1.tgz", - "integrity": "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=11.0.0" - } - }, - "node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", - "license": "ISC", - "optional": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/sharp": { - "version": "0.35.4", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.4.tgz", - "integrity": "sha512-n++8XWcj+jCOr2IOl7h8LbKnGBDY4aPbmprMONBNFdn0ImXqpGVv5zliDs0V9HbmbCQLpbuo2ej9rAoOQTvMDA==", - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "@img/colour": "^1.1.0", - "detect-libc": "^2.1.2", - "semver": "^7.8.5" - }, - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - }, - "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.35.4", - "@img/sharp-darwin-x64": "0.35.4", - "@img/sharp-freebsd-wasm32": "0.35.4", - "@img/sharp-libvips-darwin-arm64": "1.3.3", - "@img/sharp-libvips-darwin-x64": "1.3.3", - "@img/sharp-libvips-linux-arm": "1.3.3", - "@img/sharp-libvips-linux-arm64": "1.3.3", - "@img/sharp-libvips-linux-ppc64": "1.3.3", - "@img/sharp-libvips-linux-riscv64": "1.3.3", - "@img/sharp-libvips-linux-s390x": "1.3.3", - "@img/sharp-libvips-linux-x64": "1.3.3", - "@img/sharp-libvips-linuxmusl-arm64": "1.3.3", - "@img/sharp-libvips-linuxmusl-x64": "1.3.3", - "@img/sharp-linux-arm": "0.35.4", - "@img/sharp-linux-arm64": "0.35.4", - "@img/sharp-linux-ppc64": "0.35.4", - "@img/sharp-linux-riscv64": "0.35.4", - "@img/sharp-linux-s390x": "0.35.4", - "@img/sharp-linux-x64": "0.35.4", - "@img/sharp-linuxmusl-arm64": "0.35.4", - "@img/sharp-linuxmusl-x64": "0.35.4", - "@img/sharp-webcontainers-wasm32": "0.35.4", - "@img/sharp-win32-arm64": "0.35.4", - "@img/sharp-win32-ia32": "0.35.4", - "@img/sharp-win32-x64": "0.35.4" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - } - } - }, - "node_modules/shiki": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-4.4.3.tgz", - "integrity": "sha512-Mb/GvXPHBAXdgGIcnfU5L3ldpn1XcxrGkPHwqgRx17/I2XRfqlFKk2vGkHWINn1kdXvzJZeuO3is6I9KLPFm0g==", - "license": "MIT", - "dependencies": { - "@shikijs/core": "4.4.3", - "@shikijs/engine-javascript": "4.4.3", - "@shikijs/engine-oniguruma": "4.4.3", - "@shikijs/langs": "4.4.3", - "@shikijs/themes": "4.4.3", - "@shikijs/types": "4.4.3", - "@shikijs/vscode-textmate": "^10.0.2", - "@types/hast": "^3.0.5" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "license": "MIT" - }, - "node_modules/sitemap": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-9.0.1.tgz", - "integrity": "sha512-S6hzjGJSG3d6if0YoF5kTyeRJvia6FSTBroE5fQ0bu1QNxyJqhhinfUsXi9fH3MgtXODWvwo2BDyQSnhPQ88uQ==", - "license": "MIT", - "dependencies": { - "@types/node": "^24.9.2", - "@types/sax": "^1.2.1", - "arg": "^5.0.0", - "sax": "^1.4.1" - }, - "bin": { - "sitemap": "dist/esm/cli.js" - }, - "engines": { - "node": ">=20.19.5", - "npm": ">=10.8.2" - } - }, - "node_modules/smol-toml": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.8.0.tgz", - "integrity": "sha512-kCZr2V3ch9i00x8zXRhjUNVcjG9ijES5dDudkXvUVCT5QlJNQWElSJdZqyPemffHoLNUYwOcou0Fy+ojN0uHSQ==", - "license": "BSD-3-Clause", - "engines": { - "node": ">= 18" - }, - "funding": { - "url": "https://github.com/sponsors/cyyynthia" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/space-separated-tokens": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", - "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/stringify-entities": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", - "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", - "license": "MIT", - "dependencies": { - "character-entities-html4": "^2.0.0", - "character-entities-legacy": "^3.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/svgo": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-4.1.0.tgz", - "integrity": "sha512-bkxnTg1kSU0guhIBmibA6UUhrQmPVA1XsQLN+ylCd+UWzbnLkySOcXpyk1mrl05f+pcaCx2eHb+sp6BgMZWX+Q==", - "license": "MIT", - "dependencies": { - "commander": "^11.1.0", - "css-select": "^6.0.0", - "css-tree": "^3.0.1", - "css-what": "^7.0.0", - "csso": "^5.0.5", - "picocolors": "^1.1.1", - "sax": "1.6.1" - }, - "bin": { - "svgo": "bin/svgo.js" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/svgo" - } - }, - "node_modules/tiny-inflate": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", - "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", - "license": "MIT" - }, - "node_modules/tinyclip": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/tinyclip/-/tinyclip-0.1.15.tgz", - "integrity": "sha512-uo33abH+Ays0xYaDysoBt494Hb3hsEczMpcC0MwFl773pazORx4fmvKhclhR1wonUbB6vvpRsvVMwnhfqeMc+A==", - "license": "MIT", - "engines": { - "node": "^16.14.0 || >= 17.3.0" - } - }, - "node_modules/tinyexec": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz", - "integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==", - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/tinyglobby": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", - "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/trim-lines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", - "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/trough": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", - "integrity": "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD", - "optional": true - }, - "node_modules/ufo": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.4.tgz", - "integrity": "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==", - "license": "MIT" - }, - "node_modules/ultrahtml": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ultrahtml/-/ultrahtml-1.7.0.tgz", - "integrity": "sha512-2xRd0VHoAQE4M+vF/DvFFB7pUV0ZxTW1TLi7lHQWnF/Sb5TPeEUV/l+hxcNnGO00ZXGnR0voCMmYRKQf+rvJ2g==", - "license": "MIT" - }, - "node_modules/uncrypto": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz", - "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==", - "license": "MIT" - }, - "node_modules/undici": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-8.10.2.tgz", - "integrity": "sha512-/y4/bH9YNU5hi9NIrpOuvGXFcxrj3CMrV+/AYpowAYTpHn8gX/XPFjNy766FPoYY0miQhdW977JFWKGNhBdwyQ==", - "license": "MIT", - "engines": { - "node": ">=22.19.0" - } - }, - "node_modules/undici-types": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", - "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", - "license": "MIT" - }, - "node_modules/unified": { - "version": "11.0.5", - "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz", - "integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "bail": "^2.0.0", - "devlop": "^1.0.0", - "extend": "^3.0.0", - "is-plain-obj": "^4.0.0", - "trough": "^2.0.0", - "vfile": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unifont": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/unifont/-/unifont-0.7.5.tgz", - "integrity": "sha512-ULe/Cs+ZIsq+dcFofNkhqielCrUJnb5mr+Yc4EBM2VlL+6OZR6+cjtI2mT1bJvRBrVncqHAbLURxmPLcCXzWMg==", - "license": "MIT", - "dependencies": { - "css-tree": "^3.1.0", - "ohash": "^2.0.11", - "undici": "^8.0.0" - } - }, - "node_modules/unist-util-is": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz", - "integrity": "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-position": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", - "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.1.0.tgz", - "integrity": "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-is": "^6.0.0", - "unist-util-visit-parents": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit-parents": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.2.tgz", - "integrity": "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-is": "^6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unstorage": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.5.tgz", - "integrity": "sha512-0i3iqvRfx29hkNntHyQvJTpf5W9dQ9ZadSoRU8+xVlhVtT7jAX57fazYO9EHvcRCfBCyi5YRya7XCDOsbTgkPg==", - "license": "MIT", - "dependencies": { - "anymatch": "^3.1.3", - "chokidar": "^5.0.0", - "destr": "^2.0.5", - "h3": "^1.15.10", - "lru-cache": "^11.2.7", - "node-fetch-native": "^1.6.7", - "ofetch": "^1.5.1", - "ufo": "^1.6.3" - }, - "peerDependencies": { - "@azure/app-configuration": "^1.8.0", - "@azure/cosmos": "^4.2.0", - "@azure/data-tables": "^13.3.0", - "@azure/identity": "^4.6.0", - "@azure/keyvault-secrets": "^4.9.0", - "@azure/storage-blob": "^12.26.0", - "@capacitor/preferences": "^6 || ^7 || ^8", - "@deno/kv": ">=0.9.0", - "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", - "@planetscale/database": "^1.19.0", - "@upstash/redis": "^1.34.3", - "@vercel/blob": ">=0.27.1", - "@vercel/functions": "^2.2.12 || ^3.0.0", - "@vercel/kv": "^1 || ^2 || ^3", - "aws4fetch": "^1.0.20", - "db0": ">=0.2.1", - "idb-keyval": "^6.2.1", - "ioredis": "^5.4.2", - "uploadthing": "^7.4.4" - }, - "peerDependenciesMeta": { - "@azure/app-configuration": { - "optional": true - }, - "@azure/cosmos": { - "optional": true - }, - "@azure/data-tables": { - "optional": true - }, - "@azure/identity": { - "optional": true - }, - "@azure/keyvault-secrets": { - "optional": true - }, - "@azure/storage-blob": { - "optional": true - }, - "@capacitor/preferences": { - "optional": true - }, - "@deno/kv": { - "optional": true - }, - "@netlify/blobs": { - "optional": true - }, - "@planetscale/database": { - "optional": true - }, - "@upstash/redis": { - "optional": true - }, - "@vercel/blob": { - "optional": true - }, - "@vercel/functions": { - "optional": true - }, - "@vercel/kv": { - "optional": true - }, - "aws4fetch": { - "optional": true - }, - "db0": { - "optional": true - }, - "idb-keyval": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "uploadthing": { - "optional": true - } - } - }, - "node_modules/verkit": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/verkit/-/verkit-0.4.1.tgz", - "integrity": "sha512-mMVzj0TXExtVdlDEq+Mzp0eyOuyznNpFobNM3uAqe3HVm/Ps2c+u17BligMkZjZCA6EiXpoon8iRTer3iu40SQ==", - "license": "MIT", - "engines": { - "node": ">=18.12.0" - }, - "funding": { - "url": "https://github.com/sponsors/sxzz" - } - }, - "node_modules/vfile": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", - "integrity": "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "vfile-message": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/vfile-message": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.3.tgz", - "integrity": "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==", - "license": "MIT", - "dependencies": { - "@types/unist": "^3.0.0", - "unist-util-stringify-position": "^4.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/vite": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.0.tgz", - "integrity": "sha512-lhZBVvEHefgE+HQZC9O7EBJgCU/nVzFNl7vkS4RE0APtWLP02/8QVIkQtzBxPquh7lq5/78NHipTj7ODQ6XuyQ==", - "license": "MIT", - "dependencies": { - "lightningcss": "^1.33.0", - "picomatch": "^4.0.7", - "postcss": "^8.5.28", - "rolldown": "~1.2.6", - "tinyglobby": "^0.2.17" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^20.19.0 || >=22.12.0", - "@vitejs/devtools": "^0.7.1", - "esbuild": "^0.27.0 || ^0.28.0", - "jiti": ">=1.21.0", - "less": "^4.0.0", - "sass": "^1.70.0", - "sass-embedded": "^1.70.0", - "stylus": ">=0.54.8", - "sugarss": "^5.0.0", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "@vitejs/devtools": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/vitefu": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.3.tgz", - "integrity": "sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==", - "license": "MIT", - "workspaces": [ - "tests/deps/*", - "tests/projects/*", - "tests/projects/workspace/packages/*" - ], - "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "vite": { - "optional": true - } - } - }, - "node_modules/xxhash-wasm": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.1.0.tgz", - "integrity": "sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==", - "license": "MIT" - }, - "node_modules/yargs-parser": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", - "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", - "license": "ISC", - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, - "node_modules/yocto-queue": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", - "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", - "license": "MIT", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zod": { - "version": "4.6.5", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.5.tgz", - "integrity": "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zwitch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", - "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index 426698e..0000000 --- a/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "askclaw.dev-astro", - "version": "0.1.0", - "private": true, - "type": "module", - "scripts": { - "build": "astro build", - "preview": "astro preview", - "acceptance": "node scripts/acceptance.mjs" - }, - "dependencies": { - "@astrojs/sitemap": "^3.7.0", - "astro": "^7.3.3" - }, - "devDependencies": { - "playwright": "^1.55.0" - } -} diff --git a/public/assets/completion-matrix-7way.en.webp b/public/assets/completion-matrix-7way.en.webp deleted file mode 100644 index 63d32ac..0000000 Binary files a/public/assets/completion-matrix-7way.en.webp and /dev/null differ diff --git a/public/assets/crab-hero.webp b/public/assets/crab-hero.webp deleted file mode 100644 index 6def568..0000000 Binary files a/public/assets/crab-hero.webp and /dev/null differ diff --git a/public/assets/effort-curves-20260911.en.webp b/public/assets/effort-curves-20260911.en.webp deleted file mode 100644 index e82fc51..0000000 Binary files a/public/assets/effort-curves-20260911.en.webp and /dev/null differ diff --git a/public/assets/score-vs-tokens-2026-w37.en.webp b/public/assets/score-vs-tokens-2026-w37.en.webp deleted file mode 100644 index 1617cc2..0000000 Binary files a/public/assets/score-vs-tokens-2026-w37.en.webp and /dev/null differ diff --git a/public/assets/top5-2026-w38.en.webp b/public/assets/top5-2026-w38.en.webp deleted file mode 100644 index 2a90247..0000000 Binary files a/public/assets/top5-2026-w38.en.webp and /dev/null differ diff --git a/public/assets/trust-chain.en.webp b/public/assets/trust-chain.en.webp deleted file mode 100644 index 9fd3ba9..0000000 Binary files a/public/assets/trust-chain.en.webp and /dev/null differ diff --git a/public/assets/wallclock-strip-2026-w37.en.webp b/public/assets/wallclock-strip-2026-w37.en.webp deleted file mode 100644 index b7c6d2b..0000000 Binary files a/public/assets/wallclock-strip-2026-w37.en.webp and /dev/null differ diff --git a/public/favicon.svg b/public/favicon.svg deleted file mode 100644 index 05385cf..0000000 --- a/public/favicon.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - A - diff --git a/scripts/acceptance.mjs b/scripts/acceptance.mjs deleted file mode 100644 index 36a7ba4..0000000 --- a/scripts/acceptance.mjs +++ /dev/null @@ -1,310 +0,0 @@ -import { createServer } from 'node:http'; -import { readFile, mkdir } from 'node:fs/promises'; -import { resolve, extname } from 'node:path'; -import { fileURLToPath } from 'node:url'; -import { isDeepStrictEqual } from 'node:util'; -import { chromium } from 'playwright'; -import astroConfig from '../astro.config.mjs'; - -const projectRoot = resolve(fileURLToPath(new URL('..', import.meta.url))); -const distRoot = resolve(projectRoot, 'dist'); -const previewPrefix = '/astro-preview'; -const mimeTypes = { - '.html': 'text/html; charset=utf-8', - '.css': 'text/css; charset=utf-8', - '.js': 'text/javascript; charset=utf-8', - '.svg': 'image/svg+xml', - '.xml': 'application/xml; charset=utf-8', - '.txt': 'text/plain; charset=utf-8', - '.json': 'application/json; charset=utf-8', - '.png': 'image/png', -}; - -function distPath(urlPath) { - const withoutPrefix = urlPath.startsWith(previewPrefix) - ? urlPath.slice(previewPrefix.length) || '/' - : urlPath; - const cleanPath = withoutPrefix.endsWith('/') - ? `${withoutPrefix}index.html` - : withoutPrefix; - const candidate = resolve(distRoot, `.${cleanPath}`); - if (candidate !== distRoot && !candidate.startsWith(`${distRoot}/`)) return null; - return candidate; -} - -const configuredBaseUrl = (process.env.ACCEPTANCE_BASE_URL - ?? (process.argv.includes('--live') ? new URL(astroConfig.base, astroConfig.site).href : undefined))?.replace(/\/+$/, ''); -let server = null; - -const handleRequest = async (request, response) => { - const url = new URL(request.url ?? '/', 'http://127.0.0.1'); - const pathname = decodeURIComponent(url.pathname); - const path = distPath(pathname); - if (!path) { - response.writeHead(400); - response.end('Bad path'); - return; - } - try { - const body = await readFile(path); - response.writeHead(200, { - 'Content-Type': mimeTypes[extname(path)] ?? 'application/octet-stream', - 'Content-Length': body.byteLength, - 'Cache-Control': 'no-store', - }); - if (request.method !== 'HEAD') response.end(body); - else response.end(); - } catch { - response.writeHead(404); - response.end('Not found'); - } -}; - -let baseUrl = configuredBaseUrl; -if (!baseUrl) { - server = createServer(handleRequest); - await new Promise((resolveServer) => server.listen(0, '127.0.0.1', resolveServer)); - const address = server.address(); - const port = typeof address === 'object' && address ? address.port : 0; - baseUrl = `http://127.0.0.1:${port}${previewPrefix}`; -} - -const routes = process.env.ACCEPTANCE_ROUTES?.split(',') ?? ['/', '/method/', '/rank/', '/en/']; -const browser = await chromium.launch({ headless: true }); -const results = []; -let failed = false; - -try { - for (const route of routes) { - const page = await browser.newPage({ viewport: { width: 1440, height: 900 } }); - const consoleErrors = []; - const consoleMessages = []; - const pageErrors = []; - const requestFailed = []; - const requests = []; - const httpErrors = []; - page.on('console', (message) => { - consoleMessages.push({ type: message.type(), text: message.text() }); - if (message.type() === 'error') consoleErrors.push(message.text()); - }); - page.on('request', (request) => requests.push({ url: request.url(), type: request.resourceType() })); - page.on('response', (response) => { - if (response.status() >= 400) httpErrors.push({ url: response.url(), status: response.status() }); - }); - page.on('pageerror', (error) => pageErrors.push(error.message)); - page.on('requestfailed', (request) => { - requestFailed.push(`${request.method()} ${request.url()} :: ${request.failure()?.errorText ?? 'unknown'}`); - }); - - // Observer is test instrumentation only, not a script shipped by the site. - await page.addInitScript(() => { - window.__acceptanceLcp = null; - new PerformanceObserver((list) => { - window.__acceptanceLcp = list.getEntries().at(-1)?.startTime ?? null; - }).observe({ type: 'largest-contentful-paint', buffered: true }); - }); - const response = await page.goto(`${baseUrl}${route}`, { waitUntil: 'networkidle' }); - const mainText = await page.locator('main').innerText(); - const mainHtml = await page.locator('main').innerHTML(); - const initialTransfer = await page.evaluate(() => { - const documentBytes = performance.getEntriesByType('navigation').reduce((sum, entry) => sum + entry.transferSize, 0); - const resourceBytes = performance.getEntriesByType('resource').reduce((sum, entry) => sum + entry.transferSize, 0); - return { documentBytes, resourceBytes, totalBytes: documentBytes + resourceBytes }; - }); - const lcpMs = await page.evaluate(() => window.__acceptanceLcp); - const result = { - route, - status: response?.status() ?? null, - contentChars: mainText.trim().length, - domChars: mainHtml.length, - contentText: mainText, - consoleErrors, - consoleMessages, - pageErrors, - requestFailed, - httpErrors, - requests, - initialTransfer, - lcpMs, - }; - - if (!response || response.status() !== 200 || result.contentChars === 0 || consoleErrors.length || pageErrors.length || requestFailed.length) { - failed = true; - } - - if (route === '/rank/') { - result.chipCount = await page.locator('.chip').count(); - await page.locator('[data-preset="build,ops,ui-build"]').click(); - result.presetRowCount = await page.locator('#rank-body tr').count(); - if (result.chipCount !== 8 || result.presetRowCount !== 12) failed = true; - const sourceLanes = JSON.parse(await readFile(resolve(projectRoot, 'src/data/axes.json'), 'utf8')); - const shippedLanes = JSON.parse(await page.locator('#rank-app').getAttribute('data-lanes')); - const expectedLanes = sourceLanes.map((lane) => ({ - ...lane, - vendor: lane.id === 'kimi' ? 'Kimi official coding' : lane.vendor, - })); - result.laneDataPreserved = isDeepStrictEqual(shippedLanes, expectedLanes); - result.kimiVendor = await page.locator('#rank-body tr').filter({ has: page.locator('a[href="https://github.com/getaskclaw/amber-kimi"]') }).locator('small').innerText(); - result.presetContent = await page.locator('#rank-body').innerText(); - if (!result.laneDataPreserved || result.kimiVendor !== 'Kimi official coding') failed = true; - const axes = ['build', 'ops', 'ui-build']; - const expectedOrder = sourceLanes.map((lane) => ({ - name: lane.name, - minimum: Math.min(...axes.map((axis) => lane.axis[axis].p)), - sum: axes.reduce((total, axis) => total + lane.axis[axis].p, 0), - })).sort((a, b) => b.minimum - a.minimum || b.sum - a.sum).map((lane) => lane.name); - result.rankOrderPreserved = isDeepStrictEqual(await page.locator('#rank-body .lane a').allTextContents(), expectedOrder); - await page.locator('#clear-rank').click(); - const cleared = await page.locator('.chip[aria-pressed="true"]').count() === 0; - await page.locator('[data-face="build"]').focus(); - await page.keyboard.press('Space'); - const toggled = await page.locator('[data-face="build"]').getAttribute('aria-pressed') === 'true'; - await page.locator('[data-preset="build,ops,ui-build"]').click(); - result.chipInteractionPassed = cleared && toggled && await page.locator('.chip[aria-pressed="true"]').count() === 3; - if (!result.rankOrderPreserved || !result.chipInteractionPassed) failed = true; - } - - if (route === '/method/') { - result.scorePeriods = []; - for (const [repo, score] of [['amber-ollama', '17/23'], ['amber-crof', '16/23']]) { - const text = await page.locator(`.repo-card[href="https://github.com/getaskclaw/${repo}"]`).innerText(); - const passed = text.includes(score) && text.includes('W37') && text.includes('23 cases') && !text.includes('W36'); - result.scorePeriods.push({ repo, text, passed }); - if (!passed) failed = true; - } - result.compositeExplanation = mainText.includes('W37') && mainText.includes('15/21') && mainText.includes('14/21'); - if (!result.compositeExplanation) failed = true; - } - - if (route === '/en/') { - const legacyHtml = await readFile(resolve(process.env.LEGACY_SITE_ROOT ?? resolve(projectRoot, '../askclaw.dev'), 'en.html'), 'utf8'); - const legacy = await page.evaluate((html) => { - const doc = new DOMParser().parseFromString(html, 'text/html'); - return { - cards: [...doc.querySelectorAll('.repo')].map((card) => ({ - repo: card.querySelector('b').textContent, - score: card.querySelector('.score').textContent, - description: card.querySelector('p').textContent, - href: card.getAttribute('href'), - })), - headings: [...doc.querySelectorAll('h2')].map((heading) => heading.textContent), - lead: doc.querySelector('.lead').textContent.replace(/\s+/g, ' ').trim(), - rules: [...doc.querySelectorAll('.rule')].map((rule) => rule.textContent), - images: [...doc.querySelectorAll('figure img')].map((image) => ({ - file: image.getAttribute('src').split('/').at(-1), - width: image.getAttribute('width'), - height: image.getAttribute('height'), - alt: image.getAttribute('alt'), - })), - }; - }, legacyHtml); - result.englishCards = []; - result.englishLeadPreserved = (await page.locator('.lead').innerText()).replace(/\s+/g, ' ').trim() === legacy.lead; - for (const card of legacy.cards) { - const locator = page.locator(`.repo-card[href="${card.href}"]`); - const text = await locator.count() === 1 ? await locator.innerText() : ''; - const passed = [card.repo, card.score, card.description].every((value) => text.includes(value)); - result.englishCards.push({ ...card, passed }); - } - result.resultRepoCount = await page.locator('.repo-card[href^="https://github.com/getaskclaw/amber-"]').count(); - result.englishCopy = [...legacy.headings, ...legacy.rules, - 'real history,', 'sealed in amber, replayed', '23 cases / 26 papers', '11 result repos', - 'Snapshot 2026-W38', 'leader swe-2-max @ Devin at 18/23 (scored in W37)', - 'five-way tie at 17/23', 'Think longer ≠ score better', 'output-token bills span 17×', - 'hard ones slow the token stream down', 'Correction 2026-09-18', - ].map((text) => ({ text, passed: mainText.includes(text) })); - result.englishImages = []; - for (const image of legacy.images) { - // The legacy English charts were migrated from PNG to WebP and capped at 1400px wide, - // so match the migrated file and assert the declared size matches the decoded size - // (no layout shift) instead of the retired PNG name and pixel dimensions. - const migratedFile = image.file.replace(/\.png$/, '.webp'); - const locator = page.locator(`main img[src$="/${migratedFile}"]`); - let passed = false; - if (await locator.count() === 1) { - await locator.scrollIntoViewIfNeeded(); - await locator.evaluate((img) => img.decode()); - passed = await locator.evaluate((img, expected) => { - // Same chart as the legacy PNG, resized to at most 1400px wide with both - // dimensions scaled together; allow 1px rounding on the height. - const expectedWidth = Math.min(Number(expected.width), 1400); - const expectedHeight = Number(expected.height) * expectedWidth / Number(expected.width); - return img.naturalWidth === expectedWidth - && Math.abs(img.naturalHeight - expectedHeight) <= 1 - && img.getAttribute('width') === String(img.naturalWidth) - && img.getAttribute('height') === String(img.naturalHeight) - && img.loading === 'lazy' && img.alt === expected.alt; - }, image); - } - result.englishImages.push({ ...image, migratedFile, passed }); - } - result.englishLinks = []; - for (const href of [ - 'https://github.com/getaskclaw/amber/blob/main/AMBER-Core-Specification.md', - 'https://github.com/getaskclaw/amber/blob/main/hash-index/v2026-09.md', - 'https://github.com/getaskclaw/amber/blob/main/PLAN.md', - 'https://github.com/getaskclaw/amber/blob/main/docs/corrections-2026-09-18.en.md', - `${previewPrefix}/method/`, `${previewPrefix}/rank/`, - ]) result.englishLinks.push({ href, passed: await page.locator(`a[href="${href}"]`).count() > 0 }); - result.englishMirrorPassed = result.resultRepoCount === 11 - && result.englishLeadPreserved - && result.englishCards.every((check) => check.passed) - && result.englishCopy.every((check) => check.passed) - && result.englishImages.every((check) => check.passed) - && result.englishLinks.every((check) => check.passed) - && !mainText.includes('placeholder'); - if (!result.englishMirrorPassed) failed = true; - } - - result.scriptTags = await page.locator('script:not([type="application/ld+json"])').count(); - result.structuredDataTags = await page.locator('script[type="application/ld+json"]').count(); - result.fontRequests = requests.filter((request) => request.type === 'font'); - result.scriptRequests = requests.filter((request) => request.type === 'script'); - result.forbiddenTerms = (await page.content()).match(/点线面|图结构|节点|出边|点→跳转/g) ?? []; - result.canonical = await page.locator('link[rel="canonical"]').getAttribute('href'); - result.expectedCanonical = `https://askclaw.dev${previewPrefix}${route}`; - if (result.scriptTags !== (route === '/rank/' ? 1 : 0) || result.fontRequests.length - || result.scriptRequests.length || result.forbiddenTerms.length || result.canonical !== result.expectedCanonical) failed = true; - if (route === '/' && initialTransfer.totalBytes >= 200_000) failed = true; - - // Direct load, refresh, ordinary navigation and back must remain real MPA paths. - const refreshed = await page.reload({ waitUntil: 'networkidle' }); - result.refreshStatus = refreshed?.status(); - result.refreshContentPreserved = (await page.locator('main').innerText()) === mainText; - if (route !== '/method/') { - await page.locator('.header-nav a[href^="/astro-preview/method/"]').first().click(); - await page.waitForURL((url) => url.pathname === `${previewPrefix}/method/`, { waitUntil: 'load' }); - await page.goBack({ waitUntil: 'networkidle' }); - result.backUrl = page.url(); - } - if (result.refreshStatus !== 200 || !result.refreshContentPreserved - || (result.backUrl && result.backUrl !== `${baseUrl}${route}`)) failed = true; - - if (process.env.ACCEPTANCE_SCREENSHOT_DIR) { - const directory = resolve(process.env.ACCEPTANCE_SCREENSHOT_DIR); - await mkdir(directory, { recursive: true }); - const label = route === '/' ? 'home' : route.replaceAll('/', ''); - if (route === '/rank/') await page.locator('[data-preset="build,ops,ui-build"]').click(); - for (const image of await page.locator('main img').all()) { - await image.scrollIntoViewIfNeeded(); - await image.evaluate((img) => img.decode()); - } - await page.evaluate(() => window.scrollTo(0, 0)); - await page.screenshot({ path: resolve(directory, `${label}-desktop.png`), fullPage: true }); - await page.setViewportSize({ width: 390, height: 844 }); - result.mobileOverflow = await page.evaluate(() => document.documentElement.scrollWidth > innerWidth); - await page.screenshot({ path: resolve(directory, `${label}-mobile.png`), fullPage: true }); - if (result.mobileOverflow) failed = true; - } - if (consoleErrors.length || pageErrors.length || requestFailed.length || httpErrors.length) failed = true; - - results.push(result); - await page.close(); - } -} finally { - await browser.close(); - if (server) await new Promise((resolveServer) => server.close(resolveServer)); -} - -for (const result of results) console.log(JSON.stringify(result)); -if (failed) process.exitCode = 1; diff --git a/scripts/live-checks.mjs b/scripts/live-checks.mjs deleted file mode 100644 index d2a6233..0000000 --- a/scripts/live-checks.mjs +++ /dev/null @@ -1,52 +0,0 @@ -import assert from 'node:assert/strict'; -import { createHash } from 'node:crypto'; -import { readFile } from 'node:fs/promises'; -import { chromium } from 'playwright'; - -const base = new URL(process.env.ACCEPTANCE_BASE_URL ?? 'https://askclaw.dev/astro-preview/'); -const manifest = JSON.parse(await readFile(new URL('../evidence/r2/dist-manifest.json', import.meta.url), 'utf8')); -const browser = await chromium.launch({ headless: true }); -const checks = { publicFiles: [], noJavaScript: [] }; -try { - const context = await browser.newContext({ javaScriptEnabled: false }); - for (const [file, expected] of Object.entries(manifest.files)) { - const response = await context.request.get(new URL(file, base).href); - const body = await response.body(); - const sha256 = createHash('sha256').update(body).digest('hex'); - checks.publicFiles.push({ file, status: response.status(), bytes: body.length, sha256 }); - assert.equal(response.status(), 200, file); - assert.equal(sha256, expected.sha256, `${file}: public bytes differ from dist`); - } - for (const route of ['', 'method/', 'en/']) { - const page = await context.newPage(); - const errors = []; - page.on('pageerror', (error) => errors.push(error.message)); - const response = await page.goto(new URL(route, base).href, { waitUntil: 'networkidle' }); - const text = await page.locator('main').innerText(); - const scripts = await page.locator('script').count(); - const cards = await page.locator('.repo-card').count(); - checks.noJavaScript.push({ route: '/' + route, status: response.status(), contentChars: text.length, scripts, cards, errors }); - assert.equal(response.status(), 200); - assert.equal(scripts, 0); - assert.equal(errors.length, 0); - assert.ok(text.length > 0); - if (route === 'en/') { - assert.equal(cards, 12); - assert.ok(text.includes('23 cases / 26 papers')); - assert.ok(text.includes('Snapshot 2026-W38')); - } - await page.close(); - } - const page = await context.newPage(); - for (const file of ['sitemap-index.xml', 'sitemap-0.xml', 'robots.txt']) { - const response = await page.goto(new URL(file, base).href); - assert.equal(response.status(), 200, file); - assert.ok((await response.text()).length > 0); - } - checks.sitemapsAndRobotsInBrowser = true; - await page.close(); - await context.close(); -} finally { - await browser.close(); - console.log(JSON.stringify(checks, null, 2)); -} diff --git a/scripts/summarize-acceptance.py b/scripts/summarize-acceptance.py deleted file mode 100644 index be4c751..0000000 --- a/scripts/summarize-acceptance.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Print a compact summary of the complete JSONL browser evidence.""" -import json -from pathlib import Path -import sys - -for name in sys.argv[1:]: - rows = [json.loads(line) for line in Path(name).read_text().splitlines() if line.startswith('{')] - print(name, 'routes:', len(rows)) - for row in rows: - selected = {key: row[key] for key in ['route', 'status', 'contentChars', 'initialTransfer', 'lcpMs', 'scriptTags', 'consoleMessages', 'consoleErrors', 'pageErrors', 'requestFailed', 'httpErrors', 'fontRequests', 'scriptRequests', 'forbiddenTerms', 'chipCount', 'presetRowCount', 'laneDataPreserved', 'rankOrderPreserved', 'chipInteractionPassed', 'kimiVendor', 'compositeExplanation', 'englishLeadPreserved', 'englishMirrorPassed', 'resultRepoCount', 'refreshStatus', 'refreshContentPreserved', 'mobileOverflow'] if key in row} - for name, value in row.items(): - if isinstance(value, list): - failures = [item for item in value if isinstance(item, dict) and item.get('passed') is False] - if failures: - selected[name + '_failures'] = failures - print(json.dumps(selected, ensure_ascii=False)) diff --git a/scripts/tree-manifest.py b/scripts/tree-manifest.py deleted file mode 100644 index 86e5a6a..0000000 --- a/scripts/tree-manifest.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Read-only file manifest for deployment containment checks.""" -import hashlib -import json -from pathlib import Path -import sys - -root = Path(sys.argv[1]).resolve(strict=True) -files = {} -links = {} -for path in sorted(root.rglob("*")): - relative = path.relative_to(root) - if ".git" in relative.parts: - continue - if path.is_symlink(): - links[str(relative)] = str(path.readlink()) - elif path.is_file(): - if path.name.startswith(".env") or path.suffix in {".key", ".pem"}: - raise RuntimeError(f"Unexpected credential file: {relative}") - content = path.read_bytes() - files[str(relative)] = {"bytes": len(content), "sha256": hashlib.sha256(content).hexdigest()} -print(json.dumps({"root": str(root), "top_level": sorted(p.name for p in root.iterdir() if p.name != ".git"), "files": files, "symlinks": links}, indent=2)) diff --git a/scripts/verify-containment.py b/scripts/verify-containment.py deleted file mode 100644 index 1662e8f..0000000 --- a/scripts/verify-containment.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Compare the captured local/remote manifests after the scoped deployment.""" -import json -from pathlib import Path -import subprocess - -root = Path(__file__).resolve().parent.parent -evidence = root / 'evidence/r2' -load = lambda name: json.loads((evidence / name).read_text()) -before, after = load('remote-before.json'), load('remote-after.json') -prefix = 'astro-preview/' -siblings = lambda manifest: {name: value for name, value in manifest['files'].items() if not name.startswith(prefix)} -assert before['top_level'] == after['top_level'] -assert before['symlinks'] == after['symlinks'] == {} -assert siblings(before) == siblings(after), 'Remote siblings changed' -local = load('dist-manifest.json')['files'] -deployed = {name.removeprefix(prefix): value for name, value in after['files'].items() if name.startswith(prefix)} -assert local == deployed, 'Remote preview differs from final dist' -assert load('legacy-before.json') == load('legacy-after.json'), 'Legacy checkout files changed' -for label in ['legacy-status', 'legacy-refs', 'remote-main']: - assert (evidence / f'{label}-before.txt').read_bytes() == (evidence / f'{label}-after.txt').read_bytes(), label -assert subprocess.check_output(['git', 'branch', '--show-current'], cwd=root, text=True).strip() == 'feat/astro-batch1' -assert subprocess.check_output(['git', 'remote'], cwd=root, text=True).strip() == '' -subprocess.run(['git', 'diff', '--exit-code', 'HEAD', '--', 'src/data/axes.json', 'src/pages/index.astro', 'astro.config.mjs', 'package.json', 'package-lock.json'], cwd=root, check=True) -report = { - 'remote_sibling_files_unchanged': len(siblings(before)), - 'remote_top_level_unchanged': after['top_level'], - 'remote_preview_file_matches': len(local), - 'changed_preview_files': [name for name, value in after['files'].items() if name.startswith(prefix) and before['files'].get(name) != value], - 'removed_preview_files': sorted(set(before['files']) - set(after['files'])), - 'legacy_file_count_unchanged': len(load('legacy-after.json')['files']), - 'legacy_status_unchanged': (evidence / 'legacy-status-after.txt').read_text(), - 'legacy_refs_unchanged': True, - 'github_main_unchanged': (evidence / 'remote-main-after.txt').read_text().strip(), - 'branch': 'feat/astro-batch1', - 'candidate_remotes': [], - 'canonical_axes_and_home_unchanged': True, -} -print(json.dumps(report, indent=2)) diff --git a/scripts/verify-dist.py b/scripts/verify-dist.py deleted file mode 100644 index 29b41b4..0000000 --- a/scripts/verify-dist.py +++ /dev/null @@ -1,172 +0,0 @@ -"""Verify static output and source preservation without changing either tree.""" -import hashlib -from html import unescape -from html.parser import HTMLParser -import json -from pathlib import Path -import re -import struct -import subprocess -from urllib.parse import urlparse -import xml.etree.ElementTree as ET - -# Internal graph-IA language must not reach the page as visible copy (owner rule 2026-09-18: -# 图结构/点/线/面 is plumbing, never page copy; WO askclaw-astro-02 acceptance row 9). -# Ordinary domain words such as 端点 ("endpoint") and 方面 ("aspect") are approved, so match the -# whole internal terms instead of the individual characters 点/线/面, which appear inside them. -FORBIDDEN_INTERNAL_TERMS = re.compile('|'.join([ - '点线面', - '图结构', - '节点', - '出边', - '点→跳转', -])) - -def webp_dimensions(data): - """Return (width, height) of a WebP file (VP8 / VP8L / VP8X).""" - assert data[:4] == b'RIFF' and data[8:12] == b'WEBP', 'not a WebP file' - offset = 12 - while offset + 8 <= len(data): - fourcc = data[offset:offset + 4] - size = struct.unpack('> 14) & 0x3FFF) + 1 - if fourcc == b'VP8 ': - return (int.from_bytes(chunk[6:8], 'little') & 0x3FFF, - int.from_bytes(chunk[8:10], 'little') & 0x3FFF) - offset += 8 + size + (size % 2) - raise AssertionError('no WebP dimension chunk found') - - -# The six public charts were migrated from legacy PNG to WebP (resized to 1400px wide) in the -# same change that rebuilt dist; crab-hero.webp is a new asset with no legacy counterpart. -CHART_ASSETS = { - 'top5-2026-w38.en.webp': 'top5-2026-w38.en.png', - 'completion-matrix-7way.en.webp': 'completion-matrix-7way.en.png', - 'trust-chain.en.webp': 'trust-chain.en.png', - 'effort-curves-20260911.en.webp': 'effort-curves-20260911.en.png', - 'score-vs-tokens-2026-w37.en.webp': 'score-vs-tokens-2026-w37.en.png', - 'wallclock-strip-2026-w37.en.webp': 'wallclock-strip-2026-w37.en.png', -} -CRAB_ASSET = 'crab-hero.webp' - -root = Path(__file__).resolve().parent.parent -dist = root / 'dist' -legacy = root.parent / 'askclaw.dev' -base = 'https://askclaw.dev/astro-preview/' -expected_routes = {'index.html', 'method/index.html', 'rank/index.html', 'en/index.html'} -assert {str(p.relative_to(dist)) for p in dist.rglob('*.html')} == expected_routes -assert (root / 'src/data/axes.json').read_bytes() == (root.parent / 'amber-axes/axes.json').read_bytes() - -class Page(HTMLParser): - def __init__(self, text): - super().__init__() - self.refs = [] - self.cards = [] - self.card = None - self.feed(text) - - def handle_starttag(self, tag, attrs): - attrs = dict(attrs) - for name in ('href', 'src'): - if name in attrs: - self.refs.append(attrs[name]) - if tag == 'a' and 'repo-card' in (attrs.get('class') or '').split(): - self.card = {'href': attrs['href'], 'text': ''} - - def handle_data(self, data): - if self.card is not None: - self.card['text'] += data + ' ' - - def handle_endtag(self, tag): - if tag == 'a' and self.card is not None: - self.cards.append(self.card) - self.card = None - -report = {'pages': {}, 'assets': {}, 'data_sha256': hashlib.sha256((root / 'src/data/axes.json').read_bytes()).hexdigest()} -for relative in sorted(expected_routes): - text = (dist / relative).read_text() - forbidden_terms = FORBIDDEN_INTERNAL_TERMS.findall(unescape(text)) - assert not forbidden_terms, f'{relative}: forbidden internal term {forbidden_terms}' - scripts = re.findall(r']*\btype=["\']application/ld\+json["\'])[^>]*>(.*?)', text, re.S | re.I) - assert len(scripts) == (1 if relative == 'rank/index.html' else 0), relative - parsed = Page(text) - for ref in parsed.refs: - url = urlparse(ref) - if url.scheme or not url.path: - continue - assert url.path.startswith('/astro-preview/'), ref - target = dist / url.path.removeprefix('/astro-preview/') - if url.path.endswith('/'): - target /= 'index.html' - assert target.is_file(), ref - report['pages'][relative] = {'bytes': len(text.encode()), 'script_count': len(scripts), 'inline_js_bytes': sum(len(s.encode()) for s in scripts), 'forbidden_terms': [], 'repo_cards': parsed.cards} - if relative == 'method/index.html': - assert len(parsed.cards) == 11 - for repo, score in [('amber-ollama', '17/23'), ('amber-crof', '16/23')]: - card = next(c for c in parsed.cards if c['href'].endswith('/' + repo)) - assert score in card['text'] and 'W37' in card['text'] and 'W36' not in card['text'] - if relative == 'en/index.html': - assert len(parsed.cards) == 12 - assert sum('/amber-' in c['href'] for c in parsed.cards) == 11 - assert 'placeholder' not in text - for phrase in ['23 cases / 26 papers', 'Snapshot 2026-W38', 'scored in W37', 'public hash index', 'Three counterintuitive findings']: - assert phrase in text, phrase - if relative == 'rank/index.html': - assert 'Kimi official coding' in text and 'coding coding' not in text - -assets = sorted((dist / 'assets').glob('*')) -assert {p.name for p in assets} == {*CHART_ASSETS, CRAB_ASSET}, [p.name for p in assets] -for path in assets: - data = path.read_bytes() - assert data == (root / 'public/assets' / path.name).read_bytes(), path.name - if path.name == CRAB_ASSET: - dimensions = webp_dimensions(data) - assert dimensions == (1200, 400), (path.name, dimensions) - else: - legacy_name = CHART_ASSETS[path.name] - legacy_data = (legacy / 'assets' / legacy_name).read_bytes() - # Same chart as the legacy PNG, migrated to WebP and capped at 1400px wide. Both - # dimensions scale together; allow 1px for integer rounding of the height. - assert legacy_data[:8] == b'\x89PNG\r\n\x1a\n', legacy_name - legacy_width, legacy_height = struct.unpack('>II', legacy_data[16:24]) - dimensions = webp_dimensions(data) - expected_width = min(legacy_width, 1400) - assert dimensions[0] == expected_width, (path.name, dimensions, legacy_width) - expected_height = legacy_height * expected_width / legacy_width - assert abs(dimensions[1] - expected_height) <= 1, (path.name, dimensions, legacy_height) - report['assets'][path.name] = {'bytes': len(data), 'dimensions': dimensions, 'sha256': hashlib.sha256(data).hexdigest()} - -ns = {'s': 'http://www.sitemaps.org/schemas/sitemap/0.9', 'x': 'http://www.w3.org/1999/xhtml'} -sitemap = ET.parse(dist / 'sitemap-0.xml') -urls = sitemap.findall('s:url', ns) -locations = [u.findtext('s:loc', namespaces=ns) for u in urls] -assert len(locations) == 4 and set(locations) == {base, base + 'en/', base + 'rank/', base + 'method/'} -for url in urls: - location = url.findtext('s:loc', namespaces=ns) - alternates = {a.attrib['hreflang']: a.attrib['href'] for a in url.findall('x:link', ns)} - assert alternates == ({'zh-CN': base, 'en': base + 'en/'} if location in {base, base + 'en/'} else {}) -assert ET.parse(dist / 'sitemap-index.xml').findtext('s:sitemap/s:loc', namespaces=ns) == base + 'sitemap-0.xml' -assert base + 'sitemap-index.xml' in (dist / 'robots.txt').read_text() -tracked = subprocess.check_output(['git', 'ls-files'], cwd=root, text=True).splitlines() -assert not any(Path(p).name.startswith('sitemap') and p.endswith('.xml') for p in tracked) -config = (root / 'astro.config.mjs').read_text() -assert "import sitemap from '@astrojs/sitemap'" in config and 'sitemap({' in config -report['sitemap'] = {'routes': locations, 'hreflang_count': len(sitemap.findall('.//x:link', ns)), 'generated': True} -assert not list(dist.rglob('*.js')) -for path in [*dist.rglob('*.html'), *dist.rglob('*.css')]: - assert not re.search(r'@font-face|fonts\.(?:googleapis|gstatic)\.com|\.(?:woff2?|ttf|otf)\b', path.read_text()), path -package = json.loads((root / 'package.json').read_text()) -assert set(package['dependencies']) == {'astro', '@astrojs/sitemap'} -lock = json.loads((root / 'package-lock.json').read_text()) -for name in lock['packages']: - assert not re.search(r'node_modules/(react(?:-dom)?|vue|svelte|solid-js|@solidjs/start|@sveltejs/kit)(/|$)', name), name -report['frameworks'] = [] -report['external_js_files'] = [] -report['network_fonts'] = [] -report['dist'] = {str(p.relative_to(dist)): {'bytes': p.stat().st_size, 'sha256': hashlib.sha256(p.read_bytes()).hexdigest()} for p in sorted(dist.rglob('*')) if p.is_file()} -print(json.dumps(report, indent=2, ensure_ascii=False)) diff --git a/src/components/SiteFooter.astro b/src/components/SiteFooter.astro deleted file mode 100644 index 9aa7cee..0000000 --- a/src/components/SiteFooter.astro +++ /dev/null @@ -1,16 +0,0 @@ ---- -interface Props { - lang?: string; -} - -const { lang = 'zh-CN' } = Astro.props; -const base = import.meta.env.BASE_URL; -const route = (path: string) => `${base}${path.replace(/^\/+/, '')}`; -const isEnglish = lang === 'en'; ---- - diff --git a/src/components/SiteHeader.astro b/src/components/SiteHeader.astro deleted file mode 100644 index 6024575..0000000 --- a/src/components/SiteHeader.astro +++ /dev/null @@ -1,43 +0,0 @@ ---- -interface Props { - lang?: string; - currentPath?: string; -} - -const { lang = 'zh-CN', currentPath = '/' } = Astro.props; -const base = import.meta.env.BASE_URL; -const route = (path: string) => `${base}${path.replace(/^\/+/, '')}`; -const isEnglish = lang === 'en'; -const items = isEnglish - ? [ - ['home', 'Home', '/'], - ['matrix', 'Axis matrix', '/rank/'], - ['repos', 'Results', '/method/#repos-title'], - ['method', 'Method', '/method/#verify-title'], - ] - : [ - ['home', '总榜', '/'], - ['matrix', '九轴矩阵', '/rank/'], - ['repos', '成绩仓', '/method/#repos-title'], - ['method', '规范', '/method/#verify-title'], - ]; ---- - diff --git a/src/data/axes.json b/src/data/axes.json deleted file mode 100644 index d5ef57b..0000000 --- a/src/data/axes.json +++ /dev/null @@ -1,542 +0,0 @@ -[ - { - "id": "devin", - "name": "swe-2-max", - "vendor": "Devin", - "wk": "W37", - "cases": 23, - "repo": "amber-devin", - "file": "amber-devin/results/2026-W37.md", - "total": 18, - "n": 23, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 6, - "n": 6 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 0, - "n": 3 - }, - "review": { - "p": 1, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 1, - "n": 1 - }, - "vision": { - "p": 1, - "n": 1 - } - } - }, - { - "id": "kimi", - "name": "k3", - "vendor": "Kimi 官方 coding 端点", - "wk": "W38", - "cases": 23, - "repo": "amber-kimi", - "file": "amber-kimi/results/2026-W38.md", - "total": 17, - "n": 23, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 6, - "n": 6 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 0, - "n": 3 - }, - "review": { - "p": 1, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 0, - "n": 1 - }, - "vision": { - "p": 1, - "n": 1 - } - } - }, - { - "id": "cc", - "name": "deepseek-v4.1-flash", - "vendor": "CommandCode", - "wk": "W37", - "cases": 23, - "repo": "amber-commandcode", - "file": "amber-commandcode/results/2026-W37.md", - "total": 17, - "n": 23, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 6, - "n": 6 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 0, - "n": 3 - }, - "review": { - "p": 1, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 1, - "n": 1 - }, - "vision": { - "p": 0, - "n": 1 - } - } - }, - { - "id": "wb", - "name": "hy4-preview-f", - "vendor": "WorkBuddy ACP", - "wk": "W37", - "cases": 23, - "repo": "amber-workbuddy", - "file": "amber-workbuddy/results/2026-W37.md", - "total": 17, - "n": 23, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 6, - "n": 6 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 0, - "n": 3 - }, - "review": { - "p": 1, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 1, - "n": 1 - }, - "vision": { - "p": 0, - "n": 1 - } - } - }, - { - "id": "gpt-luna", - "name": "gpt-5.6-luna-900k (max 档)", - "vendor": "OpenAI Codex", - "wk": "W38", - "cases": 23, - "repo": "amber-gpt", - "file": "amber-gpt/results/2026-W38.md", - "total": 16, - "n": 23, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 5, - "n": 6 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 0, - "n": 3 - }, - "review": { - "p": 0, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 1, - "n": 1 - }, - "vision": { - "p": 1, - "n": 1 - } - } - }, - { - "id": "ds", - "name": "deepseek-flash (GA)", - "vendor": "DeepSeek 官方", - "wk": "W37", - "cases": 23, - "repo": "amber-deepseek", - "file": "amber-deepseek/results/2026-W37.md", - "total": 16, - "n": 23, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 6, - "n": 6 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 0, - "n": 3 - }, - "review": { - "p": 1, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 0, - "n": 1 - }, - "vision": { - "p": 0, - "n": 1 - } - } - }, - { - "id": "ocgo", - "name": "deepseek-flash", - "vendor": "OpenCode Go", - "wk": "W37", - "cases": 23, - "repo": "amber-opencode", - "file": "amber-opencode/results/2026-W37.md", - "total": 16, - "n": 23, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 6, - "n": 6 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 0, - "n": 3 - }, - "review": { - "p": 1, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 0, - "n": 1 - }, - "vision": { - "p": 0, - "n": 1 - } - } - }, - { - "id": "doubao", - "name": "doubao-seed-evolving", - "vendor": "火山方舟 Agent Plan", - "wk": "W38", - "cases": 23, - "repo": "amber-doubao", - "file": "amber-doubao/results/2026-W38.md", - "total": 16, - "n": 23, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 6, - "n": 6 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 0, - "n": 3 - }, - "review": { - "p": 1, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 0, - "n": 1 - }, - "vision": { - "p": 0, - "n": 1 - } - } - }, - { - "id": "gpt-sol", - "name": "gpt-5.6-sol-900k (high 档)", - "vendor": "OpenAI Codex", - "wk": "W38", - "cases": 23, - "repo": "amber-gpt", - "file": "amber-gpt/results/2026-W38.md", - "total": 15, - "n": 23, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 5, - "n": 6 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 0, - "n": 3 - }, - "review": { - "p": 0, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 1, - "n": 1 - }, - "vision": { - "p": 0, - "n": 1 - } - } - }, - { - "id": "ollama", - "name": "glm-5.3-flash", - "vendor": "Ollama Cloud", - "wk": "W36", - "cases": 21, - "repo": "amber-ollama", - "file": "amber-ollama/results/2026-W36.md", - "total": 15, - "n": 21, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 4, - "n": 4 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 0, - "n": 3 - }, - "review": { - "p": 1, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 0, - "n": 1 - }, - "vision": { - "p": 1, - "n": 1 - } - } - }, - { - "id": "gp", - "name": "Qwen3.8-27B", - "vendor": "社区自部署 3×V100", - "wk": "W38", - "cases": 23, - "repo": "amber-goldenpotato", - "file": "amber-goldenpotato/results/2026-W38.md", - "total": 14, - "n": 23, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 5, - "n": 6 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 0, - "n": 3 - }, - "review": { - "p": 0, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 0, - "n": 1 - }, - "vision": { - "p": 0, - "n": 1 - } - } - }, - { - "id": "crof", - "name": "qwen3.8-27b", - "vendor": "CrofAI", - "wk": "W36", - "cases": 21, - "repo": "amber-crof", - "file": "amber-crof/results/2026-W36.md", - "total": 14, - "n": 21, - "axis": { - "build": { - "p": 5, - "n": 6 - }, - "ops": { - "p": 3, - "n": 4 - }, - "text": { - "p": 3, - "n": 3 - }, - "verify": { - "p": 1, - "n": 3 - }, - "review": { - "p": 1, - "n": 2 - }, - "req-drift": { - "p": 1, - "n": 1 - }, - "ui-build": { - "p": 0, - "n": 1 - }, - "vision": { - "p": 0, - "n": 1 - } - } - } -] \ No newline at end of file diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro deleted file mode 100644 index b83389f..0000000 --- a/src/layouts/BaseLayout.astro +++ /dev/null @@ -1,89 +0,0 @@ ---- -import '../styles/global.css'; -import SiteHeader from '../components/SiteHeader.astro'; -import SiteFooter from '../components/SiteFooter.astro'; - -interface Props { - title: string; - description: string; - lang?: string; - canonicalPath?: string; - languagePair?: boolean; - pageClass?: string; - keywords?: string; - ogImagePath?: string; - ogType?: string; - schemaType?: 'WebSite' | 'WebPage'; - schemaName?: string; - schemaAlternateName?: string[]; - schemaInLanguage?: string | string[]; -} - -const { - title, - description, - lang = 'zh-CN', - canonicalPath = '/', - languagePair = false, - pageClass = '', - keywords = '琥珀评测, AMBER, AI评测, 大模型评测, 模型排行榜, AskClaw', - ogImagePath = '/assets/top5-2026-w38.en.webp', - ogType = 'website', - schemaType = 'WebPage', - schemaName = title, - schemaAlternateName = [], - schemaInLanguage = lang, -} = Astro.props; - -const site = 'https://askclaw.dev'; -const base = import.meta.env.BASE_URL; -const route = (path: string) => `${base}${path.replace(/^\/+/, '')}`; -const canonical = new URL(route(canonicalPath), site).href; -const zhHome = new URL(route('/'), site).href; -const enHome = new URL(route('/en/'), site).href; -const favicon = route('/favicon.svg'); -const ogImage = new URL(route(ogImagePath), site).href; -const structuredData = { - '@context': 'https://schema.org', - '@type': schemaType, - name: schemaName, - ...(schemaAlternateName.length > 0 ? { alternateName: schemaAlternateName } : {}), - url: canonical, - description, - inLanguage: schemaInLanguage, -}; ---- - - - - - - - - {title} - - - - - - - - - - - - - diff --git a/src/pages/robots.txt.ts b/src/pages/robots.txt.ts deleted file mode 100644 index f29f35d..0000000 --- a/src/pages/robots.txt.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { APIRoute } from 'astro'; - -const site = 'https://askclaw.dev'; - -export const GET: APIRoute = () => { - const baseUrl = new URL(import.meta.env.BASE_URL, site); - const sitemap = new URL('sitemap-index.xml', baseUrl).href; - - return new Response(`User-agent: *\nAllow: /\n\nSitemap: ${sitemap}\n`, { - headers: { - 'Content-Type': 'text/plain; charset=utf-8', - }, - }); -}; \ No newline at end of file diff --git a/src/styles/global.css b/src/styles/global.css deleted file mode 100644 index 6d916d6..0000000 --- a/src/styles/global.css +++ /dev/null @@ -1,1264 +0,0 @@ -:root { - --ink: #17242b; - --sub: #5a6b73; - --teal: #00a5b5; - --teal-dark: #0b7c88; - --bg: #fafdfe; - --card: #fff; - --line: #e3ecef; - --warning-bg: #fffbe9; - --warning-line: #f0e3b0; -} - -* { - box-sizing: border-box; -} - -html { - background: var(--bg); -} - -body { - margin: 0; - color: var(--ink); - background: var(--bg); - font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; - line-height: 1.7; -} - -a { - color: var(--teal-dark); - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -:focus-visible { - outline: 3px solid #f4b942; - outline-offset: 3px; -} - -.wrap { - width: min(980px, calc(100% - 40px)); - margin: 0 auto; -} - -.site-header { - border-bottom: 1px solid var(--line); - padding: 18px 0; -} - -.site-header .wrap, -.site-footer .wrap, -.header-nav, -.header-links { - display: flex; - align-items: center; -} - -.site-header .wrap, -.site-footer .wrap { - justify-content: space-between; - gap: 20px; -} - -.logo { - color: var(--ink); - font-size: 20px; - font-weight: 800; - letter-spacing: -0.02em; -} - -.logo span { - color: var(--teal); -} - -.header-nav, -.header-links { - flex-wrap: wrap; - gap: 16px; -} - -.header-nav a, -.header-links a { - color: var(--sub); - font-size: 14px; -} - -main { - min-height: 60vh; -} - -.hero { - padding: 64px 0 38px; -} - -.hero h1, -h1 { - margin: 0; - font-size: clamp(2rem, 5vw, 2.6rem); - line-height: 1.25; - letter-spacing: -0.025em; -} - -.hero h1 em, -h1 em { - color: var(--teal); - font-style: normal; -} - -.hero p, -.lead { - max-width: 760px; - margin: 16px 0 0; - color: var(--sub); - font-size: 1.08rem; -} - -.hero-actions, -.badges, -.stat-grid, -.repo-grid, -.rule-list { - display: grid; - gap: 14px; -} - -.hero-actions { - grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); - max-width: 620px; - margin-top: 28px; -} - -.action-card, -.badge, -.stat-card, -.repo-card, -.panel, -.rule, -.notice { - border: 1px solid var(--line); - border-radius: 10px; - background: var(--card); -} - -.action-card, -.badge, -.stat-card, -.repo-card, -.panel { - padding: 16px 18px; -} - -.action-card { - display: block; - color: var(--ink); -} - -.action-card:hover { - border-color: var(--teal); - text-decoration: none; -} - -.action-card strong, -.repo-card strong { - color: var(--teal-dark); -} - -.action-card small, -.badge small, -.repo-card small, -.muted, -.hint, -.note { - color: var(--sub); -} - -.action-card small, -.badge small, -.repo-card small { - display: block; - font-size: 0.84rem; -} - -.section { - padding: 34px 0; -} - -.section h2 { - margin: 0 0 6px; - font-size: 1.5rem; -} - -.hint, -.note { - margin: 0 0 18px; - font-size: 0.92rem; -} - -.badges, -.stat-grid { - grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); - margin-top: 26px; -} - -.badge strong, -.stat-card strong { - display: block; - color: var(--teal-dark); - font-size: 1.35rem; -} - -.badge span, -.stat-card span { - display: block; - color: var(--sub); - font-size: 0.82rem; -} - -.repo-grid { - grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); -} - -.repo-card { - display: block; - color: var(--ink); -} - -.repo-card:hover { - border-color: var(--teal); - text-decoration: none; -} - -.repo-card .score { - float: right; - color: var(--ink); - font-weight: 700; -} - -.rule-list { - grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); -} - -.rule { - border-left: 3px solid var(--teal); - padding: 10px 14px; - color: var(--sub); -} - -.notice { - border-left: 3px solid var(--teal); - padding: 12px 16px; - color: var(--sub); -} - -.site-footer { - margin-top: 40px; - border-top: 1px solid var(--line); - padding: 26px 0 40px; - color: var(--sub); - font-size: 0.85rem; -} - -.site-footer .wrap { - align-items: flex-start; -} - -.site-footer p { - margin: 0; -} - -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border: 0; -} - -.skip-link { - position: absolute; - left: -9999px; - top: 8px; - z-index: 2; - padding: 8px 12px; - color: #fff; - background: var(--ink); -} - -.skip-link:focus { - left: 8px; -} - -/* Rank picker */ -.rank-page h1 { - margin-top: 40px; -} - -.picker { - padding: 18px 20px; -} - -.chips, -.preset-list { - display: flex; - flex-wrap: wrap; - gap: 8px; -} - -.chip, -.preset { - border: 1px solid var(--line); - border-radius: 999px; - background: #fff; - color: var(--ink); - cursor: pointer; - font: inherit; -} - -.chip { - padding: 7px 14px; - font-size: 0.88rem; -} - -.chip:hover, -.preset:hover, -.chip[aria-pressed="true"] { - border-color: var(--teal); -} - -.chip[aria-pressed="true"] { - color: #fff; - background: var(--teal); - font-weight: 700; -} - -.chip .count { - margin-left: 5px; - font-size: 0.76rem; - opacity: 0.78; -} - -.picker-bar { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - flex-wrap: wrap; - margin-top: 16px; - padding-top: 14px; - border-top: 1px dashed var(--line); -} - -.preset { - padding: 5px 11px; - color: var(--teal-dark); - border-color: var(--teal); - font-size: 0.82rem; -} - -.clear-button { - border: 0; - padding: 5px; - color: var(--sub); - background: transparent; - cursor: pointer; - font: inherit; - font-size: 0.82rem; -} - -.verdict { - min-height: 2.6em; - margin-top: 16px; - border-left: 3px solid var(--teal); - padding: 10px 14px; - color: var(--sub); -} - -.verdict strong { - color: var(--ink); -} - -.board-wrap { - overflow-x: auto; - border: 1px solid var(--line); - border-radius: 10px; - background: #fff; -} - -table.board { - width: 100%; - border-collapse: collapse; - font-size: 0.88rem; -} - -table.board th, -table.board td { - padding: 9px 10px; - border-bottom: 1px solid var(--line); - text-align: left; - white-space: nowrap; -} - -table.board th { - color: var(--sub); - background: #f6fafb; - font-size: 0.8rem; - font-weight: 700; -} - -table.board th.num, -table.board td.num { - text-align: right; -} - -table.board tbody tr:hover { - background: #f7fcfd; -} - -.lane { - font-weight: 700; -} - -.lane small { - display: block; - color: var(--sub); - font-size: 0.76rem; - font-weight: 400; -} - -.cell, -.total, -.rank-number { - font-variant-numeric: tabular-nums; -} - -.cell.pass { - color: var(--teal-dark); - font-weight: 700; -} - -.cell.fail, -.min.bad { - color: #c0392b; -} - -.min.good { - color: var(--teal-dark); -} - -.saturation { - margin-top: 14px; - border: 1px solid var(--warning-line); - border-radius: 8px; - padding: 10px 14px; - color: #7a6a2f; - background: var(--warning-bg); - font-size: 0.88rem; -} - -[hidden] { - display: none !important; -} - -@media (max-width: 720px) { - .wrap { - width: min(100% - 28px, 980px); - } - - .site-header .wrap, - .site-footer .wrap { - align-items: flex-start; - flex-direction: column; - } - - .hero { - padding-top: 42px; - } -} - -@media (prefers-reduced-motion: reduce) { - *, - *::before, - *::after { - scroll-behavior: auto !important; - transition-duration: 0.01ms !important; - } -} - -/* ------------------------------------------------------------------ - AskClaw home visual batch (appended block, additive only). - Color values and geometry are read from the design sources: - ~/2609/askclaw-design-05/mockups/01-hero-questions-4-desktop.svg - ~/2609/askclaw-design-05/mockups/02-hero-questions-4-mobile.svg - ~/2609/askclaw-design-05/mockups/03-pending-section.svg - Page ground #FBFCF8 · card edges #D7EAE5 · card radius 20px - A #E6F4F0 B #FFF3D2 C #E5E9FF D #FFF7DE · crab bubble #123C46 - ------------------------------------------------------------------ */ - -.home-document { - background-color: #FBFCF8; -} - -html:has(> body.home-document) { - background-color: #FBFCF8; -} - -.home-document .site-header { - border-bottom-color: #DCEBE6; -} - -.home-document .site-footer { - border-top-color: #DCEBE6; -} - -.home-document .site-header .logo { - font-family: "Noto Serif CJK SC", "Noto Serif SC", Georgia, "Songti SC", serif; - color: #123C46; -} - -.home-document .header-nav a { - color: #6C8B91; - font-weight: 500; -} - -.home-document .header-nav a[aria-current="page"] { - color: #149C9B; - font-weight: 600; -} - -.home-document .language-toggle { - display: inline-flex; - align-items: center; - gap: 4px; - padding: 5px 14px; - border: 1px solid #DCEBE6; - border-radius: 16px; - background: #FFFFFF; - color: #6C8B91; - font-size: 13px; - font-weight: 500; -} - -.home-document .language-toggle .language-current { - color: #149C9B; - font-weight: 700; -} - -.home-page { - background-color: #FBFCF8; - color: #123C46; -} - -.home-wrap { - width: min(1160px, calc(100% - 40px)); -} - -/* --- hero ---------------------------------------------------------- */ - -.question-hero { - display: grid; - gap: 18px; - padding: 30px 0 6px; -} - -.question-panel { - min-width: 0; -} - -.eyebrow { - margin: 0; - color: #149C9B; - font-size: 11px; - font-weight: 800; - letter-spacing: 1.7px; - line-height: 1.2; - text-transform: uppercase; -} - -.eyebrow-rule { - width: 204px; - max-width: 62%; - height: 4px; - margin: 9px 0 0; - border: 0; - border-radius: 2px; - background: #F7B83E; -} - -.question-hero h1 { - margin: 18px 0 0; - color: #123C46; - font-size: clamp(1.6rem, 3vw, 2.15rem); - font-weight: 800; - line-height: 1.25; - letter-spacing: -0.01em; -} - -.question-grid { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 14px 16px; - margin-top: 22px; -} - -.question-entry { - display: grid; - grid-template-columns: minmax(0, 1fr) auto; - grid-template-areas: - "meta meta" - "question question" - "preview cue"; - align-items: end; - column-gap: 10px; - row-gap: 6px; - box-sizing: border-box; - min-height: 96px; - padding: 14px 16px 12px; - border: 1px solid #D7EAE5; - border-radius: 20px; - color: #123C46; - text-decoration: none; -} - -.question-entry:hover { - text-decoration: none; - box-shadow: 0 10px 22px rgba(23, 75, 84, 0.1); -} - -.question-entry-teal { - background: #E6F4F0; -} - -.question-entry-amber { - background: #FFF3D2; -} - -.question-entry-cobalt { - background: #E5E9FF; -} - -.question-entry-gold { - background: #FFF7DE; -} - -.question-entry-teal .question-meta, -.question-entry-teal .edge-cue { - color: #149C9B; -} - -.question-entry-amber .question-meta, -.question-entry-amber .edge-cue { - color: #F7B83E; -} - -.question-entry-cobalt .question-meta, -.question-entry-cobalt .edge-cue { - color: #6C73D9; -} - -.question-entry-gold .question-meta, -.question-entry-gold .edge-cue { - color: #D79D2C; -} - -.question-entry-teal .question-dot { - background: #149C9B; -} - -.question-entry-amber .question-dot { - background: #F7B83E; -} - -.question-entry-cobalt .question-dot { - background: #6C73D9; -} - -.question-entry-gold .question-dot { - background: #D79D2C; -} - -.question-meta { - grid-area: meta; - display: inline-flex; - align-items: center; - gap: 6px; - font-size: 10px; - font-weight: 800; - letter-spacing: 1.4px; - line-height: 1.2; -} - -.question-dot { - flex: none; - width: 9px; - height: 9px; - border-radius: 50%; - background: #149C9B; -} - -.question-copy { - display: contents; -} - -.question { - grid-area: question; - display: block; - color: #123C46; - font-size: 14px; - font-weight: 800; - line-height: 1.3; -} - -.preview { - grid-area: preview; - display: block; - color: #6C8B91; - font-size: 10.5px; - font-weight: 500; - line-height: 1.35; - min-width: 0; - overflow-wrap: anywhere; -} - -.edge-cue { - grid-area: cue; - display: inline-flex; - align-items: center; - gap: 5px; - font-size: 12px; - font-weight: 700; - line-height: 1.35; - white-space: nowrap; -} - -.cue-mark { - font-size: 11px; - line-height: 1; -} - -.crab-guide { - display: flex; - flex-direction: column; - gap: 12px; - min-width: 0; -} - -.crab-frame { - overflow: hidden; - border: 1px solid #F0E4C2; - border-radius: 28px; - background: #FFF6DE; -} - -.crab-frame img { - display: block; - width: 100%; - height: auto; -} - -.crab-bubble { - position: relative; - margin: 0; - padding: 11px 20px; - border-radius: 22px; - background: #123C46; - color: #FFFFFF; - font-size: 13px; - font-weight: 700; - line-height: 1.4; - text-align: center; - box-shadow: 0 5px 12px rgba(23, 75, 84, 0.16); -} - -.crab-bubble::before { - content: ""; - position: absolute; - top: -9px; - left: 50%; - margin-left: -9px; - border-right: 9px solid transparent; - border-bottom: 9px solid #123C46; - border-left: 9px solid transparent; -} - -.fact-rail { - display: flex; - align-items: center; - gap: 9px; - min-height: 48px; - padding: 8px 16px; - border: 1px solid #DCEBE6; - border-radius: 24px; - background: #FFFFFF; - color: #123C46; - font-size: 13px; - font-weight: 700; - line-height: 1.4; -} - -.fact-dot { - flex: none; - width: 10px; - height: 10px; - border-radius: 50%; - background: #F7B83E; -} - -/* --- leaderboard --------------------------------------------------- */ - -.leaderboard { - margin-top: 44px; - padding: 24px 26px 0; - border: 1px solid #DCEBE6; - border-radius: 30px; - background: #FFFFFF; - box-shadow: 0 12px 32px rgba(23, 75, 84, 0.1); -} - -.leaderboard-header { - display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 16px; - flex-wrap: wrap; - padding-bottom: 18px; -} - -.leaderboard-header h2 { - margin: 0; - color: #123C46; - font-family: "Noto Serif CJK SC", "Noto Serif SC", Georgia, "Songti SC", serif; - font-size: 1.5rem; - font-weight: 800; - line-height: 1.25; -} - -.leaderboard-header p { - margin: 4px 0 0; - color: #6C8B91; - font-size: 12px; - font-weight: 600; -} - -.leaderboard-badge { - display: inline-flex; - align-items: center; - padding: 7px 15px; - border-radius: 999px; - background: #E6F4F0; - color: #149C9B; - font-size: 11px; - font-weight: 700; - line-height: 1.3; - white-space: nowrap; -} - -.leaderboard-body { - display: grid; - grid-template-columns: minmax(0, 1fr); - gap: 18px; -} - -.leaderboard-footer { - display: flex; - align-items: center; - justify-content: space-between; - gap: 14px; - flex-wrap: wrap; - margin-top: 20px; - padding: 16px 0 20px; - border-top: 1px solid #DCEBE6; - font-size: 12px; -} - -.leaderboard-footer strong { - color: #335F67; - font-weight: 700; -} - -.leaderboard-footer span { - color: #6C8B91; - font-weight: 500; -} - -.champion-card { - display: flex; - flex-direction: column; - gap: 10px; - min-width: 0; - padding: 22px 24px; - border-radius: 24px; - background: #FFF3D2; -} - -.rank-label { - display: flex; - align-items: center; - gap: 10px; - color: #335F67; - font-size: 11px; - font-weight: 800; - letter-spacing: 0.6px; - line-height: 1.3; -} - -.rank-dot { - flex: none; - width: 14px; - height: 14px; - border-radius: 50%; - background: #F7B83E; -} - -.champion-main { - display: flex; - align-items: flex-end; - justify-content: space-between; - gap: 14px; - flex-wrap: wrap; - min-width: 0; -} - -.champion-main h3 { - margin: 0; - color: #123C46; - font-family: "Noto Serif CJK SC", "Noto Serif SC", Georgia, "Songti SC", serif; - font-size: 1.3rem; - font-weight: 800; - line-height: 1.3; - overflow-wrap: anywhere; -} - -.champion-main p { - margin: 6px 0 0; - color: #6C8B91; - font-size: 12px; - font-weight: 600; - line-height: 1.4; -} - -.champion-score { - color: #123C46; - font-size: clamp(1.7rem, 3.4vw, 2.6rem); - font-weight: 800; - font-variant-numeric: tabular-nums; - line-height: 1; -} - -.champion-detail { - margin: 0; - color: #6C8B91; - font-size: 11px; - font-weight: 600; - line-height: 1.4; -} - -.progress-block { - display: flex; - flex-direction: column; - gap: 8px; - min-width: 0; - color: #6C8B91; - font-size: 11px; - font-weight: 500; - line-height: 1.4; -} - -.progress-track { - display: block; - overflow: hidden; - height: 10px; - border-radius: 5px; - background: #FCE6A9; -} - -.progress-track span { - display: block; - height: 100%; - border-radius: 5px; - background: #F7B83E; -} - -.tied-card { - min-width: 0; - padding: 22px 24px; - border: 1px solid #DCEBE6; - border-radius: 24px; - background: #FBFEFC; -} - -.tied-card h3 { - margin: 0 0 6px; - color: #149C9B; - font-size: 15px; - font-weight: 800; - line-height: 1.35; -} - -.tied-list { - margin: 0; - padding: 0; - list-style: none; -} - -.tied-list li { - display: flex; - align-items: center; - gap: 14px; - padding: 12px 0; - border-bottom: 1px solid #EEF5F2; -} - -.tied-list li:last-child { - border-bottom: 0; -} - -.lane-marker { - flex: none; - width: 10px; - height: 10px; - border-radius: 50%; - background: #149C9B; -} - -.lane-marker-teal { - background: #149C9B; -} - -.lane-marker-cobalt { - background: #6C73D9; -} - -.lane-marker-sky { - background: #78A9C8; -} - -.lane-marker-coral { - background: #EF7569; -} - -.lane-marker-mint { - background: #9DCFC1; -} - -.lane-name { - flex: 1 1 auto; - min-width: 0; - overflow: hidden; - color: #335F67; - font-size: 11px; - font-weight: 600; - text-overflow: ellipsis; - white-space: nowrap; -} - -.tied-list strong { - flex: none; - color: #123C46; - font-size: 11px; - font-weight: 800; - font-variant-numeric: tabular-nums; -} - -/* --- pending section ----------------------------------------------- */ - -.pending-section { - margin: 44px 0 0; - padding: 0 0 40px; -} - -.pending-header h2 { - margin: 0; - color: #123C46; - font-family: "Noto Serif CJK SC", "Noto Serif SC", Georgia, "Songti SC", serif; - font-size: 1.6rem; - font-weight: 800; - line-height: 1.25; -} - -.pending-header p { - margin: 8px 0 0; - color: #6C8B91; - font-size: 13px; - font-weight: 500; - line-height: 1.5; -} - -.pending-list { - margin-top: 20px; - border-top: 1px solid #DCEBE6; -} - -.pending-row { - display: grid; - grid-template-columns: auto minmax(0, 1fr) auto; - align-items: center; - gap: 16px; - padding: 20px 0; - border-bottom: 1px solid #DCEBE6; -} - -.pending-letter { - display: inline-flex; - align-items: center; - justify-content: center; - flex: none; - width: 30px; - height: 30px; - border: 1px solid #F7B83E; - border-radius: 50%; - background: #FFF3D2; - color: #F7B83E; - font-size: 12px; - font-weight: 800; - line-height: 1; -} - -.pending-row h3 { - margin: 0; - color: #123C46; - font-size: 21px; - font-weight: 800; - line-height: 1.3; -} - -.pending-row p { - margin: 4px 0 0; - color: #6C8B91; - font-size: 12px; - font-weight: 500; - line-height: 1.5; -} - -.pending-status { - display: inline-flex; - align-items: center; - justify-content: center; - padding: 8px 18px; - border: 1px solid #EEDCA9; - border-radius: 999px; - background: #FFF3D2; - color: #335F67; - font-size: 12px; - font-weight: 700; - line-height: 1.2; - white-space: nowrap; -} - -.pending-row-e .pending-letter { - border-color: #F7B83E; - background: #FFF3D2; - color: #F7B83E; -} - -.pending-row-e .pending-status { - border-color: #EEDCA9; - background: #FFF3D2; - color: #335F67; -} - -.pending-row-f .pending-letter { - border-color: #6C73D9; - background: #E5E9FF; - color: #6C73D9; -} - -.pending-row-f .pending-status { - border-color: #CDD4F5; - background: #E5E9FF; - color: #335F67; -} - -.pending-note { - margin: 18px 0 0; - color: #6C8B91; - font-size: 12px; - font-weight: 600; - line-height: 1.5; -} - -/* --- home breakpoints ---------------------------------------------- */ - -@media (min-width: 1024px) { - .question-hero { - grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr); - align-items: start; - gap: 28px; - padding-top: 36px; - } - - .question { - font-size: 15px; - } - - .preview { - font-size: 12px; - } - - .leaderboard-body { - grid-template-columns: minmax(0, 0.5fr) minmax(0, 1fr); - } -} - -@media (min-width: 1280px) { - .question { - font-size: 17px; - } -} - -@media (max-width: 720px) { - .leaderboard { - margin-top: 36px; - border-radius: 24px; - padding: 20px 18px 0; - } - - .question-entry { - padding: 12px 14px 12px; - } - - .crab-frame { - border-radius: 24px; - } -} - -@media (max-width: 640px) { - .pending-row { - grid-template-columns: auto minmax(0, 1fr); - row-gap: 10px; - } - - .pending-status { - grid-column: 2; - justify-self: start; - } - - .pending-row h3 { - font-size: 18px; - } -} - -@media (max-width: 480px) { - .question-hero { - padding-top: 22px; - } - - .question-grid { - margin-top: 18px; - } - - .question-entry { - min-height: 118px; - } - - .champion-score { - font-size: 1.7rem; - } -}