graphsight 0.1.0__tar.gz
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.
- graphsight-0.1.0/LICENSE +21 -0
- graphsight-0.1.0/MANIFEST.in +2 -0
- graphsight-0.1.0/PKG-INFO +79 -0
- graphsight-0.1.0/README.md +55 -0
- graphsight-0.1.0/graphsight/__init__.py +11 -0
- graphsight-0.1.0/graphsight/cli.py +54 -0
- graphsight-0.1.0/graphsight/dist/assets/arc-282qzf6n.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/architectureDiagram-3BPJPVTR-tSygxTjd.js +36 -0
- graphsight-0.1.0/graphsight/dist/assets/blockDiagram-GPEHLZMM-BYW4VSTy.js +132 -0
- graphsight-0.1.0/graphsight/dist/assets/c4Diagram-AAUBKEIU-DshceuSY.js +10 -0
- graphsight-0.1.0/graphsight/dist/assets/channel-Bytuqw4f.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/chunk-2J33WTMH-CQhGOlU3.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/chunk-4BX2VUAB-cii6B6Oq.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/chunk-55IACEB6-CFyfIrpG.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/chunk-727SXJPM-B1KyzNlo.js +206 -0
- graphsight-0.1.0/graphsight/dist/assets/chunk-AQP2D5EJ-Ba59PxHf.js +231 -0
- graphsight-0.1.0/graphsight/dist/assets/chunk-FMBD7UC4-BmQHBE9I.js +15 -0
- graphsight-0.1.0/graphsight/dist/assets/chunk-ND2GUHAM-QqXGm5Ak.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/chunk-QZHKN3VN-iBcl3HsH.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/classDiagram-4FO5ZUOK-D-CeqiGf.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/classDiagram-v2-Q7XG4LA2-D-CeqiGf.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/cose-bilkent-S5V4N54A-DsHwUTR6.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/cytoscape.esm-DTSO7Bv0.js +331 -0
- graphsight-0.1.0/graphsight/dist/assets/dagre-BM42HDAG-CNsSWoYA.js +4 -0
- graphsight-0.1.0/graphsight/dist/assets/diagram-2AECGRRQ-CMHIHZNi.js +43 -0
- graphsight-0.1.0/graphsight/dist/assets/diagram-5GNKFQAL-kMo5zS3e.js +10 -0
- graphsight-0.1.0/graphsight/dist/assets/diagram-KO2AKTUF-ltGPO4za.js +3 -0
- graphsight-0.1.0/graphsight/dist/assets/diagram-LMA3HP47-CZtVlWur.js +24 -0
- graphsight-0.1.0/graphsight/dist/assets/diagram-OG6HWLK6-DqdvrqB1.js +24 -0
- graphsight-0.1.0/graphsight/dist/assets/erDiagram-TEJ5UH35-p4XJdD9X.js +85 -0
- graphsight-0.1.0/graphsight/dist/assets/flowDiagram-I6XJVG4X-DqrhhzMR.js +162 -0
- graphsight-0.1.0/graphsight/dist/assets/ganttDiagram-6RSMTGT7-BevTTBWs.js +292 -0
- graphsight-0.1.0/graphsight/dist/assets/gitGraphDiagram-PVQCEYII-COt0tajM.js +106 -0
- graphsight-0.1.0/graphsight/dist/assets/graph-CAnANduQ.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/index-CC7N1tRi.css +1 -0
- graphsight-0.1.0/graphsight/dist/assets/index-D4UHTbV2.js +632 -0
- graphsight-0.1.0/graphsight/dist/assets/infoDiagram-5YYISTIA-Ji4Pqivh.js +2 -0
- graphsight-0.1.0/graphsight/dist/assets/ishikawaDiagram-YF4QCWOH-C81Ve9cn.js +70 -0
- graphsight-0.1.0/graphsight/dist/assets/journeyDiagram-JHISSGLW-BbI7_1jI.js +139 -0
- graphsight-0.1.0/graphsight/dist/assets/kanban-definition-UN3LZRKU-C7yEGATn.js +89 -0
- graphsight-0.1.0/graphsight/dist/assets/katex-C5jXJg4s.js +257 -0
- graphsight-0.1.0/graphsight/dist/assets/layout-DGIYPm2g.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/mermaid.core-DNEcyQqL.js +309 -0
- graphsight-0.1.0/graphsight/dist/assets/mindmap-definition-RKZ34NQL-DhzNYyUX.js +96 -0
- graphsight-0.1.0/graphsight/dist/assets/pieDiagram-4H26LBE5-C3OurPuK.js +30 -0
- graphsight-0.1.0/graphsight/dist/assets/quadrantDiagram-W4KKPZXB-m083ryNG.js +7 -0
- graphsight-0.1.0/graphsight/dist/assets/requirementDiagram-4Y6WPE33-D-PTY7Ji.js +84 -0
- graphsight-0.1.0/graphsight/dist/assets/sankeyDiagram-5OEKKPKP-BPznCs16.js +40 -0
- graphsight-0.1.0/graphsight/dist/assets/sequenceDiagram-3UESZ5HK-D0HQH4Ei.js +162 -0
- graphsight-0.1.0/graphsight/dist/assets/stateDiagram-AJRCARHV-DJzoC32N.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/stateDiagram-v2-BHNVJYJU-BMj9TnWE.js +1 -0
- graphsight-0.1.0/graphsight/dist/assets/timeline-definition-PNZ67QCA-BPXKhdeC.js +120 -0
- graphsight-0.1.0/graphsight/dist/assets/vennDiagram-CIIHVFJN-CakkGioY.js +34 -0
- graphsight-0.1.0/graphsight/dist/assets/wardley-L42UT6IY-DJo-t8ql.js +173 -0
- graphsight-0.1.0/graphsight/dist/assets/wardleyDiagram-YWT4CUSO-D2M9EKK8.js +78 -0
- graphsight-0.1.0/graphsight/dist/assets/xychartDiagram-2RQKCTM6-DyXGPUCc.js +7 -0
- graphsight-0.1.0/graphsight/dist/favicon.svg +10 -0
- graphsight-0.1.0/graphsight/dist/index.html +25 -0
- graphsight-0.1.0/graphsight/server.py +54 -0
- graphsight-0.1.0/graphsight.egg-info/PKG-INFO +79 -0
- graphsight-0.1.0/graphsight.egg-info/SOURCES.txt +64 -0
- graphsight-0.1.0/graphsight.egg-info/dependency_links.txt +1 -0
- graphsight-0.1.0/graphsight.egg-info/entry_points.txt +2 -0
- graphsight-0.1.0/graphsight.egg-info/top_level.txt +1 -0
- graphsight-0.1.0/pyproject.toml +40 -0
- graphsight-0.1.0/setup.cfg +4 -0
graphsight-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Arush Karnatak
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: graphsight
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local viewer for agent retrieval traces — open a trace_state.json in the Graphsight Studio with one command, no backend.
|
|
5
|
+
Author: Arush Karnatak
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/Kcodess2807/graphsight
|
|
8
|
+
Project-URL: Documentation, https://github.com/Kcodess2807/graphsight/tree/main/graphsight
|
|
9
|
+
Keywords: tracing,observability,rag,retrieval,agents,visualization,langgraph
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Debuggers
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
|
|
25
|
+
# graphsight
|
|
26
|
+
|
|
27
|
+
**Open an agent retrieval trace in your browser with one command.**
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install graphsight
|
|
31
|
+
graphsight path/to/trace_state.json
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
That's it — a local server starts (stdlib only, zero dependencies), your
|
|
35
|
+
browser opens, and the Graphsight Studio renders the trace: the retrieved
|
|
36
|
+
entities as a graph, relational edges between them, per-item scores, and the
|
|
37
|
+
execution timeline of the run that produced it. No backend, no account, no
|
|
38
|
+
telemetry — nothing leaves localhost.
|
|
39
|
+
|
|
40
|
+
## Where traces come from
|
|
41
|
+
|
|
42
|
+
Any tool that emits the Studio's `TraceState` JSON. Today that's:
|
|
43
|
+
|
|
44
|
+
- [`graphsight-langgraph`](../graphsight-langgraph) — trace any LangGraph agent
|
|
45
|
+
with one callback handler:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install "graphsight-langgraph[example]"
|
|
49
|
+
graphsight-github-trace langchain-ai/langgraph "who fixed the recent streaming bugs?"
|
|
50
|
+
graphsight graphsight_out/trace_state.json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- The full TraceRAG engine (this repo) — its `/api/trace` responses are the
|
|
54
|
+
same shape.
|
|
55
|
+
|
|
56
|
+
LlamaIndex and raw-OTel adapters are planned; they'll emit the same schema.
|
|
57
|
+
|
|
58
|
+
## CLI
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
graphsight [trace_state.json] [--port 4630] [--no-browser]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- With a trace file: serves it and opens `/memory/import?src=…` — the Studio
|
|
65
|
+
auto-loads it.
|
|
66
|
+
- Without: opens the import page, where you can drag-and-drop or paste JSON.
|
|
67
|
+
|
|
68
|
+
## How it's built
|
|
69
|
+
|
|
70
|
+
The package bundles a static build of the Studio UI (Vite + React + React
|
|
71
|
+
Flow) and serves it with Python's stdlib `http.server` — which is why the
|
|
72
|
+
dependency list is empty. The UI source lives in
|
|
73
|
+
[`frontend/`](../frontend) in the main repo; to refresh the bundle:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
cd frontend && npm run build
|
|
77
|
+
rm -rf ../graphsight/graphsight/dist
|
|
78
|
+
cp -r dist ../graphsight/graphsight/dist
|
|
79
|
+
```
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# graphsight
|
|
2
|
+
|
|
3
|
+
**Open an agent retrieval trace in your browser with one command.**
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install graphsight
|
|
7
|
+
graphsight path/to/trace_state.json
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
That's it — a local server starts (stdlib only, zero dependencies), your
|
|
11
|
+
browser opens, and the Graphsight Studio renders the trace: the retrieved
|
|
12
|
+
entities as a graph, relational edges between them, per-item scores, and the
|
|
13
|
+
execution timeline of the run that produced it. No backend, no account, no
|
|
14
|
+
telemetry — nothing leaves localhost.
|
|
15
|
+
|
|
16
|
+
## Where traces come from
|
|
17
|
+
|
|
18
|
+
Any tool that emits the Studio's `TraceState` JSON. Today that's:
|
|
19
|
+
|
|
20
|
+
- [`graphsight-langgraph`](../graphsight-langgraph) — trace any LangGraph agent
|
|
21
|
+
with one callback handler:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install "graphsight-langgraph[example]"
|
|
25
|
+
graphsight-github-trace langchain-ai/langgraph "who fixed the recent streaming bugs?"
|
|
26
|
+
graphsight graphsight_out/trace_state.json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- The full TraceRAG engine (this repo) — its `/api/trace` responses are the
|
|
30
|
+
same shape.
|
|
31
|
+
|
|
32
|
+
LlamaIndex and raw-OTel adapters are planned; they'll emit the same schema.
|
|
33
|
+
|
|
34
|
+
## CLI
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
graphsight [trace_state.json] [--port 4630] [--no-browser]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- With a trace file: serves it and opens `/memory/import?src=…` — the Studio
|
|
41
|
+
auto-loads it.
|
|
42
|
+
- Without: opens the import page, where you can drag-and-drop or paste JSON.
|
|
43
|
+
|
|
44
|
+
## How it's built
|
|
45
|
+
|
|
46
|
+
The package bundles a static build of the Studio UI (Vite + React + React
|
|
47
|
+
Flow) and serves it with Python's stdlib `http.server` — which is why the
|
|
48
|
+
dependency list is empty. The UI source lives in
|
|
49
|
+
[`frontend/`](../frontend) in the main repo; to refresh the bundle:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
cd frontend && npm run build
|
|
53
|
+
rm -rf ../graphsight/graphsight/dist
|
|
54
|
+
cp -r dist ../graphsight/graphsight/dist
|
|
55
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""graphsight — local viewer for agent retrieval traces.
|
|
2
|
+
|
|
3
|
+
Usage:
|
|
4
|
+
|
|
5
|
+
graphsight path/to/trace_state.json
|
|
6
|
+
|
|
7
|
+
Serves the bundled Graphsight Studio UI locally and opens the trace in the
|
|
8
|
+
browser. No backend, no accounts, no network calls beyond localhost.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""graphsight CLI — open a trace in the bundled Studio UI."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
import sys
|
|
6
|
+
import webbrowser
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Optional
|
|
9
|
+
|
|
10
|
+
from .server import TRACE_ROUTE, make_server
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def main(argv: Optional[list[str]] = None) -> None:
|
|
14
|
+
for stream in (sys.stdout, sys.stderr):
|
|
15
|
+
try:
|
|
16
|
+
stream.reconfigure(encoding="utf-8") # type: ignore[union-attr]
|
|
17
|
+
except (AttributeError, OSError):
|
|
18
|
+
pass
|
|
19
|
+
|
|
20
|
+
parser = argparse.ArgumentParser(
|
|
21
|
+
prog="graphsight",
|
|
22
|
+
description="Serve the Graphsight Studio locally and open a trace_state.json in it.",
|
|
23
|
+
)
|
|
24
|
+
parser.add_argument("trace", nargs="?", type=Path,
|
|
25
|
+
help="path to a trace_state.json (optional — omit to open the import page)")
|
|
26
|
+
parser.add_argument("--port", type=int, default=4630, help="port to serve on (default 4630)")
|
|
27
|
+
parser.add_argument("--no-browser", action="store_true", help="don't open the browser")
|
|
28
|
+
args = parser.parse_args(argv)
|
|
29
|
+
|
|
30
|
+
trace_path = args.trace.resolve() if args.trace else None
|
|
31
|
+
if trace_path is not None and not trace_path.is_file():
|
|
32
|
+
parser.error(f"trace file not found: {trace_path}")
|
|
33
|
+
|
|
34
|
+
server = make_server(args.port, trace_path)
|
|
35
|
+
url = f"http://127.0.0.1:{args.port}/memory/import"
|
|
36
|
+
if trace_path is not None:
|
|
37
|
+
url += f"?src={TRACE_ROUTE}"
|
|
38
|
+
|
|
39
|
+
print(f"graphsight serving at {url}")
|
|
40
|
+
if trace_path is not None:
|
|
41
|
+
print(f"trace: {trace_path}")
|
|
42
|
+
print("Ctrl+C to stop")
|
|
43
|
+
if not args.no_browser:
|
|
44
|
+
webbrowser.open(url)
|
|
45
|
+
try:
|
|
46
|
+
server.serve_forever()
|
|
47
|
+
except KeyboardInterrupt:
|
|
48
|
+
print("\nbye")
|
|
49
|
+
finally:
|
|
50
|
+
server.server_close()
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
if __name__ == "__main__":
|
|
54
|
+
main()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as ln,p as un,d as G,e as q,f as z,h as an,g,t as tn,i as K,m as _,j as rn,k as o,n as on,o as sn,q as fn}from"./index-D4UHTbV2.js";function cn(l){return l.innerRadius}function gn(l){return l.outerRadius}function yn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,E,j,v,A,B,u){var I=E-l,i=j-h,n=B-v,d=u-A,a=d*I-n*i;if(!(a*a<g))return a=(n*(h-A)-d*(l-v))/a,[l+a*I,h+a*i]}function V(l,h,E,j,v,A,B){var u=l-E,I=h-j,i=(B?A:-A)/K(u*u+I*I),n=i*I,d=-i*u,a=l+n,s=h+d,f=E+n,c=j+d,C=(a+f)/2,t=(s+c)/2,m=f-a,y=c-s,R=m*m+y*y,T=v-A,P=a*c-f*s,O=(y<0?-1:1)*K(on(0,T*T*R-P*P)),S=(P*y-m*O)/R,k=(-P*m-y*O)/R,w=(P*y+m*O)/R,p=(-P*m+y*O)/R,x=S-C,e=k-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&(S=w,k=p),{cx:S,cy:k,x01:-n,y01:-d,x11:S*(v/T-1),y11:k*(v/T-1)}}function hn(){var l=cn,h=gn,E=z(0),j=null,v=yn,A=dn,B=mn,u=null,I=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=A.apply(this,arguments)-an,C=rn(c-f),t=c>f;if(u||(u=n=I()),s<a&&(d=s,s=a,a=d),!(s>g))u.moveTo(0,0);else if(C>tn-g)u.moveTo(s*G(f),s*q(f)),u.arc(0,0,s,f,c,!t),a>g&&(u.moveTo(a*G(c),a*q(c)),u.arc(0,0,a,c,f,t));else{var m=f,y=c,R=f,T=c,P=C,O=C,S=B.apply(this,arguments)/2,k=S>g&&(j?+j.apply(this,arguments):K(a*a+s*s)),w=_(rn(s-a)/2,+E.apply(this,arguments)),p=w,x=w,e,r;if(k>g){var F=sn(k/a*q(S)),L=sn(k/s*q(S));(P-=F*2)>g?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(O-=L*2)>g?(L*=t?1:-1,m+=L,y-=L):(O=0,m=y=(f+c)/2)}var H=s*G(m),J=s*q(m),M=a*G(T),N=a*q(T);if(w>g){var Q=s*G(y),U=s*q(y),W=a*G(R),X=a*q(R),D;if(C<un)if(D=pn(H,J,W,X,Q,U,M,N)){var Y=H-D[0],Z=J-D[1],$=Q-D[0],b=U-D[1],nn=1/q(fn((Y*$+Z*b)/(K(Y*Y+Z*Z)*K($*$+b*b)))/2),en=K(D[0]*D[0]+D[1]*D[1]);p=_(w,(a-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}O>g?x>g?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),u.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(u.moveTo(H,J),u.arc(0,0,s,m,y,!t)):u.moveTo(H,J),!(a>g)||!(P>g)?u.lineTo(M,N):p>g?(e=V(M,N,Q,U,a,-p,t),r=V(H,J,W,X,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,a,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),u.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):u.arc(0,0,a,T,R,t)}if(u.closePath(),n)return u=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-un/2;return[G(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:z(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:z(+n),i):h},i.cornerRadius=function(n){return arguments.length?(E=typeof n=="function"?n:z(+n),i):E},i.padRadius=function(n){return arguments.length?(j=n==null?null:typeof n=="function"?n:z(+n),i):j},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:z(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:z(+n),i):A},i.padAngle=function(n){return arguments.length?(B=typeof n=="function"?n:z(+n),i):B},i.context=function(n){return arguments.length?(u=n??null,i):u},i}export{hn as d};
|