watch-tail 0.9.0 → 0.10.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 (371) hide show
  1. package/README.md +111 -10
  2. package/build/client/_app/immutable/assets/0.B5hI3s8c.css +2 -0
  3. package/build/client/_app/immutable/assets/2.Cn4w1JYv.css +1 -0
  4. package/build/client/_app/immutable/chunks/0bp2Fczu.js +1 -0
  5. package/build/client/_app/immutable/chunks/B2En4t_E.js +3 -0
  6. package/build/client/_app/immutable/chunks/{DS3cLPAu.js → B7X5bVGV.js} +1 -1
  7. package/build/client/_app/immutable/chunks/BDcWO4cr.js +1 -0
  8. package/build/client/_app/immutable/chunks/{Dkh4Dwm8.js → BDdUgtQ9.js} +1 -1
  9. package/build/client/_app/immutable/chunks/{0b2v80OK.js → BP77Fyht.js} +1 -1
  10. package/build/client/_app/immutable/chunks/{dqF8mxBW.js → B_Mg_9D4.js} +1 -1
  11. package/build/client/_app/immutable/chunks/BvE-N_5_.js +1 -0
  12. package/build/client/_app/immutable/chunks/C0Fq51PS.js +1 -0
  13. package/build/client/_app/immutable/chunks/CBu7zaX6.js +15 -0
  14. package/build/client/_app/immutable/chunks/CDs2jokv.js +1 -0
  15. package/build/client/_app/immutable/chunks/{B5RiPG8Z.js → CL6wPCzw.js} +1 -1
  16. package/build/client/_app/immutable/chunks/CMPe3AwH.js +1 -0
  17. package/build/client/_app/immutable/chunks/{b77-bq1n.js → CRxuTO84.js} +1 -1
  18. package/build/client/_app/immutable/chunks/CXlCR4o6.js +10 -0
  19. package/build/client/_app/immutable/chunks/{DQqLOGLe.js → CZZUqHxO.js} +1 -1
  20. package/build/client/_app/immutable/chunks/{aI_O2VuQ.js → CaFHnwyo.js} +1 -1
  21. package/build/client/_app/immutable/chunks/CbtqT1c8.js +1 -0
  22. package/build/client/_app/immutable/chunks/{DGYKsRyW.js → CfRqDrzx.js} +1 -1
  23. package/build/client/_app/immutable/chunks/CwzJ9AB4.js +1 -0
  24. package/build/client/_app/immutable/chunks/{DwOZdLDj.js → Cy2yzzl5.js} +1 -1
  25. package/build/client/_app/immutable/chunks/D067lFSc.js +2 -0
  26. package/build/client/_app/immutable/chunks/{C_U_Jvk5.js → D27MZEE2.js} +1 -1
  27. package/build/client/_app/immutable/chunks/{IlwbfbOu.js → D9KJP6hv.js} +1 -1
  28. package/build/client/_app/immutable/chunks/DO938hpm.js +1 -0
  29. package/build/client/_app/immutable/chunks/DrLgrJ3k.js +1 -0
  30. package/build/client/_app/immutable/chunks/DrupwIIS.js +1 -0
  31. package/build/client/_app/immutable/chunks/LGzrUxfF.js +1 -0
  32. package/build/client/_app/immutable/chunks/{D7vimbmk.js → PUpq0Ki5.js} +1 -1
  33. package/build/client/_app/immutable/chunks/{DvxMaQv_.js → kSuEE8Bt.js} +1 -1
  34. package/build/client/_app/immutable/chunks/y79YFfGW.js +1 -0
  35. package/build/client/_app/immutable/chunks/zP_HZRCk.js +1 -0
  36. package/build/client/_app/immutable/entry/app.BEq8gOel.js +2 -0
  37. package/build/client/_app/immutable/entry/start.DmBlaUbV.js +1 -0
  38. package/build/client/_app/immutable/nodes/0.D63E8Q6i.js +1 -0
  39. package/build/client/_app/immutable/nodes/1.DXfG5P6X.js +1 -0
  40. package/build/client/_app/immutable/nodes/2.45XrHxUU.js +5 -0
  41. package/build/client/_app/version.json +1 -1
  42. package/build/env.js +0 -1
  43. package/build/handler.js +6 -9
  44. package/build/index.js +6 -9
  45. package/build/server/chunks/chunks/{archive.js-D2jtMmDo.js → archive.js-D7cGVWaq.js} +331 -31
  46. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +0 -1
  47. package/build/server/chunks/chunks/env2.js-C5BgBJDY.js +0 -1
  48. package/build/server/chunks/chunks/{exports.js-ClPPfcHj.js → exports.js-CvFPPbaH.js} +0 -6
  49. package/build/server/chunks/chunks/identity.js-NmGXxBz3.js +0 -1
  50. package/build/server/chunks/chunks/{index-server.js-CtH9Hqwf.js → index-server.js-DOq0LmqS.js} +87 -112
  51. package/build/server/chunks/chunks/internal.js-DZ8ZzzjN.js +0 -1
  52. package/build/server/chunks/chunks/{legacy-client.js-DAqKExQD.js → internal2.js-B2FekELn.js} +279 -7
  53. package/build/server/chunks/chunks/{level-filter.js-D9MNrew3.js → level-filter.js-kKdNjmbR.js} +2 -3
  54. package/build/server/chunks/chunks/{log-buffer.js-A9FA-Qv8.js → log-buffer.js-BjT3sJlh.js} +1 -2
  55. package/build/server/chunks/chunks/regions.js-COf7DgnH.js +0 -1
  56. package/build/server/chunks/chunks/shared-server.js-Dn5XheXH.js +0 -1
  57. package/build/server/chunks/chunks/shared.js-CgjUIvRK.js +0 -1
  58. package/build/server/chunks/chunks/source.js-DZEVvuho.js +0 -1
  59. package/build/server/chunks/chunks/{state.js-i-NVNGIq.js → state.js-CdO6iuBd.js} +3 -4
  60. package/build/server/chunks/chunks/text-size.svelte.js-D09gVgvI.js +309 -0
  61. package/build/server/chunks/chunks/{time-range.js-BLMT8aU3.js → time-range.js-__87ZPq6.js} +9 -5
  62. package/build/server/chunks/chunks/uneval.js-DaakSYFQ.js +0 -1
  63. package/build/server/chunks/chunks/utils.js-BIlHjgGW.js +0 -1
  64. package/build/server/chunks/entries/endpoints/api/archive/{_server.ts.js-C4hWyXuu.js → _server.ts.js-D-97I3hr.js} +2 -3
  65. package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-C5tfrpmC.js +0 -1
  66. package/build/server/chunks/entries/endpoints/api/identity/_server.ts.js-PWRPScuN.js +0 -1
  67. package/build/server/chunks/entries/endpoints/api/log-groups/{_server.ts.js-D4y43Vwe.js → _server.ts.js-BBBsBX5h.js} +2 -3
  68. package/build/server/chunks/entries/endpoints/api/regions/_server.ts.js-9_g0ojki.js +0 -1
  69. package/build/server/chunks/entries/endpoints/api/series/{_server.ts.js-DibT3Hjc.js → _server.ts.js-bsGqvQ1O.js} +4 -5
  70. package/build/server/chunks/entries/endpoints/api/stream/{_server.ts.js-BxXw5K0R.js → _server.ts.js-B6obpUbh.js} +211 -49
  71. package/build/server/chunks/entries/fallbacks/{error.svelte.js-ylsqA41Y.js → error.svelte.js-BupH3lxJ.js} +4 -7
  72. package/build/server/chunks/entries/pages/_layout.svelte.js-C3CVxu2T.js +621 -0
  73. package/build/server/chunks/entries/pages/{_page.svelte.js-C9-7d7mD.js → _page.svelte.js-DS9p1LVo.js} +643 -191
  74. package/build/server/chunks/{handler-Bqo8aDgP.js → handler-DrjCpeeA.js} +4 -5
  75. package/build/server/chunks/{index.js-fPvMujCL.js → index.js-BLTOesya.js} +3 -4
  76. package/build/server/chunks/{manifest.js-Bkj-8GaD.js → manifest.js-C1_IS4sj.js} +8 -9
  77. package/build/server/chunks/nodes/0.js-BHXaR9OX.js +8 -0
  78. package/build/server/chunks/nodes/1.js-C-coUSdu.js +8 -0
  79. package/build/server/chunks/nodes/2.js-Dor6Xgc7.js +8 -0
  80. package/build/shims.js +0 -1
  81. package/dist/cli/completions.js +24 -0
  82. package/dist/cli/index.js +144 -3
  83. package/dist/cli/mcp/agents.js +344 -0
  84. package/dist/cli/mcp/backend.js +235 -0
  85. package/dist/cli/mcp/run.js +245 -0
  86. package/dist/cli/mcp/stdio.js +103 -0
  87. package/dist/cli/mcp/tools.js +245 -0
  88. package/dist/cli/options.js +138 -25
  89. package/dist/cli/server.js +28 -0
  90. package/dist/cli/ui.js +20 -1
  91. package/dist/lib/time-range.js +14 -3
  92. package/package.json +21 -6
  93. package/build/client/_app/immutable/assets/0.ChTKqSf6.css +0 -2
  94. package/build/client/_app/immutable/assets/0.ChTKqSf6.css.br +0 -0
  95. package/build/client/_app/immutable/assets/0.ChTKqSf6.css.gz +0 -0
  96. package/build/client/_app/immutable/assets/BrushContext.2tkUc39H.css.br +0 -0
  97. package/build/client/_app/immutable/assets/BrushContext.2tkUc39H.css.gz +0 -0
  98. package/build/client/_app/immutable/assets/ChartAnnotations.Bw8CGteN.css.br +0 -0
  99. package/build/client/_app/immutable/assets/ChartAnnotations.Bw8CGteN.css.gz +0 -0
  100. package/build/client/_app/immutable/assets/Circle.C5MKzgk2.css.br +0 -1
  101. package/build/client/_app/immutable/assets/Circle.C5MKzgk2.css.gz +0 -0
  102. package/build/client/_app/immutable/assets/DefaultTooltip.CGOVIm3D.css.br +0 -0
  103. package/build/client/_app/immutable/assets/DefaultTooltip.CGOVIm3D.css.gz +0 -0
  104. package/build/client/_app/immutable/assets/EventScatter.0BkgJO-l.css.br +0 -0
  105. package/build/client/_app/immutable/assets/EventScatter.0BkgJO-l.css.gz +0 -0
  106. package/build/client/_app/immutable/assets/Labels.sEaJtb97.css.br +0 -0
  107. package/build/client/_app/immutable/assets/Labels.sEaJtb97.css.gz +0 -0
  108. package/build/client/_app/immutable/assets/Legend.DnhxhJ2I.css.br +0 -0
  109. package/build/client/_app/immutable/assets/Legend.DnhxhJ2I.css.gz +0 -0
  110. package/build/client/_app/immutable/assets/Path.B0wDzTrn.css.br +0 -0
  111. package/build/client/_app/immutable/assets/Path.B0wDzTrn.css.gz +0 -0
  112. package/build/client/_app/immutable/assets/TransformContext.1cjyViIk.css.br +0 -0
  113. package/build/client/_app/immutable/assets/TransformContext.1cjyViIk.css.gz +0 -0
  114. package/build/client/_app/immutable/assets/Voronoi.ce7atosu.css.br +0 -0
  115. package/build/client/_app/immutable/assets/Voronoi.ce7atosu.css.gz +0 -0
  116. package/build/client/_app/immutable/chunks/0b2v80OK.js.br +0 -0
  117. package/build/client/_app/immutable/chunks/0b2v80OK.js.gz +0 -0
  118. package/build/client/_app/immutable/chunks/5EFAIHuJ.js +0 -1
  119. package/build/client/_app/immutable/chunks/5EFAIHuJ.js.br +0 -0
  120. package/build/client/_app/immutable/chunks/5EFAIHuJ.js.gz +0 -0
  121. package/build/client/_app/immutable/chunks/B15XBe8D.js +0 -1
  122. package/build/client/_app/immutable/chunks/B15XBe8D.js.br +0 -0
  123. package/build/client/_app/immutable/chunks/B15XBe8D.js.gz +0 -0
  124. package/build/client/_app/immutable/chunks/B5RiPG8Z.js.br +0 -2
  125. package/build/client/_app/immutable/chunks/B5RiPG8Z.js.gz +0 -0
  126. package/build/client/_app/immutable/chunks/BR2LaRms.js.br +0 -1
  127. package/build/client/_app/immutable/chunks/BR2LaRms.js.gz +0 -0
  128. package/build/client/_app/immutable/chunks/B_KVdCQT.js +0 -10
  129. package/build/client/_app/immutable/chunks/B_KVdCQT.js.br +0 -0
  130. package/build/client/_app/immutable/chunks/B_KVdCQT.js.gz +0 -0
  131. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.br +0 -0
  132. package/build/client/_app/immutable/chunks/Bjy-W4x2.js.gz +0 -0
  133. package/build/client/_app/immutable/chunks/Bl052uUt.js.br +0 -0
  134. package/build/client/_app/immutable/chunks/Bl052uUt.js.gz +0 -0
  135. package/build/client/_app/immutable/chunks/BuCpRsEL.js +0 -1
  136. package/build/client/_app/immutable/chunks/BuCpRsEL.js.br +0 -0
  137. package/build/client/_app/immutable/chunks/BuCpRsEL.js.gz +0 -0
  138. package/build/client/_app/immutable/chunks/BvZtsVvW.js +0 -1
  139. package/build/client/_app/immutable/chunks/BvZtsVvW.js.br +0 -0
  140. package/build/client/_app/immutable/chunks/BvZtsVvW.js.gz +0 -0
  141. package/build/client/_app/immutable/chunks/C3Y15ONf.js +0 -2
  142. package/build/client/_app/immutable/chunks/C3Y15ONf.js.br +0 -0
  143. package/build/client/_app/immutable/chunks/C3Y15ONf.js.gz +0 -0
  144. package/build/client/_app/immutable/chunks/C58PZtCD.js.br +0 -0
  145. package/build/client/_app/immutable/chunks/C58PZtCD.js.gz +0 -0
  146. package/build/client/_app/immutable/chunks/C9GPQYs7.js +0 -1
  147. package/build/client/_app/immutable/chunks/C9GPQYs7.js.br +0 -0
  148. package/build/client/_app/immutable/chunks/C9GPQYs7.js.gz +0 -0
  149. package/build/client/_app/immutable/chunks/CBZpkDc1.js.br +0 -0
  150. package/build/client/_app/immutable/chunks/CBZpkDc1.js.gz +0 -0
  151. package/build/client/_app/immutable/chunks/CCch3uox.js.br +0 -0
  152. package/build/client/_app/immutable/chunks/CCch3uox.js.gz +0 -0
  153. package/build/client/_app/immutable/chunks/C_U_Jvk5.js.br +0 -0
  154. package/build/client/_app/immutable/chunks/C_U_Jvk5.js.gz +0 -0
  155. package/build/client/_app/immutable/chunks/Cd7JqZj9.js +0 -1
  156. package/build/client/_app/immutable/chunks/Cd7JqZj9.js.br +0 -0
  157. package/build/client/_app/immutable/chunks/Cd7JqZj9.js.gz +0 -0
  158. package/build/client/_app/immutable/chunks/D2PbcyDU.js +0 -1
  159. package/build/client/_app/immutable/chunks/D2PbcyDU.js.br +0 -0
  160. package/build/client/_app/immutable/chunks/D2PbcyDU.js.gz +0 -0
  161. package/build/client/_app/immutable/chunks/D7vimbmk.js.br +0 -0
  162. package/build/client/_app/immutable/chunks/D7vimbmk.js.gz +0 -0
  163. package/build/client/_app/immutable/chunks/DAqXSYzi.js +0 -1
  164. package/build/client/_app/immutable/chunks/DAqXSYzi.js.br +0 -0
  165. package/build/client/_app/immutable/chunks/DAqXSYzi.js.gz +0 -0
  166. package/build/client/_app/immutable/chunks/DGYKsRyW.js.br +0 -0
  167. package/build/client/_app/immutable/chunks/DGYKsRyW.js.gz +0 -0
  168. package/build/client/_app/immutable/chunks/DPaulGql.js +0 -1
  169. package/build/client/_app/immutable/chunks/DPaulGql.js.br +0 -1
  170. package/build/client/_app/immutable/chunks/DPaulGql.js.gz +0 -0
  171. package/build/client/_app/immutable/chunks/DQqLOGLe.js.br +0 -0
  172. package/build/client/_app/immutable/chunks/DQqLOGLe.js.gz +0 -0
  173. package/build/client/_app/immutable/chunks/DS3cLPAu.js.br +0 -0
  174. package/build/client/_app/immutable/chunks/DS3cLPAu.js.gz +0 -0
  175. package/build/client/_app/immutable/chunks/Db0q5_zr.js.br +0 -0
  176. package/build/client/_app/immutable/chunks/Db0q5_zr.js.gz +0 -0
  177. package/build/client/_app/immutable/chunks/Dfvzj6n2.js.br +0 -0
  178. package/build/client/_app/immutable/chunks/Dfvzj6n2.js.gz +0 -0
  179. package/build/client/_app/immutable/chunks/Dkh4Dwm8.js.br +0 -0
  180. package/build/client/_app/immutable/chunks/Dkh4Dwm8.js.gz +0 -0
  181. package/build/client/_app/immutable/chunks/DnqfXHAL.js +0 -15
  182. package/build/client/_app/immutable/chunks/DnqfXHAL.js.br +0 -0
  183. package/build/client/_app/immutable/chunks/DnqfXHAL.js.gz +0 -0
  184. package/build/client/_app/immutable/chunks/DsYron7_.js +0 -1
  185. package/build/client/_app/immutable/chunks/DsYron7_.js.br +0 -0
  186. package/build/client/_app/immutable/chunks/DsYron7_.js.gz +0 -0
  187. package/build/client/_app/immutable/chunks/DuM1cPdZ.js +0 -1
  188. package/build/client/_app/immutable/chunks/DuM1cPdZ.js.br +0 -0
  189. package/build/client/_app/immutable/chunks/DuM1cPdZ.js.gz +0 -0
  190. package/build/client/_app/immutable/chunks/DvxMaQv_.js.br +0 -0
  191. package/build/client/_app/immutable/chunks/DvxMaQv_.js.gz +0 -0
  192. package/build/client/_app/immutable/chunks/DwOZdLDj.js.br +0 -0
  193. package/build/client/_app/immutable/chunks/DwOZdLDj.js.gz +0 -0
  194. package/build/client/_app/immutable/chunks/HclGiUj8.js.br +0 -0
  195. package/build/client/_app/immutable/chunks/HclGiUj8.js.gz +0 -0
  196. package/build/client/_app/immutable/chunks/IlwbfbOu.js.br +0 -0
  197. package/build/client/_app/immutable/chunks/IlwbfbOu.js.gz +0 -0
  198. package/build/client/_app/immutable/chunks/RobXhXPM.js.br +0 -1
  199. package/build/client/_app/immutable/chunks/RobXhXPM.js.gz +0 -0
  200. package/build/client/_app/immutable/chunks/Y5urAfNy.js.br +0 -0
  201. package/build/client/_app/immutable/chunks/Y5urAfNy.js.gz +0 -0
  202. package/build/client/_app/immutable/chunks/aI_O2VuQ.js.br +0 -0
  203. package/build/client/_app/immutable/chunks/aI_O2VuQ.js.gz +0 -0
  204. package/build/client/_app/immutable/chunks/b77-bq1n.js.br +0 -0
  205. package/build/client/_app/immutable/chunks/b77-bq1n.js.gz +0 -0
  206. package/build/client/_app/immutable/chunks/dqF8mxBW.js.br +0 -0
  207. package/build/client/_app/immutable/chunks/dqF8mxBW.js.gz +0 -0
  208. package/build/client/_app/immutable/chunks/gkAHSOnS.js +0 -1
  209. package/build/client/_app/immutable/chunks/gkAHSOnS.js.br +0 -0
  210. package/build/client/_app/immutable/chunks/gkAHSOnS.js.gz +0 -0
  211. package/build/client/_app/immutable/chunks/pqiPC7Y8.js +0 -3
  212. package/build/client/_app/immutable/chunks/pqiPC7Y8.js.br +0 -0
  213. package/build/client/_app/immutable/chunks/pqiPC7Y8.js.gz +0 -0
  214. package/build/client/_app/immutable/chunks/ti8ecMFX.js +0 -1
  215. package/build/client/_app/immutable/chunks/ti8ecMFX.js.br +0 -0
  216. package/build/client/_app/immutable/chunks/ti8ecMFX.js.gz +0 -0
  217. package/build/client/_app/immutable/chunks/xihTtKlq.js.br +0 -1
  218. package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
  219. package/build/client/_app/immutable/chunks/yCfI4PCa.js.br +0 -0
  220. package/build/client/_app/immutable/chunks/yCfI4PCa.js.gz +0 -0
  221. package/build/client/_app/immutable/entry/app.CTR4aUFT.js +0 -2
  222. package/build/client/_app/immutable/entry/app.CTR4aUFT.js.br +0 -0
  223. package/build/client/_app/immutable/entry/app.CTR4aUFT.js.gz +0 -0
  224. package/build/client/_app/immutable/entry/start.CC6Ln8E2.js +0 -1
  225. package/build/client/_app/immutable/entry/start.CC6Ln8E2.js.br +0 -0
  226. package/build/client/_app/immutable/entry/start.CC6Ln8E2.js.gz +0 -0
  227. package/build/client/_app/immutable/nodes/0.CvUxmLsM.js +0 -1
  228. package/build/client/_app/immutable/nodes/0.CvUxmLsM.js.br +0 -0
  229. package/build/client/_app/immutable/nodes/0.CvUxmLsM.js.gz +0 -0
  230. package/build/client/_app/immutable/nodes/1.CbSHqfEx.js +0 -1
  231. package/build/client/_app/immutable/nodes/1.CbSHqfEx.js.br +0 -0
  232. package/build/client/_app/immutable/nodes/1.CbSHqfEx.js.gz +0 -0
  233. package/build/client/_app/immutable/nodes/2.DcD5v8dU.js +0 -5
  234. package/build/client/_app/immutable/nodes/2.DcD5v8dU.js.br +0 -0
  235. package/build/client/_app/immutable/nodes/2.DcD5v8dU.js.gz +0 -0
  236. package/build/client/_app/version.json.br +0 -0
  237. package/build/client/_app/version.json.gz +0 -0
  238. package/build/client/robots.txt.br +0 -0
  239. package/build/client/robots.txt.gz +0 -0
  240. package/build/env.js.map +0 -1
  241. package/build/handler.js.map +0 -1
  242. package/build/index.js.map +0 -1
  243. package/build/server/chunks/chunks/Arc.canvas.js-CN0KDoHG.js +0 -701
  244. package/build/server/chunks/chunks/Arc.canvas.js-CN0KDoHG.js.map +0 -1
  245. package/build/server/chunks/chunks/Arc.js-C8EC9NoE.js +0 -31
  246. package/build/server/chunks/chunks/Arc.js-C8EC9NoE.js.map +0 -1
  247. package/build/server/chunks/chunks/Bar.js-DtAb3LZZ.js +0 -448
  248. package/build/server/chunks/chunks/Bar.js-DtAb3LZZ.js.map +0 -1
  249. package/build/server/chunks/chunks/ChartAnnotations.js-twzDSVzY.js +0 -983
  250. package/build/server/chunks/chunks/ChartAnnotations.js-twzDSVzY.js.map +0 -1
  251. package/build/server/chunks/chunks/Circle.html.js-BJywADGK.js +0 -355
  252. package/build/server/chunks/chunks/Circle.html.js-BJywADGK.js.map +0 -1
  253. package/build/server/chunks/chunks/ClipPath.canvas.js-9Fc0bTEM.js +0 -170
  254. package/build/server/chunks/chunks/ClipPath.canvas.js-9Fc0bTEM.js.map +0 -1
  255. package/build/server/chunks/chunks/DefaultTooltip.js-C2NWK2AD.js +0 -352
  256. package/build/server/chunks/chunks/DefaultTooltip.js-C2NWK2AD.js.map +0 -1
  257. package/build/server/chunks/chunks/EventScatter.js-CO2GonW-.js +0 -7370
  258. package/build/server/chunks/chunks/EventScatter.js-CO2GonW-.js.map +0 -1
  259. package/build/server/chunks/chunks/Labels.js-DB9qoyZ3.js +0 -497
  260. package/build/server/chunks/chunks/Labels.js-DB9qoyZ3.js.map +0 -1
  261. package/build/server/chunks/chunks/Legend.js-B_ArjxQ7.js +0 -343
  262. package/build/server/chunks/chunks/Legend.js-B_ArjxQ7.js.map +0 -1
  263. package/build/server/chunks/chunks/Line.html.js-B1REcOFe.js +0 -423
  264. package/build/server/chunks/chunks/Line.html.js-B1REcOFe.js.map +0 -1
  265. package/build/server/chunks/chunks/Link.canvas.js-nWimAHfH.js +0 -756
  266. package/build/server/chunks/chunks/Link.canvas.js-nWimAHfH.js.map +0 -1
  267. package/build/server/chunks/chunks/Path.canvas.js-5A9wB8zQ.js +0 -1259
  268. package/build/server/chunks/chunks/Path.canvas.js-5A9wB8zQ.js.map +0 -1
  269. package/build/server/chunks/chunks/Points.html.js-B2o3k-ZZ.js +0 -228
  270. package/build/server/chunks/chunks/Points.html.js-B2o3k-ZZ.js.map +0 -1
  271. package/build/server/chunks/chunks/Points.js-D7ozN9W5.js +0 -14
  272. package/build/server/chunks/chunks/Points.js-D7ozN9W5.js.map +0 -1
  273. package/build/server/chunks/chunks/Points2.js-BVbWugLT.js +0 -25
  274. package/build/server/chunks/chunks/Points2.js-BVbWugLT.js.map +0 -1
  275. package/build/server/chunks/chunks/Rect.html.js-DnQ6ObhQ.js +0 -547
  276. package/build/server/chunks/chunks/Rect.html.js-DnQ6ObhQ.js.map +0 -1
  277. package/build/server/chunks/chunks/Spline.js-YnAxvrKY.js +0 -516
  278. package/build/server/chunks/chunks/Spline.js-YnAxvrKY.js.map +0 -1
  279. package/build/server/chunks/chunks/Text.html.js-LbmYJb11.js +0 -847
  280. package/build/server/chunks/chunks/Text.html.js-LbmYJb11.js.map +0 -1
  281. package/build/server/chunks/chunks/TooltipItem.js-Ce-blieA.js +0 -314
  282. package/build/server/chunks/chunks/TooltipItem.js-Ce-blieA.js.map +0 -1
  283. package/build/server/chunks/chunks/Voronoi.js-CalFJAXH.js +0 -2052
  284. package/build/server/chunks/chunks/Voronoi.js-CalFJAXH.js.map +0 -1
  285. package/build/server/chunks/chunks/archive.js-D2jtMmDo.js.map +0 -1
  286. package/build/server/chunks/chunks/array.js-CBp0H4t3.js +0 -8
  287. package/build/server/chunks/chunks/array.js-CBp0H4t3.js.map +0 -1
  288. package/build/server/chunks/chunks/attributes.js-CbKEpZKa.js +0 -25
  289. package/build/server/chunks/chunks/attributes.js-CbKEpZKa.js.map +0 -1
  290. package/build/server/chunks/chunks/band.js-CjzHWr4k.js +0 -155
  291. package/build/server/chunks/chunks/band.js-CjzHWr4k.js.map +0 -1
  292. package/build/server/chunks/chunks/centroid.js-BnGN3LH0.js +0 -1356
  293. package/build/server/chunks/chunks/centroid.js-BnGN3LH0.js.map +0 -1
  294. package/build/server/chunks/chunks/common.js-BvQnfkFo.js +0 -5760
  295. package/build/server/chunks/chunks/common.js-BvQnfkFo.js.map +0 -1
  296. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js.map +0 -1
  297. package/build/server/chunks/chunks/env2.js-C5BgBJDY.js.map +0 -1
  298. package/build/server/chunks/chunks/events.js-zIVaXIP1.js +0 -95
  299. package/build/server/chunks/chunks/events.js-zIVaXIP1.js.map +0 -1
  300. package/build/server/chunks/chunks/exports.js-ClPPfcHj.js.map +0 -1
  301. package/build/server/chunks/chunks/group.js-D0SfevId.js +0 -30
  302. package/build/server/chunks/chunks/group.js-D0SfevId.js.map +0 -1
  303. package/build/server/chunks/chunks/identity.js-NmGXxBz3.js.map +0 -1
  304. package/build/server/chunks/chunks/index-server.js-CtH9Hqwf.js.map +0 -1
  305. package/build/server/chunks/chunks/index-server2.js-l0sNRNKZ.js +0 -2
  306. package/build/server/chunks/chunks/index-server2.js-l0sNRNKZ.js.map +0 -1
  307. package/build/server/chunks/chunks/internal.js-DZ8ZzzjN.js.map +0 -1
  308. package/build/server/chunks/chunks/internal2.js-CfVVfAb5.js +0 -188
  309. package/build/server/chunks/chunks/internal2.js-CfVVfAb5.js.map +0 -1
  310. package/build/server/chunks/chunks/key.svelte.js-Cq0L6YlN.js +0 -695
  311. package/build/server/chunks/chunks/key.svelte.js-Cq0L6YlN.js.map +0 -1
  312. package/build/server/chunks/chunks/legacy-client.js-DAqKExQD.js.map +0 -1
  313. package/build/server/chunks/chunks/level-filter.js-D9MNrew3.js.map +0 -1
  314. package/build/server/chunks/chunks/lineRadial.js-B7ZNP_Jp.js +0 -126
  315. package/build/server/chunks/chunks/lineRadial.js-B7ZNP_Jp.js.map +0 -1
  316. package/build/server/chunks/chunks/linear.js-CHlwr1I4.js +0 -1046
  317. package/build/server/chunks/chunks/linear.js-CHlwr1I4.js.map +0 -1
  318. package/build/server/chunks/chunks/log-buffer.js-A9FA-Qv8.js.map +0 -1
  319. package/build/server/chunks/chunks/math.js-BqujbaBs.js +0 -50
  320. package/build/server/chunks/chunks/math.js-BqujbaBs.js.map +0 -1
  321. package/build/server/chunks/chunks/max.js-CuS0BpRI.js +0 -11
  322. package/build/server/chunks/chunks/max.js-CuS0BpRI.js.map +0 -1
  323. package/build/server/chunks/chunks/min.js-DZWt5tPl.js +0 -11
  324. package/build/server/chunks/chunks/min.js-DZWt5tPl.js.map +0 -1
  325. package/build/server/chunks/chunks/motion.svelte.js-Crk8ri1u.js +0 -677
  326. package/build/server/chunks/chunks/motion.svelte.js-Crk8ri1u.js.map +0 -1
  327. package/build/server/chunks/chunks/occlusion.js-ot9_OqWn.js +0 -33
  328. package/build/server/chunks/chunks/occlusion.js-ot9_OqWn.js.map +0 -1
  329. package/build/server/chunks/chunks/path.js-BizMrlzb.js +0 -488
  330. package/build/server/chunks/chunks/path.js-BizMrlzb.js.map +0 -1
  331. package/build/server/chunks/chunks/path2.js-DLVU8nc9.js +0 -27
  332. package/build/server/chunks/chunks/path2.js-DLVU8nc9.js.map +0 -1
  333. package/build/server/chunks/chunks/pointRadial.js-Deeu1LXx.js +0 -7
  334. package/build/server/chunks/chunks/pointRadial.js-Deeu1LXx.js.map +0 -1
  335. package/build/server/chunks/chunks/rect.svelte.js-_0PgI5fe.js +0 -187
  336. package/build/server/chunks/chunks/rect.svelte.js-_0PgI5fe.js.map +0 -1
  337. package/build/server/chunks/chunks/regions.js-COf7DgnH.js.map +0 -1
  338. package/build/server/chunks/chunks/scales.svelte.js-DeNkKcI-.js +0 -276
  339. package/build/server/chunks/chunks/scales.svelte.js-DeNkKcI-.js.map +0 -1
  340. package/build/server/chunks/chunks/series-buckets.js-C-vMEJT2.js +0 -316
  341. package/build/server/chunks/chunks/series-buckets.js-C-vMEJT2.js.map +0 -1
  342. package/build/server/chunks/chunks/shared-server.js-Dn5XheXH.js.map +0 -1
  343. package/build/server/chunks/chunks/shared.js-CgjUIvRK.js.map +0 -1
  344. package/build/server/chunks/chunks/source.js-DZEVvuho.js.map +0 -1
  345. package/build/server/chunks/chunks/state.js-i-NVNGIq.js.map +0 -1
  346. package/build/server/chunks/chunks/time-range.js-BLMT8aU3.js.map +0 -1
  347. package/build/server/chunks/chunks/types.js-x3GyGPOz.js +0 -11
  348. package/build/server/chunks/chunks/types.js-x3GyGPOz.js.map +0 -1
  349. package/build/server/chunks/chunks/uneval.js-DaakSYFQ.js.map +0 -1
  350. package/build/server/chunks/chunks/utils.js-BIlHjgGW.js.map +0 -1
  351. package/build/server/chunks/entries/endpoints/api/archive/_server.ts.js-C4hWyXuu.js.map +0 -1
  352. package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-C5tfrpmC.js.map +0 -1
  353. package/build/server/chunks/entries/endpoints/api/identity/_server.ts.js-PWRPScuN.js.map +0 -1
  354. package/build/server/chunks/entries/endpoints/api/log-groups/_server.ts.js-D4y43Vwe.js.map +0 -1
  355. package/build/server/chunks/entries/endpoints/api/regions/_server.ts.js-9_g0ojki.js.map +0 -1
  356. package/build/server/chunks/entries/endpoints/api/series/_server.ts.js-DibT3Hjc.js.map +0 -1
  357. package/build/server/chunks/entries/endpoints/api/stream/_server.ts.js-BxXw5K0R.js.map +0 -1
  358. package/build/server/chunks/entries/fallbacks/error.svelte.js-ylsqA41Y.js.map +0 -1
  359. package/build/server/chunks/entries/pages/_layout.svelte.js-D7sAdBVX.js +0 -113
  360. package/build/server/chunks/entries/pages/_layout.svelte.js-D7sAdBVX.js.map +0 -1
  361. package/build/server/chunks/entries/pages/_page.svelte.js-C9-7d7mD.js.map +0 -1
  362. package/build/server/chunks/handler-Bqo8aDgP.js.map +0 -1
  363. package/build/server/chunks/index.js-fPvMujCL.js.map +0 -1
  364. package/build/server/chunks/manifest.js-Bkj-8GaD.js.map +0 -1
  365. package/build/server/chunks/nodes/0.js-7J6kXnEo.js +0 -9
  366. package/build/server/chunks/nodes/0.js-7J6kXnEo.js.map +0 -1
  367. package/build/server/chunks/nodes/1.js-DZXnUx67.js +0 -9
  368. package/build/server/chunks/nodes/1.js-DZXnUx67.js.map +0 -1
  369. package/build/server/chunks/nodes/2.js-85y9-1SS.js +0 -9
  370. package/build/server/chunks/nodes/2.js-85y9-1SS.js.map +0 -1
  371. package/build/shims.js.map +0 -1
@@ -1,1356 +0,0 @@
1
- //#region node_modules/.pnpm/robust-predicates@3.0.3/node_modules/robust-predicates/esm/util.js
2
- var epsilon$1 = 11102230246251565e-32;
3
- var splitter = 134217729;
4
- var resulterrbound = 3.000000000000001 * epsilon$1;
5
- function sum(elen, e, flen, f, h) {
6
- let Q, Qnew, hh, bvirt;
7
- let enow = e[0];
8
- let fnow = f[0];
9
- let eindex = 0;
10
- let findex = 0;
11
- if (fnow > enow === fnow > -enow) {
12
- Q = enow;
13
- enow = e[++eindex];
14
- } else {
15
- Q = fnow;
16
- fnow = f[++findex];
17
- }
18
- let hindex = 0;
19
- if (eindex < elen && findex < flen) {
20
- if (fnow > enow === fnow > -enow) {
21
- Qnew = enow + Q;
22
- hh = Q - (Qnew - enow);
23
- enow = e[++eindex];
24
- } else {
25
- Qnew = fnow + Q;
26
- hh = Q - (Qnew - fnow);
27
- fnow = f[++findex];
28
- }
29
- Q = Qnew;
30
- if (hh !== 0) h[hindex++] = hh;
31
- while (eindex < elen && findex < flen) {
32
- if (fnow > enow === fnow > -enow) {
33
- Qnew = Q + enow;
34
- bvirt = Qnew - Q;
35
- hh = Q - (Qnew - bvirt) + (enow - bvirt);
36
- enow = e[++eindex];
37
- } else {
38
- Qnew = Q + fnow;
39
- bvirt = Qnew - Q;
40
- hh = Q - (Qnew - bvirt) + (fnow - bvirt);
41
- fnow = f[++findex];
42
- }
43
- Q = Qnew;
44
- if (hh !== 0) h[hindex++] = hh;
45
- }
46
- }
47
- while (eindex < elen) {
48
- Qnew = Q + enow;
49
- bvirt = Qnew - Q;
50
- hh = Q - (Qnew - bvirt) + (enow - bvirt);
51
- enow = e[++eindex];
52
- Q = Qnew;
53
- if (hh !== 0) h[hindex++] = hh;
54
- }
55
- while (findex < flen) {
56
- Qnew = Q + fnow;
57
- bvirt = Qnew - Q;
58
- hh = Q - (Qnew - bvirt) + (fnow - bvirt);
59
- fnow = f[++findex];
60
- Q = Qnew;
61
- if (hh !== 0) h[hindex++] = hh;
62
- }
63
- if (Q !== 0 || hindex === 0) h[hindex++] = Q;
64
- return hindex;
65
- }
66
- function estimate(elen, e) {
67
- let Q = e[0];
68
- for (let i = 1; i < elen; i++) Q += e[i];
69
- return Q;
70
- }
71
- function vec(n) {
72
- return new Float64Array(n);
73
- }
74
- //#endregion
75
- //#region node_modules/.pnpm/robust-predicates@3.0.3/node_modules/robust-predicates/esm/orient2d.js
76
- var ccwerrboundA = (3 + 16 * epsilon$1) * epsilon$1;
77
- var ccwerrboundB = (2 + 12 * epsilon$1) * epsilon$1;
78
- var ccwerrboundC = (9 + 64 * epsilon$1) * epsilon$1 * epsilon$1;
79
- var B = vec(4);
80
- var C1 = vec(8);
81
- var C2 = vec(12);
82
- var D = vec(16);
83
- var u$2 = vec(4);
84
- function orient2dadapt(ax, ay, bx, by, cx, cy, detsum) {
85
- let acxtail, acytail, bcxtail, bcytail;
86
- let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;
87
- const acx = ax - cx;
88
- const bcx = bx - cx;
89
- const acy = ay - cy;
90
- const bcy = by - cy;
91
- s1 = acx * bcy;
92
- c = splitter * acx;
93
- ahi = c - (c - acx);
94
- alo = acx - ahi;
95
- c = splitter * bcy;
96
- bhi = c - (c - bcy);
97
- blo = bcy - bhi;
98
- s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);
99
- t1 = acy * bcx;
100
- c = splitter * acy;
101
- ahi = c - (c - acy);
102
- alo = acy - ahi;
103
- c = splitter * bcx;
104
- bhi = c - (c - bcx);
105
- blo = bcx - bhi;
106
- t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);
107
- _i = s0 - t0;
108
- bvirt = s0 - _i;
109
- B[0] = s0 - (_i + bvirt) + (bvirt - t0);
110
- _j = s1 + _i;
111
- bvirt = _j - s1;
112
- _0 = s1 - (_j - bvirt) + (_i - bvirt);
113
- _i = _0 - t1;
114
- bvirt = _0 - _i;
115
- B[1] = _0 - (_i + bvirt) + (bvirt - t1);
116
- u3 = _j + _i;
117
- bvirt = u3 - _j;
118
- B[2] = _j - (u3 - bvirt) + (_i - bvirt);
119
- B[3] = u3;
120
- let det = estimate(4, B);
121
- let errbound = ccwerrboundB * detsum;
122
- if (det >= errbound || -det >= errbound) return det;
123
- bvirt = ax - acx;
124
- acxtail = ax - (acx + bvirt) + (bvirt - cx);
125
- bvirt = bx - bcx;
126
- bcxtail = bx - (bcx + bvirt) + (bvirt - cx);
127
- bvirt = ay - acy;
128
- acytail = ay - (acy + bvirt) + (bvirt - cy);
129
- bvirt = by - bcy;
130
- bcytail = by - (bcy + bvirt) + (bvirt - cy);
131
- if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) return det;
132
- errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det);
133
- det += acx * bcytail + bcy * acxtail - (acy * bcxtail + bcx * acytail);
134
- if (det >= errbound || -det >= errbound) return det;
135
- s1 = acxtail * bcy;
136
- c = splitter * acxtail;
137
- ahi = c - (c - acxtail);
138
- alo = acxtail - ahi;
139
- c = splitter * bcy;
140
- bhi = c - (c - bcy);
141
- blo = bcy - bhi;
142
- s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);
143
- t1 = acytail * bcx;
144
- c = splitter * acytail;
145
- ahi = c - (c - acytail);
146
- alo = acytail - ahi;
147
- c = splitter * bcx;
148
- bhi = c - (c - bcx);
149
- blo = bcx - bhi;
150
- t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);
151
- _i = s0 - t0;
152
- bvirt = s0 - _i;
153
- u$2[0] = s0 - (_i + bvirt) + (bvirt - t0);
154
- _j = s1 + _i;
155
- bvirt = _j - s1;
156
- _0 = s1 - (_j - bvirt) + (_i - bvirt);
157
- _i = _0 - t1;
158
- bvirt = _0 - _i;
159
- u$2[1] = _0 - (_i + bvirt) + (bvirt - t1);
160
- u3 = _j + _i;
161
- bvirt = u3 - _j;
162
- u$2[2] = _j - (u3 - bvirt) + (_i - bvirt);
163
- u$2[3] = u3;
164
- const C1len = sum(4, B, 4, u$2, C1);
165
- s1 = acx * bcytail;
166
- c = splitter * acx;
167
- ahi = c - (c - acx);
168
- alo = acx - ahi;
169
- c = splitter * bcytail;
170
- bhi = c - (c - bcytail);
171
- blo = bcytail - bhi;
172
- s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);
173
- t1 = acy * bcxtail;
174
- c = splitter * acy;
175
- ahi = c - (c - acy);
176
- alo = acy - ahi;
177
- c = splitter * bcxtail;
178
- bhi = c - (c - bcxtail);
179
- blo = bcxtail - bhi;
180
- t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);
181
- _i = s0 - t0;
182
- bvirt = s0 - _i;
183
- u$2[0] = s0 - (_i + bvirt) + (bvirt - t0);
184
- _j = s1 + _i;
185
- bvirt = _j - s1;
186
- _0 = s1 - (_j - bvirt) + (_i - bvirt);
187
- _i = _0 - t1;
188
- bvirt = _0 - _i;
189
- u$2[1] = _0 - (_i + bvirt) + (bvirt - t1);
190
- u3 = _j + _i;
191
- bvirt = u3 - _j;
192
- u$2[2] = _j - (u3 - bvirt) + (_i - bvirt);
193
- u$2[3] = u3;
194
- const C2len = sum(C1len, C1, 4, u$2, C2);
195
- s1 = acxtail * bcytail;
196
- c = splitter * acxtail;
197
- ahi = c - (c - acxtail);
198
- alo = acxtail - ahi;
199
- c = splitter * bcytail;
200
- bhi = c - (c - bcytail);
201
- blo = bcytail - bhi;
202
- s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);
203
- t1 = acytail * bcxtail;
204
- c = splitter * acytail;
205
- ahi = c - (c - acytail);
206
- alo = acytail - ahi;
207
- c = splitter * bcxtail;
208
- bhi = c - (c - bcxtail);
209
- blo = bcxtail - bhi;
210
- t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);
211
- _i = s0 - t0;
212
- bvirt = s0 - _i;
213
- u$2[0] = s0 - (_i + bvirt) + (bvirt - t0);
214
- _j = s1 + _i;
215
- bvirt = _j - s1;
216
- _0 = s1 - (_j - bvirt) + (_i - bvirt);
217
- _i = _0 - t1;
218
- bvirt = _0 - _i;
219
- u$2[1] = _0 - (_i + bvirt) + (bvirt - t1);
220
- u3 = _j + _i;
221
- bvirt = u3 - _j;
222
- u$2[2] = _j - (u3 - bvirt) + (_i - bvirt);
223
- u$2[3] = u3;
224
- return D[sum(C2len, C2, 4, u$2, D) - 1];
225
- }
226
- function orient2d(ax, ay, bx, by, cx, cy) {
227
- const detleft = (ay - cy) * (bx - cx);
228
- const detright = (ax - cx) * (by - cy);
229
- const det = detleft - detright;
230
- const detsum = Math.abs(detleft + detright);
231
- if (Math.abs(det) >= ccwerrboundA * detsum) return det;
232
- return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);
233
- }
234
- //#endregion
235
- //#region node_modules/.pnpm/delaunator@5.1.0/node_modules/delaunator/index.js
236
- var EPSILON = Math.pow(2, -52);
237
- var EDGE_STACK = /* @__PURE__ */ new Uint32Array(512);
238
- /** @template {ArrayLike<number>} T */
239
- var Delaunator = class Delaunator {
240
- /**
241
- * Constructs a delaunay triangulation object given an array of points (`[x, y]` by default).
242
- * `getX` and `getY` are optional functions of the form `(point) => value` for custom point formats.
243
- *
244
- * @template P
245
- * @param {P[]} points
246
- * @param {(p: P) => number} [getX]
247
- * @param {(p: P) => number} [getY]
248
- */
249
- static from(points, getX = defaultGetX, getY = defaultGetY) {
250
- const n = points.length;
251
- const coords = new Float64Array(n * 2);
252
- for (let i = 0; i < n; i++) {
253
- const p = points[i];
254
- coords[2 * i] = getX(p);
255
- coords[2 * i + 1] = getY(p);
256
- }
257
- return new Delaunator(coords);
258
- }
259
- /**
260
- * Constructs a delaunay triangulation object given an array of point coordinates of the form:
261
- * `[x0, y0, x1, y1, ...]` (use a typed array for best performance). Duplicate points are skipped.
262
- *
263
- * @param {T} coords
264
- */
265
- constructor(coords) {
266
- const n = coords.length >> 1;
267
- if (n > 0 && typeof coords[0] !== "number") throw new Error("Expected coords to contain numbers.");
268
- this.coords = coords;
269
- const maxTriangles = Math.max(2 * n - 5, 0);
270
- /** @private */ this._triangles = new Uint32Array(maxTriangles * 3);
271
- /** @private */ this._halfedges = new Int32Array(maxTriangles * 3);
272
- /** @private */ this._hashSize = Math.ceil(Math.sqrt(n));
273
- /** @private */ this._hullPrev = new Uint32Array(n);
274
- /** @private */ this._hullNext = new Uint32Array(n);
275
- /** @private */ this._hullTri = new Uint32Array(n);
276
- /** @private */ this._hullHash = new Int32Array(this._hashSize);
277
- /** @private */ this._ids = new Uint32Array(n);
278
- /** @private */ this._dists = new Float64Array(n);
279
- /** @private */ this.trianglesLen = 0;
280
- /** @private */ this._cx = 0;
281
- /** @private */ this._cy = 0;
282
- /** @private */ this._hullStart = 0;
283
- /** A `Uint32Array` array of indices that reference points on the convex hull of the input data, counter-clockwise. */
284
- this.hull = this._triangles;
285
- /** A `Uint32Array` array of triangle vertex indices (each group of three numbers forms a triangle). All triangles are directed counterclockwise. */
286
- this.triangles = this._triangles;
287
- /**
288
- * A `Int32Array` array of triangle half-edge indices that allows you to traverse the triangulation.
289
- * `i`-th half-edge in the array corresponds to vertex `triangles[i]` the half-edge is coming from.
290
- * `halfedges[i]` is the index of a twin half-edge in an adjacent triangle (or `-1` for outer half-edges on the convex hull).
291
- */
292
- this.halfedges = this._halfedges;
293
- this.update();
294
- }
295
- /**
296
- * Updates the triangulation if you modified `delaunay.coords` values in place, avoiding expensive memory allocations.
297
- * Useful for iterative relaxation algorithms such as Lloyd's.
298
- */
299
- update() {
300
- const { coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash } = this;
301
- const n = coords.length >> 1;
302
- let minX = Infinity;
303
- let minY = Infinity;
304
- let maxX = -Infinity;
305
- let maxY = -Infinity;
306
- for (let i = 0; i < n; i++) {
307
- const x = coords[2 * i];
308
- const y = coords[2 * i + 1];
309
- if (x < minX) minX = x;
310
- if (y < minY) minY = y;
311
- if (x > maxX) maxX = x;
312
- if (y > maxY) maxY = y;
313
- this._ids[i] = i;
314
- }
315
- const cx = (minX + maxX) / 2;
316
- const cy = (minY + maxY) / 2;
317
- let i0 = 0, i1 = 0, i2 = 0;
318
- for (let i = 0, minDist = Infinity; i < n; i++) {
319
- const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]);
320
- if (d < minDist) {
321
- i0 = i;
322
- minDist = d;
323
- }
324
- }
325
- const i0x = coords[2 * i0];
326
- const i0y = coords[2 * i0 + 1];
327
- for (let i = 0, minDist = Infinity; i < n; i++) {
328
- if (i === i0) continue;
329
- const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]);
330
- if (d < minDist && d > 0) {
331
- i1 = i;
332
- minDist = d;
333
- }
334
- }
335
- let i1x = coords[2 * i1];
336
- let i1y = coords[2 * i1 + 1];
337
- let minRadius = Infinity;
338
- for (let i = 0; i < n; i++) {
339
- if (i === i0 || i === i1) continue;
340
- const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]);
341
- if (r < minRadius) {
342
- i2 = i;
343
- minRadius = r;
344
- }
345
- }
346
- let i2x = coords[2 * i2];
347
- let i2y = coords[2 * i2 + 1];
348
- if (minRadius === Infinity) {
349
- for (let i = 0; i < n; i++) this._dists[i] = coords[2 * i] - coords[0] || coords[2 * i + 1] - coords[1];
350
- quicksort(this._ids, this._dists, 0, n - 1);
351
- const hull = new Uint32Array(n);
352
- let j = 0;
353
- for (let i = 0, d0 = -Infinity; i < n; i++) {
354
- const id = this._ids[i];
355
- const d = this._dists[id];
356
- if (d > d0) {
357
- hull[j++] = id;
358
- d0 = d;
359
- }
360
- }
361
- this.hull = hull.subarray(0, j);
362
- this.triangles = /* @__PURE__ */ new Uint32Array(0);
363
- this.halfedges = /* @__PURE__ */ new Int32Array(0);
364
- return;
365
- }
366
- if (orient2d(i0x, i0y, i1x, i1y, i2x, i2y) < 0) {
367
- const i = i1;
368
- const x = i1x;
369
- const y = i1y;
370
- i1 = i2;
371
- i1x = i2x;
372
- i1y = i2y;
373
- i2 = i;
374
- i2x = x;
375
- i2y = y;
376
- }
377
- const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y);
378
- this._cx = center.x;
379
- this._cy = center.y;
380
- for (let i = 0; i < n; i++) this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y);
381
- quicksort(this._ids, this._dists, 0, n - 1);
382
- this._hullStart = i0;
383
- let hullSize = 3;
384
- hullNext[i0] = hullPrev[i2] = i1;
385
- hullNext[i1] = hullPrev[i0] = i2;
386
- hullNext[i2] = hullPrev[i1] = i0;
387
- hullTri[i0] = 0;
388
- hullTri[i1] = 1;
389
- hullTri[i2] = 2;
390
- hullHash.fill(-1);
391
- hullHash[this._hashKey(i0x, i0y)] = i0;
392
- hullHash[this._hashKey(i1x, i1y)] = i1;
393
- hullHash[this._hashKey(i2x, i2y)] = i2;
394
- this.trianglesLen = 0;
395
- this._addTriangle(i0, i1, i2, -1, -1, -1);
396
- for (let k = 0, xp = 0, yp = 0; k < this._ids.length; k++) {
397
- const i = this._ids[k];
398
- const x = coords[2 * i];
399
- const y = coords[2 * i + 1];
400
- if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue;
401
- xp = x;
402
- yp = y;
403
- if (i === i0 || i === i1 || i === i2) continue;
404
- let start = 0;
405
- for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) {
406
- start = hullHash[(key + j) % this._hashSize];
407
- if (start !== -1 && start !== hullNext[start]) break;
408
- }
409
- start = hullPrev[start];
410
- let e = start, q;
411
- while (q = hullNext[e], orient2d(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1]) >= 0) {
412
- e = q;
413
- if (e === start) {
414
- e = -1;
415
- break;
416
- }
417
- }
418
- if (e === -1) continue;
419
- let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]);
420
- hullTri[i] = this._legalize(t + 2);
421
- hullTri[e] = t;
422
- hullSize++;
423
- let n = hullNext[e];
424
- while (q = hullNext[n], orient2d(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1]) < 0) {
425
- t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]);
426
- hullTri[i] = this._legalize(t + 2);
427
- hullNext[n] = n;
428
- hullSize--;
429
- n = q;
430
- }
431
- if (e === start) while (q = hullPrev[e], orient2d(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1]) < 0) {
432
- t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]);
433
- this._legalize(t + 2);
434
- hullTri[q] = t;
435
- hullNext[e] = e;
436
- hullSize--;
437
- e = q;
438
- }
439
- this._hullStart = hullPrev[i] = e;
440
- hullNext[e] = hullPrev[n] = i;
441
- hullNext[i] = n;
442
- hullHash[this._hashKey(x, y)] = i;
443
- hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e;
444
- }
445
- this.hull = new Uint32Array(hullSize);
446
- for (let i = 0, e = this._hullStart; i < hullSize; i++) {
447
- this.hull[i] = e;
448
- e = hullNext[e];
449
- }
450
- this.triangles = this._triangles.subarray(0, this.trianglesLen);
451
- this.halfedges = this._halfedges.subarray(0, this.trianglesLen);
452
- }
453
- /**
454
- * Calculate an angle-based key for the edge hash used for advancing convex hull.
455
- *
456
- * @param {number} x
457
- * @param {number} y
458
- * @private
459
- */
460
- _hashKey(x, y) {
461
- return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize;
462
- }
463
- /**
464
- * Flip an edge in a pair of triangles if it doesn't satisfy the Delaunay condition.
465
- *
466
- * @param {number} a
467
- * @private
468
- */
469
- _legalize(a) {
470
- const { _triangles: triangles, _halfedges: halfedges, coords } = this;
471
- let i = 0;
472
- let ar = 0;
473
- while (true) {
474
- const b = halfedges[a];
475
- const a0 = a - a % 3;
476
- ar = a0 + (a + 2) % 3;
477
- if (b === -1) {
478
- if (i === 0) break;
479
- a = EDGE_STACK[--i];
480
- continue;
481
- }
482
- const b0 = b - b % 3;
483
- const al = a0 + (a + 1) % 3;
484
- const bl = b0 + (b + 2) % 3;
485
- const p0 = triangles[ar];
486
- const pr = triangles[a];
487
- const pl = triangles[al];
488
- const p1 = triangles[bl];
489
- if (inCircle(coords[2 * p0], coords[2 * p0 + 1], coords[2 * pr], coords[2 * pr + 1], coords[2 * pl], coords[2 * pl + 1], coords[2 * p1], coords[2 * p1 + 1])) {
490
- triangles[a] = p1;
491
- triangles[b] = p0;
492
- const hbl = halfedges[bl];
493
- if (hbl === -1) {
494
- let e = this._hullStart;
495
- do {
496
- if (this._hullTri[e] === bl) {
497
- this._hullTri[e] = a;
498
- break;
499
- }
500
- e = this._hullPrev[e];
501
- } while (e !== this._hullStart);
502
- }
503
- this._link(a, hbl);
504
- this._link(b, halfedges[ar]);
505
- this._link(ar, bl);
506
- const br = b0 + (b + 1) % 3;
507
- if (i < EDGE_STACK.length) EDGE_STACK[i++] = br;
508
- } else {
509
- if (i === 0) break;
510
- a = EDGE_STACK[--i];
511
- }
512
- }
513
- return ar;
514
- }
515
- /**
516
- * Link two half-edges to each other.
517
- * @param {number} a
518
- * @param {number} b
519
- * @private
520
- */
521
- _link(a, b) {
522
- this._halfedges[a] = b;
523
- if (b !== -1) this._halfedges[b] = a;
524
- }
525
- /**
526
- * Add a new triangle given vertex indices and adjacent half-edge ids.
527
- *
528
- * @param {number} i0
529
- * @param {number} i1
530
- * @param {number} i2
531
- * @param {number} a
532
- * @param {number} b
533
- * @param {number} c
534
- * @private
535
- */
536
- _addTriangle(i0, i1, i2, a, b, c) {
537
- const t = this.trianglesLen;
538
- this._triangles[t] = i0;
539
- this._triangles[t + 1] = i1;
540
- this._triangles[t + 2] = i2;
541
- this._link(t, a);
542
- this._link(t + 1, b);
543
- this._link(t + 2, c);
544
- this.trianglesLen += 3;
545
- return t;
546
- }
547
- };
548
- /**
549
- * Monotonically increases with real angle, but doesn't need expensive trigonometry.
550
- *
551
- * @param {number} dx
552
- * @param {number} dy
553
- */
554
- function pseudoAngle(dx, dy) {
555
- const p = dx / (Math.abs(dx) + Math.abs(dy));
556
- return (dy > 0 ? 3 - p : 1 + p) / 4;
557
- }
558
- /**
559
- * Squared distance between two points.
560
- *
561
- * @param {number} ax
562
- * @param {number} ay
563
- * @param {number} bx
564
- * @param {number} by
565
- */
566
- function dist(ax, ay, bx, by) {
567
- const dx = ax - bx;
568
- const dy = ay - by;
569
- return dx * dx + dy * dy;
570
- }
571
- /**
572
- * Check whether point P is inside a circle formed by points A, B, C.
573
- *
574
- * @param {number} ax
575
- * @param {number} ay
576
- * @param {number} bx
577
- * @param {number} by
578
- * @param {number} cx
579
- * @param {number} cy
580
- * @param {number} px
581
- * @param {number} py
582
- */
583
- function inCircle(ax, ay, bx, by, cx, cy, px, py) {
584
- const dx = ax - px;
585
- const dy = ay - py;
586
- const ex = bx - px;
587
- const ey = by - py;
588
- const fx = cx - px;
589
- const fy = cy - py;
590
- const ap = dx * dx + dy * dy;
591
- const bp = ex * ex + ey * ey;
592
- const cp = fx * fx + fy * fy;
593
- return dx * (ey * cp - bp * fy) - dy * (ex * cp - bp * fx) + ap * (ex * fy - ey * fx) < 0;
594
- }
595
- /**
596
- * Squared radius of the circle formed by points A, B, C.
597
- *
598
- * @param {number} ax
599
- * @param {number} ay
600
- * @param {number} bx
601
- * @param {number} by
602
- * @param {number} cx
603
- * @param {number} cy
604
- */
605
- function circumradius(ax, ay, bx, by, cx, cy) {
606
- const dx = bx - ax;
607
- const dy = by - ay;
608
- const ex = cx - ax;
609
- const ey = cy - ay;
610
- const bl = dx * dx + dy * dy;
611
- const cl = ex * ex + ey * ey;
612
- const d = .5 / (dx * ey - dy * ex);
613
- const x = (ey * bl - dy * cl) * d;
614
- const y = (dx * cl - ex * bl) * d;
615
- return x * x + y * y;
616
- }
617
- /**
618
- * Get coordinates of a circumcenter for points A, B, C.
619
- *
620
- * @param {number} ax
621
- * @param {number} ay
622
- * @param {number} bx
623
- * @param {number} by
624
- * @param {number} cx
625
- * @param {number} cy
626
- */
627
- function circumcenter(ax, ay, bx, by, cx, cy) {
628
- const dx = bx - ax;
629
- const dy = by - ay;
630
- const ex = cx - ax;
631
- const ey = cy - ay;
632
- const bl = dx * dx + dy * dy;
633
- const cl = ex * ex + ey * ey;
634
- const d = .5 / (dx * ey - dy * ex);
635
- return {
636
- x: ax + (ey * bl - dy * cl) * d,
637
- y: ay + (dx * cl - ex * bl) * d
638
- };
639
- }
640
- /**
641
- * Sort points by distance via an array of point indices and an array of calculated distances.
642
- *
643
- * @param {Uint32Array} ids
644
- * @param {Float64Array} dists
645
- * @param {number} left
646
- * @param {number} right
647
- */
648
- function quicksort(ids, dists, left, right) {
649
- if (right - left <= 20) for (let i = left + 1; i <= right; i++) {
650
- const temp = ids[i];
651
- const tempDist = dists[temp];
652
- let j = i - 1;
653
- while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--];
654
- ids[j + 1] = temp;
655
- }
656
- else {
657
- const median = left + right >> 1;
658
- let i = left + 1;
659
- let j = right;
660
- swap(ids, median, i);
661
- if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right);
662
- if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right);
663
- if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i);
664
- const temp = ids[i];
665
- const tempDist = dists[temp];
666
- while (true) {
667
- do
668
- i++;
669
- while (dists[ids[i]] < tempDist);
670
- do
671
- j--;
672
- while (dists[ids[j]] > tempDist);
673
- if (j < i) break;
674
- swap(ids, i, j);
675
- }
676
- ids[left + 1] = ids[j];
677
- ids[j] = temp;
678
- if (right - i + 1 >= j - left) {
679
- quicksort(ids, dists, i, right);
680
- quicksort(ids, dists, left, j - 1);
681
- } else {
682
- quicksort(ids, dists, left, j - 1);
683
- quicksort(ids, dists, i, right);
684
- }
685
- }
686
- }
687
- /**
688
- * @param {Uint32Array} arr
689
- * @param {number} i
690
- * @param {number} j
691
- */
692
- function swap(arr, i, j) {
693
- const tmp = arr[i];
694
- arr[i] = arr[j];
695
- arr[j] = tmp;
696
- }
697
- /** @param {[number, number]} p */
698
- function defaultGetX(p) {
699
- return p[0];
700
- }
701
- /** @param {[number, number]} p */
702
- function defaultGetY(p) {
703
- return p[1];
704
- }
705
- //#endregion
706
- //#region node_modules/.pnpm/d3-delaunay@6.0.4/node_modules/d3-delaunay/src/path.js
707
- var epsilon = 1e-6;
708
- var Path = class {
709
- constructor() {
710
- this._x0 = this._y0 = this._x1 = this._y1 = null;
711
- this._ = "";
712
- }
713
- moveTo(x, y) {
714
- this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;
715
- }
716
- closePath() {
717
- if (this._x1 !== null) {
718
- this._x1 = this._x0, this._y1 = this._y0;
719
- this._ += "Z";
720
- }
721
- }
722
- lineTo(x, y) {
723
- this._ += `L${this._x1 = +x},${this._y1 = +y}`;
724
- }
725
- arc(x, y, r) {
726
- x = +x, y = +y, r = +r;
727
- const x0 = x + r;
728
- const y0 = y;
729
- if (r < 0) throw new Error("negative radius");
730
- if (this._x1 === null) this._ += `M${x0},${y0}`;
731
- else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._ += "L" + x0 + "," + y0;
732
- if (!r) return;
733
- this._ += `A${r},${r},0,1,1,${x - r},${y}A${r},${r},0,1,1,${this._x1 = x0},${this._y1 = y0}`;
734
- }
735
- rect(x, y, w, h) {
736
- this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${+w}v${+h}h${-w}Z`;
737
- }
738
- value() {
739
- return this._ || null;
740
- }
741
- };
742
- //#endregion
743
- //#region node_modules/.pnpm/d3-delaunay@6.0.4/node_modules/d3-delaunay/src/polygon.js
744
- var Polygon = class {
745
- constructor() {
746
- this._ = [];
747
- }
748
- moveTo(x, y) {
749
- this._.push([x, y]);
750
- }
751
- closePath() {
752
- this._.push(this._[0].slice());
753
- }
754
- lineTo(x, y) {
755
- this._.push([x, y]);
756
- }
757
- value() {
758
- return this._.length ? this._ : null;
759
- }
760
- };
761
- //#endregion
762
- //#region node_modules/.pnpm/d3-delaunay@6.0.4/node_modules/d3-delaunay/src/voronoi.js
763
- var Voronoi = class {
764
- constructor(delaunay, [xmin, ymin, xmax, ymax] = [
765
- 0,
766
- 0,
767
- 960,
768
- 500
769
- ]) {
770
- if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error("invalid bounds");
771
- this.delaunay = delaunay;
772
- this._circumcenters = new Float64Array(delaunay.points.length * 2);
773
- this.vectors = new Float64Array(delaunay.points.length * 2);
774
- this.xmax = xmax, this.xmin = xmin;
775
- this.ymax = ymax, this.ymin = ymin;
776
- this._init();
777
- }
778
- update() {
779
- this.delaunay.update();
780
- this._init();
781
- return this;
782
- }
783
- _init() {
784
- const { delaunay: { points, hull, triangles }, vectors } = this;
785
- let bx, by;
786
- const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2);
787
- for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) {
788
- const t1 = triangles[i] * 2;
789
- const t2 = triangles[i + 1] * 2;
790
- const t3 = triangles[i + 2] * 2;
791
- const x1 = points[t1];
792
- const y1 = points[t1 + 1];
793
- const x2 = points[t2];
794
- const y2 = points[t2 + 1];
795
- const x3 = points[t3];
796
- const y3 = points[t3 + 1];
797
- const dx = x2 - x1;
798
- const dy = y2 - y1;
799
- const ex = x3 - x1;
800
- const ey = y3 - y1;
801
- const ab = (dx * ey - dy * ex) * 2;
802
- if (Math.abs(ab) < 1e-9) {
803
- if (bx === void 0) {
804
- bx = by = 0;
805
- for (const i of hull) bx += points[i * 2], by += points[i * 2 + 1];
806
- bx /= hull.length, by /= hull.length;
807
- }
808
- const a = 1e9 * Math.sign((bx - x1) * ey - (by - y1) * ex);
809
- x = (x1 + x3) / 2 - a * ey;
810
- y = (y1 + y3) / 2 + a * ex;
811
- } else {
812
- const d = 1 / ab;
813
- const bl = dx * dx + dy * dy;
814
- const cl = ex * ex + ey * ey;
815
- x = x1 + (ey * bl - dy * cl) * d;
816
- y = y1 + (dx * cl - ex * bl) * d;
817
- }
818
- circumcenters[j] = x;
819
- circumcenters[j + 1] = y;
820
- }
821
- let h = hull[hull.length - 1];
822
- let p0, p1 = h * 4;
823
- let x0, x1 = points[2 * h];
824
- let y0, y1 = points[2 * h + 1];
825
- vectors.fill(0);
826
- for (let i = 0; i < hull.length; ++i) {
827
- h = hull[i];
828
- p0 = p1, x0 = x1, y0 = y1;
829
- p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1];
830
- vectors[p0 + 2] = vectors[p1] = y0 - y1;
831
- vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0;
832
- }
833
- }
834
- render(context) {
835
- const buffer = context == null ? context = new Path() : void 0;
836
- const { delaunay: { halfedges, inedges, hull }, circumcenters, vectors } = this;
837
- if (hull.length <= 1) return null;
838
- for (let i = 0, n = halfedges.length; i < n; ++i) {
839
- const j = halfedges[i];
840
- if (j < i) continue;
841
- const ti = Math.floor(i / 3) * 2;
842
- const tj = Math.floor(j / 3) * 2;
843
- const xi = circumcenters[ti];
844
- const yi = circumcenters[ti + 1];
845
- const xj = circumcenters[tj];
846
- const yj = circumcenters[tj + 1];
847
- this._renderSegment(xi, yi, xj, yj, context);
848
- }
849
- let h0, h1 = hull[hull.length - 1];
850
- for (let i = 0; i < hull.length; ++i) {
851
- h0 = h1, h1 = hull[i];
852
- const t = Math.floor(inedges[h1] / 3) * 2;
853
- const x = circumcenters[t];
854
- const y = circumcenters[t + 1];
855
- const v = h0 * 4;
856
- const p = this._project(x, y, vectors[v + 2], vectors[v + 3]);
857
- if (p) this._renderSegment(x, y, p[0], p[1], context);
858
- }
859
- return buffer && buffer.value();
860
- }
861
- renderBounds(context) {
862
- const buffer = context == null ? context = new Path() : void 0;
863
- context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin);
864
- return buffer && buffer.value();
865
- }
866
- renderCell(i, context) {
867
- const buffer = context == null ? context = new Path() : void 0;
868
- const points = this._clip(i);
869
- if (points === null || !points.length) return;
870
- context.moveTo(points[0], points[1]);
871
- let n = points.length;
872
- while (points[0] === points[n - 2] && points[1] === points[n - 1] && n > 1) n -= 2;
873
- for (let i = 2; i < n; i += 2) if (points[i] !== points[i - 2] || points[i + 1] !== points[i - 1]) context.lineTo(points[i], points[i + 1]);
874
- context.closePath();
875
- return buffer && buffer.value();
876
- }
877
- *cellPolygons() {
878
- const { delaunay: { points } } = this;
879
- for (let i = 0, n = points.length / 2; i < n; ++i) {
880
- const cell = this.cellPolygon(i);
881
- if (cell) cell.index = i, yield cell;
882
- }
883
- }
884
- cellPolygon(i) {
885
- const polygon = new Polygon();
886
- this.renderCell(i, polygon);
887
- return polygon.value();
888
- }
889
- _renderSegment(x0, y0, x1, y1, context) {
890
- let S;
891
- const c0 = this._regioncode(x0, y0);
892
- const c1 = this._regioncode(x1, y1);
893
- if (c0 === 0 && c1 === 0) {
894
- context.moveTo(x0, y0);
895
- context.lineTo(x1, y1);
896
- } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) {
897
- context.moveTo(S[0], S[1]);
898
- context.lineTo(S[2], S[3]);
899
- }
900
- }
901
- contains(i, x, y) {
902
- if ((x = +x, x !== x) || (y = +y, y !== y)) return false;
903
- return this.delaunay._step(i, x, y) === i;
904
- }
905
- *neighbors(i) {
906
- const ci = this._clip(i);
907
- if (ci) for (const j of this.delaunay.neighbors(i)) {
908
- const cj = this._clip(j);
909
- if (cj) {
910
- loop: for (let ai = 0, li = ci.length; ai < li; ai += 2) for (let aj = 0, lj = cj.length; aj < lj; aj += 2) if (ci[ai] === cj[aj] && ci[ai + 1] === cj[aj + 1] && ci[(ai + 2) % li] === cj[(aj + lj - 2) % lj] && ci[(ai + 3) % li] === cj[(aj + lj - 1) % lj]) {
911
- yield j;
912
- break loop;
913
- }
914
- }
915
- }
916
- }
917
- _cell(i) {
918
- const { circumcenters, delaunay: { inedges, halfedges, triangles } } = this;
919
- const e0 = inedges[i];
920
- if (e0 === -1) return null;
921
- const points = [];
922
- let e = e0;
923
- do {
924
- const t = Math.floor(e / 3);
925
- points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]);
926
- e = e % 3 === 2 ? e - 2 : e + 1;
927
- if (triangles[e] !== i) break;
928
- e = halfedges[e];
929
- } while (e !== e0 && e !== -1);
930
- return points;
931
- }
932
- _clip(i) {
933
- if (i === 0 && this.delaunay.hull.length === 1) return [
934
- this.xmax,
935
- this.ymin,
936
- this.xmax,
937
- this.ymax,
938
- this.xmin,
939
- this.ymax,
940
- this.xmin,
941
- this.ymin
942
- ];
943
- const points = this._cell(i);
944
- if (points === null) return null;
945
- const { vectors: V } = this;
946
- const v = i * 4;
947
- return this._simplify(V[v] || V[v + 1] ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3]) : this._clipFinite(i, points));
948
- }
949
- _clipFinite(i, points) {
950
- const n = points.length;
951
- let P = null;
952
- let x0, y0, x1 = points[n - 2], y1 = points[n - 1];
953
- let c0, c1 = this._regioncode(x1, y1);
954
- let e0, e1 = 0;
955
- for (let j = 0; j < n; j += 2) {
956
- x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1];
957
- c0 = c1, c1 = this._regioncode(x1, y1);
958
- if (c0 === 0 && c1 === 0) {
959
- e0 = e1, e1 = 0;
960
- if (P) P.push(x1, y1);
961
- else P = [x1, y1];
962
- } else {
963
- let S, sx0, sy0, sx1, sy1;
964
- if (c0 === 0) {
965
- if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue;
966
- [sx0, sy0, sx1, sy1] = S;
967
- } else {
968
- if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue;
969
- [sx1, sy1, sx0, sy0] = S;
970
- e0 = e1, e1 = this._edgecode(sx0, sy0);
971
- if (e0 && e1) this._edge(i, e0, e1, P, P.length);
972
- if (P) P.push(sx0, sy0);
973
- else P = [sx0, sy0];
974
- }
975
- e0 = e1, e1 = this._edgecode(sx1, sy1);
976
- if (e0 && e1) this._edge(i, e0, e1, P, P.length);
977
- if (P) P.push(sx1, sy1);
978
- else P = [sx1, sy1];
979
- }
980
- }
981
- if (P) {
982
- e0 = e1, e1 = this._edgecode(P[0], P[1]);
983
- if (e0 && e1) this._edge(i, e0, e1, P, P.length);
984
- } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) return [
985
- this.xmax,
986
- this.ymin,
987
- this.xmax,
988
- this.ymax,
989
- this.xmin,
990
- this.ymax,
991
- this.xmin,
992
- this.ymin
993
- ];
994
- return P;
995
- }
996
- _clipSegment(x0, y0, x1, y1, c0, c1) {
997
- const flip = c0 < c1;
998
- if (flip) [x0, y0, x1, y1, c0, c1] = [
999
- x1,
1000
- y1,
1001
- x0,
1002
- y0,
1003
- c1,
1004
- c0
1005
- ];
1006
- while (true) {
1007
- if (c0 === 0 && c1 === 0) return flip ? [
1008
- x1,
1009
- y1,
1010
- x0,
1011
- y0
1012
- ] : [
1013
- x0,
1014
- y0,
1015
- x1,
1016
- y1
1017
- ];
1018
- if (c0 & c1) return null;
1019
- let x, y, c = c0 || c1;
1020
- if (c & 8) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax;
1021
- else if (c & 4) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin;
1022
- else if (c & 2) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax;
1023
- else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin;
1024
- if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0);
1025
- else x1 = x, y1 = y, c1 = this._regioncode(x1, y1);
1026
- }
1027
- }
1028
- _clipInfinite(i, points, vx0, vy0, vxn, vyn) {
1029
- let P = Array.from(points), p;
1030
- if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]);
1031
- if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]);
1032
- if (P = this._clipFinite(i, P)) for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) {
1033
- c0 = c1, c1 = this._edgecode(P[j], P[j + 1]);
1034
- if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length;
1035
- }
1036
- else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) P = [
1037
- this.xmin,
1038
- this.ymin,
1039
- this.xmax,
1040
- this.ymin,
1041
- this.xmax,
1042
- this.ymax,
1043
- this.xmin,
1044
- this.ymax
1045
- ];
1046
- return P;
1047
- }
1048
- _edge(i, e0, e1, P, j) {
1049
- while (e0 !== e1) {
1050
- let x, y;
1051
- switch (e0) {
1052
- case 5:
1053
- e0 = 4;
1054
- continue;
1055
- case 4:
1056
- e0 = 6, x = this.xmax, y = this.ymin;
1057
- break;
1058
- case 6:
1059
- e0 = 2;
1060
- continue;
1061
- case 2:
1062
- e0 = 10, x = this.xmax, y = this.ymax;
1063
- break;
1064
- case 10:
1065
- e0 = 8;
1066
- continue;
1067
- case 8:
1068
- e0 = 9, x = this.xmin, y = this.ymax;
1069
- break;
1070
- case 9:
1071
- e0 = 1;
1072
- continue;
1073
- case 1: e0 = 5, x = this.xmin, y = this.ymin;
1074
- }
1075
- if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) P.splice(j, 0, x, y), j += 2;
1076
- }
1077
- return j;
1078
- }
1079
- _project(x0, y0, vx, vy) {
1080
- let t = Infinity, c, x, y;
1081
- if (vy < 0) {
1082
- if (y0 <= this.ymin) return null;
1083
- if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx;
1084
- } else if (vy > 0) {
1085
- if (y0 >= this.ymax) return null;
1086
- if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx;
1087
- }
1088
- if (vx > 0) {
1089
- if (x0 >= this.xmax) return null;
1090
- if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy;
1091
- } else if (vx < 0) {
1092
- if (x0 <= this.xmin) return null;
1093
- if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy;
1094
- }
1095
- return [x, y];
1096
- }
1097
- _edgecode(x, y) {
1098
- return (x === this.xmin ? 1 : x === this.xmax ? 2 : 0) | (y === this.ymin ? 4 : y === this.ymax ? 8 : 0);
1099
- }
1100
- _regioncode(x, y) {
1101
- return (x < this.xmin ? 1 : x > this.xmax ? 2 : 0) | (y < this.ymin ? 4 : y > this.ymax ? 8 : 0);
1102
- }
1103
- _simplify(P) {
1104
- if (P && P.length > 4) {
1105
- for (let i = 0; i < P.length; i += 2) {
1106
- const j = (i + 2) % P.length, k = (i + 4) % P.length;
1107
- if (P[i] === P[j] && P[j] === P[k] || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1]) P.splice(j, 2), i -= 2;
1108
- }
1109
- if (!P.length) P = null;
1110
- }
1111
- return P;
1112
- }
1113
- };
1114
- //#endregion
1115
- //#region node_modules/.pnpm/d3-delaunay@6.0.4/node_modules/d3-delaunay/src/delaunay.js
1116
- var tau = 2 * Math.PI;
1117
- var pow = Math.pow;
1118
- function pointX(p) {
1119
- return p[0];
1120
- }
1121
- function pointY(p) {
1122
- return p[1];
1123
- }
1124
- function collinear(d) {
1125
- const { triangles, coords } = d;
1126
- for (let i = 0; i < triangles.length; i += 3) {
1127
- const a = 2 * triangles[i], b = 2 * triangles[i + 1], c = 2 * triangles[i + 2];
1128
- if ((coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1]) - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]) > 1e-10) return false;
1129
- }
1130
- return true;
1131
- }
1132
- function jitter(x, y, r) {
1133
- return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r];
1134
- }
1135
- var Delaunay = class Delaunay {
1136
- static from(points, fx = pointX, fy = pointY, that) {
1137
- return new Delaunay("length" in points ? flatArray(points, fx, fy, that) : Float64Array.from(flatIterable(points, fx, fy, that)));
1138
- }
1139
- constructor(points) {
1140
- this._delaunator = new Delaunator(points);
1141
- this.inedges = new Int32Array(points.length / 2);
1142
- this._hullIndex = new Int32Array(points.length / 2);
1143
- this.points = this._delaunator.coords;
1144
- this._init();
1145
- }
1146
- update() {
1147
- this._delaunator.update();
1148
- this._init();
1149
- return this;
1150
- }
1151
- _init() {
1152
- const d = this._delaunator, points = this.points;
1153
- if (d.hull && d.hull.length > 2 && collinear(d)) {
1154
- this.collinear = Int32Array.from({ length: points.length / 2 }, (_, i) => i).sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]);
1155
- const e = this.collinear[0], f = this.collinear[this.collinear.length - 1], bounds = [
1156
- points[2 * e],
1157
- points[2 * e + 1],
1158
- points[2 * f],
1159
- points[2 * f + 1]
1160
- ], r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]);
1161
- for (let i = 0, n = points.length / 2; i < n; ++i) {
1162
- const p = jitter(points[2 * i], points[2 * i + 1], r);
1163
- points[2 * i] = p[0];
1164
- points[2 * i + 1] = p[1];
1165
- }
1166
- this._delaunator = new Delaunator(points);
1167
- } else delete this.collinear;
1168
- const halfedges = this.halfedges = this._delaunator.halfedges;
1169
- const hull = this.hull = this._delaunator.hull;
1170
- const triangles = this.triangles = this._delaunator.triangles;
1171
- const inedges = this.inedges.fill(-1);
1172
- const hullIndex = this._hullIndex.fill(-1);
1173
- for (let e = 0, n = halfedges.length; e < n; ++e) {
1174
- const p = triangles[e % 3 === 2 ? e - 2 : e + 1];
1175
- if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e;
1176
- }
1177
- for (let i = 0, n = hull.length; i < n; ++i) hullIndex[hull[i]] = i;
1178
- if (hull.length <= 2 && hull.length > 0) {
1179
- this.triangles = (/* @__PURE__ */ new Int32Array(3)).fill(-1);
1180
- this.halfedges = (/* @__PURE__ */ new Int32Array(3)).fill(-1);
1181
- this.triangles[0] = hull[0];
1182
- inedges[hull[0]] = 1;
1183
- if (hull.length === 2) {
1184
- inedges[hull[1]] = 0;
1185
- this.triangles[1] = hull[1];
1186
- this.triangles[2] = hull[1];
1187
- }
1188
- }
1189
- }
1190
- voronoi(bounds) {
1191
- return new Voronoi(this, bounds);
1192
- }
1193
- *neighbors(i) {
1194
- const { inedges, hull, _hullIndex, halfedges, triangles, collinear } = this;
1195
- if (collinear) {
1196
- const l = collinear.indexOf(i);
1197
- if (l > 0) yield collinear[l - 1];
1198
- if (l < collinear.length - 1) yield collinear[l + 1];
1199
- return;
1200
- }
1201
- const e0 = inedges[i];
1202
- if (e0 === -1) return;
1203
- let e = e0, p0 = -1;
1204
- do {
1205
- yield p0 = triangles[e];
1206
- e = e % 3 === 2 ? e - 2 : e + 1;
1207
- if (triangles[e] !== i) return;
1208
- e = halfedges[e];
1209
- if (e === -1) {
1210
- const p = hull[(_hullIndex[i] + 1) % hull.length];
1211
- if (p !== p0) yield p;
1212
- return;
1213
- }
1214
- } while (e !== e0);
1215
- }
1216
- find(x, y, i = 0) {
1217
- if ((x = +x, x !== x) || (y = +y, y !== y)) return -1;
1218
- const i0 = i;
1219
- let c;
1220
- while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c;
1221
- return c;
1222
- }
1223
- _step(i, x, y) {
1224
- const { inedges, hull, _hullIndex, halfedges, triangles, points } = this;
1225
- if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1);
1226
- let c = i;
1227
- let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2);
1228
- const e0 = inedges[i];
1229
- let e = e0;
1230
- do {
1231
- let t = triangles[e];
1232
- const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2);
1233
- if (dt < dc) dc = dt, c = t;
1234
- e = e % 3 === 2 ? e - 2 : e + 1;
1235
- if (triangles[e] !== i) break;
1236
- e = halfedges[e];
1237
- if (e === -1) {
1238
- e = hull[(_hullIndex[i] + 1) % hull.length];
1239
- if (e !== t) {
1240
- if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e;
1241
- }
1242
- break;
1243
- }
1244
- } while (e !== e0);
1245
- return c;
1246
- }
1247
- render(context) {
1248
- const buffer = context == null ? context = new Path() : void 0;
1249
- const { points, halfedges, triangles } = this;
1250
- for (let i = 0, n = halfedges.length; i < n; ++i) {
1251
- const j = halfedges[i];
1252
- if (j < i) continue;
1253
- const ti = triangles[i] * 2;
1254
- const tj = triangles[j] * 2;
1255
- context.moveTo(points[ti], points[ti + 1]);
1256
- context.lineTo(points[tj], points[tj + 1]);
1257
- }
1258
- this.renderHull(context);
1259
- return buffer && buffer.value();
1260
- }
1261
- renderPoints(context, r) {
1262
- if (r === void 0 && (!context || typeof context.moveTo !== "function")) r = context, context = null;
1263
- r = r == void 0 ? 2 : +r;
1264
- const buffer = context == null ? context = new Path() : void 0;
1265
- const { points } = this;
1266
- for (let i = 0, n = points.length; i < n; i += 2) {
1267
- const x = points[i], y = points[i + 1];
1268
- context.moveTo(x + r, y);
1269
- context.arc(x, y, r, 0, tau);
1270
- }
1271
- return buffer && buffer.value();
1272
- }
1273
- renderHull(context) {
1274
- const buffer = context == null ? context = new Path() : void 0;
1275
- const { hull, points } = this;
1276
- const h = hull[0] * 2, n = hull.length;
1277
- context.moveTo(points[h], points[h + 1]);
1278
- for (let i = 1; i < n; ++i) {
1279
- const h = 2 * hull[i];
1280
- context.lineTo(points[h], points[h + 1]);
1281
- }
1282
- context.closePath();
1283
- return buffer && buffer.value();
1284
- }
1285
- hullPolygon() {
1286
- const polygon = new Polygon();
1287
- this.renderHull(polygon);
1288
- return polygon.value();
1289
- }
1290
- renderTriangle(i, context) {
1291
- const buffer = context == null ? context = new Path() : void 0;
1292
- const { points, triangles } = this;
1293
- const t0 = triangles[i *= 3] * 2;
1294
- const t1 = triangles[i + 1] * 2;
1295
- const t2 = triangles[i + 2] * 2;
1296
- context.moveTo(points[t0], points[t0 + 1]);
1297
- context.lineTo(points[t1], points[t1 + 1]);
1298
- context.lineTo(points[t2], points[t2 + 1]);
1299
- context.closePath();
1300
- return buffer && buffer.value();
1301
- }
1302
- *trianglePolygons() {
1303
- const { triangles } = this;
1304
- for (let i = 0, n = triangles.length / 3; i < n; ++i) yield this.trianglePolygon(i);
1305
- }
1306
- trianglePolygon(i) {
1307
- const polygon = new Polygon();
1308
- this.renderTriangle(i, polygon);
1309
- return polygon.value();
1310
- }
1311
- };
1312
- function flatArray(points, fx, fy, that) {
1313
- const n = points.length;
1314
- const array = new Float64Array(n * 2);
1315
- for (let i = 0; i < n; ++i) {
1316
- const p = points[i];
1317
- array[i * 2] = fx.call(that, p, i, points);
1318
- array[i * 2 + 1] = fy.call(that, p, i, points);
1319
- }
1320
- return array;
1321
- }
1322
- function* flatIterable(points, fx, fy, that) {
1323
- let i = 0;
1324
- for (const p of points) {
1325
- yield fx.call(that, p, i, points);
1326
- yield fy.call(that, p, i, points);
1327
- ++i;
1328
- }
1329
- }
1330
- //#endregion
1331
- //#region node_modules/.pnpm/d3-polygon@3.0.1/node_modules/d3-polygon/src/area.js
1332
- function area_default(polygon) {
1333
- var i = -1, n = polygon.length, a, b = polygon[n - 1], area = 0;
1334
- while (++i < n) {
1335
- a = b;
1336
- b = polygon[i];
1337
- area += a[1] * b[0] - a[0] * b[1];
1338
- }
1339
- return area / 2;
1340
- }
1341
- //#endregion
1342
- //#region node_modules/.pnpm/d3-polygon@3.0.1/node_modules/d3-polygon/src/centroid.js
1343
- function centroid_default(polygon) {
1344
- var i = -1, n = polygon.length, x = 0, y = 0, a, b = polygon[n - 1], c, k = 0;
1345
- while (++i < n) {
1346
- a = b;
1347
- b = polygon[i];
1348
- k += c = a[0] * b[1] - b[0] * a[1];
1349
- x += (a[0] + b[0]) * c;
1350
- y += (a[1] + b[1]) * c;
1351
- }
1352
- return k *= 3, [x / k, y / k];
1353
- }
1354
-
1355
- export { Delaunay as D, area_default as a, centroid_default as c };
1356
- //# sourceMappingURL=centroid.js-BnGN3LH0.js.map