@mindflight/mindbrain-personal-studio 0.6.1

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 (166) hide show
  1. package/.env.example +50 -0
  2. package/README.md +134 -0
  3. package/bin/mindbrain-studio.mjs +20 -0
  4. package/build/client/_app/immutable/assets/2.BXRKVU9n.css +1 -0
  5. package/build/client/_app/immutable/assets/2.BXRKVU9n.css.br +0 -0
  6. package/build/client/_app/immutable/assets/2.BXRKVU9n.css.gz +0 -0
  7. package/build/client/_app/immutable/chunks/-OSExkSk.js +2 -0
  8. package/build/client/_app/immutable/chunks/-OSExkSk.js.br +0 -0
  9. package/build/client/_app/immutable/chunks/-OSExkSk.js.gz +0 -0
  10. package/build/client/_app/immutable/chunks/BIHI7g3E.js +1 -0
  11. package/build/client/_app/immutable/chunks/BIHI7g3E.js.br +2 -0
  12. package/build/client/_app/immutable/chunks/BIHI7g3E.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/BJB7pSge.js +1 -0
  14. package/build/client/_app/immutable/chunks/BJB7pSge.js.br +0 -0
  15. package/build/client/_app/immutable/chunks/BJB7pSge.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/BNUkRZqg.js +1 -0
  17. package/build/client/_app/immutable/chunks/BNUkRZqg.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/BNUkRZqg.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/BP2JbIUZ.js +1 -0
  20. package/build/client/_app/immutable/chunks/BP2JbIUZ.js.br +0 -0
  21. package/build/client/_app/immutable/chunks/BP2JbIUZ.js.gz +0 -0
  22. package/build/client/_app/immutable/chunks/BVrgUHq-.js +1 -0
  23. package/build/client/_app/immutable/chunks/BVrgUHq-.js.br +0 -0
  24. package/build/client/_app/immutable/chunks/BVrgUHq-.js.gz +0 -0
  25. package/build/client/_app/immutable/chunks/BmeSanva.js +1 -0
  26. package/build/client/_app/immutable/chunks/BmeSanva.js.br +0 -0
  27. package/build/client/_app/immutable/chunks/BmeSanva.js.gz +0 -0
  28. package/build/client/_app/immutable/chunks/BnkCgNCx.js +1 -0
  29. package/build/client/_app/immutable/chunks/BnkCgNCx.js.br +0 -0
  30. package/build/client/_app/immutable/chunks/BnkCgNCx.js.gz +0 -0
  31. package/build/client/_app/immutable/chunks/C5KYKPa8.js +311 -0
  32. package/build/client/_app/immutable/chunks/C5KYKPa8.js.br +0 -0
  33. package/build/client/_app/immutable/chunks/C5KYKPa8.js.gz +0 -0
  34. package/build/client/_app/immutable/chunks/CBDzfqXr.js +1 -0
  35. package/build/client/_app/immutable/chunks/CBDzfqXr.js.br +0 -0
  36. package/build/client/_app/immutable/chunks/CBDzfqXr.js.gz +0 -0
  37. package/build/client/_app/immutable/chunks/Cp9dXlPT.js +1 -0
  38. package/build/client/_app/immutable/chunks/Cp9dXlPT.js.br +0 -0
  39. package/build/client/_app/immutable/chunks/Cp9dXlPT.js.gz +0 -0
  40. package/build/client/_app/immutable/chunks/D0daF8Eh.js +2 -0
  41. package/build/client/_app/immutable/chunks/D0daF8Eh.js.br +0 -0
  42. package/build/client/_app/immutable/chunks/D0daF8Eh.js.gz +0 -0
  43. package/build/client/_app/immutable/chunks/D4SoBmS0.js +1 -0
  44. package/build/client/_app/immutable/chunks/D4SoBmS0.js.br +0 -0
  45. package/build/client/_app/immutable/chunks/D4SoBmS0.js.gz +0 -0
  46. package/build/client/_app/immutable/chunks/DpVrWha3.js +1 -0
  47. package/build/client/_app/immutable/chunks/DpVrWha3.js.br +0 -0
  48. package/build/client/_app/immutable/chunks/DpVrWha3.js.gz +0 -0
  49. package/build/client/_app/immutable/chunks/DyXQogav.js +1 -0
  50. package/build/client/_app/immutable/chunks/DyXQogav.js.br +0 -0
  51. package/build/client/_app/immutable/chunks/DyXQogav.js.gz +0 -0
  52. package/build/client/_app/immutable/chunks/Gs0cNFYG.js +1 -0
  53. package/build/client/_app/immutable/chunks/Gs0cNFYG.js.br +0 -0
  54. package/build/client/_app/immutable/chunks/Gs0cNFYG.js.gz +0 -0
  55. package/build/client/_app/immutable/chunks/NXeHtWpC.js +1 -0
  56. package/build/client/_app/immutable/chunks/NXeHtWpC.js.br +0 -0
  57. package/build/client/_app/immutable/chunks/NXeHtWpC.js.gz +0 -0
  58. package/build/client/_app/immutable/chunks/i0D5dc1Y.js +1 -0
  59. package/build/client/_app/immutable/chunks/i0D5dc1Y.js.br +0 -0
  60. package/build/client/_app/immutable/chunks/i0D5dc1Y.js.gz +0 -0
  61. package/build/client/_app/immutable/chunks/nnWk1BBo.js +1 -0
  62. package/build/client/_app/immutable/chunks/nnWk1BBo.js.br +0 -0
  63. package/build/client/_app/immutable/chunks/nnWk1BBo.js.gz +0 -0
  64. package/build/client/_app/immutable/entry/app.CVz6aYsT.js +2 -0
  65. package/build/client/_app/immutable/entry/app.CVz6aYsT.js.br +0 -0
  66. package/build/client/_app/immutable/entry/app.CVz6aYsT.js.gz +0 -0
  67. package/build/client/_app/immutable/entry/start.Bt5tVOz8.js +1 -0
  68. package/build/client/_app/immutable/entry/start.Bt5tVOz8.js.br +2 -0
  69. package/build/client/_app/immutable/entry/start.Bt5tVOz8.js.gz +0 -0
  70. package/build/client/_app/immutable/nodes/0.C2sXq0eH.js +1 -0
  71. package/build/client/_app/immutable/nodes/0.C2sXq0eH.js.br +0 -0
  72. package/build/client/_app/immutable/nodes/0.C2sXq0eH.js.gz +0 -0
  73. package/build/client/_app/immutable/nodes/1.BBtxY46Q.js +1 -0
  74. package/build/client/_app/immutable/nodes/1.BBtxY46Q.js.br +0 -0
  75. package/build/client/_app/immutable/nodes/1.BBtxY46Q.js.gz +0 -0
  76. package/build/client/_app/immutable/nodes/2.D0pSa9ko.js +9 -0
  77. package/build/client/_app/immutable/nodes/2.D0pSa9ko.js.br +0 -0
  78. package/build/client/_app/immutable/nodes/2.D0pSa9ko.js.gz +0 -0
  79. package/build/client/_app/version.json +1 -0
  80. package/build/client/_app/version.json.br +0 -0
  81. package/build/client/_app/version.json.gz +0 -0
  82. package/build/client/robots.txt +3 -0
  83. package/build/client/robots.txt.br +0 -0
  84. package/build/client/robots.txt.gz +0 -0
  85. package/build/env.js +70 -0
  86. package/build/env.js.map +1 -0
  87. package/build/handler.js +26 -0
  88. package/build/handler.js.map +1 -0
  89. package/build/index.js +149 -0
  90. package/build/index.js.map +1 -0
  91. package/build/server/chunks/chunks/edgeLinkModes.js-CfRqrZtd.js +50 -0
  92. package/build/server/chunks/chunks/edgeLinkModes.js-CfRqrZtd.js.map +1 -0
  93. package/build/server/chunks/chunks/environment.js-Bf8x1V_n.js +16 -0
  94. package/build/server/chunks/chunks/environment.js-Bf8x1V_n.js.map +1 -0
  95. package/build/server/chunks/chunks/exports.js-DFR3riS9.js +217 -0
  96. package/build/server/chunks/chunks/exports.js-DFR3riS9.js.map +1 -0
  97. package/build/server/chunks/chunks/false.js-CRHihH2U.js +4 -0
  98. package/build/server/chunks/chunks/false.js-CRHihH2U.js.map +1 -0
  99. package/build/server/chunks/chunks/graphRepository.js-D2DARfVY.js +280 -0
  100. package/build/server/chunks/chunks/graphRepository.js-D2DARfVY.js.map +1 -0
  101. package/build/server/chunks/chunks/internal.js-D8EA_he2.js +119 -0
  102. package/build/server/chunks/chunks/internal.js-D8EA_he2.js.map +1 -0
  103. package/build/server/chunks/chunks/mindbrainClient.js-BFAJqRSL.js +108 -0
  104. package/build/server/chunks/chunks/mindbrainClient.js-BFAJqRSL.js.map +1 -0
  105. package/build/server/chunks/chunks/ontologyInspect.js-Dm3l7KgF.js +13 -0
  106. package/build/server/chunks/chunks/ontologyInspect.js-Dm3l7KgF.js.map +1 -0
  107. package/build/server/chunks/chunks/render-context.js-CTu5Wkzp.js +475 -0
  108. package/build/server/chunks/chunks/render-context.js-CTu5Wkzp.js.map +1 -0
  109. package/build/server/chunks/chunks/renderer.js-DsOhU1UZ.js +1243 -0
  110. package/build/server/chunks/chunks/renderer.js-DsOhU1UZ.js.map +1 -0
  111. package/build/server/chunks/chunks/root.js-DCnlE3XY.js +2815 -0
  112. package/build/server/chunks/chunks/root.js-DCnlE3XY.js.map +1 -0
  113. package/build/server/chunks/chunks/shared-server.js-DaWdgxVh.js +11 -0
  114. package/build/server/chunks/chunks/shared-server.js-DaWdgxVh.js.map +1 -0
  115. package/build/server/chunks/chunks/shared.js-DuDDTJVi.js +1338 -0
  116. package/build/server/chunks/chunks/shared.js-DuDDTJVi.js.map +1 -0
  117. package/build/server/chunks/chunks/utils.js-DGYJFmnf.js +39 -0
  118. package/build/server/chunks/chunks/utils.js-DGYJFmnf.js.map +1 -0
  119. package/build/server/chunks/entries/endpoints/api/brain/_...path_/_server.ts.js-MgPpKBks.js +82 -0
  120. package/build/server/chunks/entries/endpoints/api/brain/_...path_/_server.ts.js-MgPpKBks.js.map +1 -0
  121. package/build/server/chunks/entries/endpoints/api/brain/health/_server.ts.js-DnJQNmWV.js +19 -0
  122. package/build/server/chunks/entries/endpoints/api/brain/health/_server.ts.js-DnJQNmWV.js.map +1 -0
  123. package/build/server/chunks/entries/endpoints/api/graph/_server.ts.js-Bxo7qHVz.js +37 -0
  124. package/build/server/chunks/entries/endpoints/api/graph/_server.ts.js-Bxo7qHVz.js.map +1 -0
  125. package/build/server/chunks/entries/endpoints/api/graph/count/_server.ts.js-BajaLnqp.js +37 -0
  126. package/build/server/chunks/entries/endpoints/api/graph/count/_server.ts.js-BajaLnqp.js.map +1 -0
  127. package/build/server/chunks/entries/endpoints/api/graph/ontologies/_server.ts.js-BFq2mbbX.js +146 -0
  128. package/build/server/chunks/entries/endpoints/api/graph/ontologies/_server.ts.js-BFq2mbbX.js.map +1 -0
  129. package/build/server/chunks/entries/endpoints/api/graph/schema-registry/_server.ts.js-Dyfsc-VA.js +154 -0
  130. package/build/server/chunks/entries/endpoints/api/graph/schema-registry/_server.ts.js-Dyfsc-VA.js.map +1 -0
  131. package/build/server/chunks/entries/endpoints/api/projections/catalog/_server.ts.js-Ds1RymA0.js +351 -0
  132. package/build/server/chunks/entries/endpoints/api/projections/catalog/_server.ts.js-Ds1RymA0.js.map +1 -0
  133. package/build/server/chunks/entries/fallbacks/error.svelte.js-B7V4yZjo.js +51 -0
  134. package/build/server/chunks/entries/fallbacks/error.svelte.js-B7V4yZjo.js.map +1 -0
  135. package/build/server/chunks/entries/pages/_layout.svelte.js-CoC9BAeH.js +15 -0
  136. package/build/server/chunks/entries/pages/_layout.svelte.js-CoC9BAeH.js.map +1 -0
  137. package/build/server/chunks/entries/pages/_page.svelte.js-DMEbD3K6.js +891 -0
  138. package/build/server/chunks/entries/pages/_page.svelte.js-DMEbD3K6.js.map +1 -0
  139. package/build/server/chunks/handler-BjXBCd1c.js +1698 -0
  140. package/build/server/chunks/handler-BjXBCd1c.js.map +1 -0
  141. package/build/server/chunks/index.js-BJYcV8V7.js +4183 -0
  142. package/build/server/chunks/index.js-BJYcV8V7.js.map +1 -0
  143. package/build/server/chunks/manifest.js-Ddaot0P4.js +91 -0
  144. package/build/server/chunks/manifest.js-Ddaot0P4.js.map +1 -0
  145. package/build/server/chunks/nodes/0.js-87v83UX9.js +9 -0
  146. package/build/server/chunks/nodes/0.js-87v83UX9.js.map +1 -0
  147. package/build/server/chunks/nodes/1.js-BRigw_9J.js +9 -0
  148. package/build/server/chunks/nodes/1.js-BRigw_9J.js.map +1 -0
  149. package/build/server/chunks/nodes/2.js-D9-B_qyX.js +9 -0
  150. package/build/server/chunks/nodes/2.js-D9-B_qyX.js.map +1 -0
  151. package/build/shims.js +33 -0
  152. package/build/shims.js.map +1 -0
  153. package/fixtures/minimal-graph.sqlite +0 -0
  154. package/package.json +81 -0
  155. package/scripts/backend-sqlite.mjs +190 -0
  156. package/scripts/build-serenity-v6-concept-review-pack.mjs +493 -0
  157. package/scripts/build-serenity-v6-review-pack.mjs +479 -0
  158. package/scripts/create-serenity-production-v6.mjs +627 -0
  159. package/scripts/dev-sqlite.mjs +86 -0
  160. package/scripts/export-serenity-v6-backup.mjs +178 -0
  161. package/scripts/import-serenity-v6-user-decisions.mjs +543 -0
  162. package/scripts/lib/sqlite-runtime.mjs +197 -0
  163. package/scripts/materialize-serenity-v6-snapshots.mjs +675 -0
  164. package/scripts/publish-npm.mjs +134 -0
  165. package/scripts/seed-immeuble-projections.mjs +169 -0
  166. package/scripts/studio-sqlite.mjs +74 -0
package/.env.example ADDED
@@ -0,0 +1,50 @@
1
+ # GhostCrab / MindBrain Studio
2
+ # Copy to .env for local development. The npm package also reads these variables.
3
+
4
+ NODE_ENV=development
5
+
6
+ # Backend started by Studio when a GhostCrab SQLite database exists.
7
+ GHOSTCRAB_BACKEND_ADDR=:8091
8
+ # GHOSTCRAB_SQLITE_PATH=~/.ghostcrab/databases/ghostcrab.sqlite
9
+
10
+ # Existing backend URL. If set, Studio connects to this instead of relying on a
11
+ # runtime sidecar written by scripts/backend-sqlite.mjs.
12
+ # GHOSTCRAB_MINDBRAIN_URL=http://127.0.0.1:8091
13
+ # MINDBRAIN_HTTP_URL=http://127.0.0.1:8091
14
+
15
+ # GhostCrab install/discovery overrides.
16
+ # GHOSTCRAB_BACKEND_BIN=/absolute/path/to/ghostcrab-backend
17
+ # GHOSTCRAB_ROOT=/absolute/path/to/ghostcrab-personal-mcp
18
+ # GHOSTCRAB_HOME=~/.ghostcrab
19
+ # GHOSTCRAB_DATA_DIR=~/.ghostcrab
20
+ # GHOSTCRAB_CONFIG_DIR=~/.ghostcrab
21
+ # GHOSTCRAB_CONFIG_PATH=
22
+ # GHOSTCRAB_ENV_PATH=
23
+
24
+ # GhostCrab runtime settings accepted for parity with @mindflight/ghostcrab-personal-mcp.
25
+ GHOSTCRAB_EMBEDDINGS_MODE=disabled
26
+ GHOSTCRAB_EMBEDDING_DIMENSIONS=1536
27
+ GHOSTCRAB_EMBEDDINGS_MODEL=openai/text-embedding-3-small
28
+ GHOSTCRAB_EMBEDDINGS_API_KEY=
29
+ GHOSTCRAB_EMBEDDINGS_BASE_URL=https://openrouter.ai/api/v1
30
+ GHOSTCRAB_EMBEDDINGS_TIMEOUT_MS=30000
31
+ GHOSTCRAB_EMBEDDINGS_FIXTURE_PATH=
32
+ GHOSTCRAB_HYBRID_BM25_WEIGHT=0.6
33
+ GHOSTCRAB_HYBRID_VECTOR_WEIGHT=0.4
34
+ GHOSTCRAB_POSTINSTALL_QUIET=
35
+ GHOSTCRAB_SKIP_HOST_BOOTSTRAP=
36
+ GHOSTCRAB_SKIP_POSTINSTALL_SMOKE=
37
+ GHOSTCRAB_BOOTSTRAP_SEED=1
38
+
39
+ MB_DOCUMENTS_LLM_MODE=mock
40
+ MB_DOCUMENTS_LLM_BASE_URL=https://openrouter.ai/api/v1
41
+ MB_DOCUMENTS_LLM_MODEL=qwen/qwen3-coder-next
42
+ MB_DOCUMENTS_LLM_API_KEY=
43
+ MB_DOCUMENTS_LLM_TIMEOUT_MS=30000
44
+
45
+ OPENROUTER_API_KEY=
46
+
47
+ # Offline read-only fixture mode. Studio uses this automatically when no default
48
+ # GhostCrab SQLite exists and no explicit --sqlite / GHOSTCRAB_SQLITE_PATH is set.
49
+ # DATA_SOURCE=sqlite-demo
50
+ # GHOSTCRAB_SQLITE_PATH=fixtures/minimal-graph.sqlite
package/README.md ADDED
@@ -0,0 +1,134 @@
1
+ # MindBrain Personal Studio
2
+
3
+ Local Svelte Studio for GhostCrab / MindBrain SQLite databases. It visualizes workspaces, ontologies, instance graphs, projections, and graph gap rules through the GhostCrab HTTP backend.
4
+
5
+ ## Install From npm
6
+
7
+ After the package is published:
8
+
9
+ ```bash
10
+ npm install @mindflight/mindbrain-personal-studio@0.6.1
11
+ npx mindbrain-studio
12
+ ```
13
+
14
+ The package also exposes `ghostcrab-studio`:
15
+
16
+ ```bash
17
+ npx -y --package=@mindflight/mindbrain-personal-studio@latest ghostcrab-studio
18
+ ```
19
+
20
+ By default Studio looks for `~/.ghostcrab/databases/ghostcrab.sqlite`, matching GhostCrab's user-local SQLite default. Override it for one run:
21
+
22
+ ```bash
23
+ npx -y --package=@mindflight/mindbrain-personal-studio@latest mindbrain-studio --sqlite /path/to/ghostcrab.sqlite
24
+ ```
25
+
26
+ If the default GhostCrab SQLite does not exist and no explicit database is set, Studio starts against the packaged read-only demo fixture.
27
+
28
+ ## Local Development
29
+
30
+ ```bash
31
+ pnpm install
32
+ cp .env.example .env
33
+ pnpm studio
34
+ ```
35
+
36
+ ## Commands
37
+
38
+ | Command | Role |
39
+ |---------|------|
40
+ | `pnpm backend` | Start `ghostcrab-backend` for the SQLite in `.env`, `~/.ghostcrab`, or `--sqlite PATH` |
41
+ | `pnpm dev` | Start Vite wired to that backend, or to the demo fixture when no default GhostCrab DB exists |
42
+ | `pnpm studio` | `backend --detach` then `dev` in one terminal |
43
+ | `pnpm start` | Start the built Node server from `build/index.js` |
44
+ | `pnpm load:demo` | Load syndic demo bundle into workspace `immeuble-demo` |
45
+ | `pnpm dev:fixture` | Offline read-only graph fixture, no backend |
46
+ | `pnpm pack:local` | Build and create a local npm tarball in `dist-pack/` |
47
+
48
+ ## Configuration
49
+
50
+ Studio reads `.env` from the package root and accepts the same GhostCrab variables used by `@mindflight/ghostcrab-personal-mcp`.
51
+
52
+ Most useful variables:
53
+
54
+ ```env
55
+ GHOSTCRAB_SQLITE_PATH=~/.ghostcrab/databases/ghostcrab.sqlite
56
+ GHOSTCRAB_BACKEND_ADDR=:8091
57
+ GHOSTCRAB_MINDBRAIN_URL=http://127.0.0.1:8091
58
+ GHOSTCRAB_BACKEND_BIN=/absolute/path/to/ghostcrab-backend
59
+ GHOSTCRAB_ROOT=/absolute/path/to/ghostcrab-personal-mcp
60
+ GHOSTCRAB_HOME=~/.ghostcrab
61
+ GHOSTCRAB_DATA_DIR=~/.ghostcrab
62
+ GHOSTCRAB_CONFIG_DIR=~/.ghostcrab
63
+ ```
64
+
65
+ Backend discovery order:
66
+
67
+ 1. `GHOSTCRAB_BACKEND_BIN`
68
+ 2. `GHOSTCRAB_ROOT`
69
+ 3. local `node_modules/@mindflight/ghostcrab-personal-mcp*`
70
+ 4. sibling checkout `../ghostcrab-personal-mcp`
71
+ 5. `~/.ghostcrab/bin`
72
+
73
+ ## Typical workflow
74
+
75
+ ```bash
76
+ pnpm load:demo # optional, adds immeuble-demo workspace
77
+ pnpm studio # or: pnpm backend (T1) + pnpm dev (T2)
78
+ ```
79
+
80
+ Select workspace **`immeuble-demo`**, ontology **`immeuble-demo::core`** after loading the demo.
81
+
82
+ The backend picks a free local port from 8092 when `GHOSTCRAB_BACKEND_ADDR` is not set and writes a sidecar under `data/runtime/`. If workspace pickers stay empty, verify `/api/brain/health` shows the expected SQLite path.
83
+
84
+ Optional: `pnpm seed:immeuble-projections` seeds projection rows for the Projections tab smoke test.
85
+
86
+ ## Internal terms
87
+
88
+ Studio does not open your GhostCrab SQLite in normal use. A local **GhostCrab HTTP backend** (`ghostcrab-backend`) reads the file; Studio calls it via an internal proxy (`/api/brain/*`). The codebase calls this HTTP mode `DATA_SOURCE=brain`.
89
+
90
+ `sqlite-demo` is different: Studio opens the packaged fixture read-only for graph viewer smoke tests.
91
+
92
+ ## Architecture
93
+
94
+ ```text
95
+ Svelte UI -> /api/brain/* proxy -> ghostcrab-backend HTTP -> SQLite
96
+ ```
97
+
98
+ Four tabs:
99
+
100
+ - **Modèle** — editable taxonomy trees, class/relation lists, optional schema graph
101
+ - **Données** — instance subgraph, search, docked projections drawer
102
+ - **Projections** — full catalog with auto-load and relevance
103
+ - **Rules** — graph gap rules, rule evaluation runs, invalid subjects, and dynamic graph focus
104
+
105
+ The **Rules** tab does not create persisted snapshots. It uses rule evaluation `subject_entity_id` values to focus the Données graph dynamically, like projection snapshot focus.
106
+
107
+ ## Publication
108
+
109
+ This repository is prepared for manual npm publication under `@mindflight/mindbrain-personal-studio`.
110
+
111
+ ```bash
112
+ pnpm install
113
+ pnpm check
114
+ pnpm build
115
+ pnpm pack:local
116
+ pnpm publish:npm
117
+ ```
118
+
119
+ Release `0.6.1` should be tagged after the GitHub and GitLab repositories have the same squashed `main` commit.
120
+
121
+ ## Fixture
122
+
123
+ `fixtures/minimal-graph.sqlite` is the packaged offline smoke-test database:
124
+
125
+ ```bash
126
+ pnpm dev:fixture
127
+ ```
128
+
129
+ For agent-assisted MCP switching, see [skills/ghostcrab-perso-sqlite-demo/SKILL.md](skills/ghostcrab-perso-sqlite-demo/SKILL.md).
130
+
131
+ ## Plans
132
+
133
+ - Active release plan: [`docs/plan/2026-06-28-npm-studio-release-0.6.plan.md`](docs/plan/2026-06-28-npm-studio-release-0.6.plan.md)
134
+ - Dual-view MVP (archived): [`.cursor/dual-view_graph_explorer_33bd283d.plan.md`](.cursor/dual-view_graph_explorer_33bd283d.plan.md)
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ import { spawn } from "node:child_process";
3
+ import { dirname, resolve } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const binDir = dirname(fileURLToPath(import.meta.url));
7
+ const studioRoot = resolve(binDir, "..");
8
+ const child = spawn(process.execPath, [
9
+ resolve(studioRoot, "scripts", "studio-sqlite.mjs"),
10
+ "--serve",
11
+ ...process.argv.slice(2)
12
+ ], {
13
+ cwd: studioRoot,
14
+ env: process.env,
15
+ stdio: "inherit"
16
+ });
17
+
18
+ child.on("exit", (code, signal) => {
19
+ process.exitCode = code ?? (signal ? 128 : 0);
20
+ });
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.wrap.svelte-11bec40{position:relative;width:100%;height:100%;flex:1 1 auto;min-height:0}.source-hint.svelte-11bec40{position:absolute;top:.5rem;left:.5rem;z-index:2;padding:.3rem .55rem;border-radius:6px;background:#0f172aeb;border:1px solid #334155;font-family:system-ui,sans-serif;font-size:.65rem;color:#94a3b8;pointer-events:none;max-width:min(24rem,calc(100% - 1rem))}.canvas.svelte-11bec40{width:100%;height:100%;min-height:320px;background:#0c1016}.focus-bar.svelte-11bec40{position:absolute;top:.5rem;left:50%;transform:translate(-50%);max-width:min(42rem,calc(100% - 1rem));padding:.35rem .75rem;border-radius:8px;background:#1e293bf2;border:1px solid #475569;font-family:system-ui,sans-serif;font-size:.72rem;color:#cbd5e1;display:flex;flex-wrap:wrap;align-items:baseline;gap:.35rem .6rem;pointer-events:none;z-index:2}.focus-bar.svelte-11bec40>span:where(.svelte-11bec40):first-child{font-weight:600;color:#94a3b8;text-transform:uppercase;letter-spacing:.04em;font-size:.65rem}.focus-text.svelte-11bec40{color:#f1f5f9;font-weight:500}.focus-reset.svelte-11bec40{color:#64748b;font-size:.65rem}.overlay.svelte-11bec40{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none;color:#e2e8f0;font-family:system-ui,sans-serif;font-size:.95rem}.overlay.error.svelte-11bec40{padding:1rem;text-align:center;background:#0f1419d9}.overlay.error.svelte-11bec40 p:where(.svelte-11bec40){margin:.5rem 0 0;max-width:36rem;color:#fca5a5;font-size:.85rem}.stream-bar.svelte-11bec40{position:absolute;top:0;left:0;right:0;z-index:4;background:#0f172af5;border-bottom:1px solid #1e293b;padding:.3rem .75rem;display:flex;align-items:center;gap:.6rem;font-family:ui-monospace,monospace;font-size:.66rem;color:#94a3b8;transition:opacity .8s ease;pointer-events:none}.stream-bar--complete.svelte-11bec40{opacity:0}.stream-track.svelte-11bec40{flex-shrink:0;width:8rem;height:4px;border-radius:2px;background:#1e293b;overflow:hidden}.stream-fill.svelte-11bec40{height:100%;border-radius:2px;background:linear-gradient(90deg,#3b82f6,#818cf8);transition:width .25s ease}.stream-label.svelte-11bec40{display:flex;align-items:center;flex-wrap:wrap;gap:.3rem .45rem;min-width:0}.stream-nums.svelte-11bec40{color:#cbd5e1;font-variant-numeric:tabular-nums}.stream-sep.svelte-11bec40{color:#475569}.stream-status.svelte-11bec40{color:#60a5fa}.stream-status--done.svelte-11bec40{color:#34d399}.schema-graph.svelte-es94y4{flex:1 1 auto;min-height:0;position:relative;display:flex}.sigma-root.svelte-es94y4{flex:1 1 auto;min-height:0;width:100%;position:relative;background:#0b0f14}.legend.svelte-es94y4{position:absolute;right:.65rem;bottom:.65rem;display:flex;flex-direction:column;gap:.35rem;padding:.5rem .65rem;border-radius:.45rem;border:1px solid #1e293b;background:#0b0f14eb;font-family:system-ui,sans-serif;font-size:.68rem;color:#cbd5e1;pointer-events:none}.legend-row.svelte-es94y4{display:flex;align-items:center;gap:.45rem}.swatch.svelte-es94y4{width:.75rem;height:.75rem;border-radius:999px;flex-shrink:0;border:2px solid transparent}.swatch.dashed.svelte-es94y4{border-style:dashed;border-width:2px;border-radius:2px;width:1rem;height:0}.legend-label.svelte-es94y4{line-height:1.2}.muted.svelte-es94y4{padding:1rem;color:#64748b;font-family:system-ui,sans-serif;font-size:.85rem}.error.svelte-es94y4{padding:1rem;color:#f87171;font-family:system-ui,sans-serif;font-size:.85rem}.workspace-model.svelte-1hnvxh9{flex:1;min-height:0;display:flex;flex-direction:column;background:#0b0f14;font-family:system-ui,sans-serif}.model-toolbar.svelte-1hnvxh9,.summary-bar.svelte-1hnvxh9,.graph-toolbar.svelte-1hnvxh9{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem .85rem;padding:.45rem .75rem;border-bottom:1px solid #1e293b;color:#94a3b8;font-size:.74rem}.segmented.svelte-1hnvxh9{display:inline-flex;border:1px solid #334155;border-radius:6px;overflow:hidden}.segmented.svelte-1hnvxh9 button:where(.svelte-1hnvxh9){border:0;background:#111827;color:#cbd5e1;padding:.3rem .65rem;cursor:pointer}.segmented.svelte-1hnvxh9 button.active:where(.svelte-1hnvxh9){background:#0ea5e9;color:#082f49}.select-wrap.svelte-1hnvxh9{display:inline-flex;align-items:center;gap:.45rem}.select-wrap.svelte-1hnvxh9 select:where(.svelte-1hnvxh9){background:#1e293b;color:#e2e8f0;border:1px solid #334155;border-radius:6px;padding:.25rem .5rem}.schema-list.svelte-1hnvxh9{overflow:auto}p.svelte-1hnvxh9{margin:0}.muted.svelte-1hnvxh9,.error.svelte-1hnvxh9{color:#64748b;font-size:.76rem}.schema-list.svelte-1hnvxh9 button:where(.svelte-1hnvxh9){text-align:left;background:#0f172a;border:1px solid #1e293b;color:#cbd5e1;border-radius:6px;cursor:pointer}.schema-layout.svelte-1hnvxh9{flex:1;min-height:0;display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr)}.schema-list.svelte-1hnvxh9{border-right:1px solid #1e293b;padding:.5rem}.schema-list.svelte-1hnvxh9 button:where(.svelte-1hnvxh9){display:grid;width:100%;gap:.15rem;padding:.45rem .5rem;margin-bottom:.35rem}.schema-list.svelte-1hnvxh9 strong:where(.svelte-1hnvxh9){color:#e2e8f0;font-size:.78rem}.schema-list.svelte-1hnvxh9 span:where(.svelte-1hnvxh9),.schema-list.svelte-1hnvxh9 small:where(.svelte-1hnvxh9){color:#64748b;font-size:.68rem}.model-graph-panel.svelte-1hnvxh9,.schema-graph-panel.svelte-1hnvxh9{flex:1 1 auto;min-width:0;min-height:0;display:flex;flex-direction:column}.graph-toolbar.svelte-1hnvxh9 label:where(.svelte-1hnvxh9){display:inline-flex;align-items:center;gap:.3rem}.graph-toolbar.svelte-1hnvxh9 label.disabled:where(.svelte-1hnvxh9){opacity:.45;cursor:not-allowed}.graph-toolbar.svelte-1hnvxh9 input:where(.svelte-1hnvxh9){accent-color:#38bdf8}.warn.svelte-1hnvxh9,.error.svelte-1hnvxh9{color:#f87171;font-size:.76rem}.muted.svelte-1hnvxh9,.error.svelte-1hnvxh9{padding:.75rem}.modele-panel.svelte-1d1a86y{height:100%;display:flex;flex-direction:column;min-height:0;background:#0b0f14}.body.svelte-1d1a86y{flex:1;min-height:0;display:flex;flex-direction:column}.muted.svelte-1d1a86y{padding:1rem;color:#64748b;font-family:system-ui,sans-serif;font-size:.82rem}.search.svelte-yyldap,.search-form.svelte-yyldap,.results.svelte-yyldap{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}.search-form.svelte-yyldap{flex:1 1 auto;min-width:0}.search.svelte-yyldap{padding:.45rem .75rem;border-bottom:1px solid #1e293b;background:#0f172a}select.svelte-yyldap,input.svelte-yyldap{background:#1e293b;border:1px solid #334155;color:#e2e8f0;border-radius:6px;padding:.35rem .5rem;font-size:.78rem}input.svelte-yyldap{min-width:12rem}button.svelte-yyldap{background:#0ea5e9;border:0;border-radius:6px;color:#082f49;cursor:pointer;padding:.38rem .65rem;font-size:.78rem}button.svelte-yyldap:disabled{opacity:.6;cursor:wait}.search-error.svelte-yyldap{margin:0;padding:.35rem .75rem;color:#f87171;background:#0f172a;font-size:.75rem}.results.svelte-yyldap{padding:.35rem .75rem;background:#0f172a;border-bottom:1px solid #1e293b}.result.svelte-yyldap{display:flex;flex-direction:column;align-items:flex-start;background:#1e293b;color:#e2e8f0;max-width:14rem}.result-wrap.svelte-yyldap{position:relative;display:inline-flex;align-items:stretch}.result-wrap.focused.svelte-yyldap .result:where(.svelte-yyldap){padding-right:1.85rem;border:1px solid #38bdf8}.clear-result.svelte-yyldap{position:absolute;top:.18rem;right:.18rem;width:1.2rem;height:1.2rem;display:inline-flex;align-items:center;justify-content:center;padding:0;border:1px solid #334155;border-radius:999px;background:#020617;color:#cbd5e1;font-size:.85rem;line-height:1}.clear-result.svelte-yyldap:hover{background:#1e293b;color:#f8fafc}.result-label.svelte-yyldap{font-weight:600}.result-sub.svelte-yyldap{font-size:.68rem;color:#94a3b8;text-align:left}.legend.svelte-lmk6mp{font-family:system-ui,sans-serif;font-size:.62rem;color:#cbd5e1;line-height:1.35}.legend-hint.svelte-lmk6mp{display:flex;flex-direction:column;gap:.45rem;margin:0 0 .35rem;padding-bottom:.35rem;border-bottom:1px solid #334155;color:#94a3b8;font-size:.58rem;line-height:1.35}.legend-hint-line.svelte-lmk6mp{margin:0;overflow-wrap:break-word;word-break:break-word}.legend-hint.svelte-lmk6mp code:where(.svelte-lmk6mp){font-family:ui-monospace,monospace;font-size:.85em;color:#a5b4fc}.legend-empty.svelte-lmk6mp{margin:.35rem 0 0;color:#64748b;font-size:.65rem}.legend-active.svelte-lmk6mp{display:grid;gap:.2rem;margin:0 0 .45rem;padding:.35rem .4rem;border-radius:6px;background:#2563eb2e;border:1px solid rgba(96,165,250,.45);color:#bfdbfe}.legend-active.svelte-lmk6mp span:where(.svelte-lmk6mp){font-size:.56rem;text-transform:uppercase;letter-spacing:.04em;color:#93c5fd}.legend-active.svelte-lmk6mp strong:where(.svelte-lmk6mp){font-size:.64rem;font-weight:600;overflow-wrap:anywhere}.legend-active.svelte-lmk6mp button:where(.svelte-lmk6mp){justify-self:start;border:none;border-radius:4px;padding:.12rem .35rem;background:#0f172a8c;color:#dbeafe;font:inherit;font-size:.58rem;cursor:pointer}.legend-active.svelte-lmk6mp button:where(.svelte-lmk6mp):hover{background:#1e293be6}.legend-block.svelte-lmk6mp{margin-top:.2rem}.legend-block-toggle.svelte-lmk6mp{display:flex;align-items:center;gap:.3rem;width:100%;margin:0 -.15rem;padding:.2rem .15rem;border:none;border-radius:4px;background:transparent;font:inherit;text-align:left;color:inherit;cursor:pointer}.legend-block-toggle.svelte-lmk6mp:hover{background:#33415573}.legend-block-toggle--active.svelte-lmk6mp .legend-block-title:where(.svelte-lmk6mp){color:#93c5fd}.block-chevron.svelte-lmk6mp{display:inline-block;flex-shrink:0;transition:transform .15s ease;color:#64748b;font-size:.7rem}.block-chevron.expanded.svelte-lmk6mp{transform:rotate(90deg)}.legend-block-rows.svelte-lmk6mp{padding-left:.85rem}.legend-block-title.svelte-lmk6mp{font-weight:600;font-size:.58rem;text-transform:uppercase;letter-spacing:.04em;color:#94a3b8;margin-bottom:.2rem}.legend-block-toggle.svelte-lmk6mp .legend-block-title:where(.svelte-lmk6mp){margin-bottom:0;flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-row.svelte-lmk6mp{display:flex;align-items:center;gap:.35rem;border-radius:4px;margin:0 -.15rem;padding:.1rem .15rem;width:100%;box-sizing:border-box;border:none;background:transparent;font:inherit;text-align:left;color:inherit}button.legend-row--clickable.svelte-lmk6mp{cursor:pointer;-webkit-user-select:none;user-select:none}.legend-row--clickable.svelte-lmk6mp:hover{background:#3341558c}.legend-row--active.svelte-lmk6mp{background:#3b82f633;outline:1px solid rgba(96,165,250,.55)}.swatch.svelte-lmk6mp{width:.55rem;height:.55rem;border-radius:50%;flex-shrink:0;box-shadow:0 0 0 1px #00000059}.legend-label.svelte-lmk6mp{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.property-editor.svelte-pwv6at{display:flex;flex-direction:column;gap:.45rem;padding:.5rem 0;font-family:system-ui,sans-serif;font-size:.75rem;color:#e2e8f0}h4.svelte-pwv6at{margin:0;font-size:.72rem;color:#94a3b8;text-transform:uppercase;letter-spacing:.04em}label.svelte-pwv6at{display:flex;flex-direction:column;gap:.2rem}label.svelte-pwv6at span:where(.svelte-pwv6at){color:#64748b;font-size:.68rem}input.svelte-pwv6at,select.svelte-pwv6at{background:#0f172a;border:1px solid #334155;border-radius:6px;color:#e2e8f0;padding:.35rem .45rem;font-size:.75rem}.checkbox.svelte-pwv6at{flex-direction:row;align-items:center;gap:.35rem}.actions.svelte-pwv6at{display:flex;gap:.35rem;justify-content:flex-end}button.svelte-pwv6at{background:#6366f1;border:1px solid #4f46e5;color:#eef2ff;border-radius:6px;padding:.3rem .65rem;cursor:pointer;font-size:.72rem}button.secondary.svelte-pwv6at{background:#1e293b;border-color:#334155;color:#cbd5e1}button.svelte-pwv6at:disabled{opacity:.6;cursor:default}.error.svelte-pwv6at{margin:0;color:#f87171}.help-wrap.svelte-r3rl1u{position:relative;display:inline-flex;align-items:center}.help-hint.svelte-r3rl1u{display:inline-flex;align-items:center;justify-content:center;width:1.05rem;height:1.05rem;padding:0;border-radius:999px;border:1px solid #64748b;background:transparent;color:#94a3b8;font-size:.62rem;font-weight:700;line-height:1;cursor:pointer;font-family:system-ui,sans-serif}.help-hint.svelte-r3rl1u:hover,.help-hint.svelte-r3rl1u:focus-visible{border-color:#94a3b8;color:#cbd5e1;outline:none}.help-popover.svelte-r3rl1u{position:absolute;top:calc(100% + .35rem);left:50%;transform:translate(-50%);z-index:40;width:max-content;max-width:280px;padding:.55rem .65rem;border-radius:.45rem;border:1px solid #334155;background:#1e293b;color:#cbd5e1;font-size:.72rem;line-height:1.45;font-family:system-ui,sans-serif;box-shadow:0 8px 24px #00000059}.inspector.svelte-k2kih7{height:100%;overflow:auto;padding:.75rem;border-left:1px solid #1e293b;background:#0f172a;font-family:system-ui,sans-serif;font-size:.78rem;color:#e2e8f0}h2.svelte-k2kih7,h3.svelte-k2kih7,h4.svelte-k2kih7{margin:0 0 .5rem}h2.svelte-k2kih7{font-size:.85rem}h3.svelte-k2kih7{font-size:.75rem;color:#94a3b8;text-transform:uppercase;letter-spacing:.05em}.section-head.svelte-k2kih7{display:flex;align-items:center;gap:.35rem;margin-bottom:.5rem}.section-head.svelte-k2kih7 h3:where(.svelte-k2kih7){margin:0}h4.svelte-k2kih7{margin-top:.75rem;font-size:.68rem;color:#64748b;text-transform:uppercase}section.svelte-k2kih7+section:where(.svelte-k2kih7){margin-top:1rem;padding-top:.75rem;border-top:1px solid #1e293b}.title.svelte-k2kih7{margin:0;font-weight:600}.type-id.svelte-k2kih7{margin:.1rem 0 0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.72rem;color:#64748b}.subtitle.svelte-k2kih7{margin:.15rem 0 .5rem;color:#94a3b8}.definition.svelte-k2kih7{margin:.35rem 0;line-height:1.45;color:#cbd5e1}.kv.svelte-k2kih7{margin:0}.kv.svelte-k2kih7 div:where(.svelte-k2kih7){display:grid;grid-template-columns:7rem 1fr;gap:.35rem;padding:.15rem 0}dt.svelte-k2kih7{color:#64748b}dd.svelte-k2kih7{margin:0;word-break:break-word;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.72rem}.list.svelte-k2kih7{margin:0;padding-left:1rem;color:#cbd5e1}.list.svelte-k2kih7 li:where(.svelte-k2kih7)+li:where(.svelte-k2kih7){margin-top:.25rem}.relations.svelte-k2kih7 code:where(.svelte-k2kih7){font-size:.72rem;color:#c4b5fd}.triples.svelte-k2kih7 code:where(.svelte-k2kih7){font-size:.68rem;color:#7dd3fc}.taxonomy.svelte-k2kih7 li:where(.svelte-k2kih7)+li:where(.svelte-k2kih7){margin-top:.6rem}.chips.svelte-k2kih7{display:flex;flex-wrap:wrap;gap:.25rem;margin-top:.3rem}.chip.svelte-k2kih7{border:1px solid #334155;border-radius:999px;color:#cbd5e1;background:#1e293b;padding:.12rem .35rem;font-size:.68rem}.muted.svelte-k2kih7{color:#64748b}.muted-inline.svelte-k2kih7{color:#64748b;margin-left:.35rem}.warn.svelte-k2kih7{color:#fbbf24}.link.svelte-k2kih7{margin-left:.5rem;background:none;border:none;color:#38bdf8;cursor:pointer;font-size:inherit;padding:0;text-decoration:underline}.def-actions.svelte-k2kih7{display:flex;gap:.35rem;margin:.35rem 0}.def-actions.svelte-k2kih7 button:where(.svelte-k2kih7){background:#1e293b;border:1px solid #334155;color:#cbd5e1;border-radius:6px;padding:.25rem .5rem;cursor:pointer;font-size:.68rem}.toggle-raw.svelte-k2kih7{margin-top:.75rem;background:#1e293b;border:1px solid #334155;color:#94a3b8;border-radius:6px;padding:.25rem .5rem;cursor:pointer;font-size:.68rem}pre.svelte-k2kih7{margin:.5rem 0 0;white-space:pre-wrap;word-break:break-word;color:#cbd5e1;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.68rem}.shell.svelte-9xspyz{display:flex;flex-direction:row;height:100%;min-height:0;min-width:0;font-family:system-ui,sans-serif;color:#e2e8f0}.rail.svelte-9xspyz{flex:0 0 2.25rem;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:.35rem;padding:.65rem .2rem;border:none;border-left:1px solid #1e293b;background:#0f172a;cursor:pointer;color:#94a3b8;font-size:.68rem;font-weight:600;writing-mode:vertical-rl;text-orientation:mixed}.rail.svelte-9xspyz:hover,.rail.active.svelte-9xspyz{background:#1e293b;color:#e2e8f0}.rail-label.svelte-9xspyz{letter-spacing:.08em;text-transform:uppercase}.rail-chevron.svelte-9xspyz{font-size:.75rem;color:#64748b;writing-mode:horizontal-tb}.panel.svelte-9xspyz{width:22rem;min-width:22rem;display:flex;flex-direction:column;min-height:0;border-left:1px solid #1e293b;background:#0f172a}.sections.svelte-9xspyz{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;overflow:hidden}.sections-upper.svelte-9xspyz{flex:0 1 auto;min-height:0;overflow:auto}.collapsible.svelte-9xspyz+.collapsible:where(.svelte-9xspyz),.sections-upper.svelte-9xspyz+.collapsible:where(.svelte-9xspyz){border-top:1px solid #1e293b}.collapsible-grow.svelte-9xspyz{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.collapsible-grow.svelte-9xspyz:not(.expanded){flex:0 0 auto}.section-toggle.svelte-9xspyz{display:flex;align-items:center;gap:.35rem;width:100%;padding:.55rem .75rem;border:none;background:transparent;color:#94a3b8;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;cursor:pointer;text-align:left}.section-toggle.svelte-9xspyz:hover{background:#1e293b8c;color:#cbd5e1}.chevron.svelte-9xspyz{display:inline-block;transition:transform .15s ease;color:#64748b}.chevron.expanded.svelte-9xspyz{transform:rotate(90deg)}.section-body.svelte-9xspyz{padding:0 .75rem .75rem}.section-body.svelte-9xspyz .search{padding:0;border-bottom:none;background:transparent}.section-body.svelte-9xspyz .search input{min-width:0;flex:1 1 8rem}.section-body.svelte-9xspyz .results,.section-body.svelte-9xspyz .search-error{padding-left:0;padding-right:0;background:transparent}.display-fields.svelte-9xspyz{display:flex;flex-direction:column;gap:.55rem}.field.svelte-9xspyz{display:flex;flex-direction:column;gap:.2rem}.field-label.svelte-9xspyz{font-size:.62rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#64748b}.select.svelte-9xspyz{appearance:none;background:#1e293b;color:#e2e8f0;border:1px solid #334155;border-radius:6px;padding:.35rem .5rem;font-size:.78rem;cursor:pointer;width:100%;box-sizing:border-box}.grow-body.svelte-9xspyz{flex:1 1 auto;min-height:0;overflow:auto}.selection-body.svelte-9xspyz .inspector{padding:0;border-left:none;background:transparent}:root{--tree-node-indent-per-level: .5rem;--ltree-primary: #0d6efd;--ltree-primary-rgb: 13, 110, 253;--ltree-success: #198754;--ltree-success-rgb: 25, 135, 84;--ltree-danger: #dc3545;--ltree-danger-rgb: 220, 53, 69;--ltree-light: #f8f9fa;--ltree-border: #dee2e6;--ltree-body-color: #212529}.ltree-tree{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;overflow:visible!important;position:relative}.ltree-tree .ltree-empty-state{font-style:italic;color:#6c757d;padding:1rem;text-align:center;min-height:60px}.ltree-tree,.ltree-node,.ltree-node-row,.ltree-children{overflow:visible!important}.ltree-node{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:14px;position:relative;overflow:visible}.ltree-node .ltree-node-row{display:flex;align-items:center;overflow:visible;position:relative}.ltree-node .ltree-node-content{display:flex;align-items:center;padding:4px 8px;border-radius:0;transition:background-color .2s,box-shadow .15s ease;flex:1;position:relative;overflow:visible;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.ltree-node .ltree-node-content:hover{background-color:#f8f9fa}.ltree-node .ltree-node-content.ltree-glow-before{border-radius:0!important;box-shadow:inset 0 3px #86b398cc}.ltree-node .ltree-node-content.ltree-glow-before:after{content:"";position:absolute;left:66%;top:50%;transform:translate(-50%,-50%) rotate(0);width:24px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2386b398' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 13a1 1 0 0 0-1-1H5.061a1 1 0 0 1-.75-1.811l6.836-6.835a1.207 1.207 0 0 1 1.707 0l6.835 6.835a1 1 0 0 1-.75 1.811H16a1 1 0 0 0-1 1v6a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;pointer-events:none;z-index:1}.ltree-node .ltree-node-content.ltree-glow-after{border-radius:0!important;box-shadow:inset 0 -3px #f2b69ecc}.ltree-node .ltree-node-content.ltree-glow-after:after{content:"";position:absolute;left:66%;top:50%;transform:translate(-50%,-50%) rotate(0);width:24px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f2b69e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 11a1 1 0 0 0 1 1h2.939a1 1 0 0 1 .75 1.811l-6.835 6.836a1.207 1.207 0 0 1-1.707 0L4.31 13.81a1 1 0 0 1 .75-1.811H8a1 1 0 0 0 1-1V5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;pointer-events:none;z-index:1}.ltree-node .ltree-node-content.ltree-glow-child{border-radius:0!important;box-shadow:inset -3px 0 #a79bc6cc;background-color:#a79bc626}.ltree-node .ltree-node-content.ltree-glow-child:after{content:"";position:absolute;left:66%;top:50%;transform:translate(-50%,-50%) rotate(45deg);width:24px;height:24px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a79bc6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 9a1 1 0 0 0 1-1V5.061a1 1 0 0 1 1.811-.75l6.836 6.836a1.207 1.207 0 0 1 0 1.707l-6.836 6.835a1 1 0 0 1-1.811-.75V16a1 1 0 0 0-1-1H9a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1z'/%3E%3Cpath d='M4 9v6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-size:contain;pointer-events:none;z-index:1}.ltree-node .ltree-clickable{cursor:pointer}.ltree-node .ltree-toggle-icon{width:20px;display:inline-block;text-align:center;margin-right:8px;font-size:12px;color:#6c757d;transition:transform .2s;flex-shrink:0}.ltree-node .ltree-toggle-icon.expanded{transform:rotate(90deg)}.ltree-node .ltree-node-icon{margin-right:6px;font-size:14px}.ltree-node .ltree-node-label{font-weight:500;margin-right:8px}.ltree-node .ltree-node-path{font-size:12px;color:#6c757d}.ltree-node .ltree-children{margin-top:2px}.ltree-icon-expand:before{content:"▶"}.ltree-icon-collapse:before{content:"▼"}.ltree-icon-leaf:before{content:"•"}.ltree-icon-expand-alt:before{content:"⯈"}.ltree-icon-collapse-alt:before{content:"⯆"}.ltree-icon-expand-plus:before{content:"+"}.ltree-icon-collapse-minus:before{content:"−"}.ltree-icon-expand-arrow:before{content:"→"}.ltree-icon-collapse-arrow:before{content:"↓"}.ltree-checkbox{display:inline-flex;align-items:center;margin-right:4px;cursor:pointer;position:relative;vertical-align:middle}.ltree-checkbox input[type=checkbox]{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.ltree-checkbox .ltree-checkbox__box{display:inline-block;width:var(--ltree-checkbox-size, 15px);height:var(--ltree-checkbox-size, 15px);border:var(--ltree-checkbox-border-width, 1.5px) solid var(--ltree-checkbox-border-color, #adb5bd);border-radius:var(--ltree-checkbox-border-radius, 3px);background:var(--ltree-checkbox-bg, #fff);transition:background-color .15s ease,border-color .15s ease;position:relative;flex-shrink:0}.ltree-checkbox .ltree-checkbox__box:after{content:"";position:absolute;display:none}.ltree-checkbox:hover .ltree-checkbox__box{border-color:var(--ltree-primary, #0d6efd)}.ltree-checkbox input:checked+.ltree-checkbox__box{background:var(--ltree-primary, #0d6efd);border-color:var(--ltree-primary, #0d6efd)}.ltree-checkbox input:checked+.ltree-checkbox__box:after{display:block;left:4px;top:1px;width:4px;height:8px;border:solid var(--ltree-checkbox-checkmark-color, #fff);border-width:0 2px 2px 0;transform:rotate(45deg)}.ltree-checkbox input:indeterminate+.ltree-checkbox__box{background:var(--ltree-primary, #0d6efd);border-color:var(--ltree-primary, #0d6efd)}.ltree-checkbox input:indeterminate+.ltree-checkbox__box:after{display:block;left:3px;top:50%;width:calc(var(--ltree-checkbox-size, 15px) - 8px);height:0;border:solid var(--ltree-checkbox-checkmark-color, #fff);border-width:0 0 2px 0;transform:translateY(-50%)}.ltree-checkbox input:focus-visible+.ltree-checkbox__box{box-shadow:0 0 0 2px rgba(var(--ltree-primary-rgb, 13, 110, 253),.25)}.ltree-selected-bold{font-weight:700!important;color:var(--ltree-primary)!important}.ltree-selected-border{border:2px solid var(--ltree-primary)!important;border-radius:4px!important;background-color:rgba(var(--ltree-primary-rgb),.1)!important;padding:6px 10px!important}.ltree-selected-highlight{background-color:var(--ltree-highlight-bg, #cce8ff)!important;color:var(--ltree-highlight-color, inherit)!important}.ltree-multi-selected{background-color:rgba(var(--ltree-primary-rgb),.08)!important;outline:1px solid rgba(var(--ltree-primary-rgb),.25);outline-offset:-1px}.ltree-selected-brackets{position:relative}.ltree-selected-brackets:before{content:"❯";margin-right:6px;color:var(--ltree-primary);font-weight:700}.ltree-selected-brackets:after{content:"❮";margin-left:6px;color:var(--ltree-primary);font-weight:700}.ltree-checkbox~.ltree-selected-brackets:before,.ltree-checkbox~.ltree-selected-brackets:after{content:none}.ltree-dragover-highlight{background-color:rgba(var(--ltree-success-rgb),.15)!important;border:2px dashed var(--ltree-success)!important;border-radius:4px!important}.ltree-dragover-glow{background-color:rgba(var(--ltree-primary-rgb),.1)!important;box-shadow:0 0 8px rgba(var(--ltree-primary-rgb),.4)!important}@keyframes bounce{0%,20%,50%,80%,to{transform:translateY(-50%)}40%{transform:translateY(-60%)}60%{transform:translateY(-40%)}}.ltree-draggable{cursor:grab}.ltree-draggable:active{cursor:grabbing}.ltree-dragged{opacity:.5;transform:scale(.95);transition:opacity .2s,transform .2s}.ltree-drop-copy{cursor:copy!important}.ltree-touch-ghost{position:fixed;transform:translate(-50%,-50%);padding:8px 12px;background:var(--tree-ghost-bg, rgba(59, 130, 246, .9));color:var(--tree-ghost-color, white);border-radius:4px;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;pointer-events:none;z-index:10000;box-shadow:0 4px 12px #0000004d;white-space:nowrap;max-width:200px;overflow:hidden;text-overflow:ellipsis}.ltree-drop-placeholder{border:2px dashed var(--ltree-primary)!important;background-color:rgba(var(--ltree-primary-rgb),.1)!important;border-radius:8px;min-height:60px;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.ltree-drop-placeholder-content{color:var(--ltree-primary);font-size:14px;font-weight:500;padding:16px;text-align:center}.ltree-node-content.ltree-drag-over{background-color:rgba(var(--ltree-primary-rgb),.1)!important;border:2px dashed var(--ltree-primary);border-radius:4px}.ltree-node-content.ltree-drag-over:before{content:"";position:absolute;inset:-2px;background:linear-gradient(45deg,transparent,rgba(var(--ltree-primary-rgb),.05));pointer-events:none;border-radius:4px}.ltree-node-content.ltree-drop-valid{border-color:var(--ltree-success)!important;background-color:rgba(var(--ltree-success-rgb),.1)!important}.ltree-node-content.ltree-drop-invalid{border-color:var(--ltree-danger)!important;background-color:rgba(var(--ltree-danger-rgb),.1)!important}.ltree-context-menu{position:fixed;z-index:1000;background:#fff;border:1px solid var(--ltree-border);border-radius:4px;box-shadow:0 2px 10px #0000001a;padding:4px 0;min-width:150px}.ltree-context-menu .ltree-context-menu-item{display:flex;align-items:center;padding:8px 16px;border:none;background:none;width:100%;text-align:left;cursor:pointer;color:var(--ltree-body-color);text-decoration:none;font-size:14px;position:relative}.ltree-context-menu .ltree-context-menu-item:hover{background-color:var(--ltree-light)}.ltree-context-menu .ltree-context-menu-item.ltree-context-menu-item-disabled{opacity:.5;cursor:not-allowed}.ltree-context-menu .ltree-context-menu-item.danger{color:var(--ltree-danger)}.ltree-context-menu .ltree-context-menu-item.danger:hover{background-color:rgba(var(--ltree-danger-rgb),.1)}.ltree-context-menu .ltree-context-menu-item.ltree-context-menu-has-children{cursor:default}.ltree-context-menu .ltree-context-menu-item.ltree-context-menu-has-children>.ltree-context-submenu{display:none}.ltree-context-menu .ltree-context-menu-item.ltree-context-menu-has-children:hover>.ltree-context-submenu{display:block}.ltree-context-menu .ltree-context-menu-icon{margin-right:8px;font-size:12px;width:16px;text-align:center;flex-shrink:0}.ltree-context-menu .ltree-context-menu-label{flex-grow:1}.ltree-context-menu .ltree-context-menu-shortcut{margin-left:auto;padding-left:16px;color:#9ca3af;font-size:12px;flex-shrink:0}.ltree-context-menu .ltree-context-menu-arrow{margin-left:8px;font-size:10px;color:#9ca3af;flex-shrink:0}.ltree-context-menu .ltree-context-menu-divider{display:flex;align-items:center;margin:4px 0}.ltree-context-menu .ltree-context-menu-divider:not(:has(.ltree-context-menu-divider-label)){height:1px;background-color:var(--ltree-border)}.ltree-context-menu .ltree-context-menu-divider:has(.ltree-context-menu-divider-label){gap:8px;padding:0 12px}.ltree-context-menu .ltree-context-menu-divider:has(.ltree-context-menu-divider-label):before,.ltree-context-menu .ltree-context-menu-divider:has(.ltree-context-menu-divider-label):after{content:"";flex:1;height:1px;background-color:var(--ltree-border)}.ltree-context-menu .ltree-context-menu-divider-label{font-size:11px;color:#9ca3af;white-space:nowrap;text-transform:uppercase;letter-spacing:.05em}.ltree-context-menu .ltree-context-submenu{position:absolute;left:100%;top:0;background:#fff;border:1px solid var(--ltree-border);border-radius:4px;box-shadow:0 2px 10px #0000001a;padding:4px 0;min-width:150px;z-index:1001}.ltree-debug-info{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:.75em;background-color:rgba(var(--ltree-primary-rgb),.05);border:1px solid rgba(var(--ltree-primary-rgb),.2);border-radius:.25em;padding:.5em;margin-bottom:.5em}.ltree-debug-info details summary{cursor:pointer;font-weight:600;color:var(--ltree-primary);padding:.25em 0}.ltree-debug-info details summary:hover{color:rgba(var(--ltree-primary-rgb),.8)}.ltree-debug-info details[open] summary{margin-bottom:.5em;border-bottom:1px solid rgba(var(--ltree-primary-rgb),.2)}.ltree-debug-info .ltree-debug-stats{display:flex;flex-wrap:wrap;gap:.75em}.ltree-debug-info .ltree-debug-stats span{background-color:var(--ltree-light);padding:.125em .375em;border-radius:.125em;font-family:monospace;font-size:.9em;color:var(--ltree-body-color);border:1px solid var(--ltree-border)}.ltree-scroll-highlight{background-color:rgba(var(--ltree-primary-rgb),.3)!important;box-shadow:0 0 .5em rgba(var(--ltree-primary-rgb),.4);border-radius:.25em}.ltree-scroll-highlight-arrow{position:relative}.ltree-scroll-highlight-arrow:before{content:"⇨";position:absolute;left:-1.2em;top:50%;transform:translateY(-57%);font-size:3em;pointer-events:none;color:var(--ltree-danger);z-index:1}.ltree-scroll-highlight-arrow:after{content:"⇦";position:absolute;right:0;top:50%;transform:translateY(-57%);font-size:3em;pointer-events:none;color:var(--ltree-danger);z-index:1}.ltree-drop-zones{pointer-events:none;overflow:visible}.ltree-drop-zone{position:absolute;display:flex;align-items:center;justify-content:center;padding:6px 12px;font-size:.75rem;font-weight:600;cursor:pointer;pointer-events:auto;z-index:1000;transition:all .15s ease;border-radius:0}.ltree-drop-zone.ltree-drop-before{background:#86b39840;color:#3e5948b3}.ltree-drop-zone.ltree-drop-before.ltree-drop-zone-active{background:#86b398d9;color:#203628;box-shadow:0 2px 12px #86b39866}.ltree-drop-zone.ltree-drop-after{background:#f2b69e40;color:#784632b3}.ltree-drop-zone.ltree-drop-after.ltree-drop-zone-active{background:#f2b69ed9;color:#502d1e;box-shadow:0 2px 12px #f2b69e66}.ltree-drop-zone.ltree-drop-child{background:#a79bc640;color:#483e62b3}.ltree-drop-zone.ltree-drop-child.ltree-drop-zone-active{background:#a79bc6d9;color:#2d263e;box-shadow:0 2px 12px #a79bc666}.ltree-drop-zones-around .ltree-drop-before{top:0;left:var(--drop-zone-start, 33%);right:0;transform:translateY(-100%)}.ltree-drop-zones-around .ltree-drop-after{bottom:0;left:var(--drop-zone-start, 33%);right:calc((100% - var(--drop-zone-start, 33%)) / 2);transform:translateY(100%)}.ltree-drop-zones-around .ltree-drop-child{bottom:0;left:calc(var(--drop-zone-start, 33%) + (100% - var(--drop-zone-start, 33%)) / 2);right:0;transform:translateY(100%)}.ltree-drop-zones-around:not(:has(.ltree-drop-child)) .ltree-drop-after{right:0}.ltree-drop-zones-around:not(:has(.ltree-drop-after)) .ltree-drop-child{left:var(--drop-zone-start, 33%)}.ltree-drop-zones-above .ltree-drop-before,.ltree-drop-zones-above .ltree-drop-after,.ltree-drop-zones-above .ltree-drop-child{top:0;transform:translateY(-100%)}.ltree-drop-zones-above .ltree-drop-before{left:var(--drop-zone-start, 33%);right:calc((100% - var(--drop-zone-start, 33%)) * 2 / 3);border-radius:0}.ltree-drop-zones-above .ltree-drop-after{left:calc(var(--drop-zone-start, 33%) + (100% - var(--drop-zone-start, 33%)) / 3);right:calc((100% - var(--drop-zone-start, 33%)) / 3);border-radius:0}.ltree-drop-zones-above .ltree-drop-child{left:calc(var(--drop-zone-start, 33%) + (100% - var(--drop-zone-start, 33%)) * 2 / 3);right:0;border-radius:0}.ltree-drop-zones-above:not(:has(.ltree-drop-child)) .ltree-drop-before,.ltree-drop-zones-above:not(:has(.ltree-drop-after)) .ltree-drop-before,.ltree-drop-zones-above:not(:has(.ltree-drop-before)) .ltree-drop-after{left:var(--drop-zone-start, 33%);right:calc((100% - var(--drop-zone-start, 33%)) / 2);border-radius:0}.ltree-drop-zones-above:not(:has(.ltree-drop-child)) .ltree-drop-after,.ltree-drop-zones-above:not(:has(.ltree-drop-after)) .ltree-drop-child,.ltree-drop-zones-above:not(:has(.ltree-drop-before)) .ltree-drop-child{left:calc(var(--drop-zone-start, 33%) + (100% - var(--drop-zone-start, 33%)) / 2);right:0;border-radius:0}.ltree-drop-zones-above:not(:has(.ltree-drop-after)):not(:has(.ltree-drop-child)) .ltree-drop-before,.ltree-drop-zones-above:not(:has(.ltree-drop-before)):not(:has(.ltree-drop-child)) .ltree-drop-after,.ltree-drop-zones-above:not(:has(.ltree-drop-before)):not(:has(.ltree-drop-after)) .ltree-drop-child{left:var(--drop-zone-start, 33%);right:0;border-radius:0}.ltree-drop-zones-below .ltree-drop-before,.ltree-drop-zones-below .ltree-drop-after,.ltree-drop-zones-below .ltree-drop-child{bottom:0;transform:translateY(100%)}.ltree-drop-zones-below .ltree-drop-before{left:var(--drop-zone-start, 33%);right:calc((100% - var(--drop-zone-start, 33%)) * 2 / 3);border-radius:0}.ltree-drop-zones-below .ltree-drop-after{left:calc(var(--drop-zone-start, 33%) + (100% - var(--drop-zone-start, 33%)) / 3);right:calc((100% - var(--drop-zone-start, 33%)) / 3);border-radius:0}.ltree-drop-zones-below .ltree-drop-child{left:calc(var(--drop-zone-start, 33%) + (100% - var(--drop-zone-start, 33%)) * 2 / 3);right:0;border-radius:0}.ltree-drop-zones-below:not(:has(.ltree-drop-child)) .ltree-drop-before,.ltree-drop-zones-below:not(:has(.ltree-drop-after)) .ltree-drop-before,.ltree-drop-zones-below:not(:has(.ltree-drop-before)) .ltree-drop-after{left:var(--drop-zone-start, 33%);right:calc((100% - var(--drop-zone-start, 33%)) / 2);border-radius:0}.ltree-drop-zones-below:not(:has(.ltree-drop-child)) .ltree-drop-after,.ltree-drop-zones-below:not(:has(.ltree-drop-after)) .ltree-drop-child,.ltree-drop-zones-below:not(:has(.ltree-drop-before)) .ltree-drop-child{left:calc(var(--drop-zone-start, 33%) + (100% - var(--drop-zone-start, 33%)) / 2);right:0;border-radius:0}.ltree-drop-zones-below:not(:has(.ltree-drop-after)):not(:has(.ltree-drop-child)) .ltree-drop-before,.ltree-drop-zones-below:not(:has(.ltree-drop-before)):not(:has(.ltree-drop-child)) .ltree-drop-after,.ltree-drop-zones-below:not(:has(.ltree-drop-before)):not(:has(.ltree-drop-after)) .ltree-drop-child{left:var(--drop-zone-start, 33%);right:0;border-radius:0}.ltree-drop-zones-wave .ltree-drop-before,.ltree-drop-zones-wave .ltree-drop-after,.ltree-drop-zones-wave .ltree-drop-child{left:var(--drop-zone-start, 33%);right:auto;width:var(--drop-zone-max-width, 120px);max-width:var(--drop-zone-max-width, 120px);height:auto;transform:none}.ltree-drop-zones-wave .ltree-drop-before{top:0;bottom:auto;transform:translateY(-100%);border-radius:0}.ltree-drop-zones-wave .ltree-drop-child{top:0;bottom:0;border-radius:0}.ltree-drop-zones-wave .ltree-drop-after{top:auto;bottom:0;transform:translateY(100%);border-radius:0}.ltree-drop-zones-wave2 .ltree-drop-before,.ltree-drop-zones-wave2 .ltree-drop-after,.ltree-drop-zones-wave2 .ltree-drop-child{right:auto;width:var(--drop-zone-max-width, 120px);max-width:var(--drop-zone-max-width, 120px);height:auto}.ltree-drop-zones-wave2 .ltree-drop-before{left:calc(var(--drop-zone-start, 33%) - 7%);top:10%;bottom:auto;height:80%;transform:translateY(-100%);border-radius:0}.ltree-drop-zones-wave2 .ltree-drop-child{left:var(--drop-zone-start, 33%);top:10%;bottom:10%;border-radius:0}.ltree-drop-zones-wave2 .ltree-drop-after{left:calc(var(--drop-zone-start, 33%) - 7%);top:auto;bottom:10%;height:80%;transform:translateY(100%);border-radius:0}.ltree-tree{margin:0;padding:0;list-style:none;color:var(--ltree-body-color)}.ltree-virtual-scroll{overflow-y:auto!important;overflow-x:visible;overscroll-behavior:contain}.ltree-container{position:relative;outline:none}.ltree-loading-overlay{position:absolute;inset:0;background:var(--ltree-loading-bg, rgba(255, 255, 255, .8));display:flex;align-items:center;justify-content:center;z-index:10}.ltree-loading-spinner{width:var(--ltree-spinner-size, 32px);height:var(--ltree-spinner-size, 32px);border:3px solid var(--ltree-spinner-track, #e2e8f0);border-top-color:var(--ltree-spinner-color, var(--ltree-primary, #667eea));border-radius:50%;animation:ltree-spin .8s linear infinite}@keyframes ltree-spin{to{transform:rotate(360deg)}}.ltree-loading-more{padding:4px 8px;margin-left:var(--tree-node-indent-per-level, .5rem);font-size:12px;color:var(--ltree-loading-color, #718096);font-style:italic}.json-tree.svelte-19sik8e{margin-top:.75rem;border:1px solid #1e293b;border-radius:8px;background:#0f172a;padding:.45rem;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#e2e8f0;--ltree-body-color: #e2e8f0;--ltree-light: #1e293b;--ltree-border: #334155;--ltree-primary: #0ea5e9;--ltree-primary-rgb: 14, 165, 233;--ltree-highlight-bg: #102033;--ltree-highlight-color: #e0f2fe}.json-tree.svelte-19sik8e .ltree-tree{color:#e2e8f0}.json-tree.svelte-19sik8e .ltree-node-content{padding:2px 5px}.json-tree.svelte-19sik8e .ltree-node-content:hover{background-color:#172033}.json-tree.svelte-19sik8e .ltree-children{margin-top:0}.json-tree .ltree-node{font-size:.7rem;line-height:1.45}.json-row.svelte-19sik8e{display:flex;align-items:baseline;gap:.25rem;min-width:0;overflow-wrap:anywhere}.json-key.svelte-19sik8e{color:#93c5fd;font-weight:650}.json-separator.svelte-19sik8e,.json-row.branch.svelte-19sik8e .json-value:where(.svelte-19sik8e){color:#64748b}.json-value.svelte-19sik8e{color:#cbd5e1;min-width:0;overflow-wrap:anywhere}.type-string.svelte-19sik8e{color:#86efac}.type-number.svelte-19sik8e{color:#fbbf24}.type-boolean.svelte-19sik8e{color:#f0abfc}.type-null.svelte-19sik8e{color:#94a3b8;font-style:italic}.projections.svelte-6ezzcw{height:100%;overflow:hidden;display:flex;flex-direction:column;background:#0b0f14;color:#e2e8f0;font-family:system-ui,sans-serif}.toolbar.svelte-6ezzcw,.kind-tabs.svelte-6ezzcw,.proj-type-tabs.svelte-6ezzcw{flex:0 0 auto;border-bottom:1px solid #1e293b}.toolbar.svelte-6ezzcw{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;padding:.85rem 1rem}h2.svelte-6ezzcw,h3.svelte-6ezzcw,h4.svelte-6ezzcw,p.svelte-6ezzcw{margin:0}h2.svelte-6ezzcw{font-size:1rem}.toolbar.svelte-6ezzcw p:where(.svelte-6ezzcw),.result-head.svelte-6ezzcw p:where(.svelte-6ezzcw),.muted.svelte-6ezzcw,.tag.svelte-6ezzcw,.scope.svelte-6ezzcw,.search.svelte-6ezzcw span:where(.svelte-6ezzcw){color:#94a3b8}.toolbar.svelte-6ezzcw p:where(.svelte-6ezzcw),.result-head.svelte-6ezzcw p:where(.svelte-6ezzcw){margin-top:.2rem;font-size:.72rem}.actions.svelte-6ezzcw,.result-actions.svelte-6ezzcw{display:flex;align-items:flex-end;gap:.55rem}.search.svelte-6ezzcw{display:flex;flex-direction:column;gap:.25rem;font-size:.68rem}input.svelte-6ezzcw{width:15rem;min-width:0;background:#111827;border:1px solid #334155;color:#e2e8f0;border-radius:6px;padding:.4rem .5rem;font:inherit}button.svelte-6ezzcw{background:#38bdf8;color:#082f49;border:1px solid #38bdf8;border-radius:6px;padding:.42rem .7rem;cursor:pointer;font-size:.78rem;font-weight:650}button.svelte-6ezzcw:disabled{opacity:.55;cursor:default}.kind-tabs.svelte-6ezzcw,.proj-type-tabs.svelte-6ezzcw{display:flex;gap:.35rem;overflow-x:auto}.kind-tabs.svelte-6ezzcw{padding:.6rem 1rem}.proj-type-tabs.svelte-6ezzcw{padding:.45rem 1rem;background:#0f172a}.kind-tabs.svelte-6ezzcw button:where(.svelte-6ezzcw),.proj-type-tabs.svelte-6ezzcw button:where(.svelte-6ezzcw){background:#111827;border-color:#334155;color:#cbd5e1;white-space:nowrap}.kind-tabs.svelte-6ezzcw button.active:where(.svelte-6ezzcw),.proj-type-tabs.svelte-6ezzcw button.active:where(.svelte-6ezzcw){background:#0ea5e9;border-color:#0284c7;color:#082f49}.kind-tabs.svelte-6ezzcw span:where(.svelte-6ezzcw),.proj-type-tabs.svelte-6ezzcw span:where(.svelte-6ezzcw){margin-left:.25rem;font-variant-numeric:tabular-nums}.layout.svelte-6ezzcw{min-height:0;flex:1 1 auto;display:grid;grid-template-columns:minmax(24rem,1.15fr) minmax(20rem,.85fr)}.catalog.svelte-6ezzcw,.result.svelte-6ezzcw{min-height:0;overflow:auto;padding:1rem}.catalog.svelte-6ezzcw{border-right:1px solid #1e293b}.type-group.svelte-6ezzcw+.type-group:where(.svelte-6ezzcw){margin-top:1rem}.result-head.svelte-6ezzcw{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.type-group.svelte-6ezzcw>header:where(.svelte-6ezzcw){margin-bottom:.45rem}.group-toggle.svelte-6ezzcw{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.25rem 0;background:transparent;border:0;color:#e2e8f0;text-align:left}.group-toggle.svelte-6ezzcw small:where(.svelte-6ezzcw){color:#64748b;font-size:.75rem;font-variant-numeric:tabular-nums}.result.svelte-6ezzcw h3:where(.svelte-6ezzcw){font-size:.88rem}.type-group.svelte-6ezzcw>header:where(.svelte-6ezzcw) span:where(.svelte-6ezzcw){color:#64748b;font-size:.75rem}.rows.svelte-6ezzcw,.detail-list.svelte-6ezzcw{list-style:none;margin:0;padding:0}.rows.svelte-6ezzcw{display:grid;gap:.5rem}.rows.svelte-6ezzcw li:where(.svelte-6ezzcw),.detail-list.svelte-6ezzcw li:where(.svelte-6ezzcw){border:1px solid #1e293b;border-radius:8px;background:#0f172a;padding:.65rem}.rows.svelte-6ezzcw li.highlight:where(.svelte-6ezzcw){border-color:#0ea5e9}.rows.svelte-6ezzcw li.selected:where(.svelte-6ezzcw){border-color:#38bdf8;background:#102033}.row-button.svelte-6ezzcw{display:block;width:100%;padding:0;background:transparent;border:0;color:inherit;text-align:left}.row-title.svelte-6ezzcw{display:block;overflow-wrap:anywhere;font-size:.82rem;font-weight:700}.title-prefix.svelte-6ezzcw{margin-right:.25rem;color:#94a3b8;font-size:.72rem;font-weight:650}.content.svelte-6ezzcw{display:block;margin-top:.4rem;color:#cbd5e1;font-size:.78rem;font-weight:400;line-height:1.35;overflow-wrap:anywhere}.row-meta.svelte-6ezzcw,.row-actions.svelte-6ezzcw{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.55rem}.tag.svelte-6ezzcw,.scope.svelte-6ezzcw{font-size:.68rem}.scope.svelte-6ezzcw{overflow-wrap:anywhere}.row-actions.svelte-6ezzcw button:where(.svelte-6ezzcw),.result-actions.svelte-6ezzcw button:where(.svelte-6ezzcw){background:#1e293b;color:#e2e8f0;border-color:#334155}.result-head.svelte-6ezzcw{margin-bottom:.75rem}.detail-line.svelte-6ezzcw{margin-bottom:.75rem;color:#cbd5e1;font-size:.78rem;line-height:1.4}.detail-list.svelte-6ezzcw{display:grid;gap:.5rem;margin:.5rem 0 1rem}.detail-list.svelte-6ezzcw li:where(.svelte-6ezzcw){color:#cbd5e1;font-size:.74rem;line-height:1.35;overflow-wrap:anywhere}details.svelte-6ezzcw{margin-top:1rem;border-top:1px solid #1e293b;padding-top:.75rem}summary.svelte-6ezzcw{cursor:pointer;color:#38bdf8;font-size:.76rem}.error.svelte-6ezzcw{margin:0;padding:.65rem 1rem;border-bottom:1px solid #7f1d1d;color:#fca5a5;background:#2a1114;font-size:.76rem}@media(max-width:900px){.toolbar.svelte-6ezzcw,.actions.svelte-6ezzcw{align-items:stretch;flex-direction:column}input.svelte-6ezzcw{width:100%}.layout.svelte-6ezzcw{grid-template-columns:1fr}.catalog.svelte-6ezzcw{border-right:0;border-bottom:1px solid #1e293b}}.drawer.svelte-1mzsyd7{flex:0 0 auto;max-height:40%;border-top:1px solid #1e293b;background:#0f172a;display:flex;flex-direction:column;min-height:0;font-family:system-ui,sans-serif}.drawer.collapsed.svelte-1mzsyd7{max-height:2.2rem;overflow:hidden}header.svelte-1mzsyd7{display:flex;align-items:center;gap:.75rem;padding:.35rem .75rem;border-bottom:1px solid #1e293b}.toggle.svelte-1mzsyd7{background:transparent;border:none;color:#38bdf8;cursor:pointer;font-size:.78rem;font-weight:600}.hint.svelte-1mzsyd7{flex:1 1 auto;font-size:.68rem;color:#64748b}.reset.svelte-1mzsyd7{background:#1e293b;border:1px solid #334155;color:#e2e8f0;border-radius:4px;padding:.2rem .45rem;font-size:.68rem;cursor:pointer}.filter-row.svelte-1mzsyd7{display:flex;align-items:center;gap:.5rem;padding:.35rem .75rem;border-bottom:1px solid #1e293b}.filter-row.svelte-1mzsyd7 input:where(.svelte-1mzsyd7){flex:1 1 auto;min-width:0;background:#111827;border:1px solid #334155;color:#e2e8f0;border-radius:4px;padding:.25rem .4rem;font:inherit;font-size:.7rem}.filter-row.svelte-1mzsyd7 span:where(.svelte-1mzsyd7){color:#64748b;font-size:.68rem;font-variant-numeric:tabular-nums}ul.svelte-1mzsyd7{list-style:none;margin:0;padding:.35rem .75rem .75rem;overflow:auto}li.svelte-1mzsyd7{border:1px solid #1e293b;border-radius:6px;padding:.45rem .55rem;background:#0b0f14}li.svelte-1mzsyd7+li:where(.svelte-1mzsyd7){margin-top:.35rem}li.highlight.svelte-1mzsyd7{border-color:#0ea5e9;box-shadow:0 0 0 1px #0ea5e940}li.selected.svelte-1mzsyd7{border-color:#38bdf8;background:#102033}.row-select.svelte-1mzsyd7{display:block;width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.row-head.svelte-1mzsyd7{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center;font-size:.78rem}.row-head.svelte-1mzsyd7 strong:where(.svelte-1mzsyd7){overflow-wrap:anywhere}.tag.svelte-1mzsyd7{font-size:.65rem;color:#94a3b8}.content.svelte-1mzsyd7{display:block;margin:.25rem 0;font-size:.72rem;color:#cbd5e1;overflow-wrap:anywhere}.actions.svelte-1mzsyd7{display:flex;flex-wrap:wrap;gap:.35rem}.actions.svelte-1mzsyd7 button:where(.svelte-1mzsyd7){background:#1e293b;border:1px solid #334155;color:#e2e8f0;border-radius:4px;padding:.2rem .45rem;font-size:.68rem;cursor:pointer}.muted.svelte-1mzsyd7,.error.svelte-1mzsyd7{padding:.5rem .75rem;font-size:.72rem}.muted.svelte-1mzsyd7{color:#64748b}.error.svelte-1mzsyd7{color:#f87171}.rules.svelte-1u70db1{height:100%;overflow:hidden;display:flex;flex-direction:column;background:#0b0f14;color:#e2e8f0;font-family:system-ui,sans-serif}.toolbar.svelte-1u70db1,.filters.svelte-1u70db1,.summary.svelte-1u70db1{flex:0 0 auto;border-bottom:1px solid #1e293b}.toolbar.svelte-1u70db1{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;padding:.85rem 1rem}h2.svelte-1u70db1,h3.svelte-1u70db1,h4.svelte-1u70db1,p.svelte-1u70db1{margin:0}h2.svelte-1u70db1{font-size:1rem}h4.svelte-1u70db1{margin-top:1rem;font-size:.82rem;color:#cbd5e1}.toolbar.svelte-1u70db1 p:where(.svelte-1u70db1),.result-head.svelte-1u70db1 p:where(.svelte-1u70db1),.muted.svelte-1u70db1,.tag.svelte-1u70db1,.scope.svelte-1u70db1,.search.svelte-1u70db1 span:where(.svelte-1u70db1),.count.svelte-1u70db1{color:#94a3b8}.toolbar.svelte-1u70db1 p:where(.svelte-1u70db1),.result-head.svelte-1u70db1 p:where(.svelte-1u70db1){margin-top:.2rem;font-size:.72rem}.actions.svelte-1u70db1,.result-actions.svelte-1u70db1,.summary.svelte-1u70db1{display:flex;align-items:flex-end;gap:.55rem}.actions.svelte-1u70db1,.summary.svelte-1u70db1,.filters.svelte-1u70db1{flex-wrap:wrap}.search.svelte-1u70db1{display:flex;flex-direction:column;gap:.25rem;font-size:.68rem}input.svelte-1u70db1{width:15rem;min-width:0;background:#111827;border:1px solid #334155;color:#e2e8f0;border-radius:6px;padding:.4rem .5rem;font:inherit}button.svelte-1u70db1{background:#38bdf8;color:#082f49;border:1px solid #38bdf8;border-radius:6px;padding:.42rem .7rem;cursor:pointer;font-size:.78rem;font-weight:650}button.svelte-1u70db1:disabled{opacity:.55;cursor:default}.filters.svelte-1u70db1{display:flex;gap:.35rem;overflow-x:auto;padding:.6rem 1rem}.filters.svelte-1u70db1 button:where(.svelte-1u70db1){background:#111827;border-color:#334155;color:#cbd5e1;white-space:nowrap}.filters.svelte-1u70db1 button.active:where(.svelte-1u70db1){background:#0ea5e9;border-color:#0284c7;color:#082f49}.filters.svelte-1u70db1 span:where(.svelte-1u70db1){margin-left:.25rem;font-variant-numeric:tabular-nums}.summary.svelte-1u70db1{padding:.45rem 1rem;background:#0f172a;font-size:.74rem;color:#cbd5e1}.summary.svelte-1u70db1 span:where(.svelte-1u70db1){font-variant-numeric:tabular-nums}.summary.svelte-1u70db1 button:where(.svelte-1u70db1){margin-left:auto;padding-block:.3rem}.layout.svelte-1u70db1{min-height:0;flex:1 1 auto;display:grid;grid-template-columns:minmax(24rem,1.15fr) minmax(20rem,.85fr)}.catalog.svelte-1u70db1,.result.svelte-1u70db1{min-height:0;overflow:auto}.catalog.svelte-1u70db1{border-right:1px solid #1e293b}.rows.svelte-1u70db1,.detail-list.svelte-1u70db1{list-style:none;margin:0;padding:0}.rows.svelte-1u70db1 li:where(.svelte-1u70db1){border-bottom:1px solid #1e293b;padding:.75rem 1rem}.rows.svelte-1u70db1 li.selected:where(.svelte-1u70db1){background:#102033}.row-button.svelte-1u70db1{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:.25rem;padding:0;border:0;background:transparent;color:inherit;text-align:left}.row-title.svelte-1u70db1{font-size:.86rem;font-weight:700;color:#f8fafc;overflow-wrap:anywhere}.content.svelte-1u70db1{color:#cbd5e1;font-size:.75rem;line-height:1.35}.row-meta.svelte-1u70db1,.row-actions.svelte-1u70db1{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;margin-top:.5rem}.tag.svelte-1u70db1,.scope.svelte-1u70db1,.count.svelte-1u70db1{font-size:.68rem}.tag.svelte-1u70db1{border:1px solid #334155;background:#111827;padding:.12rem .38rem;border-radius:999px}.severity.svelte-1u70db1{color:#facc15}.invalid.svelte-1u70db1{color:#fca5a5}.row-actions.svelte-1u70db1 button:where(.svelte-1u70db1),.link-button.svelte-1u70db1{padding:.22rem .45rem;font-size:.68rem;background:#111827;border-color:#334155;color:#bae6fd}.result.svelte-1u70db1{padding:1rem}.result-head.svelte-1u70db1{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin-bottom:1rem}.detail-line.svelte-1u70db1{color:#cbd5e1;font-size:.82rem;line-height:1.45}.cards.svelte-1u70db1{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem;margin:1rem 0}.cards.svelte-1u70db1 div:where(.svelte-1u70db1){border:1px solid #1e293b;background:#111827;border-radius:6px;padding:.65rem}.cards.svelte-1u70db1 strong:where(.svelte-1u70db1),.cards.svelte-1u70db1 span:where(.svelte-1u70db1){display:block}.cards.svelte-1u70db1 strong:where(.svelte-1u70db1){font-size:1.2rem;color:#f8fafc}.cards.svelte-1u70db1 span:where(.svelte-1u70db1){margin-top:.15rem;font-size:.7rem;color:#94a3b8}.detail-list.svelte-1u70db1{margin-top:.45rem;display:grid;gap:.35rem}.detail-list.svelte-1u70db1 li:where(.svelte-1u70db1){display:flex;align-items:center;gap:.5rem;border:1px solid #1e293b;background:#0f172a;border-radius:6px;padding:.45rem .55rem;font-size:.75rem;color:#cbd5e1}details.svelte-1u70db1{margin-top:1rem;border-top:1px solid #1e293b;padding-top:.75rem}summary.svelte-1u70db1{cursor:pointer;color:#38bdf8;font-size:.78rem}.error.svelte-1u70db1{padding:.5rem 1rem;color:#fca5a5;border-bottom:1px solid #7f1d1d;background:#2f1518}.muted.svelte-1u70db1{padding:1rem}html,body{height:100%;margin:0}.page.svelte-1uha8ag{display:flex;flex-direction:column;height:100vh;width:100vw;background:#0b0f14;color:#e2e8f0}.bar.svelte-1uha8ag{flex:0 0 auto;padding:.5rem 1rem;border-bottom:1px solid #1e293b;font-family:system-ui,sans-serif}.bar-top.svelte-1uha8ag{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:.75rem 1.5rem}.title-block.svelte-1uha8ag h1:where(.svelte-1uha8ag){margin:0;font-size:1rem;font-weight:600}.hint.svelte-1uha8ag{display:flex;align-items:center;gap:.4rem;margin-top:.2rem;font-size:.75rem;color:#64748b}.health-badge.svelte-1uha8ag{width:.55rem;height:.55rem;border-radius:999px;background:#64748b;flex:0 0 auto}.health-badge.online.svelte-1uha8ag{background:#22c55e;box-shadow:0 0 0 2px #22c55e40}.health-badge.offline.svelte-1uha8ag{background:#ef4444}.health-badge.demo.svelte-1uha8ag{background:#f59e0b}.tabs.svelte-1uha8ag{display:flex;gap:.35rem}.tabs.svelte-1uha8ag button:where(.svelte-1uha8ag){background:#1e293b;border:1px solid #334155;color:#cbd5e1;border-radius:6px;padding:.35rem .75rem;cursor:pointer}.tabs.svelte-1uha8ag button.active:where(.svelte-1uha8ag){background:#0ea5e9;border-color:#0284c7;color:#082f49}.controls.svelte-1uha8ag{display:flex;flex-wrap:wrap;align-items:flex-end;gap:.75rem 1rem}.field.svelte-1uha8ag{display:flex;flex-direction:column;gap:.2rem;min-width:12rem}.field-label.svelte-1uha8ag{font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#64748b}.select.svelte-1uha8ag{appearance:none;background:#1e293b;color:#e2e8f0;border:1px solid #334155;border-radius:6px;padding:.35rem 2rem .35rem .5rem;font-size:.8rem;cursor:pointer}.field-workspace.svelte-1uha8ag{min-width:15rem}.ontologies-warn.svelte-1uha8ag{margin:.5rem 0 0;font-size:.72rem;color:#fbbf24}.workspace.svelte-1uha8ag{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr)}.workspace.with-inspector.svelte-1uha8ag{grid-template-columns:minmax(0,1fr) auto}.stage.svelte-1uha8ag{min-height:0;min-width:0;display:flex;flex-direction:column}.donnees-stage.svelte-1uha8ag{flex:1 1 auto;min-height:0;min-width:0;display:flex;flex-direction:column}.panel-message.svelte-1uha8ag{padding:1rem;color:#94a3b8;font-family:system-ui,sans-serif}
@@ -0,0 +1,2 @@
1
+ import{_ as Y,a as O,b as Z,c as j,e as Q,f as Re,d as Ne,g as Me,N as Ge,E as Ie,h as Fe,i as v,j as c,k as ne,l as ge,m as ve,n as ze,o as Ae}from"./C5KYKPa8.js";import{e as Ue}from"./BJB7pSge.js";import{r as He,g as Be}from"./i0D5dc1Y.js";var ue=(function(s){function n(){var i;return Z(this,n),i=j(this,n),i.rawEmitter=i,i}return Y(n,s),O(n)})(Ue.EventEmitter),We=He();const Oe=Be(We);var Ze=function(n){return n},_e=function(n){return n*n},Ve=function(n){return n*(2-n)},qe=function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},Ye=function(n){return n*n*n},je=function(n){return--n*n*n+1},Xe=function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)},Ke={linear:Ze,quadraticIn:_e,quadraticOut:Ve,quadraticInOut:qe,cubicIn:Ye,cubicOut:je,cubicInOut:Xe},Je={easing:"quadraticInOut",duration:150};function N(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function ee(s,n,i){return s[0]=n,s[4]=typeof i=="number"?i:n,s}function me(s,n){var i=Math.sin(n),e=Math.cos(n);return s[0]=e,s[1]=i,s[3]=-i,s[4]=e,s}function fe(s,n,i){return s[6]=n,s[7]=i,s}function W(s,n){var i=s[0],e=s[1],t=s[2],a=s[3],r=s[4],o=s[5],h=s[6],d=s[7],l=s[8],u=n[0],g=n[1],m=n[2],f=n[3],p=n[4],y=n[5],E=n[6],b=n[7],x=n[8];return s[0]=u*i+g*a+m*h,s[1]=u*e+g*r+m*d,s[2]=u*t+g*o+m*l,s[3]=f*i+p*a+y*h,s[4]=f*e+p*r+y*d,s[5]=f*t+p*o+y*l,s[6]=E*i+b*a+x*h,s[7]=E*e+b*r+x*d,s[8]=E*t+b*o+x*l,s}function de(s,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,e=s[0],t=s[1],a=s[3],r=s[4],o=s[6],h=s[7],d=n.x,l=n.y;return{x:d*e+l*a+o*i,y:d*t+l*r+h*i}}function Qe(s,n){var i=s.height/s.width,e=n.height/n.width;return i<1&&e>1||i>1&&e<1?1:Math.min(Math.max(e,1/e),Math.max(1/i,i))}function X(s,n,i,e,t){var a=s.angle,r=s.ratio,o=s.x,h=s.y,d=n.width,l=n.height,u=N(),g=Math.min(d,l)-2*e,m=Qe(n,i);return t?(W(u,fe(N(),o,h)),W(u,ee(N(),r)),W(u,me(N(),a)),W(u,ee(N(),d/g/2/m,l/g/2/m))):(W(u,ee(N(),2*(g/d)*m,2*(g/l)*m)),W(u,me(N(),-a)),W(u,ee(N(),1/r)),W(u,fe(N(),-o,-h))),u}function $e(s,n,i){var e=de(s,{x:Math.cos(n.angle),y:Math.sin(n.angle)},0),t=e.x,a=e.y;return 1/Math.sqrt(Math.pow(t,2)+Math.pow(a,2))/i.width}function et(s){if(!s.order)return{x:[0,1],y:[0,1]};var n=1/0,i=-1/0,e=1/0,t=-1/0;return s.forEachNode(function(a,r){var o=r.x,h=r.y;o<n&&(n=o),o>i&&(i=o),h<e&&(e=h),h>t&&(t=h)}),{x:[n,i],y:[e,t]}}function tt(s){if(!Oe(s))throw new Error("Sigma: invalid graph instance.");s.forEachNode(function(n,i){if(!Number.isFinite(i.x)||!Number.isFinite(i.y))throw new Error("Sigma: Coordinates of node ".concat(n," are invalid. A node must have a numeric 'x' and 'y' attribute."))})}function it(s,n,i){var e=document.createElement(s);if(n)for(var t in n)e.style[t]=n[t];if(i)for(var a in i)e.setAttribute(a,i[a]);return e}function pe(){return typeof window.devicePixelRatio<"u"?window.devicePixelRatio:1}function ye(s,n,i){return i.sort(function(e,t){var a=n(e)||0,r=n(t)||0;return a<r?-1:a>r?1:0})}function be(s){var n=Q(s.x,2),i=n[0],e=n[1],t=Q(s.y,2),a=t[0],r=t[1],o=Math.max(e-i,r-a),h=(e+i)/2,d=(r+a)/2;(o===0||Math.abs(o)===1/0||isNaN(o))&&(o=1),isNaN(h)&&(h=0),isNaN(d)&&(d=0);var l=function(g){return{x:.5+(g.x-h)/o,y:.5+(g.y-d)/o}};return l.applyTo=function(u){u.x=.5+(u.x-h)/o,u.y=.5+(u.y-d)/o},l.inverse=function(u){return{x:h+o*(u.x-.5),y:d+o*(u.y-.5)}},l.ratio=o,l}function le(s){"@babel/helpers - typeof";return le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},le(s)}function xe(s,n){var i=n.size;if(i!==0){var e=s.length;s.length+=i;var t=0;n.forEach(function(a){s[e+t]=a,t++})}}function se(s){s=s||{};for(var n=0,i=arguments.length<=1?0:arguments.length-1;n<i;n++){var e=n+1<1||arguments.length<=n+1?void 0:arguments[n+1];e&&Object.assign(s,e)}return s}var ce={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeEvents:!1,defaultNodeColor:"#999",defaultNodeType:"circle",defaultEdgeColor:"#ccc",defaultEdgeType:"line",labelFont:"Arial",labelSize:14,labelWeight:"normal",labelColor:{color:"#000"},edgeLabelFont:"Arial",edgeLabelSize:14,edgeLabelWeight:"normal",edgeLabelColor:{attribute:"color"},stagePadding:30,defaultDrawEdgeLabel:Me,defaultDrawNodeLabel:Ne,defaultDrawNodeHover:Re,minEdgeThickness:1.7,antiAliasingFeather:1,dragTimeout:100,draggedEventsTolerance:3,inertiaDuration:200,inertiaRatio:3,zoomDuration:250,zoomingRatio:1.7,doubleClickTimeout:300,doubleClickZoomingRatio:2.2,doubleClickZoomingDuration:200,tapMoveTolerance:10,zoomToSizeRatioFunction:Math.sqrt,itemSizesReference:"screen",autoRescale:!0,autoCenter:!0,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,enableCameraZooming:!0,enableCameraPanning:!0,enableCameraRotation:!0,cameraPanBoundaries:null,allowInvalidContainer:!1,nodeProgramClasses:{},nodeHoverProgramClasses:{},edgeProgramClasses:{}},at={circle:Ge},rt={arrow:Fe,line:Ie};function oe(s){if(typeof s.labelDensity!="number"||s.labelDensity<0)throw new Error("Settings: invalid `labelDensity`. Expecting a positive number.");var n=s.minCameraRatio,i=s.maxCameraRatio;if(typeof n=="number"&&typeof i=="number"&&i<n)throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")}function nt(s){var n=se({},ce,s);return n.nodeProgramClasses=se({},at,n.nodeProgramClasses),n.edgeProgramClasses=se({},rt,n.edgeProgramClasses),n}var te=1.5,Ce=(function(s){function n(){var i;return Z(this,n),i=j(this,n),c(i,"x",.5),c(i,"y",.5),c(i,"angle",0),c(i,"ratio",1),c(i,"minRatio",null),c(i,"maxRatio",null),c(i,"enabledZooming",!0),c(i,"enabledPanning",!0),c(i,"enabledRotation",!0),c(i,"clean",null),c(i,"nextFrame",null),c(i,"previousState",null),c(i,"enabled",!0),i.previousState=i.getState(),i}return Y(n,s),O(n,[{key:"enable",value:function(){return this.enabled=!0,this}},{key:"disable",value:function(){return this.enabled=!1,this}},{key:"getState",value:function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}}},{key:"hasState",value:function(e){return this.x===e.x&&this.y===e.y&&this.ratio===e.ratio&&this.angle===e.angle}},{key:"getPreviousState",value:function(){var e=this.previousState;return e?{x:e.x,y:e.y,angle:e.angle,ratio:e.ratio}:null}},{key:"getBoundedRatio",value:function(e){var t=e;return typeof this.minRatio=="number"&&(t=Math.max(t,this.minRatio)),typeof this.maxRatio=="number"&&(t=Math.min(t,this.maxRatio)),t}},{key:"validateState",value:function(e){var t={};return this.enabledPanning&&typeof e.x=="number"&&(t.x=e.x),this.enabledPanning&&typeof e.y=="number"&&(t.y=e.y),this.enabledZooming&&typeof e.ratio=="number"&&(t.ratio=this.getBoundedRatio(e.ratio)),this.enabledRotation&&typeof e.angle=="number"&&(t.angle=e.angle),this.clean?this.clean(v(v({},this.getState()),t)):t}},{key:"isAnimated",value:function(){return!!this.nextFrame}},{key:"setState",value:function(e){if(!this.enabled)return this;this.previousState=this.getState();var t=this.validateState(e);return typeof t.x=="number"&&(this.x=t.x),typeof t.y=="number"&&(this.y=t.y),typeof t.ratio=="number"&&(this.ratio=t.ratio),typeof t.angle=="number"&&(this.angle=t.angle),this.hasState(this.previousState)||this.emit("updated",this.getState()),this}},{key:"updateState",value:function(e){return this.setState(e(this.getState())),this}},{key:"animate",value:function(e){var t=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!r)return new Promise(function(m){return t.animate(e,a,m)});if(this.enabled){var o=v(v({},Je),a),h=this.validateState(e),d=typeof o.easing=="function"?o.easing:Ke[o.easing],l=Date.now(),u=this.getState(),g=function(){var f=(Date.now()-l)/o.duration;if(f>=1){t.nextFrame=null,t.setState(h),t.animationCallback&&(t.animationCallback.call(null),t.animationCallback=void 0);return}var p=d(f),y={};typeof h.x=="number"&&(y.x=u.x+(h.x-u.x)*p),typeof h.y=="number"&&(y.y=u.y+(h.y-u.y)*p),t.enabledRotation&&typeof h.angle=="number"&&(y.angle=u.angle+(h.angle-u.angle)*p),typeof h.ratio=="number"&&(y.ratio=u.ratio+(h.ratio-u.ratio)*p),t.setState(y),t.nextFrame=requestAnimationFrame(g)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame(g)):g(),this.animationCallback=r}}},{key:"animatedZoom",value:function(e){return e?typeof e=="number"?this.animate({ratio:this.ratio/e}):this.animate({ratio:this.ratio/(e.factor||te)},e):this.animate({ratio:this.ratio/te})}},{key:"animatedUnzoom",value:function(e){return e?typeof e=="number"?this.animate({ratio:this.ratio*e}):this.animate({ratio:this.ratio*(e.factor||te)},e):this.animate({ratio:this.ratio*te})}},{key:"animatedReset",value:function(e){return this.animate({x:.5,y:.5,ratio:1,angle:0},e)}},{key:"copy",value:function(){return n.from(this.getState())}}],[{key:"from",value:function(e){var t=new n;return t.setState(e)}}])})(ue);function M(s,n){var i=n.getBoundingClientRect();return{x:s.clientX-i.left,y:s.clientY-i.top}}function F(s,n){var i=v(v({},M(s,n)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){i.sigmaDefaultPrevented=!0},original:s});return i}function K(s){var n="x"in s?s:v(v({},s.touches[0]||s.previousTouches[0]),{},{original:s.original,sigmaDefaultPrevented:s.sigmaDefaultPrevented,preventSigmaDefault:function(){s.sigmaDefaultPrevented=!0,n.sigmaDefaultPrevented=!0}});return n}function st(s,n){return v(v({},F(s,n)),{},{delta:Te(s)})}var ot=2;function ie(s){for(var n=[],i=0,e=Math.min(s.length,ot);i<e;i++)n.push(s[i]);return n}function J(s,n,i){var e={touches:ie(s.touches).map(function(t){return M(t,i)}),previousTouches:n.map(function(t){return M(t,i)}),sigmaDefaultPrevented:!1,preventSigmaDefault:function(){e.sigmaDefaultPrevented=!0},original:s};return e}function Te(s){if(typeof s.deltaY<"u")return s.deltaY*-3/360;if(typeof s.detail<"u")return s.detail/-9;throw new Error("Captor: could not extract delta from event.")}var De=(function(s){function n(i,e){var t;return Z(this,n),t=j(this,n),t.container=i,t.renderer=e,t}return Y(n,s),O(n)})(ue),ht=["doubleClickTimeout","doubleClickZoomingDuration","doubleClickZoomingRatio","dragTimeout","draggedEventsTolerance","inertiaDuration","inertiaRatio","zoomDuration","zoomingRatio"],dt=ht.reduce(function(s,n){return v(v({},s),{},c({},n,ce[n]))},{}),lt=(function(s){function n(i,e){var t;return Z(this,n),t=j(this,n,[i,e]),c(t,"enabled",!0),c(t,"draggedEvents",0),c(t,"downStartTime",null),c(t,"lastMouseX",null),c(t,"lastMouseY",null),c(t,"isMouseDown",!1),c(t,"isMoving",!1),c(t,"movingTimeout",null),c(t,"startCameraState",null),c(t,"clicks",0),c(t,"doubleClickTimeout",null),c(t,"currentWheelDirection",0),c(t,"settings",dt),t.handleClick=t.handleClick.bind(t),t.handleRightClick=t.handleRightClick.bind(t),t.handleDown=t.handleDown.bind(t),t.handleUp=t.handleUp.bind(t),t.handleMove=t.handleMove.bind(t),t.handleWheel=t.handleWheel.bind(t),t.handleLeave=t.handleLeave.bind(t),t.handleEnter=t.handleEnter.bind(t),i.addEventListener("click",t.handleClick,{capture:!1}),i.addEventListener("contextmenu",t.handleRightClick,{capture:!1}),i.addEventListener("mousedown",t.handleDown,{capture:!1}),i.addEventListener("wheel",t.handleWheel,{capture:!1}),i.addEventListener("mouseleave",t.handleLeave,{capture:!1}),i.addEventListener("mouseenter",t.handleEnter,{capture:!1}),document.addEventListener("mousemove",t.handleMove,{capture:!1}),document.addEventListener("mouseup",t.handleUp,{capture:!1}),t}return Y(n,s),O(n,[{key:"kill",value:function(){var e=this.container;e.removeEventListener("click",this.handleClick),e.removeEventListener("contextmenu",this.handleRightClick),e.removeEventListener("mousedown",this.handleDown),e.removeEventListener("wheel",this.handleWheel),e.removeEventListener("mouseleave",this.handleLeave),e.removeEventListener("mouseenter",this.handleEnter),document.removeEventListener("mousemove",this.handleMove),document.removeEventListener("mouseup",this.handleUp)}},{key:"handleClick",value:function(e){var t=this;if(this.enabled){if(this.clicks++,this.clicks===2)return this.clicks=0,typeof this.doubleClickTimeout=="number"&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(e);setTimeout(function(){t.clicks=0,t.doubleClickTimeout=null},this.settings.doubleClickTimeout),this.draggedEvents<this.settings.draggedEventsTolerance&&this.emit("click",F(e,this.container))}}},{key:"handleRightClick",value:function(e){this.enabled&&this.emit("rightClick",F(e,this.container))}},{key:"handleDoubleClick",value:function(e){if(this.enabled){e.preventDefault(),e.stopPropagation();var t=F(e,this.container);if(this.emit("doubleClick",t),!t.sigmaDefaultPrevented){var a=this.renderer.getCamera(),r=a.getBoundedRatio(a.getState().ratio/this.settings.doubleClickZoomingRatio);a.animate(this.renderer.getViewportZoomedState(M(e,this.container),r),{easing:"quadraticInOut",duration:this.settings.doubleClickZoomingDuration})}}}},{key:"handleDown",value:function(e){if(this.enabled){if(e.button===0){this.startCameraState=this.renderer.getCamera().getState();var t=M(e,this.container),a=t.x,r=t.y;this.lastMouseX=a,this.lastMouseY=r,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0}this.emit("mousedown",F(e,this.container))}}},{key:"handleUp",value:function(e){var t=this;if(!(!this.enabled||!this.isMouseDown)){var a=this.renderer.getCamera();this.isMouseDown=!1,typeof this.movingTimeout=="number"&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var r=M(e,this.container),o=r.x,h=r.y,d=a.getState(),l=a.getPreviousState()||{x:0,y:0};this.isMoving?a.animate({x:d.x+this.settings.inertiaRatio*(d.x-l.x),y:d.y+this.settings.inertiaRatio*(d.y-l.y)},{duration:this.settings.inertiaDuration,easing:"quadraticOut"}):(this.lastMouseX!==o||this.lastMouseY!==h)&&a.setState({x:d.x,y:d.y}),this.isMoving=!1,setTimeout(function(){var u=t.draggedEvents>0;t.draggedEvents=0,u&&t.renderer.getSetting("hideEdgesOnMove")&&t.renderer.refresh()},0),this.emit("mouseup",F(e,this.container))}}},{key:"handleMove",value:function(e){var t=this;if(this.enabled){var a=F(e,this.container);if(this.emit("mousemovebody",a),(e.target===this.container||e.composedPath()[0]===this.container)&&this.emit("mousemove",a),!a.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout=="number"&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){t.movingTimeout=null,t.isMoving=!1},this.settings.dragTimeout);var r=this.renderer.getCamera(),o=M(e,this.container),h=o.x,d=o.y,l=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),u=this.renderer.viewportToFramedGraph({x:h,y:d}),g=l.x-u.x,m=l.y-u.y,f=r.getState(),p=f.x+g,y=f.y+m;r.setState({x:p,y}),this.lastMouseX=h,this.lastMouseY=d,e.preventDefault(),e.stopPropagation()}}}},{key:"handleLeave",value:function(e){this.emit("mouseleave",F(e,this.container))}},{key:"handleEnter",value:function(e){this.emit("mouseenter",F(e,this.container))}},{key:"handleWheel",value:function(e){var t=this,a=this.renderer.getCamera();if(!(!this.enabled||!a.enabledZooming)){var r=Te(e);if(r){var o=st(e,this.container);if(this.emit("wheel",o),o.sigmaDefaultPrevented){e.preventDefault(),e.stopPropagation();return}var h=a.getState().ratio,d=r>0?1/this.settings.zoomingRatio:this.settings.zoomingRatio,l=a.getBoundedRatio(h*d),u=r>0?1:-1,g=Date.now();h!==l&&(e.preventDefault(),e.stopPropagation(),!(this.currentWheelDirection===u&&this.lastWheelTriggerTime&&g-this.lastWheelTriggerTime<this.settings.zoomDuration/5)&&(a.animate(this.renderer.getViewportZoomedState(M(e,this.container),l),{easing:"quadraticOut",duration:this.settings.zoomDuration},function(){t.currentWheelDirection=0}),this.currentWheelDirection=u,this.lastWheelTriggerTime=g))}}}},{key:"setSettings",value:function(e){this.settings=e}}])})(De),ut=["dragTimeout","inertiaDuration","inertiaRatio","doubleClickTimeout","doubleClickZoomingRatio","doubleClickZoomingDuration","tapMoveTolerance"],ct=ut.reduce(function(s,n){return v(v({},s),{},c({},n,ce[n]))},{}),gt=(function(s){function n(i,e){var t;return Z(this,n),t=j(this,n,[i,e]),c(t,"enabled",!0),c(t,"isMoving",!1),c(t,"hasMoved",!1),c(t,"touchMode",0),c(t,"startTouchesPositions",[]),c(t,"lastTouches",[]),c(t,"lastTap",null),c(t,"settings",ct),t.handleStart=t.handleStart.bind(t),t.handleLeave=t.handleLeave.bind(t),t.handleMove=t.handleMove.bind(t),i.addEventListener("touchstart",t.handleStart,{capture:!1}),i.addEventListener("touchcancel",t.handleLeave,{capture:!1}),document.addEventListener("touchend",t.handleLeave,{capture:!1,passive:!1}),document.addEventListener("touchmove",t.handleMove,{capture:!1,passive:!1}),t}return Y(n,s),O(n,[{key:"kill",value:function(){var e=this.container;e.removeEventListener("touchstart",this.handleStart),e.removeEventListener("touchcancel",this.handleLeave),document.removeEventListener("touchend",this.handleLeave),document.removeEventListener("touchmove",this.handleMove)}},{key:"getDimensions",value:function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}}},{key:"handleStart",value:function(e){var t=this;if(this.enabled){e.preventDefault();var a=ie(e.touches);if(this.touchMode=a.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=a.map(function(m){return M(m,t.container)}),this.touchMode===2){var r=Q(this.startTouchesPositions,2),o=r[0],h=o.x,d=o.y,l=r[1],u=l.x,g=l.y;this.startTouchesAngle=Math.atan2(g-d,u-h),this.startTouchesDistance=Math.sqrt(Math.pow(u-h,2)+Math.pow(g-d,2))}this.emit("touchdown",J(e,this.lastTouches,this.container)),this.lastTouches=a,this.lastTouchesPositions=this.startTouchesPositions}}},{key:"handleLeave",value:function(e){if(!(!this.enabled||!this.startTouchesPositions.length)){switch(e.cancelable&&e.preventDefault(),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(e.touches.length===1){this.handleStart(e),e.preventDefault();break}case 1:if(this.isMoving){var t=this.renderer.getCamera(),a=t.getState(),r=t.getPreviousState()||{x:0,y:0};t.animate({x:a.x+this.settings.inertiaRatio*(a.x-r.x),y:a.y+this.settings.inertiaRatio*(a.y-r.y)},{duration:this.settings.inertiaDuration,easing:"quadraticOut"})}this.hasMoved=!1,this.isMoving=!1,this.touchMode=0;break}if(this.emit("touchup",J(e,this.lastTouches,this.container)),!e.touches.length){var o=M(this.lastTouches[0],this.container),h=this.startTouchesPositions[0],d=Math.pow(o.x-h.x,2)+Math.pow(o.y-h.y,2);if(!e.touches.length&&d<Math.pow(this.settings.tapMoveTolerance,2))if(this.lastTap&&Date.now()-this.lastTap.time<this.settings.doubleClickTimeout){var l=J(e,this.lastTouches,this.container);if(this.emit("doubletap",l),this.lastTap=null,!l.sigmaDefaultPrevented){var u=this.renderer.getCamera(),g=u.getBoundedRatio(u.getState().ratio/this.settings.doubleClickZoomingRatio);u.animate(this.renderer.getViewportZoomedState(o,g),{easing:"quadraticInOut",duration:this.settings.doubleClickZoomingDuration})}}else{var m=J(e,this.lastTouches,this.container);this.emit("tap",m),this.lastTap={time:Date.now(),position:m.touches[0]||m.previousTouches[0]}}}this.lastTouches=ie(e.touches),this.startTouchesPositions=[]}}},{key:"handleMove",value:function(e){var t=this;if(!(!this.enabled||!this.startTouchesPositions.length)){e.preventDefault();var a=ie(e.touches),r=a.map(function(B){return M(B,t.container)}),o=this.lastTouches;this.lastTouches=a,this.lastTouchesPositions=r;var h=J(e,o,this.container);if(this.emit("touchmove",h),!h.sigmaDefaultPrevented&&(this.hasMoved||(this.hasMoved=r.some(function(B,ae){var G=t.startTouchesPositions[ae];return G&&(B.x!==G.x||B.y!==G.y)})),!!this.hasMoved)){this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){t.isMoving=!1},this.settings.dragTimeout);var d=this.renderer.getCamera(),l=this.startCameraState,u=this.renderer.getSetting("stagePadding");switch(this.touchMode){case 1:{var g=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),m=g.x,f=g.y,p=this.renderer.viewportToFramedGraph(r[0]),y=p.x,E=p.y;d.setState({x:l.x+m-y,y:l.y+f-E});break}case 2:{var b={x:.5,y:.5,angle:0,ratio:1},x=r[0],C=x.x,I=x.y,A=r[1],w=A.x,k=A.y,T=Math.atan2(k-I,w-C)-this.startTouchesAngle,L=Math.hypot(k-I,w-C)/this.startTouchesDistance,D=d.getBoundedRatio(l.ratio/L);b.ratio=D,b.angle=l.angle+T;var S=this.getDimensions(),_=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:l}),P=Math.min(S.width,S.height)-2*u,R=P/S.width,U=P/S.height,$=D/P,q=C-P/2/R,V=I-P/2/U,H=[q*Math.cos(-b.angle)-V*Math.sin(-b.angle),V*Math.cos(-b.angle)+q*Math.sin(-b.angle)];q=H[0],V=H[1],b.x=_.x-q*$,b.y=_.y+V*$,d.setState(b);break}}}}}},{key:"setSettings",value:function(e){this.settings=e}}])})(De);function vt(s){if(Array.isArray(s))return Ae(s)}function mt(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}function ft(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ee(s){return vt(s)||mt(s)||ze(s)||ft()}function pt(s,n){if(s==null)return{};var i={};for(var e in s)if({}.hasOwnProperty.call(s,e)){if(n.indexOf(e)!==-1)continue;i[e]=s[e]}return i}function he(s,n){if(s==null)return{};var i,e,t=pt(s,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);for(e=0;e<a.length;e++)i=a[e],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(s,i)&&(t[i]=s[i])}return t}var we=(function(){function s(n,i){Z(this,s),this.key=n,this.size=i}return O(s,null,[{key:"compare",value:function(i,e){return i.size>e.size?-1:i.size<e.size||i.key>e.key?1:-1}}])})(),Le=(function(){function s(){Z(this,s),c(this,"width",0),c(this,"height",0),c(this,"cellSize",0),c(this,"columns",0),c(this,"rows",0),c(this,"cells",{})}return O(s,[{key:"resizeAndClear",value:function(i,e){this.width=i.width,this.height=i.height,this.cellSize=e,this.columns=Math.ceil(i.width/e),this.rows=Math.ceil(i.height/e),this.cells={}}},{key:"getIndex",value:function(i){var e=Math.floor(i.x/this.cellSize),t=Math.floor(i.y/this.cellSize);return t*this.columns+e}},{key:"add",value:function(i,e,t){var a=new we(i,e),r=this.getIndex(t),o=this.cells[r];o||(o=[],this.cells[r]=o),o.push(a)}},{key:"organize",value:function(){for(var i in this.cells){var e=this.cells[i];e.sort(we.compare)}}},{key:"getLabelsToDisplay",value:function(i,e){var t=this.cellSize*this.cellSize,a=t/i/i,r=a*e/t,o=Math.ceil(r),h=[];for(var d in this.cells)for(var l=this.cells[d],u=0;u<Math.min(o,l.length);u++)h.push(l[u].key);return h}}])})();function yt(s){var n=s.graph,i=s.hoveredNode,e=s.highlightedNodes,t=s.displayedNodeLabels,a=[];return n.forEachEdge(function(r,o,h,d){(h===i||d===i||e.has(h)||e.has(d)||t.has(h)&&t.has(d))&&a.push(r)}),a}var Se=150,Pe=50,z=Object.prototype.hasOwnProperty;function bt(s,n,i){if(!z.call(i,"x")||!z.call(i,"y"))throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(n,'". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));return i.color||(i.color=s.defaultNodeColor),!i.label&&i.label!==""&&(i.label=null),i.label!==void 0&&i.label!==null?i.label=""+i.label:i.label=null,i.size||(i.size=2),z.call(i,"hidden")||(i.hidden=!1),z.call(i,"highlighted")||(i.highlighted=!1),z.call(i,"forceLabel")||(i.forceLabel=!1),(!i.type||i.type==="")&&(i.type=s.defaultNodeType),i.zIndex||(i.zIndex=0),i}function xt(s,n,i){return i.color||(i.color=s.defaultEdgeColor),i.label||(i.label=""),i.size||(i.size=.5),z.call(i,"hidden")||(i.hidden=!1),z.call(i,"forceLabel")||(i.forceLabel=!1),(!i.type||i.type==="")&&(i.type=s.defaultEdgeType),i.zIndex||(i.zIndex=0),i}var Ct=(function(s){function n(i,e){var t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(Z(this,n),t=j(this,n),c(t,"elements",{}),c(t,"canvasContexts",{}),c(t,"webGLContexts",{}),c(t,"pickingLayers",new Set),c(t,"textures",{}),c(t,"frameBuffers",{}),c(t,"activeListeners",{}),c(t,"labelGrid",new Le),c(t,"nodeDataCache",{}),c(t,"edgeDataCache",{}),c(t,"nodeProgramIndex",{}),c(t,"edgeProgramIndex",{}),c(t,"nodesWithForcedLabels",new Set),c(t,"edgesWithForcedLabels",new Set),c(t,"nodeExtent",{x:[0,1],y:[0,1]}),c(t,"nodeZExtent",[1/0,-1/0]),c(t,"edgeZExtent",[1/0,-1/0]),c(t,"matrix",N()),c(t,"invMatrix",N()),c(t,"correctionRatio",1),c(t,"customBBox",null),c(t,"normalizationFunction",be({x:[0,1],y:[0,1]})),c(t,"graphToViewportRatio",1),c(t,"itemIDsIndex",{}),c(t,"nodeIndices",{}),c(t,"edgeIndices",{}),c(t,"width",0),c(t,"height",0),c(t,"pixelRatio",pe()),c(t,"pickingDownSizingRatio",2*t.pixelRatio),c(t,"displayedNodeLabels",new Set),c(t,"displayedEdgeLabels",new Set),c(t,"highlightedNodes",new Set),c(t,"hoveredNode",null),c(t,"hoveredEdge",null),c(t,"renderFrame",null),c(t,"renderHighlightedNodesFrame",null),c(t,"needToProcess",!1),c(t,"checkEdgesEventsFrame",null),c(t,"nodePrograms",{}),c(t,"nodeHoverPrograms",{}),c(t,"edgePrograms",{}),t.settings=nt(a),oe(t.settings),tt(i),!(e instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");t.graph=i,t.container=e,t.createWebGLContext("edges",{picking:a.enableEdgeEvents}),t.createCanvasContext("edgeLabels"),t.createWebGLContext("nodes",{picking:!0}),t.createCanvasContext("labels"),t.createCanvasContext("hovers"),t.createWebGLContext("hoverNodes"),t.createCanvasContext("mouse",{style:{touchAction:"none",userSelect:"none"}}),t.resize();for(var r in t.settings.nodeProgramClasses)t.registerNodeProgram(r,t.settings.nodeProgramClasses[r],t.settings.nodeHoverProgramClasses[r]);for(var o in t.settings.edgeProgramClasses)t.registerEdgeProgram(o,t.settings.edgeProgramClasses[o]);return t.camera=new Ce,t.bindCameraHandlers(),t.mouseCaptor=new lt(t.elements.mouse,t),t.mouseCaptor.setSettings(t.settings),t.touchCaptor=new gt(t.elements.mouse,t),t.touchCaptor.setSettings(t.settings),t.bindEventHandlers(),t.bindGraphHandlers(),t.handleSettingsUpdate(),t.refresh(),t}return Y(n,s),O(n,[{key:"registerNodeProgram",value:function(e,t,a){return this.nodePrograms[e]&&this.nodePrograms[e].kill(),this.nodeHoverPrograms[e]&&this.nodeHoverPrograms[e].kill(),this.nodePrograms[e]=new t(this.webGLContexts.nodes,this.frameBuffers.nodes,this),this.nodeHoverPrograms[e]=new(a||t)(this.webGLContexts.hoverNodes,null,this),this}},{key:"registerEdgeProgram",value:function(e,t){return this.edgePrograms[e]&&this.edgePrograms[e].kill(),this.edgePrograms[e]=new t(this.webGLContexts.edges,this.frameBuffers.edges,this),this}},{key:"unregisterNodeProgram",value:function(e){if(this.nodePrograms[e]){var t=this.nodePrograms,a=t[e],r=he(t,[e].map(ne));a.kill(),this.nodePrograms=r}if(this.nodeHoverPrograms[e]){var o=this.nodeHoverPrograms,h=o[e],d=he(o,[e].map(ne));h.kill(),this.nodePrograms=d}return this}},{key:"unregisterEdgeProgram",value:function(e){if(this.edgePrograms[e]){var t=this.edgePrograms,a=t[e],r=he(t,[e].map(ne));a.kill(),this.edgePrograms=r}return this}},{key:"resetWebGLTexture",value:function(e){var t=this.webGLContexts[e],a=this.frameBuffers[e],r=this.textures[e];r&&t.deleteTexture(r);var o=t.createTexture();return t.bindFramebuffer(t.FRAMEBUFFER,a),t.bindTexture(t.TEXTURE_2D,o),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,o,0),this.textures[e]=o,this}},{key:"bindCameraHandlers",value:function(){var e=this;return this.activeListeners.camera=function(){e.scheduleRender()},this.camera.on("updated",this.activeListeners.camera),this}},{key:"unbindCameraHandlers",value:function(){return this.camera.removeListener("updated",this.activeListeners.camera),this}},{key:"getNodeAtPosition",value:function(e){var t=e.x,a=e.y,r=ge(this.webGLContexts.nodes,this.frameBuffers.nodes,t,a,this.pixelRatio,this.pickingDownSizingRatio),o=ve.apply(void 0,Ee(r)),h=this.itemIDsIndex[o];return h&&h.type==="node"?h.id:null}},{key:"bindEventHandlers",value:function(){var e=this;this.activeListeners.handleResize=function(){e.scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(a){var r=K(a),o={event:r,preventSigmaDefault:function(){r.preventSigmaDefault()}},h=e.getNodeAtPosition(r);if(h&&e.hoveredNode!==h&&!e.nodeDataCache[h].hidden){e.hoveredNode&&e.emit("leaveNode",v(v({},o),{},{node:e.hoveredNode})),e.hoveredNode=h,e.emit("enterNode",v(v({},o),{},{node:h})),e.scheduleHighlightedNodesRender();return}if(e.hoveredNode&&e.getNodeAtPosition(r)!==e.hoveredNode){var d=e.hoveredNode;e.hoveredNode=null,e.emit("leaveNode",v(v({},o),{},{node:d})),e.scheduleHighlightedNodesRender();return}if(e.settings.enableEdgeEvents){var l=e.hoveredNode?null:e.getEdgeAtPoint(o.event.x,o.event.y);l!==e.hoveredEdge&&(e.hoveredEdge&&e.emit("leaveEdge",v(v({},o),{},{edge:e.hoveredEdge})),l&&e.emit("enterEdge",v(v({},o),{},{edge:l})),e.hoveredEdge=l)}},this.activeListeners.handleMoveBody=function(a){var r=K(a);e.emit("moveBody",{event:r,preventSigmaDefault:function(){r.preventSigmaDefault()}})},this.activeListeners.handleLeave=function(a){var r=K(a),o={event:r,preventSigmaDefault:function(){r.preventSigmaDefault()}};e.hoveredNode&&(e.emit("leaveNode",v(v({},o),{},{node:e.hoveredNode})),e.scheduleHighlightedNodesRender()),e.settings.enableEdgeEvents&&e.hoveredEdge&&(e.emit("leaveEdge",v(v({},o),{},{edge:e.hoveredEdge})),e.scheduleHighlightedNodesRender()),e.emit("leaveStage",v({},o))},this.activeListeners.handleEnter=function(a){var r=K(a),o={event:r,preventSigmaDefault:function(){r.preventSigmaDefault()}};e.emit("enterStage",v({},o))};var t=function(r){return function(o){var h=K(o),d={event:h,preventSigmaDefault:function(){h.preventSigmaDefault()}},l=e.getNodeAtPosition(h);if(l)return e.emit("".concat(r,"Node"),v(v({},d),{},{node:l}));if(e.settings.enableEdgeEvents){var u=e.getEdgeAtPoint(h.x,h.y);if(u)return e.emit("".concat(r,"Edge"),v(v({},d),{},{edge:u}))}return e.emit("".concat(r,"Stage"),d)}};return this.activeListeners.handleClick=t("click"),this.activeListeners.handleRightClick=t("rightClick"),this.activeListeners.handleDoubleClick=t("doubleClick"),this.activeListeners.handleWheel=t("wheel"),this.activeListeners.handleDown=t("down"),this.activeListeners.handleUp=t("up"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("mousemovebody",this.activeListeners.handleMoveBody),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this.mouseCaptor.on("mouseup",this.activeListeners.handleUp),this.mouseCaptor.on("mouseleave",this.activeListeners.handleLeave),this.mouseCaptor.on("mouseenter",this.activeListeners.handleEnter),this.touchCaptor.on("touchdown",this.activeListeners.handleDown),this.touchCaptor.on("touchdown",this.activeListeners.handleMove),this.touchCaptor.on("touchup",this.activeListeners.handleUp),this.touchCaptor.on("touchmove",this.activeListeners.handleMove),this.touchCaptor.on("tap",this.activeListeners.handleClick),this.touchCaptor.on("doubletap",this.activeListeners.handleDoubleClick),this.touchCaptor.on("touchmove",this.activeListeners.handleMoveBody),this}},{key:"bindGraphHandlers",value:function(){var e=this,t=this.graph,a=new Set(["x","y","zIndex","type"]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(r){var o,h=(o=r.hints)===null||o===void 0?void 0:o.attributes;e.graph.forEachNode(function(l){return e.updateNode(l)});var d=!h||h.some(function(l){return a.has(l)});e.refresh({partialGraph:{nodes:t.nodes()},skipIndexation:!d,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(r){var o,h=(o=r.hints)===null||o===void 0?void 0:o.attributes;e.graph.forEachEdge(function(l){return e.updateEdge(l)});var d=h&&["zIndex","type"].some(function(l){return h?.includes(l)});e.refresh({partialGraph:{edges:t.edges()},skipIndexation:!d,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(r){var o=r.key;e.addNode(o),e.refresh({partialGraph:{nodes:[o]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(r){var o=r.key;e.refresh({partialGraph:{nodes:[o]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(r){var o=r.key;e.removeNode(o),e.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(r){var o=r.key;e.addEdge(o),e.refresh({partialGraph:{edges:[o]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(r){var o=r.key;e.refresh({partialGraph:{edges:[o]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(r){var o=r.key;e.removeEdge(o),e.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){e.clearEdgeState(),e.clearEdgeIndices(),e.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){e.clearEdgeState(),e.clearNodeState(),e.clearEdgeIndices(),e.clearNodeIndices(),e.refresh({schedule:!0})},t.on("nodeAdded",this.activeListeners.addNodeGraphUpdate),t.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),t.on("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),t.on("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),t.on("edgeAdded",this.activeListeners.addEdgeGraphUpdate),t.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),t.on("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),t.on("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),t.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),t.on("cleared",this.activeListeners.clearGraphUpdate),this}},{key:"unbindGraphHandlers",value:function(){var e=this.graph;e.removeListener("nodeAdded",this.activeListeners.addNodeGraphUpdate),e.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),e.removeListener("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),e.removeListener("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),e.removeListener("edgeAdded",this.activeListeners.addEdgeGraphUpdate),e.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),e.removeListener("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),e.removeListener("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),e.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),e.removeListener("cleared",this.activeListeners.clearGraphUpdate)}},{key:"getEdgeAtPoint",value:function(e,t){var a=ge(this.webGLContexts.edges,this.frameBuffers.edges,e,t,this.pixelRatio,this.pickingDownSizingRatio),r=ve.apply(void 0,Ee(a)),o=this.itemIDsIndex[r];return o&&o.type==="edge"?o.id:null}},{key:"process",value:function(){var e=this;this.emit("beforeProcess");var t=this.graph,a=this.settings,r=this.getDimensions();if(this.nodeExtent=et(this.graph),!this.settings.autoRescale){var o=r.width,h=r.height,d=this.nodeExtent,l=d.x,u=d.y;this.nodeExtent={x:[(l[0]+l[1])/2-o/2,(l[0]+l[1])/2+o/2],y:[(u[0]+u[1])/2-h/2,(u[0]+u[1])/2+h/2]}}this.normalizationFunction=be(this.customBBox||this.nodeExtent);var g=new Ce,m=X(g.getState(),r,this.getGraphDimensions(),this.getStagePadding());this.labelGrid.resizeAndClear(r,a.labelGridCellSize);for(var f={},p={},y={},E={},b=1,x=t.nodes(),C=0,I=x.length;C<I;C++){var A=x[C],w=this.nodeDataCache[A],k=t.getNodeAttributes(A);w.x=k.x,w.y=k.y,this.normalizationFunction.applyTo(w),typeof w.label=="string"&&!w.hidden&&this.labelGrid.add(A,w.size,this.framedGraphToViewport(w,{matrix:m})),f[w.type]=(f[w.type]||0)+1}this.labelGrid.organize();for(var T in this.nodePrograms){if(!z.call(this.nodePrograms,T))throw new Error('Sigma: could not find a suitable program for node type "'.concat(T,'"!'));this.nodePrograms[T].reallocate(f[T]||0),f[T]=0}this.settings.zIndex&&this.nodeZExtent[0]!==this.nodeZExtent[1]&&(x=ye(this.nodeZExtent,function(re){return e.nodeDataCache[re].zIndex},x));for(var L=0,D=x.length;L<D;L++){var S=x[L];p[S]=b,E[p[S]]={type:"node",id:S},b++;var _=this.nodeDataCache[S];this.addNodeToProgram(S,p[S],f[_.type]++)}for(var P={},R=t.edges(),U=0,$=R.length;U<$;U++){var q=R[U],V=this.edgeDataCache[q];P[V.type]=(P[V.type]||0)+1}this.settings.zIndex&&this.edgeZExtent[0]!==this.edgeZExtent[1]&&(R=ye(this.edgeZExtent,function(re){return e.edgeDataCache[re].zIndex},R));for(var H in this.edgePrograms){if(!z.call(this.edgePrograms,H))throw new Error('Sigma: could not find a suitable program for edge type "'.concat(H,'"!'));this.edgePrograms[H].reallocate(P[H]||0),P[H]=0}for(var B=0,ae=R.length;B<ae;B++){var G=R[B];y[G]=b,E[y[G]]={type:"edge",id:G},b++;var ke=this.edgeDataCache[G];this.addEdgeToProgram(G,y[G],P[ke.type]++)}return this.itemIDsIndex=E,this.nodeIndices=p,this.edgeIndices=y,this.emit("afterProcess"),this}},{key:"handleSettingsUpdate",value:function(e){var t=this,a=this.settings;if(this.camera.minRatio=a.minCameraRatio,this.camera.maxRatio=a.maxCameraRatio,this.camera.enabledZooming=a.enableCameraZooming,this.camera.enabledPanning=a.enableCameraPanning,this.camera.enabledRotation=a.enableCameraRotation,a.cameraPanBoundaries?this.camera.clean=function(l){return t.cleanCameraState(l,a.cameraPanBoundaries&&le(a.cameraPanBoundaries)==="object"?a.cameraPanBoundaries:{})}:this.camera.clean=null,this.camera.setState(this.camera.validateState(this.camera.getState())),e){if(e.edgeProgramClasses!==a.edgeProgramClasses){for(var r in a.edgeProgramClasses)a.edgeProgramClasses[r]!==e.edgeProgramClasses[r]&&this.registerEdgeProgram(r,a.edgeProgramClasses[r]);for(var o in e.edgeProgramClasses)a.edgeProgramClasses[o]||this.unregisterEdgeProgram(o)}if(e.nodeProgramClasses!==a.nodeProgramClasses||e.nodeHoverProgramClasses!==a.nodeHoverProgramClasses){for(var h in a.nodeProgramClasses)(a.nodeProgramClasses[h]!==e.nodeProgramClasses[h]||a.nodeHoverProgramClasses[h]!==e.nodeHoverProgramClasses[h])&&this.registerNodeProgram(h,a.nodeProgramClasses[h],a.nodeHoverProgramClasses[h]);for(var d in e.nodeProgramClasses)a.nodeProgramClasses[d]||this.unregisterNodeProgram(d)}}return this.mouseCaptor.setSettings(this.settings),this.touchCaptor.setSettings(this.settings),this}},{key:"cleanCameraState",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=t.tolerance,r=a===void 0?0:a,o=t.boundaries,h=v({},e),d=o||this.nodeExtent,l=Q(d.x,2),u=l[0],g=l[1],m=Q(d.y,2),f=m[0],p=m[1],y=[this.graphToViewport({x:u,y:f},{cameraState:e}),this.graphToViewport({x:g,y:f},{cameraState:e}),this.graphToViewport({x:u,y:p},{cameraState:e}),this.graphToViewport({x:g,y:p},{cameraState:e})],E=1/0,b=-1/0,x=1/0,C=-1/0;y.forEach(function(P){var R=P.x,U=P.y;E=Math.min(E,R),b=Math.max(b,R),x=Math.min(x,U),C=Math.max(C,U)});var I=b-E,A=C-x,w=this.getDimensions(),k=w.width,T=w.height,L=0,D=0;if(I>=k?b<k-r?L=b-(k-r):E>r&&(L=E-r):b>k+r?L=b-(k+r):E<-r&&(L=E+r),A>=T?C<T-r?D=C-(T-r):x>r&&(D=x-r):C>T+r?D=C-(T+r):x<-r&&(D=x+r),L||D){var S=this.viewportToFramedGraph({x:0,y:0},{cameraState:e}),_=this.viewportToFramedGraph({x:L,y:D},{cameraState:e});L=_.x-S.x,D=_.y-S.y,h.x+=L,h.y+=D}return h}},{key:"renderLabels",value:function(){if(!this.settings.renderLabels)return this;var e=this.camera.getState(),t=this.labelGrid.getLabelsToDisplay(e.ratio,this.settings.labelDensity);xe(t,this.nodesWithForcedLabels),this.displayedNodeLabels=new Set;for(var a=this.canvasContexts.labels,r=0,o=t.length;r<o;r++){var h=t[r],d=this.nodeDataCache[h];if(!this.displayedNodeLabels.has(h)&&!d.hidden){var l=this.framedGraphToViewport(d),u=l.x,g=l.y,m=this.scaleSize(d.size);if(!(!d.forceLabel&&m<this.settings.labelRenderedSizeThreshold)&&!(u<-Se||u>this.width+Se||g<-Pe||g>this.height+Pe)){this.displayedNodeLabels.add(h);var f=this.settings.defaultDrawNodeLabel,p=this.nodePrograms[d.type],y=p?.drawLabel||f;y(a,v(v({key:h},d),{},{size:m,x:u,y:g}),this.settings)}}}return this}},{key:"renderEdgeLabels",value:function(){if(!this.settings.renderEdgeLabels)return this;var e=this.canvasContexts.edgeLabels;e.clearRect(0,0,this.width,this.height);var t=yt({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});xe(t,this.edgesWithForcedLabels);for(var a=new Set,r=0,o=t.length;r<o;r++){var h=t[r],d=this.graph.extremities(h),l=this.nodeDataCache[d[0]],u=this.nodeDataCache[d[1]],g=this.edgeDataCache[h];if(!a.has(h)&&!(g.hidden||l.hidden||u.hidden)){var m=this.settings.defaultDrawEdgeLabel,f=this.edgePrograms[g.type],p=f?.drawLabel||m;p(e,v(v({key:h},g),{},{size:this.scaleSize(g.size)}),v(v(v({key:d[0]},l),this.framedGraphToViewport(l)),{},{size:this.scaleSize(l.size)}),v(v(v({key:d[1]},u),this.framedGraphToViewport(u)),{},{size:this.scaleSize(u.size)}),this.settings),a.add(h)}}return this.displayedEdgeLabels=a,this}},{key:"renderHighlightedNodes",value:function(){var e=this,t=this.canvasContexts.hovers;t.clearRect(0,0,this.width,this.height);var a=function(m){var f=e.nodeDataCache[m],p=e.framedGraphToViewport(f),y=p.x,E=p.y,b=e.scaleSize(f.size),x=e.settings.defaultDrawNodeHover,C=e.nodePrograms[f.type],I=C?.drawHover||x;I(t,v(v({key:m},f),{},{size:b,x:y,y:E}),e.settings)},r=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&r.push(this.hoveredNode),this.highlightedNodes.forEach(function(g){g!==e.hoveredNode&&r.push(g)}),r.forEach(function(g){return a(g)});var o={};r.forEach(function(g){var m=e.nodeDataCache[g].type;o[m]=(o[m]||0)+1});for(var h in this.nodeHoverPrograms)this.nodeHoverPrograms[h].reallocate(o[h]||0),o[h]=0;r.forEach(function(g){var m=e.nodeDataCache[g];e.nodeHoverPrograms[m.type].process(0,o[m.type]++,m)}),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT);var d=this.getRenderParams();for(var l in this.nodeHoverPrograms){var u=this.nodeHoverPrograms[l];u.render(d)}}},{key:"scheduleHighlightedNodesRender",value:function(){var e=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=requestAnimationFrame(function(){e.renderHighlightedNodesFrame=null,e.renderHighlightedNodes(),e.renderEdgeLabels()}))}},{key:"render",value:function(){var e=this;this.emit("beforeRender");var t=function(){return e.emit("afterRender"),e};if(this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.resize(),this.needToProcess&&this.process(),this.needToProcess=!1,this.clear(),this.pickingLayers.forEach(function(y){return e.resetWebGLTexture(y)}),!this.graph.order)return t();var a=this.mouseCaptor,r=this.camera.isAnimated()||a.isMoving||a.draggedEvents||a.currentWheelDirection,o=this.camera.getState(),h=this.getDimensions(),d=this.getGraphDimensions(),l=this.getStagePadding();this.matrix=X(o,h,d,l),this.invMatrix=X(o,h,d,l,!0),this.correctionRatio=$e(this.matrix,o,h),this.graphToViewportRatio=this.getGraphToViewportRatio();var u=this.getRenderParams();for(var g in this.nodePrograms){var m=this.nodePrograms[g];m.render(u)}if(!this.settings.hideEdgesOnMove||!r)for(var f in this.edgePrograms){var p=this.edgePrograms[f];p.render(u)}return this.settings.hideLabelsOnMove&&r||(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes()),t()}},{key:"addNode",value:function(e){var t=Object.assign({},this.graph.getNodeAttributes(e));this.settings.nodeReducer&&(t=this.settings.nodeReducer(e,t));var a=bt(this.settings,e,t);this.nodeDataCache[e]=a,this.nodesWithForcedLabels.delete(e),a.forceLabel&&!a.hidden&&this.nodesWithForcedLabels.add(e),this.highlightedNodes.delete(e),a.highlighted&&!a.hidden&&this.highlightedNodes.add(e),this.settings.zIndex&&(a.zIndex<this.nodeZExtent[0]&&(this.nodeZExtent[0]=a.zIndex),a.zIndex>this.nodeZExtent[1]&&(this.nodeZExtent[1]=a.zIndex))}},{key:"updateNode",value:function(e){this.addNode(e);var t=this.nodeDataCache[e];this.normalizationFunction.applyTo(t)}},{key:"removeNode",value:function(e){delete this.nodeDataCache[e],delete this.nodeProgramIndex[e],this.highlightedNodes.delete(e),this.hoveredNode===e&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(e)}},{key:"addEdge",value:function(e){var t=Object.assign({},this.graph.getEdgeAttributes(e));this.settings.edgeReducer&&(t=this.settings.edgeReducer(e,t));var a=xt(this.settings,e,t);this.edgeDataCache[e]=a,this.edgesWithForcedLabels.delete(e),a.forceLabel&&!a.hidden&&this.edgesWithForcedLabels.add(e),this.settings.zIndex&&(a.zIndex<this.edgeZExtent[0]&&(this.edgeZExtent[0]=a.zIndex),a.zIndex>this.edgeZExtent[1]&&(this.edgeZExtent[1]=a.zIndex))}},{key:"updateEdge",value:function(e){this.addEdge(e)}},{key:"removeEdge",value:function(e){delete this.edgeDataCache[e],delete this.edgeProgramIndex[e],this.hoveredEdge===e&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(e)}},{key:"clearNodeIndices",value:function(){this.labelGrid=new Le,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0],this.highlightedNodes=new Set}},{key:"clearEdgeIndices",value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:"clearIndices",value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:"clearNodeState",value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:"clearEdgeState",value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:"clearState",value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:"addNodeToProgram",value:function(e,t,a){var r=this.nodeDataCache[e],o=this.nodePrograms[r.type];if(!o)throw new Error('Sigma: could not find a suitable program for node type "'.concat(r.type,'"!'));o.process(t,a,r),this.nodeProgramIndex[e]=a}},{key:"addEdgeToProgram",value:function(e,t,a){var r=this.edgeDataCache[e],o=this.edgePrograms[r.type];if(!o)throw new Error('Sigma: could not find a suitable program for edge type "'.concat(r.type,'"!'));var h=this.graph.extremities(e),d=this.nodeDataCache[h[0]],l=this.nodeDataCache[h[1]];o.process(t,a,d,l,r),this.edgeProgramIndex[e]=a}},{key:"getRenderParams",value:function(){return{matrix:this.matrix,invMatrix:this.invMatrix,width:this.width,height:this.height,pixelRatio:this.pixelRatio,zoomRatio:this.camera.ratio,cameraAngle:this.camera.angle,sizeRatio:1/this.scaleSize(),correctionRatio:this.correctionRatio,downSizingRatio:this.pickingDownSizingRatio,minEdgeThickness:this.settings.minEdgeThickness,antiAliasingFeather:this.settings.antiAliasingFeather}}},{key:"getStagePadding",value:function(){var e=this.settings,t=e.stagePadding,a=e.autoRescale;return a&&t||0}},{key:"createLayer",value:function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.elements[e])throw new Error('Sigma: a layer named "'.concat(e,'" already exists'));var r=it(t,{position:"absolute"},{class:"sigma-".concat(e)});return a.style&&Object.assign(r.style,a.style),this.elements[e]=r,"beforeLayer"in a&&a.beforeLayer?this.elements[a.beforeLayer].before(r):"afterLayer"in a&&a.afterLayer?this.elements[a.afterLayer].after(r):this.container.appendChild(r),r}},{key:"createCanvas",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.createLayer(e,"canvas",t)}},{key:"createCanvasContext",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.createCanvas(e,t),r={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[e]=a.getContext("2d",r),this}},{key:"createWebGLContext",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=t?.canvas||this.createCanvas(e,t);t.hidden&&a.remove();var r=v({preserveDrawingBuffer:!1,antialias:!1},t),o;o=a.getContext("webgl2",r),o||(o=a.getContext("webgl",r)),o||(o=a.getContext("experimental-webgl",r));var h=o;if(this.webGLContexts[e]=h,h.blendFunc(h.ONE,h.ONE_MINUS_SRC_ALPHA),t.picking){this.pickingLayers.add(e);var d=h.createFramebuffer();if(!d)throw new Error("Sigma: cannot create a new frame buffer for layer ".concat(e));this.frameBuffers[e]=d}return h}},{key:"killLayer",value:function(e){var t=this.elements[e];if(!t)throw new Error("Sigma: cannot kill layer ".concat(e,", which does not exist"));if(this.webGLContexts[e]){var a,r=this.webGLContexts[e];(a=r.getExtension("WEBGL_lose_context"))===null||a===void 0||a.loseContext(),delete this.webGLContexts[e]}else this.canvasContexts[e]&&delete this.canvasContexts[e];return t.remove(),delete this.elements[e],this}},{key:"getCamera",value:function(){return this.camera}},{key:"setCamera",value:function(e){this.unbindCameraHandlers(),this.camera=e,this.bindCameraHandlers()}},{key:"getContainer",value:function(){return this.container}},{key:"getGraph",value:function(){return this.graph}},{key:"setGraph",value:function(e){e!==this.graph&&(this.hoveredNode&&!e.hasNode(this.hoveredNode)&&(this.hoveredNode=null),this.hoveredEdge&&!e.hasEdge(this.hoveredEdge)&&(this.hoveredEdge=null),this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=e,this.bindGraphHandlers(),this.refresh())}},{key:"getMouseCaptor",value:function(){return this.mouseCaptor}},{key:"getTouchCaptor",value:function(){return this.touchCaptor}},{key:"getDimensions",value:function(){return{width:this.width,height:this.height}}},{key:"getGraphDimensions",value:function(){var e=this.customBBox||this.nodeExtent;return{width:e.x[1]-e.x[0]||1,height:e.y[1]-e.y[0]||1}}},{key:"getNodeDisplayData",value:function(e){var t=this.nodeDataCache[e];return t?Object.assign({},t):void 0}},{key:"getEdgeDisplayData",value:function(e){var t=this.edgeDataCache[e];return t?Object.assign({},t):void 0}},{key:"getNodeDisplayedLabels",value:function(){return new Set(this.displayedNodeLabels)}},{key:"getEdgeDisplayedLabels",value:function(){return new Set(this.displayedEdgeLabels)}},{key:"getSettings",value:function(){return v({},this.settings)}},{key:"getSetting",value:function(e){return this.settings[e]}},{key:"setSetting",value:function(e,t){var a=v({},this.settings);return this.settings[e]=t,oe(this.settings),this.handleSettingsUpdate(a),this.scheduleRefresh(),this}},{key:"updateSetting",value:function(e,t){return this.setSetting(e,t(this.settings[e])),this}},{key:"setSettings",value:function(e){var t=v({},this.settings);return this.settings=v(v({},this.settings),e),oe(this.settings),this.handleSettingsUpdate(t),this.scheduleRefresh(),this}},{key:"resize",value:function(e){var t=this.width,a=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=pe(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(!e&&t===this.width&&a===this.height)return this;for(var r in this.elements){var o=this.elements[r];o.style.width=this.width+"px",o.style.height=this.height+"px"}for(var h in this.canvasContexts)this.elements[h].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[h].setAttribute("height",this.height*this.pixelRatio+"px"),this.pixelRatio!==1&&this.canvasContexts[h].scale(this.pixelRatio,this.pixelRatio);for(var d in this.webGLContexts){this.elements[d].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[d].setAttribute("height",this.height*this.pixelRatio+"px");var l=this.webGLContexts[d];if(l.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(d)){var u=this.textures[d];u&&l.deleteTexture(u)}}return this.emit("resize"),this}},{key:"clear",value:function(){return this.emit("beforeClear"),this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this.emit("afterClear"),this}},{key:"refresh",value:function(e){var t=this,a=e?.skipIndexation!==void 0?e?.skipIndexation:!1,r=e?.schedule!==void 0?e.schedule:!1,o=!e||!e.partialGraph;if(o)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(C){return t.addNode(C)}),this.graph.forEachEdge(function(C){return t.addEdge(C)});else{for(var h,d,l=((h=e.partialGraph)===null||h===void 0?void 0:h.nodes)||[],u=0,g=l?.length||0;u<g;u++){var m=l[u];if(this.updateNode(m),a){var f=this.nodeProgramIndex[m];if(f===void 0)throw new Error('Sigma: node "'.concat(m,`" can't be repaint`));this.addNodeToProgram(m,this.nodeIndices[m],f)}}for(var p=(e==null||(d=e.partialGraph)===null||d===void 0?void 0:d.edges)||[],y=0,E=p.length;y<E;y++){var b=p[y];if(this.updateEdge(b),a){var x=this.edgeProgramIndex[b];if(x===void 0)throw new Error('Sigma: edge "'.concat(b,`" can't be repaint`));this.addEdgeToProgram(b,this.edgeIndices[b],x)}}}return(o||!a)&&(this.needToProcess=!0),r?this.scheduleRender():this.render(),this}},{key:"scheduleRender",value:function(){var e=this;return this.renderFrame||(this.renderFrame=requestAnimationFrame(function(){e.render()})),this}},{key:"scheduleRefresh",value:function(e){return this.refresh(v(v({},e),{},{schedule:!0}))}},{key:"getViewportZoomedState",value:function(e,t){var a=this.camera.getState(),r=a.ratio,o=a.angle,h=a.x,d=a.y,l=this.settings,u=l.minCameraRatio,g=l.maxCameraRatio;typeof g=="number"&&(t=Math.min(t,g)),typeof u=="number"&&(t=Math.max(t,u));var m=t/r,f={x:this.width/2,y:this.height/2},p=this.viewportToFramedGraph(e),y=this.viewportToFramedGraph(f);return{angle:o,x:(p.x-y.x)*(1-m)+h,y:(p.y-y.y)*(1-m)+d,ratio:t}}},{key:"viewRectangle",value:function(){var e=this.viewportToFramedGraph({x:0,y:0}),t=this.viewportToFramedGraph({x:this.width,y:0}),a=this.viewportToFramedGraph({x:0,y:this.height});return{x1:e.x,y1:e.y,x2:t.x,y2:t.y,height:t.y-a.y}}},{key:"framedGraphToViewport",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=!!t.cameraState||!!t.viewportDimensions||!!t.graphDimensions,r=t.matrix?t.matrix:a?X(t.cameraState||this.camera.getState(),t.viewportDimensions||this.getDimensions(),t.graphDimensions||this.getGraphDimensions(),t.padding||this.getStagePadding()):this.matrix,o=de(r,e);return{x:(1+o.x)*this.width/2,y:(1-o.y)*this.height/2}}},{key:"viewportToFramedGraph",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=!!t.cameraState||!!t.viewportDimensions||!t.graphDimensions,r=t.matrix?t.matrix:a?X(t.cameraState||this.camera.getState(),t.viewportDimensions||this.getDimensions(),t.graphDimensions||this.getGraphDimensions(),t.padding||this.getStagePadding(),!0):this.invMatrix,o=de(r,{x:e.x/this.width*2-1,y:1-e.y/this.height*2});return isNaN(o.x)&&(o.x=0),isNaN(o.y)&&(o.y=0),o}},{key:"viewportToGraph",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(e,t))}},{key:"graphToViewport",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(e),t)}},{key:"getGraphToViewportRatio",value:function(){var e={x:0,y:0},t={x:1,y:1},a=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)),r=this.graphToViewport(e),o=this.graphToViewport(t),h=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2));return h/a}},{key:"getBBox",value:function(){return this.nodeExtent}},{key:"getCustomBBox",value:function(){return this.customBBox}},{key:"setCustomBBox",value:function(e){return this.customBBox=e,this.scheduleRender(),this}},{key:"kill",value:function(){this.emit("kill"),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&(cancelAnimationFrame(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var e=this.container;e.firstChild;)e.removeChild(e.firstChild);for(var t in this.nodePrograms)this.nodePrograms[t].kill();for(var a in this.nodeHoverPrograms)this.nodeHoverPrograms[a].kill();for(var r in this.edgePrograms)this.edgePrograms[r].kill();this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={};for(var o in this.elements)this.killLayer(o);this.canvasContexts={},this.webGLContexts={},this.elements={}}},{key:"scaleSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return e/this.settings.zoomToSizeRatioFunction(t)*(this.getSetting("itemSizesReference")==="positions"?t*this.graphToViewportRatio:1)}},{key:"getCanvases",value:function(){var e={};for(var t in this.elements)this.elements[t]instanceof HTMLCanvasElement&&(e[t]=this.elements[t]);return e}}])})(ue),St=Ct;export{Ce as Camera,lt as MouseCaptor,Ct as Sigma,gt as TouchCaptor,St as default};
@@ -0,0 +1 @@
1
+ const e={};export{e as default};
@@ -0,0 +1,2 @@
1
+ �const e={};export{e as default};
2
+ 
@@ -0,0 +1 @@
1
+ var p={exports:{}},O;function T(){if(O)return p.exports;O=1;var a=typeof Reflect=="object"?Reflect:null,h=a&&typeof a.apply=="function"?a.apply:function(e,n,r){return Function.prototype.apply.call(e,n,r)},v;a&&typeof a.ownKeys=="function"?v=a.ownKeys:Object.getOwnPropertySymbols?v=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:v=function(e){return Object.getOwnPropertyNames(e)};function C(t){console&&console.warn&&console.warn(t)}var d=Number.isNaN||function(e){return e!==e};function o(){o.init.call(this)}p.exports=o,p.exports.once=M,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var L=10;function l(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return L},set:function(t){if(typeof t!="number"||t<0||d(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");L=t}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||d(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function m(t){return t._maxListeners===void 0?o.defaultMaxListeners:t._maxListeners}o.prototype.getMaxListeners=function(){return m(this)},o.prototype.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=e==="error",f=this._events;if(f!==void 0)i=i&&f.error===void 0;else if(!i)return!1;if(i){var s;if(n.length>0&&(s=n[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var c=f[e];if(c===void 0)return!1;if(typeof c=="function")h(c,this,n);else for(var x=c.length,P=b(c,x),r=0;r<x;++r)h(P[r],this,n);return!0};function y(t,e,n,r){var i,f,s;if(l(n),f=t._events,f===void 0?(f=t._events=Object.create(null),t._eventsCount=0):(f.newListener!==void 0&&(t.emit("newListener",e,n.listener?n.listener:n),f=t._events),s=f[e]),s===void 0)s=f[e]=n,++t._eventsCount;else if(typeof s=="function"?s=f[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=m(t),i>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,C(u)}return t}o.prototype.addListener=function(e,n){return y(this,e,n,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,n){return y(this,e,n,!0)};function R(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=R.bind(r);return i.listener=n,r.wrapFn=i,i}o.prototype.once=function(e,n){return l(n),this.on(e,g(this,e,n)),this},o.prototype.prependOnceListener=function(e,n){return l(n),this.prependListener(e,g(this,e,n)),this},o.prototype.removeListener=function(e,n){var r,i,f,s,u;if(l(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(f=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){u=r[s].listener,f=s;break}if(f<0)return this;f===0?r.shift():j(r,f),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,u||n)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var f=Object.keys(r),s;for(i=0;i<f.length;++i)s=f[i],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[e],typeof n=="function")this.removeListener(e,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(e,n[i]);return this};function _(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?N(i):b(i,i.length)}o.prototype.listeners=function(e){return _(this,e,!0)},o.prototype.rawListeners=function(e){return _(this,e,!1)},o.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):w.call(t,e)},o.prototype.listenerCount=w;function w(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?v(this._events):[]};function b(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function j(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function N(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}function M(t,e){return new Promise(function(n,r){function i(s){t.removeListener(e,f),r(s)}function f(){typeof t.removeListener=="function"&&t.removeListener("error",i),n([].slice.call(arguments))}E(t,e,f,{once:!0}),e!=="error"&&A(t,i,{once:!0})})}function A(t,e,n){typeof t.on=="function"&&E(t,"error",e,n)}function E(t,e,n,r){if(typeof t.on=="function")r.once?t.once(e,n):t.on(e,n);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(f){r.once&&t.removeEventListener(e,i),n(f)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}return p.exports}var F=T();export{F as e};
@@ -0,0 +1 @@
1
+ import{l as t,u as f,f as e,g as c}from"./BnkCgNCx.js";function u(n){e===null&&t(),f(()=>{const o=c(n);if(typeof o=="function")return o})}function a(n){e===null&&t(),u(()=>()=>c(n))}export{a,u as o};
@@ -0,0 +1 @@
1
+ var d={},G;function H(){if(G)return d;G=1;function c(t){return typeof t!="number"||isNaN(t)?1:t}function y(t,a){var e={},u=function(o){return typeof o>"u"?a:o};typeof a=="function"&&(u=a);var n=function(o){return u(o[t])},f=function(){return u(void 0)};return typeof t=="string"?(e.fromAttributes=n,e.fromGraph=function(o,i){return n(o.getNodeAttributes(i))},e.fromEntry=function(o,i){return n(i)}):typeof t=="function"?(e.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},e.fromGraph=function(o,i){return u(t(i,o.getNodeAttributes(i)))},e.fromEntry=function(o,i){return u(t(o,i))}):(e.fromAttributes=f,e.fromGraph=f,e.fromEntry=f),e}function r(t,a){var e={},u=function(o){return typeof o>"u"?a:o};typeof a=="function"&&(u=a);var n=function(o){return u(o[t])},f=function(){return u(void 0)};return typeof t=="string"?(e.fromAttributes=n,e.fromGraph=function(o,i){return n(o.getEdgeAttributes(i))},e.fromEntry=function(o,i){return n(i)},e.fromPartialEntry=e.fromEntry,e.fromMinimalEntry=e.fromEntry):typeof t=="function"?(e.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},e.fromGraph=function(o,i){var s=o.extremities(i);return u(t(i,o.getEdgeAttributes(i),s[0],s[1],o.getNodeAttributes(s[0]),o.getNodeAttributes(s[1]),o.isUndirected(i)))},e.fromEntry=function(o,i,s,b,g,h,m){return u(t(o,i,s,b,g,h,m))},e.fromPartialEntry=function(o,i,s,b){return u(t(o,i,s,b))},e.fromMinimalEntry=function(o,i){return u(t(o,i))}):(e.fromAttributes=f,e.fromGraph=f,e.fromEntry=f,e.fromMinimalEntry=f),e}return d.createNodeValueGetter=y,d.createEdgeValueGetter=r,d.createEdgeWeightGetter=function(t){return r(t,c)},d}var l={},A;function L(){if(A)return l;A=1;var c=10,y=3;return l.assign=function(r){r=r||{};var t=Array.prototype.slice.call(arguments).slice(1),a,e,u;for(a=0,u=t.length;a<u;a++)if(t[a])for(e in t[a])r[e]=t[a][e];return r},l.validateSettings=function(r){return"linLogMode"in r&&typeof r.linLogMode!="boolean"?{message:"the `linLogMode` setting should be a boolean."}:"outboundAttractionDistribution"in r&&typeof r.outboundAttractionDistribution!="boolean"?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:"adjustSizes"in r&&typeof r.adjustSizes!="boolean"?{message:"the `adjustSizes` setting should be a boolean."}:"edgeWeightInfluence"in r&&typeof r.edgeWeightInfluence!="number"?{message:"the `edgeWeightInfluence` setting should be a number."}:"scalingRatio"in r&&!(typeof r.scalingRatio=="number"&&r.scalingRatio>=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in r&&typeof r.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in r&&!(typeof r.gravity=="number"&&r.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in r&&!(typeof r.slowDown=="number"||r.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in r&&typeof r.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in r&&!(typeof r.barnesHutTheta=="number"&&r.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},l.graphToByteArrays=function(r,t){var a=r.order,e=r.size,u={},n,f=new Float32Array(a*c),o=new Float32Array(e*y);return n=0,r.forEachNode(function(i,s){u[i]=n,f[n]=s.x,f[n+1]=s.y,f[n+2]=0,f[n+3]=0,f[n+4]=0,f[n+5]=0,f[n+6]=1,f[n+7]=1,f[n+8]=s.size||1,f[n+9]=s.fixed?1:0,n+=c}),n=0,r.forEachEdge(function(i,s,b,g,h,m,z){var E=u[b],w=u[g],v=t(i,s,b,g,h,m,z);f[E+6]+=v,f[w+6]+=v,o[n]=E,o[n+1]=w,o[n+2]=v,n+=y}),{nodes:f,edges:o}},l.assignLayoutChanges=function(r,t,a){var e=0;r.updateEachNodeAttributes(function(u,n){return n.x=t[e],n.y=t[e+1],e+=c,a?a(u,n):n})},l.readGraphPositions=function(r,t){var a=0;r.forEachNode(function(e,u){t[a]=u.x,t[a+1]=u.y,a+=c})},l.collectLayoutChanges=function(r,t,a){for(var e=r.nodes(),u={},n=0,f=0,o=t.length;n<o;n+=c){if(a){var i=Object.assign({},r.getNodeAttributes(e[f]));i.x=t[n],i.y=t[n+1],i=a(e[f],i),u[e[f]]={x:i.x,y:i.y}}else u[e[f]]={x:t[n],y:t[n+1]};f++}return u},l.createWorker=function(t){var a=window.URL||window.webkitURL,e=t.toString(),u=a.createObjectURL(new Blob(["("+e+").call(this);"],{type:"text/javascript"})),n=new Worker(u);return a.revokeObjectURL(u),n},l}var p,D;function R(){return D||(D=1,p={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}),p}export{L as a,R as b,H as r};
@@ -0,0 +1 @@
1
+ import{r as Ge,g as Oe}from"./i0D5dc1Y.js";import{r as Re,a as Ie,b as Se}from"./BP2JbIUZ.js";function Ae(Z,C){for(var m=0;m<C.length;m++){const b=C[m];if(typeof b!="string"&&!Array.isArray(b)){for(const U in b)if(U!=="default"&&!(U in Z)){const g=Object.getOwnPropertyDescriptor(b,U);g&&Object.defineProperty(Z,U,g.get?g:{enumerable:!0,get:()=>b[U]})}}}return Object.freeze(Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"}))}var ge,pe;function Te(){return pe||(pe=1,ge=function(){var C,m,b={};(function(){var g=0,l=1,h=2,i=3,y=4,I=5,a=6,$=7,M=8,ce=9,De=0,ke=1,oe=2,o=0,S=1,G=2,H=3,q=4,D=5,R=6,W=7,L=8,ve=3,T=10,_e=3,_=9,fe=10;b.exports=function(w,e,N){var ue,r,s,p,k,j,J,O,u,le,F=e.length,be=N.length,Y=w.adjustSizes,ye=w.barnesHutTheta*w.barnesHutTheta,x,E,c,v,P,f,n,t=[];for(s=0;s<F;s+=T)e[s+y]=e[s+h],e[s+I]=e[s+i],e[s+h]=0,e[s+i]=0;if(w.outboundAttractionDistribution){for(x=0,s=0;s<F;s+=T)x+=e[s+a];x/=F/T}if(w.barnesHutOptimize){var z=1/0,K=-1/0,B=1/0,Q=-1/0,A,X,ie;for(s=0;s<F;s+=T)z=Math.min(z,e[s+g]),K=Math.max(K,e[s+g]),B=Math.min(B,e[s+l]),Q=Math.max(Q,e[s+l]);var ee=K-z,se=Q-B;for(ee>se?(B-=(ee-se)/2,Q=B+ee):(z-=(se-ee)/2,K=z+se),t[0+o]=-1,t[0+S]=(z+K)/2,t[0+G]=(B+Q)/2,t[0+H]=Math.max(K-z,Q-B),t[0+q]=-1,t[0+D]=-1,t[0+R]=0,t[0+W]=0,t[0+L]=0,ue=1,s=0;s<F;s+=T)for(r=0,ie=ve;;)if(t[r+D]>=0){e[s+g]<t[r+S]?e[s+l]<t[r+G]?A=t[r+D]:A=t[r+D]+_:e[s+l]<t[r+G]?A=t[r+D]+_*2:A=t[r+D]+_*3,t[r+W]=(t[r+W]*t[r+R]+e[s+g]*e[s+a])/(t[r+R]+e[s+a]),t[r+L]=(t[r+L]*t[r+R]+e[s+l]*e[s+a])/(t[r+R]+e[s+a]),t[r+R]+=e[s+a],r=A;continue}else if(t[r+o]<0){t[r+o]=s;break}else{if(t[r+D]=ue*_,O=t[r+H]/2,u=t[r+D],t[u+o]=-1,t[u+S]=t[r+S]-O,t[u+G]=t[r+G]-O,t[u+H]=O,t[u+q]=u+_,t[u+D]=-1,t[u+R]=0,t[u+W]=0,t[u+L]=0,u+=_,t[u+o]=-1,t[u+S]=t[r+S]-O,t[u+G]=t[r+G]+O,t[u+H]=O,t[u+q]=u+_,t[u+D]=-1,t[u+R]=0,t[u+W]=0,t[u+L]=0,u+=_,t[u+o]=-1,t[u+S]=t[r+S]+O,t[u+G]=t[r+G]-O,t[u+H]=O,t[u+q]=u+_,t[u+D]=-1,t[u+R]=0,t[u+W]=0,t[u+L]=0,u+=_,t[u+o]=-1,t[u+S]=t[r+S]+O,t[u+G]=t[r+G]+O,t[u+H]=O,t[u+q]=t[r+q],t[u+D]=-1,t[u+R]=0,t[u+W]=0,t[u+L]=0,ue+=4,e[t[r+o]+g]<t[r+S]?e[t[r+o]+l]<t[r+G]?A=t[r+D]:A=t[r+D]+_:e[t[r+o]+l]<t[r+G]?A=t[r+D]+_*2:A=t[r+D]+_*3,t[r+R]=e[t[r+o]+a],t[r+W]=e[t[r+o]+g],t[r+L]=e[t[r+o]+l],t[A+o]=t[r+o],t[r+o]=-1,e[s+g]<t[r+S]?e[s+l]<t[r+G]?X=t[r+D]:X=t[r+D]+_:e[s+l]<t[r+G]?X=t[r+D]+_*2:X=t[r+D]+_*3,A===X)if(ie--){r=A;continue}else{ie=ve;break}t[X+o]=s;break}}if(w.barnesHutOptimize)for(E=w.scalingRatio,s=0;s<F;s+=T)for(r=0;;)if(t[r+D]>=0)if(f=Math.pow(e[s+g]-t[r+W],2)+Math.pow(e[s+l]-t[r+L],2),le=t[r+H],4*le*le/f<ye){if(c=e[s+g]-t[r+W],v=e[s+l]-t[r+L],Y===!0?f>0?(n=E*e[s+a]*t[r+R]/f,e[s+h]+=c*n,e[s+i]+=v*n):f<0&&(n=-E*e[s+a]*t[r+R]/Math.sqrt(f),e[s+h]+=c*n,e[s+i]+=v*n):f>0&&(n=E*e[s+a]*t[r+R]/f,e[s+h]+=c*n,e[s+i]+=v*n),r=t[r+q],r<0)break;continue}else{r=t[r+D];continue}else{if(j=t[r+o],j>=0&&j!==s&&(c=e[s+g]-e[j+g],v=e[s+l]-e[j+l],f=c*c+v*v,Y===!0?f>0?(n=E*e[s+a]*e[j+a]/f,e[s+h]+=c*n,e[s+i]+=v*n):f<0&&(n=-E*e[s+a]*e[j+a]/Math.sqrt(f),e[s+h]+=c*n,e[s+i]+=v*n):f>0&&(n=E*e[s+a]*e[j+a]/f,e[s+h]+=c*n,e[s+i]+=v*n)),r=t[r+q],r<0)break;continue}else for(E=w.scalingRatio,p=0;p<F;p+=T)for(k=0;k<p;k+=T)c=e[p+g]-e[k+g],v=e[p+l]-e[k+l],Y===!0?(f=Math.sqrt(c*c+v*v)-e[p+M]-e[k+M],f>0?(n=E*e[p+a]*e[k+a]/f/f,e[p+h]+=c*n,e[p+i]+=v*n,e[k+h]-=c*n,e[k+i]-=v*n):f<0&&(n=100*E*e[p+a]*e[k+a],e[p+h]+=c*n,e[p+i]+=v*n,e[k+h]-=c*n,e[k+i]-=v*n)):(f=Math.sqrt(c*c+v*v),f>0&&(n=E*e[p+a]*e[k+a]/f/f,e[p+h]+=c*n,e[p+i]+=v*n,e[k+h]-=c*n,e[k+i]-=v*n));for(u=w.gravity/w.scalingRatio,E=w.scalingRatio,s=0;s<F;s+=T)n=0,c=e[s+g],v=e[s+l],f=Math.sqrt(Math.pow(c,2)+Math.pow(v,2)),w.strongGravityMode?f>0&&(n=E*e[s+a]*u):f>0&&(n=E*e[s+a]*u/f),e[s+h]-=c*n,e[s+i]-=v*n;for(E=1*(w.outboundAttractionDistribution?x:1),J=0;J<be;J+=_e)p=N[J+De],k=N[J+ke],O=N[J+oe],P=Math.pow(O,w.edgeWeightInfluence),c=e[p+g]-e[k+g],v=e[p+l]-e[k+l],Y===!0?(f=Math.sqrt(c*c+v*v)-e[p+M]-e[k+M],w.linLogMode?w.outboundAttractionDistribution?f>0&&(n=-E*P*Math.log(1+f)/f/e[p+a]):f>0&&(n=-E*P*Math.log(1+f)/f):w.outboundAttractionDistribution?f>0&&(n=-E*P/e[p+a]):f>0&&(n=-E*P)):(f=Math.sqrt(Math.pow(c,2)+Math.pow(v,2)),w.linLogMode?w.outboundAttractionDistribution?f>0&&(n=-E*P*Math.log(1+f)/f/e[p+a]):f>0&&(n=-E*P*Math.log(1+f)/f):w.outboundAttractionDistribution?(f=1,n=-E*P/e[p+a]):(f=1,n=-E*P)),f>0&&(e[p+h]+=c*n,e[p+i]+=v*n,e[k+h]-=c*n,e[k+i]-=v*n);var te,d,re,V,ne,he;if(Y===!0)for(s=0;s<F;s+=T)e[s+ce]!==1&&(te=Math.sqrt(Math.pow(e[s+h],2)+Math.pow(e[s+i],2)),te>fe&&(e[s+h]=e[s+h]*fe/te,e[s+i]=e[s+i]*fe/te),d=e[s+a]*Math.sqrt((e[s+y]-e[s+h])*(e[s+y]-e[s+h])+(e[s+I]-e[s+i])*(e[s+I]-e[s+i])),re=Math.sqrt((e[s+y]+e[s+h])*(e[s+y]+e[s+h])+(e[s+I]+e[s+i])*(e[s+I]+e[s+i]))/2,V=.1*Math.log(1+re)/(1+Math.sqrt(d)),ne=e[s+g]+e[s+h]*(V/w.slowDown),e[s+g]=ne,he=e[s+l]+e[s+i]*(V/w.slowDown),e[s+l]=he);else for(s=0;s<F;s+=T)e[s+ce]!==1&&(d=e[s+a]*Math.sqrt((e[s+y]-e[s+h])*(e[s+y]-e[s+h])+(e[s+I]-e[s+i])*(e[s+I]-e[s+i])),re=Math.sqrt((e[s+y]+e[s+h])*(e[s+y]+e[s+h])+(e[s+I]+e[s+i])*(e[s+I]+e[s+i]))/2,V=e[s+$]*Math.log(1+re)/(1+Math.sqrt(d)),e[s+$]=Math.min(1,Math.sqrt(V*(Math.pow(e[s+h],2)+Math.pow(e[s+i],2))/(1+Math.sqrt(d)))),ne=e[s+g]+e[s+h]*(V/w.slowDown),e[s+g]=ne,he=e[s+l]+e[s+i]*(V/w.slowDown),e[s+l]=he);return{}}})();var U=b.exports;self.addEventListener("message",function(g){var l=g.data;C=new Float32Array(l.nodes),l.edges&&(m=new Float32Array(l.edges)),U(l.settings,C,m),self.postMessage({nodes:C.buffer},[C.buffer])})}),ge}var ae,we;function We(){if(we)return ae;we=1;var Z=Te(),C=Ge(),m=Re().createEdgeWeightGetter,b=Ie(),U=Se();function g(l,h){if(h=h||{},!C(l))throw new Error("graphology-layout-forceatlas2/worker: the given graph is not a valid graphology instance.");var i=m("getEdgeWeight"in h?h.getEdgeWeight:"weight").fromEntry,y=b.assign({},U,h.settings),I=b.validateSettings(y);if(I)throw new Error("graphology-layout-forceatlas2/worker: "+I.message);this.worker=null,this.graph=l,this.settings=y,this.getEdgeWeight=i,this.matrices=null,this.running=!1,this.killed=!1,this.outputReducer=typeof h.outputReducer=="function"?h.outputReducer:null,this.handleMessage=this.handleMessage.bind(this);var a=void 0,$=this;this.handleGraphUpdate=function(){$.worker&&$.worker.terminate(),a&&clearTimeout(a),a=setTimeout(function(){a=void 0,$.spawnWorker()},0)},l.on("nodeAdded",this.handleGraphUpdate),l.on("edgeAdded",this.handleGraphUpdate),l.on("nodeDropped",this.handleGraphUpdate),l.on("edgeDropped",this.handleGraphUpdate),this.spawnWorker()}return g.prototype.isRunning=function(){return this.running},g.prototype.spawnWorker=function(){this.worker&&this.worker.terminate(),this.worker=b.createWorker(Z),this.worker.addEventListener("message",this.handleMessage),this.running&&(this.running=!1,this.start())},g.prototype.handleMessage=function(l){if(this.running){var h=new Float32Array(l.data.nodes);b.assignLayoutChanges(this.graph,h,this.outputReducer),this.outputReducer&&b.readGraphPositions(this.graph,h),this.matrices.nodes=h,this.askForIterations()}},g.prototype.askForIterations=function(l){var h=this.matrices,i={settings:this.settings,nodes:h.nodes.buffer},y=[h.nodes.buffer];return l&&(i.edges=h.edges.buffer,y.push(h.edges.buffer)),this.worker.postMessage(i,y),this},g.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-forceatlas2/worker.start: layout was killed.");return this.running?this:(this.matrices=b.graphToByteArrays(this.graph,this.getEdgeWeight),this.running=!0,this.askForIterations(!0),this)},g.prototype.stop=function(){return this.running=!1,this},g.prototype.kill=function(){if(this.killed)return this;this.running=!1,this.killed=!0,this.matrices=null,this.worker.terminate(),this.graph.removeListener("nodeAdded",this.handleGraphUpdate),this.graph.removeListener("edgeAdded",this.handleGraphUpdate),this.graph.removeListener("nodeDropped",this.handleGraphUpdate),this.graph.removeListener("edgeDropped",this.handleGraphUpdate)},ae=g,ae}var Ee=We();const Le=Oe(Ee),Pe=Ae({__proto__:null,default:Le},[Ee]);export{Pe as w};