graphsight 0.1.4__tar.gz → 0.2.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.
Files changed (77) hide show
  1. {graphsight-0.1.4/graphsight.egg-info → graphsight-0.2.0}/PKG-INFO +33 -2
  2. {graphsight-0.1.4 → graphsight-0.2.0}/README.md +32 -1
  3. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight/__init__.py +1 -1
  4. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight/cli.py +20 -8
  5. graphsight-0.1.4/graphsight/dist/assets/arc-CmG4qZOi.js → graphsight-0.2.0/graphsight/dist/assets/arc-DX2Y_03-.js +1 -1
  6. graphsight-0.1.4/graphsight/dist/assets/architectureDiagram-3BPJPVTR-DwWywmUu.js → graphsight-0.2.0/graphsight/dist/assets/architectureDiagram-3BPJPVTR-CoN3YUIu.js +1 -1
  7. graphsight-0.1.4/graphsight/dist/assets/blockDiagram-GPEHLZMM-Dp8F7nSE.js → graphsight-0.2.0/graphsight/dist/assets/blockDiagram-GPEHLZMM-z6CbyinI.js +1 -1
  8. graphsight-0.1.4/graphsight/dist/assets/c4Diagram-AAUBKEIU-DyIqh-GX.js → graphsight-0.2.0/graphsight/dist/assets/c4Diagram-AAUBKEIU-BS1vxNfO.js +1 -1
  9. graphsight-0.2.0/graphsight/dist/assets/channel-B5gEPc6v.js +1 -0
  10. graphsight-0.1.4/graphsight/dist/assets/chunk-2J33WTMH-B7E98_Gc.js → graphsight-0.2.0/graphsight/dist/assets/chunk-2J33WTMH-Kx9yrCNJ.js +1 -1
  11. graphsight-0.1.4/graphsight/dist/assets/chunk-4BX2VUAB-XAhFhGtc.js → graphsight-0.2.0/graphsight/dist/assets/chunk-4BX2VUAB-ChQj2n3P.js +1 -1
  12. graphsight-0.1.4/graphsight/dist/assets/chunk-55IACEB6-B-uxyGh7.js → graphsight-0.2.0/graphsight/dist/assets/chunk-55IACEB6-CzqSW9P2.js +1 -1
  13. graphsight-0.1.4/graphsight/dist/assets/chunk-727SXJPM-DXDI9Epw.js → graphsight-0.2.0/graphsight/dist/assets/chunk-727SXJPM-Ci9pVnPE.js +1 -1
  14. graphsight-0.1.4/graphsight/dist/assets/chunk-AQP2D5EJ-CZxvZTU-.js → graphsight-0.2.0/graphsight/dist/assets/chunk-AQP2D5EJ-DHxxpVwV.js +1 -1
  15. graphsight-0.1.4/graphsight/dist/assets/chunk-FMBD7UC4-Zqohphyo.js → graphsight-0.2.0/graphsight/dist/assets/chunk-FMBD7UC4-Bpcavdl6.js +1 -1
  16. graphsight-0.1.4/graphsight/dist/assets/chunk-ND2GUHAM-CCOUfloC.js → graphsight-0.2.0/graphsight/dist/assets/chunk-ND2GUHAM-p3aZOIrR.js +1 -1
  17. graphsight-0.1.4/graphsight/dist/assets/chunk-QZHKN3VN-4i3IZ_Dy.js → graphsight-0.2.0/graphsight/dist/assets/chunk-QZHKN3VN-CosEeF5i.js +1 -1
  18. graphsight-0.2.0/graphsight/dist/assets/classDiagram-4FO5ZUOK-D5MvdHvc.js +1 -0
  19. graphsight-0.2.0/graphsight/dist/assets/classDiagram-v2-Q7XG4LA2-D5MvdHvc.js +1 -0
  20. graphsight-0.1.4/graphsight/dist/assets/cose-bilkent-S5V4N54A-DaPCDF5d.js → graphsight-0.2.0/graphsight/dist/assets/cose-bilkent-S5V4N54A-BssgBP7_.js +1 -1
  21. graphsight-0.1.4/graphsight/dist/assets/dagre-BM42HDAG-BbZddFmU.js → graphsight-0.2.0/graphsight/dist/assets/dagre-BM42HDAG-BwS39MAa.js +1 -1
  22. graphsight-0.1.4/graphsight/dist/assets/diagram-2AECGRRQ-BBxRKJny.js → graphsight-0.2.0/graphsight/dist/assets/diagram-2AECGRRQ-B7CPRZV4.js +1 -1
  23. graphsight-0.1.4/graphsight/dist/assets/diagram-5GNKFQAL-DAInRRo9.js → graphsight-0.2.0/graphsight/dist/assets/diagram-5GNKFQAL-BIuCqvh0.js +1 -1
  24. graphsight-0.1.4/graphsight/dist/assets/diagram-KO2AKTUF-B-Gf1eoF.js → graphsight-0.2.0/graphsight/dist/assets/diagram-KO2AKTUF-D_PC7ApA.js +1 -1
  25. graphsight-0.1.4/graphsight/dist/assets/diagram-LMA3HP47-CVGe5o5Q.js → graphsight-0.2.0/graphsight/dist/assets/diagram-LMA3HP47-BIyYFC4E.js +1 -1
  26. graphsight-0.1.4/graphsight/dist/assets/diagram-OG6HWLK6-BWdTRIN8.js → graphsight-0.2.0/graphsight/dist/assets/diagram-OG6HWLK6-W3CKcEFl.js +1 -1
  27. graphsight-0.1.4/graphsight/dist/assets/erDiagram-TEJ5UH35-DSd1tUew.js → graphsight-0.2.0/graphsight/dist/assets/erDiagram-TEJ5UH35-D6scDkhL.js +1 -1
  28. graphsight-0.1.4/graphsight/dist/assets/flowDiagram-I6XJVG4X-_tlYQHGH.js → graphsight-0.2.0/graphsight/dist/assets/flowDiagram-I6XJVG4X-Bj_XdVV-.js +1 -1
  29. graphsight-0.1.4/graphsight/dist/assets/ganttDiagram-6RSMTGT7-DZsALmh4.js → graphsight-0.2.0/graphsight/dist/assets/ganttDiagram-6RSMTGT7-CBvqqbHJ.js +1 -1
  30. graphsight-0.1.4/graphsight/dist/assets/gitGraphDiagram-PVQCEYII-BZV9ao-e.js → graphsight-0.2.0/graphsight/dist/assets/gitGraphDiagram-PVQCEYII-by8Fq2bW.js +1 -1
  31. graphsight-0.1.4/graphsight/dist/assets/index-YI0SJOVV.js → graphsight-0.2.0/graphsight/dist/assets/index-48_-4Vab.js +71 -66
  32. graphsight-0.2.0/graphsight/dist/assets/index-BvyEzIL6.css +1 -0
  33. graphsight-0.1.4/graphsight/dist/assets/infoDiagram-5YYISTIA-B-4I2OYw.js → graphsight-0.2.0/graphsight/dist/assets/infoDiagram-5YYISTIA-1307Ve3t.js +1 -1
  34. graphsight-0.1.4/graphsight/dist/assets/ishikawaDiagram-YF4QCWOH-Dxeludgl.js → graphsight-0.2.0/graphsight/dist/assets/ishikawaDiagram-YF4QCWOH-DQl6oden.js +1 -1
  35. graphsight-0.1.4/graphsight/dist/assets/journeyDiagram-JHISSGLW-DrJ9dhvk.js → graphsight-0.2.0/graphsight/dist/assets/journeyDiagram-JHISSGLW-COdjWyKQ.js +1 -1
  36. graphsight-0.1.4/graphsight/dist/assets/kanban-definition-UN3LZRKU-C-npuYL9.js → graphsight-0.2.0/graphsight/dist/assets/kanban-definition-UN3LZRKU-BoaAvorr.js +1 -1
  37. graphsight-0.1.4/graphsight/dist/assets/linear-DBEs6PNj.js → graphsight-0.2.0/graphsight/dist/assets/linear-CmJqJ-n6.js +1 -1
  38. graphsight-0.1.4/graphsight/dist/assets/mermaid.core-CiFNaHpi.js → graphsight-0.2.0/graphsight/dist/assets/mermaid.core-B77A9b3a.js +4 -4
  39. graphsight-0.1.4/graphsight/dist/assets/mindmap-definition-RKZ34NQL-2fu2SFCO.js → graphsight-0.2.0/graphsight/dist/assets/mindmap-definition-RKZ34NQL-4qBkCr9q.js +1 -1
  40. graphsight-0.1.4/graphsight/dist/assets/pieDiagram-4H26LBE5-C71J-Zg0.js → graphsight-0.2.0/graphsight/dist/assets/pieDiagram-4H26LBE5-C0UJig1b.js +1 -1
  41. graphsight-0.1.4/graphsight/dist/assets/quadrantDiagram-W4KKPZXB-BN_ilg8J.js → graphsight-0.2.0/graphsight/dist/assets/quadrantDiagram-W4KKPZXB-DQSdxmL2.js +1 -1
  42. graphsight-0.1.4/graphsight/dist/assets/requirementDiagram-4Y6WPE33-C-vt6Uqo.js → graphsight-0.2.0/graphsight/dist/assets/requirementDiagram-4Y6WPE33-D-XOmsTq.js +1 -1
  43. graphsight-0.1.4/graphsight/dist/assets/sankeyDiagram-5OEKKPKP-CPh1V7V4.js → graphsight-0.2.0/graphsight/dist/assets/sankeyDiagram-5OEKKPKP-F877OceW.js +1 -1
  44. graphsight-0.1.4/graphsight/dist/assets/sequenceDiagram-3UESZ5HK-BsqDZaC8.js → graphsight-0.2.0/graphsight/dist/assets/sequenceDiagram-3UESZ5HK-CcxrPDRe.js +1 -1
  45. graphsight-0.1.4/graphsight/dist/assets/stateDiagram-AJRCARHV-BUzQoy7B.js → graphsight-0.2.0/graphsight/dist/assets/stateDiagram-AJRCARHV-DGBGZ_xo.js +1 -1
  46. graphsight-0.2.0/graphsight/dist/assets/stateDiagram-v2-BHNVJYJU-BH0l1SFC.js +1 -0
  47. graphsight-0.1.4/graphsight/dist/assets/timeline-definition-PNZ67QCA-ybpAJ1hK.js → graphsight-0.2.0/graphsight/dist/assets/timeline-definition-PNZ67QCA-Chr67AKg.js +1 -1
  48. graphsight-0.1.4/graphsight/dist/assets/vennDiagram-CIIHVFJN-CeV_idGU.js → graphsight-0.2.0/graphsight/dist/assets/vennDiagram-CIIHVFJN-JuYPgaLN.js +1 -1
  49. graphsight-0.1.4/graphsight/dist/assets/wardley-L42UT6IY-CrhG_wWX.js → graphsight-0.2.0/graphsight/dist/assets/wardley-L42UT6IY-DJty7ogt.js +1 -1
  50. graphsight-0.1.4/graphsight/dist/assets/wardleyDiagram-YWT4CUSO-BFfaKS0r.js → graphsight-0.2.0/graphsight/dist/assets/wardleyDiagram-YWT4CUSO-D5xm5gDN.js +1 -1
  51. graphsight-0.1.4/graphsight/dist/assets/xychartDiagram-2RQKCTM6-Vsze_IH7.js → graphsight-0.2.0/graphsight/dist/assets/xychartDiagram-2RQKCTM6-D1MZmrg5.js +1 -1
  52. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight/dist/index.html +2 -2
  53. graphsight-0.2.0/graphsight/server.py +110 -0
  54. {graphsight-0.1.4 → graphsight-0.2.0/graphsight.egg-info}/PKG-INFO +33 -2
  55. graphsight-0.2.0/graphsight.egg-info/SOURCES.txt +68 -0
  56. {graphsight-0.1.4 → graphsight-0.2.0}/pyproject.toml +1 -1
  57. graphsight-0.1.4/graphsight/dist/assets/channel-BA49b9gF.js +0 -1
  58. graphsight-0.1.4/graphsight/dist/assets/classDiagram-4FO5ZUOK-Bhiy9428.js +0 -1
  59. graphsight-0.1.4/graphsight/dist/assets/classDiagram-v2-Q7XG4LA2-Bhiy9428.js +0 -1
  60. graphsight-0.1.4/graphsight/dist/assets/index-BeRMnsAt.css +0 -1
  61. graphsight-0.1.4/graphsight/dist/assets/stateDiagram-v2-BHNVJYJU-Ujqy1nXs.js +0 -1
  62. graphsight-0.1.4/graphsight/server.py +0 -54
  63. graphsight-0.1.4/graphsight.egg-info/SOURCES.txt +0 -68
  64. {graphsight-0.1.4 → graphsight-0.2.0}/LICENSE +0 -0
  65. {graphsight-0.1.4 → graphsight-0.2.0}/MANIFEST.in +0 -0
  66. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight/dist/assets/cytoscape.esm-DTSO7Bv0.js +0 -0
  67. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight/dist/assets/defaultLocale-DX6XiGOO.js +0 -0
  68. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight/dist/assets/graph-CAnANduQ.js +0 -0
  69. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight/dist/assets/init-Gi6I4Gst.js +0 -0
  70. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight/dist/assets/katex-C5jXJg4s.js +0 -0
  71. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight/dist/assets/layout-DGIYPm2g.js +0 -0
  72. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight/dist/assets/ordinal-Cboi1Yqb.js +0 -0
  73. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight/dist/favicon.svg +0 -0
  74. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight.egg-info/dependency_links.txt +0 -0
  75. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight.egg-info/entry_points.txt +0 -0
  76. {graphsight-0.1.4 → graphsight-0.2.0}/graphsight.egg-info/top_level.txt +0 -0
  77. {graphsight-0.1.4 → graphsight-0.2.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphsight
3
- Version: 0.1.4
3
+ Version: 0.2.0
4
4
  Summary: See why your AI agent retrieved what it did — interactive graph viewer for agent retrieval traces. One command, zero dependencies, nothing leaves your machine.
5
5
  Author: Arush Karnatak
6
6
  License: MIT
@@ -69,12 +69,43 @@ graphsight [trace] [--port PORT] [--no-browser]
69
69
 
70
70
  | Argument | Default | Description |
71
71
  |---|---|---|
72
- | `trace` | — | Path to a `trace_state.json`. Optional — omit to open the import page and drag-and-drop or paste JSON instead. |
72
+ | `trace` | — | A `trace_state.json` file, **or a directory of them** (e.g. `.graphsight/`) to browse run history. Optional — omit to open the import page and drag-and-drop or paste JSON instead. |
73
73
  | `--port` | `4630` | Local port to serve on. |
74
74
  | `--no-browser` | off | Start the server without opening a browser window. |
75
75
 
76
76
  The server binds to `127.0.0.1` only and runs until you press `Ctrl+C`.
77
77
 
78
+ ## Run history
79
+
80
+ Point `graphsight` at a directory and it becomes a run browser — every
81
+ trace listed by query and time, one click to open:
82
+
83
+ ```bash
84
+ graphsight .graphsight/
85
+ ```
86
+
87
+ The [graphsight-langgraph](https://pypi.org/project/graphsight-langgraph/)
88
+ `capture()` helper appends every agent run there automatically, so your
89
+ debugging history accumulates with zero ceremony. Traces render with the
90
+ **retrieved vs. used** split: items that surfaced in the answer highlighted,
91
+ items retrieved but ignored dimmed — the two classic retrieval failures,
92
+ visible at a glance.
93
+
94
+ ## Sharing traces with your team
95
+
96
+ A trace is one self-contained JSON file — no account or backend needed to
97
+ share it:
98
+
99
+ - **Send the file.** A teammate with `graphsight` installed runs
100
+ `graphsight trace.json`. Works in a DM, a ticket attachment, a CI
101
+ artifact.
102
+ - **Link it.** A deployed Graphsight frontend opens any publicly reachable
103
+ trace via `…/memory/import?src=<url-to-json>` — host the JSON on a gist
104
+ or artifact store and share the link. (The host must allow cross-origin
105
+ GETs; raw gists do.)
106
+ - **Commit it.** Trace files in the repo next to the incident or PR they
107
+ explain make retrieval debugging part of the review record.
108
+
78
109
  ## Producing traces
79
110
 
80
111
  Graphsight renders any file matching its trace JSON contract. Current
@@ -45,12 +45,43 @@ graphsight [trace] [--port PORT] [--no-browser]
45
45
 
46
46
  | Argument | Default | Description |
47
47
  |---|---|---|
48
- | `trace` | — | Path to a `trace_state.json`. Optional — omit to open the import page and drag-and-drop or paste JSON instead. |
48
+ | `trace` | — | A `trace_state.json` file, **or a directory of them** (e.g. `.graphsight/`) to browse run history. Optional — omit to open the import page and drag-and-drop or paste JSON instead. |
49
49
  | `--port` | `4630` | Local port to serve on. |
50
50
  | `--no-browser` | off | Start the server without opening a browser window. |
51
51
 
52
52
  The server binds to `127.0.0.1` only and runs until you press `Ctrl+C`.
53
53
 
54
+ ## Run history
55
+
56
+ Point `graphsight` at a directory and it becomes a run browser — every
57
+ trace listed by query and time, one click to open:
58
+
59
+ ```bash
60
+ graphsight .graphsight/
61
+ ```
62
+
63
+ The [graphsight-langgraph](https://pypi.org/project/graphsight-langgraph/)
64
+ `capture()` helper appends every agent run there automatically, so your
65
+ debugging history accumulates with zero ceremony. Traces render with the
66
+ **retrieved vs. used** split: items that surfaced in the answer highlighted,
67
+ items retrieved but ignored dimmed — the two classic retrieval failures,
68
+ visible at a glance.
69
+
70
+ ## Sharing traces with your team
71
+
72
+ A trace is one self-contained JSON file — no account or backend needed to
73
+ share it:
74
+
75
+ - **Send the file.** A teammate with `graphsight` installed runs
76
+ `graphsight trace.json`. Works in a DM, a ticket attachment, a CI
77
+ artifact.
78
+ - **Link it.** A deployed Graphsight frontend opens any publicly reachable
79
+ trace via `…/memory/import?src=<url-to-json>` — host the JSON on a gist
80
+ or artifact store and share the link. (The host must allow cross-origin
81
+ GETs; raw gists do.)
82
+ - **Commit it.** Trace files in the repo next to the incident or PR they
83
+ explain make retrieval debugging part of the review record.
84
+
54
85
  ## Producing traces
55
86
 
56
87
  Graphsight renders any file matching its trace JSON contract. Current
@@ -8,4 +8,4 @@ Serves the bundled Graphsight Studio UI locally and opens the trace in the
8
8
  browser. No backend, no accounts, no network calls beyond localhost.
9
9
  """
10
10
 
11
- __version__ = "0.1.4"
11
+ __version__ = "0.2.0"
@@ -1,4 +1,4 @@
1
- """graphsight CLI — open a trace in the bundled Studio UI."""
1
+ """graphsight CLI — open a trace (or a whole run history) in the bundled UI."""
2
2
  from __future__ import annotations
3
3
 
4
4
  import argparse
@@ -7,7 +7,7 @@ import webbrowser
7
7
  from pathlib import Path
8
8
  from typing import Optional
9
9
 
10
- from .server import TRACE_ROUTE, make_server
10
+ from .server import RUNS_ROUTE, TRACE_ROUTE, make_server
11
11
 
12
12
 
13
13
  def main(argv: Optional[list[str]] = None) -> None:
@@ -19,26 +19,38 @@ def main(argv: Optional[list[str]] = None) -> None:
19
19
 
20
20
  parser = argparse.ArgumentParser(
21
21
  prog="graphsight",
22
- description="Serve the Graphsight Studio locally and open a trace_state.json in it.",
22
+ description="Open a trace_state.json — or a history directory like .graphsight/ — in your browser.",
23
23
  )
24
24
  parser.add_argument("trace", nargs="?", type=Path,
25
- help="path to a trace_state.json (optional — omit to open the import page)")
25
+ help="a trace_state.json, or a directory of them (e.g. .graphsight/); "
26
+ "omit to open the import page")
26
27
  parser.add_argument("--port", type=int, default=4630, help="port to serve on (default 4630)")
27
28
  parser.add_argument("--no-browser", action="store_true", help="don't open the browser")
28
29
  args = parser.parse_args(argv)
29
30
 
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}")
31
+ trace_path: Optional[Path] = None
32
+ history_dir: Optional[Path] = None
33
+ if args.trace is not None:
34
+ target = args.trace.resolve()
35
+ if target.is_dir():
36
+ history_dir = target
37
+ elif target.is_file():
38
+ trace_path = target
39
+ else:
40
+ parser.error(f"not found: {target}")
33
41
 
34
- server = make_server(args.port, trace_path)
42
+ server = make_server(args.port, trace_path=trace_path, history_dir=history_dir)
35
43
  url = f"http://127.0.0.1:{args.port}/memory/import"
36
44
  if trace_path is not None:
37
45
  url += f"?src={TRACE_ROUTE}"
46
+ elif history_dir is not None:
47
+ url += f"?runs={RUNS_ROUTE}"
38
48
 
39
49
  print(f"graphsight serving at {url}")
40
50
  if trace_path is not None:
41
51
  print(f"trace: {trace_path}")
52
+ if history_dir is not None:
53
+ print(f"history: {history_dir}")
42
54
  print("Ctrl+C to stop")
43
55
  if not args.no_browser:
44
56
  webbrowser.open(url)
@@ -1 +1 @@
1
- import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-CiFNaHpi.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,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function V(l,h,I,D,v,A,B){var a=l-I,O=h-D,i=(B?A:-A)/K(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,C=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*K(on(0,T*T*R-P*P)),$=(P*g-m*S)/R,j=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=$-C,e=j-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,C=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(C<an)if(E=pn(H,J,W,X,Q,U,M,N)){var Y=H-E[0],Z=J-E[1],b=Q-E[0],k=U-E[1],nn=1/q(fn((Y*b+Z*k)/(K(Y*Y+Z*Z)*K(b*b+k*k)))/2),en=K(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,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(H,J),a.arc(0,0,s,m,g,!t)):a.moveTo(H,J),!(u>y)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,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,R,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)+ +A.apply(this,arguments))/2-an/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?(I=typeof n=="function"?n:z(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:z(+n),i):D},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?(a=n??null,i):a},i}export{hn as d};
1
+ import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core-B77A9b3a.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,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function V(l,h,I,D,v,A,B){var a=l-I,O=h-D,i=(B?A:-A)/K(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,C=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*K(on(0,T*T*R-P*P)),$=(P*g-m*S)/R,j=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=$-C,e=j-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,C=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(C<an)if(E=pn(H,J,W,X,Q,U,M,N)){var Y=H-E[0],Z=J-E[1],b=Q-E[0],k=U-E[1],nn=1/q(fn((Y*b+Z*k)/(K(Y*Y+Z*Z)*K(b*b+k*k)))/2),en=K(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,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(H,J),a.arc(0,0,s,m,g,!t)):a.moveTo(H,J),!(u>y)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,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,R,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)+ +A.apply(this,arguments))/2-an/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?(I=typeof n=="function"?n:z(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:z(+n),i):D},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?(a=n??null,i):a},i}export{hn as d};