@bkm016/basalt 0.1.20 → 0.1.21

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 (619) hide show
  1. package/{chunk-1tbv5t08.js → chunk-03b5jh31.js} +1 -1
  2. package/{chunk-3sg32v3n.js → chunk-0x0459qp.js} +1 -1
  3. package/{chunk-nszq2z0w.js → chunk-16yz5ebn.js} +1 -1
  4. package/chunk-1kdd7xry.js +2 -0
  5. package/{chunk-cks36jdh.js → chunk-225dyk1y.js} +2 -2
  6. package/{chunk-v7da0aqn.js → chunk-2fymxwe7.js} +2 -2
  7. package/{chunk-mde2dd79.js → chunk-2m2sa0bp.js} +1 -1
  8. package/{chunk-fgjw0r6g.js → chunk-35y6nf6k.js} +4 -4
  9. package/chunk-3qxq264t.js +2 -0
  10. package/{chunk-cwrf78vs.js → chunk-3s8rpc1w.js} +2 -2
  11. package/{chunk-wj09qkyw.js → chunk-3t8wz9w8.js} +2 -2
  12. package/{chunk-gg3kfa12.js → chunk-43qf44t8.js} +2 -2
  13. package/chunk-49hsqsht.js +2 -0
  14. package/chunk-4fj91gt1.js +4 -0
  15. package/{chunk-tb3zsqe8.js → chunk-51a0843g.js} +1 -1
  16. package/{chunk-51pfvmhh.js → chunk-5h59tby8.js} +69 -69
  17. package/{chunk-bkhsva5n.js → chunk-5m51j40e.js} +3 -3
  18. package/{chunk-2fts9k52.js → chunk-5mt8xxex.js} +2 -2
  19. package/{chunk-5e7yegea.js → chunk-85sjfyjd.js} +1 -1
  20. package/chunk-97ntcrm7.js +2 -0
  21. package/{chunk-0bgg0hdd.js → chunk-9t3v8c3m.js} +1 -1
  22. package/{chunk-7kz9435k.js → chunk-9w1m9av8.js} +3 -3
  23. package/{chunk-d2f0hq8z.js → chunk-9x28stv0.js} +1 -1
  24. package/{chunk-c5pg2875.js → chunk-ak95r8mq.js} +254 -250
  25. package/{chunk-a1vdrgsh.js → chunk-bn1aaewd.js} +4 -4
  26. package/{chunk-agb771ak.js → chunk-c5ydt3vq.js} +2 -2
  27. package/{chunk-y83tnkr3.js → chunk-cjh5h31t.js} +2 -2
  28. package/{chunk-p0e82mee.js → chunk-cr0tqn6j.js} +2 -2
  29. package/{chunk-np2xnt1g.js → chunk-e8xywvv4.js} +2 -2
  30. package/{chunk-w6nc3jn7.js → chunk-ewaskman.js} +1 -1
  31. package/{chunk-w045zk55.js → chunk-feyt85gg.js} +1 -1
  32. package/{chunk-s8m4svhf.js → chunk-ftg4b5pa.js} +1 -1
  33. package/{chunk-s819vmwh.js → chunk-g6cc7ac1.js} +2 -2
  34. package/{chunk-5ja0vsam.js → chunk-gdx1j9c5.js} +3 -3
  35. package/{chunk-h2pp8mnh.js → chunk-h00wjps7.js} +1 -1
  36. package/{chunk-4dgqcp6q.js → chunk-h1fwdz4h.js} +1 -1
  37. package/{chunk-6en06hkk.js → chunk-hhxtc9jn.js} +1 -1
  38. package/chunk-hrn2ss1a.js +2 -0
  39. package/chunk-jhwb962k.js +15 -0
  40. package/{chunk-11xxfc0x.js → chunk-jpwr1sd2.js} +1 -1
  41. package/chunk-jy07y4pv.js +7 -0
  42. package/{chunk-0g8rtf05.js → chunk-k9x1r69s.js} +8 -8
  43. package/chunk-kb5h9rmb.js +2 -0
  44. package/{chunk-eps1epfr.js → chunk-kgnd32hn.js} +2 -2
  45. package/{chunk-w9fdcchk.js → chunk-kka12j10.js} +1 -1
  46. package/{chunk-1gaj43fx.js → chunk-kypdthjg.js} +1 -1
  47. package/{chunk-30bbdzma.js → chunk-m9386732.js} +12 -12
  48. package/{chunk-qxpx8dn6.js → chunk-np123myw.js} +3 -3
  49. package/chunk-ntntwtxn.js +5 -0
  50. package/{chunk-29g01nrz.js → chunk-qn70tm91.js} +5 -5
  51. package/{chunk-yk29stq0.js → chunk-qtgc74er.js} +2 -2
  52. package/{chunk-tp885r8h.js → chunk-qz6ybxjg.js} +9 -9
  53. package/chunk-r36b12zb.js +2 -0
  54. package/{chunk-as2mwf79.js → chunk-re8n2te5.js} +1 -1
  55. package/{chunk-y3vap4a1.js → chunk-rpbxbb92.js} +1 -1
  56. package/chunk-rqrjzz73.js +2 -0
  57. package/{chunk-tpetsqzt.js → chunk-scy1p7x2.js} +3 -3
  58. package/{chunk-svx7mz0w.js → chunk-sq5ppnr3.js} +3 -3
  59. package/{chunk-e3bgzeb3.js → chunk-syhhzr1j.js} +2 -2
  60. package/chunk-tmq8ktys.js +3 -0
  61. package/{chunk-sm9fpy18.js → chunk-ttv805sb.js} +8 -8
  62. package/{chunk-eyyxqb6y.js → chunk-v878x8zr.js} +2 -2
  63. package/{chunk-a2z1cy84.js → chunk-ve1b6vg6.js} +1 -1
  64. package/chunk-w3n8wm44.js +2 -0
  65. package/{chunk-z9p2ry9w.js → chunk-w3skxmvx.js} +2 -2
  66. package/chunk-wxzk086k.js +2 -0
  67. package/chunk-y8mf9tcj.js +25 -0
  68. package/{chunk-ewr51fwc.js → chunk-z4g2q36h.js} +1 -1
  69. package/compiled.js +8 -8
  70. package/package.json +1 -1
  71. package/ui-test-worker.js +16 -16
  72. package/web/{chunk-mbpv2w5h.js → chunk-07dd0jed.js} +2 -2
  73. package/web/chunk-07dd0jed.js.br +0 -0
  74. package/web/chunk-07dd0jed.js.gz +0 -0
  75. package/web/{chunk-d7f85w1y.js → chunk-0hvyq55w.js} +1 -1
  76. package/web/chunk-0hvyq55w.js.br +0 -0
  77. package/web/chunk-0hvyq55w.js.gz +0 -0
  78. package/web/{chunk-ahdca62g.js → chunk-0q5drhbk.js} +1 -1
  79. package/web/chunk-0q5drhbk.js.br +0 -0
  80. package/web/chunk-0q5drhbk.js.gz +0 -0
  81. package/web/{chunk-zthww0ws.js → chunk-0w6ta3ps.js} +1 -1
  82. package/web/chunk-0w6ta3ps.js.br +0 -0
  83. package/web/chunk-0w6ta3ps.js.gz +0 -0
  84. package/web/{chunk-aw9bwd4w.js → chunk-16b5anw4.js} +2 -2
  85. package/web/chunk-16b5anw4.js.br +0 -0
  86. package/web/chunk-16b5anw4.js.gz +0 -0
  87. package/web/{chunk-53cg6pxm.js → chunk-21d8pzcm.js} +2 -2
  88. package/web/chunk-21d8pzcm.js.br +0 -0
  89. package/web/{chunk-53cg6pxm.js.gz → chunk-21d8pzcm.js.gz} +0 -0
  90. package/web/{chunk-72st75n7.js → chunk-2c4affp1.js} +3 -3
  91. package/web/chunk-2c4affp1.js.br +0 -0
  92. package/web/chunk-2c4affp1.js.gz +0 -0
  93. package/web/{chunk-1ghnag5v.js → chunk-2dykyq1n.js} +1 -1
  94. package/web/chunk-2dykyq1n.js.br +0 -0
  95. package/web/chunk-2dykyq1n.js.gz +0 -0
  96. package/web/{chunk-znrsm604.js → chunk-2h2w244w.js} +17 -17
  97. package/web/chunk-2h2w244w.js.br +0 -0
  98. package/web/chunk-2h2w244w.js.gz +0 -0
  99. package/web/{chunk-kdegb6pd.js → chunk-2hd51wb6.js} +5 -5
  100. package/web/chunk-2hd51wb6.js.br +0 -0
  101. package/web/chunk-2hd51wb6.js.gz +0 -0
  102. package/web/{chunk-2rnnvxa5.js → chunk-2tc6krye.js} +3 -3
  103. package/web/chunk-2tc6krye.js.br +0 -0
  104. package/web/chunk-2tc6krye.js.gz +0 -0
  105. package/web/{chunk-7h59ac2b.js → chunk-2w27acew.js} +1 -1
  106. package/web/chunk-2w27acew.js.br +0 -0
  107. package/web/chunk-2w27acew.js.gz +0 -0
  108. package/web/{chunk-gbcf0rdk.js → chunk-2w4rdnhj.js} +1 -1
  109. package/web/chunk-2w4rdnhj.js.br +0 -0
  110. package/web/chunk-2w4rdnhj.js.gz +0 -0
  111. package/web/{chunk-gj6bdv1y.js → chunk-31vxes2p.js} +9 -9
  112. package/web/chunk-31vxes2p.js.br +0 -0
  113. package/web/chunk-31vxes2p.js.gz +0 -0
  114. package/web/chunk-32qd2y5h.js +1 -0
  115. package/web/chunk-32qd2y5h.js.br +0 -0
  116. package/web/chunk-32qd2y5h.js.gz +0 -0
  117. package/web/{chunk-qx5ab39c.js → chunk-39kaz6fa.js} +2 -2
  118. package/web/chunk-39kaz6fa.js.br +0 -0
  119. package/web/chunk-39kaz6fa.js.gz +0 -0
  120. package/web/{chunk-mj8dzc8q.js → chunk-3d3y4tep.js} +5 -5
  121. package/web/chunk-3d3y4tep.js.br +0 -0
  122. package/web/chunk-3d3y4tep.js.gz +0 -0
  123. package/web/chunk-4makcmpw.js +1 -0
  124. package/web/chunk-4makcmpw.js.br +0 -0
  125. package/web/chunk-4makcmpw.js.gz +0 -0
  126. package/web/{chunk-1ps9fj5n.js → chunk-4zftsyq2.js} +2 -2
  127. package/web/chunk-4zftsyq2.js.br +0 -0
  128. package/web/chunk-4zftsyq2.js.gz +0 -0
  129. package/web/{chunk-bks2k04k.js → chunk-50wrjr22.js} +1 -1
  130. package/web/chunk-50wrjr22.js.br +0 -0
  131. package/web/chunk-50wrjr22.js.gz +0 -0
  132. package/web/{chunk-mhzqgzh0.js → chunk-55kw8p9r.js} +1 -1
  133. package/web/chunk-55kw8p9r.js.br +0 -0
  134. package/web/chunk-55kw8p9r.js.gz +0 -0
  135. package/web/{chunk-gpjytpyw.js → chunk-56tqa12m.js} +2 -2
  136. package/web/chunk-56tqa12m.js.br +0 -0
  137. package/web/chunk-56tqa12m.js.gz +0 -0
  138. package/web/{chunk-wbxz2bjb.js → chunk-595tqsv5.js} +1 -1
  139. package/web/chunk-595tqsv5.js.br +0 -0
  140. package/web/chunk-595tqsv5.js.gz +0 -0
  141. package/web/chunk-5h193k2c.js +1 -0
  142. package/web/chunk-5h193k2c.js.br +0 -0
  143. package/web/chunk-5h193k2c.js.gz +0 -0
  144. package/web/{chunk-k4pknkvp.js → chunk-5nbmnchg.js} +1 -1
  145. package/web/chunk-5nbmnchg.js.br +0 -0
  146. package/web/chunk-5nbmnchg.js.gz +0 -0
  147. package/web/{chunk-gk1bc3c3.js → chunk-5vc1wkwb.js} +1 -1
  148. package/web/chunk-5vc1wkwb.js.br +0 -0
  149. package/web/chunk-5vc1wkwb.js.gz +0 -0
  150. package/web/{chunk-tgeeggkh.js → chunk-5wgdprjp.js} +1 -1
  151. package/web/chunk-5wgdprjp.js.br +0 -0
  152. package/web/chunk-5wgdprjp.js.gz +0 -0
  153. package/web/{chunk-esckazz2.js → chunk-60fbfw70.js} +1 -1
  154. package/web/chunk-60fbfw70.js.br +0 -0
  155. package/web/chunk-60fbfw70.js.gz +0 -0
  156. package/web/{chunk-v5p2fds9.js → chunk-62z94rt2.js} +4 -4
  157. package/web/chunk-62z94rt2.js.br +0 -0
  158. package/web/chunk-62z94rt2.js.gz +0 -0
  159. package/web/chunk-67khfy00.css +1 -0
  160. package/web/chunk-67khfy00.css.br +0 -0
  161. package/web/chunk-67khfy00.css.gz +0 -0
  162. package/web/chunk-6bt2t0xt.js +8 -0
  163. package/web/chunk-6bt2t0xt.js.br +0 -0
  164. package/web/chunk-6bt2t0xt.js.gz +0 -0
  165. package/web/{chunk-h1c0m3g4.js → chunk-780qvh05.js} +3 -3
  166. package/web/chunk-780qvh05.js.br +0 -0
  167. package/web/chunk-780qvh05.js.gz +0 -0
  168. package/web/{chunk-k6fwzn0z.js → chunk-78t5dqea.js} +1 -1
  169. package/web/chunk-78t5dqea.js.br +0 -0
  170. package/web/chunk-78t5dqea.js.gz +0 -0
  171. package/web/chunk-7edmyret.js +1 -0
  172. package/web/chunk-7edmyret.js.br +0 -0
  173. package/web/chunk-7edmyret.js.gz +0 -0
  174. package/web/{chunk-cmhxtckb.js → chunk-7remkcff.js} +1 -1
  175. package/web/chunk-7remkcff.js.br +0 -0
  176. package/web/chunk-7remkcff.js.gz +0 -0
  177. package/web/chunk-7s062q01.js +1 -0
  178. package/web/chunk-7s062q01.js.br +0 -0
  179. package/web/chunk-7s062q01.js.gz +0 -0
  180. package/web/chunk-82zwwy0b.js +1 -0
  181. package/web/chunk-82zwwy0b.js.br +0 -0
  182. package/web/chunk-82zwwy0b.js.gz +0 -0
  183. package/web/{chunk-wa8wr2y9.js → chunk-8c6h952g.js} +9 -9
  184. package/web/chunk-8c6h952g.js.br +0 -0
  185. package/web/chunk-8c6h952g.js.gz +0 -0
  186. package/web/chunk-8wgev3hd.js +1 -0
  187. package/web/chunk-8wgev3hd.js.br +0 -0
  188. package/web/chunk-8wgev3hd.js.gz +0 -0
  189. package/web/chunk-9vcbnf1m.js +1 -0
  190. package/web/chunk-9vcbnf1m.js.br +0 -0
  191. package/web/chunk-9vcbnf1m.js.gz +0 -0
  192. package/web/{chunk-kedjfh66.js → chunk-abahqsws.js} +1 -1
  193. package/web/chunk-abahqsws.js.br +0 -0
  194. package/web/chunk-abahqsws.js.gz +0 -0
  195. package/web/{chunk-vhpzp7zd.js → chunk-acv6gk2b.js} +1 -1
  196. package/web/chunk-acv6gk2b.js.br +0 -0
  197. package/web/chunk-acv6gk2b.js.gz +0 -0
  198. package/web/{chunk-bg0qgabv.js → chunk-ajpzsx51.js} +1 -1
  199. package/web/chunk-ajpzsx51.js.br +0 -0
  200. package/web/chunk-ajpzsx51.js.gz +0 -0
  201. package/web/chunk-b1b9txvk.js +1 -0
  202. package/web/chunk-b1b9txvk.js.br +0 -0
  203. package/web/chunk-b1b9txvk.js.gz +0 -0
  204. package/web/{chunk-qjg6dw46.js → chunk-b83bzjcx.js} +73 -73
  205. package/web/chunk-b83bzjcx.js.br +0 -0
  206. package/web/chunk-b83bzjcx.js.gz +0 -0
  207. package/web/{chunk-v6snw1sw.js → chunk-c1zhat04.js} +1 -1
  208. package/web/chunk-c1zhat04.js.br +0 -0
  209. package/web/chunk-c1zhat04.js.gz +0 -0
  210. package/web/{chunk-186rp10x.js → chunk-c37hhmtd.js} +1 -1
  211. package/web/chunk-c37hhmtd.js.br +0 -0
  212. package/web/chunk-c37hhmtd.js.gz +0 -0
  213. package/web/{chunk-wvqcbp4a.js → chunk-c69t0ysj.js} +1 -1
  214. package/web/chunk-c69t0ysj.js.br +0 -0
  215. package/web/chunk-c69t0ysj.js.gz +0 -0
  216. package/web/chunk-caz85hz4.js +1 -0
  217. package/web/chunk-caz85hz4.js.br +0 -0
  218. package/web/chunk-caz85hz4.js.gz +0 -0
  219. package/web/{chunk-6n1ha6ta.js → chunk-cbtpaf3e.js} +1 -1
  220. package/web/chunk-cbtpaf3e.js.br +0 -0
  221. package/web/chunk-cbtpaf3e.js.gz +0 -0
  222. package/web/{chunk-dmhezjv3.js → chunk-d1gga18f.js} +4 -4
  223. package/web/chunk-d1gga18f.js.br +0 -0
  224. package/web/chunk-d1gga18f.js.gz +0 -0
  225. package/web/{chunk-q0srq8g5.js → chunk-d4kjy2qn.js} +1 -1
  226. package/web/chunk-d4kjy2qn.js.br +0 -0
  227. package/web/chunk-d4kjy2qn.js.gz +0 -0
  228. package/web/{chunk-v2bkkhb8.js → chunk-dbv8qpen.js} +41 -41
  229. package/web/chunk-dbv8qpen.js.br +0 -0
  230. package/web/chunk-dbv8qpen.js.gz +0 -0
  231. package/web/{chunk-37hmswdk.js → chunk-e6r1sb5r.js} +5 -5
  232. package/web/chunk-e6r1sb5r.js.br +0 -0
  233. package/web/chunk-e6r1sb5r.js.gz +0 -0
  234. package/web/chunk-ep5qff8m.js +1 -0
  235. package/web/chunk-ep5qff8m.js.br +0 -0
  236. package/web/chunk-ep5qff8m.js.gz +0 -0
  237. package/web/{chunk-c28crzwk.js → chunk-ex66t805.js} +1 -1
  238. package/web/chunk-ex66t805.js.br +0 -0
  239. package/web/chunk-ex66t805.js.gz +0 -0
  240. package/web/chunk-fb8qtyqg.js +1 -0
  241. package/web/chunk-fb8qtyqg.js.br +0 -0
  242. package/web/chunk-fb8qtyqg.js.gz +0 -0
  243. package/web/{chunk-vpbnyz43.js → chunk-fbzhgaak.js} +1 -1
  244. package/web/chunk-fbzhgaak.js.br +0 -0
  245. package/web/chunk-fbzhgaak.js.gz +0 -0
  246. package/web/{chunk-9n1nsdqs.js → chunk-ffwyfdg4.js} +1 -1
  247. package/web/chunk-ffwyfdg4.js.br +0 -0
  248. package/web/chunk-ffwyfdg4.js.gz +0 -0
  249. package/web/{chunk-0tcmnvab.js → chunk-fsz1msjr.js} +1 -1
  250. package/web/chunk-fsz1msjr.js.br +0 -0
  251. package/web/chunk-fsz1msjr.js.gz +0 -0
  252. package/web/{chunk-nb58m79v.js → chunk-fztzcy7c.js} +1 -1
  253. package/web/chunk-fztzcy7c.js.br +0 -0
  254. package/web/chunk-fztzcy7c.js.gz +0 -0
  255. package/web/chunk-g4st8a4e.js +1 -0
  256. package/web/chunk-g4st8a4e.js.br +0 -0
  257. package/web/chunk-g4st8a4e.js.gz +0 -0
  258. package/web/{chunk-82q4e8ff.js → chunk-gs41j1vb.js} +1 -1
  259. package/web/chunk-gs41j1vb.js.br +0 -0
  260. package/web/chunk-gs41j1vb.js.gz +0 -0
  261. package/web/{chunk-dmzvhbpn.js → chunk-gt4dzb4b.js} +3 -3
  262. package/web/chunk-gt4dzb4b.js.br +0 -0
  263. package/web/chunk-gt4dzb4b.js.gz +0 -0
  264. package/web/{chunk-1yvcxpp2.js → chunk-h4g8j133.js} +4 -4
  265. package/web/chunk-h4g8j133.js.br +0 -0
  266. package/web/chunk-h4g8j133.js.gz +0 -0
  267. package/web/chunk-ht3cek8b.js +1 -0
  268. package/web/chunk-ht3cek8b.js.br +2 -0
  269. package/web/chunk-ht3cek8b.js.gz +0 -0
  270. package/web/{chunk-3fd6mgf0.js → chunk-hw4f79k8.js} +1 -1
  271. package/web/chunk-hw4f79k8.js.br +0 -0
  272. package/web/chunk-hw4f79k8.js.gz +0 -0
  273. package/web/{chunk-js940jjj.js → chunk-j2y3wkxc.js} +4 -4
  274. package/web/chunk-j2y3wkxc.js.br +0 -0
  275. package/web/chunk-j2y3wkxc.js.gz +0 -0
  276. package/web/{chunk-vh2prc6k.js → chunk-j7sfcfxr.js} +1 -1
  277. package/web/chunk-j7sfcfxr.js.br +0 -0
  278. package/web/chunk-j7sfcfxr.js.gz +0 -0
  279. package/web/{chunk-ye7vge7s.js → chunk-jge5e8c4.js} +1 -1
  280. package/web/chunk-jge5e8c4.js.br +0 -0
  281. package/web/chunk-jge5e8c4.js.gz +0 -0
  282. package/web/chunk-jyjgvcac.js +2 -0
  283. package/web/chunk-jyjgvcac.js.br +0 -0
  284. package/web/chunk-jyjgvcac.js.gz +0 -0
  285. package/web/chunk-k9bzz441.js +1 -0
  286. package/web/chunk-k9bzz441.js.br +0 -0
  287. package/web/chunk-k9bzz441.js.gz +0 -0
  288. package/web/{chunk-e2z3kdhw.js → chunk-keway722.js} +3 -3
  289. package/web/chunk-keway722.js.br +0 -0
  290. package/web/chunk-keway722.js.gz +0 -0
  291. package/web/{chunk-ezj5rjqr.js → chunk-kr7shpnb.js} +1 -1
  292. package/web/chunk-kr7shpnb.js.br +0 -0
  293. package/web/chunk-kr7shpnb.js.gz +0 -0
  294. package/web/chunk-kv5swske.js +1 -0
  295. package/web/chunk-kv5swske.js.br +0 -0
  296. package/web/chunk-kv5swske.js.gz +0 -0
  297. package/web/{chunk-a8qe7kvz.js → chunk-kx2k462h.js} +1 -1
  298. package/web/chunk-kx2k462h.js.br +0 -0
  299. package/web/chunk-kx2k462h.js.gz +0 -0
  300. package/web/{chunk-recfg8af.js → chunk-m5b7hny2.js} +1 -1
  301. package/web/chunk-m5b7hny2.js.br +0 -0
  302. package/web/chunk-m5b7hny2.js.gz +0 -0
  303. package/web/{chunk-vxadngbp.js → chunk-m7kypzvp.js} +1 -1
  304. package/web/chunk-m7kypzvp.js.br +0 -0
  305. package/web/chunk-m7kypzvp.js.gz +0 -0
  306. package/web/{chunk-mwfrxgbs.js → chunk-n00se8nk.js} +1 -1
  307. package/web/chunk-n00se8nk.js.br +0 -0
  308. package/web/chunk-n00se8nk.js.gz +0 -0
  309. package/web/{chunk-hqt1f3fm.js → chunk-ngdj0r7w.js} +1 -1
  310. package/web/chunk-ngdj0r7w.js.br +0 -0
  311. package/web/chunk-ngdj0r7w.js.gz +0 -0
  312. package/web/{chunk-zbzgd8kn.js → chunk-p6ma361e.js} +1 -1
  313. package/web/chunk-p6ma361e.js.br +0 -0
  314. package/web/chunk-p6ma361e.js.gz +0 -0
  315. package/web/{chunk-1ratg1jd.js → chunk-pvhz0gqy.js} +1 -1
  316. package/web/chunk-pvhz0gqy.js.br +0 -0
  317. package/web/chunk-pvhz0gqy.js.gz +0 -0
  318. package/web/chunk-q96eky9v.js +1 -0
  319. package/web/chunk-q96eky9v.js.br +0 -0
  320. package/web/chunk-q96eky9v.js.gz +0 -0
  321. package/web/{chunk-1cwyy3gh.js → chunk-qcgs1mft.js} +1 -1
  322. package/web/chunk-qcgs1mft.js.br +0 -0
  323. package/web/chunk-qcgs1mft.js.gz +0 -0
  324. package/web/{chunk-hwxj58j5.js → chunk-qh24q7c0.js} +1 -1
  325. package/web/chunk-qh24q7c0.js.br +0 -0
  326. package/web/chunk-qh24q7c0.js.gz +0 -0
  327. package/web/chunk-r1xksxab.js +1 -0
  328. package/web/chunk-r1xksxab.js.br +0 -0
  329. package/web/chunk-r1xksxab.js.gz +0 -0
  330. package/web/{chunk-fjrgg82c.js → chunk-rsc5k5he.js} +4 -4
  331. package/web/chunk-rsc5k5he.js.br +0 -0
  332. package/web/chunk-rsc5k5he.js.gz +0 -0
  333. package/web/{chunk-apr33amc.js → chunk-s7a2f62f.js} +1 -1
  334. package/web/chunk-s7a2f62f.js.br +0 -0
  335. package/web/chunk-s7a2f62f.js.gz +0 -0
  336. package/web/{chunk-0h0whn75.js → chunk-sac6fn9n.js} +1 -1
  337. package/web/chunk-sac6fn9n.js.br +0 -0
  338. package/web/chunk-sac6fn9n.js.gz +0 -0
  339. package/web/{chunk-6a3wt5c5.js → chunk-t0xjx21h.js} +3 -3
  340. package/web/chunk-t0xjx21h.js.br +0 -0
  341. package/web/chunk-t0xjx21h.js.gz +0 -0
  342. package/web/{chunk-tg3f9xmp.js → chunk-v7ck87jf.js} +1 -1
  343. package/web/chunk-v7ck87jf.js.br +0 -0
  344. package/web/chunk-v7ck87jf.js.gz +0 -0
  345. package/web/{chunk-jmnzcm1f.js → chunk-vvk9nche.js} +4 -4
  346. package/web/chunk-vvk9nche.js.br +0 -0
  347. package/web/chunk-vvk9nche.js.gz +0 -0
  348. package/web/chunk-vxtfen72.js +1 -0
  349. package/web/chunk-vxtfen72.js.br +0 -0
  350. package/web/chunk-vxtfen72.js.gz +0 -0
  351. package/web/{chunk-81xbfpbq.js → chunk-w5c2r59n.js} +1 -1
  352. package/web/chunk-w5c2r59n.js.br +0 -0
  353. package/web/chunk-w5c2r59n.js.gz +0 -0
  354. package/web/{chunk-08w40agf.js → chunk-wh0vt2vd.js} +7 -7
  355. package/web/chunk-wh0vt2vd.js.br +0 -0
  356. package/web/chunk-wh0vt2vd.js.gz +0 -0
  357. package/web/chunk-xe7fj72r.js +1 -0
  358. package/web/chunk-xe7fj72r.js.br +0 -0
  359. package/web/chunk-xe7fj72r.js.gz +0 -0
  360. package/web/{chunk-59h87pvn.js → chunk-yarsp7h7.js} +1 -1
  361. package/web/chunk-yarsp7h7.js.br +0 -0
  362. package/web/chunk-yarsp7h7.js.gz +0 -0
  363. package/web/{chunk-x2hxq5yr.js → chunk-yw5wyz1q.js} +1 -1
  364. package/web/chunk-yw5wyz1q.js.br +0 -0
  365. package/web/chunk-yw5wyz1q.js.gz +0 -0
  366. package/web/chunk-z3ea4vhk.js +1 -0
  367. package/web/chunk-z3ea4vhk.js.br +0 -0
  368. package/web/chunk-z3ea4vhk.js.gz +0 -0
  369. package/web/{chunk-6pbhqbv0.js → chunk-z7adzvfz.js} +1 -1
  370. package/web/chunk-z7adzvfz.js.br +0 -0
  371. package/web/chunk-z7adzvfz.js.gz +0 -0
  372. package/web/{chunk-mh3nkkpx.js → chunk-zb01zmms.js} +6 -6
  373. package/web/chunk-zb01zmms.js.br +0 -0
  374. package/web/chunk-zb01zmms.js.gz +0 -0
  375. package/web/index.html +1 -1
  376. package/web/index.html.br +0 -0
  377. package/web/index.html.gz +0 -0
  378. package/worker.js +1 -1
  379. package/chunk-0wwd4q6h.js +0 -5
  380. package/chunk-204c01mz.js +0 -25
  381. package/chunk-4wc2gbhe.js +0 -2
  382. package/chunk-5tsfqsmf.js +0 -2
  383. package/chunk-6hatfwsq.js +0 -2
  384. package/chunk-78ky455y.js +0 -4
  385. package/chunk-8mqaq042.js +0 -2
  386. package/chunk-g9hsrrj5.js +0 -2
  387. package/chunk-gpceyezp.js +0 -2
  388. package/chunk-h4n0gg11.js +0 -2
  389. package/chunk-jzya0e5n.js +0 -7
  390. package/chunk-ncb0tyaw.js +0 -2
  391. package/chunk-tpeg9fkd.js +0 -2
  392. package/chunk-v0mw006s.js +0 -15
  393. package/chunk-ys2fds2x.js +0 -3
  394. package/chunk-yshdvnsp.js +0 -2
  395. package/web/chunk-08w40agf.js.br +0 -0
  396. package/web/chunk-08w40agf.js.gz +0 -0
  397. package/web/chunk-0bfypmyv.js +0 -1
  398. package/web/chunk-0bfypmyv.js.br +0 -2
  399. package/web/chunk-0bfypmyv.js.gz +0 -0
  400. package/web/chunk-0h0whn75.js.br +0 -0
  401. package/web/chunk-0h0whn75.js.gz +0 -0
  402. package/web/chunk-0pzs9k06.js +0 -1
  403. package/web/chunk-0pzs9k06.js.br +0 -0
  404. package/web/chunk-0pzs9k06.js.gz +0 -0
  405. package/web/chunk-0tcmnvab.js.br +0 -0
  406. package/web/chunk-0tcmnvab.js.gz +0 -0
  407. package/web/chunk-186rp10x.js.br +0 -0
  408. package/web/chunk-186rp10x.js.gz +0 -0
  409. package/web/chunk-1cwyy3gh.js.br +0 -0
  410. package/web/chunk-1cwyy3gh.js.gz +0 -0
  411. package/web/chunk-1ecsxh85.js +0 -1
  412. package/web/chunk-1ecsxh85.js.br +0 -0
  413. package/web/chunk-1ecsxh85.js.gz +0 -0
  414. package/web/chunk-1ghnag5v.js.br +0 -0
  415. package/web/chunk-1ghnag5v.js.gz +0 -0
  416. package/web/chunk-1ps9fj5n.js.br +0 -0
  417. package/web/chunk-1ps9fj5n.js.gz +0 -0
  418. package/web/chunk-1ratg1jd.js.br +0 -0
  419. package/web/chunk-1ratg1jd.js.gz +0 -0
  420. package/web/chunk-1yvcxpp2.js.br +0 -0
  421. package/web/chunk-1yvcxpp2.js.gz +0 -0
  422. package/web/chunk-2r3w0pt0.js +0 -8
  423. package/web/chunk-2r3w0pt0.js.br +0 -0
  424. package/web/chunk-2r3w0pt0.js.gz +0 -0
  425. package/web/chunk-2rnnvxa5.js.br +0 -0
  426. package/web/chunk-2rnnvxa5.js.gz +0 -0
  427. package/web/chunk-2stffcvc.js +0 -1
  428. package/web/chunk-2stffcvc.js.br +0 -0
  429. package/web/chunk-2stffcvc.js.gz +0 -0
  430. package/web/chunk-2svqgkqw.js +0 -1
  431. package/web/chunk-2svqgkqw.js.br +0 -0
  432. package/web/chunk-2svqgkqw.js.gz +0 -0
  433. package/web/chunk-37hmswdk.js.br +0 -0
  434. package/web/chunk-37hmswdk.js.gz +0 -0
  435. package/web/chunk-3fd6mgf0.js.br +0 -0
  436. package/web/chunk-3fd6mgf0.js.gz +0 -0
  437. package/web/chunk-53cg6pxm.js.br +0 -0
  438. package/web/chunk-59h87pvn.js.br +0 -0
  439. package/web/chunk-59h87pvn.js.gz +0 -0
  440. package/web/chunk-6a3wt5c5.js.br +0 -0
  441. package/web/chunk-6a3wt5c5.js.gz +0 -0
  442. package/web/chunk-6n1ha6ta.js.br +0 -0
  443. package/web/chunk-6n1ha6ta.js.gz +0 -0
  444. package/web/chunk-6pbhqbv0.js.br +0 -0
  445. package/web/chunk-6pbhqbv0.js.gz +0 -0
  446. package/web/chunk-72st75n7.js.br +0 -0
  447. package/web/chunk-72st75n7.js.gz +0 -0
  448. package/web/chunk-7h59ac2b.js.br +0 -0
  449. package/web/chunk-7h59ac2b.js.gz +0 -0
  450. package/web/chunk-81xbfpbq.js.br +0 -0
  451. package/web/chunk-81xbfpbq.js.gz +0 -0
  452. package/web/chunk-82q4e8ff.js.br +0 -0
  453. package/web/chunk-82q4e8ff.js.gz +0 -0
  454. package/web/chunk-89e8629e.js +0 -1
  455. package/web/chunk-89e8629e.js.br +0 -0
  456. package/web/chunk-89e8629e.js.gz +0 -0
  457. package/web/chunk-9n1nsdqs.js.br +0 -0
  458. package/web/chunk-9n1nsdqs.js.gz +0 -0
  459. package/web/chunk-a8qe7kvz.js.br +0 -0
  460. package/web/chunk-a8qe7kvz.js.gz +0 -0
  461. package/web/chunk-ahdca62g.js.br +0 -0
  462. package/web/chunk-ahdca62g.js.gz +0 -0
  463. package/web/chunk-apr33amc.js.br +0 -0
  464. package/web/chunk-apr33amc.js.gz +0 -0
  465. package/web/chunk-aw9bwd4w.js.br +0 -0
  466. package/web/chunk-aw9bwd4w.js.gz +0 -0
  467. package/web/chunk-bg0qgabv.js.br +0 -0
  468. package/web/chunk-bg0qgabv.js.gz +0 -0
  469. package/web/chunk-bks2k04k.js.br +0 -0
  470. package/web/chunk-bks2k04k.js.gz +0 -0
  471. package/web/chunk-c28crzwk.js.br +0 -0
  472. package/web/chunk-c28crzwk.js.gz +0 -0
  473. package/web/chunk-cmhxtckb.js.br +0 -0
  474. package/web/chunk-cmhxtckb.js.gz +0 -0
  475. package/web/chunk-d7f85w1y.js.br +0 -0
  476. package/web/chunk-d7f85w1y.js.gz +0 -0
  477. package/web/chunk-dmhezjv3.js.br +0 -0
  478. package/web/chunk-dmhezjv3.js.gz +0 -0
  479. package/web/chunk-dmzvhbpn.js.br +0 -0
  480. package/web/chunk-dmzvhbpn.js.gz +0 -0
  481. package/web/chunk-e2z3kdhw.js.br +0 -0
  482. package/web/chunk-e2z3kdhw.js.gz +0 -0
  483. package/web/chunk-eqmghkwh.js +0 -1
  484. package/web/chunk-eqmghkwh.js.br +0 -0
  485. package/web/chunk-eqmghkwh.js.gz +0 -0
  486. package/web/chunk-esckazz2.js.br +0 -0
  487. package/web/chunk-esckazz2.js.gz +0 -0
  488. package/web/chunk-ezj5rjqr.js.br +0 -0
  489. package/web/chunk-ezj5rjqr.js.gz +0 -0
  490. package/web/chunk-fjrgg82c.js.br +0 -0
  491. package/web/chunk-fjrgg82c.js.gz +0 -0
  492. package/web/chunk-gbcf0rdk.js.br +0 -0
  493. package/web/chunk-gbcf0rdk.js.gz +0 -0
  494. package/web/chunk-gj6bdv1y.js.br +0 -0
  495. package/web/chunk-gj6bdv1y.js.gz +0 -0
  496. package/web/chunk-gk1bc3c3.js.br +0 -0
  497. package/web/chunk-gk1bc3c3.js.gz +0 -0
  498. package/web/chunk-gpjytpyw.js.br +0 -0
  499. package/web/chunk-gpjytpyw.js.gz +0 -0
  500. package/web/chunk-h1c0m3g4.js.br +0 -0
  501. package/web/chunk-h1c0m3g4.js.gz +0 -0
  502. package/web/chunk-h1qv0cpd.css +0 -1
  503. package/web/chunk-h1qv0cpd.css.br +0 -0
  504. package/web/chunk-h1qv0cpd.css.gz +0 -0
  505. package/web/chunk-hq7e5xgd.js +0 -1
  506. package/web/chunk-hq7e5xgd.js.br +0 -0
  507. package/web/chunk-hq7e5xgd.js.gz +0 -0
  508. package/web/chunk-hqt1f3fm.js.br +0 -0
  509. package/web/chunk-hqt1f3fm.js.gz +0 -0
  510. package/web/chunk-hwxj58j5.js.br +0 -0
  511. package/web/chunk-hwxj58j5.js.gz +0 -0
  512. package/web/chunk-hxzb25a8.js +0 -1
  513. package/web/chunk-hxzb25a8.js.br +0 -0
  514. package/web/chunk-hxzb25a8.js.gz +0 -0
  515. package/web/chunk-jmnzcm1f.js.br +0 -0
  516. package/web/chunk-jmnzcm1f.js.gz +0 -0
  517. package/web/chunk-js940jjj.js.br +0 -0
  518. package/web/chunk-js940jjj.js.gz +0 -0
  519. package/web/chunk-jy9vkfbf.js +0 -1
  520. package/web/chunk-jy9vkfbf.js.br +0 -0
  521. package/web/chunk-jy9vkfbf.js.gz +0 -0
  522. package/web/chunk-k4pknkvp.js.br +0 -0
  523. package/web/chunk-k4pknkvp.js.gz +0 -0
  524. package/web/chunk-k6fwzn0z.js.br +0 -0
  525. package/web/chunk-k6fwzn0z.js.gz +0 -0
  526. package/web/chunk-kdegb6pd.js.br +0 -0
  527. package/web/chunk-kdegb6pd.js.gz +0 -0
  528. package/web/chunk-kedjfh66.js.br +0 -0
  529. package/web/chunk-kedjfh66.js.gz +0 -0
  530. package/web/chunk-mbpv2w5h.js.br +0 -0
  531. package/web/chunk-mbpv2w5h.js.gz +0 -0
  532. package/web/chunk-mh3nkkpx.js.br +0 -0
  533. package/web/chunk-mh3nkkpx.js.gz +0 -0
  534. package/web/chunk-mhzqgzh0.js.br +0 -0
  535. package/web/chunk-mhzqgzh0.js.gz +0 -0
  536. package/web/chunk-mj8dzc8q.js.br +0 -0
  537. package/web/chunk-mj8dzc8q.js.gz +0 -0
  538. package/web/chunk-mwfrxgbs.js.br +0 -0
  539. package/web/chunk-mwfrxgbs.js.gz +0 -0
  540. package/web/chunk-nb58m79v.js.br +0 -0
  541. package/web/chunk-nb58m79v.js.gz +0 -0
  542. package/web/chunk-nsna2v2r.js +0 -1
  543. package/web/chunk-nsna2v2r.js.br +0 -0
  544. package/web/chunk-nsna2v2r.js.gz +0 -0
  545. package/web/chunk-nxdp58nf.js +0 -1
  546. package/web/chunk-nxdp58nf.js.br +0 -0
  547. package/web/chunk-nxdp58nf.js.gz +0 -0
  548. package/web/chunk-nytgs01h.js +0 -1
  549. package/web/chunk-nytgs01h.js.br +0 -0
  550. package/web/chunk-nytgs01h.js.gz +0 -0
  551. package/web/chunk-pkxn54jm.js +0 -1
  552. package/web/chunk-pkxn54jm.js.br +0 -0
  553. package/web/chunk-pkxn54jm.js.gz +0 -0
  554. package/web/chunk-q0srq8g5.js.br +0 -0
  555. package/web/chunk-q0srq8g5.js.gz +0 -0
  556. package/web/chunk-qjg6dw46.js.br +0 -0
  557. package/web/chunk-qjg6dw46.js.gz +0 -0
  558. package/web/chunk-qjjxevxe.js +0 -1
  559. package/web/chunk-qjjxevxe.js.br +0 -0
  560. package/web/chunk-qjjxevxe.js.gz +0 -0
  561. package/web/chunk-qx5ab39c.js.br +0 -0
  562. package/web/chunk-qx5ab39c.js.gz +0 -0
  563. package/web/chunk-recfg8af.js.br +0 -0
  564. package/web/chunk-recfg8af.js.gz +0 -0
  565. package/web/chunk-tg3f9xmp.js.br +0 -0
  566. package/web/chunk-tg3f9xmp.js.gz +0 -0
  567. package/web/chunk-tgeeggkh.js.br +0 -0
  568. package/web/chunk-tgeeggkh.js.gz +0 -0
  569. package/web/chunk-v2bkkhb8.js.br +0 -0
  570. package/web/chunk-v2bkkhb8.js.gz +0 -0
  571. package/web/chunk-v5p2fds9.js.br +0 -0
  572. package/web/chunk-v5p2fds9.js.gz +0 -0
  573. package/web/chunk-v6snw1sw.js.br +0 -0
  574. package/web/chunk-v6snw1sw.js.gz +0 -0
  575. package/web/chunk-veadbga2.js +0 -1
  576. package/web/chunk-veadbga2.js.br +0 -2
  577. package/web/chunk-veadbga2.js.gz +0 -0
  578. package/web/chunk-vh2prc6k.js.br +0 -0
  579. package/web/chunk-vh2prc6k.js.gz +0 -0
  580. package/web/chunk-vhpzp7zd.js.br +0 -0
  581. package/web/chunk-vhpzp7zd.js.gz +0 -0
  582. package/web/chunk-vpbnyz43.js.br +0 -0
  583. package/web/chunk-vpbnyz43.js.gz +0 -0
  584. package/web/chunk-vxadngbp.js.br +0 -3
  585. package/web/chunk-vxadngbp.js.gz +0 -0
  586. package/web/chunk-wa8wr2y9.js.br +0 -0
  587. package/web/chunk-wa8wr2y9.js.gz +0 -0
  588. package/web/chunk-wbxz2bjb.js.br +0 -0
  589. package/web/chunk-wbxz2bjb.js.gz +0 -0
  590. package/web/chunk-wgzatts8.js +0 -1
  591. package/web/chunk-wgzatts8.js.br +0 -0
  592. package/web/chunk-wgzatts8.js.gz +0 -0
  593. package/web/chunk-whczyxqw.js +0 -1
  594. package/web/chunk-whczyxqw.js.br +0 -0
  595. package/web/chunk-whczyxqw.js.gz +0 -0
  596. package/web/chunk-wmzz2crn.js +0 -1
  597. package/web/chunk-wmzz2crn.js.br +0 -0
  598. package/web/chunk-wmzz2crn.js.gz +0 -0
  599. package/web/chunk-wvqcbp4a.js.br +0 -0
  600. package/web/chunk-wvqcbp4a.js.gz +0 -0
  601. package/web/chunk-x2hxq5yr.js.br +0 -0
  602. package/web/chunk-x2hxq5yr.js.gz +0 -0
  603. package/web/chunk-x8bnp6vr.js +0 -1
  604. package/web/chunk-x8bnp6vr.js.br +0 -0
  605. package/web/chunk-x8bnp6vr.js.gz +0 -0
  606. package/web/chunk-xvmzsftt.js +0 -2
  607. package/web/chunk-xvmzsftt.js.br +0 -0
  608. package/web/chunk-xvmzsftt.js.gz +0 -0
  609. package/web/chunk-ye7vge7s.js.br +0 -0
  610. package/web/chunk-ye7vge7s.js.gz +0 -0
  611. package/web/chunk-zbzgd8kn.js.br +0 -0
  612. package/web/chunk-zbzgd8kn.js.gz +0 -0
  613. package/web/chunk-zhwqscat.js +0 -1
  614. package/web/chunk-zhwqscat.js.br +0 -0
  615. package/web/chunk-zhwqscat.js.gz +0 -0
  616. package/web/chunk-znrsm604.js.br +0 -0
  617. package/web/chunk-znrsm604.js.gz +0 -0
  618. package/web/chunk-zthww0ws.js.br +0 -0
  619. package/web/chunk-zthww0ws.js.gz +0 -0
@@ -1,17 +1,17 @@
1
- import{wr}from"./chunk-cmhxtckb.js";import{re}from"./chunk-mwfrxgbs.js";import{t,a,B,S,k,A,R,I,L,D,P,M,u,za,h,qs,X,F}from"./chunk-v2bkkhb8.js";import{fe}from"./chunk-53cg6pxm.js";var C={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ce=B.gitGraph,V=t(()=>X({...Ce,...S().gitGraph}),"getConfig"),m=new wr(()=>{let e=V(),{mainBranchName:r,mainBranchOrder:o}=e;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:o}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function se(){return qs({length:7})}t(se,"getID");function pe(e,r){let o=Object.create(null);return e.reduce((c,i)=>{let l=r(i);if(!o[l])o[l]=!0,c.push(i);return c},[])}t(pe,"uniqBy");var ve=t(function(e){m.records.direction=e},"setDirection"),Ee=t(function(e){a.debug("options str",e),e=e?.trim(),e=e||"{}";try{m.records.options=JSON.parse(e)}catch(r){a.error("error while parsing gitGraph options",r.message)}},"setOptions"),Te=t(function(){return m.records.options},"getOptions"),Le=t(function(e){let{msg:r,id:o,type:c,tags:i}=e;a.info("commit",r,o,c,i),a.debug("Entering commit:",r,o,c,i);let l=V();o=k.sanitizeText(o,l),r=k.sanitizeText(r,l),i=i?.map((s)=>k.sanitizeText(s,l));let n={id:o?o:m.records.seq+"-"+se(),message:r,seq:m.records.seq++,type:c??C.NORMAL,tags:i??[],parents:m.records.head==null?[]:[m.records.head.id],branch:m.records.currBranch};if(m.records.head=n,a.info("main branch",l.mainBranchName),m.records.commits.has(n.id))a.warn(`Commit ID ${n.id} already exists`);m.records.commits.set(n.id,n),m.records.branches.set(m.records.currBranch,n.id),a.debug("in pushCommit "+n.id)},"commit"),Me=t(function(e){let{name:r,order:o}=e;if(r=k.sanitizeText(r,V()),m.records.branches.has(r))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);m.records.branches.set(r,m.records.head!=null?m.records.head.id:null),m.records.branchConfig.set(r,{name:r,order:o}),ye(r),a.debug("in createBranch")},"branch"),Pe=t((e)=>{let{branch:r,id:o,type:c,tags:i}=e,l=V();if(r=k.sanitizeText(r,l),o)o=k.sanitizeText(o,l);let n=m.records.branches.get(m.records.currBranch),s=m.records.branches.get(r),g=n?m.records.commits.get(n):void 0,p=s?m.records.commits.get(s):void 0;if(g&&p&&g.branch===r)throw Error(`Cannot merge branch '${r}' into itself.`);if(m.records.currBranch===r){let d=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(g===void 0||!g){let d=Error(`Incorrect usage of "merge". Current branch (${m.records.currBranch})has no commits`);throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},d}if(!m.records.branches.has(r)){let d=Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},d}if(p===void 0||!p){let d=Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},d}if(g===p){let d=Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(o&&m.records.commits.has(o)){let d=Error('Incorrect usage of "merge". Commit with id:'+o+" already exists, use different custom id");throw d.hash={text:`merge ${r} ${o} ${c} ${i?.join(" ")}`,token:`merge ${r} ${o} ${c} ${i?.join(" ")}`,expected:[`merge ${r} ${o}_UNIQUE ${c} ${i?.join(" ")}`]},d}let y=s?s:"",f={id:o||`${m.records.seq}-${se()}`,message:`merged branch ${r} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,y],branch:m.records.currBranch,type:C.MERGE,customType:c,customId:o?!0:!1,tags:i??[]};m.records.head=f,m.records.commits.set(f.id,f),m.records.branches.set(m.records.currBranch,f.id),a.debug(m.records.branches),a.debug("in mergeBranch")},"merge"),Re=t(function(e){let{id:r,targetId:o,tags:c,parent:i}=e;a.debug("Entering cherryPick:",r,o,c);let l=V();if(r=k.sanitizeText(r,l),o=k.sanitizeText(o,l),c=c?.map((g)=>k.sanitizeText(g,l)),i=k.sanitizeText(i,l),!r||!m.records.commits.has(r)){let g=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw g.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},g}let n=m.records.commits.get(r);if(n===void 0||!n)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(n.parents)&&n.parents.includes(i)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let s=n.branch;if(n.type===C.MERGE&&!i)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!o||!m.records.commits.has(o)){if(s===m.records.currBranch){let f=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},f}let g=m.records.branches.get(m.records.currBranch);if(g===void 0||!g){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},f}let p=m.records.commits.get(g);if(p===void 0||!p){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},f}let y={id:m.records.seq+"-"+se(),message:`cherry-picked ${n?.message} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,n.id],branch:m.records.currBranch,type:C.CHERRY_PICK,tags:c?c.filter(Boolean):[`cherry-pick:${n.id}${n.type===C.MERGE?`|parent:${i}`:""}`]};m.records.head=y,m.records.commits.set(y.id,y),m.records.branches.set(m.records.currBranch,y.id),a.debug(m.records.branches),a.debug("in cherryPick")}},"cherryPick"),ye=t(function(e){if(e=k.sanitizeText(e,V()),!m.records.branches.has(e)){let r=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}else{m.records.currBranch=e;let r=m.records.branches.get(m.records.currBranch);if(r===void 0||!r)m.records.head=null;else m.records.head=m.records.commits.get(r)??null}},"checkout");function de(e,r,o){let c=e.indexOf(r);if(c===-1)e.push(o);else e.splice(c,1,o)}t(de,"upsert");function le(e){let r=e.reduce((i,l)=>{if(i.seq>l.seq)return i;return l},e[0]),o="";e.forEach(function(i){if(i===r)o+="\t*";else o+="\t|"});let c=[o,r.id,r.seq];for(let i in m.records.branches)if(m.records.branches.get(i)===r.id)c.push(i);if(a.debug(c.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){let i=m.records.commits.get(r.parents[0]);if(de(e,r,i),r.parents[1])e.push(m.records.commits.get(r.parents[1]))}else if(r.parents.length==0)return;else if(r.parents[0]){let i=m.records.commits.get(r.parents[0]);de(e,r,i)}e=pe(e,(i)=>i.id),le(e)}t(le,"prettyPrintCommitHistory");var Oe=t(function(){a.debug(m.records.commits);let e=xe()[0];le([e])},"prettyPrint"),Ie=t(function(){m.reset(),A()},"clear"),_e=t(function(){return[...m.records.branchConfig.values()].map((r,o)=>{if(r.order!==null&&r.order!==void 0)return r;return{...r,order:parseFloat(`0.${o}`)}}).sort((r,o)=>(r.order??0)-(o.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ge=t(function(){return m.records.branches},"getBranches"),De=t(function(){return m.records.commits},"getCommits"),xe=t(function(){let e=[...m.records.commits.values()];return e.forEach(function(r){a.debug(r.id)}),e.sort((r,o)=>r.seq-o.seq),e},"getCommitsArray"),We=t(function(){return m.records.currBranch},"getCurrentBranch"),qe=t(function(){return m.records.direction},"getDirection"),Ae=t(function(){return m.records.head},"getHead"),ue={commitType:C,getConfig:V,setDirection:ve,setOptions:Ee,getOptions:Te,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:ye,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:xe,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:R,getAccTitle:I,getAccDescription:D,setAccDescription:L,setDiagramTitle:P,getDiagramTitle:M},He=t((e,r)=>{if(re(e,r),e.dir)r.setDirection(e.dir);for(let o of e.statements)Se(o,r)},"populate"),Se=t((e,r)=>{let c={Commit:t((i)=>r.commit(Ne(i)),"Commit"),Branch:t((i)=>r.branch(Fe(i)),"Branch"),Merge:t((i)=>r.merge(ze(i)),"Merge"),Checkout:t((i)=>r.checkout(Ye(i)),"Checkout"),CherryPicking:t((i)=>r.cherryPick(je(i)),"CherryPicking")}[e.$type];if(c)c(e);else a.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ne=t((e)=>({id:e.id,msg:e.message??"",type:e.type!==void 0?C[e.type]:C.NORMAL,tags:e.tags??void 0}),"parseCommit"),Fe=t((e)=>({name:e.name,order:e.order??0}),"parseBranch"),ze=t((e)=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?C[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ye=t((e)=>e.branch,"parseCheckout"),je=t((e)=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ke={parse:t(async(e)=>{let r=await fe("gitGraph",e);a.debug(r),He(r,ue)},"parse")},Y=10,j=40,q=4,N=2,K=8,ne=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),he=12,me=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),U=t((e,r,o=!1)=>{if(o&&e>0)return(e-1)%(r-1)+1;return e%r},"calcColorIndex"),_=new Map,G=new Map,ae=30,Q=new Map,oe=[],z=0,b="LR",Ve=t(()=>{_.clear(),G.clear(),Q.clear(),z=0,oe=[],b="LR"},"clear"),be=t((e)=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e==="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach((c)=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=c.trim(),r.appendChild(i)}),r},"drawText"),we=t((e)=>{let r,o,c;if(b==="BT")o=t((i,l)=>i<=l,"comparisonFunc"),c=1/0;else o=t((i,l)=>i>=l,"comparisonFunc"),c=0;return e.forEach((i)=>{let l=b==="TB"||b=="BT"?G.get(i)?.y:G.get(i)?.x;if(l!==void 0&&o(l,c))r=i,c=l}),r},"findClosestParent"),Ze=t((e)=>{let r="",o=1/0;return e.forEach((c)=>{let i=G.get(c).y;if(i<=o)r=c,o=i}),r||void 0},"findClosestParentBT"),Xe=t((e,r,o)=>{let c=o,i=o,l=[];e.forEach((n)=>{let s=r.get(n);if(!s)throw Error(`Commit not found for key ${n}`);if(s.parents.length)c=Qe(s),i=Math.max(c,i);else l.push(s);et(s,c)}),c=i,l.forEach((n)=>{tt(n,c,o)}),e.forEach((n)=>{let s=r.get(n);if(s?.parents.length){let g=Ze(s.parents);if(c=G.get(g).y-j,c<=i)i=c;let p=_.get(s.branch).pos,y=c-Y;G.set(s.id,{x:p,y})}})},"setParallelBTPos"),Je=t((e)=>{let r=we(e.parents.filter((c)=>c!==null));if(!r)throw Error(`Closest parent not found for commit ${e.id}`);let o=G.get(r)?.y;if(o===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return o},"findClosestParentPos"),Qe=t((e)=>Je(e)+j,"calculateCommitPosition"),et=t((e,r)=>{let o=_.get(e.branch);if(!o)throw Error(`Branch not found for commit ${e.id}`);let c=o.pos,i=r+Y;return G.set(e.id,{x:c,y:i}),{x:c,y:i}},"setCommitPosition"),tt=t((e,r,o)=>{let c=_.get(e.branch);if(!c)throw Error(`Branch not found for commit ${e.id}`);let i=r+o,l=c.pos;G.set(e.id,{x:l,y:i})},"setRootPosition"),rt=t((e,r,o,c,i,l)=>{let{theme:n}=u(),s=ne.has(n??""),g=me.has(n??""),p=Ue.has(n??"");if(l===C.HIGHLIGHT)e.append("rect").attr("x",o.x-10+(s?3:0)).attr("y",o.y-10+(s?3:0)).attr("width",s?14:20).attr("height",s?14:20).attr("class",`commit ${r.id} commit-highlight${U(i,K,g)} ${c}-outer`),e.append("rect").attr("x",o.x-6+(s?2:0)).attr("y",o.y-6+(s?2:0)).attr("width",s?8:12).attr("height",s?8:12).attr("class",`commit ${r.id} commit${U(i,K,g)} ${c}-inner`);else if(l===C.CHERRY_PICK)e.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",s?7:10).attr("class",`commit ${r.id} ${c}`),e.append("circle").attr("cx",o.x-3).attr("cy",o.y+2).attr("r",s?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`),e.append("circle").attr("cx",o.x+3).attr("cy",o.y+2).attr("r",s?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`),e.append("line").attr("x1",o.x+3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`),e.append("line").attr("x1",o.x-3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`);else{let y=e.append("circle");if(y.attr("cx",o.x),y.attr("cy",o.y),y.attr("r",s?7:10),y.attr("class",`commit ${r.id} commit${U(i,K,g)}`),l===C.MERGE){let f=e.append("circle");f.attr("cx",o.x),f.attr("cy",o.y),f.attr("r",s?5:6),f.attr("class",`commit ${c} ${r.id} commit${U(i,K,g)}`)}if(l===C.REVERSE){let f=e.append("path"),d=s?4:5;f.attr("d",`M ${o.x-d},${o.y-d}L${o.x+d},${o.y+d}M${o.x-d},${o.y+d}L${o.x+d},${o.y-d}`).attr("class",`commit ${c} ${r.id} commit${U(i,K,g)}`)}}},"drawCommitBullet"),at=t((e,r,o,c,i)=>{if(r.type!==C.CHERRY_PICK&&(r.customId&&r.type===C.MERGE||r.type!==C.MERGE)&&i.showCommitLabel){let l=e.append("g"),n=l.insert("rect").attr("class","commit-label-bkg"),s=l.append("text").attr("x",c).attr("y",o.y+25).attr("class","commit-label").text(r.id),g=s.node()?.getBBox();if(g){if(n.attr("x",o.posWithOffset-g.width/2-N).attr("y",o.y+13.5).attr("width",g.width+2*N).attr("height",g.height+2*N),b==="TB"||b==="BT")n.attr("x",o.x-(g.width+4*q+5)).attr("y",o.y-12),s.attr("x",o.x-(g.width+4*q)).attr("y",o.y+g.height-12);else s.attr("x",o.posWithOffset-g.width/2);if(i.rotateCommitLabel)if(b==="TB"||b==="BT")s.attr("transform","rotate(-45, "+o.x+", "+o.y+")"),n.attr("transform","rotate(-45, "+o.x+", "+o.y+")");else{let p=-7.5-(g.width+10)/25*9.5,y=10+g.width/25*8.5;l.attr("transform","translate("+p+", "+y+") rotate(-45, "+c+", "+o.y+")")}}}},"drawCommitLabel"),ot=t((e,r,o,c)=>{if(r.tags.length>0){let i=0,l=0,n=0,s=[];for(let g of r.tags.reverse()){let p=e.insert("polygon"),y=e.append("circle"),f=e.append("text").attr("y",o.y-16-i).attr("class","tag-label").text(g),d=f.node()?.getBBox();if(!d)throw Error("Tag bbox not found");l=Math.max(l,d.width),n=Math.max(n,d.height),f.attr("x",o.posWithOffset-d.width/2),s.push({tag:f,hole:y,rect:p,yOffset:i}),i+=20}for(let{tag:g,hole:p,rect:y,yOffset:f}of s){let d=n/2,w=o.y-19.2-f;if(y.attr("class","tag-label-bkg").attr("points",`
2
- ${c-l/2-q/2},${w+N}
3
- ${c-l/2-q/2},${w-N}
4
- ${o.posWithOffset-l/2-q},${w-d-N}
5
- ${o.posWithOffset+l/2+q},${w-d-N}
6
- ${o.posWithOffset+l/2+q},${w+d+N}
7
- ${o.posWithOffset-l/2-q},${w+d+N}`),p.attr("cy",w).attr("cx",c-l/2+q/2).attr("r",1.5).attr("class","tag-hole"),b==="TB"||b==="BT"){let x=c+f;y.attr("class","tag-label-bkg").attr("points",`
1
+ import{wr}from"./chunk-7remkcff.js";import{re}from"./chunk-n00se8nk.js";import{t,a,B,S,k,A,R,I,L,D,P,N,u,za,h,qs,X,F}from"./chunk-dbv8qpen.js";import{fe}from"./chunk-21d8pzcm.js";var C={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ce=B.gitGraph,V=t(()=>X({...Ce,...S().gitGraph}),"getConfig"),m=new wr(()=>{let e=V(),{mainBranchName:r,mainBranchOrder:o}=e;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:o}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function se(){return qs({length:7})}t(se,"getID");function pe(e,r){let o=Object.create(null);return e.reduce((c,i)=>{let l=r(i);if(!o[l])o[l]=!0,c.push(i);return c},[])}t(pe,"uniqBy");var ve=t(function(e){m.records.direction=e},"setDirection"),Ee=t(function(e){a.debug("options str",e),e=e?.trim(),e=e||"{}";try{m.records.options=JSON.parse(e)}catch(r){a.error("error while parsing gitGraph options",r.message)}},"setOptions"),Te=t(function(){return m.records.options},"getOptions"),Le=t(function(e){let{msg:r,id:o,type:c,tags:i}=e;a.info("commit",r,o,c,i),a.debug("Entering commit:",r,o,c,i);let l=V();o=k.sanitizeText(o,l),r=k.sanitizeText(r,l),i=i?.map((s)=>k.sanitizeText(s,l));let n={id:o?o:m.records.seq+"-"+se(),message:r,seq:m.records.seq++,type:c??C.NORMAL,tags:i??[],parents:m.records.head==null?[]:[m.records.head.id],branch:m.records.currBranch};if(m.records.head=n,a.info("main branch",l.mainBranchName),m.records.commits.has(n.id))a.warn(`Commit ID ${n.id} already exists`);m.records.commits.set(n.id,n),m.records.branches.set(m.records.currBranch,n.id),a.debug("in pushCommit "+n.id)},"commit"),Me=t(function(e){let{name:r,order:o}=e;if(r=k.sanitizeText(r,V()),m.records.branches.has(r))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);m.records.branches.set(r,m.records.head!=null?m.records.head.id:null),m.records.branchConfig.set(r,{name:r,order:o}),ye(r),a.debug("in createBranch")},"branch"),Pe=t((e)=>{let{branch:r,id:o,type:c,tags:i}=e,l=V();if(r=k.sanitizeText(r,l),o)o=k.sanitizeText(o,l);let n=m.records.branches.get(m.records.currBranch),s=m.records.branches.get(r),g=n?m.records.commits.get(n):void 0,p=s?m.records.commits.get(s):void 0;if(g&&p&&g.branch===r)throw Error(`Cannot merge branch '${r}' into itself.`);if(m.records.currBranch===r){let d=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(g===void 0||!g){let d=Error(`Incorrect usage of "merge". Current branch (${m.records.currBranch})has no commits`);throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},d}if(!m.records.branches.has(r)){let d=Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},d}if(p===void 0||!p){let d=Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},d}if(g===p){let d=Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(o&&m.records.commits.has(o)){let d=Error('Incorrect usage of "merge". Commit with id:'+o+" already exists, use different custom id");throw d.hash={text:`merge ${r} ${o} ${c} ${i?.join(" ")}`,token:`merge ${r} ${o} ${c} ${i?.join(" ")}`,expected:[`merge ${r} ${o}_UNIQUE ${c} ${i?.join(" ")}`]},d}let y=s?s:"",f={id:o||`${m.records.seq}-${se()}`,message:`merged branch ${r} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,y],branch:m.records.currBranch,type:C.MERGE,customType:c,customId:o?!0:!1,tags:i??[]};m.records.head=f,m.records.commits.set(f.id,f),m.records.branches.set(m.records.currBranch,f.id),a.debug(m.records.branches),a.debug("in mergeBranch")},"merge"),Re=t(function(e){let{id:r,targetId:o,tags:c,parent:i}=e;a.debug("Entering cherryPick:",r,o,c);let l=V();if(r=k.sanitizeText(r,l),o=k.sanitizeText(o,l),c=c?.map((g)=>k.sanitizeText(g,l)),i=k.sanitizeText(i,l),!r||!m.records.commits.has(r)){let g=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw g.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},g}let n=m.records.commits.get(r);if(n===void 0||!n)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(n.parents)&&n.parents.includes(i)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let s=n.branch;if(n.type===C.MERGE&&!i)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!o||!m.records.commits.has(o)){if(s===m.records.currBranch){let f=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},f}let g=m.records.branches.get(m.records.currBranch);if(g===void 0||!g){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},f}let p=m.records.commits.get(g);if(p===void 0||!p){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${o}`,token:`cherryPick ${r} ${o}`,expected:["cherry-pick abc"]},f}let y={id:m.records.seq+"-"+se(),message:`cherry-picked ${n?.message} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,n.id],branch:m.records.currBranch,type:C.CHERRY_PICK,tags:c?c.filter(Boolean):[`cherry-pick:${n.id}${n.type===C.MERGE?`|parent:${i}`:""}`]};m.records.head=y,m.records.commits.set(y.id,y),m.records.branches.set(m.records.currBranch,y.id),a.debug(m.records.branches),a.debug("in cherryPick")}},"cherryPick"),ye=t(function(e){if(e=k.sanitizeText(e,V()),!m.records.branches.has(e)){let r=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}else{m.records.currBranch=e;let r=m.records.branches.get(m.records.currBranch);if(r===void 0||!r)m.records.head=null;else m.records.head=m.records.commits.get(r)??null}},"checkout");function de(e,r,o){let c=e.indexOf(r);if(c===-1)e.push(o);else e.splice(c,1,o)}t(de,"upsert");function le(e){let r=e.reduce((i,l)=>{if(i.seq>l.seq)return i;return l},e[0]),o="";e.forEach(function(i){if(i===r)o+="\t*";else o+="\t|"});let c=[o,r.id,r.seq];for(let i in m.records.branches)if(m.records.branches.get(i)===r.id)c.push(i);if(a.debug(c.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){let i=m.records.commits.get(r.parents[0]);if(de(e,r,i),r.parents[1])e.push(m.records.commits.get(r.parents[1]))}else if(r.parents.length==0)return;else if(r.parents[0]){let i=m.records.commits.get(r.parents[0]);de(e,r,i)}e=pe(e,(i)=>i.id),le(e)}t(le,"prettyPrintCommitHistory");var Oe=t(function(){a.debug(m.records.commits);let e=xe()[0];le([e])},"prettyPrint"),Ie=t(function(){m.reset(),A()},"clear"),_e=t(function(){return[...m.records.branchConfig.values()].map((r,o)=>{if(r.order!==null&&r.order!==void 0)return r;return{...r,order:parseFloat(`0.${o}`)}}).sort((r,o)=>(r.order??0)-(o.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ge=t(function(){return m.records.branches},"getBranches"),De=t(function(){return m.records.commits},"getCommits"),xe=t(function(){let e=[...m.records.commits.values()];return e.forEach(function(r){a.debug(r.id)}),e.sort((r,o)=>r.seq-o.seq),e},"getCommitsArray"),We=t(function(){return m.records.currBranch},"getCurrentBranch"),qe=t(function(){return m.records.direction},"getDirection"),Ae=t(function(){return m.records.head},"getHead"),ue={commitType:C,getConfig:V,setDirection:ve,setOptions:Ee,getOptions:Te,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:ye,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:xe,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:R,getAccTitle:I,getAccDescription:D,setAccDescription:L,setDiagramTitle:P,getDiagramTitle:N},He=t((e,r)=>{if(re(e,r),e.dir)r.setDirection(e.dir);for(let o of e.statements)Se(o,r)},"populate"),Se=t((e,r)=>{let c={Commit:t((i)=>r.commit(Ne(i)),"Commit"),Branch:t((i)=>r.branch(Fe(i)),"Branch"),Merge:t((i)=>r.merge(ze(i)),"Merge"),Checkout:t((i)=>r.checkout(Ye(i)),"Checkout"),CherryPicking:t((i)=>r.cherryPick(je(i)),"CherryPicking")}[e.$type];if(c)c(e);else a.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ne=t((e)=>({id:e.id,msg:e.message??"",type:e.type!==void 0?C[e.type]:C.NORMAL,tags:e.tags??void 0}),"parseCommit"),Fe=t((e)=>({name:e.name,order:e.order??0}),"parseBranch"),ze=t((e)=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?C[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ye=t((e)=>e.branch,"parseCheckout"),je=t((e)=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ke={parse:t(async(e)=>{let r=await fe("gitGraph",e);a.debug(r),He(r,ue)},"parse")},Y=10,j=40,W=4,H=2,K=8,ne=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),he=12,me=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),U=t((e,r,o=!1)=>{if(o&&e>0)return(e-1)%(r-1)+1;return e%r},"calcColorIndex"),O=new Map,_=new Map,ae=30,Q=new Map,oe=[],z=0,b="LR",Ve=t(()=>{O.clear(),_.clear(),Q.clear(),z=0,oe=[],b="LR"},"clear"),be=t((e)=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e==="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach((c)=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=c.trim(),r.appendChild(i)}),r},"drawText"),we=t((e)=>{let r,o,c;if(b==="BT")o=t((i,l)=>i<=l,"comparisonFunc"),c=1/0;else o=t((i,l)=>i>=l,"comparisonFunc"),c=0;return e.forEach((i)=>{let l=b==="TB"||b=="BT"?_.get(i)?.y:_.get(i)?.x;if(l!==void 0&&o(l,c))r=i,c=l}),r},"findClosestParent"),Ze=t((e)=>{let r="",o=1/0;return e.forEach((c)=>{let i=_.get(c).y;if(i<=o)r=c,o=i}),r||void 0},"findClosestParentBT"),Xe=t((e,r,o)=>{let c=o,i=o,l=[];e.forEach((n)=>{let s=r.get(n);if(!s)throw Error(`Commit not found for key ${n}`);if(s.parents.length)c=Qe(s),i=Math.max(c,i);else l.push(s);et(s,c)}),c=i,l.forEach((n)=>{tt(n,c,o)}),e.forEach((n)=>{let s=r.get(n);if(s?.parents.length){let g=Ze(s.parents);if(c=_.get(g).y-j,c<=i)i=c;let p=O.get(s.branch).pos,y=c-Y;_.set(s.id,{x:p,y})}})},"setParallelBTPos"),Je=t((e)=>{let r=we(e.parents.filter((c)=>c!==null));if(!r)throw Error(`Closest parent not found for commit ${e.id}`);let o=_.get(r)?.y;if(o===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return o},"findClosestParentPos"),Qe=t((e)=>Je(e)+j,"calculateCommitPosition"),et=t((e,r)=>{let o=O.get(e.branch);if(!o)throw Error(`Branch not found for commit ${e.id}`);let c=o.pos,i=r+Y;return _.set(e.id,{x:c,y:i}),{x:c,y:i}},"setCommitPosition"),tt=t((e,r,o)=>{let c=O.get(e.branch);if(!c)throw Error(`Branch not found for commit ${e.id}`);let i=r+o,l=c.pos;_.set(e.id,{x:l,y:i})},"setRootPosition"),rt=t((e,r,o,c,i,l)=>{let{theme:n}=u(),s=ne.has(n??""),g=me.has(n??""),p=Ue.has(n??"");if(l===C.HIGHLIGHT)e.append("rect").attr("x",o.x-10+(s?3:0)).attr("y",o.y-10+(s?3:0)).attr("width",s?14:20).attr("height",s?14:20).attr("class",`commit ${r.id} commit-highlight${U(i,K,g)} ${c}-outer`),e.append("rect").attr("x",o.x-6+(s?2:0)).attr("y",o.y-6+(s?2:0)).attr("width",s?8:12).attr("height",s?8:12).attr("class",`commit ${r.id} commit${U(i,K,g)} ${c}-inner`);else if(l===C.CHERRY_PICK)e.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",s?7:10).attr("class",`commit ${r.id} ${c}`),e.append("circle").attr("cx",o.x-3).attr("cy",o.y+2).attr("r",s?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`),e.append("circle").attr("cx",o.x+3).attr("cy",o.y+2).attr("r",s?2.5:2.75).attr("fill",p?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`),e.append("line").attr("x1",o.x+3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`),e.append("line").attr("x1",o.x-3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke",p?"#000000":"#fff").attr("class",`commit ${r.id} ${c}`);else{let y=e.append("circle");if(y.attr("cx",o.x),y.attr("cy",o.y),y.attr("r",s?7:10),y.attr("class",`commit ${r.id} commit${U(i,K,g)}`),l===C.MERGE){let f=e.append("circle");f.attr("cx",o.x),f.attr("cy",o.y),f.attr("r",s?5:6),f.attr("class",`commit ${c} ${r.id} commit${U(i,K,g)}`)}if(l===C.REVERSE){let f=e.append("path"),d=s?4:5;f.attr("d",`M ${o.x-d},${o.y-d}L${o.x+d},${o.y+d}M${o.x-d},${o.y+d}L${o.x+d},${o.y-d}`).attr("class",`commit ${c} ${r.id} commit${U(i,K,g)}`)}}},"drawCommitBullet"),at=t((e,r,o,c,i)=>{if(r.type!==C.CHERRY_PICK&&(r.customId&&r.type===C.MERGE||r.type!==C.MERGE)&&i.showCommitLabel){let l=e.append("g"),n=l.insert("rect").attr("class","commit-label-bkg"),s=l.append("text").attr("x",c).attr("y",o.y+25).attr("class","commit-label").text(r.id),g=s.node()?.getBBox();if(g){if(n.attr("x",o.posWithOffset-g.width/2-H).attr("y",o.y+13.5).attr("width",g.width+2*H).attr("height",g.height+2*H),b==="TB"||b==="BT")n.attr("x",o.x-(g.width+4*W+5)).attr("y",o.y-12),s.attr("x",o.x-(g.width+4*W)).attr("y",o.y+g.height-12);else s.attr("x",o.posWithOffset-g.width/2);if(i.rotateCommitLabel)if(b==="TB"||b==="BT")s.attr("transform","rotate(-45, "+o.x+", "+o.y+")"),n.attr("transform","rotate(-45, "+o.x+", "+o.y+")");else{let p=-7.5-(g.width+10)/25*9.5,y=10+g.width/25*8.5;l.attr("transform","translate("+p+", "+y+") rotate(-45, "+c+", "+o.y+")")}}}},"drawCommitLabel"),ot=t((e,r,o,c)=>{if(r.tags.length>0){let i=0,l=0,n=0,s=[];for(let g of r.tags.reverse()){let p=e.insert("polygon"),y=e.append("circle"),f=e.append("text").attr("y",o.y-16-i).attr("class","tag-label").text(g),d=f.node()?.getBBox();if(!d)throw Error("Tag bbox not found");l=Math.max(l,d.width),n=Math.max(n,d.height),f.attr("x",o.posWithOffset-d.width/2),s.push({tag:f,hole:y,rect:p,yOffset:i}),i+=20}for(let{tag:g,hole:p,rect:y,yOffset:f}of s){let d=n/2,w=o.y-19.2-f;if(y.attr("class","tag-label-bkg").attr("points",`
2
+ ${c-l/2-W/2},${w+H}
3
+ ${c-l/2-W/2},${w-H}
4
+ ${o.posWithOffset-l/2-W},${w-d-H}
5
+ ${o.posWithOffset+l/2+W},${w-d-H}
6
+ ${o.posWithOffset+l/2+W},${w+d+H}
7
+ ${o.posWithOffset-l/2-W},${w+d+H}`),p.attr("cy",w).attr("cx",c-l/2+W/2).attr("r",1.5).attr("class","tag-hole"),b==="TB"||b==="BT"){let x=c+f;y.attr("class","tag-label-bkg").attr("points",`
8
8
  ${o.x},${x+2}
9
9
  ${o.x},${x-2}
10
10
  ${o.x+Y},${x-d-2}
11
11
  ${o.x+Y+l+4},${x-d-2}
12
12
  ${o.x+Y+l+4},${x+d+2}
13
- ${o.x+Y},${x+d+2}`).attr("transform","translate(12,12) rotate(45, "+o.x+","+c+")"),p.attr("cx",o.x+q/2).attr("cy",x).attr("transform","translate(12,12) rotate(45, "+o.x+","+c+")"),g.attr("x",o.x+5).attr("y",x+3).attr("transform","translate(14,14) rotate(45, "+o.x+","+c+")")}}}},"drawCommitTags"),st=t((e)=>{switch(e.customType??e.type){case C.NORMAL:return"commit-normal";case C.REVERSE:return"commit-reverse";case C.HIGHLIGHT:return"commit-highlight";case C.MERGE:return"commit-merge";case C.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),nt=t((e,r,o,c)=>{let i={x:0,y:0};if(e.parents.length>0){let l=we(e.parents);if(l){let n=c.get(l)??i;if(r==="TB")return n.y+j;else if(r==="BT")return(c.get(e.id)??i).y-j;else return n.x+j}}else if(r==="TB")return ae;else if(r==="BT")return(c.get(e.id)??i).y-j;else return 0;return 0},"calculatePosition"),ct=t((e,r,o)=>{let c=b==="BT"&&o?r:r+Y,i=_.get(e.branch)?.pos,l=b==="TB"||b==="BT"?_.get(e.branch)?.pos:c;if(l===void 0||i===void 0)throw Error(`Position were undefined for commit ${e.id}`);let n=ne.has(u().theme??""),s=b==="TB"||b==="BT"?c:i+(n?he/2+1:-2);return{x:l,y:s,posWithOffset:c}},"getCommitPosition"),$e=t((e,r,o,c)=>{let i=e.append("g").attr("class","commit-bullets"),l=e.append("g").attr("class","commit-labels"),n=b==="TB"||b==="BT"?ae:0,s=[...r.keys()],g=c.parallelCommits??!1,p=t((f,d)=>{let w=r.get(f)?.seq,x=r.get(d)?.seq;return w!==void 0&&x!==void 0?w-x:0},"sortKeys"),y=s.sort(p);if(b==="BT"){if(g)Xe(y,r,n);y=y.reverse()}y.forEach((f)=>{let d=r.get(f);if(!d)throw Error(`Commit not found for key ${f}`);if(g)n=nt(d,b,n,G);let w=ct(d,n,g);if(o){let x=st(d),v=d.customType??d.type,E=_.get(d.branch)?.index??0;rt(i,d,w,x,E,v),at(l,d,w,n,c),ot(l,d,w,n)}if(b==="TB"||b==="BT")G.set(d.id,{x:w.x,y:w.posWithOffset});else G.set(d.id,{x:w.posWithOffset,y:w.y});if(n=b==="BT"&&g?n+j:n+j+Y,n>z)z=n})},"drawCommits"),it=t((e,r,o,c,i)=>{let n=(b==="TB"||b==="BT"?o.x<c.x:o.y<c.y)?r.branch:e.branch,s=t((p)=>p.branch===n,"isOnBranchToGetCurve"),g=t((p)=>p.seq>e.seq&&p.seq<r.seq,"isBetweenCommits");return[...i.values()].some((p)=>g(p)&&s(p))},"shouldRerouteArrow"),ee=t((e,r,o=0)=>{let c=e+Math.abs(e-r)/2;if(o>5)return c;if(oe.every((n)=>Math.abs(n-c)>=10))return oe.push(c),c;let l=Math.abs(e-r);return ee(e,r-l/5,o+1)},"findLane"),dt=t((e,r,o,c)=>{let{theme:i}=u(),l=me.has(i??""),n=G.get(r.id),s=G.get(o.id);if(n===void 0||s===void 0)throw Error(`Commit positions not found for commits ${r.id} and ${o.id}`);let g=it(r,o,n,s,c),p="",y="",f=0,d=0,w=_.get(o.branch)?.index;if(o.type===C.MERGE&&r.id!==o.parents[0])w=_.get(r.branch)?.index;let x;if(g){p="A 10 10, 0, 0, 0,",y="A 10 10, 0, 0, 1,",f=10,d=10;let v=n.y<s.y?ee(n.y,s.y):ee(s.y,n.y),E=n.x<s.x?ee(n.x,s.x):ee(s.x,n.x);if(b==="TB")if(n.x<s.x)x=`M ${n.x} ${n.y} L ${E-f} ${n.y} ${y} ${E} ${n.y+d} L ${E} ${s.y-f} ${p} ${E+d} ${s.y} L ${s.x} ${s.y}`;else w=_.get(r.branch)?.index,x=`M ${n.x} ${n.y} L ${E+f} ${n.y} ${p} ${E} ${n.y+d} L ${E} ${s.y-f} ${y} ${E-d} ${s.y} L ${s.x} ${s.y}`;else if(b==="BT")if(n.x<s.x)x=`M ${n.x} ${n.y} L ${E-f} ${n.y} ${p} ${E} ${n.y-d} L ${E} ${s.y+f} ${y} ${E+d} ${s.y} L ${s.x} ${s.y}`;else w=_.get(r.branch)?.index,x=`M ${n.x} ${n.y} L ${E+f} ${n.y} ${y} ${E} ${n.y-d} L ${E} ${s.y+f} ${p} ${E-d} ${s.y} L ${s.x} ${s.y}`;else if(n.y<s.y)x=`M ${n.x} ${n.y} L ${n.x} ${v-f} ${p} ${n.x+d} ${v} L ${s.x-f} ${v} ${y} ${s.x} ${v+d} L ${s.x} ${s.y}`;else w=_.get(r.branch)?.index,x=`M ${n.x} ${n.y} L ${n.x} ${v+f} ${y} ${n.x+d} ${v} L ${s.x-f} ${v} ${p} ${s.x} ${v-d} L ${s.x} ${s.y}`}else if(p="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",f=20,d=20,b==="TB"){if(n.x<s.x)if(o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${n.x} ${s.y-f} ${p} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${y} ${s.x} ${n.y+d} L ${s.x} ${s.y}`;if(n.x>s.x)if(p="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",f=20,d=20,o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${n.x} ${s.y-f} ${y} ${n.x-d} ${s.y} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${s.x+f} ${n.y} ${p} ${s.x} ${n.y+d} L ${s.x} ${s.y}`;if(n.x===s.x)x=`M ${n.x} ${n.y} L ${s.x} ${s.y}`}else if(b==="BT"){if(n.x<s.x)if(o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${n.x} ${s.y+f} ${y} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${p} ${s.x} ${n.y-d} L ${s.x} ${s.y}`;if(n.x>s.x)if(p="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",f=20,d=20,o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${n.x} ${s.y+f} ${p} ${n.x-d} ${s.y} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${s.x+f} ${n.y} ${y} ${s.x} ${n.y-d} L ${s.x} ${s.y}`;if(n.x===s.x)x=`M ${n.x} ${n.y} L ${s.x} ${s.y}`}else{if(n.y<s.y)if(o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${y} ${s.x} ${n.y+d} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${n.x} ${s.y-f} ${p} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;if(n.y>s.y)if(o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${p} ${s.x} ${n.y-d} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${n.x} ${s.y+f} ${y} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;if(n.y===s.y)x=`M ${n.x} ${n.y} L ${s.x} ${s.y}`}if(x===void 0)throw Error("Line definition not found");e.append("path").attr("d",x).attr("class","arrow arrow"+U(w,K,l))},"drawArrow"),ht=t((e,r)=>{let o=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach((c)=>{let i=r.get(c);if(i.parents&&i.parents.length>0)i.parents.forEach((l)=>{dt(o,r.get(l),i,r)})})},"drawArrows"),lt=t((e,r,o,c)=>{let{look:i,theme:l,themeVariables:n}=u(),{dropShadow:s,THEME_COLOR_LIMIT:g}=n,p=ne.has(l??""),y=me.has(l??""),f=e.append("g");r.forEach((d,w)=>{let x=U(w,p?g:K,y),v=_.get(d.name)?.pos;if(v===void 0)throw Error(`Position not found for branch ${d.name}`);let E=b==="TB"||b==="BT"?v:p?v+he/2+1:v-2,T=f.append("line");if(T.attr("x1",0),T.attr("y1",E),T.attr("x2",z),T.attr("y2",E),T.attr("class","branch branch"+x),b==="TB")T.attr("y1",ae),T.attr("x1",v),T.attr("y2",z),T.attr("x2",v);else if(b==="BT")T.attr("y1",z),T.attr("x1",v),T.attr("y2",ae),T.attr("x2",v);oe.push(E);let ce=d.name,J=be(ce),W=f.insert("rect"),H=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+x);H.node().appendChild(J);let O=J.getBBox(),ge=p?0:4,te=p?16:0,Z=p?he:0;if(i==="neo")W.attr("data-look","neo");if(W.attr("class","branchLabelBkg label"+x).attr("style",i==="neo"?`filter:${p?`url(#${c}-drop-shadow)`:s}`:"").attr("rx",ge).attr("ry",ge).attr("x",-O.width-4-(o.rotateCommitLabel===!0?30:0)).attr("y",-O.height/2+10).attr("width",O.width+18+te).attr("height",O.height+4+Z),H.attr("transform","translate("+(-O.width-14-(o.rotateCommitLabel===!0?30:0)+te/2)+", "+(E-O.height/2-2)+")"),b==="TB"){if(W.attr("x",v-O.width/2-10).attr("y",0),H.attr("transform","translate("+(v-O.width/2-5)+", 0)"),p)W.attr("transform",`translate(${-te/2-3}, ${-Z-10})`),H.attr("transform","translate("+(v-O.width/2-5)+", "+(-Z*2+7)+")")}else if(b==="BT"){if(W.attr("x",v-O.width/2-10).attr("y",z),H.attr("transform","translate("+(v-O.width/2-5)+", "+z+")"),p)W.attr("transform",`translate(${-te/2-3}, ${Z+10})`),H.attr("transform","translate("+(v-O.width/2-5)+", "+(z+Z*2+4)+")")}else W.attr("transform","translate(-19, "+(E-12-Z/2)+")")})},"drawBranches"),mt=t(function(e,r,o,c,i){return _.set(e,{pos:r,index:o}),r+=50+(i?40:0)+(b==="TB"||b==="BT"?c.width/2:0),r},"setBranchPosition"),gt=t(function(e,r,o,c){Ve(),a.debug("in gitgraph renderer",e+`
14
- `,"id:",r,o);let i=c.db;if(!i.getConfig){a.error("getConfig method is not available on db");return}let l=i.getConfig(),n=l.rotateCommitLabel??!1;Q=i.getCommits();let s=i.getBranchesAsObjArray();b=i.getDirection();let g=h(`[id="${r}"]`),{look:p,theme:y,themeVariables:f}=u(),{useGradient:d,gradientStart:w,gradientStop:x,filterColor:v}=f;if(d){let T=g.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");T.append("stop").attr("offset","0%").attr("stop-color",w).attr("stop-opacity",1),T.append("stop").attr("offset","100%").attr("stop-color",x).attr("stop-opacity",1)}if(p==="neo"&&ne.has(y??""))g.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",v);let E=0;if(s.forEach((T,ce)=>{let J=be(T.name),W=g.append("g"),ie=W.insert("g").attr("class","branchLabel"),H=ie.insert("g").attr("class","label branch-label");H.node()?.appendChild(J);let O=J.getBBox();E=mt(T.name,E,ce,O,n),H.remove(),ie.remove(),W.remove()}),$e(g,Q,!1,l),l.showBranches)lt(g,s,l,r);ht(g,Q),$e(g,Q,!0,l),F.insertTitle(g,"gitTitleText",l.titleTopMargin??0,i.getDiagramTitle()),za(void 0,g,l.diagramPadding,l.useMaxWidth)},"draw"),ft={draw:gt},Be=8,ke=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),$t=new Set(["redux-color","redux-dark-color"]),pt=new Set(["neo","neo-dark"]),yt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),xt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),ut=t((e)=>{let{svgId:r}=e,o="";if(e.useGradient&&r)for(let c=0;c<e.THEME_COLOR_LIMIT;c++)o+=`
13
+ ${o.x+Y},${x+d+2}`).attr("transform","translate(12,12) rotate(45, "+o.x+","+c+")"),p.attr("cx",o.x+W/2).attr("cy",x).attr("transform","translate(12,12) rotate(45, "+o.x+","+c+")"),g.attr("x",o.x+5).attr("y",x+3).attr("transform","translate(14,14) rotate(45, "+o.x+","+c+")")}}}},"drawCommitTags"),st=t((e)=>{switch(e.customType??e.type){case C.NORMAL:return"commit-normal";case C.REVERSE:return"commit-reverse";case C.HIGHLIGHT:return"commit-highlight";case C.MERGE:return"commit-merge";case C.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),nt=t((e,r,o,c)=>{let i={x:0,y:0};if(e.parents.length>0){let l=we(e.parents);if(l){let n=c.get(l)??i;if(r==="TB")return n.y+j;else if(r==="BT")return(c.get(e.id)??i).y-j;else return n.x+j}}else if(r==="TB")return ae;else if(r==="BT")return(c.get(e.id)??i).y-j;else return 0;return 0},"calculatePosition"),ct=t((e,r,o)=>{let c=b==="BT"&&o?r:r+Y,i=O.get(e.branch)?.pos,l=b==="TB"||b==="BT"?O.get(e.branch)?.pos:c;if(l===void 0||i===void 0)throw Error(`Position were undefined for commit ${e.id}`);let n=ne.has(u().theme??""),s=b==="TB"||b==="BT"?c:i+(n?he/2+1:-2);return{x:l,y:s,posWithOffset:c}},"getCommitPosition"),$e=t((e,r,o,c)=>{let i=e.append("g").attr("class","commit-bullets"),l=e.append("g").attr("class","commit-labels"),n=b==="TB"||b==="BT"?ae:0,s=[...r.keys()],g=c.parallelCommits??!1,p=t((f,d)=>{let w=r.get(f)?.seq,x=r.get(d)?.seq;return w!==void 0&&x!==void 0?w-x:0},"sortKeys"),y=s.sort(p);if(b==="BT"){if(g)Xe(y,r,n);y=y.reverse()}y.forEach((f)=>{let d=r.get(f);if(!d)throw Error(`Commit not found for key ${f}`);if(g)n=nt(d,b,n,_);let w=ct(d,n,g);if(o){let x=st(d),v=d.customType??d.type,E=O.get(d.branch)?.index??0;rt(i,d,w,x,E,v),at(l,d,w,n,c),ot(l,d,w,n)}if(b==="TB"||b==="BT")_.set(d.id,{x:w.x,y:w.posWithOffset});else _.set(d.id,{x:w.posWithOffset,y:w.y});if(n=b==="BT"&&g?n+j:n+j+Y,n>z)z=n})},"drawCommits"),it=t((e,r,o,c,i)=>{let n=(b==="TB"||b==="BT"?o.x<c.x:o.y<c.y)?r.branch:e.branch,s=t((p)=>p.branch===n,"isOnBranchToGetCurve"),g=t((p)=>p.seq>e.seq&&p.seq<r.seq,"isBetweenCommits");return[...i.values()].some((p)=>g(p)&&s(p))},"shouldRerouteArrow"),ee=t((e,r,o=0)=>{let c=e+Math.abs(e-r)/2;if(o>5)return c;if(oe.every((n)=>Math.abs(n-c)>=10))return oe.push(c),c;let l=Math.abs(e-r);return ee(e,r-l/5,o+1)},"findLane"),dt=t((e,r,o,c)=>{let{theme:i}=u(),l=me.has(i??""),n=_.get(r.id),s=_.get(o.id);if(n===void 0||s===void 0)throw Error(`Commit positions not found for commits ${r.id} and ${o.id}`);let g=it(r,o,n,s,c),p="",y="",f=0,d=0,w=O.get(o.branch)?.index;if(o.type===C.MERGE&&r.id!==o.parents[0])w=O.get(r.branch)?.index;let x;if(g){p="A 10 10, 0, 0, 0,",y="A 10 10, 0, 0, 1,",f=10,d=10;let v=n.y<s.y?ee(n.y,s.y):ee(s.y,n.y),E=n.x<s.x?ee(n.x,s.x):ee(s.x,n.x);if(b==="TB")if(n.x<s.x)x=`M ${n.x} ${n.y} L ${E-f} ${n.y} ${y} ${E} ${n.y+d} L ${E} ${s.y-f} ${p} ${E+d} ${s.y} L ${s.x} ${s.y}`;else w=O.get(r.branch)?.index,x=`M ${n.x} ${n.y} L ${E+f} ${n.y} ${p} ${E} ${n.y+d} L ${E} ${s.y-f} ${y} ${E-d} ${s.y} L ${s.x} ${s.y}`;else if(b==="BT")if(n.x<s.x)x=`M ${n.x} ${n.y} L ${E-f} ${n.y} ${p} ${E} ${n.y-d} L ${E} ${s.y+f} ${y} ${E+d} ${s.y} L ${s.x} ${s.y}`;else w=O.get(r.branch)?.index,x=`M ${n.x} ${n.y} L ${E+f} ${n.y} ${y} ${E} ${n.y-d} L ${E} ${s.y+f} ${p} ${E-d} ${s.y} L ${s.x} ${s.y}`;else if(n.y<s.y)x=`M ${n.x} ${n.y} L ${n.x} ${v-f} ${p} ${n.x+d} ${v} L ${s.x-f} ${v} ${y} ${s.x} ${v+d} L ${s.x} ${s.y}`;else w=O.get(r.branch)?.index,x=`M ${n.x} ${n.y} L ${n.x} ${v+f} ${y} ${n.x+d} ${v} L ${s.x-f} ${v} ${p} ${s.x} ${v-d} L ${s.x} ${s.y}`}else if(p="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",f=20,d=20,b==="TB"){if(n.x<s.x)if(o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${n.x} ${s.y-f} ${p} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${y} ${s.x} ${n.y+d} L ${s.x} ${s.y}`;if(n.x>s.x)if(p="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",f=20,d=20,o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${n.x} ${s.y-f} ${y} ${n.x-d} ${s.y} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${s.x+f} ${n.y} ${p} ${s.x} ${n.y+d} L ${s.x} ${s.y}`;if(n.x===s.x)x=`M ${n.x} ${n.y} L ${s.x} ${s.y}`}else if(b==="BT"){if(n.x<s.x)if(o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${n.x} ${s.y+f} ${y} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${p} ${s.x} ${n.y-d} L ${s.x} ${s.y}`;if(n.x>s.x)if(p="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",f=20,d=20,o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${n.x} ${s.y+f} ${p} ${n.x-d} ${s.y} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${s.x+f} ${n.y} ${y} ${s.x} ${n.y-d} L ${s.x} ${s.y}`;if(n.x===s.x)x=`M ${n.x} ${n.y} L ${s.x} ${s.y}`}else{if(n.y<s.y)if(o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${y} ${s.x} ${n.y+d} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${n.x} ${s.y-f} ${p} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;if(n.y>s.y)if(o.type===C.MERGE&&r.id!==o.parents[0])x=`M ${n.x} ${n.y} L ${s.x-f} ${n.y} ${p} ${s.x} ${n.y-d} L ${s.x} ${s.y}`;else x=`M ${n.x} ${n.y} L ${n.x} ${s.y+f} ${y} ${n.x+d} ${s.y} L ${s.x} ${s.y}`;if(n.y===s.y)x=`M ${n.x} ${n.y} L ${s.x} ${s.y}`}if(x===void 0)throw Error("Line definition not found");e.append("path").attr("d",x).attr("class","arrow arrow"+U(w,K,l))},"drawArrow"),ht=t((e,r)=>{let o=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach((c)=>{let i=r.get(c);if(i.parents&&i.parents.length>0)i.parents.forEach((l)=>{dt(o,r.get(l),i,r)})})},"drawArrows"),lt=t((e,r,o,c)=>{let{look:i,theme:l,themeVariables:n}=u(),{dropShadow:s,THEME_COLOR_LIMIT:g}=n,p=ne.has(l??""),y=me.has(l??""),f=e.append("g");r.forEach((d,w)=>{let x=U(w,p?g:K,y),v=O.get(d.name)?.pos;if(v===void 0)throw Error(`Position not found for branch ${d.name}`);let E=b==="TB"||b==="BT"?v:p?v+he/2+1:v-2,T=f.append("line");if(T.attr("x1",0),T.attr("y1",E),T.attr("x2",z),T.attr("y2",E),T.attr("class","branch branch"+x),b==="TB")T.attr("y1",ae),T.attr("x1",v),T.attr("y2",z),T.attr("x2",v);else if(b==="BT")T.attr("y1",z),T.attr("x1",v),T.attr("y2",ae),T.attr("x2",v);oe.push(E);let ce=d.name,J=be(ce),G=f.insert("rect"),q=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+x);q.node().appendChild(J);let M=J.getBBox(),ge=p?0:4,te=p?16:0,Z=p?he:0;if(i==="neo")G.attr("data-look","neo");if(G.attr("class","branchLabelBkg label"+x).attr("style",i==="neo"?`filter:${p?`url(#${c}-drop-shadow)`:s}`:"").attr("rx",ge).attr("ry",ge).attr("x",-M.width-4-(o.rotateCommitLabel===!0?30:0)).attr("y",-M.height/2+10).attr("width",M.width+18+te).attr("height",M.height+4+Z),q.attr("transform","translate("+(-M.width-14-(o.rotateCommitLabel===!0?30:0)+te/2)+", "+(E-M.height/2-2)+")"),b==="TB"){if(G.attr("x",v-M.width/2-10).attr("y",0),q.attr("transform","translate("+(v-M.width/2-5)+", 0)"),p)G.attr("transform",`translate(${-te/2-3}, ${-Z-10})`),q.attr("transform","translate("+(v-M.width/2-5)+", "+(-Z*2+7)+")")}else if(b==="BT"){if(G.attr("x",v-M.width/2-10).attr("y",z),q.attr("transform","translate("+(v-M.width/2-5)+", "+z+")"),p)G.attr("transform",`translate(${-te/2-3}, ${Z+10})`),q.attr("transform","translate("+(v-M.width/2-5)+", "+(z+Z*2+4)+")")}else G.attr("transform","translate(-19, "+(E-12-Z/2)+")")})},"drawBranches"),mt=t(function(e,r,o,c,i){return O.set(e,{pos:r,index:o}),r+=50+(i?40:0)+(b==="TB"||b==="BT"?c.width/2:0),r},"setBranchPosition"),gt=t(function(e,r,o,c){Ve(),a.debug("in gitgraph renderer",e+`
14
+ `,"id:",r,o);let i=c.db;if(!i.getConfig){a.error("getConfig method is not available on db");return}let l=i.getConfig(),n=l.rotateCommitLabel??!1;Q=i.getCommits();let s=i.getBranchesAsObjArray();b=i.getDirection();let g=h(`[id="${r}"]`),{look:p,theme:y,themeVariables:f}=u(),{useGradient:d,gradientStart:w,gradientStop:x,filterColor:v}=f;if(d){let T=g.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");T.append("stop").attr("offset","0%").attr("stop-color",w).attr("stop-opacity",1),T.append("stop").attr("offset","100%").attr("stop-color",x).attr("stop-opacity",1)}if(p==="neo"&&ne.has(y??""))g.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",v);let E=0;if(s.forEach((T,ce)=>{let J=be(T.name),G=g.append("g"),ie=G.insert("g").attr("class","branchLabel"),q=ie.insert("g").attr("class","label branch-label");q.node()?.appendChild(J);let M=J.getBBox();E=mt(T.name,E,ce,M,n),q.remove(),ie.remove(),G.remove()}),$e(g,Q,!1,l),l.showBranches)lt(g,s,l,r);ht(g,Q),$e(g,Q,!0,l),F.insertTitle(g,"gitTitleText",l.titleTopMargin??0,i.getDiagramTitle()),za(void 0,g,l.diagramPadding,l.useMaxWidth)},"draw"),ft={draw:gt},Be=8,ke=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),$t=new Set(["redux-color","redux-dark-color"]),pt=new Set(["neo","neo-dark"]),yt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),xt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),ut=t((e)=>{let{svgId:r}=e,o="";if(e.useGradient&&r)for(let c=0;c<e.THEME_COLOR_LIMIT;c++)o+=`
15
15
  .label${c} { fill: ${e.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${e.strokeWidth};}
16
16
  `;return o},"genGitGraphGradient"),bt=t((e)=>{let r=S(),{theme:o,themeVariables:c}=r,{borderColorArray:i}=c,l=ke.has(o);if(pt.has(o)){let n="";for(let s=0;s<e.THEME_COLOR_LIMIT;s++)if(s===0)n+=`
17
17
  .branch-label${s} { fill: ${e.nodeBorder};}
Binary file
Binary file
@@ -0,0 +1 @@
1
+ import{v,o,i,r,p,e,n,y,rr,ye}from"./chunk-b83bzjcx.js";import{ui,di,pi}from"./chunk-m7kypzvp.js";var te={global:"全局",project:"项目",custom:"自定义",builtin:"内置"};function F({skill:s,issue:x,connection:h}){let{Button:E,CopyButton:C,style:u,useTheme:R}=y();R();let[l,k]=r(),[L,P]=r(),[f,O]=r(0);return o(()=>{let m=!0;P(void 0),k(void 0);let b=new URLSearchParams;if(s.projectID)b.set("projectID",s.projectID);if(s.location)b.set("location",s.location);let S=b.toString()?`?${b.toString()}`:"";return Promise.all([h.request(`/api/skills/${encodeURIComponent(s.name)}/content${S}`),h.request(`/api/skills/${encodeURIComponent(s.name)}/files${S}`)]).then(([g,D])=>{if(m)k({text:g.text,files:D.files})}).catch((g)=>{if(m)P(g instanceof Error?g.message:"读取失败")}),()=>{m=!1}},[h,s.name,s.projectID,s.location,f]),n("div",{className:"min-w-0 space-y-5 text-sm text-ink",children:[e("p",{className:"whitespace-pre-wrap break-words [overflow-wrap:anywhere] text-dim",children:s.description||"暂无描述"}),n("div",{children:[n("p",{className:"break-all text-xs text-dim",children:[te[s.scope],s.projectName?` · ${s.projectName}`:""]}),n("div",{className:"mt-1 flex min-w-0 items-center gap-2",children:[e("code",{className:u("markdown.inlineCode","min-w-0 flex-1 break-all text-xs"),children:s.location}),e(C,{text:s.location,label:"复制完整路径",className:"size-10"})]})]}),n("ul",{className:"space-y-1 break-words text-xs text-dim",children:[e("li",{children:"启用状态按名称生效,影响同名技能在新会话与压缩刷新后的可用性。"}),s.disableModelInvocation&&e("li",{children:"仅手动:可由用户调用,不向模型自动提供。"}),s.platforms&&n("li",{children:["平台限制:",s.platforms.join("、")]}),s.disabled&&e("li",{children:"已禁用:不会提供给新会话或压缩刷新后的会话。"}),x?.overriddenBy&&n("li",{className:"break-all",children:["被覆盖:同名技能优先使用 ",x.overriddenBy]})]}),s.commands?.length?n("div",{children:[e("h3",{className:"font-medium",children:"bin 命令"}),e("p",{className:"mt-1 text-xs text-dim",children:"技能目录中的可执行命令。"}),e("ul",{className:"mt-2 space-y-1 font-mono text-xs",children:s.commands.map((m)=>e("li",{className:"break-all",children:m},m))})]}):null,L?n("div",{role:"alert",className:"space-y-2",children:[n("p",{className:"break-words text-danger",children:["读取失败:",L]}),e(E,{className:"h-10",onClick:()=>O(f+1),children:"重试"})]}):!l?e("p",{role:"status",className:"text-dim",children:"正在读取文件…"}):n(p,{children:[n("section",{children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e("h3",{className:"font-medium",children:"SKILL.md 原文"}),e(C,{text:l.text,label:"复制 SKILL.md 原文",className:"size-10"})]}),n("p",{className:"mb-2 text-xs text-faint",children:[l.text.length.toLocaleString()," 字符 · 约 ",Math.ceil(l.text.length/4).toLocaleString()," ","tokens(估算)"]}),e("pre",{className:u("surface.subtle",u("chat.toolOutput"),"rounded-lg bg-raised p-3 text-xs leading-5 break-all"),children:l.text})]}),n("section",{children:[n("h3",{className:"font-medium",children:["目录文件 · ",l.files.length,l.files.length===200?"(最多显示 200 个)":""]}),e("ul",{className:"mt-2 space-y-1 font-mono text-xs text-dim",children:l.files.map((m)=>e("li",{className:"break-all",children:m},m))})]})]})]})}var A="all",G="non-project";function me({connection:s}){let{Button:x,Select:h,Dialog:E,CatalogRow:C,style:u,useTheme:R}=y();R();let[l,k]=r([]),[L,P]=r([]),[f,O]=r(A),[m,b]=r([]),[S,g]=r(),[D,H]=r(""),[w,B]=r(),[N,q]=r(!0),[K,z]=r(),[W,Q]=r(),d=i(0),I=i(!1),j=v(async(t=!1)=>{let a=++d.current;I.current=!0,q(!0);try{if(t)await s.request("/api/skills/rescan",{method:"POST"});let[c,U,T]=await Promise.all([s.request("/api/skills?all=true"),s.request("/api/skills/settings"),s.request("/api/projects")]);if(a!==d.current)return;k(c.skills),P(T),b(c.issues),g(U),Q(new Date),z(void 0)}catch(c){if(a===d.current)z(c instanceof Error?c.message:"读取失败")}finally{if(a===d.current)I.current=!1,q(!1)}},[s]);o(()=>(j(),()=>{d.current++}),[j]);async function V(t){if(I.current)return;I.current=!0;let a=++d.current;q(!0);try{let c=await s.request("/api/skills/settings",{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(a!==d.current)return;g(c),await j()}catch(c){if(a!==d.current)return;z(c instanceof Error?c.message:"保存设置失败"),I.current=!1,q(!1)}}let X=D.trim().toLocaleLowerCase(),Y=L.filter((t)=>l.some((a)=>a.projectID===t.id)),J=f===A?l:l.filter((t)=>{if(t.scope!=="project")return!0;return f!==G&&t.projectID===f}),M=J.filter((t)=>`${t.name} ${t.description??""}`.toLocaleLowerCase().includes(X)),_=(t)=>m.find((a)=>a.kind==="overridden"&&(a.path==="<built-in>"?t.scope==="builtin":a.path.replace(/\\/g,"/")===`${t.location.replace(/\\/g,"/")}/SKILL.md`));return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[e("h2",{className:u("settings.groupTitle"),children:"技能"}),e("p",{"aria-live":"polite",className:u("settings.groupDesc"),children:W&&`找到 ${J.length} 个 · ${W.toLocaleTimeString("zh-CN",{hour12:!1})}`})]}),n("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e(h,{value:f,disabled:N,onValueChange:(t)=>{B(void 0),O(t)},groups:[{options:[{value:A,label:"全部来源"},{value:G,label:"非项目技能"}]},...ui(Y)],className:"w-44"}),n(x,{variant:"ghost",disabled:N,onClick:()=>j(!0),className:"h-9 px-2.5 text-xs",children:[e(ye,{className:`size-3.5 ${N?"animate-spin":""}`}),e("span",{className:"ml-1",children:"重新扫描"})]})]})]}),K&&n("div",{role:"alert",className:"mb-3 flex flex-wrap items-center gap-2 rounded-xl border border-line p-3",children:[n("p",{className:"min-w-0 flex-1 break-words text-sm text-danger",children:["无法更新技能:",K]}),e(x,{disabled:N,onClick:()=>j(),children:"重试"})]}),e(di,{label:"搜索技能",placeholder:"搜索技能",value:D,onChange:H}),e("div",{className:u("settings.groupBox"),children:N&&!l.length?e(pi,{}):M.length===0?e("p",{className:"p-4 text-sm text-dim",children:"没有找到匹配的技能"}):e("ul",{className:"divide-y divide-line",children:M.map((t)=>{let a=_(t),c=t.disabled;return e("li",{children:e(C,{name:t.name,selectLabel:`查看技能 ${t.name}`,onSelect:()=>B(t),description:t.description,inactive:c,aside:n(p,{children:[a&&n("span",{className:"flex items-center gap-1 text-xs text-warning",children:[e(rr,{className:"size-3.5"}),"被覆盖"]}),e("span",{className:u("control.badge"),children:t.scope==="project"?"项目":t.scope==="builtin"?"内置":"全局"})]}),toggle:{checked:!c,label:`启用技能 ${t.name}`,disabled:N,onCheckedChange:(U)=>{if(!S)return;let T=S.disabled??[],Z=U?T.filter((ee)=>ee!==t.name):[...T,t.name];V({...S,disabled:Z})}}})},`${t.scope}:${t.projectID??""}:${t.name}`)})})})]}),e(E,{open:Boolean(w),onOpenChange:(t)=>{if(!t)B(void 0)},title:w?.name??"",size:"lg",footer:e("div",{className:"flex w-full justify-end",children:e(x,{variant:"primary",onClick:()=>B(void 0),children:"关闭"})}),children:w&&e(F,{skill:w,issue:_(w),connection:s})})]})}export{me as SkillsSection};
Binary file
Binary file
@@ -0,0 +1 @@
1
+ import{Ca}from"./chunk-21d8pzcm.js";export{Ca as createRailroadAbnfServices};
Binary file
Binary file
@@ -1,2 +1,2 @@
1
- import{v,o,r,e,n,y,be}from"./chunk-qjg6dw46.js";import{ji}from"./chunk-recfg8af.js";function jn(t){let{Button:i,SettingActions:l,cn:d}=y();return n(l,{children:[t.notice&&n("span",{role:t.notice.type==="error"?"alert":"status",className:d("mr-auto flex min-w-0 items-center gap-1.5 text-xs",t.notice.type==="success"?"text-success":"text-danger"),children:[t.notice.type==="success"?e(ji,{className:"size-3.5 shrink-0"}):e(be,{className:"size-3.5 shrink-0"}),e("span",{className:"min-w-0 break-words",children:t.notice.text})]}),t.dirty&&e(i,{type:"button",variant:"ghost",size:"sm",disabled:t.busy,onClick:t.onReset,children:"撤销更改"}),e(i,{form:t.formID,type:"submit",variant:"primary",size:"sm",disabled:t.busy||!t.dirty,children:t.saving?"保存中…":"保存"})]})}function Hr(t){let{connection:i,endpoint:l,loadError:d}=t,[g,S]=r(null),[c,f]=r(null),[N,P]=r({models:[]}),[b,p]=r(!0),[M,T]=r(!1),[h,x]=r(!1),[k,a]=r(null),m=v(async(u=!1)=>{if(u)T(!0);else p(!0);a(null);try{let[s,C]=await Promise.all([i.request(l),i.request("/api/models")]);S(s),f(s),P(C)}catch(s){a({type:"error",text:s instanceof Error?s.message:d})}finally{p(!1),T(!1)}},[i,l,d]);o(()=>{m()},[m]);let w=c&&g?t.differs(c,g):!1;return{settings:c,modelList:N,loading:b,refreshing:M,saving:h,notice:k,dirty:w,load:m,save:async(u)=>{if(u?.preventDefault(),!c||h||b)return;x(!0),a(null);try{let s=await i.request(l,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.toBody(c))});S(s),f(s),a({type:"success",text:"设置已保存"})}catch(s){a({type:"error",text:s instanceof Error?s.message:"保存设置失败"})}finally{x(!1)}},reset:()=>{f(g),a(null)},edit:(u)=>{f((s)=>s?u(s):null),a(null)}}}
1
+ import{v,o,r,e,n,y,be}from"./chunk-b83bzjcx.js";import{ji}from"./chunk-m5b7hny2.js";function jn(t){let{Button:i,SettingActions:l,cn:d}=y();return n(l,{children:[t.notice&&n("span",{role:t.notice.type==="error"?"alert":"status",className:d("mr-auto flex min-w-0 items-center gap-1.5 text-xs",t.notice.type==="success"?"text-success":"text-danger"),children:[t.notice.type==="success"?e(ji,{className:"size-3.5 shrink-0"}):e(be,{className:"size-3.5 shrink-0"}),e("span",{className:"min-w-0 break-words",children:t.notice.text})]}),t.dirty&&e(i,{type:"button",variant:"ghost",size:"sm",disabled:t.busy,onClick:t.onReset,children:"撤销更改"}),e(i,{form:t.formID,type:"submit",variant:"primary",size:"sm",disabled:t.busy||!t.dirty,children:t.saving?"保存中…":"保存"})]})}function Hr(t){let{connection:i,endpoint:l,loadError:d}=t,[g,S]=r(null),[c,f]=r(null),[N,P]=r({models:[]}),[b,p]=r(!0),[M,T]=r(!1),[h,x]=r(!1),[k,a]=r(null),m=v(async(u=!1)=>{if(u)T(!0);else p(!0);a(null);try{let[s,C]=await Promise.all([i.request(l),i.request("/api/models")]);S(s),f(s),P(C)}catch(s){a({type:"error",text:s instanceof Error?s.message:d})}finally{p(!1),T(!1)}},[i,l,d]);o(()=>{m()},[m]);let w=c&&g?t.differs(c,g):!1;return{settings:c,modelList:N,loading:b,refreshing:M,saving:h,notice:k,dirty:w,load:m,save:async(u)=>{if(u?.preventDefault(),!c||h||b)return;x(!0),a(null);try{let s=await i.request(l,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.toBody(c))});S(s),f(s),a({type:"success",text:"设置已保存"})}catch(s){a({type:"error",text:s instanceof Error?s.message:"保存设置失败"})}finally{x(!1)}},reset:()=>{f(g),a(null)},edit:(u)=>{f((s)=>s?u(s):null),a(null)}}}
2
2
  export{jn,Hr};
Binary file
Binary file
@@ -1,2 +1,2 @@
1
- import{t,a,G}from"./chunk-v2bkkhb8.js";var Le=t((e,i,o,h)=>{e.attr("class",o);let{width:r,height:n,x:w,y:x}=u(e,i);G(e,n,r,h);let c=m(w,x,r,n,i);e.attr("viewBox",c),a.debug(`viewBox configured: ${c} with padding: ${i}`)},"setupViewPortForSVG"),u=t((e,i)=>{let o=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:o.width+i*2,height:o.height+i*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),m=t((e,i,o,h,r)=>`${e-r} ${i-r} ${o} ${h}`,"createViewBox");
1
+ import{t,a,G}from"./chunk-dbv8qpen.js";var Le=t((e,i,o,h)=>{e.attr("class",o);let{width:r,height:n,x:w,y:x}=u(e,i);G(e,n,r,h);let c=m(w,x,r,n,i);e.attr("viewBox",c),a.debug(`viewBox configured: ${c} with padding: ${i}`)},"setupViewPortForSVG"),u=t((e,i)=>{let o=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:o.width+i*2,height:o.height+i*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),m=t((e,i,o,h,r)=>`${e-r} ${i-r} ${o} ${h}`,"createViewBox");
2
2
  export{Le};
Binary file
Binary file
@@ -1 +1 @@
1
- import{v,o,ee,i,r,p,e,n,y,ir,da,pt,Ur,tt,yr,we,pe,Ii,Al,Di}from"./chunk-qjg6dw46.js";function le(d){let{Button:b,confirm:L,PageLayout:x,Switch:_,cn:F,style:z}=y(),{connection:u,onOpen:O}=d,[D,f]=r([]),[w,H]=r([]),[q,J]=r([]),[I,T]=r(),[B,U]=r([]),[A,V]=r(!0),[k,N]=r(),[C,R]=r(),[W,P]=r(!1),[G,c]=r({}),s=i(0),E=v(async()=>{let t=++s.current;try{let[a,l,m,g]=await Promise.all([u.request("/api/automations"),u.request("/api/projects").catch(()=>[]),u.request("/api/info").catch(()=>{return}),u.request("/api/models").catch(()=>({models:[]}))]),Z=[...new Set(a.flatMap((h)=>h.lastSessionID?[h.lastSessionID]:[]))],te=(await Promise.all(Z.map(async(h)=>u.request(`/api/sessions/${encodeURIComponent(h)}`).catch((j)=>{if(j instanceof Error&&"status"in j&&j.status===404)return;throw j})))).filter((h)=>h!==void 0);if(t!==s.current)return;if(f(a.sort((h,j)=>h.created-j.created)),H(l),J(te),T(m),g?.models)U(g.models.map((h)=>h.id));N(void 0)}catch(a){if(t===s.current)N(a instanceof Error?a.message:"加载失败")}finally{if(t===s.current)V(!1)}},[u]);o(()=>(E(),()=>{s.current++}),[E]);let S=(t)=>{R(t),P(!0)},Q=async(t)=>{c((a)=>({...a,[t.id]:!0}));try{let a=await u.request(`/api/automations/${t.id}/run`,{method:"POST"});O(a.id)}catch(a){N(a instanceof Error?a.message:"运行失败")}finally{c((a)=>({...a,[t.id]:!1}))}},X=async(t)=>{if(!await L({title:`删除自动化「${t.name}」?`,description:"已经跑出来的会话会保留。",action:"删除",danger:!0}))return;try{await u.request(`/api/automations/${t.id}`,{method:"DELETE"}),f((l)=>l.filter((m)=>m.id!==t.id))}catch(l){N(l instanceof Error?l.message:"删除失败")}},Y=async(t,a)=>{try{let l=await u.request(`/api/automations/${t.id}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:a})});f((m)=>m.map((g)=>g.id===t.id?l:g))}catch(l){N(l instanceof Error?l.message:"状态切换失败")}};return n(x,{title:"自动化",description:n(p,{children:["到点自动开一个新会话执行提示词,跑完的结果在会话里查看。",I?.timezone&&n("span",{className:"text-faint",children:["按服务器时区 ",I.timezone,"。"]})]}),actions:n(b,{variant:"primary",onClick:()=>S(null),children:[e(we,{className:"size-4"}),"新建"]}),children:[k&&e("div",{className:"mb-4 rounded-lg bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),A?e("div",{className:"flex justify-center py-12 text-xs text-faint",children:"正在加载自动化…"}):D.length===0?n("div",{className:z("surface.emptyDashed","animate-fade"),children:[e("div",{className:"grid size-11 place-items-center rounded-xl bg-raised text-dim",children:e(ir,{className:"size-5"})}),n("div",{children:[e("p",{className:"text-[15px] font-medium",children:"还没有自动化"}),e("p",{className:"mt-1 text-sm text-dim",children:"比如「每个工作日 9 点总结昨天的提交」。"})]}),n(b,{size:"sm",onClick:()=>S(null),className:"mt-1",children:[e(we,{className:"size-3.5"}),"新建自动化"]})]}):e("ul",{className:"flex animate-fade flex-col gap-3",children:D.map((t)=>{let a=t.projectID?w.find((g)=>g.id===t.projectID):void 0,l=t.lastSessionID?q.find((g)=>g.id===t.lastSessionID):void 0,m=Boolean(G[t.id]);return e("li",{children:n("article",{className:z("surface.card","group p-4 transition-[border-color,box-shadow] duration-200 hover:border-line-strong hover:shadow-composer"),children:[n("div",{className:"flex items-start gap-3",children:[n("div",{className:F("min-w-0 flex-1 transition-opacity duration-200",!t.enabled&&"opacity-55"),children:[e("h2",{className:"truncate text-[15px] font-medium",children:t.name}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3.5 gap-y-1 text-[13px] text-dim",children:[n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[e(ir,{}),Al(t.schedule)]}),n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[a?e(pt,{}):e(Ur,{}),a?a.name:"聊天"]}),t.enabled&&t.nextRun!==null&&n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[e(da,{}),"下次 ",Di(t.nextRun)]})]})]}),e(_,{checked:t.enabled,label:t.enabled?"停用":"启用",onCheckedChange:(g)=>Y(t,g),className:"mt-0.5"})]}),e("p",{className:F("mt-3 line-clamp-2 text-sm leading-6 whitespace-pre-wrap text-faint transition-opacity duration-200",!t.enabled&&"opacity-55"),children:t.prompt}),n("div",{className:"mt-3 -mb-1 flex items-center gap-1",children:[n(b,{size:"sm",onClick:()=>Q(t),disabled:m,children:[e(yr,{className:"size-3.5"}),m?"正在启动…":"立即运行"]}),n(b,{size:"sm",variant:"ghost",onClick:()=>S(t),children:[e(tt,{className:"size-3.5"}),"编辑"]}),n(b,{size:"sm",variant:"danger-ghost",onClick:()=>X(t),children:[e(pe,{className:"size-3.5"}),"删除"]}),e("div",{className:"flex-1"}),t.lastRun!==null&&n("button",{type:"button",disabled:!l,onClick:()=>l&&O(l.id),className:"rounded-md px-1.5 py-1 text-[13px] text-faint transition-colors enabled:hover:bg-raised enabled:hover:text-ink",children:["上次运行 ",Di(t.lastRun),l?.archivedAt!=null?" · 已归档":"",!l?" · 会话已删除":""]})]})]})},t.id)})}),C!==void 0&&e(ne,{open:W,onOpenChange:P,automation:C??void 0,projects:w,models:B,timezone:I?.timezone,onSaved:(t)=>{f((a)=>{let l=a.findIndex((m)=>m.id===t.id);if(l>=0){let m=[...a];return m[l]=t,m}return[...a,t].sort((m,g)=>m.created-g.created)}),P(!1)},connection:u},C?.id??"new")]})}var M="custom",K="chat";function ne(d){let{Button:b,Dialog:L,Field:x,Form:_,FormError:F,Input:z,Select:u,Textarea:O}=y(),D=ee(),f=d.automation,[w,H]=r(f?.name??""),[q,J]=r(f?.prompt??""),[I,T]=r(f?.schedule??Ii[0]?.cron??"0 9 * * *"),[B,U]=r(()=>!Ii.some((c)=>c.cron===I)),[A,V]=r(f?.projectID??K),[k,N]=r(f?.model??""),[C,R]=r(!1),[W,P]=r();async function G(c){c.preventDefault(),R(!0),P(void 0);try{let s=A===K?void 0:A,E={name:w,prompt:q,schedule:I,model:k||void 0},S;if(f)S=await d.connection.request(`/api/automations/${f.id}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({...E,projectID:s??null})});else S=await d.connection.request("/api/automations",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...E,projectID:s})});d.onSaved(S)}catch(s){P(s instanceof Error?s.message:"保存失败")}finally{R(!1)}}return e(L,{open:d.open,onOpenChange:d.onOpenChange,title:d.automation?"编辑自动化":"新建自动化",size:"lg",footer:n(p,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(b,{onClick:()=>d.onOpenChange(!1),children:"取消"}),e(b,{type:"submit",form:D,variant:"primary",disabled:C,children:C?"正在保存…":d.automation?"保存":"创建"})]}),children:n(_,{id:D,onSubmit:G,children:[e(x,{label:"名称",children:(c)=>e(z,{id:c,autoFocus:!f,required:!0,value:w,onChange:(s)=>H(s.target.value),placeholder:"例如:每日提交总结"})}),e(x,{label:"提示词",hint:"没人盯着运行,写清楚要做什么、结果怎么汇报。",children:(c)=>e(O,{id:c,required:!0,value:q,onChange:(s)=>J(s.target.value),rows:5,placeholder:"总结昨天到现在的 git 提交,按模块分组,列出需要我关注的改动。"})}),n("div",{className:"grid gap-x-3 gap-y-4 sm:grid-cols-2",children:[e(x,{label:"时间",children:(c)=>e(u,{id:c,value:B?M:I,onValueChange:(s)=>{if(U(s===M),s!==M)T(s)},groups:[{options:Ii.map((s)=>({value:s.cron,label:s.label}))},{options:[{value:M,label:"自定义(cron)"}]}]})}),e(x,{label:"在哪里运行",children:(c)=>e(u,{id:c,value:A,onValueChange:V,groups:[{options:[{value:K,label:"聊天",description:"不绑定目录",icon:e(Ur,{})}]},...d.projects.length?[{label:"项目",options:d.projects.map((s)=>({value:s.id,label:s.name,icon:e(pt,{})}))}]:[]]})})]}),B&&e(x,{label:"cron 表达式",hint:`分 时 日 月 周,例如 30 8 * * 1-5 是工作日 8:30。${d.timezone?`按 ${d.timezone} 时间。`:""}`,children:(c)=>e(z,{id:c,required:!0,value:I,onChange:(s)=>T(s.target.value),spellCheck:!1,className:"font-mono"})}),d.models.length>0&&e(x,{label:"模型",children:(c)=>e(u,{id:c,value:k||"default",onValueChange:(s)=>N(s==="default"?"":s),groups:[{options:[{value:"default",label:"默认模型"},...d.models.map((s)=>({value:s,label:s}))]}]})}),e(F,{children:W})]})})}export{le as AutomationsPage};
1
+ import{v,o,ee,i,r,p,e,n,y,ir,da,pt,Ur,nt,yr,we,pe,Ii,Al,Di}from"./chunk-b83bzjcx.js";function le(d){let{Button:b,confirm:L,PageLayout:x,Switch:_,cn:F,style:z}=y(),{connection:u,onOpen:O}=d,[D,f]=r([]),[w,H]=r([]),[q,J]=r([]),[I,T]=r(),[B,U]=r([]),[A,V]=r(!0),[k,N]=r(),[C,R]=r(),[W,P]=r(!1),[G,c]=r({}),s=i(0),E=v(async()=>{let t=++s.current;try{let[a,l,m,g]=await Promise.all([u.request("/api/automations"),u.request("/api/projects").catch(()=>[]),u.request("/api/info").catch(()=>{return}),u.request("/api/models").catch(()=>({models:[]}))]),Z=[...new Set(a.flatMap((h)=>h.lastSessionID?[h.lastSessionID]:[]))],te=(await Promise.all(Z.map(async(h)=>u.request(`/api/sessions/${encodeURIComponent(h)}`).catch((j)=>{if(j instanceof Error&&"status"in j&&j.status===404)return;throw j})))).filter((h)=>h!==void 0);if(t!==s.current)return;if(f(a.sort((h,j)=>h.created-j.created)),H(l),J(te),T(m),g?.models)U(g.models.map((h)=>h.id));N(void 0)}catch(a){if(t===s.current)N(a instanceof Error?a.message:"加载失败")}finally{if(t===s.current)V(!1)}},[u]);o(()=>(E(),()=>{s.current++}),[E]);let S=(t)=>{R(t),P(!0)},Q=async(t)=>{c((a)=>({...a,[t.id]:!0}));try{let a=await u.request(`/api/automations/${t.id}/run`,{method:"POST"});O(a.id)}catch(a){N(a instanceof Error?a.message:"运行失败")}finally{c((a)=>({...a,[t.id]:!1}))}},X=async(t)=>{if(!await L({title:`删除自动化「${t.name}」?`,description:"已经跑出来的会话会保留。",action:"删除",danger:!0}))return;try{await u.request(`/api/automations/${t.id}`,{method:"DELETE"}),f((l)=>l.filter((m)=>m.id!==t.id))}catch(l){N(l instanceof Error?l.message:"删除失败")}},Y=async(t,a)=>{try{let l=await u.request(`/api/automations/${t.id}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({enabled:a})});f((m)=>m.map((g)=>g.id===t.id?l:g))}catch(l){N(l instanceof Error?l.message:"状态切换失败")}};return n(x,{title:"自动化",description:n(p,{children:["到点自动开一个新会话执行提示词,跑完的结果在会话里查看。",I?.timezone&&n("span",{className:"text-faint",children:["按服务器时区 ",I.timezone,"。"]})]}),actions:n(b,{variant:"primary",onClick:()=>S(null),children:[e(we,{className:"size-4"}),"新建"]}),children:[k&&e("div",{className:"mb-4 rounded-lg bg-danger/10 px-3 py-2 text-xs text-danger",children:k}),A?e("div",{className:"flex justify-center py-12 text-xs text-faint",children:"正在加载自动化…"}):D.length===0?n("div",{className:z("surface.emptyDashed","animate-fade"),children:[e("div",{className:"grid size-11 place-items-center rounded-xl bg-raised text-dim",children:e(ir,{className:"size-5"})}),n("div",{children:[e("p",{className:"text-[15px] font-medium",children:"还没有自动化"}),e("p",{className:"mt-1 text-sm text-dim",children:"比如「每个工作日 9 点总结昨天的提交」。"})]}),n(b,{size:"sm",onClick:()=>S(null),className:"mt-1",children:[e(we,{className:"size-3.5"}),"新建自动化"]})]}):e("ul",{className:"flex animate-fade flex-col gap-3",children:D.map((t)=>{let a=t.projectID?w.find((g)=>g.id===t.projectID):void 0,l=t.lastSessionID?q.find((g)=>g.id===t.lastSessionID):void 0,m=Boolean(G[t.id]);return e("li",{children:n("article",{className:z("surface.card","group p-4 transition-[border-color,box-shadow] duration-200 hover:border-line-strong hover:shadow-composer"),children:[n("div",{className:"flex items-start gap-3",children:[n("div",{className:F("min-w-0 flex-1 transition-opacity duration-200",!t.enabled&&"opacity-55"),children:[e("h2",{className:"truncate text-[15px] font-medium",children:t.name}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3.5 gap-y-1 text-[13px] text-dim",children:[n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[e(ir,{}),Al(t.schedule)]}),n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[a?e(pt,{}):e(Ur,{}),a?a.name:"聊天"]}),t.enabled&&t.nextRun!==null&&n("span",{className:"flex items-center gap-1.5 [&_svg]:size-3.5 [&_svg]:text-faint",children:[e(da,{}),"下次 ",Di(t.nextRun)]})]})]}),e(_,{checked:t.enabled,label:t.enabled?"停用":"启用",onCheckedChange:(g)=>Y(t,g),className:"mt-0.5"})]}),e("p",{className:F("mt-3 line-clamp-2 text-sm leading-6 whitespace-pre-wrap text-faint transition-opacity duration-200",!t.enabled&&"opacity-55"),children:t.prompt}),n("div",{className:"mt-3 -mb-1 flex items-center gap-1",children:[n(b,{size:"sm",onClick:()=>Q(t),disabled:m,children:[e(yr,{className:"size-3.5"}),m?"正在启动…":"立即运行"]}),n(b,{size:"sm",variant:"ghost",onClick:()=>S(t),children:[e(nt,{className:"size-3.5"}),"编辑"]}),n(b,{size:"sm",variant:"danger-ghost",onClick:()=>X(t),children:[e(pe,{className:"size-3.5"}),"删除"]}),e("div",{className:"flex-1"}),t.lastRun!==null&&n("button",{type:"button",disabled:!l,onClick:()=>l&&O(l.id),className:"rounded-md px-1.5 py-1 text-[13px] text-faint transition-colors enabled:hover:bg-raised enabled:hover:text-ink",children:["上次运行 ",Di(t.lastRun),l?.archivedAt!=null?" · 已归档":"",!l?" · 会话已删除":""]})]})]})},t.id)})}),C!==void 0&&e(ne,{open:W,onOpenChange:P,automation:C??void 0,projects:w,models:B,timezone:I?.timezone,onSaved:(t)=>{f((a)=>{let l=a.findIndex((m)=>m.id===t.id);if(l>=0){let m=[...a];return m[l]=t,m}return[...a,t].sort((m,g)=>m.created-g.created)}),P(!1)},connection:u},C?.id??"new")]})}var M="custom",K="chat";function ne(d){let{Button:b,Dialog:L,Field:x,Form:_,FormError:F,Input:z,Select:u,Textarea:O}=y(),D=ee(),f=d.automation,[w,H]=r(f?.name??""),[q,J]=r(f?.prompt??""),[I,T]=r(f?.schedule??Ii[0]?.cron??"0 9 * * *"),[B,U]=r(()=>!Ii.some((c)=>c.cron===I)),[A,V]=r(f?.projectID??K),[k,N]=r(f?.model??""),[C,R]=r(!1),[W,P]=r();async function G(c){c.preventDefault(),R(!0),P(void 0);try{let s=A===K?void 0:A,E={name:w,prompt:q,schedule:I,model:k||void 0},S;if(f)S=await d.connection.request(`/api/automations/${f.id}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify({...E,projectID:s??null})});else S=await d.connection.request("/api/automations",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...E,projectID:s})});d.onSaved(S)}catch(s){P(s instanceof Error?s.message:"保存失败")}finally{R(!1)}}return e(L,{open:d.open,onOpenChange:d.onOpenChange,title:d.automation?"编辑自动化":"新建自动化",size:"lg",footer:n(p,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(b,{onClick:()=>d.onOpenChange(!1),children:"取消"}),e(b,{type:"submit",form:D,variant:"primary",disabled:C,children:C?"正在保存…":d.automation?"保存":"创建"})]}),children:n(_,{id:D,onSubmit:G,children:[e(x,{label:"名称",children:(c)=>e(z,{id:c,autoFocus:!f,required:!0,value:w,onChange:(s)=>H(s.target.value),placeholder:"例如:每日提交总结"})}),e(x,{label:"提示词",hint:"没人盯着运行,写清楚要做什么、结果怎么汇报。",children:(c)=>e(O,{id:c,required:!0,value:q,onChange:(s)=>J(s.target.value),rows:5,placeholder:"总结昨天到现在的 git 提交,按模块分组,列出需要我关注的改动。"})}),n("div",{className:"grid gap-x-3 gap-y-4 sm:grid-cols-2",children:[e(x,{label:"时间",children:(c)=>e(u,{id:c,value:B?M:I,onValueChange:(s)=>{if(U(s===M),s!==M)T(s)},groups:[{options:Ii.map((s)=>({value:s.cron,label:s.label}))},{options:[{value:M,label:"自定义(cron)"}]}]})}),e(x,{label:"在哪里运行",children:(c)=>e(u,{id:c,value:A,onValueChange:V,groups:[{options:[{value:K,label:"聊天",description:"不绑定目录",icon:e(Ur,{})}]},...d.projects.length?[{label:"项目",options:d.projects.map((s)=>({value:s.id,label:s.name,icon:e(pt,{})}))}]:[]]})})]}),B&&e(x,{label:"cron 表达式",hint:`分 时 日 月 周,例如 30 8 * * 1-5 是工作日 8:30。${d.timezone?`按 ${d.timezone} 时间。`:""}`,children:(c)=>e(z,{id:c,required:!0,value:I,onChange:(s)=>T(s.target.value),spellCheck:!1,className:"font-mono"})}),d.models.length>0&&e(x,{label:"模型",children:(c)=>e(u,{id:c,value:k||"default",onValueChange:(s)=>N(s==="default"?"":s),groups:[{options:[{value:"default",label:"默认模型"},...d.models.map((s)=>({value:s,label:s}))]}]})}),e(F,{children:W})]})})}export{le as AutomationsPage};
Binary file
Binary file
@@ -0,0 +1 @@
1
+ import{xs}from"./chunk-21d8pzcm.js";export{xs as createWardleyServices};
Binary file
Binary file