@jait/gateway 0.1.345 → 0.1.347
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/routes/chat.d.ts.map +1 -1
- package/dist/routes/chat.js +63 -65
- package/dist/routes/chat.js.map +1 -1
- package/dist/services/git.d.ts.map +1 -1
- package/dist/services/git.js +21 -2
- package/dist/services/git.js.map +1 -1
- package/dist/tools/prompts/shared-sections.d.ts +3 -3
- package/dist/tools/prompts/shared-sections.d.ts.map +1 -1
- package/dist/tools/prompts/shared-sections.js +3 -0
- package/dist/tools/prompts/shared-sections.js.map +1 -1
- package/package.json +3 -2
- package/skills/architecture/SKILL.md +72 -0
- package/skills/code-review/SKILL.md +63 -0
- package/skills/data-analysis/SKILL.md +69 -0
- package/skills/debugging/SKILL.md +69 -0
- package/skills/deep-research/SKILL.md +69 -0
- package/skills/performance/SKILL.md +66 -0
- package/skills/security-audit/SKILL.md +74 -0
- package/skills/test-generation/SKILL.md +63 -0
- package/web-dist/assets/{_basePickBy-DDZBbVa9.js → _basePickBy-7m9uSnX6.js} +1 -1
- package/web-dist/assets/{_baseUniq-D3y9XHHg.js → _baseUniq-CNxLjwKk.js} +1 -1
- package/web-dist/assets/{arc-BCAp9AaD.js → arc-BpuH1ASj.js} +1 -1
- package/web-dist/assets/{architectureDiagram-2XIMDMQ5-UqF6qgDi.js → architectureDiagram-2XIMDMQ5-CMf9KZUx.js} +1 -1
- package/web-dist/assets/{blockDiagram-WCTKOSBZ-BgA4E7gt.js → blockDiagram-WCTKOSBZ-BI1iHTJW.js} +1 -1
- package/web-dist/assets/{c4Diagram-IC4MRINW-DysDeHPS.js → c4Diagram-IC4MRINW-NXuIpZ1g.js} +1 -1
- package/web-dist/assets/channel-CswqSlDp.js +1 -0
- package/web-dist/assets/{chunk-4BX2VUAB-BCffCkTn.js → chunk-4BX2VUAB-DdvV096e.js} +1 -1
- package/web-dist/assets/{chunk-55IACEB6-nKTLcOPY.js → chunk-55IACEB6-DqsbDuIW.js} +1 -1
- package/web-dist/assets/{chunk-FMBD7UC4-Cyef9s7K.js → chunk-FMBD7UC4-B3UJoKoo.js} +1 -1
- package/web-dist/assets/{chunk-JSJVCQXG-CrYgwrPS.js → chunk-JSJVCQXG-QAdTX2J9.js} +1 -1
- package/web-dist/assets/{chunk-KX2RTZJC-Bg3QWLDg.js → chunk-KX2RTZJC-uqMxBI4o.js} +1 -1
- package/web-dist/assets/{chunk-NQ4KR5QH-BhvTZHn8.js → chunk-NQ4KR5QH-4VS0CknD.js} +1 -1
- package/web-dist/assets/{chunk-QZHKN3VN-e4adOWJg.js → chunk-QZHKN3VN-C4bgHZZ_.js} +1 -1
- package/web-dist/assets/{chunk-WL4C6EOR-DRS_U7LX.js → chunk-WL4C6EOR-CT9EtgfG.js} +1 -1
- package/web-dist/assets/classDiagram-VBA2DB6C-DSV2ytsD.js +1 -0
- package/web-dist/assets/classDiagram-v2-RAHNMMFH-DSV2ytsD.js +1 -0
- package/web-dist/assets/clone-U_ym-Jxf.js +1 -0
- package/web-dist/assets/{cose-bilkent-S5V4N54A-DKjpSdTF.js → cose-bilkent-S5V4N54A-Cb5amYuK.js} +1 -1
- package/web-dist/assets/{dagre-KLK3FWXG-Beok1xve.js → dagre-KLK3FWXG-Dl4U_MbW.js} +1 -1
- package/web-dist/assets/{diagram-E7M64L7V-CH8hwKTm.js → diagram-E7M64L7V-D8ixHFk8.js} +1 -1
- package/web-dist/assets/{diagram-IFDJBPK2-pRXXJopV.js → diagram-IFDJBPK2-BwmZXGZ_.js} +1 -1
- package/web-dist/assets/{diagram-P4PSJMXO-BBR8On_g.js → diagram-P4PSJMXO-CBGbdOkG.js} +1 -1
- package/web-dist/assets/{erDiagram-INFDFZHY-D68qu6h_.js → erDiagram-INFDFZHY-o-v_ghaj.js} +1 -1
- package/web-dist/assets/{flowDiagram-PKNHOUZH-BpVDS62R.js → flowDiagram-PKNHOUZH-CRWhemmh.js} +1 -1
- package/web-dist/assets/{ganttDiagram-A5KZAMGK-DBKzQhCL.js → ganttDiagram-A5KZAMGK-CyKQg4WV.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-K3NZZRJ6-CvBRSFlf.js → gitGraphDiagram-K3NZZRJ6-BQsCcmeH.js} +1 -1
- package/web-dist/assets/{graph-CKR_sYun.js → graph-B5r1M4qg.js} +1 -1
- package/web-dist/assets/index-CTjU2Nic.css +32 -0
- package/web-dist/assets/{index-sO857Q5m.js → index-flnH0xOO.js} +55 -55
- package/web-dist/assets/{infoDiagram-LFFYTUFH-Ly3-UMJR.js → infoDiagram-LFFYTUFH-CTQoqxLe.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-PHBUUO56-C3qLfmyu.js → ishikawaDiagram-PHBUUO56-BQg2G1EU.js} +1 -1
- package/web-dist/assets/{journeyDiagram-4ABVD52K-BU00tgXX.js → journeyDiagram-4ABVD52K-CtHCX-N-.js} +1 -1
- package/web-dist/assets/{kanban-definition-K7BYSVSG-CwSnU5Qv.js → kanban-definition-K7BYSVSG-BBsyaQzd.js} +1 -1
- package/web-dist/assets/{layout-B-s5iZga.js → layout-DL19QG-Y.js} +1 -1
- package/web-dist/assets/{linear-DTsHFF3V.js → linear-Hc_5BvrZ.js} +1 -1
- package/web-dist/assets/{mindmap-definition-YRQLILUH-DOYbhQzM.js → mindmap-definition-YRQLILUH-L3Y60JQk.js} +1 -1
- package/web-dist/assets/{pieDiagram-SKSYHLDU-BkqY9oKT.js → pieDiagram-SKSYHLDU-CByVD3Q2.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-337W2JSQ-CenWciwP.js → quadrantDiagram-337W2JSQ-qY46hZ_L.js} +1 -1
- package/web-dist/assets/{requirementDiagram-Z7DCOOCP-D6yUwSQW.js → requirementDiagram-Z7DCOOCP-DZeF_iOx.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-WA2Y5GQK-zqzGSEUy.js → sankeyDiagram-WA2Y5GQK-Cp-oF87H.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-2WXFIKYE-BZ1AXjDr.js → sequenceDiagram-2WXFIKYE-DETmDDfi.js} +1 -1
- package/web-dist/assets/{stateDiagram-RAJIS63D-BYZ5MN-_.js → stateDiagram-RAJIS63D-DjGzoq8e.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-FVOUBMTO-Cr1Tu2gw.js +1 -0
- package/web-dist/assets/{timeline-definition-YZTLITO2-DXHUGIi-.js → timeline-definition-YZTLITO2-DFVoan0U.js} +1 -1
- package/web-dist/assets/{treemap-KZPCXAKY-CtyGazEG.js → treemap-KZPCXAKY-pWq1SUP-.js} +1 -1
- package/web-dist/assets/{vennDiagram-LZ73GAT5-D_yIv7Ug.js → vennDiagram-LZ73GAT5-Z5Gcf81A.js} +1 -1
- package/web-dist/assets/{xychartDiagram-JWTSCODW-CpJYzW_t.js → xychartDiagram-JWTSCODW-YwHYhGAM.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/assets/channel-D95yUbTA.js +0 -1
- package/web-dist/assets/classDiagram-VBA2DB6C-Dibm0i7y.js +0 -1
- package/web-dist/assets/classDiagram-v2-RAHNMMFH-Dibm0i7y.js +0 -1
- package/web-dist/assets/clone-Ca9jdgiY.js +0 -1
- package/web-dist/assets/index-D-At7mLv.css +0 -32
- package/web-dist/assets/stateDiagram-v2-FVOUBMTO-D_zSXFIT.js +0 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Debugging
|
|
3
|
+
description: Systematic root cause analysis and bug fixing. Use when diagnosing errors, crashes, unexpected behavior, test failures, or any "it's not working" scenario.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Debugging
|
|
7
|
+
|
|
8
|
+
You are performing systematic debugging. Never guess at fixes — understand the root cause first.
|
|
9
|
+
For any debugging task that spans reproduction, diagnosis, editing, and verification, start by creating a non-trivial `todo` plan and keep it current throughout the fix.
|
|
10
|
+
|
|
11
|
+
## Available Tools
|
|
12
|
+
- `read` — read source files, stack traces, logs, config
|
|
13
|
+
- `search` — find definitions, callers, error patterns, related code
|
|
14
|
+
- `execute` — run tests, reproduce errors, check git history
|
|
15
|
+
- `edit` — apply fixes once root cause is identified
|
|
16
|
+
- `todo` — track debugging phases and progress
|
|
17
|
+
- `web` — search for known issues, error messages, library bugs
|
|
18
|
+
|
|
19
|
+
## Process
|
|
20
|
+
|
|
21
|
+
### 1. Set Up Debugging Plan
|
|
22
|
+
```
|
|
23
|
+
todo({ todoList: [
|
|
24
|
+
{ id: 1, title: "Gather evidence and read errors", status: "in-progress" },
|
|
25
|
+
{ id: 2, title: "Trace execution to root cause", status: "not-started" },
|
|
26
|
+
{ id: 3, title: "Implement fix", status: "not-started" },
|
|
27
|
+
{ id: 4, title: "Verify fix passes", status: "not-started" },
|
|
28
|
+
{ id: 5, title: "Check for similar patterns", status: "not-started" }
|
|
29
|
+
]})
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 2. Gather Evidence
|
|
33
|
+
- Use `read` on the error location, stack trace, and relevant logs
|
|
34
|
+
- Use `execute` to check `git log` or `git diff` for recent changes near the failure
|
|
35
|
+
- Use `search` to find the failing function and its callers
|
|
36
|
+
- If the error message is unfamiliar, use `web` to search for known issues
|
|
37
|
+
|
|
38
|
+
### 3. Trace Execution
|
|
39
|
+
- Start from the error location and trace backwards with `read`
|
|
40
|
+
- Use `search` to find where data originates and how it transforms
|
|
41
|
+
- Identify where actual value diverges from expected value
|
|
42
|
+
- Check for: null propagation, type mismatches, stale state, race conditions
|
|
43
|
+
|
|
44
|
+
### 4. Identify Root Cause
|
|
45
|
+
Before writing any fix, state clearly:
|
|
46
|
+
- **What is happening**: The concrete behavior observed
|
|
47
|
+
- **Why it happens**: The specific code path producing the wrong result
|
|
48
|
+
- **Root cause**: The underlying flaw, not just where it manifests
|
|
49
|
+
|
|
50
|
+
### 5. Fix
|
|
51
|
+
- Use `edit` to apply the minimal correct fix at the root cause
|
|
52
|
+
- Use `search` to find similar patterns elsewhere that might have the same bug
|
|
53
|
+
- Use `edit` to fix those too if found
|
|
54
|
+
|
|
55
|
+
### 6. Verify
|
|
56
|
+
- Use `execute` to run the failing test/scenario
|
|
57
|
+
- Use `execute` to run related tests to check for regressions
|
|
58
|
+
- Update `todo` to mark verification complete
|
|
59
|
+
|
|
60
|
+
## Rules
|
|
61
|
+
- Treat `todo` as required for multi-step debugging, not as optional bookkeeping
|
|
62
|
+
- Use evidence to justify the root cause before editing code
|
|
63
|
+
- Prefer the smallest fix that addresses the actual cause
|
|
64
|
+
- Re-run the failing scenario and nearby regressions after the fix
|
|
65
|
+
|
|
66
|
+
## Anti-Patterns to Avoid
|
|
67
|
+
- Adding try/catch around symptoms without fixing the cause
|
|
68
|
+
- Changing multiple things at once hoping something works
|
|
69
|
+
- Adding null checks everywhere instead of understanding why null appears
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Deep Research
|
|
3
|
+
description: Systematic web research with source triangulation, structured synthesis, and citations. Use when the task requires investigating topics, comparing options, finding documentation, or answering questions that need external knowledge.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Deep Research
|
|
7
|
+
|
|
8
|
+
You are conducting structured research. Follow this methodology rigorously.
|
|
9
|
+
|
|
10
|
+
## Available Tools
|
|
11
|
+
- `web` (mode: "search") — search the web with multiple providers
|
|
12
|
+
- `web` (mode: "fetch") — fetch and read full page content from URLs
|
|
13
|
+
- `read` — read local files for context
|
|
14
|
+
- `search` — search the codebase for relevant code
|
|
15
|
+
- `todo` — track your research progress through phases
|
|
16
|
+
- `jait` (action: "memory_save") — persist key findings to memory
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
### 1. Plan the Research
|
|
21
|
+
Use `todo` to create a structured plan before starting:
|
|
22
|
+
```
|
|
23
|
+
todo({ todoList: [
|
|
24
|
+
{ id: 1, title: "Decompose question into sub-queries", status: "in-progress" },
|
|
25
|
+
{ id: 2, title: "Search: [sub-question 1]", status: "not-started" },
|
|
26
|
+
{ id: 3, title: "Search: [sub-question 2]", status: "not-started" },
|
|
27
|
+
{ id: 4, title: "Deep-read top sources", status: "not-started" },
|
|
28
|
+
{ id: 5, title: "Cross-reference and triangulate", status: "not-started" },
|
|
29
|
+
{ id: 6, title: "Synthesize findings", status: "not-started" }
|
|
30
|
+
]})
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Decompose the Question
|
|
34
|
+
Break the query into 2-5 specific sub-questions. Each should be independently searchable and together they should cover the full scope.
|
|
35
|
+
|
|
36
|
+
### 3. Multi-Source Search
|
|
37
|
+
For each sub-question, mark it in-progress with `todo` then:
|
|
38
|
+
- Use `web` with mode "search" to find relevant sources
|
|
39
|
+
- Use at least 2 different search queries per sub-question (rephrase for coverage)
|
|
40
|
+
- Prefer primary sources (official docs, papers, repos) over summaries
|
|
41
|
+
|
|
42
|
+
### 4. Deep Read
|
|
43
|
+
For the most promising results:
|
|
44
|
+
- Use `web` with mode "fetch" and specific URLs to read full content
|
|
45
|
+
- Extract specific facts, code examples, version numbers, dates
|
|
46
|
+
- Note contradictions between sources
|
|
47
|
+
|
|
48
|
+
### 5. Triangulate
|
|
49
|
+
- Cross-reference claims across at least 2 independent sources
|
|
50
|
+
- Flag anything that appears in only one source as "unverified"
|
|
51
|
+
- Prefer recent sources when information may be time-sensitive
|
|
52
|
+
|
|
53
|
+
### 6. Synthesize
|
|
54
|
+
Structure your findings as:
|
|
55
|
+
- **Answer**: Direct, concise answer to the original question
|
|
56
|
+
- **Key Findings**: Bulleted list of important facts with source attribution
|
|
57
|
+
- **Confidence**: High/Medium/Low based on source agreement and quality
|
|
58
|
+
- **Sources**: List URLs and what each contributed
|
|
59
|
+
|
|
60
|
+
Use `jait` with action "memory_save" to persist important findings for future reference.
|
|
61
|
+
|
|
62
|
+
## Rules
|
|
63
|
+
- Update `todo` after completing each phase so progress is visible in real time
|
|
64
|
+
- Treat `todo` as required for this skill from the first step onward
|
|
65
|
+
- **Always mark the final todo item as completed** when you finish the synthesis — do not end your response with any todo still in-progress
|
|
66
|
+
- Never present a single source's claim as established fact
|
|
67
|
+
- Always include source URLs so the user can verify
|
|
68
|
+
- If sources disagree, present both positions with attribution
|
|
69
|
+
- If you cannot find reliable information, say so explicitly rather than guessing
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Performance Optimization
|
|
3
|
+
description: Performance analysis, profiling, and optimization. Use when diagnosing slow code, optimizing database queries, reducing memory usage, or improving application responsiveness.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Performance Optimization
|
|
7
|
+
|
|
8
|
+
You are optimizing performance. Measure first — never optimize based on intuition alone.
|
|
9
|
+
Performance work is almost always multi-phase. Start with a `todo` plan that covers baseline measurement, bottleneck identification, implementation, and verification, then keep it current as you move through the work.
|
|
10
|
+
|
|
11
|
+
## Available Tools
|
|
12
|
+
- `read` — read source code, configs, query definitions
|
|
13
|
+
- `search` — find hot paths, database queries, bottleneck patterns
|
|
14
|
+
- `execute` — run profilers, benchmarks, EXPLAIN queries, time commands
|
|
15
|
+
- `edit` — apply optimizations
|
|
16
|
+
- `web` — research optimization techniques, library performance guides
|
|
17
|
+
- `todo` — track optimization phases and measurements
|
|
18
|
+
|
|
19
|
+
## Process
|
|
20
|
+
|
|
21
|
+
### 1. Plan the Optimization
|
|
22
|
+
```
|
|
23
|
+
todo({ todoList: [
|
|
24
|
+
{ id: 1, title: "Define problem and target", status: "in-progress" },
|
|
25
|
+
{ id: 2, title: "Measure baseline performance", status: "not-started" },
|
|
26
|
+
{ id: 3, title: "Identify bottleneck", status: "not-started" },
|
|
27
|
+
{ id: 4, title: "Apply optimization", status: "not-started" },
|
|
28
|
+
{ id: 5, title: "Measure improvement", status: "not-started" },
|
|
29
|
+
{ id: 6, title: "Verify correctness preserved", status: "not-started" }
|
|
30
|
+
]})
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Define the Problem
|
|
34
|
+
- What is slow? (API response, build, query, rendering)
|
|
35
|
+
- How slow is it? Use `execute` to measure current performance
|
|
36
|
+
- What is the target? (acceptable latency, throughput)
|
|
37
|
+
|
|
38
|
+
### 3. Measure Baseline
|
|
39
|
+
- Use `execute` to run benchmarks, time commands, profile
|
|
40
|
+
- For DB: use `execute` to run EXPLAIN on slow queries
|
|
41
|
+
- Record exact numbers for before/after comparison
|
|
42
|
+
|
|
43
|
+
### 4. Identify Bottleneck
|
|
44
|
+
- Use `read` to trace the hot path from entry point to response
|
|
45
|
+
- Use `search` to find N+1 patterns, repeated computations, blocking calls
|
|
46
|
+
- Check: sequential vs. parallelizable operations, unnecessary allocations, missing indexes
|
|
47
|
+
|
|
48
|
+
### 5. Optimize (in order of impact)
|
|
49
|
+
1. Algorithm/approach changes — use `edit` to restructure
|
|
50
|
+
2. Eliminate unnecessary work — use `search` to find redundant calls
|
|
51
|
+
3. Parallelize — `edit` to run independent operations concurrently
|
|
52
|
+
4. Cache — `edit` to add caching with proper invalidation
|
|
53
|
+
5. Batch — combine multiple small operations
|
|
54
|
+
|
|
55
|
+
### 6. Verify
|
|
56
|
+
- Use `execute` to measure after the change — confirm improvement
|
|
57
|
+
- Use `execute` to run tests — confirm correctness preserved
|
|
58
|
+
- Compare before/after numbers explicitly
|
|
59
|
+
|
|
60
|
+
## Rules
|
|
61
|
+
- Update `todo` as you complete each phase
|
|
62
|
+
- Treat `todo` as required unless the task is a single measurement with no follow-up change
|
|
63
|
+
- Always measure before and after — "it feels faster" is not evidence
|
|
64
|
+
- Optimize the biggest bottleneck first
|
|
65
|
+
- Don't sacrifice readability for marginal gains in cold paths
|
|
66
|
+
- Document why an optimization exists if it makes code less obvious
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Security Audit
|
|
3
|
+
description: Security-focused code analysis covering OWASP Top 10, authentication, authorization, and data protection. Use when auditing code for vulnerabilities, reviewing security-sensitive changes, or hardening an application.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Security Audit
|
|
7
|
+
|
|
8
|
+
You are performing a security audit. Be systematic and evidence-based.
|
|
9
|
+
Security audits are inherently multi-step. Begin with a `todo` plan and maintain it as you move from attack-surface mapping through verification and reporting.
|
|
10
|
+
|
|
11
|
+
## Available Tools
|
|
12
|
+
- `read` — read source files, configs, environment setup, auth logic
|
|
13
|
+
- `search` — find input handling, auth checks, SQL queries, shell exec, URL construction
|
|
14
|
+
- `execute` — run dependency audits, check for known CVEs, test exploit paths
|
|
15
|
+
- `web` — research CVEs, vulnerability databases, library advisories
|
|
16
|
+
- `todo` — track audit phases and findings count
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
### 1. Plan the Audit
|
|
21
|
+
```
|
|
22
|
+
todo({ todoList: [
|
|
23
|
+
{ id: 1, title: "Map attack surface (entry points)", status: "in-progress" },
|
|
24
|
+
{ id: 2, title: "Check injection vectors", status: "not-started" },
|
|
25
|
+
{ id: 3, title: "Audit authentication & authorization", status: "not-started" },
|
|
26
|
+
{ id: 4, title: "Check secrets & data exposure", status: "not-started" },
|
|
27
|
+
{ id: 5, title: "Scan dependencies for CVEs", status: "not-started" },
|
|
28
|
+
{ id: 6, title: "Compile findings report", status: "not-started" }
|
|
29
|
+
]})
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 2. Map Attack Surface
|
|
33
|
+
Use `search` to find:
|
|
34
|
+
- All HTTP route handlers and WebSocket endpoints
|
|
35
|
+
- All `execute`/shell/spawn calls
|
|
36
|
+
- All file system operations with user-influenced paths
|
|
37
|
+
- All database query construction
|
|
38
|
+
|
|
39
|
+
### 3. Check Injection Vectors
|
|
40
|
+
For each entry point found:
|
|
41
|
+
- Use `read` to trace user input from entry to usage
|
|
42
|
+
- Use `search` to find if parameterized queries are used consistently
|
|
43
|
+
- Check shell commands for unescaped input
|
|
44
|
+
- Check file paths for traversal guards (`../`)
|
|
45
|
+
|
|
46
|
+
### 4. Audit Auth
|
|
47
|
+
- Use `search` for auth middleware, JWT validation, session handling
|
|
48
|
+
- Use `read` to verify auth is enforced on all sensitive routes
|
|
49
|
+
- Check for IDOR (can user A access user B's resources?)
|
|
50
|
+
- Verify role checks on admin endpoints
|
|
51
|
+
|
|
52
|
+
### 5. Check Secrets & Data
|
|
53
|
+
- Use `search` for hardcoded API keys, passwords, tokens
|
|
54
|
+
- Use `read` on `.gitignore` and env config to verify secrets are excluded
|
|
55
|
+
- Check logging for sensitive data leaks
|
|
56
|
+
|
|
57
|
+
### 6. Scan Dependencies
|
|
58
|
+
- Use `execute` to run `npm audit` or equivalent
|
|
59
|
+
- Use `web` to check for known CVEs in major dependencies
|
|
60
|
+
|
|
61
|
+
### 7. Report
|
|
62
|
+
For each vulnerability:
|
|
63
|
+
- **Severity**: Critical / High / Medium / Low
|
|
64
|
+
- **Location**: File path and line number
|
|
65
|
+
- **Description**: What the vulnerability is
|
|
66
|
+
- **Exploit**: How an attacker could abuse it
|
|
67
|
+
- **Fix**: Specific code change
|
|
68
|
+
|
|
69
|
+
## Rules
|
|
70
|
+
- Update `todo` as you complete each audit phase
|
|
71
|
+
- Treat `todo` as required for this skill
|
|
72
|
+
- Only report real, exploitable issues — not theoretical concerns
|
|
73
|
+
- Include a fix suggestion for every finding
|
|
74
|
+
- Prioritize by actual risk, not checklist order
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Test Generation
|
|
3
|
+
description: Generate comprehensive tests with good coverage strategy. Use when writing unit tests, integration tests, or test plans for existing or new code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test Generation
|
|
7
|
+
|
|
8
|
+
You are writing tests. Focus on testing behavior and edge cases, not implementation details.
|
|
9
|
+
If the task involves multiple test cases, fixtures, or validation steps, start with a `todo` plan before writing tests. Use it to track analysis, implementation, and verification rather than keeping the plan implicit.
|
|
10
|
+
|
|
11
|
+
## Available Tools
|
|
12
|
+
- `read` — read the code under test and existing test files
|
|
13
|
+
- `search` — find related tests, test utilities, mock patterns in the codebase
|
|
14
|
+
- `execute` — run tests to verify they pass, check coverage
|
|
15
|
+
- `edit` — write new test files or add test cases
|
|
16
|
+
- `todo` — track test case creation progress
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
|
|
20
|
+
### 1. Plan Test Coverage
|
|
21
|
+
Use `read` to analyze the code under test, then plan with `todo`:
|
|
22
|
+
```
|
|
23
|
+
todo({ todoList: [
|
|
24
|
+
{ id: 1, title: "Analyze code and map branches", status: "in-progress" },
|
|
25
|
+
{ id: 2, title: "Check existing test patterns", status: "not-started" },
|
|
26
|
+
{ id: 3, title: "Write happy path tests", status: "not-started" },
|
|
27
|
+
{ id: 4, title: "Write edge case tests", status: "not-started" },
|
|
28
|
+
{ id: 5, title: "Write error path tests", status: "not-started" },
|
|
29
|
+
{ id: 6, title: "Run and verify all tests pass", status: "not-started" }
|
|
30
|
+
]})
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 2. Analyze Code Under Test
|
|
34
|
+
- Use `read` to study the function/module thoroughly
|
|
35
|
+
- Map decision branches (if/else, switch, error throws, early returns)
|
|
36
|
+
- Identify external dependencies (DB, APIs, file system)
|
|
37
|
+
- Use `search` to find existing test utilities, mocks, and fixtures
|
|
38
|
+
|
|
39
|
+
### 3. Check Existing Patterns
|
|
40
|
+
- Use `search` to find how tests are written in this project
|
|
41
|
+
- Match the existing test framework, assertion style, and naming conventions
|
|
42
|
+
- Reuse existing test helpers and mock setups
|
|
43
|
+
|
|
44
|
+
### 4. Write Tests
|
|
45
|
+
Use `edit` to create test files. Cover:
|
|
46
|
+
|
|
47
|
+
**Happy path**: Normal usage with typical inputs
|
|
48
|
+
**Edge cases**: Empty inputs, nulls, boundary values, single-element collections, unicode
|
|
49
|
+
**Error paths**: Invalid inputs, missing fields, service failures, timeouts
|
|
50
|
+
**State transitions**: Initial → after action → expected state (for stateful code)
|
|
51
|
+
|
|
52
|
+
### 5. Verify
|
|
53
|
+
- Use `execute` to run the new tests
|
|
54
|
+
- Confirm all pass
|
|
55
|
+
- Check that error path tests actually test the error (not just "no crash")
|
|
56
|
+
|
|
57
|
+
## Rules
|
|
58
|
+
- Update `todo` as you complete each test group
|
|
59
|
+
- Treat `todo` as mandatory for multi-step test work; only skip it for truly tiny one-test changes
|
|
60
|
+
- Each test should test one behavior with a clear descriptive name
|
|
61
|
+
- Use realistic test data, not "test" or "foo"
|
|
62
|
+
- Mock at boundaries, not deep internals
|
|
63
|
+
- Don't test private implementation details that may change
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,e as l,k as I,g as O,h as P,j as w,l as _,m,t as F,n as M}from"./_baseUniq-
|
|
1
|
+
import{c as b,e as l,k as I,g as O,h as P,j as w,l as _,m,t as F,n as M}from"./_baseUniq-CNxLjwKk.js";import{aS as A,at as E,aT as N,aU as p,aV as S,aW as x,aX as T,aY as $,aZ as G,a_ as v,a$ as L,b0 as R}from"./index-flnH0xOO.js";var g=1/0,X=17976931348623157e292;function Y(n){if(!n)return n===0?n:0;if(n=A(n),n===g||n===-g){var a=n<0?-1:1;return a*X}return n===n?n:0}function q(n){var a=Y(n),r=a%1;return a===a?r?a-r:a:0}function c(n){var a=n==null?0:n.length;return a?b(n):[]}var o=Object.prototype,z=o.hasOwnProperty,j=E(function(n,a){n=Object(n);var r=-1,i=a.length,t=i>2?a[2]:void 0;for(t&&N(a[0],a[1],t)&&(i=1);++r<i;)for(var f=a[r],e=p(f),s=-1,u=e.length;++s<u;){var d=e[s],h=n[d];(h===void 0||S(h,o[d])&&!z.call(n,d))&&(n[d]=f[d])}return n});function k(n){var a=n==null?0:n.length;return a?n[a-1]:void 0}function B(n){return function(a,r,i){var t=Object(a);if(!x(a)){var f=l(r);a=I(a),r=function(s){return f(t[s],s,t)}}var e=n(a,r,i);return e>-1?t[f?a[e]:e]:void 0}}var C=Math.max;function H(n,a,r){var i=n==null?0:n.length;if(!i)return-1;var t=r==null?0:q(r);return t<0&&(t=C(i+t,0)),O(n,l(a),t)}var nn=B(H);function K(n,a){var r=-1,i=x(n)?Array(n.length):[];return P(n,function(t,f,e){i[++r]=a(t,f,e)}),i}function an(n,a){var r=T(n)?w:K;return r(n,l(a))}var U=Object.prototype,W=U.hasOwnProperty;function Z(n,a){return n!=null&&W.call(n,a)}function rn(n,a){return n!=null&&_(n,a,Z)}function D(n,a){return n<a}function J(n,a,r){for(var i=-1,t=n.length;++i<t;){var f=n[i],e=a(f);if(e!=null&&(s===void 0?e===e&&!$(e):r(e,s)))var s=e,u=f}return u}function tn(n){return n&&n.length?J(n,G,D):void 0}function Q(n,a,r,i){if(!v(n))return n;a=m(a,n);for(var t=-1,f=a.length,e=f-1,s=n;s!=null&&++t<f;){var u=F(a[t]),d=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return n;if(t!=e){var h=s[u];d=void 0,d===void 0&&(d=v(h)?h:L(a[t+1])?[]:{})}R(s,u,d),s=s[u]}return n}function en(n,a,r){for(var i=-1,t=a.length,f={};++i<t;){var e=a[i],s=M(n,e);r(s,e)&&Q(f,m(e,n),s)}return f}export{D as a,J as b,K as c,en as d,tn as e,c as f,nn as g,rn as h,j as i,q as j,k as l,an as m,Y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aX as T,aY as U,bo as w,aW as sn,bp as Rn,bq as xn,br as Cn,bs as un,bt as x,aU as B,bu as Mn,bv as on,bw as Fn,bx as L,by as E,bm as gn,bz as R,a_ as ln,bA as mn,bB as D,bC as Dn,bD as Gn,bE as $,b0 as Un,bF as Bn,aV as Nn,bG as X,bH as Kn,bI as Hn,a$ as jn,aZ as cn,bk as qn,bJ as M}from"./index-sO857Q5m.js";function bn(n,r){for(var e=-1,t=n==null?0:n.length,f=Array(t);++e<t;)f[e]=r(n[e],e,n);return f}var J=w?w.prototype:void 0,Q=J?J.toString:void 0;function dn(n){if(typeof n=="string")return n;if(T(n))return bn(n,dn)+"";if(U(n))return Q?Q.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function Yn(){}function pn(n,r){for(var e=-1,t=n==null?0:n.length;++e<t&&r(n[e],e,n)!==!1;);return n}function Zn(n,r,e,t){for(var f=n.length,i=e+-1;++i<f;)if(r(n[i],i,n))return i;return-1}function Xn(n){return n!==n}function Jn(n,r,e){for(var t=e-1,f=n.length;++t<f;)if(n[t]===r)return t;return-1}function Qn(n,r,e){return r===r?Jn(n,r,e):Zn(n,Xn,e)}function Wn(n,r){var e=n==null?0:n.length;return!!e&&Qn(n,r,0)>-1}function _(n){return sn(n)?Rn(n):xn(n)}var zn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vn=/^\w*$/;function N(n,r){if(T(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||U(n)?!0:Vn.test(n)||!zn.test(n)||r!=null&&n in Object(r)}var kn=500;function nr(n){var r=Cn(n,function(t){return e.size===kn&&e.clear(),t}),e=r.cache;return r}var rr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,er=/\\(\\)?/g,tr=nr(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(rr,function(e,t,f,i){r.push(f?i.replace(er,"$1"):t||e)}),r});function ir(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:N(n,r)?[n]:tr(ir(n))}function C(n){if(typeof n=="string"||U(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&e<t;)n=n[C(r[e++])];return e&&e==t?n:void 0}function fr(n,r,e){var t=n==null?void 0:yn(n,r);return t===void 0?e:t}function K(n,r){for(var e=-1,t=r.length,f=n.length;++e<t;)n[f+e]=r[e];return n}var W=w?w.isConcatSpreadable:void 0;function ar(n){return T(n)||un(n)||!!(W&&n&&n[W])}function ht(n,r,e,t,f){var i=-1,a=n.length;for(e||(e=ar),f||(f=[]);++i<a;){var s=n[i];e(s)?K(f,s):t||(f[f.length]=s)}return f}function sr(n,r,e,t){var f=-1,i=n==null?0:n.length;for(t&&i&&(e=n[++f]);++f<i;)e=r(e,n[f],f,n);return e}function ur(n,r){return n&&x(r,_(r),n)}function or(n,r){return n&&x(r,B(r),n)}function Tn(n,r){for(var e=-1,t=n==null?0:n.length,f=0,i=[];++e<t;){var a=n[e];r(a,e,n)&&(i[f++]=a)}return i}function hn(){return[]}var gr=Object.prototype,lr=gr.propertyIsEnumerable,z=Object.getOwnPropertySymbols,H=z?function(n){return n==null?[]:(n=Object(n),Tn(z(n),function(r){return lr.call(n,r)}))}:hn;function cr(n,r){return x(n,H(n),r)}var br=Object.getOwnPropertySymbols,wn=br?function(n){for(var r=[];n;)K(r,H(n)),n=Mn(n);return r}:hn;function dr(n,r){return x(n,wn(n),r)}function On(n,r,e){var t=r(n);return T(n)?t:K(t,e(n))}function G(n){return On(n,_,H)}function pr(n){return On(n,B,wn)}var Ar=Object.prototype,yr=Ar.hasOwnProperty;function Tr(n){var r=n.length,e=new n.constructor(r);return r&&typeof n[0]=="string"&&yr.call(n,"index")&&(e.index=n.index,e.input=n.input),e}function hr(n,r){var e=r?on(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}var wr=/\w*$/;function Or(n){var r=new n.constructor(n.source,wr.exec(n));return r.lastIndex=n.lastIndex,r}var V=w?w.prototype:void 0,k=V?V.valueOf:void 0;function _r(n){return k?Object(k.call(n)):{}}var $r="[object Boolean]",Er="[object Date]",Ir="[object Map]",Sr="[object Number]",Pr="[object RegExp]",vr="[object Set]",Lr="[object String]",Rr="[object Symbol]",xr="[object ArrayBuffer]",Cr="[object DataView]",Mr="[object Float32Array]",Fr="[object Float64Array]",mr="[object Int8Array]",Dr="[object Int16Array]",Gr="[object Int32Array]",Ur="[object Uint8Array]",Br="[object Uint8ClampedArray]",Nr="[object Uint16Array]",Kr="[object Uint32Array]";function Hr(n,r,e){var t=n.constructor;switch(r){case xr:return on(n);case $r:case Er:return new t(+n);case Cr:return hr(n,e);case Mr:case Fr:case mr:case Dr:case Gr:case Ur:case Br:case Nr:case Kr:return Fn(n,e);case Ir:return new t;case Sr:case Lr:return new t(n);case Pr:return Or(n);case vr:return new t;case Rr:return _r(n)}}var jr="[object Map]";function qr(n){return L(n)&&E(n)==jr}var nn=R&&R.isMap,Yr=nn?gn(nn):qr,Zr="[object Set]";function Xr(n){return L(n)&&E(n)==Zr}var rn=R&&R.isSet,Jr=rn?gn(rn):Xr,Qr=1,Wr=2,zr=4,_n="[object Arguments]",Vr="[object Array]",kr="[object Boolean]",ne="[object Date]",re="[object Error]",$n="[object Function]",ee="[object GeneratorFunction]",te="[object Map]",ie="[object Number]",En="[object Object]",fe="[object RegExp]",ae="[object Set]",se="[object String]",ue="[object Symbol]",oe="[object WeakMap]",ge="[object ArrayBuffer]",le="[object DataView]",ce="[object Float32Array]",be="[object Float64Array]",de="[object Int8Array]",pe="[object Int16Array]",Ae="[object Int32Array]",ye="[object Uint8Array]",Te="[object Uint8ClampedArray]",he="[object Uint16Array]",we="[object Uint32Array]",g={};g[_n]=g[Vr]=g[ge]=g[le]=g[kr]=g[ne]=g[ce]=g[be]=g[de]=g[pe]=g[Ae]=g[te]=g[ie]=g[En]=g[fe]=g[ae]=g[se]=g[ue]=g[ye]=g[Te]=g[he]=g[we]=!0;g[re]=g[$n]=g[oe]=!1;function F(n,r,e,t,f,i){var a,s=r&Qr,u=r&Wr,b=r&zr;if(a!==void 0)return a;if(!ln(n))return n;var l=T(n);if(l){if(a=Tr(n),!s)return mn(n,a)}else{var o=E(n),c=o==$n||o==ee;if(D(n))return Dn(n,s);if(o==En||o==_n||c&&!f){if(a=u||c?{}:Gn(n),!s)return u?dr(n,or(a,n)):cr(n,ur(a,n))}else{if(!g[o])return f?n:{};a=Hr(n,o,s)}}i||(i=new $);var h=i.get(n);if(h)return h;i.set(n,a),Jr(n)?n.forEach(function(d){a.add(F(d,r,e,d,n,i))}):Yr(n)&&n.forEach(function(d,p){a.set(p,F(d,r,e,p,n,i))});var A=b?u?pr:G:u?B:_,y=l?void 0:A(n);return pn(y||n,function(d,p){y&&(p=d,d=n[p]),Un(a,p,F(d,r,e,p,n,i))}),a}var Oe="__lodash_hash_undefined__";function _e(n){return this.__data__.set(n,Oe),this}function $e(n){return this.__data__.has(n)}function I(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new Bn;++r<e;)this.add(n[r])}I.prototype.add=I.prototype.push=_e;I.prototype.has=$e;function Ee(n,r){for(var e=-1,t=n==null?0:n.length;++e<t;)if(r(n[e],e,n))return!0;return!1}function In(n,r){return n.has(r)}var Ie=1,Se=2;function Sn(n,r,e,t,f,i){var a=e&Ie,s=n.length,u=r.length;if(s!=u&&!(a&&u>s))return!1;var b=i.get(n),l=i.get(r);if(b&&l)return b==r&&l==n;var o=-1,c=!0,h=e&Se?new I:void 0;for(i.set(n,r),i.set(r,n);++o<s;){var A=n[o],y=r[o];if(t)var d=a?t(y,A,o,r,n,i):t(A,y,o,n,r,i);if(d!==void 0){if(d)continue;c=!1;break}if(h){if(!Ee(r,function(p,O){if(!In(h,O)&&(A===p||f(A,p,e,t,i)))return h.push(O)})){c=!1;break}}else if(!(A===y||f(A,y,e,t,i))){c=!1;break}}return i.delete(n),i.delete(r),c}function Pe(n){var r=-1,e=Array(n.size);return n.forEach(function(t,f){e[++r]=[f,t]}),e}function j(n){var r=-1,e=Array(n.size);return n.forEach(function(t){e[++r]=t}),e}var ve=1,Le=2,Re="[object Boolean]",xe="[object Date]",Ce="[object Error]",Me="[object Map]",Fe="[object Number]",me="[object RegExp]",De="[object Set]",Ge="[object String]",Ue="[object Symbol]",Be="[object ArrayBuffer]",Ne="[object DataView]",en=w?w.prototype:void 0,m=en?en.valueOf:void 0;function Ke(n,r,e,t,f,i,a){switch(e){case Ne:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case Be:return!(n.byteLength!=r.byteLength||!i(new X(n),new X(r)));case Re:case xe:case Fe:return Nn(+n,+r);case Ce:return n.name==r.name&&n.message==r.message;case me:case Ge:return n==r+"";case Me:var s=Pe;case De:var u=t&ve;if(s||(s=j),n.size!=r.size&&!u)return!1;var b=a.get(n);if(b)return b==r;t|=Le,a.set(n,r);var l=Sn(s(n),s(r),t,f,i,a);return a.delete(n),l;case Ue:if(m)return m.call(n)==m.call(r)}return!1}var He=1,je=Object.prototype,qe=je.hasOwnProperty;function Ye(n,r,e,t,f,i){var a=e&He,s=G(n),u=s.length,b=G(r),l=b.length;if(u!=l&&!a)return!1;for(var o=u;o--;){var c=s[o];if(!(a?c in r:qe.call(r,c)))return!1}var h=i.get(n),A=i.get(r);if(h&&A)return h==r&&A==n;var y=!0;i.set(n,r),i.set(r,n);for(var d=a;++o<u;){c=s[o];var p=n[c],O=r[c];if(t)var Z=a?t(O,p,c,r,n,i):t(p,O,c,n,r,i);if(!(Z===void 0?p===O||f(p,O,e,t,i):Z)){y=!1;break}d||(d=c=="constructor")}if(y&&!d){var S=n.constructor,P=r.constructor;S!=P&&"constructor"in n&&"constructor"in r&&!(typeof S=="function"&&S instanceof S&&typeof P=="function"&&P instanceof P)&&(y=!1)}return i.delete(n),i.delete(r),y}var Ze=1,tn="[object Arguments]",fn="[object Array]",v="[object Object]",Xe=Object.prototype,an=Xe.hasOwnProperty;function Je(n,r,e,t,f,i){var a=T(n),s=T(r),u=a?fn:E(n),b=s?fn:E(r);u=u==tn?v:u,b=b==tn?v:b;var l=u==v,o=b==v,c=u==b;if(c&&D(n)){if(!D(r))return!1;a=!0,l=!1}if(c&&!l)return i||(i=new $),a||Kn(n)?Sn(n,r,e,t,f,i):Ke(n,r,u,e,t,f,i);if(!(e&Ze)){var h=l&&an.call(n,"__wrapped__"),A=o&&an.call(r,"__wrapped__");if(h||A){var y=h?n.value():n,d=A?r.value():r;return i||(i=new $),f(y,d,e,t,i)}}return c?(i||(i=new $),Ye(n,r,e,t,f,i)):!1}function q(n,r,e,t,f){return n===r?!0:n==null||r==null||!L(n)&&!L(r)?n!==n&&r!==r:Je(n,r,e,t,q,f)}var Qe=1,We=2;function ze(n,r,e,t){var f=e.length,i=f;if(n==null)return!i;for(n=Object(n);f--;){var a=e[f];if(a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++f<i;){a=e[f];var s=a[0],u=n[s],b=a[1];if(a[2]){if(u===void 0&&!(s in n))return!1}else{var l=new $,o;if(!(o===void 0?q(b,u,Qe|We,t,l):o))return!1}}return!0}function Pn(n){return n===n&&!ln(n)}function Ve(n){for(var r=_(n),e=r.length;e--;){var t=r[e],f=n[t];r[e]=[t,f,Pn(f)]}return r}function vn(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function ke(n){var r=Ve(n);return r.length==1&&r[0][2]?vn(r[0][0],r[0][1]):function(e){return e===n||ze(e,n,r)}}function nt(n,r){return n!=null&&r in Object(n)}function rt(n,r,e){r=An(r,n);for(var t=-1,f=r.length,i=!1;++t<f;){var a=C(r[t]);if(!(i=n!=null&&e(n,a)))break;n=n[a]}return i||++t!=f?i:(f=n==null?0:n.length,!!f&&Hn(f)&&jn(a,f)&&(T(n)||un(n)))}function et(n,r){return n!=null&&rt(n,r,nt)}var tt=1,it=2;function ft(n,r){return N(n)&&Pn(r)?vn(C(n),r):function(e){var t=fr(e,n);return t===void 0&&t===r?et(e,n):q(r,t,tt|it)}}function at(n){return function(r){return r==null?void 0:r[n]}}function st(n){return function(r){return yn(r,n)}}function ut(n){return N(n)?at(C(n)):st(n)}function Ln(n){return typeof n=="function"?n:n==null?cn:typeof n=="object"?T(n)?ft(n[0],n[1]):ke(n):ut(n)}function ot(n,r){return n&&qn(n,r,_)}function gt(n,r){return function(e,t){if(e==null)return e;if(!sn(e))return n(e,t);for(var f=e.length,i=-1,a=Object(e);++i<f&&t(a[i],i,a)!==!1;);return e}}var Y=gt(ot);function lt(n){return typeof n=="function"?n:cn}function wt(n,r){var e=T(n)?pn:Y;return e(n,lt(r))}function ct(n,r){var e=[];return Y(n,function(t,f,i){r(t,f,i)&&e.push(t)}),e}function Ot(n,r){var e=T(n)?Tn:ct;return e(n,Ln(r))}function bt(n,r){return bn(r,function(e){return n[e]})}function _t(n){return n==null?[]:bt(n,_(n))}function $t(n){return n===void 0}function dt(n,r,e,t,f){return f(n,function(i,a,s){e=t?(t=!1,i):r(e,i,a,s)}),e}function Et(n,r,e){var t=T(n)?sr:dt,f=arguments.length<3;return t(n,Ln(r),e,f,Y)}var pt=1/0,At=M&&1/j(new M([,-0]))[1]==pt?function(n){return new M(n)}:Yn,yt=200;function It(n,r,e){var t=-1,f=Wn,i=n.length,a=!0,s=[],u=s;if(i>=yt){var b=r?null:At(n);if(b)return j(b);a=!1,f=In,u=new I}else u=r?[]:s;n:for(;++t<i;){var l=n[t],o=r?r(l):l;if(l=l!==0?l:0,a&&o===o){for(var c=u.length;c--;)if(u[c]===o)continue n;r&&u.push(o),s.push(l)}else f(u,o,e)||(u!==s&&u.push(o),s.push(l))}return s}export{ct as A,Ee as B,Yn as C,I as S,It as a,F as b,ht as c,wt as d,Ln as e,Ot as f,Zn as g,Y as h,$t as i,bn as j,_ as k,rt as l,An as m,yn as n,lt as o,ot as p,et as q,Et as r,ir as s,C as t,Wn as u,_t as v,In as w,Qn as x,pr as y,Tn as z};
|
|
1
|
+
import{aX as T,aY as U,bo as w,aW as sn,bp as Rn,bq as xn,br as Cn,bs as un,bt as x,aU as B,bu as Mn,bv as on,bw as Fn,bx as L,by as E,bm as gn,bz as R,a_ as ln,bA as mn,bB as D,bC as Dn,bD as Gn,bE as $,b0 as Un,bF as Bn,aV as Nn,bG as X,bH as Kn,bI as Hn,a$ as jn,aZ as cn,bk as qn,bJ as M}from"./index-flnH0xOO.js";function bn(n,r){for(var e=-1,t=n==null?0:n.length,f=Array(t);++e<t;)f[e]=r(n[e],e,n);return f}var J=w?w.prototype:void 0,Q=J?J.toString:void 0;function dn(n){if(typeof n=="string")return n;if(T(n))return bn(n,dn)+"";if(U(n))return Q?Q.call(n):"";var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function Yn(){}function pn(n,r){for(var e=-1,t=n==null?0:n.length;++e<t&&r(n[e],e,n)!==!1;);return n}function Zn(n,r,e,t){for(var f=n.length,i=e+-1;++i<f;)if(r(n[i],i,n))return i;return-1}function Xn(n){return n!==n}function Jn(n,r,e){for(var t=e-1,f=n.length;++t<f;)if(n[t]===r)return t;return-1}function Qn(n,r,e){return r===r?Jn(n,r,e):Zn(n,Xn,e)}function Wn(n,r){var e=n==null?0:n.length;return!!e&&Qn(n,r,0)>-1}function _(n){return sn(n)?Rn(n):xn(n)}var zn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vn=/^\w*$/;function N(n,r){if(T(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||U(n)?!0:Vn.test(n)||!zn.test(n)||r!=null&&n in Object(r)}var kn=500;function nr(n){var r=Cn(n,function(t){return e.size===kn&&e.clear(),t}),e=r.cache;return r}var rr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,er=/\\(\\)?/g,tr=nr(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(rr,function(e,t,f,i){r.push(f?i.replace(er,"$1"):t||e)}),r});function ir(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:N(n,r)?[n]:tr(ir(n))}function C(n){if(typeof n=="string"||U(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&e<t;)n=n[C(r[e++])];return e&&e==t?n:void 0}function fr(n,r,e){var t=n==null?void 0:yn(n,r);return t===void 0?e:t}function K(n,r){for(var e=-1,t=r.length,f=n.length;++e<t;)n[f+e]=r[e];return n}var W=w?w.isConcatSpreadable:void 0;function ar(n){return T(n)||un(n)||!!(W&&n&&n[W])}function ht(n,r,e,t,f){var i=-1,a=n.length;for(e||(e=ar),f||(f=[]);++i<a;){var s=n[i];e(s)?K(f,s):t||(f[f.length]=s)}return f}function sr(n,r,e,t){var f=-1,i=n==null?0:n.length;for(t&&i&&(e=n[++f]);++f<i;)e=r(e,n[f],f,n);return e}function ur(n,r){return n&&x(r,_(r),n)}function or(n,r){return n&&x(r,B(r),n)}function Tn(n,r){for(var e=-1,t=n==null?0:n.length,f=0,i=[];++e<t;){var a=n[e];r(a,e,n)&&(i[f++]=a)}return i}function hn(){return[]}var gr=Object.prototype,lr=gr.propertyIsEnumerable,z=Object.getOwnPropertySymbols,H=z?function(n){return n==null?[]:(n=Object(n),Tn(z(n),function(r){return lr.call(n,r)}))}:hn;function cr(n,r){return x(n,H(n),r)}var br=Object.getOwnPropertySymbols,wn=br?function(n){for(var r=[];n;)K(r,H(n)),n=Mn(n);return r}:hn;function dr(n,r){return x(n,wn(n),r)}function On(n,r,e){var t=r(n);return T(n)?t:K(t,e(n))}function G(n){return On(n,_,H)}function pr(n){return On(n,B,wn)}var Ar=Object.prototype,yr=Ar.hasOwnProperty;function Tr(n){var r=n.length,e=new n.constructor(r);return r&&typeof n[0]=="string"&&yr.call(n,"index")&&(e.index=n.index,e.input=n.input),e}function hr(n,r){var e=r?on(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.byteLength)}var wr=/\w*$/;function Or(n){var r=new n.constructor(n.source,wr.exec(n));return r.lastIndex=n.lastIndex,r}var V=w?w.prototype:void 0,k=V?V.valueOf:void 0;function _r(n){return k?Object(k.call(n)):{}}var $r="[object Boolean]",Er="[object Date]",Ir="[object Map]",Sr="[object Number]",Pr="[object RegExp]",vr="[object Set]",Lr="[object String]",Rr="[object Symbol]",xr="[object ArrayBuffer]",Cr="[object DataView]",Mr="[object Float32Array]",Fr="[object Float64Array]",mr="[object Int8Array]",Dr="[object Int16Array]",Gr="[object Int32Array]",Ur="[object Uint8Array]",Br="[object Uint8ClampedArray]",Nr="[object Uint16Array]",Kr="[object Uint32Array]";function Hr(n,r,e){var t=n.constructor;switch(r){case xr:return on(n);case $r:case Er:return new t(+n);case Cr:return hr(n,e);case Mr:case Fr:case mr:case Dr:case Gr:case Ur:case Br:case Nr:case Kr:return Fn(n,e);case Ir:return new t;case Sr:case Lr:return new t(n);case Pr:return Or(n);case vr:return new t;case Rr:return _r(n)}}var jr="[object Map]";function qr(n){return L(n)&&E(n)==jr}var nn=R&&R.isMap,Yr=nn?gn(nn):qr,Zr="[object Set]";function Xr(n){return L(n)&&E(n)==Zr}var rn=R&&R.isSet,Jr=rn?gn(rn):Xr,Qr=1,Wr=2,zr=4,_n="[object Arguments]",Vr="[object Array]",kr="[object Boolean]",ne="[object Date]",re="[object Error]",$n="[object Function]",ee="[object GeneratorFunction]",te="[object Map]",ie="[object Number]",En="[object Object]",fe="[object RegExp]",ae="[object Set]",se="[object String]",ue="[object Symbol]",oe="[object WeakMap]",ge="[object ArrayBuffer]",le="[object DataView]",ce="[object Float32Array]",be="[object Float64Array]",de="[object Int8Array]",pe="[object Int16Array]",Ae="[object Int32Array]",ye="[object Uint8Array]",Te="[object Uint8ClampedArray]",he="[object Uint16Array]",we="[object Uint32Array]",g={};g[_n]=g[Vr]=g[ge]=g[le]=g[kr]=g[ne]=g[ce]=g[be]=g[de]=g[pe]=g[Ae]=g[te]=g[ie]=g[En]=g[fe]=g[ae]=g[se]=g[ue]=g[ye]=g[Te]=g[he]=g[we]=!0;g[re]=g[$n]=g[oe]=!1;function F(n,r,e,t,f,i){var a,s=r&Qr,u=r&Wr,b=r&zr;if(a!==void 0)return a;if(!ln(n))return n;var l=T(n);if(l){if(a=Tr(n),!s)return mn(n,a)}else{var o=E(n),c=o==$n||o==ee;if(D(n))return Dn(n,s);if(o==En||o==_n||c&&!f){if(a=u||c?{}:Gn(n),!s)return u?dr(n,or(a,n)):cr(n,ur(a,n))}else{if(!g[o])return f?n:{};a=Hr(n,o,s)}}i||(i=new $);var h=i.get(n);if(h)return h;i.set(n,a),Jr(n)?n.forEach(function(d){a.add(F(d,r,e,d,n,i))}):Yr(n)&&n.forEach(function(d,p){a.set(p,F(d,r,e,p,n,i))});var A=b?u?pr:G:u?B:_,y=l?void 0:A(n);return pn(y||n,function(d,p){y&&(p=d,d=n[p]),Un(a,p,F(d,r,e,p,n,i))}),a}var Oe="__lodash_hash_undefined__";function _e(n){return this.__data__.set(n,Oe),this}function $e(n){return this.__data__.has(n)}function I(n){var r=-1,e=n==null?0:n.length;for(this.__data__=new Bn;++r<e;)this.add(n[r])}I.prototype.add=I.prototype.push=_e;I.prototype.has=$e;function Ee(n,r){for(var e=-1,t=n==null?0:n.length;++e<t;)if(r(n[e],e,n))return!0;return!1}function In(n,r){return n.has(r)}var Ie=1,Se=2;function Sn(n,r,e,t,f,i){var a=e&Ie,s=n.length,u=r.length;if(s!=u&&!(a&&u>s))return!1;var b=i.get(n),l=i.get(r);if(b&&l)return b==r&&l==n;var o=-1,c=!0,h=e&Se?new I:void 0;for(i.set(n,r),i.set(r,n);++o<s;){var A=n[o],y=r[o];if(t)var d=a?t(y,A,o,r,n,i):t(A,y,o,n,r,i);if(d!==void 0){if(d)continue;c=!1;break}if(h){if(!Ee(r,function(p,O){if(!In(h,O)&&(A===p||f(A,p,e,t,i)))return h.push(O)})){c=!1;break}}else if(!(A===y||f(A,y,e,t,i))){c=!1;break}}return i.delete(n),i.delete(r),c}function Pe(n){var r=-1,e=Array(n.size);return n.forEach(function(t,f){e[++r]=[f,t]}),e}function j(n){var r=-1,e=Array(n.size);return n.forEach(function(t){e[++r]=t}),e}var ve=1,Le=2,Re="[object Boolean]",xe="[object Date]",Ce="[object Error]",Me="[object Map]",Fe="[object Number]",me="[object RegExp]",De="[object Set]",Ge="[object String]",Ue="[object Symbol]",Be="[object ArrayBuffer]",Ne="[object DataView]",en=w?w.prototype:void 0,m=en?en.valueOf:void 0;function Ke(n,r,e,t,f,i,a){switch(e){case Ne:if(n.byteLength!=r.byteLength||n.byteOffset!=r.byteOffset)return!1;n=n.buffer,r=r.buffer;case Be:return!(n.byteLength!=r.byteLength||!i(new X(n),new X(r)));case Re:case xe:case Fe:return Nn(+n,+r);case Ce:return n.name==r.name&&n.message==r.message;case me:case Ge:return n==r+"";case Me:var s=Pe;case De:var u=t&ve;if(s||(s=j),n.size!=r.size&&!u)return!1;var b=a.get(n);if(b)return b==r;t|=Le,a.set(n,r);var l=Sn(s(n),s(r),t,f,i,a);return a.delete(n),l;case Ue:if(m)return m.call(n)==m.call(r)}return!1}var He=1,je=Object.prototype,qe=je.hasOwnProperty;function Ye(n,r,e,t,f,i){var a=e&He,s=G(n),u=s.length,b=G(r),l=b.length;if(u!=l&&!a)return!1;for(var o=u;o--;){var c=s[o];if(!(a?c in r:qe.call(r,c)))return!1}var h=i.get(n),A=i.get(r);if(h&&A)return h==r&&A==n;var y=!0;i.set(n,r),i.set(r,n);for(var d=a;++o<u;){c=s[o];var p=n[c],O=r[c];if(t)var Z=a?t(O,p,c,r,n,i):t(p,O,c,n,r,i);if(!(Z===void 0?p===O||f(p,O,e,t,i):Z)){y=!1;break}d||(d=c=="constructor")}if(y&&!d){var S=n.constructor,P=r.constructor;S!=P&&"constructor"in n&&"constructor"in r&&!(typeof S=="function"&&S instanceof S&&typeof P=="function"&&P instanceof P)&&(y=!1)}return i.delete(n),i.delete(r),y}var Ze=1,tn="[object Arguments]",fn="[object Array]",v="[object Object]",Xe=Object.prototype,an=Xe.hasOwnProperty;function Je(n,r,e,t,f,i){var a=T(n),s=T(r),u=a?fn:E(n),b=s?fn:E(r);u=u==tn?v:u,b=b==tn?v:b;var l=u==v,o=b==v,c=u==b;if(c&&D(n)){if(!D(r))return!1;a=!0,l=!1}if(c&&!l)return i||(i=new $),a||Kn(n)?Sn(n,r,e,t,f,i):Ke(n,r,u,e,t,f,i);if(!(e&Ze)){var h=l&&an.call(n,"__wrapped__"),A=o&&an.call(r,"__wrapped__");if(h||A){var y=h?n.value():n,d=A?r.value():r;return i||(i=new $),f(y,d,e,t,i)}}return c?(i||(i=new $),Ye(n,r,e,t,f,i)):!1}function q(n,r,e,t,f){return n===r?!0:n==null||r==null||!L(n)&&!L(r)?n!==n&&r!==r:Je(n,r,e,t,q,f)}var Qe=1,We=2;function ze(n,r,e,t){var f=e.length,i=f;if(n==null)return!i;for(n=Object(n);f--;){var a=e[f];if(a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++f<i;){a=e[f];var s=a[0],u=n[s],b=a[1];if(a[2]){if(u===void 0&&!(s in n))return!1}else{var l=new $,o;if(!(o===void 0?q(b,u,Qe|We,t,l):o))return!1}}return!0}function Pn(n){return n===n&&!ln(n)}function Ve(n){for(var r=_(n),e=r.length;e--;){var t=r[e],f=n[t];r[e]=[t,f,Pn(f)]}return r}function vn(n,r){return function(e){return e==null?!1:e[n]===r&&(r!==void 0||n in Object(e))}}function ke(n){var r=Ve(n);return r.length==1&&r[0][2]?vn(r[0][0],r[0][1]):function(e){return e===n||ze(e,n,r)}}function nt(n,r){return n!=null&&r in Object(n)}function rt(n,r,e){r=An(r,n);for(var t=-1,f=r.length,i=!1;++t<f;){var a=C(r[t]);if(!(i=n!=null&&e(n,a)))break;n=n[a]}return i||++t!=f?i:(f=n==null?0:n.length,!!f&&Hn(f)&&jn(a,f)&&(T(n)||un(n)))}function et(n,r){return n!=null&&rt(n,r,nt)}var tt=1,it=2;function ft(n,r){return N(n)&&Pn(r)?vn(C(n),r):function(e){var t=fr(e,n);return t===void 0&&t===r?et(e,n):q(r,t,tt|it)}}function at(n){return function(r){return r==null?void 0:r[n]}}function st(n){return function(r){return yn(r,n)}}function ut(n){return N(n)?at(C(n)):st(n)}function Ln(n){return typeof n=="function"?n:n==null?cn:typeof n=="object"?T(n)?ft(n[0],n[1]):ke(n):ut(n)}function ot(n,r){return n&&qn(n,r,_)}function gt(n,r){return function(e,t){if(e==null)return e;if(!sn(e))return n(e,t);for(var f=e.length,i=-1,a=Object(e);++i<f&&t(a[i],i,a)!==!1;);return e}}var Y=gt(ot);function lt(n){return typeof n=="function"?n:cn}function wt(n,r){var e=T(n)?pn:Y;return e(n,lt(r))}function ct(n,r){var e=[];return Y(n,function(t,f,i){r(t,f,i)&&e.push(t)}),e}function Ot(n,r){var e=T(n)?Tn:ct;return e(n,Ln(r))}function bt(n,r){return bn(r,function(e){return n[e]})}function _t(n){return n==null?[]:bt(n,_(n))}function $t(n){return n===void 0}function dt(n,r,e,t,f){return f(n,function(i,a,s){e=t?(t=!1,i):r(e,i,a,s)}),e}function Et(n,r,e){var t=T(n)?sr:dt,f=arguments.length<3;return t(n,Ln(r),e,f,Y)}var pt=1/0,At=M&&1/j(new M([,-0]))[1]==pt?function(n){return new M(n)}:Yn,yt=200;function It(n,r,e){var t=-1,f=Wn,i=n.length,a=!0,s=[],u=s;if(i>=yt){var b=r?null:At(n);if(b)return j(b);a=!1,f=In,u=new I}else u=r?[]:s;n:for(;++t<i;){var l=n[t],o=r?r(l):l;if(l=l!==0?l:0,a&&o===o){for(var c=u.length;c--;)if(u[c]===o)continue n;r&&u.push(o),s.push(l)}else f(u,o,e)||(u!==s&&u.push(o),s.push(l))}return s}export{ct as A,Ee as B,Yn as C,I as S,It as a,F as b,ht as c,wt as d,Ln as e,Ot as f,Zn as g,Y as h,$t as i,bn as j,_ as k,rt as l,An as m,yn as n,lt as o,ot as p,et as q,Et as r,ir as s,C as t,Wn as u,_t as v,In as w,Qn as x,pr as y,Tn as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as ln,N as an,O as y,P as tn,Q as Y,R as O,S as _,T as un,V as rn,W as j,X as o,Y as Q,Z as sn,$ as on,a0 as fn}from"./index-
|
|
1
|
+
import{M as ln,N as an,O as y,P as tn,Q as Y,R as O,S as _,T as un,V as rn,W as j,X as o,Y as Q,Z as sn,$ as on,a0 as fn}from"./index-flnH0xOO.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,D,S,v,R,V,a){var E=D-l,i=S-h,n=V-v,d=a-R,u=d*E-n*i;if(!(u*u<y))return u=(n*(h-R)-d*(l-v))/u,[l+u*E,h+u*i]}function H(l,h,D,S,v,R,V){var a=l-D,E=h-S,i=(V?R:-R)/j(a*a+E*E),n=i*E,d=-i*a,u=l+n,s=h+d,f=D+n,c=S+d,W=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,A=m*m+g*g,T=v-R,P=u*c-f*s,I=(g<0?-1:1)*j(fn(0,T*T*A-P*P)),M=(P*g-m*I)/A,N=(-P*m-g*I)/A,w=(P*g+m*I)/A,p=(-P*m+g*I)/A,x=M-W,e=N-t,r=w-W,X=p-t;return x*x+e*e>r*r+X*X&&(M=w,N=p),{cx:M,cy:N,x01:-n,y01:-d,x11:M*(v/T-1),y11:N*(v/T-1)}}function hn(){var l=cn,h=yn,D=Q(0),S=null,v=gn,R=dn,V=mn,a=null,E=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,W=un(c-f),t=c>f;if(a||(a=n=E()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(W>tn-y)a.moveTo(s*Y(f),s*O(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*Y(c),u*O(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,A=f,T=c,P=W,I=W,M=V.apply(this,arguments)/2,N=M>y&&(S?+S.apply(this,arguments):j(u*u+s*s)),w=_(un(s-u)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(N>y){var X=sn(N/u*O(M)),z=sn(N/s*O(M));(P-=X*2)>y?(X*=t?1:-1,A+=X,T-=X):(P=0,A=T=(f+c)/2),(I-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(I=0,m=g=(f+c)/2)}var Z=s*Y(m),$=s*O(m),B=u*Y(T),C=u*O(T);if(w>y){var F=s*Y(g),G=s*O(g),J=u*Y(A),K=u*O(A),q;if(W<rn)if(q=pn(Z,$,J,K,F,G,B,C)){var L=Z-q[0],U=$-q[1],k=F-q[0],b=G-q[1],nn=1/O(on((L*k+U*b)/(j(L*L+U*U)*j(k*k+b*b)))/2),en=j(q[0]*q[0]+q[1]*q[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}I>y?x>y?(e=H(J,K,Z,$,s,x,t),r=H(F,G,B,C,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(Z,$),a.arc(0,0,s,m,g,!t)):a.moveTo(Z,$),!(u>y)||!(P>y)?a.lineTo(B,C):p>y?(e=H(B,C,F,G,u,-p,t),r=H(Z,$,J,K,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,A,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-rn/2;return[Y(d)*n,O(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:Q(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:Q(+n),i):h},i.cornerRadius=function(n){return arguments.length?(D=typeof n=="function"?n:Q(+n),i):D},i.padRadius=function(n){return arguments.length?(S=n==null?null:typeof n=="function"?n:Q(+n),i):S},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:Q(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:Q(+n),i):R},i.padAngle=function(n){return arguments.length?(V=typeof n=="function"?n:Q(+n),i):V},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|