@bkm016/basalt 0.1.21 → 0.1.23

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 (1059) hide show
  1. package/chunk-01g872ez.js +3 -0
  2. package/chunk-078td1r4.js +7 -0
  3. package/chunk-1mhv12a5.js +3 -0
  4. package/chunk-1zrht78t.js +2 -0
  5. package/chunk-2e4xds74.js +18 -0
  6. package/chunk-2hkpqjqj.js +3 -0
  7. package/chunk-2mhpgb4t.js +2 -0
  8. package/chunk-3nwqng5t.js +59 -0
  9. package/chunk-3zm1ejmh.js +3 -0
  10. package/chunk-4d9p68s9.js +3 -0
  11. package/chunk-5h96jz3p.js +3 -0
  12. package/chunk-5znfck4s.js +5 -0
  13. package/chunk-6048rq29.js +8 -0
  14. package/chunk-61zk13qr.js +3 -0
  15. package/chunk-62ty404c.js +2 -0
  16. package/chunk-6vp2nqbj.js +2 -0
  17. package/chunk-7a5derff.js +25 -0
  18. package/chunk-7qhbff72.js +5 -0
  19. package/chunk-7xw6fpx3.js +3 -0
  20. package/chunk-84rk4tew.js +2 -0
  21. package/chunk-8np9b2y8.js +3 -0
  22. package/chunk-8wb8yr7d.js +12 -0
  23. package/chunk-93b76hhg.js +11 -0
  24. package/chunk-9h05aqdd.js +25 -0
  25. package/chunk-a2jsx2ew.js +3 -0
  26. package/chunk-a2qwx6cr.js +2 -0
  27. package/chunk-a7h459z1.js +2 -0
  28. package/chunk-atjwde1c.js +2 -0
  29. package/chunk-bk20awc9.js +10 -0
  30. package/chunk-bm2jhkqt.js +3 -0
  31. package/chunk-bp4zk5ch.js +3 -0
  32. package/chunk-c5ess8kd.js +3 -0
  33. package/chunk-chfzk1fx.js +3 -0
  34. package/chunk-cj7yhgnd.js +2 -0
  35. package/chunk-cjq2bzkf.js +3 -0
  36. package/chunk-csrpxzn7.js +3 -0
  37. package/chunk-cwesdh51.js +39 -0
  38. package/chunk-drbd6485.js +3 -0
  39. package/chunk-dt594v3d.js +9 -0
  40. package/chunk-dwxp0gtf.js +4 -0
  41. package/chunk-ejdewe04.js +3 -0
  42. package/chunk-fkzk83xs.js +2 -0
  43. package/chunk-fsnc2sja.js +3 -0
  44. package/chunk-g18hxgdr.js +12 -0
  45. package/chunk-hfwy0rzt.js +10 -0
  46. package/chunk-hg5wmrfb.js +3 -0
  47. package/chunk-hvex6qjc.js +5 -0
  48. package/chunk-hw8xknv5.js +2 -0
  49. package/chunk-j91wgfzj.js +2 -0
  50. package/chunk-jyx4ynyp.js +3 -0
  51. package/chunk-jz1pavma.js +20 -0
  52. package/chunk-kjjrmfmt.js +2 -0
  53. package/chunk-kz1ja7t7.js +31 -0
  54. package/chunk-mh4s6m7e.js +2 -0
  55. package/chunk-n0g6w24y.js +3 -0
  56. package/chunk-nnp82zvz.js +5 -0
  57. package/chunk-p34keb5j.js +3 -0
  58. package/chunk-pcxaycc3.js +3560 -0
  59. package/chunk-pdwexj34.js +16 -0
  60. package/chunk-phpse938.js +3 -0
  61. package/chunk-pt14ba7d.js +15 -0
  62. package/chunk-q0hvv6bh.js +390 -0
  63. package/chunk-qd4xtknk.js +2 -0
  64. package/chunk-qfg0dr8f.js +2 -0
  65. package/chunk-qnrkh3ca.js +7 -0
  66. package/chunk-r1t5yhee.js +7 -0
  67. package/chunk-r5na5qx5.js +2 -0
  68. package/chunk-r7a6q57s.js +2 -0
  69. package/chunk-smsn4ebc.js +4 -0
  70. package/chunk-sqr8tx1m.js +471 -0
  71. package/chunk-t4twa09y.js +2 -0
  72. package/chunk-tjs6h6zk.js +4 -0
  73. package/chunk-tvbh69tm.js +3 -0
  74. package/chunk-tvv9yfqv.js +11 -0
  75. package/chunk-vbdf5psp.js +2 -0
  76. package/chunk-vr60qwyg.js +2 -0
  77. package/chunk-w509y6w6.js +2 -0
  78. package/chunk-w7n83ye7.js +7 -0
  79. package/chunk-wacjm9ww.js +3 -0
  80. package/chunk-xex050bc.js +3 -0
  81. package/chunk-y0fgbrkc.js +2 -0
  82. package/chunk-ysfpdxjy.js +3 -0
  83. package/chunk-ytsnns2n.js +2 -0
  84. package/chunk-zwgdbrbg.js +2 -0
  85. package/chunk-zz7qjanc.js +2 -0
  86. package/compiled.js +8 -8
  87. package/package.json +1 -1
  88. package/ui-test-worker.js +57 -57
  89. package/web/chunk-07q4pdkf.js +1 -0
  90. package/web/chunk-07q4pdkf.js.br +0 -0
  91. package/web/chunk-07q4pdkf.js.gz +0 -0
  92. package/web/chunk-0s237vb2.js +2 -0
  93. package/web/chunk-0s237vb2.js.br +0 -0
  94. package/web/chunk-0s237vb2.js.gz +0 -0
  95. package/web/chunk-0zbmaspt.js +24 -0
  96. package/web/chunk-0zbmaspt.js.br +0 -0
  97. package/web/chunk-0zbmaspt.js.gz +0 -0
  98. package/web/chunk-11p8z5sv.js +8 -0
  99. package/web/chunk-11p8z5sv.js.br +0 -0
  100. package/web/chunk-11p8z5sv.js.gz +0 -0
  101. package/web/chunk-1axadk7j.js +2 -0
  102. package/web/chunk-1axadk7j.js.br +0 -0
  103. package/web/chunk-1axadk7j.js.gz +0 -0
  104. package/web/chunk-1ebz6hbk.js +1 -0
  105. package/web/chunk-1ebz6hbk.js.br +0 -0
  106. package/web/chunk-1ebz6hbk.js.gz +0 -0
  107. package/web/chunk-1pg22vjr.js +38 -0
  108. package/web/chunk-1pg22vjr.js.br +0 -0
  109. package/web/chunk-1pg22vjr.js.gz +0 -0
  110. package/web/chunk-1ys90q5s.js +1 -0
  111. package/web/chunk-1ys90q5s.js.br +0 -0
  112. package/web/chunk-1ys90q5s.js.gz +0 -0
  113. package/web/chunk-1zd8azrg.js +34 -0
  114. package/web/chunk-1zd8azrg.js.br +0 -0
  115. package/web/chunk-1zd8azrg.js.gz +0 -0
  116. package/web/chunk-22rjbwxp.js +303 -0
  117. package/web/chunk-22rjbwxp.js.br +0 -0
  118. package/web/chunk-22rjbwxp.js.gz +0 -0
  119. package/web/chunk-2eg9t1mz.js +2 -0
  120. package/web/chunk-2eg9t1mz.js.br +0 -0
  121. package/web/chunk-2eg9t1mz.js.gz +0 -0
  122. package/web/chunk-2emc5sd7.js +12 -0
  123. package/web/chunk-2emc5sd7.js.br +0 -0
  124. package/web/chunk-2emc5sd7.js.gz +0 -0
  125. package/web/chunk-2gj9yydt.js +2 -0
  126. package/web/chunk-2gj9yydt.js.br +0 -0
  127. package/web/chunk-2gj9yydt.js.gz +0 -0
  128. package/web/chunk-2jvy4y1e.js +1 -0
  129. package/web/chunk-2jvy4y1e.js.br +0 -0
  130. package/web/chunk-2jvy4y1e.js.gz +0 -0
  131. package/web/chunk-2kwn5gsx.js +1 -0
  132. package/web/chunk-2kwn5gsx.js.br +0 -0
  133. package/web/chunk-2kwn5gsx.js.gz +0 -0
  134. package/web/chunk-2r84nrwk.js +99 -0
  135. package/web/chunk-2r84nrwk.js.br +0 -0
  136. package/web/chunk-2r84nrwk.js.gz +0 -0
  137. package/web/chunk-3abhxhtv.js +2 -0
  138. package/web/chunk-3abhxhtv.js.br +0 -0
  139. package/web/chunk-3abhxhtv.js.gz +0 -0
  140. package/web/chunk-3cgxntbk.js +2 -0
  141. package/web/chunk-3cgxntbk.js.br +0 -0
  142. package/web/chunk-3cgxntbk.js.gz +0 -0
  143. package/web/chunk-3g3n9pc5.js +332 -0
  144. package/web/chunk-3g3n9pc5.js.br +0 -0
  145. package/web/chunk-3g3n9pc5.js.gz +0 -0
  146. package/web/chunk-3qmpdzq2.js +1 -0
  147. package/web/chunk-3qmpdzq2.js.br +0 -0
  148. package/web/chunk-3qmpdzq2.js.gz +0 -0
  149. package/web/chunk-3rxjewe5.js +2 -0
  150. package/web/chunk-3rxjewe5.js.br +0 -0
  151. package/web/chunk-3rxjewe5.js.gz +0 -0
  152. package/web/chunk-3vh17h7n.js +62 -0
  153. package/web/chunk-3vh17h7n.js.br +0 -0
  154. package/web/chunk-3vh17h7n.js.gz +0 -0
  155. package/web/chunk-49ywdzda.js +36 -0
  156. package/web/chunk-49ywdzda.js.br +0 -0
  157. package/web/chunk-49ywdzda.js.gz +0 -0
  158. package/web/chunk-5ch8rwjz.js +2 -0
  159. package/web/chunk-5ch8rwjz.js.br +0 -0
  160. package/web/chunk-5ch8rwjz.js.gz +0 -0
  161. package/web/chunk-5k1xca5m.js +324 -0
  162. package/web/chunk-5k1xca5m.js.br +0 -0
  163. package/web/chunk-5k1xca5m.js.gz +0 -0
  164. package/web/chunk-5kcmtrrk.js +2 -0
  165. package/web/chunk-5kcmtrrk.js.br +0 -0
  166. package/web/chunk-5kcmtrrk.js.gz +0 -0
  167. package/web/chunk-5t1yv276.js +1 -0
  168. package/web/chunk-5t1yv276.js.br +0 -0
  169. package/web/chunk-5t1yv276.js.gz +0 -0
  170. package/web/chunk-612xftnp.js +1 -0
  171. package/web/chunk-612xftnp.js.br +0 -0
  172. package/web/chunk-612xftnp.js.gz +0 -0
  173. package/web/chunk-6183jmyq.js +2 -0
  174. package/web/chunk-6183jmyq.js.br +0 -0
  175. package/web/chunk-6183jmyq.js.gz +0 -0
  176. package/web/chunk-66zp24sf.js +2 -0
  177. package/web/chunk-66zp24sf.js.br +0 -0
  178. package/web/chunk-66zp24sf.js.gz +0 -0
  179. package/web/chunk-67wywbgr.js +2 -0
  180. package/web/chunk-67wywbgr.js.br +0 -0
  181. package/web/chunk-67wywbgr.js.gz +0 -0
  182. package/web/chunk-6j0d6131.js +1 -0
  183. package/web/chunk-6j0d6131.js.br +0 -0
  184. package/web/chunk-6j0d6131.js.gz +0 -0
  185. package/web/chunk-6ycpdpfj.js +107 -0
  186. package/web/chunk-6ycpdpfj.js.br +0 -0
  187. package/web/chunk-6ycpdpfj.js.gz +0 -0
  188. package/web/chunk-79tbvvqj.js +1 -0
  189. package/web/chunk-79tbvvqj.js.br +0 -0
  190. package/web/chunk-79tbvvqj.js.gz +0 -0
  191. package/web/chunk-7bcksmqx.js +2 -0
  192. package/web/chunk-7bcksmqx.js.br +0 -0
  193. package/web/chunk-7bcksmqx.js.gz +0 -0
  194. package/web/chunk-7c2zkqgd.js +89 -0
  195. package/web/chunk-7c2zkqgd.js.br +0 -0
  196. package/web/chunk-7c2zkqgd.js.gz +0 -0
  197. package/web/chunk-7ed42dqv.js +1 -0
  198. package/web/chunk-7ed42dqv.js.br +0 -0
  199. package/web/chunk-7ed42dqv.js.gz +0 -0
  200. package/web/chunk-7mzdjjha.js +1 -0
  201. package/web/chunk-7mzdjjha.js.br +0 -0
  202. package/web/chunk-7mzdjjha.js.gz +0 -0
  203. package/web/chunk-7t1sb86g.js +2 -0
  204. package/web/chunk-7t1sb86g.js.br +0 -0
  205. package/web/chunk-7t1sb86g.js.gz +0 -0
  206. package/web/chunk-7t5kzbp1.js +1 -0
  207. package/web/chunk-7t5kzbp1.js.br +0 -0
  208. package/web/chunk-7t5kzbp1.js.gz +0 -0
  209. package/web/chunk-7tmzvm05.js +2 -0
  210. package/web/chunk-7tmzvm05.js.br +0 -0
  211. package/web/chunk-7tmzvm05.js.gz +0 -0
  212. package/web/chunk-80k4k6aw.js +7 -0
  213. package/web/chunk-80k4k6aw.js.br +0 -0
  214. package/web/chunk-80k4k6aw.js.gz +0 -0
  215. package/web/chunk-8tvy5xbr.js +217 -0
  216. package/web/chunk-8tvy5xbr.js.br +0 -0
  217. package/web/chunk-8tvy5xbr.js.gz +0 -0
  218. package/web/chunk-95jr0f0q.js +139 -0
  219. package/web/chunk-95jr0f0q.js.br +0 -0
  220. package/web/chunk-95jr0f0q.js.gz +0 -0
  221. package/web/chunk-9h6ayn54.js +16 -0
  222. package/web/chunk-9h6ayn54.js.br +0 -0
  223. package/web/chunk-9h6ayn54.js.gz +0 -0
  224. package/web/chunk-9jzpxvwa.js +106 -0
  225. package/web/chunk-9jzpxvwa.js.br +0 -0
  226. package/web/chunk-9jzpxvwa.js.gz +0 -0
  227. package/web/chunk-9kx2s040.js +1 -0
  228. package/web/chunk-9kx2s040.js.br +0 -0
  229. package/web/chunk-9kx2s040.js.gz +0 -0
  230. package/web/chunk-9mdbahpr.js +2 -0
  231. package/web/chunk-9mdbahpr.js.br +0 -0
  232. package/web/chunk-9mdbahpr.js.gz +0 -0
  233. package/web/chunk-9w6mjqgp.js +1 -0
  234. package/web/chunk-9w6mjqgp.js.br +0 -0
  235. package/web/chunk-9w6mjqgp.js.gz +0 -0
  236. package/web/chunk-9xb3j03w.js +142 -0
  237. package/web/chunk-9xb3j03w.js.br +0 -0
  238. package/web/chunk-9xb3j03w.js.gz +0 -0
  239. package/web/chunk-abzt3tzj.js +1 -0
  240. package/web/chunk-abzt3tzj.js.br +0 -0
  241. package/web/chunk-abzt3tzj.js.gz +0 -0
  242. package/web/chunk-ahebswgf.js +1 -0
  243. package/web/chunk-ahebswgf.js.br +0 -0
  244. package/web/chunk-ahebswgf.js.gz +0 -0
  245. package/web/chunk-ahsw5yz2.js +2 -0
  246. package/web/chunk-ahsw5yz2.js.br +0 -0
  247. package/web/chunk-ahsw5yz2.js.gz +0 -0
  248. package/web/chunk-b21jhnc3.js +1 -0
  249. package/web/chunk-b21jhnc3.js.br +2 -0
  250. package/web/chunk-b21jhnc3.js.gz +0 -0
  251. package/web/chunk-b3cn4qmw.js +1 -0
  252. package/web/chunk-b3cn4qmw.js.br +0 -0
  253. package/web/chunk-b3cn4qmw.js.gz +0 -0
  254. package/web/chunk-b4qxx7jx.js +2 -0
  255. package/web/chunk-b4qxx7jx.js.br +0 -0
  256. package/web/chunk-b4qxx7jx.js.gz +0 -0
  257. package/web/chunk-b79d9r5v.js +98 -0
  258. package/web/chunk-b79d9r5v.js.br +0 -0
  259. package/web/chunk-b79d9r5v.js.gz +0 -0
  260. package/web/chunk-b9x115jw.css +1 -0
  261. package/web/chunk-b9x115jw.css.br +0 -0
  262. package/web/chunk-b9x115jw.css.gz +0 -0
  263. package/web/chunk-bbnamv1j.js +1 -0
  264. package/web/chunk-bbnamv1j.js.br +2 -0
  265. package/web/chunk-bbnamv1j.js.gz +0 -0
  266. package/web/chunk-bgqfryh2.js +1 -0
  267. package/web/chunk-bgqfryh2.js.br +0 -0
  268. package/web/chunk-bgqfryh2.js.gz +0 -0
  269. package/web/chunk-bjrnqvf4.js +1 -0
  270. package/web/chunk-bjrnqvf4.js.br +0 -0
  271. package/web/chunk-bjrnqvf4.js.gz +0 -0
  272. package/web/chunk-cbh6w44y.js +1 -0
  273. package/web/chunk-cbh6w44y.js.br +0 -0
  274. package/web/chunk-cbh6w44y.js.gz +0 -0
  275. package/web/chunk-d0bt1ypq.js +140 -0
  276. package/web/chunk-d0bt1ypq.js.br +0 -0
  277. package/web/chunk-d0bt1ypq.js.gz +0 -0
  278. package/web/chunk-ddfd1c5x.js +1 -0
  279. package/web/chunk-ddfd1c5x.js.br +0 -0
  280. package/web/chunk-ddfd1c5x.js.gz +0 -0
  281. package/web/chunk-deqy1rfx.js +1 -0
  282. package/web/chunk-deqy1rfx.js.br +0 -0
  283. package/web/chunk-deqy1rfx.js.gz +0 -0
  284. package/web/chunk-dk3dpdnc.js +4 -0
  285. package/web/chunk-dk3dpdnc.js.br +0 -0
  286. package/web/chunk-dk3dpdnc.js.gz +0 -0
  287. package/web/chunk-dr35dsw5.js +1 -0
  288. package/web/chunk-dr35dsw5.js.br +0 -0
  289. package/web/chunk-dr35dsw5.js.gz +0 -0
  290. package/web/chunk-drr7mqg2.js +1 -0
  291. package/web/chunk-drr7mqg2.js.br +0 -0
  292. package/web/chunk-drr7mqg2.js.gz +0 -0
  293. package/web/chunk-dy9amqbz.js +1 -0
  294. package/web/chunk-dy9amqbz.js.br +0 -0
  295. package/web/chunk-dy9amqbz.js.gz +0 -0
  296. package/web/chunk-e039ekp7.js +89 -0
  297. package/web/chunk-e039ekp7.js.br +0 -0
  298. package/web/chunk-e039ekp7.js.gz +0 -0
  299. package/web/chunk-e2e2fdwq.js +30 -0
  300. package/web/chunk-e2e2fdwq.js.br +0 -0
  301. package/web/chunk-e2e2fdwq.js.gz +0 -0
  302. package/web/chunk-e5j1v42p.js +7 -0
  303. package/web/chunk-e5j1v42p.js.br +0 -0
  304. package/web/chunk-e5j1v42p.js.gz +0 -0
  305. package/web/chunk-ef0wf92p.js +2 -0
  306. package/web/chunk-ef0wf92p.js.br +0 -0
  307. package/web/chunk-ef0wf92p.js.gz +0 -0
  308. package/web/chunk-emsyqa1e.js +1 -0
  309. package/web/chunk-emsyqa1e.js.br +0 -0
  310. package/web/chunk-emsyqa1e.js.gz +0 -0
  311. package/web/chunk-en7n9d1p.js +41 -0
  312. package/web/chunk-en7n9d1p.js.br +0 -0
  313. package/web/chunk-en7n9d1p.js.gz +0 -0
  314. package/web/chunk-ez4yt1s1.js +1 -0
  315. package/web/chunk-ez4yt1s1.js.br +0 -0
  316. package/web/chunk-ez4yt1s1.js.gz +0 -0
  317. package/web/chunk-f620k3hk.js +1 -0
  318. package/web/chunk-f620k3hk.js.br +0 -0
  319. package/web/chunk-f620k3hk.js.gz +0 -0
  320. package/web/chunk-fe2hpamc.js +200 -0
  321. package/web/chunk-fe2hpamc.js.br +0 -0
  322. package/web/chunk-fe2hpamc.js.gz +0 -0
  323. package/web/chunk-fm7saxzr.js +1 -0
  324. package/web/chunk-fm7saxzr.js.br +0 -0
  325. package/web/chunk-fm7saxzr.js.gz +0 -0
  326. package/web/chunk-fz5d3ayq.js +2 -0
  327. package/web/chunk-fz5d3ayq.js.br +0 -0
  328. package/web/chunk-fz5d3ayq.js.gz +0 -0
  329. package/web/chunk-gb2tkfv0.js +1 -0
  330. package/web/chunk-gb2tkfv0.js.br +0 -0
  331. package/web/chunk-gb2tkfv0.js.gz +0 -0
  332. package/web/chunk-gc1ypgy4.js +1 -0
  333. package/web/chunk-gc1ypgy4.js.br +0 -0
  334. package/web/chunk-gc1ypgy4.js.gz +0 -0
  335. package/web/chunk-h23pczjh.js +40 -0
  336. package/web/chunk-h23pczjh.js.br +0 -0
  337. package/web/chunk-h23pczjh.js.gz +0 -0
  338. package/web/chunk-h2sttxfn.js +1 -0
  339. package/web/chunk-h2sttxfn.js.br +2 -0
  340. package/web/chunk-h2sttxfn.js.gz +0 -0
  341. package/web/chunk-h5m9ggsm.js +2 -0
  342. package/web/chunk-h5m9ggsm.js.br +0 -0
  343. package/web/chunk-h5m9ggsm.js.gz +0 -0
  344. package/web/chunk-h5zc1hw5.js +1 -0
  345. package/web/chunk-h5zc1hw5.js.br +0 -0
  346. package/web/chunk-h5zc1hw5.js.gz +0 -0
  347. package/web/chunk-hkg6bts9.js +1 -0
  348. package/web/chunk-hkg6bts9.js.br +0 -0
  349. package/web/chunk-hkg6bts9.js.gz +0 -0
  350. package/web/chunk-hncdpeer.js +120 -0
  351. package/web/chunk-hncdpeer.js.br +0 -0
  352. package/web/chunk-hncdpeer.js.gz +0 -0
  353. package/web/chunk-j40wechd.js +2 -0
  354. package/web/chunk-j40wechd.js.br +0 -0
  355. package/web/chunk-j40wechd.js.gz +0 -0
  356. package/web/chunk-jddmse74.js +169 -0
  357. package/web/chunk-jddmse74.js.br +0 -0
  358. package/web/chunk-jddmse74.js.gz +0 -0
  359. package/web/chunk-jdvdg38q.js +3 -0
  360. package/web/chunk-jdvdg38q.js.br +0 -0
  361. package/web/chunk-jdvdg38q.js.gz +0 -0
  362. package/web/chunk-jf6q93m9.js +1 -0
  363. package/web/chunk-jf6q93m9.js.br +0 -0
  364. package/web/chunk-jf6q93m9.js.gz +0 -0
  365. package/web/chunk-jfd1gybx.js +39 -0
  366. package/web/chunk-jfd1gybx.js.br +0 -0
  367. package/web/chunk-jfd1gybx.js.gz +0 -0
  368. package/web/chunk-jkgkt722.js +1 -0
  369. package/web/chunk-jkgkt722.js.br +0 -0
  370. package/web/chunk-jkgkt722.js.gz +0 -0
  371. package/web/chunk-k427fwgp.js +1 -0
  372. package/web/chunk-k427fwgp.js.br +0 -0
  373. package/web/chunk-k427fwgp.js.gz +0 -0
  374. package/web/chunk-k8pezbya.js +2 -0
  375. package/web/chunk-k8pezbya.js.br +3 -0
  376. package/web/chunk-k8pezbya.js.gz +0 -0
  377. package/web/chunk-k9t941fj.js +1 -0
  378. package/web/chunk-k9t941fj.js.br +0 -0
  379. package/web/chunk-k9t941fj.js.gz +0 -0
  380. package/web/chunk-kkzwvnft.js +1 -0
  381. package/web/chunk-kkzwvnft.js.br +0 -0
  382. package/web/chunk-kkzwvnft.js.gz +0 -0
  383. package/web/chunk-kpm8gp4z.js +292 -0
  384. package/web/chunk-kpm8gp4z.js.br +0 -0
  385. package/web/chunk-kpm8gp4z.js.gz +0 -0
  386. package/web/chunk-kqyk2an3.js +214 -0
  387. package/web/chunk-kqyk2an3.js.br +0 -0
  388. package/web/chunk-kqyk2an3.js.gz +0 -0
  389. package/web/chunk-m3gryxba.js +2 -0
  390. package/web/chunk-m3gryxba.js.br +0 -0
  391. package/web/chunk-m3gryxba.js.gz +0 -0
  392. package/web/chunk-m8h3c5x3.js +1 -0
  393. package/web/chunk-m8h3c5x3.js.br +0 -0
  394. package/web/chunk-m8h3c5x3.js.gz +0 -0
  395. package/web/chunk-mb7sr4tf.js +55 -0
  396. package/web/chunk-mb7sr4tf.js.br +0 -0
  397. package/web/chunk-mb7sr4tf.js.gz +0 -0
  398. package/web/chunk-meqcd10n.js +1 -0
  399. package/web/chunk-meqcd10n.js.br +0 -0
  400. package/web/chunk-meqcd10n.js.gz +0 -0
  401. package/web/chunk-msrq7vsz.js +7 -0
  402. package/web/chunk-msrq7vsz.js.br +0 -0
  403. package/web/chunk-msrq7vsz.js.gz +0 -0
  404. package/web/chunk-myhtb5ps.js +2 -0
  405. package/web/chunk-myhtb5ps.js.br +0 -0
  406. package/web/chunk-myhtb5ps.js.gz +0 -0
  407. package/web/chunk-n1n55yt8.js +84 -0
  408. package/web/chunk-n1n55yt8.js.br +0 -0
  409. package/web/chunk-n1n55yt8.js.gz +0 -0
  410. package/web/chunk-nmgy1mrz.js +1 -0
  411. package/web/chunk-nmgy1mrz.js.br +0 -0
  412. package/web/chunk-nmgy1mrz.js.gz +0 -0
  413. package/web/chunk-nmnyaawa.js +24 -0
  414. package/web/chunk-nmnyaawa.js.br +0 -0
  415. package/web/chunk-nmnyaawa.js.gz +0 -0
  416. package/web/chunk-nwepnbvn.js +70 -0
  417. package/web/chunk-nwepnbvn.js.br +0 -0
  418. package/web/chunk-nwepnbvn.js.gz +0 -0
  419. package/web/chunk-p2cmfhpz.js +2 -0
  420. package/web/chunk-p2cmfhpz.js.br +0 -0
  421. package/web/chunk-p2cmfhpz.js.gz +0 -0
  422. package/web/chunk-pac9nyhp.js +2 -0
  423. package/web/chunk-pac9nyhp.js.br +0 -0
  424. package/web/chunk-pac9nyhp.js.gz +0 -0
  425. package/web/chunk-pdt40dj7.js +1 -0
  426. package/web/chunk-pdt40dj7.js.br +2 -0
  427. package/web/chunk-pdt40dj7.js.gz +0 -0
  428. package/web/chunk-phs38wt7.js +2 -0
  429. package/web/chunk-phs38wt7.js.br +0 -0
  430. package/web/chunk-phs38wt7.js.gz +0 -0
  431. package/web/chunk-prc7b9xh.js +1 -0
  432. package/web/chunk-prc7b9xh.js.br +0 -0
  433. package/web/chunk-prc7b9xh.js.gz +0 -0
  434. package/web/chunk-q1e80chw.js +1 -0
  435. package/web/chunk-q1e80chw.js.br +2 -0
  436. package/web/chunk-q1e80chw.js.gz +0 -0
  437. package/web/chunk-q6aqg79d.js +2 -0
  438. package/web/chunk-q6aqg79d.js.br +0 -0
  439. package/web/chunk-q6aqg79d.js.gz +0 -0
  440. package/web/chunk-q6sv3fhe.js +2 -0
  441. package/web/chunk-q6sv3fhe.js.br +0 -0
  442. package/web/chunk-q6sv3fhe.js.gz +0 -0
  443. package/web/chunk-rbd2n2mr.js +1 -0
  444. package/web/chunk-rbd2n2mr.js.br +0 -0
  445. package/web/chunk-rbd2n2mr.js.gz +0 -0
  446. package/web/chunk-rbh0yrp6.js +1 -0
  447. package/web/chunk-rbh0yrp6.js.br +0 -0
  448. package/web/chunk-rbh0yrp6.js.gz +0 -0
  449. package/web/chunk-rdarpbhd.js +2 -0
  450. package/web/chunk-rdarpbhd.js.br +0 -0
  451. package/web/chunk-rdarpbhd.js.gz +0 -0
  452. package/web/chunk-rf93p28v.js +1 -0
  453. package/web/chunk-rf93p28v.js.br +0 -0
  454. package/web/chunk-rf93p28v.js.gz +0 -0
  455. package/web/chunk-rjvdk0s6.js +1 -0
  456. package/web/chunk-rjvdk0s6.js.br +0 -0
  457. package/web/chunk-rjvdk0s6.js.gz +0 -0
  458. package/web/chunk-rvmk483c.js +1 -0
  459. package/web/chunk-rvmk483c.js.br +0 -0
  460. package/web/chunk-rvmk483c.js.gz +0 -0
  461. package/web/chunk-s99vfrrz.js +1 -0
  462. package/web/chunk-s99vfrrz.js.br +0 -0
  463. package/web/chunk-s99vfrrz.js.gz +0 -0
  464. package/web/chunk-saem11tv.js +2 -0
  465. package/web/chunk-saem11tv.js.br +0 -0
  466. package/web/chunk-saem11tv.js.gz +0 -0
  467. package/web/chunk-scv8t4m6.js +1 -0
  468. package/web/chunk-scv8t4m6.js.br +0 -0
  469. package/web/chunk-scv8t4m6.js.gz +0 -0
  470. package/web/chunk-stsmcqxe.js +1 -0
  471. package/web/chunk-stsmcqxe.js.br +0 -0
  472. package/web/chunk-stsmcqxe.js.gz +0 -0
  473. package/web/chunk-svaq7f3c.js +1134 -0
  474. package/web/chunk-svaq7f3c.js.br +0 -0
  475. package/web/chunk-svaq7f3c.js.gz +0 -0
  476. package/web/chunk-sy099zt8.js +1 -0
  477. package/web/chunk-sy099zt8.js.br +0 -0
  478. package/web/chunk-sy099zt8.js.gz +0 -0
  479. package/web/chunk-thqrbjwn.js +1 -0
  480. package/web/chunk-thqrbjwn.js.br +2 -0
  481. package/web/chunk-thqrbjwn.js.gz +0 -0
  482. package/web/chunk-ty1m1k6b.js +1 -0
  483. package/web/chunk-ty1m1k6b.js.br +0 -0
  484. package/web/chunk-ty1m1k6b.js.gz +0 -0
  485. package/web/chunk-w54qcqk3.js +1 -0
  486. package/web/chunk-w54qcqk3.js.br +0 -0
  487. package/web/chunk-w54qcqk3.js.gz +0 -0
  488. package/web/chunk-wgf4paqc.js +1 -0
  489. package/web/chunk-wgf4paqc.js.br +0 -0
  490. package/web/chunk-wgf4paqc.js.gz +0 -0
  491. package/web/chunk-ww5c1dmz.js +1 -0
  492. package/web/chunk-ww5c1dmz.js.br +0 -0
  493. package/web/chunk-ww5c1dmz.js.gz +0 -0
  494. package/web/chunk-x5m7phbb.js +1 -0
  495. package/web/chunk-x5m7phbb.js.br +0 -0
  496. package/web/chunk-x5m7phbb.js.gz +0 -0
  497. package/web/chunk-x9wzj52f.js +2 -0
  498. package/web/chunk-x9wzj52f.js.br +0 -0
  499. package/web/chunk-x9wzj52f.js.gz +0 -0
  500. package/web/chunk-xgfam7bx.js +1 -0
  501. package/web/chunk-xgfam7bx.js.br +0 -0
  502. package/web/chunk-xgfam7bx.js.gz +0 -0
  503. package/web/chunk-xnn07hr4.js +21 -0
  504. package/web/chunk-xnn07hr4.js.br +0 -0
  505. package/web/chunk-xnn07hr4.js.gz +0 -0
  506. package/web/chunk-xreg1e03.js +78 -0
  507. package/web/chunk-xreg1e03.js.br +0 -0
  508. package/web/chunk-xreg1e03.js.gz +0 -0
  509. package/web/chunk-xsxd3wsv.js +4 -0
  510. package/web/chunk-xsxd3wsv.js.br +0 -0
  511. package/web/chunk-xsxd3wsv.js.gz +0 -0
  512. package/web/chunk-y7jebh1j.js +1 -0
  513. package/web/chunk-y7jebh1j.js.br +0 -0
  514. package/web/chunk-y7jebh1j.js.gz +0 -0
  515. package/web/chunk-yhn2mwnb.js +291 -0
  516. package/web/chunk-yhn2mwnb.js.br +0 -0
  517. package/web/chunk-yhn2mwnb.js.gz +0 -0
  518. package/web/chunk-yj85fg74.js +1 -0
  519. package/web/chunk-yj85fg74.js.br +0 -0
  520. package/web/chunk-yj85fg74.js.gz +0 -0
  521. package/web/chunk-yjvjzayn.js +1 -0
  522. package/web/chunk-yjvjzayn.js.br +0 -0
  523. package/web/chunk-yjvjzayn.js.gz +0 -0
  524. package/web/chunk-yqwvedf5.js +370 -0
  525. package/web/chunk-yqwvedf5.js.br +0 -0
  526. package/web/chunk-yqwvedf5.js.gz +0 -0
  527. package/web/chunk-z3tr221x.js +1 -0
  528. package/web/chunk-z3tr221x.js.br +0 -0
  529. package/web/chunk-z3tr221x.js.gz +0 -0
  530. package/web/chunk-z4n3tx0q.js +1 -0
  531. package/web/chunk-z4n3tx0q.js.br +0 -0
  532. package/web/chunk-z4n3tx0q.js.gz +0 -0
  533. package/web/index.html +1 -1
  534. package/web/index.html.br +0 -0
  535. package/web/index.html.gz +0 -0
  536. package/worker.js +1 -1
  537. package/chunk-03b5jh31.js +0 -5
  538. package/chunk-0b2brwjc.js +0 -3
  539. package/chunk-0x0459qp.js +0 -2
  540. package/chunk-16yz5ebn.js +0 -2
  541. package/chunk-1kdd7xry.js +0 -2
  542. package/chunk-225dyk1y.js +0 -8
  543. package/chunk-2fymxwe7.js +0 -7
  544. package/chunk-2m2sa0bp.js +0 -2
  545. package/chunk-35y6nf6k.js +0 -12
  546. package/chunk-3phf8eg6.js +0 -3
  547. package/chunk-3qxq264t.js +0 -2
  548. package/chunk-3r38vbt5.js +0 -2
  549. package/chunk-3s8rpc1w.js +0 -3
  550. package/chunk-3t8wz9w8.js +0 -3
  551. package/chunk-43qf44t8.js +0 -3
  552. package/chunk-49hsqsht.js +0 -2
  553. package/chunk-4fbj3k59.js +0 -3
  554. package/chunk-4fj91gt1.js +0 -4
  555. package/chunk-51a0843g.js +0 -3
  556. package/chunk-5h59tby8.js +0 -470
  557. package/chunk-5m51j40e.js +0 -7
  558. package/chunk-5mt8xxex.js +0 -3
  559. package/chunk-85sjfyjd.js +0 -2
  560. package/chunk-97ntcrm7.js +0 -2
  561. package/chunk-9qzyn98b.js +0 -3
  562. package/chunk-9t3v8c3m.js +0 -2
  563. package/chunk-9w1m9av8.js +0 -11
  564. package/chunk-9x28stv0.js +0 -2
  565. package/chunk-a3fpx924.js +0 -3
  566. package/chunk-ak95r8mq.js +0 -3556
  567. package/chunk-ak9rkrf3.js +0 -5
  568. package/chunk-b516bp7n.js +0 -3
  569. package/chunk-bn1aaewd.js +0 -59
  570. package/chunk-c5ydt3vq.js +0 -3
  571. package/chunk-cjh5h31t.js +0 -11
  572. package/chunk-cr0tqn6j.js +0 -3
  573. package/chunk-e0ytnnwt.js +0 -3
  574. package/chunk-e2m8ap8f.js +0 -3
  575. package/chunk-e8xywvv4.js +0 -3
  576. package/chunk-enmrpjpt.js +0 -3
  577. package/chunk-ewaskman.js +0 -2
  578. package/chunk-feyt85gg.js +0 -2
  579. package/chunk-fj56fznw.js +0 -3
  580. package/chunk-ftg4b5pa.js +0 -3
  581. package/chunk-g6cc7ac1.js +0 -3
  582. package/chunk-gdx1j9c5.js +0 -10
  583. package/chunk-gs5aebwh.js +0 -2
  584. package/chunk-h00wjps7.js +0 -4
  585. package/chunk-h1fwdz4h.js +0 -2
  586. package/chunk-hhxtc9jn.js +0 -2
  587. package/chunk-hrn2ss1a.js +0 -2
  588. package/chunk-jhwb962k.js +0 -15
  589. package/chunk-jpwr1sd2.js +0 -3
  590. package/chunk-jy07y4pv.js +0 -7
  591. package/chunk-k9x1r69s.js +0 -18
  592. package/chunk-kb5h9rmb.js +0 -2
  593. package/chunk-kgnd32hn.js +0 -4
  594. package/chunk-kka12j10.js +0 -3
  595. package/chunk-kypdthjg.js +0 -2
  596. package/chunk-m9386732.js +0 -16
  597. package/chunk-np123myw.js +0 -12
  598. package/chunk-ntntwtxn.js +0 -5
  599. package/chunk-qn70tm91.js +0 -20
  600. package/chunk-qtgc74er.js +0 -5
  601. package/chunk-qz6ybxjg.js +0 -39
  602. package/chunk-r36b12zb.js +0 -2
  603. package/chunk-re8n2te5.js +0 -2
  604. package/chunk-rpbxbb92.js +0 -10
  605. package/chunk-rqrjzz73.js +0 -2
  606. package/chunk-scy1p7x2.js +0 -9
  607. package/chunk-sq5ppnr3.js +0 -25
  608. package/chunk-syhhzr1j.js +0 -3
  609. package/chunk-t3mq64c8.js +0 -3
  610. package/chunk-tmq8ktys.js +0 -3
  611. package/chunk-ttv805sb.js +0 -390
  612. package/chunk-v878x8zr.js +0 -7
  613. package/chunk-ve1b6vg6.js +0 -2
  614. package/chunk-vzrmdaba.js +0 -2
  615. package/chunk-w3n8wm44.js +0 -2
  616. package/chunk-w3skxmvx.js +0 -3
  617. package/chunk-wxzk086k.js +0 -2
  618. package/chunk-x1y4s01x.js +0 -31
  619. package/chunk-y8mf9tcj.js +0 -25
  620. package/chunk-z4g2q36h.js +0 -3
  621. package/chunk-zkjnt298.js +0 -3
  622. package/web/chunk-07dd0jed.js +0 -78
  623. package/web/chunk-07dd0jed.js.br +0 -0
  624. package/web/chunk-07dd0jed.js.gz +0 -0
  625. package/web/chunk-0hvyq55w.js +0 -1
  626. package/web/chunk-0hvyq55w.js.br +0 -0
  627. package/web/chunk-0hvyq55w.js.gz +0 -0
  628. package/web/chunk-0q5drhbk.js +0 -1
  629. package/web/chunk-0q5drhbk.js.br +0 -0
  630. package/web/chunk-0q5drhbk.js.gz +0 -0
  631. package/web/chunk-0rvx1z2b.js +0 -1
  632. package/web/chunk-0rvx1z2b.js.br +0 -0
  633. package/web/chunk-0rvx1z2b.js.gz +0 -0
  634. package/web/chunk-0w6ta3ps.js +0 -1
  635. package/web/chunk-0w6ta3ps.js.br +0 -0
  636. package/web/chunk-0w6ta3ps.js.gz +0 -0
  637. package/web/chunk-0wqmwnd8.js +0 -2
  638. package/web/chunk-0wqmwnd8.js.br +0 -0
  639. package/web/chunk-0wqmwnd8.js.gz +0 -0
  640. package/web/chunk-0z10aqp1.js +0 -2
  641. package/web/chunk-0z10aqp1.js.br +0 -0
  642. package/web/chunk-0z10aqp1.js.gz +0 -0
  643. package/web/chunk-12vcrj7y.js +0 -1
  644. package/web/chunk-12vcrj7y.js.br +0 -0
  645. package/web/chunk-12vcrj7y.js.gz +0 -0
  646. package/web/chunk-16b5anw4.js +0 -3
  647. package/web/chunk-16b5anw4.js.br +0 -0
  648. package/web/chunk-16b5anw4.js.gz +0 -0
  649. package/web/chunk-21d8pzcm.js +0 -142
  650. package/web/chunk-21d8pzcm.js.br +0 -0
  651. package/web/chunk-21d8pzcm.js.gz +0 -0
  652. package/web/chunk-2c4affp1.js +0 -70
  653. package/web/chunk-2c4affp1.js.br +0 -0
  654. package/web/chunk-2c4affp1.js.gz +0 -0
  655. package/web/chunk-2dykyq1n.js +0 -2
  656. package/web/chunk-2dykyq1n.js.br +0 -0
  657. package/web/chunk-2dykyq1n.js.gz +0 -0
  658. package/web/chunk-2h2w244w.js +0 -370
  659. package/web/chunk-2h2w244w.js.br +0 -0
  660. package/web/chunk-2h2w244w.js.gz +0 -0
  661. package/web/chunk-2hd51wb6.js +0 -169
  662. package/web/chunk-2hd51wb6.js.br +0 -0
  663. package/web/chunk-2hd51wb6.js.gz +0 -0
  664. package/web/chunk-2tc6krye.js +0 -291
  665. package/web/chunk-2tc6krye.js.br +0 -0
  666. package/web/chunk-2tc6krye.js.gz +0 -0
  667. package/web/chunk-2w27acew.js +0 -38
  668. package/web/chunk-2w27acew.js.br +0 -0
  669. package/web/chunk-2w27acew.js.gz +0 -0
  670. package/web/chunk-2w4rdnhj.js +0 -1
  671. package/web/chunk-2w4rdnhj.js.br +0 -0
  672. package/web/chunk-2w4rdnhj.js.gz +0 -0
  673. package/web/chunk-31vxes2p.js +0 -200
  674. package/web/chunk-31vxes2p.js.br +0 -0
  675. package/web/chunk-31vxes2p.js.gz +0 -0
  676. package/web/chunk-32qd2y5h.js +0 -1
  677. package/web/chunk-32qd2y5h.js.br +0 -0
  678. package/web/chunk-32qd2y5h.js.gz +0 -0
  679. package/web/chunk-366a11ec.js +0 -1
  680. package/web/chunk-366a11ec.js.br +0 -0
  681. package/web/chunk-366a11ec.js.gz +0 -0
  682. package/web/chunk-39kaz6fa.js +0 -4
  683. package/web/chunk-39kaz6fa.js.br +0 -0
  684. package/web/chunk-39kaz6fa.js.gz +0 -0
  685. package/web/chunk-3d3y4tep.js +0 -214
  686. package/web/chunk-3d3y4tep.js.br +0 -0
  687. package/web/chunk-3d3y4tep.js.gz +0 -0
  688. package/web/chunk-4makcmpw.js +0 -1
  689. package/web/chunk-4makcmpw.js.br +0 -0
  690. package/web/chunk-4makcmpw.js.gz +0 -0
  691. package/web/chunk-4mypk63p.js +0 -2
  692. package/web/chunk-4mypk63p.js.br +0 -0
  693. package/web/chunk-4mypk63p.js.gz +0 -0
  694. package/web/chunk-4wd9r73y.js +0 -1
  695. package/web/chunk-4wd9r73y.js.br +0 -0
  696. package/web/chunk-4wd9r73y.js.gz +0 -0
  697. package/web/chunk-4zftsyq2.js +0 -2
  698. package/web/chunk-4zftsyq2.js.br +0 -0
  699. package/web/chunk-4zftsyq2.js.gz +0 -0
  700. package/web/chunk-50wrjr22.js +0 -2
  701. package/web/chunk-50wrjr22.js.br +0 -0
  702. package/web/chunk-50wrjr22.js.gz +0 -0
  703. package/web/chunk-52tt9qt4.js +0 -2
  704. package/web/chunk-52tt9qt4.js.br +0 -0
  705. package/web/chunk-52tt9qt4.js.gz +0 -0
  706. package/web/chunk-55kw8p9r.js +0 -89
  707. package/web/chunk-55kw8p9r.js.br +0 -0
  708. package/web/chunk-55kw8p9r.js.gz +0 -0
  709. package/web/chunk-56tqa12m.js +0 -2
  710. package/web/chunk-56tqa12m.js.br +0 -0
  711. package/web/chunk-56tqa12m.js.gz +0 -0
  712. package/web/chunk-595tqsv5.js +0 -1
  713. package/web/chunk-595tqsv5.js.br +0 -0
  714. package/web/chunk-595tqsv5.js.gz +0 -0
  715. package/web/chunk-5cp4n5ck.js +0 -2
  716. package/web/chunk-5cp4n5ck.js.br +0 -0
  717. package/web/chunk-5cp4n5ck.js.gz +0 -0
  718. package/web/chunk-5h193k2c.js +0 -1
  719. package/web/chunk-5h193k2c.js.br +0 -0
  720. package/web/chunk-5h193k2c.js.gz +0 -0
  721. package/web/chunk-5nbmnchg.js +0 -16
  722. package/web/chunk-5nbmnchg.js.br +0 -0
  723. package/web/chunk-5nbmnchg.js.gz +0 -0
  724. package/web/chunk-5vc1wkwb.js +0 -2
  725. package/web/chunk-5vc1wkwb.js.br +0 -0
  726. package/web/chunk-5vc1wkwb.js.gz +0 -0
  727. package/web/chunk-5wgdprjp.js +0 -1
  728. package/web/chunk-5wgdprjp.js.br +0 -0
  729. package/web/chunk-5wgdprjp.js.gz +0 -0
  730. package/web/chunk-60fbfw70.js +0 -1
  731. package/web/chunk-60fbfw70.js.br +0 -0
  732. package/web/chunk-60fbfw70.js.gz +0 -0
  733. package/web/chunk-62z94rt2.js +0 -36
  734. package/web/chunk-62z94rt2.js.br +0 -0
  735. package/web/chunk-62z94rt2.js.gz +0 -0
  736. package/web/chunk-67khfy00.css +0 -1
  737. package/web/chunk-67khfy00.css.br +0 -0
  738. package/web/chunk-67khfy00.css.gz +0 -0
  739. package/web/chunk-6bt2t0xt.js +0 -8
  740. package/web/chunk-6bt2t0xt.js.br +0 -0
  741. package/web/chunk-6bt2t0xt.js.gz +0 -0
  742. package/web/chunk-780qvh05.js +0 -99
  743. package/web/chunk-780qvh05.js.br +0 -0
  744. package/web/chunk-780qvh05.js.gz +0 -0
  745. package/web/chunk-78t5dqea.js +0 -324
  746. package/web/chunk-78t5dqea.js.br +0 -0
  747. package/web/chunk-78t5dqea.js.gz +0 -0
  748. package/web/chunk-7cf1kk45.js +0 -1
  749. package/web/chunk-7cf1kk45.js.br +0 -2
  750. package/web/chunk-7cf1kk45.js.gz +0 -0
  751. package/web/chunk-7edmyret.js +0 -1
  752. package/web/chunk-7edmyret.js.br +0 -0
  753. package/web/chunk-7edmyret.js.gz +0 -0
  754. package/web/chunk-7remkcff.js +0 -2
  755. package/web/chunk-7remkcff.js.br +0 -0
  756. package/web/chunk-7remkcff.js.gz +0 -0
  757. package/web/chunk-7s062q01.js +0 -1
  758. package/web/chunk-7s062q01.js.br +0 -0
  759. package/web/chunk-7s062q01.js.gz +0 -0
  760. package/web/chunk-82zwwy0b.js +0 -1
  761. package/web/chunk-82zwwy0b.js.br +0 -0
  762. package/web/chunk-82zwwy0b.js.gz +0 -0
  763. package/web/chunk-89crtpnw.js +0 -1
  764. package/web/chunk-89crtpnw.js.br +0 -0
  765. package/web/chunk-89crtpnw.js.gz +0 -0
  766. package/web/chunk-8c6h952g.js +0 -106
  767. package/web/chunk-8c6h952g.js.br +0 -0
  768. package/web/chunk-8c6h952g.js.gz +0 -0
  769. package/web/chunk-8g239029.js +0 -1
  770. package/web/chunk-8g239029.js.br +0 -0
  771. package/web/chunk-8g239029.js.gz +0 -0
  772. package/web/chunk-8wgev3hd.js +0 -1
  773. package/web/chunk-8wgev3hd.js.br +0 -0
  774. package/web/chunk-8wgev3hd.js.gz +0 -0
  775. package/web/chunk-9r7nbre7.js +0 -2
  776. package/web/chunk-9r7nbre7.js.br +0 -0
  777. package/web/chunk-9r7nbre7.js.gz +0 -0
  778. package/web/chunk-9vcbnf1m.js +0 -1
  779. package/web/chunk-9vcbnf1m.js.br +0 -0
  780. package/web/chunk-9vcbnf1m.js.gz +0 -0
  781. package/web/chunk-9y9nwaqj.js +0 -1
  782. package/web/chunk-9y9nwaqj.js.br +0 -0
  783. package/web/chunk-9y9nwaqj.js.gz +0 -0
  784. package/web/chunk-abahqsws.js +0 -2
  785. package/web/chunk-abahqsws.js.br +0 -0
  786. package/web/chunk-abahqsws.js.gz +0 -0
  787. package/web/chunk-acv6gk2b.js +0 -2
  788. package/web/chunk-acv6gk2b.js.br +0 -0
  789. package/web/chunk-acv6gk2b.js.gz +0 -0
  790. package/web/chunk-ad6x47yy.js +0 -1
  791. package/web/chunk-ad6x47yy.js.br +0 -0
  792. package/web/chunk-ad6x47yy.js.gz +0 -0
  793. package/web/chunk-ajpzsx51.js +0 -1
  794. package/web/chunk-ajpzsx51.js.br +0 -0
  795. package/web/chunk-ajpzsx51.js.gz +0 -0
  796. package/web/chunk-b1b9txvk.js +0 -1
  797. package/web/chunk-b1b9txvk.js.br +0 -0
  798. package/web/chunk-b1b9txvk.js.gz +0 -0
  799. package/web/chunk-b83bzjcx.js +0 -1134
  800. package/web/chunk-b83bzjcx.js.br +0 -0
  801. package/web/chunk-b83bzjcx.js.gz +0 -0
  802. package/web/chunk-c1zhat04.js +0 -1
  803. package/web/chunk-c1zhat04.js.br +0 -0
  804. package/web/chunk-c1zhat04.js.gz +0 -0
  805. package/web/chunk-c37hhmtd.js +0 -62
  806. package/web/chunk-c37hhmtd.js.br +0 -0
  807. package/web/chunk-c37hhmtd.js.gz +0 -0
  808. package/web/chunk-c69t0ysj.js +0 -1
  809. package/web/chunk-c69t0ysj.js.br +0 -0
  810. package/web/chunk-c69t0ysj.js.gz +0 -0
  811. package/web/chunk-caz85hz4.js +0 -1
  812. package/web/chunk-caz85hz4.js.br +0 -0
  813. package/web/chunk-caz85hz4.js.gz +0 -0
  814. package/web/chunk-cbtpaf3e.js +0 -7
  815. package/web/chunk-cbtpaf3e.js.br +0 -0
  816. package/web/chunk-cbtpaf3e.js.gz +0 -0
  817. package/web/chunk-d18r4m14.js +0 -141
  818. package/web/chunk-d18r4m14.js.br +0 -0
  819. package/web/chunk-d18r4m14.js.gz +0 -0
  820. package/web/chunk-d1gga18f.js +0 -217
  821. package/web/chunk-d1gga18f.js.br +0 -0
  822. package/web/chunk-d1gga18f.js.gz +0 -0
  823. package/web/chunk-d4kjy2qn.js +0 -1
  824. package/web/chunk-d4kjy2qn.js.br +0 -0
  825. package/web/chunk-d4kjy2qn.js.gz +0 -0
  826. package/web/chunk-dbv8qpen.js +0 -303
  827. package/web/chunk-dbv8qpen.js.br +0 -0
  828. package/web/chunk-dbv8qpen.js.gz +0 -0
  829. package/web/chunk-dmqtdeb4.js +0 -1
  830. package/web/chunk-dmqtdeb4.js.br +0 -0
  831. package/web/chunk-dmqtdeb4.js.gz +0 -0
  832. package/web/chunk-e65y60v1.js +0 -2
  833. package/web/chunk-e65y60v1.js.br +0 -0
  834. package/web/chunk-e65y60v1.js.gz +0 -0
  835. package/web/chunk-e6r1sb5r.js +0 -7
  836. package/web/chunk-e6r1sb5r.js.br +0 -0
  837. package/web/chunk-e6r1sb5r.js.gz +0 -0
  838. package/web/chunk-ed8qqn45.js +0 -2
  839. package/web/chunk-ed8qqn45.js.br +0 -0
  840. package/web/chunk-ed8qqn45.js.gz +0 -0
  841. package/web/chunk-ef1h0tt7.js +0 -2
  842. package/web/chunk-ef1h0tt7.js.br +0 -0
  843. package/web/chunk-ef1h0tt7.js.gz +0 -0
  844. package/web/chunk-ep5qff8m.js +0 -1
  845. package/web/chunk-ep5qff8m.js.br +0 -0
  846. package/web/chunk-ep5qff8m.js.gz +0 -0
  847. package/web/chunk-ex66t805.js +0 -120
  848. package/web/chunk-ex66t805.js.br +0 -0
  849. package/web/chunk-ex66t805.js.gz +0 -0
  850. package/web/chunk-fb8qtyqg.js +0 -1
  851. package/web/chunk-fb8qtyqg.js.br +0 -0
  852. package/web/chunk-fb8qtyqg.js.gz +0 -0
  853. package/web/chunk-fbzhgaak.js +0 -98
  854. package/web/chunk-fbzhgaak.js.br +0 -0
  855. package/web/chunk-fbzhgaak.js.gz +0 -0
  856. package/web/chunk-ffwyfdg4.js +0 -1
  857. package/web/chunk-ffwyfdg4.js.br +0 -0
  858. package/web/chunk-ffwyfdg4.js.gz +0 -0
  859. package/web/chunk-fsz1msjr.js +0 -2
  860. package/web/chunk-fsz1msjr.js.br +0 -0
  861. package/web/chunk-fsz1msjr.js.gz +0 -0
  862. package/web/chunk-fztzcy7c.js +0 -89
  863. package/web/chunk-fztzcy7c.js.br +0 -0
  864. package/web/chunk-fztzcy7c.js.gz +0 -0
  865. package/web/chunk-g3vbtxgy.js +0 -2
  866. package/web/chunk-g3vbtxgy.js.br +0 -0
  867. package/web/chunk-g3vbtxgy.js.gz +0 -0
  868. package/web/chunk-g4st8a4e.js +0 -1
  869. package/web/chunk-g4st8a4e.js.br +0 -0
  870. package/web/chunk-g4st8a4e.js.gz +0 -0
  871. package/web/chunk-gs41j1vb.js +0 -1
  872. package/web/chunk-gs41j1vb.js.br +0 -0
  873. package/web/chunk-gs41j1vb.js.gz +0 -0
  874. package/web/chunk-gt4dzb4b.js +0 -292
  875. package/web/chunk-gt4dzb4b.js.br +0 -0
  876. package/web/chunk-gt4dzb4b.js.gz +0 -0
  877. package/web/chunk-h4g8j133.js +0 -7
  878. package/web/chunk-h4g8j133.js.br +0 -0
  879. package/web/chunk-h4g8j133.js.gz +0 -0
  880. package/web/chunk-hj067dfg.js +0 -1
  881. package/web/chunk-hj067dfg.js.br +0 -2
  882. package/web/chunk-hj067dfg.js.gz +0 -0
  883. package/web/chunk-hp167dbv.js +0 -1
  884. package/web/chunk-hp167dbv.js.br +0 -0
  885. package/web/chunk-hp167dbv.js.gz +0 -0
  886. package/web/chunk-ht3cek8b.js +0 -1
  887. package/web/chunk-ht3cek8b.js.br +0 -2
  888. package/web/chunk-ht3cek8b.js.gz +0 -0
  889. package/web/chunk-hw4f79k8.js +0 -1
  890. package/web/chunk-hw4f79k8.js.br +0 -0
  891. package/web/chunk-hw4f79k8.js.gz +0 -0
  892. package/web/chunk-j2y3wkxc.js +0 -40
  893. package/web/chunk-j2y3wkxc.js.br +0 -0
  894. package/web/chunk-j2y3wkxc.js.gz +0 -0
  895. package/web/chunk-j4942vkb.js +0 -1
  896. package/web/chunk-j4942vkb.js.br +0 -0
  897. package/web/chunk-j4942vkb.js.gz +0 -0
  898. package/web/chunk-j7sfcfxr.js +0 -1
  899. package/web/chunk-j7sfcfxr.js.br +0 -0
  900. package/web/chunk-j7sfcfxr.js.gz +0 -0
  901. package/web/chunk-jge5e8c4.js +0 -1
  902. package/web/chunk-jge5e8c4.js.br +0 -0
  903. package/web/chunk-jge5e8c4.js.gz +0 -0
  904. package/web/chunk-jyjgvcac.js +0 -2
  905. package/web/chunk-jyjgvcac.js.br +0 -0
  906. package/web/chunk-jyjgvcac.js.gz +0 -0
  907. package/web/chunk-k1d0y72z.js +0 -2
  908. package/web/chunk-k1d0y72z.js.br +0 -0
  909. package/web/chunk-k1d0y72z.js.gz +0 -0
  910. package/web/chunk-k9bzz441.js +0 -1
  911. package/web/chunk-k9bzz441.js.br +0 -0
  912. package/web/chunk-k9bzz441.js.gz +0 -0
  913. package/web/chunk-keway722.js +0 -39
  914. package/web/chunk-keway722.js.br +0 -0
  915. package/web/chunk-keway722.js.gz +0 -0
  916. package/web/chunk-kh0xyffx.js +0 -1
  917. package/web/chunk-kh0xyffx.js.br +0 -0
  918. package/web/chunk-kh0xyffx.js.gz +0 -0
  919. package/web/chunk-kr7shpnb.js +0 -4
  920. package/web/chunk-kr7shpnb.js.br +0 -0
  921. package/web/chunk-kr7shpnb.js.gz +0 -0
  922. package/web/chunk-ktvxgxsd.js +0 -2
  923. package/web/chunk-ktvxgxsd.js.br +0 -0
  924. package/web/chunk-ktvxgxsd.js.gz +0 -0
  925. package/web/chunk-kv5swske.js +0 -1
  926. package/web/chunk-kv5swske.js.br +0 -0
  927. package/web/chunk-kv5swske.js.gz +0 -0
  928. package/web/chunk-kx2k462h.js +0 -1
  929. package/web/chunk-kx2k462h.js.br +0 -0
  930. package/web/chunk-kx2k462h.js.gz +0 -0
  931. package/web/chunk-m5b7hny2.js +0 -2
  932. package/web/chunk-m5b7hny2.js.br +0 -0
  933. package/web/chunk-m5b7hny2.js.gz +0 -0
  934. package/web/chunk-m7kypzvp.js +0 -2
  935. package/web/chunk-m7kypzvp.js.br +0 -0
  936. package/web/chunk-m7kypzvp.js.gz +0 -0
  937. package/web/chunk-n00se8nk.js +0 -2
  938. package/web/chunk-n00se8nk.js.br +0 -0
  939. package/web/chunk-n00se8nk.js.gz +0 -0
  940. package/web/chunk-n419cees.js +0 -1
  941. package/web/chunk-n419cees.js.br +0 -0
  942. package/web/chunk-n419cees.js.gz +0 -0
  943. package/web/chunk-n45fgfyt.js +0 -1
  944. package/web/chunk-n45fgfyt.js.br +0 -2
  945. package/web/chunk-n45fgfyt.js.gz +0 -0
  946. package/web/chunk-n5v71fas.js +0 -2
  947. package/web/chunk-n5v71fas.js.br +0 -0
  948. package/web/chunk-n5v71fas.js.gz +0 -0
  949. package/web/chunk-ngdj0r7w.js +0 -24
  950. package/web/chunk-ngdj0r7w.js.br +0 -0
  951. package/web/chunk-ngdj0r7w.js.gz +0 -0
  952. package/web/chunk-nzey7cpv.js +0 -1
  953. package/web/chunk-nzey7cpv.js.br +0 -0
  954. package/web/chunk-nzey7cpv.js.gz +0 -0
  955. package/web/chunk-p6ma361e.js +0 -2
  956. package/web/chunk-p6ma361e.js.br +0 -0
  957. package/web/chunk-p6ma361e.js.gz +0 -0
  958. package/web/chunk-p76f6cf4.js +0 -2
  959. package/web/chunk-p76f6cf4.js.br +0 -0
  960. package/web/chunk-p76f6cf4.js.gz +0 -0
  961. package/web/chunk-pvhz0gqy.js +0 -332
  962. package/web/chunk-pvhz0gqy.js.br +0 -0
  963. package/web/chunk-pvhz0gqy.js.gz +0 -0
  964. package/web/chunk-q96eky9v.js +0 -1
  965. package/web/chunk-q96eky9v.js.br +0 -0
  966. package/web/chunk-q96eky9v.js.gz +0 -0
  967. package/web/chunk-qcgs1mft.js +0 -2
  968. package/web/chunk-qcgs1mft.js.br +0 -0
  969. package/web/chunk-qcgs1mft.js.gz +0 -0
  970. package/web/chunk-qgtqwmkb.js +0 -1
  971. package/web/chunk-qgtqwmkb.js.br +0 -2
  972. package/web/chunk-qgtqwmkb.js.gz +0 -0
  973. package/web/chunk-qh24q7c0.js +0 -2
  974. package/web/chunk-qh24q7c0.js.br +0 -0
  975. package/web/chunk-qh24q7c0.js.gz +0 -0
  976. package/web/chunk-qygjhm63.js +0 -1
  977. package/web/chunk-qygjhm63.js.br +0 -0
  978. package/web/chunk-qygjhm63.js.gz +0 -0
  979. package/web/chunk-r1dnh0s8.js +0 -1
  980. package/web/chunk-r1dnh0s8.js.br +0 -0
  981. package/web/chunk-r1dnh0s8.js.gz +0 -0
  982. package/web/chunk-r1xksxab.js +0 -1
  983. package/web/chunk-r1xksxab.js.br +0 -0
  984. package/web/chunk-r1xksxab.js.gz +0 -0
  985. package/web/chunk-r5eakmw6.js +0 -1
  986. package/web/chunk-r5eakmw6.js.br +0 -0
  987. package/web/chunk-r5eakmw6.js.gz +0 -0
  988. package/web/chunk-rfsg5rke.js +0 -1
  989. package/web/chunk-rfsg5rke.js.br +0 -2
  990. package/web/chunk-rfsg5rke.js.gz +0 -0
  991. package/web/chunk-rsc5k5he.js +0 -139
  992. package/web/chunk-rsc5k5he.js.br +0 -0
  993. package/web/chunk-rsc5k5he.js.gz +0 -0
  994. package/web/chunk-s7a2f62f.js +0 -140
  995. package/web/chunk-s7a2f62f.js.br +0 -0
  996. package/web/chunk-s7a2f62f.js.gz +0 -0
  997. package/web/chunk-s7h50avx.js +0 -2
  998. package/web/chunk-s7h50avx.js.br +0 -0
  999. package/web/chunk-s7h50avx.js.gz +0 -0
  1000. package/web/chunk-sac6fn9n.js +0 -24
  1001. package/web/chunk-sac6fn9n.js.br +0 -0
  1002. package/web/chunk-sac6fn9n.js.gz +0 -0
  1003. package/web/chunk-sk47kk5j.js +0 -1
  1004. package/web/chunk-sk47kk5j.js.br +0 -0
  1005. package/web/chunk-sk47kk5j.js.gz +0 -0
  1006. package/web/chunk-t0xjx21h.js +0 -30
  1007. package/web/chunk-t0xjx21h.js.br +0 -0
  1008. package/web/chunk-t0xjx21h.js.gz +0 -0
  1009. package/web/chunk-t6agpn2z.js +0 -1
  1010. package/web/chunk-t6agpn2z.js.br +0 -0
  1011. package/web/chunk-t6agpn2z.js.gz +0 -0
  1012. package/web/chunk-t9heac9a.js +0 -2
  1013. package/web/chunk-t9heac9a.js.br +0 -0
  1014. package/web/chunk-t9heac9a.js.gz +0 -0
  1015. package/web/chunk-v7ck87jf.js +0 -1
  1016. package/web/chunk-v7ck87jf.js.br +0 -0
  1017. package/web/chunk-v7ck87jf.js.gz +0 -0
  1018. package/web/chunk-vvk9nche.js +0 -21
  1019. package/web/chunk-vvk9nche.js.br +0 -0
  1020. package/web/chunk-vvk9nche.js.gz +0 -0
  1021. package/web/chunk-vxtfen72.js +0 -1
  1022. package/web/chunk-vxtfen72.js.br +0 -0
  1023. package/web/chunk-vxtfen72.js.gz +0 -0
  1024. package/web/chunk-w5c2r59n.js +0 -41
  1025. package/web/chunk-w5c2r59n.js.br +0 -0
  1026. package/web/chunk-w5c2r59n.js.gz +0 -0
  1027. package/web/chunk-wh0vt2vd.js +0 -34
  1028. package/web/chunk-wh0vt2vd.js.br +0 -0
  1029. package/web/chunk-wh0vt2vd.js.gz +0 -0
  1030. package/web/chunk-wvvrdqgb.js +0 -1
  1031. package/web/chunk-wvvrdqgb.js.br +0 -2
  1032. package/web/chunk-wvvrdqgb.js.gz +0 -0
  1033. package/web/chunk-xe7fj72r.js +0 -1
  1034. package/web/chunk-xe7fj72r.js.br +0 -0
  1035. package/web/chunk-xe7fj72r.js.gz +0 -0
  1036. package/web/chunk-xp9tdb5t.js +0 -1
  1037. package/web/chunk-xp9tdb5t.js.br +0 -2
  1038. package/web/chunk-xp9tdb5t.js.gz +0 -0
  1039. package/web/chunk-y10hsdq4.js +0 -1
  1040. package/web/chunk-y10hsdq4.js.br +0 -0
  1041. package/web/chunk-y10hsdq4.js.gz +0 -0
  1042. package/web/chunk-yarsp7h7.js +0 -12
  1043. package/web/chunk-yarsp7h7.js.br +0 -0
  1044. package/web/chunk-yarsp7h7.js.gz +0 -0
  1045. package/web/chunk-yw5wyz1q.js +0 -55
  1046. package/web/chunk-yw5wyz1q.js.br +0 -0
  1047. package/web/chunk-yw5wyz1q.js.gz +0 -0
  1048. package/web/chunk-z09emmrb.js +0 -1
  1049. package/web/chunk-z09emmrb.js.br +0 -0
  1050. package/web/chunk-z09emmrb.js.gz +0 -0
  1051. package/web/chunk-z3ea4vhk.js +0 -1
  1052. package/web/chunk-z3ea4vhk.js.br +0 -0
  1053. package/web/chunk-z3ea4vhk.js.gz +0 -0
  1054. package/web/chunk-z7adzvfz.js +0 -1
  1055. package/web/chunk-z7adzvfz.js.br +0 -0
  1056. package/web/chunk-z7adzvfz.js.gz +0 -0
  1057. package/web/chunk-zb01zmms.js +0 -84
  1058. package/web/chunk-zb01zmms.js.br +0 -0
  1059. package/web/chunk-zb01zmms.js.gz +0 -0
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{Kt}from"./chunk-0wqmwnd8.js";export{Kt as default};
@@ -1,2 +0,0 @@
1
- �import{Kt}from"./chunk-0wqmwnd8.js";export{Kt as default};
2
- 
Binary file
@@ -1 +0,0 @@
1
- import{ka}from"./chunk-21d8pzcm.js";export{ka as createRailroadEbnfServices};
Binary file
Binary file
@@ -1,2 +0,0 @@
1
- import{t}from"./chunk-dbv8qpen.js";var wr=class{constructor(i){this.init=i,this.records=this.init()}static{t(this,"ImperativeState")}reset(){this.records=this.init()}};
2
- export{wr};
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{Es}from"./chunk-21d8pzcm.js";export{Es as createArchitectureServices};
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{Ke,v,o,ee,_,i,r,er,ie,et,$n,ua,Qa,wl,kl,p,e,n,de,H,d,Cl,Sl,Ja,Wt,Zs,Tl,El,s,Gt,nr,le,Bn,ar,xt,Z,ge,Nt,Sn,fr,hr,ma,Fn,_t,pt,$e,fa,gr,ha,ga,nt,we,Mt,ye,Be,zn,mt,Un,ya,pe,oe,rt,va,ve,Ae,pn,Se,jr,is,w,os,l,je,x,V,te,xr,Yt,ue,wt,st,Ne,Me,Re,qe,se,z,Ot,Vr,Js,Zt,Qe,en,ke,or,lt,ii,ft,xa,Bi,ne,W,us,kt,Fi,ds,ps,Wr,ms,oi,si,Xt,zi,hs,gs,Ml,tn,li,Pl,ys,Gr,Ui}from"./chunk-b83bzjcx.js";var yn=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],gt=s("bell",yn);var Nn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],vt=s("chevron-left",Nn);var wn=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],bt=s("cloud",wn);var kn=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],ht=s("hard-drive",kn);var Cn=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Ge=s("network",Cn);var Tn=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Fe=s("save",Tn);var Pn=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],yt=s("shield-off",Pn);var Mn=[{value:"system",label:"跟随系统",icon:e(gr,{})},{value:"light",label:"浅色",icon:e(ya,{})},{value:"dark",label:"深色",icon:e(ha,{})}];function St(){let t=w(),a=os(),m=kl();return n(ne,{title:"外观",description:"仅保存在当前浏览器本地",children:[e(W,{title:"主题模式",description:"切换浅色、深色或跟随系统外观",children:e(zi,{value:t.preference,onChange:jr,options:Mn})}),e(W,{title:"主题风格",description:"选择宿主默认或由已启用插件提供的视觉主题",children:e(Xt,{value:t.themeID,onValueChange:is,groups:[{options:a.map((c)=>({value:c.id,label:c.label,description:c.description}))}],className:"w-48"})}),m.canInstall&&e(W,{title:"桌面应用",description:"将 Basalt 安装为独立窗口应用,可从桌面或任务栏直接启动",children:n(x,{size:"sm",onClick:()=>m.install().catch((c)=>z(c,"安装应用失败")),children:[e(ma,{className:"size-3.5"}),"安装应用"]})})]})}function Ct(){let t=ie(ua),[a,m]=r(Qa),[c,y]=r(!1),C=i(!1);o(()=>{C.current=!0;let k=()=>m(Qa());return window.addEventListener("focus",k),document.addEventListener("visibilitychange",k),()=>{C.current=!1,window.removeEventListener("focus",k),document.removeEventListener("visibilitychange",k)}},[]);let B=async(k)=>{y(!0);try{let T=await wl(k);if(C.current)m(T)}catch(T){if(C.current)z(T,"无法更新系统通知")}finally{if(C.current)y(!1)}};return e(ne,{title:"系统通知",description:"页面保持打开时生效;开关仅保存在当前浏览器",children:e(W,{title:"完成与错误提醒",description:a==="unsupported"?"当前浏览器或访问方式不支持系统通知,请使用支持通知的浏览器,并通过 HTTPS 或 localhost 访问":a==="denied"?"浏览器已阻止通知,请在网站设置中允许通知,回到此页后再开启":t&&a==="granted"?"模型工作完成或运行出错时发送;点击通知可回到对应会话":"开启后在模型工作完成或运行出错时发送;首次开启需要浏览器授权",children:e(kt,{label:"模型工作完成或出错时发送系统通知",checked:t&&a==="granted",disabled:c||a==="unsupported",onCheckedChange:(k)=>void B(k)})})})}function Tt(t){let a=ie(t.conn.state),m=Ui[a.status];return e(ne,{title:"已保存的服务器连接",description:"保存在当前浏览器中的服务器地址与设备凭证",action:n(x,{size:"sm",onClick:t.onAddServer,children:[e(we,{className:"size-3.5"}),"添加服务器"]}),children:t.servers.map((c)=>{let y=c.id===t.server.id;return e(W,{title:n("span",{className:"flex items-center gap-2",children:[e("span",{className:"truncate",children:$n(c)}),y&&n("span",{className:"inline-flex items-center gap-1.5 font-normal text-xs text-dim",children:[e("span",{className:d("size-1.5 rounded-full",m.dot)}),m.label]})]}),description:e("span",{className:"font-mono",children:c.url}),children:y?n(x,{size:"sm",variant:"danger-ghost",onClick:t.onRemoveServer,children:[e(pe,{className:"size-3.5"}),"移除"]}):e(x,{size:"sm",onClick:()=>t.onServer(c.id),children:"切换"})},c.id)})})}function Pt(){return n(p,{children:[n(ne,{title:"全局",description:"当前浏览器前端快捷键",children:[e(W,{title:"搜索与命令面板",description:"快速跳转会话、项目或执行常用操作",children:e(je,{children:"mod+k"})}),e(W,{title:"收起 / 展开侧栏",description:"在完整侧栏与窄图标栏之间切换",children:e(je,{children:"alt+1"})}),e(W,{title:"新建聊天",description:"立即回到新会话输入页",children:e(je,{children:"mod+shift+o"})})]}),n(ne,{title:"对话输入",children:[e(W,{title:"发送消息",children:e(je,{children:"Enter"})}),e(W,{title:"换行",children:e(je,{children:"Shift+Enter"})})]})]})}var Rt=["B","KB","MB","GB","TB"];function j(t){let a=t,m=0;while(a>=1024&&m<Rt.length-1)a/=1024,m++;let c=m===0?0:a>=100?0:a>=10?1:2;return`${a.toFixed(c)} ${Rt[m]}`}function zt({conn:t,server:a}){w();let m=a?.id??t.server.id,c=ie(tn(m)),[y,C]=r(!1),[B,D]=r();o(()=>{let T=new AbortController;return t.request("/api/search/settings",{signal:T.signal}).then((g)=>{if(!T.signal.aborted)tn(m).set(g.status)}).catch(()=>{if(!T.signal.aborted)D("无法读取历史搜索设置,请重新打开设置重试")}),()=>T.abort()},[t,m]);async function k(){if(y)return;C(!0),D(void 0);try{let T=await t.request("/api/search/rebuild",{method:"POST"});tn(m).set(T)}catch(T){D(T instanceof Error?T.message:"无法重建历史搜索索引,请重试")}finally{C(!1)}}return n(ne,{title:"历史搜索",children:[e(W,{title:"搜索索引",description:n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-0.5",children:[e(li,{status:c,showEnable:!1,className:"py-0 shrink-0"}),c&&n("span",{children:["体积 ",j(c.bytes)," / 预算 ",j(c.budget)]})]}),children:e(x,{disabled:y||!c||c.state==="rebuilding",loading:y,onClick:()=>{k().catch(()=>{return})},children:"重建索引"})}),c?.state==="rebuilding"&&e("div",{className:l("surface.subtle","space-y-3 border-line bg-raised/30 p-3.5"),children:n("div",{className:"flex items-center justify-between text-xs text-dim",children:[e("span",{children:"正在重建索引…"}),e("code",{className:l("markdown.inlineCode"),children:c.total>0?`${Math.round(c.indexed/c.total*100)}%`:"0%"})]})}),B&&e("p",{role:"alert",className:"p-4 text-sm text-danger",children:B})]})}var Je=new WeakMap,Rn={assistant:"bg-accent",tool:"bg-warning",user:"bg-success",run:"bg-ink/50",compaction:"bg-danger",notice:"bg-dim",notice_pending:"bg-faint"};function Te(t){return e("span",{className:d("font-mono text-xs tabular-nums text-dim",t.className),children:t.children})}function Bt(t){return e(W,{title:n("span",{className:"flex items-center gap-2",children:[e("span",{children:t.title}),t.subtitle&&e("span",{className:"font-mono text-[11px] font-normal text-faint",children:t.subtitle})]}),description:e("span",{className:"font-mono break-all text-dim",children:t.path}),children:e(Ot,{text:t.path,label:"复制路径",size:"icon-sm"})})}function Ye(t){return e("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:e("div",{className:d("h-full rounded-full transition-all duration-300",t.colorClass??"bg-accent"),style:{width:`${Math.max(t.percent>0?1:0,t.percent)}%`}})})}function Xe(t,a){if(a<=0||t<=0)return"0%";let m=t/a*100;if(m<0.1)return"<0.1%";let c=m>=10?1:2;return`${m.toFixed(c)}%`}function Dt(t){if(!t)return"—";return new Date(t).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function It(t){return t.database.size+t.database.walSize+t.database.shmSize}function Dn(t){let{table:a,totalDbBytes:m}=t,c=a.bytes??0,y=m>0?Math.min(100,c/m*100):0;return n("div",{className:"space-y-1",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:[e("code",{className:l("markdown.inlineCode"),children:a.name}),a.withoutRowid&&e("span",{className:l("control.badge","border border-line bg-raised/40 px-2 py-0.5 text-xs"),children:"WITHOUT ROWID"}),a.indexes!==void 0&&a.indexes>0&&n("span",{className:"rounded-md bg-raised/50 px-1.5 py-0.5 font-mono text-[10.5px] text-faint",children:[a.indexes," 索引"]}),a.pages!==void 0&&n("span",{className:"font-mono text-[11px] text-faint tabular-nums",children:[a.pages.toLocaleString()," 页"]})]}),n("div",{className:"flex shrink-0 items-center gap-3 font-mono tabular-nums",children:[n("span",{className:"text-ink",children:[a.rows.toLocaleString()," 行"]}),a.bytes!==void 0&&n("span",{className:"text-dim",children:[j(c)," ",n("span",{className:"text-[11px] text-faint",children:["(",Xe(c,m),")"]})]})]})]}),a.bytes!==void 0&&m>0&&e(Ye,{percent:y})]})}function Et(t){w();let[a,m]=r(()=>Je.get(t.conn)),[c,y]=r(),[C,B]=r(!1),[D,k]=r(!0),[T,g]=r(!0),[M,P]=r(!1),I=v(async()=>{B(!0);try{let f=await t.conn.storage();if(Je.set(t.conn,f),m(f),f.search)tn(t.server?.id??t.conn.server.id).set(f.search);y(void 0)}catch(f){y(rt(f))}finally{B(!1)}},[t.conn,t.server?.id]);o(()=>{I()},[I]);async function O(){if(!a)return;let f=T?a.database.reclaimableBytes:0,K=D||T?a.database.walSize:0,q=f+K,J=[];if(T)J.push("VACUUM 数据库");if(D)J.push("截断 WAL");if(!await Qe({title:"确认清理数据库?",description:`将${J.join("并")},预计回收 ${j(q)}。不会删除会话、消息或设备。大库上 VACUUM 可能要几秒,期间写入会等待。`,action:"开始清理"}))return;P(!0);try{let Q=await t.conn.compactStorage({checkpoint:D,vacuum:T}),ae=It(Q.before),Ce=It(Q.after),ze=Math.max(0,ae-Ce);Je.set(t.conn,Q.after),m(Q.after);let Le=ze>0?"清理完成":"清理完成,没有可回收的空间";se.success(Le,{description:`数据库 ${j(ae)} → ${j(Ce)}`})}catch(Q){z(Q,"清理失败")}finally{P(!1)}}let A=n(x,{size:"sm",variant:"ghost",onClick:()=>void I(),loading:C,children:[e(ye,{className:"size-3.5"}),"刷新"]});if(!a)return e(ne,{title:"数据库",action:A,children:e(W,{title:c?"无法读取数据库信息":"正在读取数据库信息…",description:c})});let{database:u,analytics:h}=a,G=u.size+u.walSize+u.shmSize,S=Math.max(0,u.size-u.reclaimableBytes),R=u.reclaimableBytes+u.walSize,L=u.pageCount>0?(u.pageCount-u.freelistCount)/u.pageCount*100:100,N=!u.integrity||u.integrity.toLowerCase()==="ok",E=!D&&!T,U=[...a.tables].sort((f,K)=>(K.bytes??0)-(f.bytes??0)||K.rows-f.rows),b=(h?.totalBodyBytes??0)+(h?.totalRawBytes??0),F=(h?.mainSessionCount??0)+(h?.subSessionCount??0);return n(p,{children:[n(ne,{title:"存储总览",action:A,unboxed:!0,children:[n("div",{className:"auto-grid gap-3",children:[n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"数据库占用"}),e(hr,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tabular-nums text-ink",children:j(G)}),n("div",{className:"mt-1 font-mono text-[11px] text-dim",children:["主库 ",j(u.size)," · WAL ",j(u.walSize)]})]}),n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"数据目录"}),e(ht,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tabular-nums text-ink",children:j(a.dataBytes)}),n("div",{className:"mt-1 text-[11px] text-dim",children:["共 ",a.entries.length," 项"]})]}),n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"可回收空间"}),e(Bn,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tabular-nums text-ink",children:j(R)}),n("div",{className:"mt-1 font-mono text-[11px] text-dim",children:["利用率 ",L.toFixed(1),"% · ",u.freelistCount," 空页"]})]}),n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"完整性"}),e(Un,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 flex items-center gap-2",children:e(st,{tone:N?"success":"danger",children:N?"正常 (OK)":"异常"})}),n("div",{className:"mt-1.5 font-mono text-[11px] text-dim",children:["SQLite ",u.sqliteVersion??"3.x"," · v",u.schemaVersion]})]})]}),G>0&&n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"mb-2 flex flex-wrap items-center justify-between gap-2 text-xs",children:[e("span",{className:"font-medium text-ink",children:"物理构成"}),n("span",{className:"font-mono text-faint tabular-nums",children:[u.pageCount.toLocaleString()," 页 × ",j(u.pageSize)]})]}),n("div",{className:"flex h-2.5 w-full overflow-hidden rounded-full bg-raised gap-0.5",children:[S>0&&e("div",{className:"h-full bg-accent transition-all duration-300",style:{width:`${S/G*100}%`},title:`数据页: ${j(S)}`}),u.reclaimableBytes>0&&e("div",{className:"h-full bg-warning transition-all duration-300",style:{width:`${u.reclaimableBytes/G*100}%`},title:`空闲页: ${j(u.reclaimableBytes)}`}),u.walSize>0&&e("div",{className:"h-full bg-ink/40 transition-all duration-300",style:{width:`${u.walSize/G*100}%`},title:`WAL: ${j(u.walSize)}`}),u.shmSize>0&&e("div",{className:"h-full bg-faint transition-all duration-300",style:{width:`${u.shmSize/G*100}%`},title:`SHM: ${j(u.shmSize)}`})]}),n("div",{className:"mt-2.5 flex flex-wrap items-center gap-x-5 gap-y-1.5 text-xs text-dim",children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"数据页 ",e(Te,{children:j(S)})]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-warning"}),"空闲页 ",e(Te,{children:j(u.reclaimableBytes)})]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-ink/40"}),"WAL ",e(Te,{children:j(u.walSize)})]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-faint"}),"SHM ",e(Te,{children:j(u.shmSize)})]})]})]})]}),n(ne,{title:"存储路径",children:[e(Bt,{title:"主数据库",subtitle:u.lastModified?ft(u.lastModified):void 0,path:a.databasePath}),e(Bt,{title:"数据目录",path:a.dataDir})]}),e(zt,{conn:t.conn,server:t.server}),h&&n(ne,{title:"会话与日志",children:[e(W,{title:"会话统计",description:`${h.projectCount} 个项目 · ${F.toLocaleString()} 个会话`,children:n("div",{className:"flex flex-wrap items-center gap-1.5 font-mono text-xs",children:[n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-ink",children:["主会话 ",h.mainSessionCount.toLocaleString()]}),n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-dim",children:["子代理 ",h.subSessionCount.toLocaleString()]}),h.forkedSessionCount>0&&n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-dim",children:["分叉 ",h.forkedSessionCount.toLocaleString()]}),h.automationSessionCount>0&&n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-dim",children:["自动化 ",h.automationSessionCount.toLocaleString()]})]})}),e(W,{title:"日志载荷",children:e(Te,{children:`body ${j(h.totalBodyBytes)} · raw ${j(h.totalRawBytes)}`})}),e(W,{title:"日志记录",description:h.oldestEntryTime?`${Dt(h.oldestEntryTime)} — ${Dt(h.newestEntryTime)}`:void 0,children:e(Te,{children:`${h.totalEntries.toLocaleString()} 条${h.compactionCount>0?` · ${h.compactionCount} 次压缩`:""}`})}),h.entryTypes.length>0&&n("div",{className:"p-4",children:[n("div",{className:"mb-3 flex items-center justify-between text-xs",children:[e("span",{className:"font-medium text-ink",children:"日志类型分布"}),e("span",{className:"font-mono text-faint",children:j(b)})]}),e("div",{className:"space-y-2.5",children:h.entryTypes.map((f)=>{let K=f.bodyBytes+f.rawBytes,q=Rn[f.type]??"bg-dim",J=b>0?Math.min(100,K/b*100):0,X=f.count>0?Math.round(K/f.count):0;return n("div",{className:"space-y-1",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex items-center gap-2",children:[e("span",{className:d("size-2 rounded-full",q)}),e("span",{className:"font-mono font-medium text-ink",children:f.type}),n("span",{className:"font-mono text-[11px] text-faint",children:[j(X),"/条"]})]}),n("div",{className:"flex items-center gap-3 font-mono tabular-nums",children:[n("span",{className:"text-ink",children:[f.count.toLocaleString()," 条"]}),n("span",{className:"text-dim",children:[j(K)," ",n("span",{className:"text-[11px] text-faint",children:["(",Xe(K,b),")"]})]})]})]}),e(Ye,{percent:J,colorClass:q})]},f.type)})})]})]}),e(ne,{title:"数据表",children:e("div",{className:"p-4 space-y-2.5",children:U.map((f)=>e(Dn,{table:f,totalDbBytes:u.size},f.name))})}),h&&h.pluginNamespaces.length>0&&e(ne,{title:"插件存储",children:e("div",{className:"grid grid-cols-1 gap-x-10 gap-y-2.5 p-4 md:grid-cols-2",children:h.pluginNamespaces.map((f)=>n("div",{className:"flex items-center justify-between gap-3 text-xs",children:[n("span",{className:"flex min-w-0 items-center gap-2",children:[e(nr,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"truncate font-mono font-medium text-ink",children:f.namespace}),f.migrationVersion!==void 0&&n("span",{className:"rounded bg-raised px-1.5 py-0.5 font-mono text-[10.5px] font-normal text-faint",children:["v",f.migrationVersion]})]}),n("div",{className:"flex shrink-0 items-center gap-3 font-mono tabular-nums text-xs",children:[n("span",{className:f.keys>0?"text-dim":"text-faint/50",children:[f.keys," 键"]}),e("span",{className:f.bytes>0?"font-medium text-ink":"text-faint/50",children:j(f.bytes)})]})]},f.namespace))})}),e(ne,{title:"引擎参数 (PRAGMA)",children:e("div",{className:"grid grid-cols-1 gap-x-10 gap-y-2.5 p-4 text-xs md:grid-cols-2",children:[{label:"内核版本",value:`SQLite ${u.sqliteVersion??"3.x"}`},{label:"忙锁超时",value:`${u.busyTimeout??5000}ms`},{label:"字符编码",value:u.encoding??"UTF-8"},{label:"单页大小",value:j(u.pageSize)},{label:"Schema 版本",value:`v${u.schemaVersion}`},{label:"总页数",value:`${u.pageCount.toLocaleString()} 页`},{label:"日志模式",value:u.journalMode.toUpperCase()},{label:"页缓存",value:u.cacheSizeBytes?j(u.cacheSizeBytes):"默认"},{label:"同步级别",value:u.synchronous??"FULL"},{label:"空闲页",value:`${u.freelistCount.toLocaleString()} 页 (${j(u.reclaimableBytes)})`},{label:"外键约束",value:u.foreignKeys!==!1?"ON":"OFF"},{label:"自动清理",value:u.autoVacuum??"NONE"}].map((f)=>n("div",{className:"flex items-center justify-between gap-3",children:[e("span",{className:"text-dim",children:f.label}),e(Te,{className:"text-ink",children:f.value})]},f.label))})}),e(ne,{title:"数据目录明细",children:n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"mb-3 flex items-center justify-between text-xs",children:[e("span",{className:"font-mono text-dim break-all",children:a.dataDir}),n("div",{className:"flex shrink-0 items-center gap-3 font-mono text-xs",children:[n("span",{className:"text-dim",children:["共 ",a.entries.length," 项"]}),e("span",{className:"font-medium text-ink",children:j(a.dataBytes)})]})]}),a.entries.map((f)=>{let K=a.dataBytes>0?f.bytes/a.dataBytes*100:0;return n("div",{className:"space-y-1",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:[f.kind==="directory"?e(pt,{className:"size-3.5 shrink-0 text-accent"}):e(_t,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"font-mono font-medium text-ink",children:f.name}),n("span",{className:"font-mono text-[11px] text-faint",children:[f.kind==="directory"?`目录${f.files!==void 0?` · ${f.files.toLocaleString()} 个文件`:""}`:"文件",f.modified?` · ${ft(f.modified)}`:""]})]}),e("div",{className:"flex shrink-0 items-center gap-3 font-mono tabular-nums text-xs",children:n("span",{className:"text-dim",children:[j(f.bytes)," ",n("span",{className:"text-[11px] text-faint",children:["(",Xe(f.bytes,a.dataBytes),")"]})]})})]}),a.dataBytes>0&&e(Ye,{percent:K})]},f.name)})]})}),n(ne,{title:"空间维护",children:[e(W,{title:"VACUUM 整理",description:`可回收 ${j(u.reclaimableBytes)}`,children:e(kt,{checked:T,onCheckedChange:g,label:"VACUUM 数据库",disabled:M})}),e(W,{title:"截断 WAL",description:`当前 ${j(u.walSize)}`,children:e(kt,{checked:D,onCheckedChange:k,label:"截断 WAL",disabled:M})}),e(W,{title:"执行清理",description:E?"请至少开启一项":`预计释放 ${j((T?u.reclaimableBytes:0)+(D||T?u.walSize:0))}`,children:e(x,{variant:"primary",size:"sm",onClick:()=>void O(),loading:M,disabled:E,children:"清理…"})})]})]})}var In=2000;function At(t){let a=ie(t.state),[m,c]=r(void 0),[y,C]=r(!1),[B,D]=r("idle"),[k,T]=r(void 0),[g,M]=r(""),P=i(!1),I=i(void 0),O=i(void 0),A=i(0),u=i(!1),h=v((N)=>{let E=P.current&&!N.pending;if(!P.current&&N.pending)M("");if(P.current=N.pending,c(N),N.error)T(N.error),D("error");else if(N.pending)D(N.awaitingInput?"awaiting_input":"authorizing");else if(E&&N.connected)D("success");else if(!N.connected)D("idle")},[]);o(()=>{if(a.status!=="open")return;let N=new AbortController,E=!1;return t.providerAuthStatus(N.signal).then((U)=>{if(!E)h(U)},()=>{}),()=>{E=!0,N.abort()}},[t,a.status,h]);let G=v(async()=>{C(!0),T(void 0),D("authorizing"),u.current=!1;try{let N=await t.startProviderAuth();if(h(N),N.authorizeURL)window.open(N.authorizeURL,"_blank","noopener,noreferrer")}catch(N){T(N instanceof Error?N.message:String(N)),D("error")}finally{C(!1)}},[t,h]);o(()=>{if(!m?.pending)return;let N=!1,E=()=>{if(u.current)return;I.current?.abort();let U=new AbortController;I.current=U,t.providerAuthStatus(U.signal).then((b)=>{if(N||U.signal.aborted)return;let F=P.current&&!b.pending;if(h(b),F&&b.connected)Vr(t).catch((f)=>z(f,"刷新模型列表失败"))},()=>{})};return O.current=setInterval(E,In),()=>{if(N=!0,O.current)clearInterval(O.current);I.current?.abort()}},[t,m?.pending,h]);let S=v(async()=>{if(!g.trim())return;C(!0),T(void 0),u.current=!0;let N=++A.current;I.current?.abort();try{let E=await t.completeProviderAuth({url:g.trim()});if(N!==A.current)return;h(E),M("")}catch(E){if(N!==A.current)return;T(E instanceof Error?E.message:String(E)),D("error")}finally{if(u.current=!1,N===A.current)C(!1)}},[t,g,h]),R=v(async()=>{C(!0),T(void 0);try{await t.logoutProvider(),h({providerID:"openai",connected:!1,pending:!1}),D("idle"),await Vr(t)}catch(N){T(N instanceof Error?N.message:String(N)),D("error")}finally{C(!1)}},[t,h]),L=v(()=>{D("idle"),T(void 0),M("")},[]);return{status:m,busy:y,phase:B,error:k,manualURL:g,setManualURL:M,start:G,submitManual:S,logout:R,reset:L}}function Lt(t){let{phase:a,busy:m}=t;if(t.connected)return n("div",{className:"flex items-center justify-between gap-3",children:[n("span",{className:"inline-flex items-center gap-1.5 text-xs text-green-400",children:[e("span",{className:"size-1.5 rounded-full bg-green-400"}),"已连接"]}),e(x,{variant:"ghost",className:"text-faint hover:text-red-400",disabled:m,onClick:t.onLogout,children:m?"正在断开…":"断开连接"})]});return n(H.div,{layout:!0,className:"flex flex-col gap-3",children:[(a==="idle"||a==="success"||a==="error")&&n("div",{className:"flex flex-wrap items-center gap-2",children:[e(x,{disabled:m,onClick:t.onStart,children:m?"正在启动…":"登录 ChatGPT"}),a==="error"&&e(x,{variant:"ghost",className:"text-faint",onClick:t.onRetry,children:"重试"})]}),a==="authorizing"&&n("p",{className:"text-xs text-faint",children:["请在浏览器中完成授权。",t.authorizeURL&&n(p,{children:["未自动打开?",e("a",{href:t.authorizeURL,target:"_blank",rel:"noopener noreferrer",className:"ml-1 text-accent hover:underline",children:"手动打开"})]})]}),a==="awaiting_input"&&n("form",{className:"flex flex-col gap-2",onSubmit:(c)=>{c.preventDefault(),t.onSubmitManual()},children:[e("label",{htmlFor:"provider-auth-callback",className:"text-xs text-faint",children:t.instructions??"粘贴浏览器完成授权后跳转的完整 URL"}),e("input",{id:"provider-auth-callback",type:"url",className:"h-9 rounded-lg border border-line bg-raised px-3 text-xs text-ink outline-none placeholder:text-faint focus:border-accent",placeholder:"http://localhost:1455/auth/callback?code=…",value:t.manualURL,onChange:(c)=>t.onManualURLChange(c.target.value)}),e(x,{type:"submit",disabled:m||!t.manualURL.trim(),children:m?"正在提交…":"完成登录"})]}),a==="error"&&t.error&&e(wt,{children:t.error})]})}function $t(t){let a=At(t.conn),m=a.status?.connected??!1;return e(ne,{title:"ChatGPT 订阅",description:"使用 ChatGPT 账号登录,访问你的订阅所包含的模型。登录由服务端完成,凭据不会离开服务器。",children:e(H.div,{layout:!0,className:"flex flex-col gap-3",children:e(W,{title:m?"ChatGPT 账号":"连接 ChatGPT",description:m?`你好,${a.status?.displayName??"ChatGPT 用户"}`:"支持 ChatGPT Plus / Pro 订阅账号",children:e(Lt,{connected:m,phase:a.phase,busy:a.busy,error:a.error,authorizeURL:a.status?.authorizeURL,instructions:a.status?.instructions,manualURL:a.manualURL,onManualURLChange:a.setManualURL,onStart:()=>void a.start(),onSubmitManual:()=>void a.submitManual(),onLogout:()=>void a.logout(),onRetry:a.reset})})})})}function Ft(t){w();let a=ee(),[m,c]=r(""),[y,C]=r(0),[B,D]=r(null),[k,T]=r({name:"",contextWindow:"",maxTokens:""}),[g,M]=r(!1),[P,I]=r(),O=(N)=>{D(N),T({name:N.name,contextWindow:N.contextWindow?Wt(N.contextWindow):"",maxTokens:N.maxTokens?Wt(N.maxTokens):""}),I(void 0)},A=async(N)=>{if(N?.preventDefault(),!B||g)return;I(void 0);let E=k.contextWindow.trim(),U=E?Ja(E):void 0;if(E&&U===void 0){I("上下文窗口格式无效(支持 128k、200k、1m 或正整数)");return}let b=k.maxTokens.trim(),F=b?Ja(b):void 0;if(b&&F===void 0){I("最大输出格式无效(支持 8k、16k、8192 或正整数)");return}M(!0);try{let f={...B,name:k.name.trim()||B.id,contextWindow:U,maxTokens:F};await t.onUpdateModel?.(B.id,f),D(null)}catch(f){I(f instanceof Error?f.message:String(f))}finally{M(!1)}},u=m.trim().toLowerCase(),h=Js(t.provider.models).filter((N)=>`${N.id} ${N.name}`.toLowerCase().includes(u)),G=6,S=Math.max(1,Math.ceil(h.length/G)),R=Math.min(y,S-1),L=h.slice(R*G,(R+1)*G);return n(Ne,{children:[n("div",{className:l("surface.card","flex min-w-0 items-center gap-1 pr-2 transition-colors hover:bg-raised/60"),children:[n(Me,{className:"group/collapsible flex min-h-14 min-w-0 flex-1 items-center gap-3 py-2.5 pl-4 text-left focus-visible:-outline-offset-2",children:[e(qe,{className:"shrink-0 text-faint"}),n("span",{className:"min-w-0 flex-1",children:[n("span",{className:"flex items-center gap-2",children:[e("span",{className:"truncate text-sm font-medium text-ink",title:t.provider.name,children:t.provider.name}),!t.provider.apiKeyConfigured&&n("span",{className:"inline-flex shrink-0 items-center gap-1.5 text-xs text-warning",children:[e("span",{"aria-hidden":!0,className:"size-1.5 rounded-full bg-warning"}),"未设置 Key"]})]}),n("span",{className:"mt-0.5 block truncate text-xs text-dim",children:[t.provider.id!==t.provider.name&&n(p,{children:[t.provider.id," · "]}),t.provider.protocol," · ",t.provider.models.length," 个模型",t.provider.defaultContextWindow?` · 默认 ${Wt(t.provider.defaultContextWindow)}`:""]})]})]}),e("div",{className:"@md/panel:hidden",children:n(en,{className:"min-w-44 [&_[role=menuitem]]:min-h-11",trigger:e(x,{size:"icon",variant:"ghost",className:"size-11","aria-label":`${t.provider.name} 提供方操作`,children:e(Gt,{className:"size-5"})}),children:[e(ke,{icon:e(nt,{}),onSelect:t.onEdit,children:"编辑配置"}),e(ke,{icon:e(ye,{className:t.refreshing?"animate-spin":void 0}),disabled:t.refreshing,onSelect:t.onDiscover,children:t.refreshing?"正在刷新模型":"刷新模型"}),e(or,{}),e(ke,{icon:e(pe,{}),danger:!0,onSelect:t.onRemove,children:"移除提供方"})]})}),n("div",{className:"hidden shrink-0 items-center @md/panel:flex",children:[e(V,{label:"编辑",className:"size-10",onClick:t.onEdit,children:e(nt,{className:"size-4"})}),e(V,{label:"刷新模型",className:"size-10",disabled:t.refreshing,onClick:t.onDiscover,children:e(ye,{className:d("size-4",t.refreshing&&"animate-spin")})}),e(V,{label:"移除",className:"size-10 text-danger",onClick:t.onRemove,children:e(pe,{className:"size-4"})})]})]}),e("div",{children:e(Re,{children:n("div",{children:[n("div",{className:"relative my-3 min-w-0",children:[e(Be,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),e(te,{type:"search","aria-label":`搜索 ${t.provider.name} 的模型`,placeholder:"搜索模型",value:m,onChange:(N)=>{c(N.target.value),C(0)},className:"h-10 min-w-0 pl-9"})]}),n("div",{className:"overflow-hidden rounded-2xl border border-line bg-panel",children:[e("div",{className:"auto-grid animate-fade gap-x-2 p-2",children:L.map((N)=>{let E="";if(N.contextWindow){let U=N.contextWindow.toLocaleString(),b=N.maxTokens?` (最大输出: ${N.maxTokens.toLocaleString()})`:"";E=`上下文窗口: ${U} tokens${b}`}return n("button",{type:"button",onClick:()=>O(N),className:"group/model flex min-w-0 items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left transition-colors hover:bg-raised/80 focus-visible:outline-accent",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e(lt,{modelID:`${t.provider.id}/${N.id}`}),n("div",{className:"min-w-0",children:[e("div",{title:N.name,className:"truncate text-sm font-medium text-ink transition-colors group-hover/model:text-accent",children:N.name}),e("div",{title:N.id,className:"truncate font-mono text-[11px] text-faint",children:N.id})]})]}),n("div",{className:"flex shrink-0 items-center gap-1.5",children:[N.contextWindow?e("span",{className:"rounded bg-raised px-1.5 py-0.5 font-mono text-[10px] text-dim transition-colors group-hover/model:bg-panel",title:E,children:Wt(N.contextWindow)}):null,e(nt,{className:"size-3 text-faint opacity-0 transition-opacity group-hover/model:opacity-100"})]})]},N.id)})},`${u}:${R}`),h.length===0&&e("p",{className:"py-4 text-center text-sm text-faint",children:"没有匹配的模型"}),n("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-4 py-1",children:[n("span",{"aria-live":"polite",className:"text-xs text-faint",children:[h.length," 个模型 · ",R+1," / ",S," 页"]}),n("div",{className:"flex gap-1",children:[e(x,{size:"sm",variant:"ghost",disabled:R===0,onClick:()=>C(R-1),children:"上一页"}),e(x,{size:"sm",variant:"ghost",disabled:R+1>=S,onClick:()=>C(R+1),children:"下一页"})]})]})]})]})})}),e(Zt,{open:Boolean(B),onOpenChange:(N)=>{if(!g&&!N)D(null)},title:"配置模型参数",description:B?n("span",{className:"flex items-center gap-1.5 font-mono text-xs",children:[e("span",{children:t.provider.name}),e("span",{children:"/"}),e("span",{className:"font-semibold text-ink",children:B.id})]}):void 0,size:"md",footer:n(p,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(x,{disabled:g,onClick:()=>D(null),children:"取消"}),e(x,{type:"submit",form:a,loading:g,variant:"primary",children:"保存参数"})]}),children:n(Yt,{id:a,onSubmit:A,children:[e(ue,{label:"显示名称",hint:"在模型选择器与对话界面中显示的名称",children:(N)=>e(te,{id:N,value:k.name,onChange:(E)=>T({...k,name:E.target.value}),placeholder:B?.id})}),e(ue,{label:"上下文窗口 (Context Window)",hint:"单次会话最大可用上下文;留空继承提供方默认",children:(N)=>{let E=t.provider.defaultContextWindow?`继承提供方默认 (${Wt(t.provider.defaultContextWindow)})`:"继承系统默认 (300k)";return n("div",{className:"space-y-1.5",children:[e(te,{id:N,value:k.contextWindow,onChange:(U)=>T({...k,contextWindow:U.target.value}),placeholder:E}),n("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[e("span",{className:"text-[11px] text-faint",children:"常用:"}),["128k","200k","500k","1m","2m"].map((U)=>e("button",{type:"button",onClick:()=>T((b)=>({...b,contextWindow:U})),className:d("rounded px-1.5 py-0.5 font-mono text-[11px] transition-colors",k.contextWindow.toLowerCase()===U?"bg-accent/20 font-medium text-accent":"bg-raised text-dim hover:bg-raised/80 hover:text-ink"),children:U},U)),k.contextWindow&&e("button",{type:"button",onClick:()=>T((U)=>({...U,contextWindow:""})),className:"ml-1 text-[11px] text-faint transition-colors hover:text-ink",children:"清空(继承)"})]})]})}}),e(ue,{label:"最大输出 (Max Tokens)",hint:"单次响应最大生成的 Token 数量;留空继承提供方默认",children:(N)=>{let E=t.provider.defaultMaxTokens?`继承提供方默认 (${Wt(t.provider.defaultMaxTokens)})`:"继承系统默认 (64k)";return n("div",{className:"space-y-1.5",children:[e(te,{id:N,value:k.maxTokens,onChange:(U)=>T({...k,maxTokens:U.target.value}),placeholder:E}),n("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[e("span",{className:"text-[11px] text-faint",children:"常用:"}),["16k","32k","64k","128k"].map((U)=>e("button",{type:"button",onClick:()=>T((b)=>({...b,maxTokens:U})),className:d("rounded px-1.5 py-0.5 font-mono text-[11px] transition-colors",k.maxTokens.toLowerCase()===U?"bg-accent/20 font-medium text-accent":"bg-raised text-dim hover:bg-raised/80 hover:text-ink"),children:U},U)),k.maxTokens&&e("button",{type:"button",onClick:()=>T((U)=>({...U,maxTokens:""})),className:"ml-1 text-[11px] text-faint transition-colors hover:text-ink",children:"清空(继承)"})]})]})}}),e(wt,{children:P})]})})]})}function Ht(t){return w(),n(p,{children:[e($t,{conn:t.conn}),e(En,{...t})]})}var De=new WeakMap;function Ut(){return{id:"",name:"",protocol:"openai-completions",baseUrl:"https://api.openai.com/v1",apiKey:"",models:"",defaultContextWindow:"",defaultMaxTokens:""}}function En(t){w();let a=ie(t.conn.state),m=ee(),[c,y]=r(!1),[C,B]=r(()=>De.get(t.conn)??null),[D,k]=r(),[T,g]=r(!1),[M,P]=r(),[I,O]=r(),[A,u]=r(Ut),h=ys(t.conn).kind==="form",G=()=>{y(!1),Gr(t.conn,"form",{kind:"provider"})};o(()=>()=>Gr(t.conn,"form",{kind:"provider"}),[t.conn]),o(()=>{let b=De.get(t.conn);if(b)B(b);if(a.status!=="open")return;let F=!1;return t.conn.modelProviders().then((f)=>{if(De.set(t.conn,f),!F)B(f)}).catch((f)=>{if(!F)k(f instanceof Error?f.message:String(f))}),()=>{F=!0}},[t.conn,a.status]);let S=async()=>{if(T)return;k(void 0);let b=A.defaultContextWindow.trim(),F=b?Ja(b):void 0;if(b&&F===void 0){k("默认上下文窗口格式无效(支持 128k、200k、1m 或正整数)");return}let f=A.defaultMaxTokens.trim(),K=f?Ja(f):void 0;if(f&&K===void 0){k("默认最大输出格式无效(支持 8k、16k、8192 或正整数)");return}g(!0);try{let q={name:A.name.trim()||A.id.trim(),protocol:A.protocol,baseUrl:A.baseUrl,apiKey:A.apiKey,models:A.models,defaultContextWindow:F,defaultMaxTokens:K},J=await t.conn.saveModelProvider(A.id.trim(),q);B((X)=>{let Q=[...(X??[]).filter((ae)=>ae.id!==J.id),J];return De.set(t.conn,Q),Q}),await Vr(t.conn),y(!1),Gr(t.conn,"form",{kind:"saved",providerID:J.id,models:J.models.length})}catch(q){k(q instanceof Error?q.message:String(q))}finally{g(!1)}},R=(b)=>{O(b.id),u({id:b.id,name:b.name,protocol:b.protocol,baseUrl:b.baseUrl,apiKey:"",defaultContextWindow:b.defaultContextWindow?Wt(b.defaultContextWindow):"",defaultMaxTokens:b.defaultMaxTokens?Wt(b.defaultMaxTokens):"",models:Zs(b.models)}),k(void 0),y(!0)},L=()=>{O(void 0),u(Ut())},N=async(b)=>{k(void 0),P(b.id);try{let F=await t.conn.discoverModelProvider(b.id);B((f)=>f?.map((K)=>K.id===F.id?F:K)??[F]),await Vr(t.conn)}catch(F){k(F instanceof Error?F.message:String(F))}finally{P(void 0)}},E=async(b)=>{if(!await Qe({title:`移除提供方「${b.name}」?`,description:"服务端会删除保存的 API key,并恢复同名内置提供方(如果存在)。",action:"移除",danger:!0}))return;try{await t.conn.removeModelProvider(b.id),B((f)=>f?.filter((K)=>K.id!==b.id)??null),await Vr(t.conn)}catch(f){k(f instanceof Error?f.message:String(f))}},U=async(b,F,f)=>{let K=b.models.map((X)=>X.id===F?f:X),q={name:b.name,protocol:b.protocol,baseUrl:b.baseUrl,apiKey:"",defaultContextWindow:b.defaultContextWindow,defaultMaxTokens:b.defaultMaxTokens,models:Zs(K)},J=await t.conn.saveModelProvider(b.id,q);B((X)=>{let Q=X?.map((ae)=>ae.id===J.id?J:ae)??[J];return De.set(t.conn,Q),Q}),await Vr(t.conn)};return n(ne,{title:"模型提供方",description:"配置提供方与模型目录",unboxed:!0,action:e(V,{className:"size-10",label:"添加提供方","data-tour":"add-provider",disabled:a.status!=="open",onClick:()=>{L(),k(void 0),y(!0),Gr(t.conn,"provider",{kind:"form"})},children:e(we,{className:"size-4"})}),children:[e(de,{initial:!1,children:(C??[]).map((b)=>e(H.div,{...va,className:"overflow-hidden","data-tour-provider":b.id,children:e(Ft,{provider:b,refreshing:M===b.id,onEdit:()=>R(b),onDiscover:()=>void N(b),onRemove:()=>void E(b),onUpdateModel:(F,f)=>U(b,F,f)})},b.id))}),C?.length===0&&e("div",{className:l("surface.emptyDashed","py-12"),children:e("p",{className:"text-sm text-dim",children:"暂无模型提供方,点击右上方按钮添加。"})}),!c&&D&&e("div",{className:"p-4",children:e(wt,{children:D})}),e(Zt,{open:c,onOpenChange:(b)=>{if(!T)if(b)y(!0);else G()},title:I?`编辑提供方:${I}`:"添加模型提供方",size:"lg",footer:n(p,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(x,{disabled:T,onClick:G,children:"取消"}),n(x,{type:"submit",form:m,loading:T,disabled:a.status!=="open","aria-label":T?"保存中":"保存提供方",children:[e(Fe,{className:"size-3.5"}),"保存提供方"]})]}),children:n(Yt,{id:m,onSubmit:(b)=>{b.preventDefault(),S()},children:[h&&n("div",{className:"rounded-lg bg-accent/8 px-3 py-2.5 text-xs leading-5 text-dim ring-1 ring-accent/25",children:[e("span",{className:"mr-1.5 font-medium text-ink tabular-nums",children:"3 / 4"}),"Provider ID 起个好记的名字(如 deepseek),协议和 Base URL 按服务商文档填,再填上 API key。模型列表留空会自动获取,最后点「保存提供方」。"]}),n("div",{className:"grid gap-4 sm:grid-cols-2",children:[e(ue,{label:"Provider ID",hint:"例如 openai、deepseek 或公司内部网关",children:(b)=>e(te,{id:b,value:A.id,disabled:Boolean(I),onChange:(F)=>u({...A,id:F.target.value}),placeholder:"openai"})}),e(ue,{label:"显示名称",hint:"不填就用 Provider ID",children:(b)=>e(te,{id:b,value:A.name,onChange:(F)=>u({...A,name:F.target.value}),placeholder:"OpenAI"})})]}),e(ue,{label:"协议",children:(b)=>e(Xt,{id:b,value:A.protocol,onValueChange:(F)=>u({...A,protocol:F}),groups:[{options:Cl.map((F)=>({value:F,label:Sl[F]}))}]})}),e(ue,{label:"Base URL",hint:"只填写协议端点,不要把 API key 放进 URL",children:(b)=>e(te,{id:b,type:"url",value:A.baseUrl,onChange:(F)=>u({...A,baseUrl:F.target.value}),placeholder:"https://api.example.com/v1"})}),e(ue,{label:"API key",hint:"留空表示保留已保存的 key;本地兼容服务可以留空",children:(b)=>e(te,{id:b,type:"password",value:A.apiKey,onChange:(F)=>u({...A,apiKey:F.target.value}),placeholder:"sk-…",autoComplete:"new-password"})}),n("div",{className:"grid gap-4 sm:grid-cols-2",children:[e(ue,{label:"默认上下文窗口",hint:"模型未单独指定时生效,例如 128k、200k、1m 或正整数",children:(b)=>e(te,{id:b,value:A.defaultContextWindow,onChange:(F)=>u({...A,defaultContextWindow:F.target.value}),placeholder:"300k"})}),e(ue,{label:"默认最大输出",hint:"单次回复生成上限,例如 16k、32k、64k 或正整数",children:(b)=>e(te,{id:b,value:A.defaultMaxTokens,onChange:(F)=>u({...A,defaultMaxTokens:F.target.value}),placeholder:"64k"})})]}),e(ue,{label:"模型列表",hint:"留空将从 Base URL 自动获取;也支持手动填写 model-id 或 model-id=显示名称 [上下文, 最大输出](如 claude-3-7-sonnet=Sonnet [200k]、deepseek-chat [64k, 8k])",children:(b)=>e(xr,{id:b,value:A.models,onChange:(F)=>u({...A,models:F.target.value}),rows:3,placeholder:"留空自动获取模型列表"})}),e(wt,{children:D})]})})]})}function An(t){return!(t.web?.some((m)=>m.kind==="tab")??!1)&&hs(t.id,"settings")}function Vt(t){let a={tools:[],commands:[],pages:[],routes:[],hooks:[],others:[]},m=new Map((t.web??[]).map((c)=>[c.id,c]));for(let c of t.registrations)switch(c.kind){case"tool":{a.tools.push(c.name);break}case"command":{let y=m.get(c.id)?.commandTitle??m.get(c.id)?.title??c.id;a.commands.push(y);break}case"web":{let y=m.get(c.id);if(y?.kind==="sidebar")a.pages.push(`侧栏: ${y.title}`);else if(y?.kind!=="command")a.pages.push(y?.title??c.id);break}case"route":{a.routes.push({method:c.method,path:c.path});break}case"websocket":{a.routes.push({method:"WS",path:c.path});break}case"hook":{a.hooks.push(c.name);break}case"policy":{a.others.push(`策略 ${c.id}`);break}case"history-resolver":{a.others.push("历史解析");break}}return a}function Ze(t){let a=new Map(t.map((g)=>[g.id,g])),m=new Map,c=new Map;for(let g of t){let M=(g.deps??[]).filter((P)=>P!==g.id);m.set(g.id,M);for(let P of M){let I=c.get(P)??[];if(!I.includes(g.id))I.push(g.id),c.set(P,I)}}let y=new Set;for(let[g,M]of m.entries())if(M.length>0)y.add(g);for(let[g,M]of c.entries())if(M.length>0)y.add(g);let C=[];for(let g of t)if(!y.has(g.id))C.push(g);let B=[],D=new Set;for(let g of y){let M=m.get(g)??[],P=c.get(g)??[],I=a.get(g);if(!I)continue;if(M.length===0&&P.length>0)B.push(I)}for(let g of y){let M=a.get(g);if(!M)continue;if(!(m.get(g)??[]).some((O)=>a.has(O))&&!B.some((O)=>O.id===g))B.push(M)}function k(g,M,P){D.add(g.id);let I=[...P,g.id],O=c.get(g.id)??[],A=[];for(let u of O){if(I.includes(u))continue;let h=a.get(u);if(h)A.push(k(h,M+1,I))}return{plugin:g,depth:M,depPath:I,children:A}}let T=B.map((g)=>k(g,0,[]));for(let g of y)if(!D.has(g)){let M=a.get(g);if(M)T.push(k(M,0,[]))}return{trees:T,standalones:C,depsMap:m,dependentsMap:c}}var Ln=2400;function Gn(t){let{plugin:a,busy:m,pending:c,reloaded:y,deps:C,offDeps:B,pluginMetadata:D,onSelect:k,onToggle:T,onConfigure:g}=t,M=D.get(a.id),P=M?.icon??Mt,I=a.status==="error",O=a.status==="disabled",A=!O&&An(a),u=M?.description??a.description??"",h=u;if(c)h=e("span",{className:"animate-pulse text-dim",children:O?"卸载中…":"装载中…"});else if(I)h=e("span",{className:"text-danger/85",children:a.error??"加载失败"});else if(y)h=e("span",{className:"text-success",children:"刚刚已重载"});else if(O&&B.length>0)h=`随 ${B.join("、")} 停用`;return e(Fi,{name:e("span",{className:d(I&&"text-danger"),children:a.id}),selectLabel:`查看插件 ${a.id}`,onSelect:()=>k(a),title:I?a.error:u,meta:`v${a.version}`,description:h,icon:e(P,{}),inactive:O,highlight:y,aside:C.length>0&&n("span",{className:"font-mono text-[10.5px] text-faint",title:"依赖的插件",children:["← ",C.join(" ")]}),actions:A&&e(V,{label:`${a.id} 设置`,size:"icon-sm",onClick:()=>g(a),children:e(mt,{className:"size-3.5"})}),toggle:{checked:!O,label:`启用 ${a.id}`,disabled:m,onCheckedChange:()=>T(a)}})}function jt(t){return n("li",{className:"flex h-8 items-center gap-2 bg-raised/30 px-4 font-mono text-[10.5px] text-faint uppercase tracking-wider",children:[t.label,e("span",{className:"text-faint/60",children:t.count})]})}function Kt(t){let{plugins:a,busy:m,pending:c,query:y,pluginMetadata:C,onSelect:B,onToggle:D,onConfigure:k}=t,T=_(()=>Ze(a),[a]),g=y.trim().toLowerCase(),M=i(new Map),P=i(new Set),[I,O]=r(new Set);o(()=>{let L=[];for(let E of a){if(M.current.has(E.id)&&E.webRevision&&M.current.get(E.id)!==E.webRevision)L.push(E.id);M.current.set(E.id,E.webRevision)}if(L.length===0)return;O((E)=>new Set([...E,...L]));let N=setTimeout(()=>{P.current.delete(N),O((E)=>new Set([...E].filter((U)=>!L.includes(U))))},Ln);P.current.add(N)},[a]),o(()=>{let L=P.current;return()=>{for(let N of L)clearTimeout(N)}},[]);let A=_(()=>[...!g?a:a.filter((N)=>N.id.toLowerCase().includes(g)||(N.description??"").toLowerCase().includes(g)||(C.get(N.id)?.description??"").toLowerCase().includes(g))].sort((N,E)=>N.id.localeCompare(E.id,"en")),[a,g,C]);if(A.length===0)return n("p",{className:"p-6 text-center text-dim text-sm",children:["没有匹配「",y.trim(),"」的插件"]});let u=new Map(a.map((L)=>[L.id,L.status])),h=A.filter((L)=>!L.builtin),G=A.filter((L)=>L.builtin),S=h.length>0&&G.length>0;function R(L){let N=T.depsMap.get(L.id)??[];return e("li",{children:e(Gn,{plugin:L,busy:m,pending:c===L.id,reloaded:I.has(L.id),deps:N,offDeps:N.filter((E)=>u.get(E)==="disabled"),pluginMetadata:C,onSelect:B,onToggle:D,onConfigure:k})},L.id)}return n("ul",{className:"divide-y divide-line",children:[S&&e(jt,{label:"用户",count:h.length}),h.map(R),S&&e(jt,{label:"内置",count:G.length}),G.map(R)]})}function qt(){return new Map(Ae().map((t)=>[t.id,t.metadata]))}var Ue=qt();pn(()=>{Ue=qt()});var On={enabled:{label:"已启用",dot:"bg-success"},disabled:{label:"已禁用",dot:"bg-faint"},error:{label:"出错",dot:"bg-danger"}};function Wn(t){return!(t.web?.some((m)=>m.kind==="tab")??!1)&&hs(t.id,"settings")}function _n(t){Se();let{plugin:a,depsMap:m,dependentsMap:c}=t,y=_(()=>Vt(a),[a]),C=a.status==="disabled",B=y.hooks.length>0||y.routes.length>0||y.others.length>0,D=y.pages.length>0||y.tools.length>0||y.commands.length>0,k=(m?.get(a.id)??a.deps??[]).filter((g)=>g!==a.id),T=c?.get(a.id)??[];return n("div",{className:"space-y-3 text-xs leading-5",children:[ve.errors.get(a.id)&&n("p",{role:"alert",className:"text-danger",children:["Web: ",ve.errors.get(a.id)]}),a.error&&n("div",{role:"alert",className:"rounded-xl bg-danger/8 p-3 text-xs leading-5 text-danger",children:[e("p",{className:"mb-1 font-medium font-sans",children:a.status==="enabled"?"重载失败,仍在运行上一版本":"插件加载异常"}),e("pre",{className:"whitespace-pre-wrap font-mono [overflow-wrap:anywhere]",children:a.error})]}),n(ps,{children:[k.length>0&&e(Wr,{label:"依赖",children:k.map((g)=>{let P=(t.plugins??[]).find((I)=>I.id===g)?.status==="disabled";return e("button",{type:"button",onClick:()=>t.onSelectPlugin?.(g),className:d(oi,"cursor-pointer transition-colors hover:text-ink",P&&"text-warning"),title:P?"依赖插件已停用,可能影响功能":"点击查看该插件",children:P?`${g}(未启用)`:g},g)})}),T.length>0&&e(Wr,{label:"被依赖",children:T.map((g)=>e("button",{type:"button",onClick:()=>t.onSelectPlugin?.(g),className:d(oi,"cursor-pointer transition-colors hover:text-ink"),title:"点击查看依赖此插件的下游插件",children:g},g))}),C?e("p",{className:"py-2.5 text-faint",children:"该插件当前处于停用状态,启用后接管对应功能与服务。"}):n(p,{children:[y.pages.length>0&&e(Wr,{label:"界面",children:y.pages.map((g)=>e(si,{children:g},g))}),y.tools.length>0&&e(Wr,{label:"工具",children:y.tools.map((g)=>e(si,{mono:!0,children:g},g))}),y.commands.length>0&&e(Wr,{label:"命令",children:y.commands.map((g)=>e(si,{children:g},g))}),B&&n(ms,{label:"接口",summary:[y.hooks.length>0&&`${y.hooks.length} 个钩子`,y.routes.length>0&&`${y.routes.length} 条路由`,y.others.length>0&&`${y.others.length} 项其他注册`].filter(Boolean).join(","),children:[y.hooks.length>0&&n("div",{className:"space-y-1.5",children:[e("span",{className:"text-[11px] text-faint",children:"生命周期事件钩子"}),e("div",{className:"flex flex-wrap gap-1.5",children:y.hooks.map((g)=>e("span",{className:d(oi,"font-mono text-[11px]"),children:g},g))})]}),y.routes.length>0&&n("div",{className:"space-y-1.5",children:[e("span",{className:"text-[11px] text-faint",children:"HTTP / WebSocket 路由"}),e("div",{className:"space-y-0.5 font-mono text-[11px] text-dim",children:y.routes.map((g)=>n("div",{className:"grid grid-cols-[3rem_minmax(0,1fr)] gap-2",children:[e("span",{className:"text-faint",children:g.method}),e("span",{className:"[overflow-wrap:anywhere]",children:g.path})]},`${g.method} ${g.path}`))})]}),y.others.length>0&&n("div",{className:"space-y-1.5",children:[e("span",{className:"text-[11px] text-faint",children:"其他注册"}),e("div",{className:"flex flex-wrap gap-1.5",children:y.others.map((g)=>e("span",{className:d(oi,"text-[11px]"),children:g},g))})]})]}),!D&&!B&&!a.error&&e("p",{className:"py-2.5 text-faint",children:"该插件没有向外部暴露界面或工具能力"})]})]}),t.failed&&e("p",{role:"alert",className:"text-xs text-danger",children:t.failed})]})}function Hn(){return e("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2,3,4].map((t)=>n("div",{className:"flex h-13 items-center gap-3 px-4",children:[e("div",{className:"size-7 shrink-0 animate-pulse rounded-md bg-raised"}),e("div",{className:"h-3 w-20 animate-pulse rounded bg-raised"}),e("div",{className:"h-3 w-1/3 animate-pulse rounded bg-raised"})]},t))})}function Jt({conn:t}){w(),Se();let[a,m]=r(()=>{let f=t.state.get();return f.pluginsLoaded?f.plugins:void 0}),[c,y]=r(""),[C,B]=r(),[D,k]=r(),[T,g]=r(""),[M,P]=r(),[I,O]=r("details"),[A,u]=r(null),h=i(0),G=i(!1),S=i({}),R=v(()=>{if(G.current)return;let f=++h.current;y(""),t.plugins().then(()=>{if(f===h.current)m(t.state.get().plugins)},(K)=>{if(f===h.current)y(rt(K))})},[t]);o(()=>{B(void 0);let f=t.state.get().plugins,K=t.state.subscribe((q)=>{if(q.plugins===f)return;f=q.plugins,m(q.plugins)});return R(),()=>{K(),h.current++,G.current=!1}},[R,t]);async function L(f,K){if(G.current)return;if(K){let Q=Date.now(),ae=S.current[f.id]??0;if(Q-ae<500)return;S.current[f.id]=Q}let q=++h.current;G.current=!0,B(f.id),k(void 0);let J=f.status==="disabled",X=f.id;try{if(K){if(await t.reloadPlugin(f.id),q===h.current)m(t.state.get().plugins);return}let Q=await t.plugins();if(q!==h.current)return;m(t.state.get().plugins);let ae=new Map(Q.map((Y)=>[Y.id,Y])),Ce=[],ze=new Set,Le=new Set,He=(Y)=>{if(Le.has(Y))return;if(ze.has(Y))throw Error(`插件依赖存在循环:${Y}`);let fe=ae.get(Y);if(!fe)throw Error(`找不到插件依赖:${Y}`);if(ze.add(Y),J){if(fe.status==="error")throw Error(`请先修复依赖插件 ${Y} 的加载错误`);for(let ce of fe.deps??[])He(ce)}else for(let ce of Q)if(ce.status!=="disabled"&&ce.deps?.includes(Y))He(ce.id);if(ze.delete(Y),Le.add(Y),J?fe.status!=="enabled":fe.status!=="disabled")Ce.push(fe)};He(f.id);let ut=Ce.filter((Y)=>Y.id!==f.id);if(ut.length>0){let Y=ut.map((ce)=>ce.id).join("、");if(!await Qe({title:J?"同时启用依赖插件?":"同时禁用依赖此插件的插件?",description:J?`启用 ${f.id} 需要先启用:${Y}。是否继续?`:`${Y} 依赖 ${f.id},将先禁用这些插件,再禁用 ${f.id}。是否继续?`,action:J?"级联启用":"级联禁用",danger:!J}))return}for(let Y of Ce){if(q!==h.current)return;X=Y.id,m((ce)=>ce?.map((Ve)=>Ve.id===Y.id?{...Ve,status:J?"enabled":"disabled",error:void 0}:Ve));let fe=await t.enablePlugin(Y.id,J);if(q!==h.current)return;if(m(t.state.get().plugins),fe.find((ce)=>ce.id===Y.id)?.status!==(J?"enabled":"disabled"))throw Error(`插件 ${Y.id} 未进入预期状态,请刷新后重试`)}}catch(Q){if(q!==h.current)return;let ae=K?"重载失败":`更新 ${X} 失败,后续操作已停止`;k({id:f.id,message:ae}),z(Q,ae);try{if(await t.plugins(),q===h.current)m(t.state.get().plugins)}catch(Ce){if(q===h.current)y(`刷新插件状态失败:${rt(Ce)}`)}}finally{if(q===h.current)G.current=!1,B(void 0)}}let N=_(()=>Ze(a??[]),[a]),E=M?a?.find((f)=>f.id===M):void 0,U=i(void 0);if(E)U.current=E;let b=E??U.current,F=a?`内置 ${a.filter((f)=>f.builtin).length},用户 ${a.filter((f)=>!f.builtin).length}`:"";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:"font-medium text-[13px] text-dim",children:"插件"}),e("p",{className:"mt-0.5 text-faint text-xs",children:F})]}),e(V,{label:"刷新",className:"size-10",disabled:C!==void 0,onClick:R,children:e(ye,{className:"size-4"})})]}),c&&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-danger text-sm",children:["无法读取插件:",c]}),e(x,{className:"h-10",onClick:R,children:"重试"})]}),n("div",{className:"relative mb-3 min-w-0",children:[e(Be,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),e(te,{type:"search","aria-label":"搜索插件",placeholder:"搜索插件",value:T,onChange:(f)=>g(f.target.value),className:"h-10 min-w-0 pl-9"})]}),e("div",{className:l("settings.groupBox"),children:!a?!c&&e(Hn,{}):e(Kt,{plugins:a,busy:C!==void 0,pending:C,query:T,pluginMetadata:Ue,onSelect:(f)=>{P(f.id),O("details")},onToggle:(f)=>void L(f,!1),onConfigure:(f)=>{P(f.id),O("settings")}})})]}),e(Zt,{open:Boolean(M),onOpenChange:(f)=>{if(!f)P(void 0),O("details")},size:"lg",title:b&&(I==="settings"?n("div",{className:"flex items-center gap-2",children:[n(x,{variant:"ghost",size:"sm",className:"h-7 px-1.5 text-xs text-dim hover:text-ink",onClick:()=>O("details"),children:[e(ar,{className:"mr-1 size-3.5"}),"返回详情"]}),n("span",{className:"font-semibold text-ink text-base",children:[b.id," 设置"]})]}):e(ds,{icon:(()=>{let f=Ue.get(b.id)?.icon??Mt;return e(f,{})})(),name:b.id,meta:[b.builtin?"内置":"用户插件",`v${b.version}`,b.webBundle&&"Web"]})),description:b&&(I==="settings"?void 0:e("span",{className:"mt-2 block leading-5.5",children:Ue.get(b.id)?.description??b.description})),footer:b&&(I==="settings"?e("div",{ref:u,className:"flex w-full flex-wrap items-center justify-end gap-2"}):n("div",{className:"flex w-full items-center justify-between gap-2 max-sm:[&>*]:flex-none",children:[n("div",{className:"inline-flex items-center gap-2.5 text-[13px] text-dim",children:[e(kt,{label:`启用 ${b.id}`,checked:b.status!=="disabled",disabled:C!==void 0,onCheckedChange:()=>void L(b,!1)}),e("span",{className:d(b.status==="error"&&"text-danger"),children:On[b.status].label})]}),n("div",{className:"flex items-center gap-1.5",children:[e(V,{label:"重载插件",disabled:C!==void 0||b.status==="disabled",onClick:()=>void L(b,!0),children:e(ye,{className:d("size-4",C===b.id&&"animate-spin")})}),Wn(b)&&b.status!=="disabled"&&n(x,{size:"sm",onClick:()=>O("settings"),children:[e(mt,{className:"size-3.5"}),e("span",{children:"设置"})]})]})]})),children:b&&(I==="settings"?e(Bi,{value:{footer:A},children:e("div",{className:"py-1",children:e(gs,{pluginID:b.id,viewID:"settings",connection:t,onClose:()=>{P(void 0),O("details")}})})}):e(_n,{plugin:b,busy:C===b.id,failed:D?.id===b.id?D.message:void 0,plugins:a??[],depsMap:N.depsMap,dependentsMap:N.dependentsMap,onSelectPlugin:(f)=>{P(f),O("details")}}))})]})}var Ie="__direct",tt="__inherit";function Qt({conn:t}){w();let a=ie(t.state).status,[m,c]=r(),[y,C]=r(),[B,D]=r([]),[k,T]=r(),[g,M]=r(),P=i(void 0),I=v(async(S)=>{T("loading"),M(void 0);try{let R=await t.proxyConfiguration(S);if(S?.aborted)return;c(Oe(R)),C(Oe(R)),D(R.targets)}catch(R){if(!S?.aborted)M(R instanceof Error?R.message:String(R))}finally{if(!S?.aborted)T(void 0)}},[t]);o(()=>{let S=new AbortController;if(P.current=S,c(void 0),C(void 0),M(void 0),a==="open")I(S.signal);return()=>S.abort()},[a,I]);let O=(S)=>{c((R)=>R?S(R):R)},A=(S,R)=>{O((L)=>({...L,profiles:L.profiles.map((N)=>N.id===S?{...N,...R}:N)}))},u=async()=>{if(!m)return;let S=P.current;if(!S||S.signal.aborted)return;T("saving"),M(void 0);try{let R=await t.saveProxyConfiguration(m,S.signal);if(S.signal.aborted)return;c(Oe(R)),C(Oe(R)),D(R.targets)}catch(R){if(!S.signal.aborted)M(R instanceof Error?R.message:String(R))}finally{if(!S.signal.aborted)T(void 0)}},h=m&&y?JSON.stringify(m)!==JSON.stringify(y):!1,G=[{value:Ie,label:"直接连接"},...m?.profiles.map((S)=>({value:S.id,label:S.name}))??[]];if(a!=="open")return e(ne,{title:"代理",description:"控制当前服务器发起的外发 HTTP 请求。",children:e(W,{title:"连接服务器后可配置代理",description:"代理设置保存在服务器上,连接后即可读取和保存。"})});if(!m)return e(ne,{title:"代理",description:"控制当前服务器发起的外发 HTTP 请求。",children:e(W,{title:g?"无法读取代理设置":"正在读取代理设置…",description:g?e("span",{className:"text-danger",children:g}):void 0,children:g&&e(x,{loading:k==="loading",onClick:()=>void I(P.current?.signal),children:"重新加载"})})});return n(Yt,{className:"gap-6",noValidate:!0,onSubmit:(S)=>{S.preventDefault(),u()},children:[e(ne,{title:"代理",description:"控制当前服务器发起的外发 HTTP 请求;本机回环地址始终直连。",children:e(W,{title:"默认线路",description:"没有单独分流的模型、订阅登录和程序更新使用这条线路。",children:e(Xt,{ariaLabel:"默认代理线路",className:"w-56",value:m.defaultProfileID??Ie,disabled:k!==void 0,onValueChange:(S)=>O((R)=>({...R,defaultProfileID:S===Ie?void 0:S})),groups:[{options:G}]})})}),e(ne,{title:"代理服务器",description:"支持 HTTP / HTTPS 代理;地址中的账号密码请拆到独立字段。",unboxed:!0,action:n(x,{size:"sm",disabled:k!==void 0,onClick:()=>O((S)=>({...S,profiles:[...S.profiles,{id:er(),name:`代理 ${S.profiles.length+1}`,address:"http://127.0.0.1:8080",tls:"verify",noProxy:[]}]})),children:[e(we,{className:"size-3.5"}),"添加代理"]}),children:m.profiles.length===0?e("div",{className:l("surface.emptyDashed","py-10 text-sm text-dim"),children:"尚未添加代理,所有请求直接连接。"}):m.profiles.map((S)=>n("section",{className:l("surface.card","flex flex-col gap-4 p-4"),children:[n("div",{className:"flex items-center justify-between gap-3",children:[n("div",{className:"flex min-w-0 items-center gap-2 text-sm font-medium text-ink",children:[e(Ge,{className:"size-4 shrink-0 text-dim"}),e("span",{className:"truncate",children:S.name||"未命名代理"})]}),e(V,{label:`删除${S.name||"代理"}`,className:"text-danger",disabled:k!==void 0,onClick:()=>O((R)=>({...R,defaultProfileID:R.defaultProfileID===S.id?void 0:R.defaultProfileID,profiles:R.profiles.filter((L)=>L.id!==S.id),routes:Object.fromEntries(Object.entries(R.routes).filter(([,L])=>L!==S.id))})),children:e(pe,{className:"size-4"})})]}),n("div",{className:"grid gap-3 md:grid-cols-2",children:[e(ue,{label:"名称",children:(R)=>e(te,{id:R,value:S.name,onChange:(L)=>A(S.id,{name:L.target.value})})}),e(ue,{label:"代理地址",children:(R)=>e(te,{id:R,type:"url",value:S.address,placeholder:"http://proxy.example.com:8080",autoComplete:"off",spellCheck:!1,onChange:(L)=>A(S.id,{address:L.target.value})})}),e(ue,{label:"用户名(可选)",children:(R)=>e(te,{id:R,value:S.username??"",autoComplete:"off",onChange:(L)=>A(S.id,{username:L.target.value||void 0})})}),e(ue,{label:"密码(可选)",hint:"留空表示沿用已保存密码。",children:(R)=>e(te,{id:R,type:"password",value:S.password??"",autoComplete:"new-password",onChange:(L)=>A(S.id,{password:L.target.value||void 0})})}),e(ue,{label:"HTTPS 证书校验",children:(R)=>e(Xt,{id:R,value:S.tls,onValueChange:(L)=>A(S.id,{tls:L==="insecure"?"insecure":"verify"}),groups:[{options:[{value:"verify",label:"校验证书(推荐)"},{value:"insecure",label:"跳过校验(仅调试)"}]}]})}),e(ue,{label:"额外直连主机",hint:"多个主机用逗号分隔;localhost 与回环地址无需填写。",children:(R)=>e(te,{id:R,value:S.noProxy?.join(", ")??"",placeholder:"internal.example.com",onChange:(L)=>A(S.id,{noProxy:L.target.value.split(",").map((N)=>N.trim()).filter(Boolean)})})})]})]},S.id))}),e(ne,{title:"分流规则",description:"可按模型提供方、ChatGPT 订阅登录或程序更新覆盖默认线路。",children:B.map((S)=>{let L=Object.hasOwn(m.routes,S.id)?m.routes[S.id]??Ie:tt;return e(W,{title:S.name,description:e("span",{className:"font-mono",children:S.id}),children:e(Xt,{ariaLabel:`${S.name}使用的代理线路`,className:"w-56",value:L,disabled:k!==void 0,onValueChange:(N)=>O((E)=>{let U={...E.routes};if(N===tt)delete U[S.id];else U[S.id]=N===Ie?null:N;return{...E,routes:U}}),groups:[{options:[{value:tt,label:"跟随默认线路"},...G]}]})},S.id)})}),e(wt,{children:g}),n(us,{children:[e(x,{disabled:k!==void 0||!h,onClick:()=>y&&c(structuredClone(y)),children:"撤销更改"}),n(x,{type:"submit",variant:"primary",disabled:k!==void 0||!h,loading:k==="saving",children:[e(Fe,{className:"size-3.5"}),"保存代理设置"]})]})]})}function Oe(t){return{version:1,defaultProfileID:t.defaultProfileID,routes:{...t.routes},profiles:t.profiles.map((a)=>({id:a.id,name:a.name,address:a.address,username:a.username,password:"",tls:a.tls,noProxy:[...a.noProxy??[]]}))}}var me="ring-2 ring-amber-400",ot="flex items-center gap-2 rounded-lg border border-white/10 bg-[#1a1a1a] px-2.5 py-1.5 text-xs";function Pe(t){return e("div",{role:"img","aria-label":t.label,className:"mt-2 w-full max-w-md overflow-hidden rounded-lg border border-white/10 bg-[#0f0f0f] text-left text-[11px] leading-4 text-white",children:n("div",{"aria-hidden":!0,children:[n("div",{className:"flex items-center gap-1.5 border-b border-white/10 px-3 py-1.5 text-[10px]",children:[t.path.map((a,m)=>n("span",{className:"flex items-center gap-1.5",children:[m>0&&e("span",{className:"text-white/30",children:"›"}),e("span",{className:m===t.path.length-1?"font-medium":"text-white/60",children:a})]},a)),e("span",{className:"ml-auto rounded bg-white/10 px-1 py-0.5 text-[9px] text-white/50",children:"示意图"})]}),e("div",{className:"px-3 py-2.5",children:t.children})]})})}function re(t){return e("span",{className:"absolute -top-1.5 -right-1.5 z-10 flex size-3.5 items-center justify-center rounded-full bg-amber-400 text-[9px] font-bold text-black",children:t.n})}function at(t){return e("span",{className:d("flex h-4 w-7 shrink-0 items-center rounded px-0.5",t.on?"justify-end bg-blue-500":"justify-start border border-white/15 bg-[#2a2a2a]"),children:e("span",{className:d("h-3 w-3 rounded-[3px]",t.on?"bg-blue-200":"bg-white/45")})})}function xe(t){return n("div",{className:d(ot,"justify-between",t.className),children:[e("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:t.children}),t.clearable&&e(oe,{className:"size-3 shrink-0 text-white/50"}),e(ge,{className:"size-3 shrink-0 text-white/50"})]})}function We(t){return n("span",{className:"shrink-0 rounded bg-[#2a2a2a] px-1.5 py-0.5 text-[11px]",children:[t.children,e("span",{className:"ml-1.5 text-white/60",children:"×"})]})}function nn(t){return n(p,{children:[n("div",{className:"inline-flex rounded-md border border-white/10 bg-white/5 p-0.5 text-[10px]",children:[e("span",{className:"px-2 py-1 text-white/50",children:"应用程序详细信息"}),e("span",{className:"rounded border border-white/15 bg-black px-2 py-1",children:"其他设置"})]}),e("div",{className:"mt-2 text-sm font-bold",children:"其他设置"}),e("div",{className:"mt-2 flex flex-wrap gap-1.5 text-[10px]",children:["全部","App Launcher 设置","标记","自定义封锁页面","CORS 标头","Cookie 设置","服务身份验证失败","AUD 标签","OAuth"].map((m)=>n("span",{className:d("relative rounded-md border px-2 py-1",m===t.active?`border-blue-400/60 bg-[#0b2a5b] ${me}`:"border-white/15 text-white/90"),children:[m,m===t.active&&e(re,{n:1})]},m))})]})}function it(t){return n("div",{children:[n("div",{className:"flex items-center gap-2",children:[e("span",{className:d("shrink-0 rounded-full px-2 py-px text-[11px]",t.badgeClass),children:t.badge}),n("div",{children:[e("div",{className:"text-xs font-semibold",children:t.title}),e("div",{className:"text-[10px] text-white/55",children:t.hint})]})]}),e("div",{className:"mt-1.5 ml-3.5 border-l border-white/25 pl-3",children:t.children})]})}function an(){return n(Pe,{label:"策略示例:操作选允许;包含电子邮件为你的邮箱;要求登录方法为 GitHub",path:["Access 策略","创建新策略"],children:[e("div",{className:"text-xs font-semibold",children:"操作"}),n("div",{className:"relative mt-1",children:[e(xe,{className:me,children:"允许"}),e(re,{n:1})]}),e("div",{className:"mt-3 text-sm font-bold",children:"策略规则"}),n("div",{className:"mt-2 flex flex-col gap-3",children:[e(it,{badge:"或",badgeClass:"bg-violet-600",title:"包含",hint:"用户只需满足一条「包含」规则",children:n("div",{className:"relative flex flex-col gap-1.5 rounded-lg bg-[#2a2a2a] p-2",children:[e(re,{n:2}),e(xe,{children:"电子邮件"}),n("div",{className:ot,children:[e(We,{children:"you@example.com"}),e("span",{className:"min-w-0 truncate text-white/40",children:"email@example.com"})]})]})}),e(it,{badge:"且",badgeClass:"bg-amber-500 text-black",title:"要求",hint:"流量必须匹配所有这些规则才能被包含。",children:n("div",{className:"relative flex items-start gap-2 rounded-lg bg-[#2a2a2a] p-2",children:[e(re,{n:3}),n("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[e(xe,{children:"登录方法"}),e(xe,{clearable:!0,children:e(We,{children:"GitHub"})})]}),e(pe,{className:"mt-2 size-3 shrink-0 text-white/60"})]})})]}),n("div",{className:"mt-2.5 flex flex-wrap gap-x-4 gap-y-0.5 text-[10px] font-medium",children:[e("span",{children:"+ 添加包含 (或)"}),e("span",{children:"+ 添加要求 (且)"}),e("span",{children:"+ 添加排除 (非)"})]})]})}function sn(){return n(Pe,{label:"身份验证示例:关闭接受所有标识提供程序,只选择 GitHub;即时身份验证开启时会直接跳转 GitHub",path:["应用程序","你的应用名"],children:[n("div",{className:"flex items-start justify-between gap-2",children:[n("div",{children:[n("div",{className:"flex items-center gap-1.5 text-sm font-bold",children:["身份验证",e("span",{className:"rounded-full bg-blue-600 px-1.5 py-px text-[10px] font-normal",children:"新"})]}),e("div",{className:"text-[10px] text-white/75",children:"为此应用程序配置身份提供程序和多重身份验证。"})]}),n("span",{className:"flex shrink-0 rounded-md border border-white/10 bg-white/5 p-0.5 text-[10px]",children:[e("span",{className:"rounded bg-blue-600/35 px-2 py-0.5 text-blue-300",children:"身份"}),e("span",{className:"px-2 py-0.5 text-white/75",children:"MFA"})]})]}),n("div",{className:"mt-2.5 flex flex-col gap-3 border-t border-white/10 pt-2.5",children:[n("div",{className:"flex items-center justify-between gap-2",children:[e("span",{className:"text-xs font-bold",children:"接受所有可用的标识提供程序"}),n("span",{className:"relative",children:[e("span",{className:d("block rounded",me),children:e(at,{on:!1})}),e(re,{n:1})]})]}),n("div",{children:[e("div",{className:"text-xs font-bold",children:"选择此应用程序可用的身份提供程序"}),n("div",{className:"relative mt-1",children:[e(xe,{className:me,clearable:!0,children:e(We,{children:"GitHub - github"})}),e(re,{n:2})]})]}),n("div",{className:"flex items-start justify-between gap-2",children:[n("div",{children:[e("div",{className:"text-xs font-bold",children:"应用即时身份验证"}),e("div",{className:"text-[10px] text-white/75",children:"允许用户在只有一种登录方法可用时跳过标识提供程序选择。"})]}),n("span",{className:"relative",children:[e("span",{className:d("block rounded",me),children:e(at,{on:!1})}),e(re,{n:3})]})]})]})]})}function on(){return n(Pe,{label:"AUD 位置示例:应用的「其他设置」页点「AUD 标签」,复制「令牌」下面的一长串字符",path:["应用程序","你的应用名"],children:[e(nn,{active:"AUD 标签"}),e("div",{className:"mt-3 text-xs font-bold",children:"应用程序受众 (AUD) 标签"}),n("div",{className:"relative mt-1.5 rounded-lg border border-white/15 bg-white/[0.03] px-2.5 py-2",children:[e(re,{n:2}),e("div",{className:"text-xs font-bold",children:"令牌"}),n("div",{className:"mt-1 flex items-center gap-1.5",children:[e("span",{className:d("min-w-0 break-all rounded font-mono text-[10px] ring-offset-2 ring-offset-black",me),children:"0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9"}),e(Sn,{className:"size-3 shrink-0 text-white/60"})]})]})]})}function rn(){return n(Pe,{label:"服务令牌示例:在服务凭据的服务令牌页点创建服务令牌,填名称、选时长后点生成令牌",path:["服务凭据","服务令牌"],children:[n("div",{className:"inline-flex rounded-md border border-white/10 bg-white/5 p-0.5 text-[10px]",children:[e("span",{className:"rounded border border-white/15 bg-black px-2 py-1",children:"服务令牌"}),e("span",{className:"px-2 py-1 text-white/50",children:"Mutual TLS"}),e("span",{className:"px-2 py-1 text-white/50",children:"SSH"})]}),n("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e("span",{className:"text-sm font-bold",children:"服务令牌"}),n("span",{className:d("relative rounded-md bg-blue-600 px-2 py-1 text-[10px] font-medium",me),children:["+ 创建服务令牌",e(re,{n:1})]})]}),n("div",{className:"mt-2.5 rounded-lg border border-white/15 bg-[#1a1a1a] p-2.5",children:[e("div",{className:"text-xs font-bold",children:"创建服务令牌"}),e("div",{className:"mt-2 text-[11px] font-medium",children:"服务令牌名称"}),e("div",{className:d(ot,"mt-1"),children:"basalt"}),e("div",{className:"mt-2 text-[11px] font-medium",children:"服务令牌时长"}),e(xe,{className:"mt-1",children:"1年"}),n("div",{className:"mt-2.5 flex justify-end gap-3 text-[10px] font-medium",children:[e("span",{className:"py-1",children:"取消"}),n("span",{className:d("relative rounded-md bg-blue-600 px-2 py-1",me),children:["生成令牌",e(re,{n:2})]})]})]})]})}function ln(){return n(Pe,{label:"服务令牌策略示例:操作选服务身份验证;包含选 Service Token 并选中刚创建的令牌",path:["Access 策略","创建新策略"],children:[e("div",{className:"text-xs font-semibold",children:"操作"}),n("div",{className:"relative mt-1",children:[e(xe,{className:me,children:"服务身份验证"}),e(re,{n:1})]}),e("div",{className:"mt-3 text-sm font-bold",children:"策略规则"}),e("div",{className:"mt-2",children:e(it,{badge:"或",badgeClass:"bg-violet-600",title:"包含",hint:"用户只需满足一条「包含」规则",children:n("div",{className:"relative flex flex-col gap-1.5 rounded-lg bg-[#2a2a2a] p-2",children:[e(re,{n:2}),e(xe,{children:"Service Token"}),e(xe,{clearable:!0,children:e(We,{children:"basalt"})})]})})})]})}function cn(){return n(Pe,{label:"CORS 设置示例:应用的其他设置页点 CORS 标头,打开绕过向源服务器发出的选项请求",path:["应用程序","你的应用名"],children:[e(nn,{active:"CORS 标头"}),e("div",{className:"mt-3 text-xs font-bold",children:"跨源服务器资源共享 (CORS) 设置"}),n("div",{className:"mt-1.5 rounded-lg border border-white/15 bg-white/[0.03] px-2.5 py-2",children:[n("div",{className:"flex items-center gap-2",children:[e("span",{className:"text-xs font-bold",children:"绕过向源服务器发出的选项请求"}),n("span",{className:"relative",children:[e("span",{className:d("block rounded",me),children:e(at,{on:!0})}),e(re,{n:2})]})]}),e("div",{className:"mt-0.5 text-[10px] text-white/75",children:"将所有选项请求直接发送到源服务器。这将删除此应用程序的所有现有 CORS 设置。"})]})]})}function mn({conn:t}){let[a,m]=r(0);return e(jn,{conn:t,onRetry:()=>m((c)=>c+1)},a)}function jn({conn:t,onRetry:a}){let m=ie(t.state).status==="open",[c,y]=r(),[C,B]=r(),[D,k]=r(),T=i(void 0);o(()=>{let M=new AbortController;if(T.current=M,y(void 0),B(void 0),m)k("load"),t.networkSettings(M.signal).then((P)=>{if(M.signal.aborted)return;y(P),k(void 0)},(P)=>{if(M.signal.aborted)return;let I=P instanceof Error&&"status"in P&&P.status===404;B(I?"当前服务版本不支持局域网设置,请更新服务端。":dn(P)),k(void 0)});return()=>M.abort()},[t,m]);async function g(M){let P=T.current;if(!P||P.signal.aborted||D)return;k("update"),B(void 0);try{let I=await t.saveNetworkSettings({lanEnabled:M},P.signal);if(P.signal.aborted)return;y(I)}catch(I){if(!P.signal.aborted)B(dn(I))}finally{if(!P.signal.aborted)k(void 0)}}if(!m)return e(W,{title:"开放局域网",description:"连接服务器后可查看网络设置。"});if(!c)return e(W,{title:"开放局域网",description:C??"正在读取网络设置…",children:C&&e(x,{size:"sm",onClick:a,children:"重试"})});return n(p,{children:[e(W,{title:"开放局域网",description:n("div",{className:"space-y-2",children:[e("p",{children:"设备需配对。HTTP 不加密,仅限可信网络。"}),c.disabledReason&&e("p",{children:c.disabledReason}),C&&e("p",{role:"alert",className:"text-danger",children:C})]}),children:e(kt,{label:"开放局域网",checked:c.settings.lanEnabled,onCheckedChange:g,disabled:!c.editable||D!==void 0})}),c.current.remote&&e(W,{title:"局域网连接地址",description:n("div",{className:"space-y-2",children:[e("p",{children:"其他设备使用配对码连接。"}),c.addresses.length===0&&e("p",{children:"未发现局域网 IPv4 地址,请检查网卡。"}),c.addresses.map((M)=>e(te,{"aria-label":`局域网地址 ${M.address}`,value:M.url,readOnly:!0,className:"font-mono",onFocus:(P)=>P.currentTarget.select()},M.address))]})})]})}function dn(t){return t instanceof Error?t.message:"网络设置请求失败,请重试。"}var Vn=/^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/,Kn="https://dash.cloudflare.com/",qn=2000,fn=15000,Jn={off:{label:"未连接",tone:"neutral"},starting:{label:"连接中",tone:"warning",pulse:!0},connected:{label:"已连接",tone:"success"},error:{label:"连接失败,重试中",tone:"danger",pulse:!0},"missing-binary":{label:"未安装 cloudflared",tone:"warning"}};function Qn(t){let a=et(t.state,(C)=>C.status==="open"),[m,c]=r(),y=m?.state==="connected";return o(()=>{if(!a)return;let C=!1,B=()=>void t.tunnelStatus().then((k)=>!C&&c(k)).catch(()=>!C&&c((k)=>k??null));B();let D=setInterval(B,y?fn:qn);return()=>{C=!0,clearInterval(D)}},[t,a,y]),[m,c]}function Yn(t){let[a,m]=r(),c=a?.expires;return o(()=>{let y=!1,C=()=>void t.pairingCode().then((k)=>!y&&m(k)).catch(()=>!y&&m(null));C();let B=setInterval(C,fn),D=c?setTimeout(C,Math.max(0,c-Date.now())+500):void 0;return()=>{y=!0,clearInterval(B),clearTimeout(D)}},[t,c]),[a,m]}function gn(t){w();let[a,m]=Qn(t.conn),c=et(t.conn.state,(X)=>X.server?.auth===!1),[y,C]=r(),[B,D]=r(""),[k,T]=r(),[g,M]=r(!1),[P,I]=r(!1),[O,A]=r(),u=e(ne,{title:"局域网访问",description:"通过可信局域网访问这台 Basalt。",children:e(mn,{conn:t.conn})}),h=e(ea,{conn:t.conn});if(!a)return n(p,{children:[h,u]});let G=y??a.mode==="token",S=Tl(B),R=S?El(S):void 0,L=(k??a.hostname??"").trim().toLowerCase(),N=Vn.test(L),{login:E,binary:U}=a,b=G?S!==void 0||a.hasToken:E.state==="done",F=!U?0:!b?1:2;async function f(X,Q){I(!0),A(void 0);try{m(await X()),Q?.()}catch(ae){A(ae instanceof Error?ae.message:String(ae))}finally{I(!1)}}let K=()=>f(()=>G?t.conn.saveTunnel({hostname:L,...S?{token:S}:{}}):t.conn.provisionTunnel({hostname:L}),()=>{D(""),T(void 0),C(void 0),M(!1)});async function q(){if(!await Qe({title:"删除远程访问配置?",description:"会断开隧道并删除 Basalt 保存的配置。Cloudflare 里的隧道和域名解析不会被删除。",action:"删除",danger:!0}))return;I(!0);try{m(await t.conn.removeTunnel()),C(void 0),M(!1)}catch(Q){z(Q,"删除失败")}finally{I(!1)}}let J="用你自己域名下的 Cloudflare 隧道,从外网访问这台 Basalt。";if(a.configured&&!g)return n(p,{children:[h,u,e(ne,{title:"Cloudflare 隧道",description:J,children:e(Zn,{status:a,busy:P,conn:t.conn,onChanged:m,onEdit:()=>M(!0),onRemove:()=>void q()})})]});return n(p,{children:[h,u,n(ne,{title:"Cloudflare 隧道",description:J,children:[c&&e("div",{className:"px-4 py-3",children:e(xa,{tone:"danger",children:"服务端用 --no-auth 关闭了认证,不能开启远程访问。"})}),e(W,{title:"安装 cloudflared",description:U?"已找到":a.install.command?n("span",{className:"mt-1.5 flex flex-col gap-1.5",children:[e("span",{children:"在运行 Basalt 的这台机器上执行,装好后自动检测:"}),e(un,{text:a.install.command,shell:!0})]}):"在运行 Basalt 的这台机器上安装,装好后自动检测",children:U?e(ct,{}):a.install.command?e(le,{className:"size-4 animate-spin text-faint"}):e(x,{asChild:!0,variant:"primary",size:"sm",children:n("a",{href:a.install.url,target:"_blank",rel:"noreferrer noopener",children:["安装文档",e(xt,{className:"size-3.5"})]})})}),G?n(W,{title:"隧道令牌",description:B&&!S?e("span",{className:"text-danger",children:"没找到令牌(以 eyJ 开头),请完整复制"}):S?`已识别隧道${R?` ${R.slice(0,8)}…`:""}`:a.hasToken?"已保存,留空沿用":n(p,{children:["把 Cloudflare 上创建隧道后给出的安装命令整段粘贴进来。",e(dt,{href:Kn,children:"打开 Cloudflare"})]}),children:[e(te,{type:"password",autoComplete:"off",spellCheck:!1,"aria-label":"隧道令牌或安装命令",placeholder:"cloudflared service install eyJ…",className:"w-64 max-w-full",value:B,disabled:c||!U,onChange:(X)=>D(X.target.value)}),b&&e(ct,{})]}):e(W,{title:"连接 Cloudflare 账号",description:E.state==="done"?"已授权":E.state==="waiting"?E.url?"在授权页面登录并选择你的域名,完成后这里自动继续":"正在准备授权链接…":E.state==="error"?e("span",{className:"text-danger",children:E.error}):"登录并选择你的域名,其余的 Basalt 自动完成",children:E.state==="done"?e(ct,{}):E.state==="waiting"?n(p,{children:[E.url?e(x,{asChild:!0,variant:"primary",size:"sm",children:n("a",{href:E.url,target:"_blank",rel:"noreferrer noopener",children:["打开授权页面",e(xt,{className:"size-3.5"})]})}):e(le,{className:"size-4 animate-spin text-faint"}),e(x,{variant:"ghost",size:"sm",onClick:()=>void f(()=>t.conn.cancelTunnelLogin()),children:"取消"})]}):e(x,{variant:F===1?"primary":"secondary",size:"sm",loading:P,disabled:c||!U,onClick:()=>void f(()=>t.conn.tunnelLogin()),children:E.state==="error"?"重试":"连接"})}),n(W,{title:"访问地址",description:O?e("span",{className:"text-danger",children:O}):L&&!N?e("span",{className:"text-danger",children:"格式不对,应形如 basalt.example.com"}):P&&F===2?"正在创建,通常需要几秒钟…":G?n("span",{className:"flex flex-col gap-1.5",children:[e("span",{children:"你在 Cloudflare 里给这条隧道配的主机名;隧道的服务地址要填:"}),e(un,{text:`http://localhost:${a.localPort}`})]}):"填你刚才授权的域名下的任意子域名",children:[e(te,{placeholder:"basalt.example.com","aria-label":"主机名",spellCheck:!1,autoCapitalize:"off",className:"w-56 max-w-full",value:k??a.hostname??"",disabled:c||!U||!b,onChange:(X)=>T(X.target.value)}),e(x,{variant:"primary",size:"sm",loading:P&&F===2,disabled:c||!U||!b||!N,onClick:()=>void K(),children:G?"保存并连接":"创建并连接"})]}),n("div",{className:"flex items-center justify-between gap-2 px-4 py-2.5",children:[e("button",{type:"button",className:"text-xs text-faint transition-colors hover:text-ink",onClick:()=>{C(!G),A(void 0)},children:G?"改用登录授权":"我已有隧道令牌"}),g&&e("button",{type:"button",className:"text-xs text-faint transition-colors hover:text-ink",onClick:()=>M(!1),children:"取消修改"})]})]})]})}var Xn={success:"text-success",warning:"text-warning",danger:"text-danger",neutral:"text-faint"};function Zn(t){let{status:a}=t,m=Jn[a.state],c=a.publicURL??"",[y,C]=r(!1),[B,D]=r(!1);return n(p,{children:[e(W,{title:"隧道状态",description:a.error?e("span",{className:"text-danger",children:a.error}):a.state==="connected"?"用手机或另一台电脑打开下面的地址,输入配对码即可":"正在连接 Cloudflare…",children:n("span",{className:d("flex items-center gap-2 text-xs font-medium",Xn[m.tone]),children:[n("span",{className:"relative flex size-2",children:[m.pulse&&e("span",{className:"absolute inset-0 animate-ping rounded-full bg-current opacity-60"}),e("span",{className:"relative size-2 rounded-full bg-current"})]}),m.label]})}),n(W,{title:"公共地址",description:e("span",{className:"font-mono break-all",children:c}),children:[e(Ot,{text:c,label:"复制地址",size:"icon-sm"}),e(V,{asChild:!0,size:"icon-sm",label:"在新标签页打开",className:"text-faint",children:e("a",{href:c,target:"_blank",rel:"noreferrer noopener",children:e(Fn,{className:"size-3.5"})})})]}),n(W,{title:"Access 校验",description:a.access?a.access.teamDomain:"可选:在 Basalt 之前再加一道只认你的登录",children:[n("span",{className:d("flex items-center gap-1.5 text-xs",a.access?"text-dim":"text-faint"),children:[a.access?e(Un,{className:"size-3.5"}):e(yt,{className:"size-3.5"}),a.access?"已启用":"未启用"]}),e(x,{variant:"ghost",size:"sm",onClick:()=>D(!0),children:"配置引导"}),e(x,{variant:"secondary",size:"sm",onClick:()=>C(!y),children:a.access?"修改":"设置"})]}),e(ta,{status:a,open:B,onOpenChange:D}),y&&e(na,{status:a,conn:t.conn,onSaved:(k)=>{t.onChanged(k),C(!1)},onCancel:()=>C(!1)}),n(W,{title:"管理",description:"删除不会动 Cloudflare 里的隧道和域名解析",children:[n(x,{variant:"secondary",size:"sm",onClick:t.onEdit,children:[e(nt,{className:"size-3.5"}),"修改"]}),n(x,{variant:"danger-ghost",size:"sm",disabled:t.busy,onClick:t.onRemove,children:[e(pe,{className:"size-3.5"}),"删除"]})]})]})}function ea(t){let[a,m]=Yn(t.conn),[c,y]=r(!1);if(!a)return null;let C=`${a.code.slice(0,4)}-${a.code.slice(4)}`,B=new Date(a.expires).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});async function D(){y(!0);try{m(await t.conn.renewPairingCode())}catch(k){z(k,"更换配对码失败")}finally{y(!1)}}return e(ne,{title:"设备配对",description:"局域网与 Cloudflare 隧道连接共用此码。",children:n(W,{title:"配对码",description:`${B} 前有效,用一次即失效`,children:[e("code",{className:"font-mono text-sm font-medium tracking-wider text-ink",children:C}),e(Ot,{text:C,label:"复制配对码",size:"icon-sm"}),e(V,{size:"icon-sm",label:"换一个配对码",className:"text-faint",disabled:c,onClick:()=>void D(),children:e(ye,{className:d("size-3.5",c&&"animate-spin")})})]})})}function be(t){return n("li",{className:"flex items-start gap-2.5",children:[e("span",{"aria-hidden":!0,className:"flex size-5 shrink-0 items-center justify-center rounded-full bg-raised text-[11px] text-faint",children:t.index}),n("div",{className:"min-w-0 flex-1 text-[13px] leading-5 text-dim",children:[t.children,t.detail&&e("div",{className:"mt-0.5 text-xs text-faint",children:t.detail})]})]})}function ta(t){let a=(t.status.hostname??"").split("."),m=a.slice(-2).join("."),c=a.slice(0,-2).join("."),y=t.status.accessAppsURL?t.status.accessAppsURL.replace(/\/apps$/,"/service-credentials/service-tokens"):"https://one.dash.cloudflare.com/";return n(Zt,{open:t.open,onOpenChange:t.onOpenChange,title:"Cloudflare Access 配置引导",description:"按顺序在 Cloudflare 后台配置,最后把 AUD 标签填回 Basalt。",size:"lg",footer:n(p,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(x,{variant:"primary",onClick:()=>t.onOpenChange(!1),children:"知道了"})]}),children:[n("ol",{className:"flex list-none flex-col gap-4",children:[n(be,{index:1,detail:e(p,{children:"选「自托管和私有」,保持「公共 DNS」,点「继续使用」"}),children:["打开"," ",e(dt,{href:t.status.accessAppsURL??"https://one.dash.cloudflare.com/",children:"Cloudflare 应用程序"}),",点右上角「新建应用程序」"]}),e(be,{index:2,detail:t.status.hostname?n(p,{children:["你在上面设置的访问域名是 ",e("code",{className:"font-mono text-ink",children:t.status.hostname}),",拆成两栏填;路径留空"]}):e(p,{children:"先在上面设置访问域名,再按它拆成「子域」和「域」两栏;路径留空"}),children:t.status.hostname?n(p,{children:["表单里「子域」填 ",e("code",{className:"font-mono text-xs text-ink",children:c||"(留空)"}),",「域」下拉选"," ",e("code",{className:"font-mono text-xs text-ink",children:m})]}):e(p,{children:"表单里分别填「子域」和「域」"})}),e(be,{index:3,detail:n(p,{children:[e("div",{children:"对照下图:① 操作选「允许」;② 「包含」选「电子邮件」填你的邮箱;③ 「要求」选「登录方法」= GitHub。"}),e(an,{}),e("div",{className:"mt-1.5",children:"不使用 GitHub 时只保留「包含」;两条都放进「包含」会变成满足其一即可。"})]}),children:"在「Access 策略」里点「创建新策略」"}),e(be,{index:4,detail:n(p,{children:[e("div",{children:"对照下图:① 关闭「接受所有可用的标识提供程序」;② 只选 GitHub;③ 「应用即时身份验证」开启会直接跳 GitHub,关闭则停在只有 GitHub 按钮的登录页(图中为关闭)。设置完成后点「创建」。"}),e(sn,{})]}),children:"只允许 GitHub 登录时,配置「身份验证」"}),e(be,{index:5,detail:n(p,{children:[e("div",{children:"对照下图:先点 ①「AUD 标签」,再复制 ② 令牌下面的整串字符(不要点删除)。"}),e(on,{}),e("div",{className:"mt-1.5",children:"回到 Basalt 点「设置」粘贴;团队域名保存时自动识别。"})]}),children:"创建后进入应用的「其他设置」,点「AUD 标签」,复制「令牌」下的那串字符"})]}),n("div",{className:"mt-5 border-t border-line pt-4",children:[e("div",{className:"text-[13px] font-medium text-ink",children:"可选:让其他 Basalt 客户端也能连上"}),e("div",{className:"mt-0.5 text-xs text-faint",children:"只用浏览器打开访问域名时可以跳过。"}),n("ol",{className:"mt-3 flex list-none flex-col gap-4",children:[n(be,{index:6,detail:n(p,{children:[e("div",{children:"对照下图:① 点「创建服务令牌」;② 填名称、选时长后点「生成令牌」。"}),e(rn,{}),e("div",{className:"mt-1.5",children:"生成后复制 Client ID 和 Client Secret,Secret 只显示这一次。"})]}),children:["打开 ",e(dt,{href:y,children:"Cloudflare 服务令牌"})]}),e(be,{index:7,detail:n(p,{children:[e("div",{children:"对照下图:① 操作选「服务身份验证」;② 「包含」选「Service Token」,再选刚建的令牌。"}),e(ln,{}),e("div",{className:"mt-1.5",children:"原来的邮箱策略保留,两条并存。"})]}),children:"回到前面建的应用,在「Access 策略」里再点一次「创建新策略」"}),e(be,{index:8,detail:n(p,{children:[e("div",{children:"对照下图:① 点「CORS 标头」;② 打开「绕过向源服务器发出的选项请求」,点「保存」。"}),e(cn,{})]}),children:"在应用的「其他设置」里放行预检请求"}),e(be,{index:9,detail:e(p,{children:"展开「请求头」点「Cloudflare Access」,两个值分别粘贴 Client ID 和 Client Secret"}),children:"在另一个 Basalt 里「添加服务器」"})]})]})]})}function na(t){let[a,m]=r(t.status.access?.audience??""),[c,y]=r(t.status.access?.teamDomain??""),[C,B]=r(!1),[D,k]=r(!1),[T,g]=r();async function M(P){k(!0),g(void 0);try{t.onSaved(await t.conn.setTunnelAccess(P))}catch(I){g(I instanceof Error?I.message:String(I))}finally{k(!1)}}return n("div",{className:"border-t border-line",children:[n(W,{title:"AUD 标签",description:n(p,{children:[e("span",{className:"block",children:"在 Cloudflare 应用的「其他设置」→「AUD 标签」里复制「令牌」"}),e("button",{type:"button",className:"mt-1 text-left text-xs text-faint transition-colors hover:text-ink",onClick:()=>B(!C),children:C?"改用自动识别团队域名":"团队域名自动识别 · 识别不到?手动填写"})]}),children:[e(te,{className:"w-72 max-w-full",placeholder:"粘贴 AUD 标签","aria-label":"AUD 标签",spellCheck:!1,autoCapitalize:"off",value:a,onChange:(P)=>m(P.target.value)}),e(x,{variant:"primary",size:"sm",loading:D,disabled:!a.trim()||C&&!c.trim(),onClick:()=>void M({...C&&c.trim()?{teamDomain:c}:{},audience:a}),children:"保存"}),e(x,{variant:"ghost",size:"sm",onClick:t.onCancel,children:"取消"})]}),C&&e(W,{title:"团队域名",description:"仅在自动识别失败时填写",children:e(te,{className:"w-72 max-w-full",placeholder:"myteam.cloudflareaccess.com","aria-label":"团队域名",spellCheck:!1,autoCapitalize:"off",value:c,onChange:(P)=>y(P.target.value)})}),T&&e("div",{className:"px-4 pb-4",children:e(wt,{children:T})}),t.status.access&&e("div",{className:"flex justify-end px-4 pb-3",children:e(x,{variant:"danger-ghost",size:"sm",disabled:D,onClick:()=>void M(null),children:"关闭校验"})})]})}function ct(){return e("span",{className:"flex size-5 items-center justify-center rounded-full bg-success/15 text-success",role:"img","aria-label":"已完成",children:e(Z,{className:"size-3",strokeWidth:3})})}function un(t){return n("span",{className:"flex w-fit max-w-full items-center gap-2 rounded-lg bg-raised/50 py-0.5 pr-1 pl-3 transition-colors hover:bg-raised",children:[t.shell&&e("span",{"aria-hidden":!0,className:"font-mono text-[12.5px] text-faint select-none",children:"$"}),e("code",{className:"min-w-0 flex-1 font-mono text-[12.5px] leading-6 break-all text-ink",children:t.text}),e(Ot,{text:t.text,size:"icon-sm"})]})}function dt(t){return n("a",{href:t.href,target:"_blank",rel:"noreferrer noopener",className:"ml-1 inline-flex w-fit items-center gap-0.5 font-medium text-accent underline decoration-accent/30 underline-offset-4 transition-colors hover:text-accent-strong hover:decoration-accent",children:[t.children,e(xt,{className:"size-3.5"})]})}var aa=[{value:"auto",label:"自动检测 (Auto)",description:"Windows 优先探测 bash,未找到则回退 powershell;Unix 走 bash"},{value:"bash",label:"Bash",description:"使用 bash -c 执行(Git Bash / WSL / MSYS2 / Linux / macOS)"},{value:"powershell",label:"PowerShell",description:"使用 powershell -NoProfile -Command 执行"},{value:"cmd",label:"CMD",description:"使用 cmd.exe /c 执行"}];function sa(t){if(!t)return"—";return`v${t.version}(协议 v${t.protocol})`}function ia(t){if(!t)return"—";return t.auth?"需设备配对令牌":"免认证(--no-auth)"}function xn(t){let a=ie(t.conn.state),m=Ui[a.status],c=a.server,[y,C]=r(!1),[B,D]=r(!1),[k,T]=r(),[g,M]=r(!1),P=c?.shell??"auto";o(()=>{if(T(void 0),a.status!=="open")return;let u=!1;return t.conn.serverAutostart().then((h)=>{if(!u)T(h)},(h)=>{if(!u)z(h)}),()=>{u=!0}},[t.conn,a.status]);async function I(u){let h=u;C(!0);try{await t.conn.setServerShell(h)}catch(G){z(G)}finally{C(!1)}}async function O(u){M(!0);try{T(await t.conn.setServerAutostart(u))}catch(h){z(h)}finally{M(!1)}}async function A(){D(!0);try{await t.conn.restartServer(),se("已请求重启",{description:"所有对话空闲后服务会按原参数重启,稍后自动重新连接"})}catch(u){z(u)}finally{D(!1)}}return n(p,{children:[n(ne,{title:"当前远程服务器",description:`正在管理 ${$n(t.server)}(${t.server.url})`,children:[e(W,{title:"连接状态",description:a.error??t.server.url,children:n("span",{className:"inline-flex items-center gap-2 text-xs font-medium text-ink",children:[e("span",{className:d("size-2 rounded-full",m.dot)}),a.status==="open"&&c?e("span",{className:"font-mono",children:sa(c)}):m.label]})}),e(W,{title:"认证策略",description:"服务端是否要求配对设备令牌",children:n("span",{className:"inline-flex items-center gap-2 text-xs font-medium text-ink",children:[c&&e("span",{className:d("size-2 rounded-full",c.auth?"bg-success":"bg-warning")}),ia(c)]})})]}),n(ne,{title:"更新与启动",description:"服务端版本更新、重启与开机自启",children:[e(Pl,{conn:t.conn}),e(W,{title:"服务重启",description:"按原参数重启,等所有对话空闲后执行,不会中断进行中的对话",children:e(x,{size:"sm",loading:B,disabled:a.status!=="open",onClick:A,children:"重启服务"})}),e(W,{title:"开机自启",description:"当前用户登录系统后自动启动 Basalt;不影响正在运行的服务",children:e(kt,{label:"开机自启",checked:k?.enabled??!1,disabled:!k||g||a.status!=="open",onCheckedChange:(u)=>void O(u)})})]}),n(ne,{title:"运行环境",description:"服务端执行命令与解释定时任务时使用的环境",children:[e(W,{title:"执行 Shell",description:"服务端运行 bash 工具与后台长任务时调用的默认命令行解释器",children:e("div",{className:"w-56",children:e(Xt,{value:P,disabled:y,onValueChange:I,groups:[{options:aa.map((u)=>({value:u.value,label:u.label,description:u.description}))}]})})}),e(W,{title:"服务器时区",description:"远程自动化定时任务(Cron)按此时区解释",children:e("span",{className:"font-mono text-xs text-dim",children:c?.timezone??"—"})})]})]})}function vn(t){let a=ie(t.conn.state),m=t.devices;if(a.server?.auth===!1)return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:e(W,{title:"当前服务器未启用设备认证",description:"服务端以 --no-auth 启动,无需配对设备令牌"})});if(!m){let c=a.status==="open"?"正在读取已配对设备…":"连接服务器后可查看";return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:e(W,{title:"设备列表",description:c})})}if(m.length===0)return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:e(W,{title:"暂无已配对设备"})});return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:m.map((c)=>e(W,{title:n("span",{className:"flex items-center gap-2",children:[e("span",{className:"truncate",children:c.name}),(c.current||c.id===t.server.id)&&e("span",{className:"rounded-md bg-raised px-1.5 py-0.5 font-normal text-[11px] text-dim",children:"当前设备"})]}),description:`最近活跃:${ft(c.lastSeen)} · 配对于 ${ft(c.created)}`,children:n(x,{size:"sm",variant:"danger-ghost",onClick:()=>t.onRevokeDevice(c),children:[e(pe,{className:"size-3.5"}),"吊销"]})},c.id))})}var Ee="浏览器设置(本地)",he="服务器设置(远程)",bn=[{value:"appearance",group:Ee,label:"外观",icon:e(ga,{}),render:()=>e(St,{})},{value:"notifications",group:Ee,label:"通知",icon:e(gt,{}),render:()=>e(Ct,{})},{value:"connections",group:Ee,label:"连接列表",icon:e($e,{}),render:(t)=>e(Tt,{...t})},{value:"shortcuts",group:Ee,label:"快捷键",icon:e(fa,{}),render:()=>e(Pt,{})},{value:"models",group:he,label:"模型",icon:e(fr,{}),render:(t)=>e(Ht,{...t})},{value:"plugins",group:he,label:"插件",icon:e(Mt,{}),render:(t)=>e(Jt,{conn:t.conn},t.server.id)},{value:"proxy",group:he,label:"代理",icon:e(Ge,{}),render:(t)=>e(Qt,{conn:t.conn},t.server.id)},{value:"database",group:he,label:"数据库",icon:e(hr,{}),render:(t)=>e(Et,{conn:t.conn,server:t.server})},{value:"server",group:he,label:"服务器",icon:e(zn,{}),render:(t)=>e(xn,{...t},t.server.id)},{value:"remote",group:he,label:"远程访问",icon:e(bt,{}),render:(t)=>e(gn,{conn:t.conn},t.server.id)},{value:"devices",group:he,label:"已配对设备",icon:e(Un,{}),render:(t)=>e(vn,{...t})}],_e=new WeakMap;function hn(t){return t==="search"?"database":t??"appearance"}function Lr(t){w();let[a,m]=r(()=>hn(t.initialTab)),[c,y]=r(t.initialTab===void 0),C=i(null),B=i(!1);o(()=>{if(y(t.initialTab===void 0),t.initialTab===void 0)B.current=!1;if(C.current?.scrollTo({top:0}),t.initialTab)m(hn(t.initialTab))},[t.initialTab]);let D=(u)=>{m(u),t.onTabChange?.(u)},k=ie(t.conn.state),[T,g]=r(()=>_e.get(t.conn)??null),M=[];for(let u of k.plugins){if(u.status!=="enabled")continue;for(let h of u.web??[]){let G=h.view;if(h.kind!=="tab"||!G)continue;let S=h.id==="settings"?u.id:h.id;M.push({value:S,group:he,label:h.title,icon:Ml(h.icon),render:(R)=>e(gs,{pluginID:u.id,viewID:G,connection:R.conn},`${u.id}-${h.id}`)})}}let P=[...bn.slice(0,5),...M,...bn.slice(5)];o(()=>{let u=_e.get(t.conn)??null;if(g(u),k.status!=="open"||k.server?.auth===!1)return;let h=!1;return t.conn.devices().then((G)=>{if(_e.set(t.conn,G),!h)g(G)}).catch(()=>{}),()=>{h=!0}},[t.conn,k.status,k.server?.auth]);let I=async(u)=>{if(!await Qe({title:`吊销设备「${u.name}」?`,description:"吊销后该设备的令牌立即失效,需重新配对才能连接此服务器。",action:"吊销",danger:!0}))return;try{await t.conn.revokeDevice(u.id),g((G)=>{let S=G?.filter((R)=>R.id!==u.id)??null;if(S)_e.set(t.conn,S);return S})}catch(G){z(G)}},O=P.find((u)=>u.value===a)??P[0],A={...t,devices:T,onRevokeDevice:(u)=>void I(u)};return e(ii,{className:"@container/settings",viewportClassName:"[scrollbar-gutter:stable]",viewportRef:C,children:n("div",{className:"mx-auto max-w-4xl animate-fade px-4 pt-3 pb-10 sm:px-6 md:pt-10 md:pb-16",children:[n("div",{className:"mb-6 flex min-h-10 items-center gap-1 md:mb-8",children:[!c&&e(V,{label:"返回设置分类",className:"-ml-2 size-10 rounded-full @min-[640px]/settings:hidden",onClick:()=>{if(B.current){B.current=!1,window.history.back();return}y(!0),t.onTabChange?.(void 0)},children:e(vt,{className:"size-5"})}),n("h1",{className:"min-w-0 truncate text-xl font-semibold tracking-tight md:font-serif md:text-[1.75rem] md:font-normal",children:[e("span",{className:d(!c&&"@max-[640px]/settings:hidden"),children:"设置"}),!c&&e("span",{className:"@min-[640px]/settings:hidden",children:O?.label})]})]}),c&&e("nav",{"aria-label":"设置分类",className:"space-y-6 @min-[640px]/settings:hidden",children:[Ee,he].map((u)=>n("section",{children:[e("h2",{className:l("settings.groupTitle","mb-2.5 px-0.5"),children:u}),e("div",{className:l("settings.groupBox"),children:P.filter((h)=>h.group===u).map((h)=>n("button",{type:"button",onClick:()=>{m(h.value),y(!1),B.current=t.onTabChange!==void 0,t.onTabChange?.(h.value,!0)},className:"flex min-h-13 w-full items-center gap-3 px-4 text-left text-[15px] text-ink transition-colors active:bg-raised [&_svg]:size-[18px] [&_svg]:shrink-0",children:[e("span",{className:"flex items-center text-dim",children:h.icon}),e("span",{className:"min-w-0 flex-1 truncate",children:h.label}),e(Nt,{className:"text-faint"})]},h.value))})]},u))}),n("div",{className:d("flex items-start",c&&"@max-[640px]/settings:hidden"),children:[e("aside",{className:"settings-rail shrink-0",children:e("nav",{"aria-label":"设置分类",className:"flex w-48 flex-col gap-1",children:P.map((u,h)=>{let G=u.value===a,S=u.group&&(h===0||P[h-1]?.group!==u.group);return n(Ke,{children:[S&&e("div",{className:d("px-2.5 pb-1 text-[11px] font-medium tracking-wide text-faint",h>0&&"mt-3.5"),children:u.group}),n("button",{type:"button",onClick:()=>D(u.value),className:l("sidebar.navItem","px-2.5 text-[13.5px]",G?"bg-raised font-medium text-ink shadow-[inset_0_1px_0_oklch(1_0_0/0.06)]":"text-dim hover:bg-raised/60 hover:text-ink"),children:[u.icon&&e("span",{className:d("relative flex items-center [&_svg]:size-4",G?"text-ink":"text-faint"),children:u.icon}),e("span",{className:"truncate",children:u.label})]})]},u.value)})})}),e("div",{className:"min-w-0 flex-1 animate-fade space-y-6 @container/panel",children:O?.render(A)},a)]})]})})}export{Lr as Settings};
Binary file
Binary file
@@ -1 +0,0 @@
1
- function C(t){return Math.abs(t=Math.round(t))>=1000000000000000000000?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function g(t,r){if(!isFinite(t)||t===0)return null;var i=(t=r?t.toExponential(r-1):t.toExponential()).indexOf("e"),e=t.slice(0,i);return[e.length>1?e[0]+e.slice(2):e,+t.slice(i+1)]}function An(t){return t=g(Math.abs(t)),t?t[1]:NaN}function G(t,r){return function(i,e){var o=i.length,a=[],c=0,u=t[0],M=0;while(o>0&&u>0){if(M+u+1>e)u=Math.max(1,e-M);if(a.push(i.substring(o-=u,o+u)),(M+=u+1)>e)break;u=t[c=(c+1)%t.length]}return a.reverse().join(r)}}function I(t){return function(r){return r.replace(/[0-9]/g,function(i){return t[+i]})}}var tt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cr(t){if(!(r=tt.exec(t)))throw Error("invalid format: "+t);var r;return new E({fill:r[1],align:r[2],sign:r[3],symbol:r[4],zero:r[5],width:r[6],comma:r[7],precision:r[8]&&r[8].slice(1),trim:r[9],type:r[10]})}Cr.prototype=E.prototype;function E(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}E.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function R(t){t:for(var r=t.length,i=1,e=-1,o;i<r;++i)switch(t[i]){case".":e=o=i;break;case"0":if(e===0)e=i;o=i;break;default:if(!+t[i])break t;if(e>0)e=0;break}return e>0?t.slice(0,e)+t.slice(o+1):t}var P;function X(t,r){var i=g(t,r);if(!i)return P=void 0,t.toPrecision(r);var e=i[0],o=i[1],a=o-(P=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,c=e.length;return a===c?e:a>c?e+Array(a-c+1).join("0"):a>0?e.slice(0,a)+"."+e.slice(a):"0."+Array(1-a).join("0")+g(t,Math.max(0,r+a-1))[0]}function F(t,r){var i=g(t,r);if(!i)return t+"";var e=i[0],o=i[1];return o<0?"0."+Array(-o).join("0")+e:e.length>o+1?e.slice(0,o+1)+"."+e.slice(o+1):e+Array(o-e.length+2).join("0")}var O={"%":(t,r)=>(t*100).toFixed(r),b:(t)=>Math.round(t).toString(2),c:(t)=>t+"",d:C,e:(t,r)=>t.toExponential(r),f:(t,r)=>t.toFixed(r),g:(t,r)=>t.toPrecision(r),o:(t)=>Math.round(t).toString(8),p:(t,r)=>F(t*100,r),r:F,s:X,X:(t)=>Math.round(t).toString(16).toUpperCase(),x:(t)=>Math.round(t).toString(16)};function N(t){return t}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function U(t){var r=t.grouping===void 0||t.thousands===void 0?N:G(K.call(t.grouping,Number),t.thousands+""),i=t.currency===void 0?"":t.currency[0]+"",e=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?N:I(K.call(t.numerals,String)),c=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",M=t.nan===void 0?"NaN":t.nan+"";function Z(f,p){f=Cr(f);var y=f.fill,w=f.align,s=f.sign,S=f.symbol,k=f.zero,L=f.width,T=f.comma,x=f.precision,q=f.trim,m=f.type;if(m==="n")T=!0,m="g";else if(!O[m])x===void 0&&(x=12),q=!0,m="g";if(k||y==="0"&&w==="=")k=!0,y="0",w="=";var W=(p&&p.prefix!==void 0?p.prefix:"")+(S==="$"?i:S==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),_=(S==="$"?e:/[%p]/.test(m)?c:"")+(p&&p.suffix!==void 0?p.suffix:""),B=O[m],v=/[defgprs%]/.test(m);x=x===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function H(n){var l=W,d=_,b,J,z;if(m==="c")d=B(n)+d,n="";else{n=+n;var A=n<0||1/n<0;if(n=isNaN(n)?M:B(Math.abs(n),x),q)n=R(n);if(A&&+n===0&&s!=="+")A=!1;if(l=(A?s==="("?s:u:s==="-"||s==="("?"":s)+l,d=(m==="s"&&!isNaN(n)&&P!==void 0?Q[8+P/3]:"")+d+(A&&s==="("?")":""),v){b=-1,J=n.length;while(++b<J)if(z=n.charCodeAt(b),48>z||z>57){d=(z===46?o+n.slice(b+1):n.slice(b))+d,n=n.slice(0,b);break}}}if(T&&!k)n=r(n,1/0);var j=l.length+n.length+d.length,h=j<L?Array(L-j+1).join(y):"";if(T&&k)n=r(h+n,h.length?L-d.length:1/0),h="";switch(w){case"<":n=l+n+d+h;break;case"=":n=l+h+n+d;break;case"^":n=h.slice(0,j=h.length>>1)+l+n+d+h.slice(j);break;default:n=h+l+n+d;break}return a(n)}return H.toString=function(){return f+""},H}function V(f,p){var y=Math.max(-8,Math.min(8,Math.floor(An(p)/3)))*3,w=Math.pow(10,-y),s=Z((f=Cr(f),f.type="f",f),{suffix:Q[8+y/3]});return function(S){return s(w*S)}}return{format:Z,formatPrefix:V}}var D,Rn,Ki;Y({thousands:",",grouping:[3],currency:["$",""]});function Y(t){return D=U(t),Rn=D.format,Ki=D.formatPrefix,D}export{An,Cr,Rn,Ki};
Binary file
Binary file
@@ -1,106 +0,0 @@
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
- ${o.x},${x+2}
9
- ${o.x},${x-2}
10
- ${o.x+Y},${x-d-2}
11
- ${o.x+Y+l+4},${x-d-2}
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+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
- .label${c} { fill: ${e.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${e.strokeWidth};}
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
- .branch-label${s} { fill: ${e.nodeBorder};}
18
- .commit${s} { stroke: ${e.nodeBorder}; }
19
- .commit-highlight${s} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
20
- .arrow${s} { stroke: ${e.nodeBorder}; }
21
- .commit-bullets { fill: ${e.nodeBorder}; }
22
- .commit-cherry-pick${s} { stroke: ${e.nodeBorder}; }
23
- ${ut(e)}`;else{let g=s%Be;n+=`
24
- .branch-label${s} { fill: ${e["gitBranchLabel"+g]}; }
25
- .commit${s} { stroke: ${e["git"+g]}; fill: ${e["git"+g]}; }
26
- .commit-highlight${s} { stroke: ${e["gitInv"+g]}; fill: ${e["gitInv"+g]}; }
27
- .arrow${s} { stroke: ${e["git"+g]}; }
28
- `}return n}else if(!$t.has(o)){let n="";for(let s=0;s<e.THEME_COLOR_LIMIT;s++)n+=`
29
- .branch-label${s} { fill: ${e.nodeBorder}; ${l?`font-weight:${e.noteFontWeight}`:""} }
30
- .commit${s} { stroke: ${e.nodeBorder}; }
31
- .commit-highlight${s} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
32
- .label${s} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${l?`font-weight:${e.noteFontWeight}`:""}}
33
- .arrow${s} { stroke: ${e.nodeBorder}; }
34
- .commit-bullets { fill: ${e.nodeBorder}; }
35
- .commit-cherry-pick${s} { stroke: ${e.nodeBorder}; }
36
- `;return n}else{let n="";for(let s=0;s<e.THEME_COLOR_LIMIT;s++)if(s===0)n+=`
37
- .branch-label${s} { fill: ${e.nodeBorder}; ${l?`font-weight:${e.noteFontWeight}`:""} }
38
- .commit${s} { stroke: ${e.nodeBorder}; }
39
- .commit-highlight${s} { stroke: ${e.nodeBorder}; fill: ${e.mainBkg}; }
40
- .label${s} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${l?`font-weight:${e.noteFontWeight}`:""} }
41
- .arrow${s} { stroke: ${e.nodeBorder}; }
42
- .commit-bullets { fill: ${e.nodeBorder}; }
43
- `;else{let g=s%i.length;n+=`
44
- .branch-label${s} { fill: ${e.nodeBorder}; ${l?`font-weight:${e.noteFontWeight}`:""} }
45
- .commit${s} { stroke: ${i[g]}; fill: ${i[g]}; }
46
- .commit-highlight${s} { stroke: ${i[g]}; fill: ${i[g]}; }
47
- .label${s} { fill: ${yt.has(o)?e.mainBkg:i[g]}; stroke: ${i[g]}; stroke-width: ${e.strokeWidth}; }
48
- .arrow${s} { stroke: ${i[g]}; }
49
- `}return n}},"genColor"),wt=t((e)=>`${Array.from({length:e.THEME_COLOR_LIMIT},(r,o)=>o).map((r)=>{let o=r%Be;return`
50
- .branch-label${r} { fill: ${e["gitBranchLabel"+o]}; }
51
- .commit${r} { stroke: ${e["git"+o]}; fill: ${e["git"+o]}; }
52
- .commit-highlight${r} { stroke: ${e["gitInv"+o]}; fill: ${e["gitInv"+o]}; }
53
- .label${r} { fill: ${e["git"+o]}; }
54
- .arrow${r} { stroke: ${e["git"+o]}; }
55
- `}).join(`
56
- `)}`,"normalTheme"),Bt=t((e)=>{let r=S(),{theme:o}=r,c=xt.has(o);return`
57
- .commit-id,
58
- .commit-msg,
59
- .branch-label {
60
- fill: lightgrey;
61
- color: lightgrey;
62
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
63
- font-family: var(--mermaid-font-family);
64
- }
65
-
66
- ${c?bt(e):wt(e)}
67
-
68
- .branch {
69
- stroke-width: ${e.strokeWidth};
70
- stroke: ${e.commitLineColor??e.lineColor};
71
- stroke-dasharray: ${c?"4 2":"2"};
72
- }
73
- .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${c?e.nodeBorder:e.commitLabelColor}; ${c?`font-weight:${e.noteFontWeight};`:""}}
74
- .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${c?"transparent":e.commitLabelBackground}; opacity: ${c?"":0.5}; }
75
- .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
76
- .tag-label-bkg { fill: ${c?e.mainBkg:e.tagLabelBackground}; stroke: ${c?e.nodeBorder:e.tagLabelBorder}; ${c?`filter:${e.dropShadow}`:""} }
77
- .tag-hole { fill: ${e.textColor}; }
78
-
79
- .commit-merge {
80
- stroke: ${c?e.mainBkg:e.primaryColor};
81
- fill: ${c?e.mainBkg:e.primaryColor};
82
- }
83
- .commit-reverse {
84
- stroke: ${c?e.mainBkg:e.primaryColor};
85
- fill: ${c?e.mainBkg:e.primaryColor};
86
- stroke-width: ${c?e.strokeWidth:3};
87
- }
88
- .commit-highlight-outer {
89
- }
90
- .commit-highlight-inner {
91
- stroke: ${c?e.mainBkg:e.primaryColor};
92
- fill: ${c?e.mainBkg:e.primaryColor};
93
- }
94
-
95
- .arrow {
96
- /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
97
- stroke-width: ${ke.has(o)?e.strokeWidth:8};
98
- stroke-linecap: round;
99
- fill: none
100
- }
101
- .gitTitleText {
102
- text-anchor: middle;
103
- font-size: 18px;
104
- fill: ${e.textColor};
105
- }
106
- `},"getStyles"),kt=Bt,Ot={parser:Ke,db:ue,renderer:ft,styles:kt};export{Ot as diagram};
Binary file
Binary file
@@ -1 +0,0 @@
1
- var n=Object.freeze(JSON.parse('{"displayName":"JSON with Comments","name":"jsonc","patterns":[{"include":"#value"}],"repository":{"array":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.array.begin.json.comments"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.array.end.json.comments"}},"name":"meta.structure.array.json.comments","patterns":[{"include":"#value"},{"match":",","name":"punctuation.separator.array.json.comments"},{"match":"[^]\\\\s]","name":"invalid.illegal.expected-array-separator.json.comments"}]},"comments":{"patterns":[{"begin":"/\\\\*\\\\*(?!/)","captures":{"0":{"name":"punctuation.definition.comment.json.comments"}},"end":"\\\\*/","name":"comment.block.documentation.json.comments"},{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.json.comments"}},"end":"\\\\*/","name":"comment.block.json.comments"},{"captures":{"1":{"name":"punctuation.definition.comment.json.comments"}},"match":"(//).*$\\\\n?","name":"comment.line.double-slash.js"}]},"constant":{"match":"\\\\b(?:true|false|null)\\\\b","name":"constant.language.json.comments"},"number":{"match":"-?(?:0|[1-9]\\\\d*)(?:(?:\\\\.\\\\d+)?(?:[Ee][-+]?\\\\d+)?)?","name":"constant.numeric.json.comments"},"object":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.json.comments"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.json.comments"}},"name":"meta.structure.dictionary.json.comments","patterns":[{"include":"#objectkey"},{"include":"#comments"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.dictionary.key-value.json.comments"}},"end":"(,)|(?=})","endCaptures":{"1":{"name":"punctuation.separator.dictionary.pair.json.comments"}},"name":"meta.structure.dictionary.value.json.comments","patterns":[{"include":"#value"},{"match":"[^,\\\\s]","name":"invalid.illegal.expected-dictionary-separator.json.comments"}]},{"match":"[^}\\\\s]","name":"invalid.illegal.expected-dictionary-separator.json.comments"}]},"objectkey":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.support.type.property-name.begin.json.comments"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.support.type.property-name.end.json.comments"}},"name":"string.json.comments support.type.property-name.json.comments","patterns":[{"include":"#stringcontent"}]},"string":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.json.comments"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.json.comments"}},"name":"string.quoted.double.json.comments","patterns":[{"include":"#stringcontent"}]},"stringcontent":{"patterns":[{"match":"\\\\\\\\(?:[\\"/\\\\\\\\bfnrt]|u\\\\h{4})","name":"constant.character.escape.json.comments"},{"match":"\\\\\\\\.","name":"invalid.illegal.unrecognized-string-escape.json.comments"}]},"value":{"patterns":[{"include":"#constant"},{"include":"#number"},{"include":"#string"},{"include":"#array"},{"include":"#object"},{"include":"#comments"}]}},"scopeName":"source.json.comments"}')),e=[n];export{e as default};
Binary file
Binary file
@@ -1 +0,0 @@
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