@bkm016/basalt 0.1.37 → 0.1.38

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 (898) hide show
  1. package/chunk-02kyx0dt.js +3 -0
  2. package/chunk-19nje7ny.js +5 -0
  3. package/chunk-1rt7fvft.js +51 -0
  4. package/chunk-23qfxx3v.js +3 -0
  5. package/chunk-28dpfw91.js +20 -0
  6. package/chunk-2bz3h7k7.js +18 -0
  7. package/chunk-2etdp9zt.js +3 -0
  8. package/chunk-3bc88p88.js +2 -0
  9. package/chunk-3bqs901a.js +3 -0
  10. package/chunk-4kg028qe.js +3 -0
  11. package/chunk-4ry04733.js +2 -0
  12. package/chunk-4zvzk6m5.js +25 -0
  13. package/chunk-5ngmwd2s.js +3 -0
  14. package/chunk-5yzts6r0.js +3 -0
  15. package/chunk-6bvjnr88.js +3 -0
  16. package/chunk-76jjaj1p.js +7 -0
  17. package/chunk-7ph88zkj.js +3 -0
  18. package/chunk-7t89zqqx.js +8 -0
  19. package/chunk-80vdhw6b.js +2 -0
  20. package/chunk-89aqq5v0.js +59 -0
  21. package/chunk-8bcc3rqc.js +2 -0
  22. package/chunk-97531m3c.js +2 -0
  23. package/chunk-9b4ssdy4.js +3 -0
  24. package/chunk-9map5c1b.js +12 -0
  25. package/chunk-a0ycrvgz.js +2 -0
  26. package/chunk-ah2ttnaa.js +2 -0
  27. package/chunk-awe58cxg.js +3175 -0
  28. package/chunk-b3ss17r8.js +547 -0
  29. package/chunk-b5ph3ffy.js +39 -0
  30. package/chunk-cz9r99b6.js +2 -0
  31. package/chunk-d57kcznk.js +16 -0
  32. package/chunk-etf8mj2z.js +2 -0
  33. package/chunk-fkgx9eab.js +2 -0
  34. package/chunk-fmvs5wd0.js +11 -0
  35. package/chunk-fpksd95h.js +3 -0
  36. package/chunk-hj1zcq3p.js +13 -0
  37. package/chunk-jaat2z8t.js +117 -0
  38. package/chunk-jkc887x8.js +2 -0
  39. package/chunk-jnas3anm.js +3 -0
  40. package/chunk-k3p05x7q.js +2 -0
  41. package/chunk-k6fqtjt8.js +3 -0
  42. package/chunk-kh4b25x0.js +12 -0
  43. package/chunk-kn8p9hm4.js +3 -0
  44. package/chunk-kxznfjhk.js +2 -0
  45. package/chunk-ma4nhnnj.js +3 -0
  46. package/chunk-n09zsaws.js +60 -0
  47. package/chunk-nb7c0e4a.js +10 -0
  48. package/chunk-pvbaf50c.js +7 -0
  49. package/chunk-pzg6f8rv.js +3 -0
  50. package/chunk-q7scf6rq.js +5 -0
  51. package/chunk-qc0d97yy.js +9 -0
  52. package/chunk-qn316bye.js +3 -0
  53. package/chunk-rapgtezp.js +3 -0
  54. package/chunk-rbz68jdh.js +2 -0
  55. package/chunk-rkq3zqph.js +3 -0
  56. package/chunk-rva3kxc4.js +3 -0
  57. package/chunk-s8ce8wwb.js +5 -0
  58. package/chunk-srmxyfvj.js +4 -0
  59. package/chunk-ss48r7hh.js +2 -0
  60. package/chunk-trf8d8md.js +2 -0
  61. package/chunk-v312dzv1.js +2 -0
  62. package/chunk-v9pc3ad7.js +3 -0
  63. package/chunk-vq3b921g.js +2 -0
  64. package/chunk-w8arnzsm.js +10 -0
  65. package/chunk-wa3w6q66.js +2 -0
  66. package/chunk-wyaep3eb.js +103 -0
  67. package/chunk-x31xqemq.js +3 -0
  68. package/chunk-x4nt43pv.js +2 -0
  69. package/chunk-xjr4j102.js +31 -0
  70. package/chunk-xtzxv389.js +3 -0
  71. package/chunk-y91ea95f.js +7 -0
  72. package/chunk-yyeq63ns.js +2 -0
  73. package/chunk-z1hbxv39.js +2 -0
  74. package/chunk-zej3kgxg.js +5 -0
  75. package/chunk-zkhn196x.js +25 -0
  76. package/chunk-zztar24h.js +8 -0
  77. package/compiled.js +9 -9
  78. package/package.json +1 -1
  79. package/ui-test-worker.js +34 -33
  80. package/web/chunk-0qmwgbg8.js +1 -0
  81. package/web/chunk-0qmwgbg8.js.br +0 -0
  82. package/web/chunk-0qmwgbg8.js.gz +0 -0
  83. package/web/chunk-0vavwwh2.js +2 -0
  84. package/web/chunk-0vavwwh2.js.br +0 -0
  85. package/web/chunk-0vavwwh2.js.gz +0 -0
  86. package/web/chunk-0vmbj6hc.js +89 -0
  87. package/web/chunk-0vmbj6hc.js.br +0 -0
  88. package/web/chunk-0vmbj6hc.js.gz +0 -0
  89. package/web/chunk-17qjx34e.js +1 -0
  90. package/web/chunk-17qjx34e.js.br +0 -0
  91. package/web/chunk-17qjx34e.js.gz +0 -0
  92. package/web/chunk-1vewct29.js +78 -0
  93. package/web/chunk-1vewct29.js.br +0 -0
  94. package/web/chunk-1vewct29.js.gz +0 -0
  95. package/web/chunk-2hz3atj2.js +1 -0
  96. package/web/chunk-2hz3atj2.js.br +0 -0
  97. package/web/chunk-2hz3atj2.js.gz +0 -0
  98. package/web/chunk-3c66z204.js +1 -0
  99. package/web/chunk-3c66z204.js.br +0 -0
  100. package/web/chunk-3c66z204.js.gz +0 -0
  101. package/web/chunk-3ctk7p8b.js +200 -0
  102. package/web/chunk-3ctk7p8b.js.br +0 -0
  103. package/web/chunk-3ctk7p8b.js.gz +0 -0
  104. package/web/chunk-3rnbw3ds.js +2 -0
  105. package/web/chunk-3rnbw3ds.js.br +0 -0
  106. package/web/chunk-3rnbw3ds.js.gz +0 -0
  107. package/web/chunk-3t6c1rn7.js +2 -0
  108. package/web/chunk-3t6c1rn7.js.br +0 -0
  109. package/web/chunk-3t6c1rn7.js.gz +0 -0
  110. package/web/chunk-48f75wpj.js +1 -0
  111. package/web/chunk-48f75wpj.js.br +0 -0
  112. package/web/chunk-48f75wpj.js.gz +0 -0
  113. package/web/chunk-4sr7g3z6.js +70 -0
  114. package/web/chunk-4sr7g3z6.js.br +0 -0
  115. package/web/chunk-4sr7g3z6.js.gz +0 -0
  116. package/web/chunk-54kxhs8a.js +1 -0
  117. package/web/chunk-54kxhs8a.js.br +0 -0
  118. package/web/chunk-54kxhs8a.js.gz +0 -0
  119. package/web/chunk-5cbw7v9g.js +324 -0
  120. package/web/chunk-5cbw7v9g.js.br +0 -0
  121. package/web/chunk-5cbw7v9g.js.gz +0 -0
  122. package/web/chunk-5kxhdpsw.js +99 -0
  123. package/web/chunk-5kxhdpsw.js.br +0 -0
  124. package/web/chunk-5kxhdpsw.js.gz +0 -0
  125. package/web/chunk-5s16b1h5.js +2 -0
  126. package/web/chunk-5s16b1h5.js.br +0 -0
  127. package/web/chunk-5s16b1h5.js.gz +0 -0
  128. package/web/chunk-5z2f4vfh.js +1 -0
  129. package/web/chunk-5z2f4vfh.js.br +0 -0
  130. package/web/chunk-5z2f4vfh.js.gz +0 -0
  131. package/web/chunk-664zwasq.js +217 -0
  132. package/web/chunk-664zwasq.js.br +0 -0
  133. package/web/chunk-664zwasq.js.gz +0 -0
  134. package/web/chunk-6hgxmv17.js +1 -0
  135. package/web/chunk-6hgxmv17.js.br +0 -0
  136. package/web/chunk-6hgxmv17.js.gz +0 -0
  137. package/web/chunk-6wesgn4j.js +332 -0
  138. package/web/chunk-6wesgn4j.js.br +0 -0
  139. package/web/chunk-6wesgn4j.js.gz +0 -0
  140. package/web/chunk-6xnzhe0e.js +12 -0
  141. package/web/chunk-6xnzhe0e.js.br +0 -0
  142. package/web/chunk-6xnzhe0e.js.gz +0 -0
  143. package/web/chunk-73effb3e.js +1 -0
  144. package/web/chunk-73effb3e.js.br +0 -0
  145. package/web/chunk-73effb3e.js.gz +0 -0
  146. package/web/chunk-744jv40n.js +7 -0
  147. package/web/chunk-744jv40n.js.br +0 -0
  148. package/web/chunk-744jv40n.js.gz +0 -0
  149. package/web/chunk-74x21fpx.js +23 -0
  150. package/web/chunk-74x21fpx.js.br +0 -0
  151. package/web/chunk-74x21fpx.js.gz +0 -0
  152. package/web/chunk-75jp6b07.js +1 -0
  153. package/web/chunk-75jp6b07.js.br +0 -0
  154. package/web/chunk-75jp6b07.js.gz +0 -0
  155. package/web/chunk-776d411a.js +1143 -0
  156. package/web/chunk-776d411a.js.br +0 -0
  157. package/web/chunk-776d411a.js.gz +0 -0
  158. package/web/chunk-77fdf0t8.js +1 -0
  159. package/web/chunk-77fdf0t8.js.br +0 -0
  160. package/web/chunk-77fdf0t8.js.gz +0 -0
  161. package/web/chunk-85cyf9df.js +1 -0
  162. package/web/chunk-85cyf9df.js.br +0 -0
  163. package/web/chunk-85cyf9df.js.gz +0 -0
  164. package/web/chunk-8kxc78xp.js +4 -0
  165. package/web/chunk-8kxc78xp.js.br +0 -0
  166. package/web/chunk-8kxc78xp.js.gz +0 -0
  167. package/web/chunk-9j7v0e4v.js +2 -0
  168. package/web/chunk-9j7v0e4v.js.br +0 -0
  169. package/web/chunk-9j7v0e4v.js.gz +0 -0
  170. package/web/chunk-9kfxbebp.js +2 -0
  171. package/web/chunk-9kfxbebp.js.br +1 -0
  172. package/web/chunk-9kfxbebp.js.gz +0 -0
  173. package/web/chunk-b1x8wmyp.js +1 -0
  174. package/web/chunk-b1x8wmyp.js.br +2 -0
  175. package/web/chunk-b1x8wmyp.js.gz +0 -0
  176. package/web/chunk-bpy0qc5f.js +1 -0
  177. package/web/chunk-bpy0qc5f.js.br +0 -0
  178. package/web/chunk-bpy0qc5f.js.gz +0 -0
  179. package/web/chunk-brsvdef4.js +1 -0
  180. package/web/chunk-brsvdef4.js.br +0 -0
  181. package/web/chunk-brsvdef4.js.gz +0 -0
  182. package/web/chunk-bs8vnwtv.js +106 -0
  183. package/web/chunk-bs8vnwtv.js.br +0 -0
  184. package/web/chunk-bs8vnwtv.js.gz +0 -0
  185. package/web/chunk-cd3hhgn9.js +2 -0
  186. package/web/chunk-cd3hhgn9.js.br +0 -0
  187. package/web/chunk-cd3hhgn9.js.gz +0 -0
  188. package/web/chunk-ckpx6ky8.js +2 -0
  189. package/web/chunk-ckpx6ky8.js.br +0 -0
  190. package/web/chunk-ckpx6ky8.js.gz +0 -0
  191. package/web/chunk-cn4846p5.js +140 -0
  192. package/web/chunk-cn4846p5.js.br +0 -0
  193. package/web/chunk-cn4846p5.js.gz +0 -0
  194. package/web/chunk-cngcze57.js +84 -0
  195. package/web/chunk-cngcze57.js.br +0 -0
  196. package/web/chunk-cngcze57.js.gz +0 -0
  197. package/web/chunk-csg9anab.js +62 -0
  198. package/web/chunk-csg9anab.js.br +0 -0
  199. package/web/chunk-csg9anab.js.gz +0 -0
  200. package/web/chunk-ct98jt0b.js +2 -0
  201. package/web/chunk-ct98jt0b.js.br +0 -0
  202. package/web/chunk-ct98jt0b.js.gz +0 -0
  203. package/web/chunk-d67p0nr5.js +8 -0
  204. package/web/chunk-d67p0nr5.js.br +0 -0
  205. package/web/chunk-d67p0nr5.js.gz +0 -0
  206. package/web/chunk-dqynqkew.js +3 -0
  207. package/web/chunk-dqynqkew.js.br +0 -0
  208. package/web/chunk-dqynqkew.js.gz +0 -0
  209. package/web/chunk-drn8wj2p.js +41 -0
  210. package/web/chunk-drn8wj2p.js.br +0 -0
  211. package/web/chunk-drn8wj2p.js.gz +0 -0
  212. package/web/chunk-e0r89rgm.js +2 -0
  213. package/web/chunk-e0r89rgm.js.br +0 -0
  214. package/web/chunk-e0r89rgm.js.gz +0 -0
  215. package/web/chunk-e6ffgm2z.js +89 -0
  216. package/web/chunk-e6ffgm2z.js.br +0 -0
  217. package/web/chunk-e6ffgm2z.js.gz +0 -0
  218. package/web/chunk-ebphre6k.js +292 -0
  219. package/web/chunk-ebphre6k.js.br +0 -0
  220. package/web/chunk-ebphre6k.js.gz +0 -0
  221. package/web/chunk-edeebkv0.js +2 -0
  222. package/web/chunk-edeebkv0.js.br +0 -0
  223. package/web/chunk-edeebkv0.js.gz +0 -0
  224. package/web/chunk-edkvcg8g.js +1 -0
  225. package/web/chunk-edkvcg8g.js.br +0 -0
  226. package/web/chunk-edkvcg8g.js.gz +0 -0
  227. package/web/chunk-evt920fg.js +142 -0
  228. package/web/chunk-evt920fg.js.br +0 -0
  229. package/web/chunk-evt920fg.js.gz +0 -0
  230. package/web/chunk-ezehzx5e.js +1 -0
  231. package/web/chunk-ezehzx5e.js.br +2 -0
  232. package/web/chunk-ezehzx5e.js.gz +0 -0
  233. package/web/chunk-f020aqdg.js +38 -0
  234. package/web/chunk-f020aqdg.js.br +0 -0
  235. package/web/chunk-f020aqdg.js.gz +0 -0
  236. package/web/chunk-f5a5x6be.js +1 -0
  237. package/web/chunk-f5a5x6be.js.br +0 -0
  238. package/web/chunk-f5a5x6be.js.gz +0 -0
  239. package/web/chunk-fkmw2m49.js +1 -0
  240. package/web/chunk-fkmw2m49.js.br +0 -0
  241. package/web/chunk-fkmw2m49.js.gz +0 -0
  242. package/web/chunk-fn0hha9d.js +2 -0
  243. package/web/chunk-fn0hha9d.js.br +0 -0
  244. package/web/chunk-fn0hha9d.js.gz +0 -0
  245. package/web/chunk-fp5ny5dy.js +4 -0
  246. package/web/chunk-fp5ny5dy.js.br +0 -0
  247. package/web/chunk-fp5ny5dy.js.gz +0 -0
  248. package/web/chunk-fwckng4e.js +34 -0
  249. package/web/chunk-fwckng4e.js.br +0 -0
  250. package/web/chunk-fwckng4e.js.gz +0 -0
  251. package/web/chunk-g7yyp4ks.js +2 -0
  252. package/web/chunk-g7yyp4ks.js.br +0 -0
  253. package/web/chunk-g7yyp4ks.js.gz +0 -0
  254. package/web/chunk-gbhkp5f4.js +1 -0
  255. package/web/chunk-gbhkp5f4.js.br +2 -0
  256. package/web/chunk-gbhkp5f4.js.gz +0 -0
  257. package/web/chunk-ghz85g7f.js +1 -0
  258. package/web/chunk-ghz85g7f.js.br +0 -0
  259. package/web/chunk-ghz85g7f.js.gz +0 -0
  260. package/web/chunk-gpjdkgxz.js +2 -0
  261. package/web/chunk-gpjdkgxz.js.br +0 -0
  262. package/web/chunk-gpjdkgxz.js.gz +0 -0
  263. package/web/chunk-h3d8gb7m.js +1 -0
  264. package/web/chunk-h3d8gb7m.js.br +0 -0
  265. package/web/chunk-h3d8gb7m.js.gz +0 -0
  266. package/web/chunk-h47k4j7f.js +1 -0
  267. package/web/chunk-h47k4j7f.js.br +0 -0
  268. package/web/chunk-h47k4j7f.js.gz +0 -0
  269. package/web/chunk-h702ns45.js +1 -0
  270. package/web/chunk-h702ns45.js.br +0 -0
  271. package/web/chunk-h702ns45.js.gz +0 -0
  272. package/web/chunk-j3tjbge9.js +1 -0
  273. package/web/chunk-j3tjbge9.js.br +0 -0
  274. package/web/chunk-j3tjbge9.js.gz +0 -0
  275. package/web/chunk-j91f1v68.js +2 -0
  276. package/web/chunk-j91f1v68.js.br +0 -0
  277. package/web/chunk-j91f1v68.js.gz +0 -0
  278. package/web/chunk-jd82z5gg.js +1 -0
  279. package/web/chunk-jd82z5gg.js.br +0 -0
  280. package/web/chunk-jd82z5gg.js.gz +0 -0
  281. package/web/chunk-jmksme0n.js +2 -0
  282. package/web/chunk-jmksme0n.js.br +0 -0
  283. package/web/chunk-jmksme0n.js.gz +0 -0
  284. package/web/chunk-jz0wjyzp.js +7 -0
  285. package/web/chunk-jz0wjyzp.js.br +0 -0
  286. package/web/chunk-jz0wjyzp.js.gz +0 -0
  287. package/web/chunk-ka8jrbr5.js +55 -0
  288. package/web/chunk-ka8jrbr5.js.br +0 -0
  289. package/web/chunk-ka8jrbr5.js.gz +0 -0
  290. package/web/chunk-m770h1wv.js +2 -0
  291. package/web/chunk-m770h1wv.js.br +0 -0
  292. package/web/chunk-m770h1wv.js.gz +0 -0
  293. package/web/chunk-mfsdyw6v.js +2 -0
  294. package/web/chunk-mfsdyw6v.js.br +0 -0
  295. package/web/chunk-mfsdyw6v.js.gz +0 -0
  296. package/web/chunk-mvmpr9bn.js +1 -0
  297. package/web/chunk-mvmpr9bn.js.br +0 -0
  298. package/web/chunk-mvmpr9bn.js.gz +0 -0
  299. package/web/chunk-my4zxtxx.js +2 -0
  300. package/web/chunk-my4zxtxx.js.br +0 -0
  301. package/web/chunk-my4zxtxx.js.gz +0 -0
  302. package/web/chunk-n7nx158t.js +1 -0
  303. package/web/chunk-n7nx158t.js.br +0 -0
  304. package/web/chunk-n7nx158t.js.gz +0 -0
  305. package/web/chunk-na88frn3.js +1 -0
  306. package/web/chunk-na88frn3.js.br +0 -0
  307. package/web/chunk-na88frn3.js.gz +0 -0
  308. package/web/chunk-nbncq48b.js +1 -0
  309. package/web/chunk-nbncq48b.js.br +0 -0
  310. package/web/chunk-nbncq48b.js.gz +0 -0
  311. package/web/chunk-nyydkfyf.js +1 -0
  312. package/web/chunk-nyydkfyf.js.br +0 -0
  313. package/web/chunk-nyydkfyf.js.gz +0 -0
  314. package/web/chunk-nz06k08x.js +39 -0
  315. package/web/chunk-nz06k08x.js.br +0 -0
  316. package/web/chunk-nz06k08x.js.gz +0 -0
  317. package/web/chunk-p62swsj6.js +139 -0
  318. package/web/chunk-p62swsj6.js.br +0 -0
  319. package/web/chunk-p62swsj6.js.gz +0 -0
  320. package/web/chunk-pajjgx94.js +169 -0
  321. package/web/chunk-pajjgx94.js.br +0 -0
  322. package/web/chunk-pajjgx94.js.gz +0 -0
  323. package/web/chunk-phdpzq61.js +370 -0
  324. package/web/chunk-phdpzq61.js.br +0 -0
  325. package/web/chunk-phdpzq61.js.gz +0 -0
  326. package/web/chunk-pj9r4ha1.js +2 -0
  327. package/web/chunk-pj9r4ha1.js.br +0 -0
  328. package/web/chunk-pj9r4ha1.js.gz +0 -0
  329. package/web/chunk-pqvre6md.js +24 -0
  330. package/web/chunk-pqvre6md.js.br +0 -0
  331. package/web/chunk-pqvre6md.js.gz +0 -0
  332. package/web/chunk-pvq527d1.js +303 -0
  333. package/web/chunk-pvq527d1.js.br +0 -0
  334. package/web/chunk-pvq527d1.js.gz +0 -0
  335. package/web/chunk-pzbqpfpj.js +24 -0
  336. package/web/chunk-pzbqpfpj.js.br +0 -0
  337. package/web/chunk-pzbqpfpj.js.gz +0 -0
  338. package/web/chunk-q990zhg4.js +1 -0
  339. package/web/chunk-q990zhg4.js.br +0 -0
  340. package/web/chunk-q990zhg4.js.gz +0 -0
  341. package/web/chunk-qed51xj9.js +2 -0
  342. package/web/chunk-qed51xj9.js.br +0 -0
  343. package/web/chunk-qed51xj9.js.gz +0 -0
  344. package/web/chunk-r9m8jh7x.js +2 -0
  345. package/web/chunk-r9m8jh7x.js.br +0 -0
  346. package/web/chunk-r9m8jh7x.js.gz +0 -0
  347. package/web/chunk-rjax57j0.js +40 -0
  348. package/web/chunk-rjax57j0.js.br +0 -0
  349. package/web/chunk-rjax57j0.js.gz +0 -0
  350. package/web/chunk-s00tks2b.js +98 -0
  351. package/web/chunk-s00tks2b.js.br +0 -0
  352. package/web/chunk-s00tks2b.js.gz +0 -0
  353. package/web/chunk-s3symq0h.js +1 -0
  354. package/web/chunk-s3symq0h.js.br +0 -0
  355. package/web/chunk-s3symq0h.js.gz +0 -0
  356. package/web/chunk-sh2d0212.js +1 -0
  357. package/web/chunk-sh2d0212.js.br +0 -0
  358. package/web/chunk-sh2d0212.js.gz +0 -0
  359. package/web/chunk-t8ksmf3z.js +2 -0
  360. package/web/chunk-t8ksmf3z.js.br +0 -0
  361. package/web/chunk-t8ksmf3z.js.gz +0 -0
  362. package/web/chunk-te4ab7ee.css +1 -0
  363. package/web/chunk-te4ab7ee.css.br +0 -0
  364. package/web/chunk-te4ab7ee.css.gz +0 -0
  365. package/web/chunk-tjhxbt15.js +1 -0
  366. package/web/chunk-tjhxbt15.js.br +0 -0
  367. package/web/chunk-tjhxbt15.js.gz +0 -0
  368. package/web/chunk-tqr5maem.js +291 -0
  369. package/web/chunk-tqr5maem.js.br +0 -0
  370. package/web/chunk-tqr5maem.js.gz +0 -0
  371. package/web/chunk-tt3vgkx6.js +7 -0
  372. package/web/chunk-tt3vgkx6.js.br +0 -0
  373. package/web/chunk-tt3vgkx6.js.gz +0 -0
  374. package/web/chunk-v56w6y8n.js +2 -0
  375. package/web/chunk-v56w6y8n.js.br +0 -0
  376. package/web/chunk-v56w6y8n.js.gz +0 -0
  377. package/web/chunk-v65dz9y5.js +1 -0
  378. package/web/chunk-v65dz9y5.js.br +0 -0
  379. package/web/chunk-v65dz9y5.js.gz +0 -0
  380. package/web/chunk-vaspzebe.js +1 -0
  381. package/web/chunk-vaspzebe.js.br +0 -0
  382. package/web/chunk-vaspzebe.js.gz +0 -0
  383. package/web/chunk-ve5dccwy.js +1 -0
  384. package/web/chunk-ve5dccwy.js.br +0 -0
  385. package/web/chunk-ve5dccwy.js.gz +0 -0
  386. package/web/chunk-vsxzq4nb.js +1 -0
  387. package/web/chunk-vsxzq4nb.js.br +0 -0
  388. package/web/chunk-vsxzq4nb.js.gz +0 -0
  389. package/web/chunk-vvn66f2x.js +16 -0
  390. package/web/chunk-vvn66f2x.js.br +0 -0
  391. package/web/chunk-vvn66f2x.js.gz +0 -0
  392. package/web/chunk-vvqey05d.js +1 -0
  393. package/web/chunk-vvqey05d.js.br +2 -0
  394. package/web/chunk-vvqey05d.js.gz +0 -0
  395. package/web/chunk-w6ajcbm8.js +1 -0
  396. package/web/chunk-w6ajcbm8.js.br +0 -0
  397. package/web/chunk-w6ajcbm8.js.gz +0 -0
  398. package/web/chunk-w6p6dy3k.js +2 -0
  399. package/web/chunk-w6p6dy3k.js.br +0 -0
  400. package/web/chunk-w6p6dy3k.js.gz +0 -0
  401. package/web/chunk-wy1k8vz2.js +1 -0
  402. package/web/chunk-wy1k8vz2.js.br +0 -0
  403. package/web/chunk-wy1k8vz2.js.gz +0 -0
  404. package/web/chunk-wzgv2gv2.js +120 -0
  405. package/web/chunk-wzgv2gv2.js.br +0 -0
  406. package/web/chunk-wzgv2gv2.js.gz +0 -0
  407. package/web/chunk-x78hqhxv.js +1 -0
  408. package/web/chunk-x78hqhxv.js.br +2 -0
  409. package/web/chunk-x78hqhxv.js.gz +0 -0
  410. package/web/chunk-x7mw8704.js +36 -0
  411. package/web/chunk-x7mw8704.js.br +0 -0
  412. package/web/chunk-x7mw8704.js.gz +0 -0
  413. package/web/chunk-x85z35es.js +2 -0
  414. package/web/chunk-x85z35es.js.br +0 -0
  415. package/web/chunk-x85z35es.js.gz +0 -0
  416. package/web/chunk-xbrhmxd8.js +214 -0
  417. package/web/chunk-xbrhmxd8.js.br +0 -0
  418. package/web/chunk-xbrhmxd8.js.gz +0 -0
  419. package/web/chunk-xjpqg11m.js +1 -0
  420. package/web/chunk-xjpqg11m.js.br +0 -0
  421. package/web/chunk-xjpqg11m.js.gz +0 -0
  422. package/web/chunk-y2x9v76f.js +2 -0
  423. package/web/chunk-y2x9v76f.js.br +0 -0
  424. package/web/chunk-y2x9v76f.js.gz +0 -0
  425. package/web/chunk-y48mj5d7.js +1 -0
  426. package/web/chunk-y48mj5d7.js.br +0 -0
  427. package/web/chunk-y48mj5d7.js.gz +0 -0
  428. package/web/chunk-ykc1rttf.js +1 -0
  429. package/web/chunk-ykc1rttf.js.br +0 -0
  430. package/web/chunk-ykc1rttf.js.gz +0 -0
  431. package/web/chunk-yyw0rdyy.js +1 -0
  432. package/web/chunk-yyw0rdyy.js.br +0 -0
  433. package/web/chunk-yyw0rdyy.js.gz +0 -0
  434. package/web/chunk-yzyrc28t.js +30 -0
  435. package/web/chunk-yzyrc28t.js.br +0 -0
  436. package/web/chunk-yzyrc28t.js.gz +0 -0
  437. package/web/chunk-z7j6wnn3.js +2 -0
  438. package/web/chunk-z7j6wnn3.js.br +0 -0
  439. package/web/chunk-z7j6wnn3.js.gz +0 -0
  440. package/web/chunk-z8fgdsx5.js +1 -0
  441. package/web/chunk-z8fgdsx5.js.br +0 -0
  442. package/web/chunk-z8fgdsx5.js.gz +0 -0
  443. package/web/index.html +3 -13
  444. package/web/index.html.br +0 -0
  445. package/web/index.html.gz +0 -0
  446. package/web/manifest-g1mfa85c.webmanifest +35 -0
  447. package/web/manifest-g1mfa85c.webmanifest.br +0 -0
  448. package/web/manifest-g1mfa85c.webmanifest.gz +0 -0
  449. package/web/manifest.webmanifest +2 -2
  450. package/web/manifest.webmanifest.br +0 -0
  451. package/web/manifest.webmanifest.gz +0 -0
  452. package/web/sw.js +33 -16
  453. package/web/sw.js.br +0 -0
  454. package/web/sw.js.gz +0 -0
  455. package/worker.js +1 -1
  456. package/chunk-1xam7mw7.js +0 -2
  457. package/chunk-2df7yf47.js +0 -3
  458. package/chunk-3a3ta83t.js +0 -12
  459. package/chunk-3bb12192.js +0 -39
  460. package/chunk-3j24he2c.js +0 -25
  461. package/chunk-3yyt010j.js +0 -2
  462. package/chunk-4hrkad68.js +0 -2
  463. package/chunk-4kw8vvae.js +0 -3
  464. package/chunk-5xj2kq5h.js +0 -3
  465. package/chunk-6hajdf5x.js +0 -2
  466. package/chunk-6rkwh4w5.js +0 -3
  467. package/chunk-7ygt906s.js +0 -2
  468. package/chunk-8jf1kd0m.js +0 -3
  469. package/chunk-95npkaze.js +0 -5
  470. package/chunk-9yqn7drg.js +0 -3
  471. package/chunk-9zwy8ypg.js +0 -117
  472. package/chunk-ad5asgnr.js +0 -2
  473. package/chunk-akdav0ay.js +0 -3
  474. package/chunk-arzyd0f7.js +0 -8
  475. package/chunk-avrzwnbk.js +0 -2
  476. package/chunk-b3fwt4jy.js +0 -2
  477. package/chunk-b41a7yc5.js +0 -7
  478. package/chunk-be4p5qak.js +0 -103
  479. package/chunk-br7606yh.js +0 -7
  480. package/chunk-brgcdzj9.js +0 -60
  481. package/chunk-bvh3ccr2.js +0 -3
  482. package/chunk-c0htgv5v.js +0 -3
  483. package/chunk-ch8bhqmp.js +0 -2
  484. package/chunk-d2t7tx0d.js +0 -16
  485. package/chunk-d5qsqt4v.js +0 -2
  486. package/chunk-d5sxt7bc.js +0 -13
  487. package/chunk-dz8jyvp4.js +0 -547
  488. package/chunk-e431qjnf.js +0 -3
  489. package/chunk-e69h0e2f.js +0 -2
  490. package/chunk-e9rp422g.js +0 -9
  491. package/chunk-etvf4tkk.js +0 -3
  492. package/chunk-ewr4r5yx.js +0 -18
  493. package/chunk-ezm2t479.js +0 -11
  494. package/chunk-f5prr1x7.js +0 -59
  495. package/chunk-fxs37w3f.js +0 -10
  496. package/chunk-g27efryh.js +0 -20
  497. package/chunk-g8zcrfzr.js +0 -2
  498. package/chunk-gde46g2m.js +0 -2
  499. package/chunk-gnf6jvxv.js +0 -25
  500. package/chunk-gswcr5j6.js +0 -2
  501. package/chunk-h22spg1q.js +0 -3
  502. package/chunk-h2br80f8.js +0 -3
  503. package/chunk-he09tqj5.js +0 -2
  504. package/chunk-hkx2cpc5.js +0 -3
  505. package/chunk-hwkmxr9a.js +0 -5
  506. package/chunk-j9jg8h44.js +0 -2
  507. package/chunk-jhgf0vpr.js +0 -5
  508. package/chunk-k3ndw7d4.js +0 -3
  509. package/chunk-k8mc2tn3.js +0 -3
  510. package/chunk-mbf7201c.js +0 -5
  511. package/chunk-mzhebc7e.js +0 -7
  512. package/chunk-n1c3t0nj.js +0 -2
  513. package/chunk-nmpqx2sh.js +0 -3
  514. package/chunk-p0dacr9z.js +0 -12
  515. package/chunk-q8gv26ze.js +0 -3
  516. package/chunk-qj6bf18b.js +0 -3
  517. package/chunk-rxq62z5t.js +0 -3
  518. package/chunk-s27309w7.js +0 -3
  519. package/chunk-sjwsj82f.js +0 -10
  520. package/chunk-tadyy9xh.js +0 -51
  521. package/chunk-vgvp6cpk.js +0 -2
  522. package/chunk-vj5p29fr.js +0 -2
  523. package/chunk-wbpt03pe.js +0 -31
  524. package/chunk-wgjt31wp.js +0 -8
  525. package/chunk-wk6vjpmj.js +0 -3
  526. package/chunk-x1spmnj8.js +0 -2
  527. package/chunk-x4anmcq9.js +0 -4
  528. package/chunk-xd5hf1rg.js +0 -3178
  529. package/chunk-xpbt4cpe.js +0 -2
  530. package/chunk-yw2k2syh.js +0 -3
  531. package/chunk-z3x79jnt.js +0 -3
  532. package/chunk-zd569v9h.js +0 -2
  533. package/web/chunk-05b25kh6.js +0 -332
  534. package/web/chunk-05b25kh6.js.br +0 -0
  535. package/web/chunk-05b25kh6.js.gz +0 -0
  536. package/web/chunk-0g6z1xs1.js +0 -2
  537. package/web/chunk-0g6z1xs1.js.br +0 -0
  538. package/web/chunk-0g6z1xs1.js.gz +0 -0
  539. package/web/chunk-0kj45mje.js +0 -2
  540. package/web/chunk-0kj45mje.js.br +0 -0
  541. package/web/chunk-0kj45mje.js.gz +0 -0
  542. package/web/chunk-0wt52yw3.js +0 -1
  543. package/web/chunk-0wt52yw3.js.br +0 -2
  544. package/web/chunk-0wt52yw3.js.gz +0 -0
  545. package/web/chunk-0x9cf6bp.js +0 -38
  546. package/web/chunk-0x9cf6bp.js.br +0 -0
  547. package/web/chunk-0x9cf6bp.js.gz +0 -0
  548. package/web/chunk-0y2f60q6.js +0 -1
  549. package/web/chunk-0y2f60q6.js.br +0 -0
  550. package/web/chunk-0y2f60q6.js.gz +0 -0
  551. package/web/chunk-1axw7vb0.js +0 -214
  552. package/web/chunk-1axw7vb0.js.br +0 -0
  553. package/web/chunk-1axw7vb0.js.gz +0 -0
  554. package/web/chunk-1es5ak4r.js +0 -1
  555. package/web/chunk-1es5ak4r.js.br +0 -0
  556. package/web/chunk-1es5ak4r.js.gz +0 -0
  557. package/web/chunk-1vhk8j0c.js +0 -1
  558. package/web/chunk-1vhk8j0c.js.br +0 -0
  559. package/web/chunk-1vhk8j0c.js.gz +0 -0
  560. package/web/chunk-21jtjwe1.js +0 -1
  561. package/web/chunk-21jtjwe1.js.br +0 -0
  562. package/web/chunk-21jtjwe1.js.gz +0 -0
  563. package/web/chunk-26grg3rq.js +0 -1144
  564. package/web/chunk-26grg3rq.js.br +0 -0
  565. package/web/chunk-26grg3rq.js.gz +0 -0
  566. package/web/chunk-2nwvdqxm.js +0 -1
  567. package/web/chunk-2nwvdqxm.js.br +0 -0
  568. package/web/chunk-2nwvdqxm.js.gz +0 -0
  569. package/web/chunk-2vh05ags.js +0 -2
  570. package/web/chunk-2vh05ags.js.br +0 -0
  571. package/web/chunk-2vh05ags.js.gz +0 -0
  572. package/web/chunk-2wvgy7f4.js +0 -1
  573. package/web/chunk-2wvgy7f4.js.br +0 -0
  574. package/web/chunk-2wvgy7f4.js.gz +0 -0
  575. package/web/chunk-33bfatdr.js +0 -4
  576. package/web/chunk-33bfatdr.js.br +0 -0
  577. package/web/chunk-33bfatdr.js.gz +0 -0
  578. package/web/chunk-38xsaxws.js +0 -1
  579. package/web/chunk-38xsaxws.js.br +0 -0
  580. package/web/chunk-38xsaxws.js.gz +0 -0
  581. package/web/chunk-3av47wwa.js +0 -7
  582. package/web/chunk-3av47wwa.js.br +0 -0
  583. package/web/chunk-3av47wwa.js.gz +0 -0
  584. package/web/chunk-3rxgch48.js +0 -1
  585. package/web/chunk-3rxgch48.js.br +0 -0
  586. package/web/chunk-3rxgch48.js.gz +0 -0
  587. package/web/chunk-40j8gxty.js +0 -303
  588. package/web/chunk-40j8gxty.js.br +0 -0
  589. package/web/chunk-40j8gxty.js.gz +0 -0
  590. package/web/chunk-43kq2dk7.js +0 -21
  591. package/web/chunk-43kq2dk7.js.br +0 -0
  592. package/web/chunk-43kq2dk7.js.gz +0 -0
  593. package/web/chunk-4cw67sdz.js +0 -78
  594. package/web/chunk-4cw67sdz.js.br +0 -0
  595. package/web/chunk-4cw67sdz.js.gz +0 -0
  596. package/web/chunk-4k4c2se1.js +0 -2
  597. package/web/chunk-4k4c2se1.js.br +0 -0
  598. package/web/chunk-4k4c2se1.js.gz +0 -0
  599. package/web/chunk-50dr941q.js +0 -55
  600. package/web/chunk-50dr941q.js.br +0 -0
  601. package/web/chunk-50dr941q.js.gz +0 -0
  602. package/web/chunk-56hx6a5h.js +0 -1
  603. package/web/chunk-56hx6a5h.js.br +0 -0
  604. package/web/chunk-56hx6a5h.js.gz +0 -0
  605. package/web/chunk-5m1p98r5.js +0 -2
  606. package/web/chunk-5m1p98r5.js.br +0 -0
  607. package/web/chunk-5m1p98r5.js.gz +0 -0
  608. package/web/chunk-5m45mc2k.js +0 -99
  609. package/web/chunk-5m45mc2k.js.br +0 -0
  610. package/web/chunk-5m45mc2k.js.gz +0 -0
  611. package/web/chunk-6gfa17h5.js +0 -1
  612. package/web/chunk-6gfa17h5.js.br +0 -0
  613. package/web/chunk-6gfa17h5.js.gz +0 -0
  614. package/web/chunk-7e57me98.js +0 -1
  615. package/web/chunk-7e57me98.js.br +0 -0
  616. package/web/chunk-7e57me98.js.gz +0 -0
  617. package/web/chunk-7ht7dssg.js +0 -1
  618. package/web/chunk-7ht7dssg.js.br +0 -0
  619. package/web/chunk-7ht7dssg.js.gz +0 -0
  620. package/web/chunk-8jxg1srx.js +0 -1
  621. package/web/chunk-8jxg1srx.js.br +0 -2
  622. package/web/chunk-8jxg1srx.js.gz +0 -0
  623. package/web/chunk-8q9970dm.js +0 -2
  624. package/web/chunk-8q9970dm.js.br +0 -0
  625. package/web/chunk-8q9970dm.js.gz +0 -0
  626. package/web/chunk-8t1kh5r9.js +0 -370
  627. package/web/chunk-8t1kh5r9.js.br +0 -0
  628. package/web/chunk-8t1kh5r9.js.gz +0 -0
  629. package/web/chunk-8za5fkrq.js +0 -1
  630. package/web/chunk-8za5fkrq.js.br +0 -0
  631. package/web/chunk-8za5fkrq.js.gz +0 -0
  632. package/web/chunk-96dhr80q.js +0 -8
  633. package/web/chunk-96dhr80q.js.br +0 -0
  634. package/web/chunk-96dhr80q.js.gz +0 -0
  635. package/web/chunk-98y5p1r2.js +0 -1
  636. package/web/chunk-98y5p1r2.js.br +0 -0
  637. package/web/chunk-98y5p1r2.js.gz +0 -0
  638. package/web/chunk-9f77mxfz.js +0 -98
  639. package/web/chunk-9f77mxfz.js.br +0 -0
  640. package/web/chunk-9f77mxfz.js.gz +0 -0
  641. package/web/chunk-9g2fam83.js +0 -2
  642. package/web/chunk-9g2fam83.js.br +0 -0
  643. package/web/chunk-9g2fam83.js.gz +0 -0
  644. package/web/chunk-9we3a8ak.js +0 -84
  645. package/web/chunk-9we3a8ak.js.br +0 -0
  646. package/web/chunk-9we3a8ak.js.gz +0 -0
  647. package/web/chunk-adfd0mhj.js +0 -1
  648. package/web/chunk-adfd0mhj.js.br +0 -0
  649. package/web/chunk-adfd0mhj.js.gz +0 -0
  650. package/web/chunk-aem9wyqq.js +0 -30
  651. package/web/chunk-aem9wyqq.js.br +0 -0
  652. package/web/chunk-aem9wyqq.js.gz +0 -0
  653. package/web/chunk-ajzrsqpp.js +0 -1
  654. package/web/chunk-ajzrsqpp.js.br +0 -0
  655. package/web/chunk-ajzrsqpp.js.gz +0 -0
  656. package/web/chunk-b4t33dft.js +0 -7
  657. package/web/chunk-b4t33dft.js.br +0 -0
  658. package/web/chunk-b4t33dft.js.gz +0 -0
  659. package/web/chunk-b86sddt6.js +0 -1
  660. package/web/chunk-b86sddt6.js.br +0 -0
  661. package/web/chunk-b86sddt6.js.gz +0 -0
  662. package/web/chunk-bt8ww8df.js +0 -142
  663. package/web/chunk-bt8ww8df.js.br +0 -0
  664. package/web/chunk-bt8ww8df.js.gz +0 -0
  665. package/web/chunk-c1tsq0ta.js +0 -1
  666. package/web/chunk-c1tsq0ta.js.br +0 -0
  667. package/web/chunk-c1tsq0ta.js.gz +0 -0
  668. package/web/chunk-ckkd4qn1.js +0 -1
  669. package/web/chunk-ckkd4qn1.js.br +0 -0
  670. package/web/chunk-ckkd4qn1.js.gz +0 -0
  671. package/web/chunk-cxh1ztpm.js +0 -200
  672. package/web/chunk-cxh1ztpm.js.br +0 -0
  673. package/web/chunk-cxh1ztpm.js.gz +0 -0
  674. package/web/chunk-db2pew8j.js +0 -2
  675. package/web/chunk-db2pew8j.js.br +0 -0
  676. package/web/chunk-db2pew8j.js.gz +0 -0
  677. package/web/chunk-dk2jv3kv.js +0 -2
  678. package/web/chunk-dk2jv3kv.js.br +0 -0
  679. package/web/chunk-dk2jv3kv.js.gz +0 -0
  680. package/web/chunk-dk9efr2r.js +0 -1
  681. package/web/chunk-dk9efr2r.js.br +0 -0
  682. package/web/chunk-dk9efr2r.js.gz +0 -0
  683. package/web/chunk-dmn5rvmt.js +0 -169
  684. package/web/chunk-dmn5rvmt.js.br +0 -0
  685. package/web/chunk-dmn5rvmt.js.gz +0 -0
  686. package/web/chunk-dtzm3qsp.js +0 -34
  687. package/web/chunk-dtzm3qsp.js.br +0 -0
  688. package/web/chunk-dtzm3qsp.js.gz +0 -0
  689. package/web/chunk-e1j49cha.js +0 -140
  690. package/web/chunk-e1j49cha.js.br +0 -0
  691. package/web/chunk-e1j49cha.js.gz +0 -0
  692. package/web/chunk-e24ammbc.js +0 -292
  693. package/web/chunk-e24ammbc.js.br +0 -0
  694. package/web/chunk-e24ammbc.js.gz +0 -0
  695. package/web/chunk-ebvk893x.js +0 -2
  696. package/web/chunk-ebvk893x.js.br +0 -0
  697. package/web/chunk-ebvk893x.js.gz +0 -0
  698. package/web/chunk-ecv7r3t9.js +0 -24
  699. package/web/chunk-ecv7r3t9.js.br +0 -0
  700. package/web/chunk-ecv7r3t9.js.gz +0 -0
  701. package/web/chunk-etkhjrfg.js +0 -1
  702. package/web/chunk-etkhjrfg.js.br +0 -0
  703. package/web/chunk-etkhjrfg.js.gz +0 -0
  704. package/web/chunk-f3ennx3q.js +0 -1
  705. package/web/chunk-f3ennx3q.js.br +0 -0
  706. package/web/chunk-f3ennx3q.js.gz +0 -0
  707. package/web/chunk-f5wyg9zh.js +0 -2
  708. package/web/chunk-f5wyg9zh.js.br +0 -0
  709. package/web/chunk-f5wyg9zh.js.gz +0 -0
  710. package/web/chunk-fpg6cdg9.js +0 -1
  711. package/web/chunk-fpg6cdg9.js.br +0 -0
  712. package/web/chunk-fpg6cdg9.js.gz +0 -0
  713. package/web/chunk-fq9kkd61.js +0 -1
  714. package/web/chunk-fq9kkd61.js.br +0 -0
  715. package/web/chunk-fq9kkd61.js.gz +0 -0
  716. package/web/chunk-fr9gd1pt.js +0 -1
  717. package/web/chunk-fr9gd1pt.js.br +0 -0
  718. package/web/chunk-fr9gd1pt.js.gz +0 -0
  719. package/web/chunk-fsfpgs2w.css +0 -1
  720. package/web/chunk-fsfpgs2w.css.br +0 -0
  721. package/web/chunk-fsfpgs2w.css.gz +0 -0
  722. package/web/chunk-ftggg1s9.js +0 -324
  723. package/web/chunk-ftggg1s9.js.br +0 -0
  724. package/web/chunk-ftggg1s9.js.gz +0 -0
  725. package/web/chunk-g337nkpz.js +0 -2
  726. package/web/chunk-g337nkpz.js.br +0 -0
  727. package/web/chunk-g337nkpz.js.gz +0 -0
  728. package/web/chunk-g52np0en.js +0 -1
  729. package/web/chunk-g52np0en.js.br +0 -0
  730. package/web/chunk-g52np0en.js.gz +0 -0
  731. package/web/chunk-gc6pdwjs.js +0 -2
  732. package/web/chunk-gc6pdwjs.js.br +0 -0
  733. package/web/chunk-gc6pdwjs.js.gz +0 -0
  734. package/web/chunk-gks3ybk7.js +0 -291
  735. package/web/chunk-gks3ybk7.js.br +0 -0
  736. package/web/chunk-gks3ybk7.js.gz +0 -0
  737. package/web/chunk-hr1t5hxj.js +0 -1
  738. package/web/chunk-hr1t5hxj.js.br +0 -0
  739. package/web/chunk-hr1t5hxj.js.gz +0 -0
  740. package/web/chunk-k67ze3zq.js +0 -2
  741. package/web/chunk-k67ze3zq.js.br +0 -0
  742. package/web/chunk-k67ze3zq.js.gz +0 -0
  743. package/web/chunk-kcrkppec.js +0 -1
  744. package/web/chunk-kcrkppec.js.br +0 -0
  745. package/web/chunk-kcrkppec.js.gz +0 -0
  746. package/web/chunk-kd2346aw.js +0 -2
  747. package/web/chunk-kd2346aw.js.br +0 -0
  748. package/web/chunk-kd2346aw.js.gz +0 -0
  749. package/web/chunk-kh93xybm.js +0 -62
  750. package/web/chunk-kh93xybm.js.br +0 -0
  751. package/web/chunk-kh93xybm.js.gz +0 -0
  752. package/web/chunk-m32tg04f.js +0 -1
  753. package/web/chunk-m32tg04f.js.br +0 -0
  754. package/web/chunk-m32tg04f.js.gz +0 -0
  755. package/web/chunk-mg98g3yx.js +0 -106
  756. package/web/chunk-mg98g3yx.js.br +0 -0
  757. package/web/chunk-mg98g3yx.js.gz +0 -0
  758. package/web/chunk-mqdvg55y.js +0 -2
  759. package/web/chunk-mqdvg55y.js.br +0 -0
  760. package/web/chunk-mqdvg55y.js.gz +0 -0
  761. package/web/chunk-myg415b8.js +0 -1
  762. package/web/chunk-myg415b8.js.br +0 -0
  763. package/web/chunk-myg415b8.js.gz +0 -0
  764. package/web/chunk-myn0rj98.js +0 -2
  765. package/web/chunk-myn0rj98.js.br +0 -0
  766. package/web/chunk-myn0rj98.js.gz +0 -0
  767. package/web/chunk-nvq8s71g.js +0 -1
  768. package/web/chunk-nvq8s71g.js.br +0 -0
  769. package/web/chunk-nvq8s71g.js.gz +0 -0
  770. package/web/chunk-pphtw0xj.js +0 -7
  771. package/web/chunk-pphtw0xj.js.br +0 -0
  772. package/web/chunk-pphtw0xj.js.gz +0 -0
  773. package/web/chunk-ptdh13r5.js +0 -1
  774. package/web/chunk-ptdh13r5.js.br +0 -0
  775. package/web/chunk-ptdh13r5.js.gz +0 -0
  776. package/web/chunk-q1gyt5y6.js +0 -1
  777. package/web/chunk-q1gyt5y6.js.br +0 -0
  778. package/web/chunk-q1gyt5y6.js.gz +0 -0
  779. package/web/chunk-q40c0y7d.js +0 -24
  780. package/web/chunk-q40c0y7d.js.br +0 -0
  781. package/web/chunk-q40c0y7d.js.gz +0 -0
  782. package/web/chunk-q7pyqxqn.js +0 -89
  783. package/web/chunk-q7pyqxqn.js.br +0 -0
  784. package/web/chunk-q7pyqxqn.js.gz +0 -0
  785. package/web/chunk-r5rt7t62.js +0 -1
  786. package/web/chunk-r5rt7t62.js.br +0 -0
  787. package/web/chunk-r5rt7t62.js.gz +0 -0
  788. package/web/chunk-ra8jt8jw.js +0 -2
  789. package/web/chunk-ra8jt8jw.js.br +0 -0
  790. package/web/chunk-ra8jt8jw.js.gz +0 -0
  791. package/web/chunk-rgh3x4h4.js +0 -1
  792. package/web/chunk-rgh3x4h4.js.br +0 -0
  793. package/web/chunk-rgh3x4h4.js.gz +0 -0
  794. package/web/chunk-rvcq48wy.js +0 -1
  795. package/web/chunk-rvcq48wy.js.br +0 -0
  796. package/web/chunk-rvcq48wy.js.gz +0 -0
  797. package/web/chunk-rvgx4jhr.js +0 -1
  798. package/web/chunk-rvgx4jhr.js.br +0 -0
  799. package/web/chunk-rvgx4jhr.js.gz +0 -0
  800. package/web/chunk-rxvvg771.js +0 -1
  801. package/web/chunk-rxvvg771.js.br +0 -0
  802. package/web/chunk-rxvvg771.js.gz +0 -0
  803. package/web/chunk-sfb3w9nf.js +0 -1
  804. package/web/chunk-sfb3w9nf.js.br +0 -2
  805. package/web/chunk-sfb3w9nf.js.gz +0 -0
  806. package/web/chunk-srwx1v8c.js +0 -39
  807. package/web/chunk-srwx1v8c.js.br +0 -0
  808. package/web/chunk-srwx1v8c.js.gz +0 -0
  809. package/web/chunk-t1et0w6s.js +0 -2
  810. package/web/chunk-t1et0w6s.js.br +0 -0
  811. package/web/chunk-t1et0w6s.js.gz +0 -0
  812. package/web/chunk-tm7c78hm.js +0 -1
  813. package/web/chunk-tm7c78hm.js.br +0 -0
  814. package/web/chunk-tm7c78hm.js.gz +0 -0
  815. package/web/chunk-tmrh8hv1.js +0 -1
  816. package/web/chunk-tmrh8hv1.js.br +0 -0
  817. package/web/chunk-tmrh8hv1.js.gz +0 -0
  818. package/web/chunk-tntwwpyh.js +0 -2
  819. package/web/chunk-tntwwpyh.js.br +0 -0
  820. package/web/chunk-tntwwpyh.js.gz +0 -0
  821. package/web/chunk-tyengwea.js +0 -12
  822. package/web/chunk-tyengwea.js.br +0 -0
  823. package/web/chunk-tyengwea.js.gz +0 -0
  824. package/web/chunk-v13gqed9.js +0 -2
  825. package/web/chunk-v13gqed9.js.br +0 -0
  826. package/web/chunk-v13gqed9.js.gz +0 -0
  827. package/web/chunk-v6srkjvx.js +0 -41
  828. package/web/chunk-v6srkjvx.js.br +0 -0
  829. package/web/chunk-v6srkjvx.js.gz +0 -0
  830. package/web/chunk-vyn5qg7j.js +0 -1
  831. package/web/chunk-vyn5qg7j.js.br +0 -0
  832. package/web/chunk-vyn5qg7j.js.gz +0 -0
  833. package/web/chunk-w8se91rf.js +0 -2
  834. package/web/chunk-w8se91rf.js.br +0 -0
  835. package/web/chunk-w8se91rf.js.gz +0 -0
  836. package/web/chunk-wc533d3w.js +0 -4
  837. package/web/chunk-wc533d3w.js.br +0 -0
  838. package/web/chunk-wc533d3w.js.gz +0 -0
  839. package/web/chunk-wdd9pasx.js +0 -1
  840. package/web/chunk-wdd9pasx.js.br +0 -0
  841. package/web/chunk-wdd9pasx.js.gz +0 -0
  842. package/web/chunk-we9q8a9q.js +0 -2
  843. package/web/chunk-we9q8a9q.js.br +0 -0
  844. package/web/chunk-we9q8a9q.js.gz +0 -0
  845. package/web/chunk-wjpdjzkt.js +0 -36
  846. package/web/chunk-wjpdjzkt.js.br +0 -0
  847. package/web/chunk-wjpdjzkt.js.gz +0 -0
  848. package/web/chunk-wwnzjj7x.js +0 -2
  849. package/web/chunk-wwnzjj7x.js.br +0 -0
  850. package/web/chunk-wwnzjj7x.js.gz +0 -0
  851. package/web/chunk-wypacndw.js +0 -120
  852. package/web/chunk-wypacndw.js.br +0 -0
  853. package/web/chunk-wypacndw.js.gz +0 -0
  854. package/web/chunk-x3p573sq.js +0 -2
  855. package/web/chunk-x3p573sq.js.br +0 -0
  856. package/web/chunk-x3p573sq.js.gz +0 -0
  857. package/web/chunk-x6zh7fcc.js +0 -16
  858. package/web/chunk-x6zh7fcc.js.br +0 -0
  859. package/web/chunk-x6zh7fcc.js.gz +0 -0
  860. package/web/chunk-x87bgw5s.js +0 -89
  861. package/web/chunk-x87bgw5s.js.br +0 -0
  862. package/web/chunk-x87bgw5s.js.gz +0 -0
  863. package/web/chunk-xevjmmdd.js +0 -217
  864. package/web/chunk-xevjmmdd.js.br +0 -0
  865. package/web/chunk-xevjmmdd.js.gz +0 -0
  866. package/web/chunk-xwjytx6p.js +0 -139
  867. package/web/chunk-xwjytx6p.js.br +0 -0
  868. package/web/chunk-xwjytx6p.js.gz +0 -0
  869. package/web/chunk-y0xvbh5g.js +0 -1
  870. package/web/chunk-y0xvbh5g.js.br +0 -0
  871. package/web/chunk-y0xvbh5g.js.gz +0 -0
  872. package/web/chunk-ya7gs2bv.js +0 -1
  873. package/web/chunk-ya7gs2bv.js.br +0 -0
  874. package/web/chunk-ya7gs2bv.js.gz +0 -0
  875. package/web/chunk-ybq42mr5.js +0 -2
  876. package/web/chunk-ybq42mr5.js.br +0 -0
  877. package/web/chunk-ybq42mr5.js.gz +0 -0
  878. package/web/chunk-yhzcc87m.js +0 -3
  879. package/web/chunk-yhzcc87m.js.br +0 -0
  880. package/web/chunk-yhzcc87m.js.gz +0 -0
  881. package/web/chunk-yphdbf42.js +0 -70
  882. package/web/chunk-yphdbf42.js.br +0 -0
  883. package/web/chunk-yphdbf42.js.gz +0 -0
  884. package/web/chunk-ythxsag5.js +0 -40
  885. package/web/chunk-ythxsag5.js.br +0 -0
  886. package/web/chunk-ythxsag5.js.gz +0 -0
  887. package/web/chunk-z0smmkfw.js +0 -2
  888. package/web/chunk-z0smmkfw.js.br +0 -0
  889. package/web/chunk-z0smmkfw.js.gz +0 -0
  890. package/web/chunk-zmm3f9sr.js +0 -1
  891. package/web/chunk-zmm3f9sr.js.br +0 -0
  892. package/web/chunk-zmm3f9sr.js.gz +0 -0
  893. package/web/chunk-zxt6qh82.js +0 -2
  894. package/web/chunk-zxt6qh82.js.br +0 -0
  895. package/web/chunk-zxt6qh82.js.gz +0 -0
  896. package/web/manifest-txf6vfbq.webmanifest +0 -35
  897. package/web/manifest-txf6vfbq.webmanifest.br +0 -0
  898. package/web/manifest-txf6vfbq.webmanifest.gz +0 -0
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var A=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],I=["content-type","cache-control","allow"];function p(e){let r=e.path;if(!r?.startsWith("/api/")||/[\\\r\n#]/.test(r))throw Error("request path must start with /api/");let n=new URL(r,"http://basalt.internal");if(n.origin!=="http://basalt.internal"||!n.pathname.startsWith("/api/"))throw Error("request path must stay within /api/");let o=e.method??"GET";if(!A.includes(o))throw Error("Unsupported request method");if(e.body!==void 0&&(!e.body||typeof e.body!=="object"||Array.isArray(e.body)))throw Error("request body must be a JSON object");if(e.body!==void 0&&(o==="GET"||o==="HEAD"))throw Error("GET and HEAD requests cannot have a body");let s=e.timeoutMs??1e4;if(!Number.isSafeInteger(s)||s<1||s>60000)throw Error("timeoutMs must be an integer between 1 and 60000");return{url:n,method:o,timeoutMs:s}}function g(e){let r={};for(let n of I){let o=e.headers.get(n);if(o)r[n]=o.slice(0,500)}return r}async function M(e,r){let n=e.getReader();r(()=>n.cancel());let o=[],s=0,i=!1;while(!0){let t=await n.read();if(t.done)break;let d=20480-s;if(o.push(t.value.subarray(0,d)),s+=Math.min(t.value.length,d),t.value.length>d){i=!0,await n.cancel();break}}let l=new Uint8Array(s),c=0;for(let t of o)l.set(t,c),c+=t.length;return{text:new TextDecoder().decode(l,{stream:i}),truncated:i}}async function vn(e,r,n){let{url:o,method:s,timeoutMs:i}=p(r),l=e.http;if(!l)throw Error("HTTP API is not attached; start the Basalt server first");let c=new AbortController,t=n?AbortSignal.any([n,c.signal]):c.signal;t.throwIfAborted();let d,b=()=>{d?.().catch((u)=>console.warn("[basalt-creator] \u53D6\u6D88\u54CD\u5E94\u4F53\u5931\u8D25\uFF1A",u))},E=async()=>{let u=r.body!==void 0,a=await l.request(new Request(o.toString(),{method:s,headers:u?{"content-type":"application/json"}:void 0,body:u?JSON.stringify(r.body):void 0,signal:t}));if(t.aborted)throw await a.body?.cancel(),Error("API request cancelled");let m=a.body?await M(a.body,(T)=>{d=T}):{text:"",truncated:!1};return{status:a.status,headers:g(a),body:m.text,truncated:m.truncated}},f,h,w=new Promise((u,a)=>{if(h=()=>{a(Error("API request cancelled")),b()},t.addEventListener("abort",h,{once:!0}),t.aborted)h()}),y=new Promise((u,a)=>{f=setTimeout(()=>{a(Error(`API request timed out after ${i}ms`)),c.abort(),b()},i)});try{return await Promise.race([E(),w,y])}finally{if(clearTimeout(f),h)t.removeEventListener("abort",h)}}
3
+ export{vn};
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ import{P}from"./chunk-xjr4j102.js";import{ne}from"./chunk-19nje7ny.js";import{O}from"./chunk-ma4nhnnj.js";import{Dt}from"./chunk-v9pc3ad7.js";import{Qt}from"./chunk-3bqs901a.js";import{kr,Pr}from"./chunk-8bvjjs3r.js";import{Se}from"./chunk-412mm63g.js";import{Te}from"./chunk-1jtnjzrz.js";import{se,pe}from"./chunk-pzg6f8rv.js";import{De,wo,So,Ie,En,tt,pr,de,$s,js,Ne}from"./chunk-qn316bye.js";import{C}from"./chunk-bkabw9yr.js";import{le}from"./chunk-fpksd95h.js";import{re,mt,xe,We,He,he,ae}from"./chunk-kh4b25x0.js";import{J}from"./chunk-23qfxx3v.js";function H(e,n){if(!e)return!1;let t=n.toLowerCase();for(let[s,u]of Object.entries(e))if(s.toLowerCase()===t&&u!==null&&u.trim().length>0)return!0;return!1}function Q(e,n,t){if(n)return n;if(H(t,"authorization")||H(t,"cf-aig-authorization"))return"unused";throw Error(`No API key for provider: ${e}`)}function fe(e){for(let n of e){if(n.role==="toolResult")return!0;if(n.role==="assistant"){if(n.content.some((t)=>t.type==="toolCall"))return!0}}return!1}function U(e){return e.type==="text"}function ce(e){return e.type==="thinking"}function ge(e){return e.type==="toolCall"}function me(e){return e.type==="image"}function ye(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function ke(e){return(e.id===void 0||e.id===null||typeof e.id==="string")&&(e.format===void 0||typeof e.format==="string")&&(e.index===void 0||typeof e.index==="number")}function G(e){if(!ye(e)||!ke(e))return!1;switch(e.type){case"reasoning.summary":return typeof e.summary==="string";case"reasoning.encrypted":return typeof e.data==="string";case"reasoning.text":return typeof e.text==="string"&&(e.signature===void 0||e.signature===null||typeof e.signature==="string");default:return!1}}function Re(e){if(!e)return;try{let n=JSON.parse(e);return Array.isArray(n)&&n.length>0&&n.every(G)?n:void 0}catch{return}}function _e(e){if(!e)return;try{let n=JSON.parse(e);return G(n)&&n.type==="reasoning.encrypted"&&typeof n.id==="string"&&n.id.length>0&&n.data.length>0?n:void 0}catch{return}}function W(e,n){e.id??=n.id,e.format||=n.format,e.index??=n.index}function ve(e,n){let t=e[e.length-1];if(n.type==="reasoning.text"&&t?.type==="reasoning.text"){t.text+=n.text,t.signature||=n.signature,W(t,n);return}if(n.type==="reasoning.summary"&&t?.type==="reasoning.summary"){t.summary+=n.summary,W(t,n);return}e.push({...n})}var Ae=["reasoning","reasoning_content","reasoning_text"];function Ce(e){return Ae.includes(e)}function X(e,n){if(e)return e;if(O("PI_CACHE_RETENTION",n)==="long")return"long";return"short"}var Me=(e,n,t)=>{let s=new J,u=xe(n,D(e).supportsMidConvoSystemMessages);return(async()=>{let r={role:"assistant",content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()},k,g=(R)=>{if(k!==void 0)R.thinkingSignature=JSON.stringify(k)};try{let R=Q(e.provider,t?.apiKey,t?.headers),a=D(e),T=tt(We(u.messages),a.supportsOpenAIGrammarTools),p=X(t?.cacheRetention,t?.env),d=p==="none"?void 0:t?.sessionId,o=Ee(e,u,R,t?.headers,t?.fetch,d,a),f=we(e,u,t,a,p,T),h=await t?.onPayload?.(f,e);if(h!==void 0)f=h;let A={...t?.signal?{signal:t.signal}:{},...t?.timeoutMs!==void 0?{timeout:t.timeoutMs}:{},maxRetries:0},{data:M,response:B}=await Te(()=>o.chat.completions.create(f,A).withResponse(),{maxRetries:t?.maxRetries,maxRetryDelayMs:t?.maxRetryDelayMs,signal:t?.signal});await t?.onResponse?.({status:B.status,headers:le(B.headers)},e),s.push({type:"start",partial:r});let w=null,S=null,v=!1,F=new Map,L=new Map,l=r.content,I=(i)=>l.indexOf(i),N=(i)=>{let c=i.customInput?.property;if(c===void 0)return"";let x=i.arguments[c];return typeof x==="string"?x:""},j=(i,c,x)=>{let m=i.customInput;if(!m)return;let E=So(m.jsonBuffer,m.property,c,x);return i.arguments={[m.property]:c},E},te=(i)=>{let c=I(i);if(c===-1)return;if(i.type==="text")s.push({type:"text_end",contentIndex:c,content:i.text,partial:r});else if(i.type==="thinking")g(i),s.push({type:"thinking_end",contentIndex:c,content:i.thinking,partial:r});else if(i.type==="toolCall"){if(i.customInput){let x=j(i,N(i),!0);if(x!==void 0)s.push({type:"toolcall_delta",contentIndex:c,delta:x,partial:r})}else i.arguments=ne(i.partialArgs);delete i.partialArgs,delete i.customInput,delete i.streamIndex,s.push({type:"toolcall_end",contentIndex:c,toolCall:i,partial:r})}},oe=()=>{if(!w)w={type:"text",text:""},l.push(w),s.push({type:"text_start",contentIndex:I(w),partial:r});return w},K=(i)=>{if(!S)S={type:"thinking",thinking:"",thinkingSignature:i},l.push(S),s.push({type:"thinking_start",contentIndex:I(S),partial:r});return S},ie=(i)=>{let c=typeof i.index==="number"?i.index:void 0,x=i.function?.name??i.custom?.name??"",m=c!==void 0?F.get(c):void 0;if(!m&&i.id)m=L.get(i.id);if(!m){let E=i.custom&&!i.function?T.get(x)??"input":void 0,b=E!==void 0;if(m={type:"toolCall",id:i.id||"",name:x,arguments:b?{[E]:""}:{},partialArgs:b?void 0:"",customInput:b?{property:E,jsonBuffer:{input:"",started:!1,closed:!1}}:void 0,streamIndex:c},c!==void 0)F.set(c,m);if(i.id)L.set(i.id,m);l.push(m),s.push({type:"toolcall_start",contentIndex:I(m),partial:r})}if(c!==void 0&&m.streamIndex===void 0)m.streamIndex=c,F.set(c,m);if(i.id)L.set(i.id,m);if(!m.name&&x)m.name=x;if(i.custom&&!i.function&&!m.customInput){let E=T.get(m.name)??"input";m.arguments={[E]:""},m.customInput={property:E,jsonBuffer:{input:"",started:!1,closed:!1}},delete m.partialArgs}return m};for await(let i of M){if(await t?.onProviderStreamEvent?.(i,e),!i||typeof i!=="object")continue;if(r.responseId||=i.id,typeof i.model==="string"&&i.model.length>0&&i.model!==e.id)r.responseModel||=i.model;if(i.usage)r.usage=Z(i.usage,e);let c=Array.isArray(i.choices)?i.choices[0]:void 0;if(!c)continue;if(!i.usage&&c.usage)r.usage=Z(c.usage,e);if(c.finish_reason){r.rawStopReason=c.finish_reason;let x=Ke(c.finish_reason);if(r.stopReason=x.stopReason,x.errorMessage)r.errorMessage=x.errorMessage;v=!0}if(c.delta){if(c.delta.content!==null&&c.delta.content!==void 0&&c.delta.content.length>0){let y=oe();y.text+=c.delta.content,s.push({type:"text_delta",contentIndex:I(y),delta:c.delta.content,partial:r})}let x=["reasoning_content","reasoning","reasoning_text"],m=c.delta,E=null;for(let y of x){let _=m[y];if(typeof _==="string"&&_.length>0){E=y;break}}if(E){let y=m[E];if(typeof y==="string"&&y.length>0){let _=e.provider==="opencode-go"&&E==="reasoning"?"reasoning_content":E,q=K(_);q.thinking+=y,s.push({type:"thinking_delta",contentIndex:I(q),delta:y,partial:r})}}if(c?.delta?.tool_calls)for(let y of c.delta.tool_calls){let _=ie(y);if(!_.id&&y.id)_.id=y.id,L.set(y.id,_);let q=y.function?.name??y.custom?.name;if(!_.name&&q)_.name=q;let z="";if(y.function?.arguments)z=y.function.arguments,_.partialArgs=(_.partialArgs??"")+y.function.arguments,_.arguments=ne(_.partialArgs);else if(y.custom?.input){let ue=N(_)+y.custom.input;z=j(_,ue,!1)??""}s.push({type:"toolcall_delta",contentIndex:I(_),delta:z,partial:r})}let b=c.delta.reasoning_details;if(Array.isArray(b))for(let y of b){if(!G(y))continue;K(""),k??=[],ve(k,y)}}}for(let i of l)te(i);if(t?.signal?.aborted)throw Error("Request was aborted");if(r.stopReason==="aborted")throw Error("Request was aborted");if(!v&&!a.supportsFinishReason)r.stopReason=r.content.some((i)=>i.type==="toolCall")?"toolUse":"stop";if(r.stopReason==="error")throw Error(r.errorMessage||"Provider returned an error stop reason");if(a.supportsFinishReason&&!v||r.stopReason==="pending")throw Error("Stream ended without finish_reason");s.push({type:"done",reason:r.stopReason,message:r}),s.end()}catch(R){for(let T of r.content){if(T.type==="thinking")g(T);delete T.index,delete T.partialArgs,delete T.customInput,delete T.streamIndex}r.stopReason=t?.signal?.aborted?"aborted":"error",r.errorMessage=pe(se(R));let a=R?.error?.metadata?.raw;if(a&&!r.errorMessage.includes(String(a)))r.errorMessage+=`
3
+ ${a}`;s.push({type:"error",reason:r.stopReason,error:r}),s.end()}})(),s},gt=(e,n,t)=>{Q(e.provider,t?.apiKey,t?.headers);let s={...de(e,n,t,t?.apiKey),toolChoice:t?.toolChoice},u=t?.reasoning?ae(e,t.reasoning):void 0;return Me(e,n,{...s,reasoningEffort:u==="off"?void 0:u,thinkingBudgets:t?.thinkingBudgets})};function Ee(e,n,t,s,u,r,k=D(e)){let g={"User-Agent":Se(),...e.headers};if(e.provider==="github-copilot"){let R=kr(n.messages),a=Pr({messages:n.messages,hasImages:R});Object.assign(g,a)}if(r&&k.sendSessionAffinityHeaders)if(k.sessionAffinityFormat==="openrouter")g["x-session-id"]=r;else{if(k.sessionAffinityFormat==="openai")g.session_id=r;g["x-client-request-id"]=r,g["x-session-affinity"]=r}if(s)Object.assign(g,s);return new P({apiKey:t,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:u,defaultHeaders:g})}function we(e,n,t,s=D(e),u=X(t?.cacheRetention,t?.env),r=tt(We(n.messages),s.supportsOpenAIGrammarTools)){let k=He(n.messages,s.supportsMidConvoSystemMessages===!0&&s.supportsMidConvoToolAdditions===!0),g=$e(e,n,s,{grammarToolInputProperties:r}),R=Be(s,u),a={model:e.id,messages:g,stream:!0,prompt_cache_key:e.baseUrl.includes("api.openai.com")&&u!=="none"||u==="long"&&s.supportsLongCacheRetention?Dt(t?.sessionId):void 0,prompt_cache_retention:u==="long"&&s.supportsLongCacheRetention?"24h":void 0};if(s.supportsUsageInStreaming!==!1)a.stream_options={include_usage:!0};if(s.supportsStore)a.store=!1;if(t?.maxTokens)if(s.maxTokensField==="max_tokens")a.max_tokens=t.maxTokens;else a.max_completion_tokens=t.maxTokens;if(t?.temperature!==void 0)a.temperature=t.temperature;if(k.requestTools.length>0){if(a.tools=ee(k.requestTools,s),s.zaiToolStream)a.tool_stream=!0}else if(fe(n.messages))a.tools=[];if(R)Pe(g,a.tools,R);if(t?.toolChoice)a.tool_choice=t.toolChoice;if(s.vllmPriority!==void 0)a.priority=s.vllmPriority;let T=Fe(s),p=Oe(e,t,a);if(s.thinkingFormat==="zai"&&e.reasoning){let o=a;if(o.thinking=t?.reasoningEffort?{type:"enabled",clear_thinking:!1}:{type:"disabled"},t?.reasoningEffort&&s.supportsReasoningEffort){let f=e.thinkingLevelMap?.[t.reasoningEffort],h=f===void 0?t.reasoningEffort:f;if(typeof h==="string")o.reasoning_effort=h}}else if(s.thinkingFormat==="qwen"&&e.reasoning){if(a.enable_thinking=!!t?.reasoningEffort,t?.reasoningEffort&&s.supportsReasoningEffort){let o=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;if(typeof o==="string")a.reasoning_effort=o}}else if(s.thinkingFormat==="qwen-chat-template"&&e.reasoning)a.chat_template_kwargs={enable_thinking:!!t?.reasoningEffort,preserve_thinking:!0};else if(s.thinkingFormat==="chat-template"&&e.reasoning){let o=V(e,t,s.chatTemplateKwargs,p);if(o)a.chat_template_kwargs=o}else if(s.thinkingFormat==="baseten"&&e.reasoning){let o=a,f=V(e,t,s.chatTemplateArgs,p);if(f)o.chat_template_args=f;if(s.supportsReasoningEffort){let h=t?.reasoningEffort,A=h?e.thinkingLevelMap?.[h]:e.thinkingLevelMap?.off,M=A===void 0?h:A;if(typeof M==="string")o.reasoning_effort=M}}else if(s.thinkingFormat==="deepseek"&&e.reasoning){if(t?.reasoningEffort)a.thinking={type:"enabled"};else if(e.thinkingLevelMap?.off!==null)a.thinking={type:"disabled"};if(t?.reasoningEffort&&s.supportsReasoningEffort)a.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort}else if(s.thinkingFormat==="openrouter"&&e.reasoning){let o=a;if(t?.reasoningEffort)o.reasoning={effort:e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort};else if(e.thinkingLevelMap?.off!==null)o.reasoning={effort:e.thinkingLevelMap?.off??"none"}}else if(s.thinkingFormat==="ant-ling"&&e.reasoning&&t?.reasoningEffort){let o=e.thinkingLevelMap?.[t.reasoningEffort];if(typeof o==="string")a.reasoning={effort:o}}else if(s.thinkingFormat==="together"&&e.reasoning){let o=a;if(o.reasoning={enabled:!!t?.reasoningEffort},t?.reasoningEffort&&s.supportsReasoningEffort)o.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort}else if(s.thinkingFormat==="string-thinking"&&e.reasoning){let o=a;if(t?.reasoningEffort)o.thinking=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;else if(e.thinkingLevelMap?.off!==null)o.thinking=e.thinkingLevelMap?.off??"none"}else if(t?.reasoningEffort&&e.reasoning&&s.supportsReasoningEffort)a.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;else if(!t?.reasoningEffort&&e.reasoning&&s.supportsReasoningEffort){let o=e.thinkingLevelMap?.off;if(typeof o==="string")a.reasoning_effort=o}if(T&&p!==void 0)Object.assign(a,{[T]:p});if(e.compat?.openRouterRouting)a.provider=e.compat.openRouterRouting;if(e.compat?.vercelGatewayRouting){let o=e.compat.vercelGatewayRouting;if(o.only||o.order){let f={};if(o.only)f.only=o.only;if(o.order)f.order=o.order;a.providerOptions={gateway:f}}}let d=pr(e,t?.reasoningEffort??"off",t?.samplingParams);if(d)Object.assign(a,d);return a}function Fe(e){if(e.thinkingTokenBudgetField)return e.thinkingTokenBudgetField;if(e.supportsThinkingTokenBudget)return"thinking_token_budget";return}function Oe(e,n,t){if(!n?.reasoningEffort||!e.reasoning)return;let s=t.max_tokens??t.max_completion_tokens??e.maxTokens,u=js($s(n.reasoningEffort,n.thinkingBudgets),s);return u>0?u:void 0}function V(e,n,t,s){let u={};for(let[r,k]of Object.entries(t)){let g=be(e,n,k,s);if(g!==void 0)u[r]=g}return Object.keys(u).length>0?u:void 0}function be(e,n,t,s){if(typeof t!=="object"||t===null)return t;let u=n?.reasoningEffort;if(!u&&t.omitWhenOff)return;if(t.$var==="thinking.enabled")return!!u;if(t.$var==="thinking.budget")return s;let r=u?e.thinkingLevelMap?.[u]:e.thinkingLevelMap?.off;return r===void 0?u:typeof r==="string"?r:void 0}function Be(e,n){if(e.cacheControlFormat!=="anthropic"||n==="none")return;let t=n==="long"&&e.supportsLongCacheRetention?"1h":void 0;return{type:"ephemeral",...t?{ttl:t}:{}}}function Pe(e,n,t){Le(e,t),ze(n,t),qe(e,t)}function Le(e,n){for(let t of e)if(t.role==="system"||t.role==="developer"){Ge(t,n);return}}function qe(e,n){for(let t=e.length-1;t>=0;t--){let s=e[t];if(s.role==="user"||s.role==="assistant"||s.role==="tool"){if(je(s,n))return}}}function ze(e,n){if(!e||e.length===0)return;let t=e[e.length-1];t.cache_control=n}function Ge(e,n){return Y(e,n)}function je(e,n){if(e.role==="user"||e.role==="assistant"||e.role==="tool")return Y(e,n);return!1}function Y(e,n){let t=e.content;if(typeof t==="string"){if(t.length===0)return!1;return e.content=[{type:"text",text:t,cache_control:n}],!0}if(!Array.isArray(t))return!1;for(let s=t.length-1;s>=0;s--){let u=t[s];if(u?.type==="text"){let r=u;return r.cache_control=n,!0}}return!1}function $e(e,n,t,s){let u=xe(n,t.supportsMidConvoSystemMessages),r=[],k=(p)=>{if(p.includes("|")){let d=p.indexOf("|"),o=p.slice(0,d).replace(/[^a-zA-Z0-9_-]/g,"_"),f=p.slice(d+1).replace(/[^a-zA-Z0-9_-]/g,"_"),h=f.length>0?`${o}_${f}`:o;if(h.length<=40)return h;let A=Qt(p).slice(0,8);return`${o.slice(0,Math.max(1,40-A.length-1))}_${A}`}if(e.provider==="openai")return p.length>40?p.slice(0,40):p;return p},g=Ne(u.messages,e,(p)=>k(p)),R=He(u.messages,t.supportsMidConvoSystemMessages===!0&&t.supportsMidConvoToolAdditions===!0),a=e.reasoning&&t.supportsDeveloperRole?"developer":"system",T=null;for(let p=0;p<g.length;p++){let d=g[p];if(t.requiresAssistantAfterToolResult&&T==="toolResult"&&d.role==="user")r.push({role:"assistant",content:"I have processed the tool results."});if(d.role==="system"){let o=p>0&&R.anchorsAdditions?d.toolsAdded??[]:[];if(o.length>0){let h={role:"system",tools:ee(o,t)};r.push(h)}let f=p===0?re(d):mt(d);if(f.length>0)r.push({role:a,content:C(f)})}else if(d.role==="user")if(typeof d.content==="string")r.push({role:"user",content:C(d.content)});else{let o=d.content.filter((f)=>f.type!=="text"||f.text.length>0).map((f)=>{if(f.type==="text")return{type:"text",text:C(f.text)};else return{type:"image_url",image_url:{url:`data:${f.mimeType};base64,${f.data}`}}});if(o.length===0)continue;r.push({role:"user",content:o})}else if(d.role==="assistant"){let o={role:"assistant",content:t.requiresAssistantAfterToolResult?"":null},f=d.content.filter(U).filter((l)=>l.text.trim().length>0).map((l)=>({type:"text",text:C(l.text)})),h=f.map((l)=>l.text).join(""),A=d.content.filter(ce),M=d.content.filter(ge),B=A.map((l)=>Re(l.thinkingSignature)).find((l)=>l!==void 0),w=M.map((l)=>_e(l.thoughtSignature)).filter((l)=>l!==void 0),S=B??(w.length>0?w:void 0),v=A.filter((l)=>l.thinking.trim().length>0);if(v.length>0)if(t.requiresThinkingAsText){let l=v.map((I)=>C(I.thinking)).join(`
4
+
5
+ `);o.content=[{type:"text",text:l},...f]}else{if(h.length>0)o.content=h;if(!S){let l=v[0].thinkingSignature;if(e.provider==="opencode-go"&&l==="reasoning")l="reasoning_content";if(l&&Ce(l))o[l]=v.map((I)=>I.thinking).join(`
6
+ `)}}else if(h.length>0)o.content=h;if(M.length>0)o.tool_calls=M.map((l)=>{let I=s?.grammarToolInputProperties?.get(l.name);if(I!==void 0)return{id:l.id,type:"custom",custom:{name:l.name,input:C(wo(l.name,l.arguments,I))}};return{id:l.id,type:"function",function:{name:l.name,arguments:JSON.stringify(l.arguments)}}});if(S)o.reasoning_details=S;if(t.requiresReasoningContentOnAssistantMessages&&e.reasoning&&o.reasoning_content===void 0)o.reasoning_content="";let F=o.content;if(!(F!==null&&F!==void 0&&(typeof F==="string"?F.length>0:F.length>0))&&!o.tool_calls)continue;r.push(o)}else if(d.role==="toolResult"){let o=[],f=p;for(;f<g.length&&g[f].role==="toolResult";f++){let h=g[f],A=h.content.filter(U).map((v)=>v.text).join(`
7
+ `),M=h.content.some((v)=>v.type==="image"),w=A.length>0?A:M?"(see attached image)":"(no tool output)",S={role:"tool",content:C(w),tool_call_id:h.toolCallId};if(t.requiresToolResultName&&h.toolName)S.name=h.toolName;if(r.push(S),M&&e.input.includes("image")){for(let v of h.content)if(me(v))o.push({type:"image_url",image_url:{url:`data:${v.mimeType};base64,${v.data}`}})}}if(p=f-1,o.length>0){if(t.requiresAssistantAfterToolResult)r.push({role:"assistant",content:"I have processed the tool results."});r.push({role:"user",content:[{type:"text",text:"Attached image(s) from tool result:"},...o]}),T="user"}else T="toolResult";continue}T=d.role}return r}function ee(e,n){return e.map((t)=>{let s=En(t,n.supportsOpenAIGrammarTools);if(s)return{type:"custom",custom:{name:t.name,description:t.description,format:{type:"grammar",grammar:{syntax:s.format,definition:s.definition}}}};let u=Ie(t,n.supportsStrictMode!==!1);return{type:"function",function:{name:t.name,description:t.description,parameters:De(t,u),...n.supportsStrictMode!==!1&&{strict:u??!1}}}})}function Z(e,n){let t=e.prompt_tokens||0,s=e.prompt_tokens_details?.cached_tokens??e.prompt_cache_hit_tokens??e.cached_tokens??0,u=e.prompt_tokens_details?.cache_write_tokens||0,r=Math.max(0,t-s-u),k=e.completion_tokens||0,g={input:r,output:k,cacheRead:s,cacheWrite:u,reasoning:e.completion_tokens_details?.reasoning_tokens||0,totalTokens:r+k+s+u,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}};return he(n,g),g}function Ke(e){if(e===null)return{stopReason:"stop"};switch(e){case"stop":case"end":return{stopReason:"stop"};case"length":return{stopReason:"length"};case"function_call":case"tool_calls":return{stopReason:"toolUse"};case"content_filter":return{stopReason:"error",errorMessage:"Provider finish_reason: content_filter"};case"network_error":return{stopReason:"error",errorMessage:"Provider finish_reason: network_error"};default:return{stopReason:"error",errorMessage:`Provider finish_reason: ${e}`}}}function Ue(e){let{provider:n,baseUrl:t}=e,s=n==="zai"||n==="zai-coding-cn"||t.includes("api.z.ai")||t.includes("open.bigmodel.cn"),u=n==="together"||t.includes("api.together.ai")||t.includes("api.together.xyz"),r=n==="moonshotai"||n==="moonshotai-cn"||t.includes("api.moonshot."),k=n==="openrouter"||t.includes("openrouter.ai"),g=n==="cloudflare-workers-ai"||t.includes("api.cloudflare.com"),R=n==="cloudflare-ai-gateway"||t.includes("gateway.ai.cloudflare.com"),a=n==="nvidia"||t.includes("integrate.api.nvidia.com"),T=n==="ant-ling"||t.includes("api.ant-ling.com"),p=n==="cerebras"||t.includes("cerebras.ai"),d=n==="deepseek"||t.toLowerCase().includes("deepseek.com"),o=a||p||n==="xai"||t.includes("api.x.ai")||u||t.includes("chutes.ai")||d||s||r||n==="opencode"||t.includes("opencode.ai")||g||R||T,f=t.includes("chutes.ai")||d||r||R||u||a||T||s,h=n==="xai"||t.includes("api.x.ai"),A=k&&(e.id.startsWith("anthropic/")||e.id.startsWith("openai/")),M=n==="openrouter"&&e.id.startsWith("anthropic/")?"anthropic":void 0;return{supportsStore:!o,supportsDeveloperRole:A||!o&&!k,supportsReasoningEffort:!h&&!s&&!r&&!u&&!R&&!a&&!T,supportsUsageInStreaming:!0,supportsFinishReason:!0,maxTokensField:f?"max_tokens":"max_completion_tokens",requiresToolResultName:!1,requiresAssistantAfterToolResult:!1,requiresThinkingAsText:!1,requiresReasoningContentOnAssistantMessages:d,thinkingFormat:d?"deepseek":s?"zai":u?"together":T?"ant-ling":k?"openrouter":"openai",openRouterRouting:{},vercelGatewayRouting:{},chatTemplateKwargs:{},chatTemplateArgs:{},zaiToolStream:!1,supportsThinkingTokenBudget:!1,thinkingTokenBudgetField:void 0,supportsStrictMode:!1,supportsOpenAIGrammarTools:!1,supportsMidConvoSystemMessages:!1,supportsMidConvoToolAdditions:!1,cacheControlFormat:M,sendSessionAffinityHeaders:k,sessionAffinityFormat:k?"openrouter":"openai",supportsLongCacheRetention:!(u||g||R||a||T)}}function D(e){let n=Ue(e);if(!e.compat)return n;return{supportsStore:e.compat.supportsStore??n.supportsStore,supportsDeveloperRole:e.compat.supportsDeveloperRole??n.supportsDeveloperRole,supportsReasoningEffort:e.compat.supportsReasoningEffort??n.supportsReasoningEffort,supportsUsageInStreaming:e.compat.supportsUsageInStreaming??n.supportsUsageInStreaming,supportsFinishReason:e.compat.supportsFinishReason??n.supportsFinishReason,maxTokensField:e.compat.maxTokensField??n.maxTokensField,requiresToolResultName:e.compat.requiresToolResultName??n.requiresToolResultName,requiresAssistantAfterToolResult:e.compat.requiresAssistantAfterToolResult??n.requiresAssistantAfterToolResult,requiresThinkingAsText:e.compat.requiresThinkingAsText??n.requiresThinkingAsText,requiresReasoningContentOnAssistantMessages:e.compat.requiresReasoningContentOnAssistantMessages??n.requiresReasoningContentOnAssistantMessages,thinkingFormat:e.compat.thinkingFormat??n.thinkingFormat,openRouterRouting:e.compat.openRouterRouting??{},vercelGatewayRouting:e.compat.vercelGatewayRouting??n.vercelGatewayRouting,chatTemplateKwargs:e.compat.chatTemplateKwargs??n.chatTemplateKwargs,chatTemplateArgs:e.compat.chatTemplateArgs??n.chatTemplateArgs,zaiToolStream:e.compat.zaiToolStream??n.zaiToolStream,supportsThinkingTokenBudget:e.compat.supportsThinkingTokenBudget??n.supportsThinkingTokenBudget,thinkingTokenBudgetField:e.compat.thinkingTokenBudgetField??n.thinkingTokenBudgetField,supportsStrictMode:e.compat.supportsStrictMode??n.supportsStrictMode,supportsOpenAIGrammarTools:e.compat.supportsOpenAIGrammarTools??n.supportsOpenAIGrammarTools,supportsMidConvoSystemMessages:e.compat.supportsMidConvoSystemMessages??n.supportsMidConvoSystemMessages,supportsMidConvoToolAdditions:e.compat.supportsMidConvoToolAdditions??n.supportsMidConvoToolAdditions,cacheControlFormat:e.compat.cacheControlFormat??n.cacheControlFormat,sendSessionAffinityHeaders:e.compat.sendSessionAffinityHeaders??n.sendSessionAffinityHeaders,sessionAffinityFormat:e.compat.sessionAffinityFormat??n.sessionAffinityFormat,supportsLongCacheRetention:e.compat.supportsLongCacheRetention??n.supportsLongCacheRetention,vllmPriority:e.compat.vllmPriority}}export{$e as convertMessages,Me as stream,gt as streamSimple};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Z}from"./chunk-fmvs5wd0.js";import{M}from"./chunk-2bz3h7k7.js";import{m}from"./chunk-5ngmwd2s.js";var i=m(M());var t=m(M());import{exec as u}from"child_process";import{promisify as w}from"util";var a=m(Z()),p=(r,e,o)=>{if(e.Version!==1)throw Error(`Profile ${r} credential_process did not return Version 1.`);if(e.AccessKeyId===void 0||e.SecretAccessKey===void 0)throw Error(`Profile ${r} credential_process returned invalid credentials.`);if(e.Expiration){let d=new Date;if(new Date(e.Expiration)<d)throw Error(`Profile ${r} credential_process returned expired credentials.`)}let s=e.AccountId;if(!s&&o?.[r]?.aws_account_id)s=o[r].aws_account_id;let n={accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,...e.SessionToken&&{sessionToken:e.SessionToken},...e.Expiration&&{expiration:new Date(e.Expiration)},...e.CredentialScope&&{credentialScope:e.CredentialScope},...s&&{accountId:s}};return a.setCredentialFeature(n,"CREDENTIALS_PROCESS","w"),n};var f=async(r,e,o)=>{let s=e[r];if(e[r]){let n=s.credential_process;if(n!==void 0){let d=w(t.externalDataInterceptor?.getTokenRecord?.().exec??u);try{let{stdout:c}=await d(n),l;try{l=JSON.parse(c.trim())}catch{throw Error(`Profile ${r} credential_process returned invalid JSON.`)}return p(r,l,e)}catch(c){throw new t.CredentialsProviderError(c.message,{logger:o})}}else throw new t.CredentialsProviderError(`Profile ${r} did not contain credential_process.`,{logger:o})}else throw new t.CredentialsProviderError(`Profile ${r} could not be found in shared credentials file.`,{logger:o})};var P=(r={})=>async({callerClientConfig:e}={})=>{r.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let o=await i.parseKnownFiles(r);return f(i.getProfileName({profile:r.profile??e?.profile}),o,r.logger)};export{P as fromProcess};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{vo,_o,Pi}from"./chunk-v312dzv1.js";export{vo as ENV_KEY,_o as ENV_SECRET,Pi as fromEnv};
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{ge,oe}from"./chunk-2bz3h7k7.js";import{o,f}from"./chunk-5ngmwd2s.js";var _t=o(function(le){var{hasOwn:K}=ge(),{streamCollector:te}=ge();le.streamCollector=te;var{buildQueryString:Q,HttpResponse:J}=oe(),A=f("https"),{Readable:ne}=f("stream"),O=f("http2");function M(e){let t=e&&typeof e==="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let r=Error("Request aborted");return r.name="AbortError",r.cause=t,r}let s=Error(String(t));return s.name="AbortError",s}let n=Error("Request aborted");return n.name="AbortError",n}var se=["ECONNRESET","EPIPE","ETIMEDOUT"],G=(e)=>{let t={};for(let n in e){if(!K(e,n))continue;let s=e[n];t[n]=Array.isArray(s)?s.join(","):s}return t},m={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:(e)=>clearTimeout(e)},j=1000,re=(e,t,n=0)=>{if(!n)return-1;let s=(r)=>{let c=m.setTimeout(()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${n} ms.`),{name:"TimeoutError"}))},n-r),a=(u)=>{if(u?.connecting)u.on("connect",()=>{m.clearTimeout(c)});else m.clearTimeout(c)};if(e.socket)a(e.socket);else e.on("socket",a)};if(n<2000)return s(0),0;return m.setTimeout(s.bind(null,j),j)},ie=(e,t,n=0,s,r)=>{if(n)return m.setTimeout(()=>{let c=`@smithy/node-http-handler - [${s?"ERROR":"WARN"}] a request has exceeded the configured ${n} ms requestTimeout.`;if(s){let a=Object.assign(Error(c),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(a),t(a)}else c+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",r?.warn?.(c)},n);return-1},ce=3000,ae=(e,{keepAlive:t,keepAliveMsecs:n},s=ce)=>{if(t!==!0)return-1;let r=()=>{if(e.socket)e.socket.setKeepAlive(t,n||0);else e.on("socket",(c)=>{c.setKeepAlive(t,n||0)})};if(s===0)return r(),0;return m.setTimeout(r,s)},B=3000,ue=(e,t,n=0)=>{let s=(r)=>{let c=n-r,a=()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${n} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};if(e.socket)e.socket.setTimeout(c,a),e.on("close",()=>e.socket?.removeListener("timeout",a));else e.setTimeout(c,a)};if(0<n&&n<6000)return s(0),0;return m.setTimeout(s.bind(null,n===0?0:B),B)},W=6000;async function X(e,t,n=W,s=!1){let r=t.headers,c=r?r.Expect||r.expect:void 0,a=-1,u=!0;if(!s&&c==="100-continue")u=await Promise.race([new Promise((d)=>{a=Number(m.setTimeout(()=>d(!0),Math.max(W,n)))}),new Promise((d)=>{e.on("continue",()=>{m.clearTimeout(a),d(!0)}),e.on("response",()=>{m.clearTimeout(a),d(!1)}),e.on("error",()=>{m.clearTimeout(a),d(!1)})})]);if(u)fe(e,t.body)}function fe(e,t){if(t instanceof ne){t.pipe(e);return}if(t){let n=Buffer.isBuffer(t);if(n||typeof t==="string"){if(n&&t.byteLength===0)e.end();else e.end(t);return}let r=t;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(t));return}e.end()}var de=0,L=void 0,z=void 0;class U{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){if(typeof e?.handle==="function")return e;return new U(e)}static checkSocketUsage(e,t,n=console){let{sockets:s,requests:r,maxSockets:c}=e;if(typeof c!=="number"||c===1/0)return t;let a=15000;if(Date.now()-a<t)return t;if(s&&r)for(let u in s){if(!K(s,u))continue;let d=s[u]?.length??0,g=r[u]?.length??0;if(d>=c&&g>=2*c)return n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${g} additional requests are enqueued.
3
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
4
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){this.configProvider=new Promise((t,n)=>{if(typeof e==="function")e().then((s)=>{t(this.resolveDefaultConfig(s))}).catch(n);else t(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t,requestTimeout:n}={}){if(!this.config)this.config=await this.configProvider;let s=this.config,r=s.logger,c=e.protocol==="https:";if(!c&&!this.config.httpAgent)this.config.httpAgent=await this.config.httpAgentProvider();return new Promise((a,u)=>{let d=void 0,g=-1,p=-1,w=-1,v=-1,C=-1,_=()=>{m.clearTimeout(g),m.clearTimeout(p),m.clearTimeout(w),m.clearTimeout(v),m.clearTimeout(C)},F=async(i)=>{await d,_(),a(i)},E=async(i)=>{await d,_(),u(i)};if(t?.aborted){let i=M(t);E(i);return}let D=e.headers,H=D?(D.Expect??D.expect)==="100-continue":!1,P=c?s.httpsAgent:s.httpAgent;if(H&&!this.externalAgent)P=new(c?A.Agent:L)({keepAlive:!1,maxSockets:1/0});g=m.setTimeout(()=>{this.socketWarningTimestamp=U.checkSocketUsage(P,this.socketWarningTimestamp,r)},s.socketAcquisitionWarningTimeout??(s.requestTimeout??2000)+(s.connectionTimeout??1000));let I=e.query?Q(e.query):"",b=void 0;if(e.username!=null||e.password!=null){let i=e.username??"",h=e.password??"";b=`${i}:${h}`}let k=e.path;if(I)k+=`?${I}`;if(e.fragment)k+=`#${e.fragment}`;let y=e.hostname??"";if(y[0]==="["&&y.endsWith("]"))y=e.hostname.slice(1,-1);else y=e.hostname;let S={headers:e.headers,host:y,method:e.method,path:k,port:e.port,agent:P,auth:b},T=(c?A.request:z)(S,(i)=>{let h=new J({statusCode:i.statusCode||-1,reason:i.statusMessage,headers:G(i.headers),body:i});F({response:h})});if(T.on("error",(i)=>{if(se.includes(i.code))E(Object.assign(i,{name:"TimeoutError"}));else E(i)}),t){let i=()=>{T.destroy();let h=M(t);E(h)};if(typeof t.addEventListener==="function"){let h=t;h.addEventListener("abort",i,{once:!0}),T.once("close",()=>h.removeEventListener("abort",i))}else t.onabort=i}let R=n??s.requestTimeout;p=re(T,E,s.connectionTimeout),w=ie(T,E,R,s.throwOnRequestTimeout,r??console),v=ue(T,E,s.socketTimeout);let l=S.agent;if(typeof l==="object"&&"keepAlive"in l)C=ae(T,{keepAlive:l.keepAlive,keepAliveMsecs:l.keepAliveMsecs});d=X(T,e,R,this.externalAgent).catch((i)=>(_(),u(i)))})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n)=>{if(e===Symbol.for("logger"))return{...n,logger:n.logger??t};return{...n,[e]:t}})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:n,socketTimeout:s,socketAcquisitionWarningTimeout:r,httpAgent:c,httpsAgent:a,throwOnRequestTimeout:u,logger:d}=e||{},g=!0,p=50;return{connectionTimeout:n,requestTimeout:t,socketTimeout:s,socketAcquisitionWarningTimeout:r,throwOnRequestTimeout:u,httpAgentProvider:async()=>{let w=f("http"),{Agent:v,request:C}=w.default??w;if(z=C,L=v,c instanceof L||typeof c?.destroy==="function")return this.externalAgent=!0,c;return new L({keepAlive:!0,maxSockets:50,...c})},httpsAgent:(()=>{if(a instanceof A.Agent||typeof a?.destroy==="function")return this.externalAgent=!0,a;return new A.Agent({keepAlive:!0,maxSockets:50,...a})})(),logger:d}}}var he=new Uint16Array(1);class N{id=he[0]++;total=0;max=0;session;refs=0;constructor(e){e.unref(),this.session=e}retain(){if(this.session.destroyed)throw Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(this.session.destroyed)return;if(this.refs-=1,this.refs===0)this.session.unref();if(this.refs<0)throw Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){if(!this.session.closed)this.session.close()}destroy(){if(this.refs=0,!this.session.destroyed)this.session.setTimeout(0),this.session.destroy()}useCount(){return this.refs}}class Y{sessions=[];maxConcurrency=0;constructor(e){this.sessions=(e??[]).map((t)=>new N(t))}poll(){let e=!1;for(let t of this.sessions){if(t.deref().destroyed){e=!0;continue}if(!this.maxConcurrency||t.useCount()<this.maxConcurrency)return t}if(e){for(let t of this.sessions)if(t.deref().destroyed)this.remove(t)}}offerLast(e){this.sessions.push(e)}remove(e){let t=this.sessions.indexOf(e);if(t>-1)this.sessions.splice(t,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(e){this.maxConcurrency=e}destroy(e){this.remove(e),e.destroy()}}class Z{config;connectOptions;connectionPools=new Map;constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}lease(e,t){let n=this.getUrlString(e),s=this.getPool(n);if(!this.config.disableConcurrency&&!t.isEventStream){let d=s.poll();if(d)return d.retain(),d}let r=new N(this.connect(n)),c=r.deref();if(this.config.maxConcurrency)c.settings({maxConcurrentStreams:this.config.maxConcurrency},(d)=>{if(d)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())});let a=()=>{this.removeFromPoolAndClose(n,r)},u=()=>{this.removeFromPoolAndCheckedDestroy(n,r)};if(c.on("goaway",a),c.on("error",u),c.on("frameError",u),c.on("close",u),t.requestTimeout)c.setTimeout(t.requestTimeout,u);return s.offerLast(r),r.retain(),r}release(e,t){t.free()}createIsolatedSession(e,t){let n=this.getUrlString(e),s=new N(this.connect(n)),r=s.deref();r.settings({maxConcurrentStreams:1});let c=()=>{s.destroy()};r.on("error",c),r.on("frameError",c),r.on("close",c);let a=t.requestTimeout??300000;return r.setTimeout(a,c),s.retain(),s}destroy(){for(let[e,t]of this.connectionPools){for(let n of[...t])n.destroy();this.connectionPools.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e;for(let t of this.connectionPools.values())t.setMaxConcurrency(e)}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}setNodeHttp2ConnectOptions(e){this.connectOptions=e}debug(){let e={};for(let[t,n]of this.connectionPools){let s=[];for(let r of n)s.push({id:r.id,active:r.useCount(),maxConcurrent:r.max,totalRequests:r.total});e[t]={sessions:s}}return e}removeFromPoolAndClose(e,t){this.connectionPools.get(e)?.remove(t),t.close()}removeFromPoolAndCheckedDestroy(e,t){this.connectionPools.get(e)?.remove(t),t.destroy()}getPool(e){if(!this.connectionPools.has(e)){let t=new Y;if(this.config.maxConcurrency)t.setMaxConcurrency(this.config.maxConcurrency);this.connectionPools.set(e,t)}return this.connectionPools.get(e)}getUrlString(e){return e.destination.toString()}connect(e){return this.connectOptions===void 0?O.connect(e):O.connect(e,this.connectOptions)}}var{constants:V}=O;class q{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new Z({});static create(e){if(typeof e?.handle==="function")return e;return new q(e)}constructor(e){this.configProvider=new Promise((t,n)=>{if(typeof e==="function")e().then((s)=>{t(s||{})}).catch(n);else t(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:n,isEventStream:s}={}){if(!this.config){this.config=await this.configProvider;let{disableConcurrentStreams:d,maxConcurrentStreams:g,nodeHttp2ConnectOptions:p}=this.config;if(this.connectionManager.setDisableConcurrentStreams(d??!1),g)this.connectionManager.setMaxConcurrentStreams(g);if(p)this.connectionManager.setNodeHttp2ConnectOptions(p)}let{requestTimeout:r,disableConcurrentStreams:c}=this.config,a=c||s,u=n??r;return new Promise((d,g)=>{let p=!1,w=void 0,v=async(i)=>{await w,d(i)},C=async(i)=>{await w,g(i)};if(t?.aborted){p=!0;let i=M(t);C(i);return}let{hostname:_,method:F,port:E,protocol:D,query:H}=e,P="";if(e.username!=null||e.password!=null){let i=e.username??"",h=e.password??"";P=`${i}:${h}@`}let I=`${D}//${P}${_}${E?`:${E}`:""}`,b={destination:new URL(I)},k={requestTimeout:this.config?.sessionTimeout,isEventStream:s},y=a?this.connectionManager.createIsolatedSession(b,k):this.connectionManager.lease(b,k),S=y.deref(),x=(i)=>{if(a)y.destroy();p=!0,C(i)},T=H?Q(H):"",R=e.path;if(T)R+=`?${T}`;if(e.fragment)R+=`#${e.fragment}`;let l=S.request({...e.headers,[V.HTTP2_HEADER_PATH]:R,[V.HTTP2_HEADER_METHOD]:F});if(u)l.setTimeout(u,()=>{l.close();let i=Error(`Stream timed out because of no activity for ${u} ms`);i.name="TimeoutError",x(i)});if(t){let i=()=>{l.close();let h=M(t);x(h)};if(typeof t.addEventListener==="function"){let h=t;h.addEventListener("abort",i,{once:!0}),l.once("close",()=>h.removeEventListener("abort",i))}else t.onabort=i}l.on("frameError",(i,h,ee)=>{x(Error(`Frame type id ${i} in stream id ${ee} has failed with code ${h}.`))}),l.on("error",x),l.on("aborted",()=>{x(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${l.rstCode}.`))}),l.on("response",(i)=>{let h=new J({statusCode:i[":status"]??-1,headers:G(i),body:l});if(p=!0,v({response:h}),a)S.close(),l.on("end",()=>{y.destroy()})}),l.on("close",()=>{if(a)y.destroy();else this.connectionManager.release(b,y);if(!p){let i=Error("Unexpected error: http2 request did not get a response");if(S.destroyed)i.name="TimeoutError";x(i)}}),w=X(l,e,u)})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n)=>({...n,[e]:t}))}httpHandlerConfigs(){return this.config??{}}}le.DEFAULT_REQUEST_TIMEOUT=de;le.NodeHttp2Handler=q;le.NodeHttpHandler=U});
5
+ export{_t};
@@ -0,0 +1,25 @@
1
+ // @bun
2
+ import{Database as g}from"bun:sqlite";import{chmodSync as B,closeSync as H,existsSync as R,openSync as W,rmSync as G}from"fs";var V=2,P=2,Ea="basalt-search.db",Ht=0,Br=1;function h(e){let t=new g(":memory:");try{for(let r of e)t.run(r);return!0}catch{return!1}finally{t.close()}}var T;function Aa(){if(T)return T;let e=h(["CREATE VIRTUAL TABLE f USING fts5(text)"]),t=e&&h(["CREATE VIRTUAL TABLE f USING fts5(text, tokenize='trigram')"]);return T={fts5:e,trigram:t,trigramDiacritics:t&&h(["CREATE VIRTUAL TABLE f USING fts5(text, tokenize='trigram remove_diacritics 1')"]),contentlessDelete:e&&h(["CREATE VIRTUAL TABLE f USING fts5(text, content='', contentless_delete=1)","INSERT INTO f (rowid, text) VALUES (1, 'probe')","DELETE FROM f WHERE rowid = 1"]),secureDelete:e&&h(["CREATE VIRTUAL TABLE f USING fts5(text)","INSERT INTO f (f, rank) VALUES ('secure-delete', 1)"])},T}function X(e){return{msg:e.trigram?"trigram":"unicode61",contentless:e.contentlessDelete}}function O(e){return JSON.stringify({schema:V,extractor:P,...e})}function k(e,t){return`text, ${e.contentless?"content='', contentless_delete=1, ":""}detail=full, tokenize="${t}"`}function Y(e,t,r){let n=r.msg==="trigram"?t.trigramDiacritics?"trigram remove_diacritics 1":"trigram":"unicode61 remove_diacritics 2";e.transaction(()=>{if(e.run("CREATE TABLE IF NOT EXISTS meta (k TEXT PRIMARY KEY, v) WITHOUT ROWID"),e.run(`CREATE TABLE IF NOT EXISTS doc (
3
+ id INTEGER PRIMARY KEY,
4
+ hash INTEGER NOT NULL UNIQUE,
5
+ refs INTEGER NOT NULL,
6
+ len INTEGER NOT NULL,
7
+ bulk INTEGER NOT NULL
8
+ )`),e.run(`CREATE TABLE IF NOT EXISTS ref (
9
+ session_id TEXT NOT NULL,
10
+ seq INTEGER NOT NULL,
11
+ part INTEGER NOT NULL,
12
+ doc INTEGER NOT NULL,
13
+ kind INTEGER NOT NULL,
14
+ tool TEXT,
15
+ err INTEGER NOT NULL DEFAULT 0,
16
+ model TEXT,
17
+ time INTEGER NOT NULL,
18
+ PRIMARY KEY (session_id, seq, part)
19
+ ) WITHOUT ROWID`),e.run("CREATE INDEX IF NOT EXISTS ref_doc ON ref(doc,time,kind,tool,err,model)"),e.run("CREATE INDEX IF NOT EXISTS ref_time ON ref(time,session_id,seq,part,doc,kind,tool,err,model)"),e.run("CREATE TABLE IF NOT EXISTS term (t TEXT PRIMARY KEY, n INTEGER NOT NULL) WITHOUT ROWID"),e.run("CREATE TABLE IF NOT EXISTS evicted (session_id TEXT PRIMARY KEY) WITHOUT ROWID"),e.run("CREATE TABLE IF NOT EXISTS backfill_todo (ord INTEGER PRIMARY KEY, session_id TEXT NOT NULL)"),e.run(`CREATE VIRTUAL TABLE IF NOT EXISTS fts USING fts5(${k(r,n)})`),e.run(`CREATE VIRTUAL TABLE IF NOT EXISTS fts_out USING fts5(${k(r,"unicode61 remove_diacritics 2")})`),e.run("CREATE VIRTUAL TABLE IF NOT EXISTS fts_vocab USING fts5vocab(fts, 'row')"),e.run("CREATE VIRTUAL TABLE IF NOT EXISTS fts_out_vocab USING fts5vocab(fts_out, 'row')"),t.secureDelete)e.run("INSERT INTO fts (fts, rank) VALUES ('secure-delete', 1)"),e.run("INSERT INTO fts_out (fts_out, rank) VALUES ('secure-delete', 1)");e.query("INSERT OR REPLACE INTO meta (k, v) VALUES ('fingerprint', ?)").run(O(r)),e.query("INSERT OR REPLACE INTO meta (k, v) VALUES ('layout', ?)").run(JSON.stringify(r))})()}function xs(e){for(let t of["","-wal","-shm","-journal"])G(e+t,{force:!0})}function z(e){for(let t of["","-wal","-shm"])if(R(e+t))B(e+t,384)}function p(e,t){return e.query("SELECT v FROM main.meta WHERE k = ?").get(t)?.v??void 0}function d(e,t,r){e.query("INSERT OR REPLACE INTO main.meta (k, v) VALUES (?, ?)").run(t,r)}function _(e,t,r){let n=X(r),i=!1;if(R(e)){let o=!1;try{let a=new g(e);try{o=a.query("SELECT v FROM meta WHERE k = 'fingerprint'").get()?.v===O(n)}finally{a.close()}}catch{o=!1}if(!o)xs(e),i=!0}if(!R(e))H(W(e,"a",384));let s=new g(e,{create:!0,strict:!0});return s.run("PRAGMA journal_mode = WAL"),s.run("PRAGMA synchronous = NORMAL"),s.run("PRAGMA busy_timeout = 5000"),Y(s,r,n),z(e),s.query("ATTACH ? AS store").run(t),{db:s,layout:n,reset:i}}function Ta(e,t){if(!R(e))return;let r;try{return r=new g(e,{readonly:!0,strict:!0}),r.run("PRAGMA busy_timeout = 5000"),r.query("ATTACH ? AS store").run(t),r.query("SELECT v FROM meta WHERE k = 'layout'").get(),r}catch{r?.close();return}}var D="backfill";function y(e){return e.query("SELECT sum((SELECT max(seq) FROM store.entries WHERE session_id = sessions.id)) AS n FROM store.sessions").get()?.n??0}function j(e){let t=p(e,D);return t?JSON.parse(t):void 0}function M(e,t){d(e,D,JSON.stringify(t))}class A{db;indexer;batch;todo;page;state;constructor(e,t,r=500){this.db=e;this.indexer=t;this.batch=r;this.todo=e.query("SELECT session_id FROM main.backfill_todo WHERE ord = ?"),this.page=e.query("SELECT seq, time, body FROM store.entries WHERE session_id = ? AND seq > ? ORDER BY seq LIMIT ?"),this.state=j(e)}get running(){return this.state?.state==="running"}begin(e){this.db.transaction(()=>{let t=this.db.query("SELECT max(id) AS id FROM store.search_queue").get()?.id??0;d(this.db,"queue_done",t),this.db.run("DELETE FROM main.backfill_todo"),this.db.run("INSERT INTO main.backfill_todo (ord, session_id) SELECT row_number() OVER (ORDER BY updated DESC, id), id FROM store.sessions");let r=this.db.query("SELECT count(*) AS n FROM main.backfill_todo").get()?.n??0,n=y(this.db);this.state={state:r?"running":"done",reason:e,ord:1,seq:-1,total:n,sessionsTotal:r,done:0,sessionsDone:0,startedAt:Date.now()},M(this.db,this.state)})()}step(e){let t=this.state;if(t?.state!=="running")return!1;let r={...t};return this.db.transaction(()=>{let n=this.batch;while(n>0&&r.state==="running"){let i=this.todo.get(r.ord)?.session_id;if(i===void 0){r.state="done",this.db.run("DELETE FROM main.backfill_todo");break}if(r.seq<0)this.indexer.reindex(i,0),r.seq=0;let s=this.page.all(i,r.seq,n);for(let o of s)if(this.indexer.indexRow(i,o.seq,o.time,o.body),r.seq=o.seq,r.done++,n--,performance.now()>e){n=0;break}if(n>0)r.ord++,r.seq=-1,r.sessionsDone++;if(performance.now()>e)break}M(this.db,r)})(),this.state=r,!0}}var Uc=49152,Fc=16384,q=64;function I(e){if(e.length<=65536)return e;return`${e.slice(0,49152)}
20
+ \u2026
21
+ ${e.slice(-16384)}`}var K=/[\u3040-\u30FF\u3400-\u9FFF\uF900-\uFAFF\uAC00-\uD7AF]+/g,Z=/[A-Za-z][a-z0-9]*(?:[A-Z][a-z0-9]+)+|[A-Z]{2,}[a-z0-9]+[A-Za-z0-9]*/g,J=/([a-z0-9])([A-Z])|([A-Z])([A-Z][a-z])/g;function b(e){return e.replace(K,(t)=>{if(t.length===1)return` ${t} `;let r=[];for(let n=0;n<t.length-1;n++)r.push(t.slice(n,n+2));return` ${r.join(" ")} `}).replace(Z,(t)=>`${t} ${t.replace(J,"$1$3 $2$4")}`)}function w(e){return`${e} `}function zr(e){return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]+/g,"").normalize("NFC")}var Q=/[\p{L}\p{N}\p{Co}]+/gu;function Bc(e){return zr(b(e)).match(Q)??[]}var ft={user:1,assistant:2,thinking:3,tool_input:4,tool_output:5,error:6,extension:7,notice:8,attachment:9,title:10},vs=Object.fromEntries(Object.entries(ft).map(([e,t])=>[t,e])),ee=1e4,te=-1,re=2048;function v(e){return e==="tool_output"||e==="attachment"||e==="thinking"||e==="tool_input"}function x(e,t=[],r=0){if(r>6)return t;if(typeof e==="string")t.push(e);else if(typeof e==="number"||typeof e==="boolean")t.push(String(e));else if(Array.isArray(e))for(let n of e)x(n,t,r+1);else if(e&&typeof e==="object")for(let n of Object.values(e))x(n,t,r+1);return t}function qt(e,t=!1){let r=[];switch(e.type){case"user":{if(typeof e.text==="string")r.push({part:0,kind:e.notices?"notice":"user",text:e.text});(Array.isArray(e.attachments)?e.attachments:[]).forEach((i,s)=>{let o=String(i?.name??""),a=i?.kind==="image"?o:`${o}
22
+ ${String(i?.data??"")}`;r.push({part:1+s,kind:"attachment",text:a})});break}case"notice_pending":if(typeof e.notice?.text==="string")r.push({part:0,kind:"notice",text:e.notice.text});break;case"assistant":{let n=typeof e.model==="string"?e.model:void 0;if((Array.isArray(e.parts)?e.parts:[]).forEach((s,o)=>{if(s?.type==="text"||s?.type==="thinking"){if(typeof s.text==="string")r.push({part:o,kind:s.type==="text"?"assistant":"thinking",text:s.text,model:n})}else if(s?.type==="tool_call"){let a=typeof s.name==="string"?s.name:void 0;if(r.push({part:o,kind:"tool_input",tool:a,model:n,text:[a??"",...x(s.input)].join(`
23
+ `)}),typeof s.output==="string")r.push({part:ee+o,kind:"tool_output",tool:a,model:n,text:s.output})}}),typeof e.error==="string")r.push({part:te,kind:"error",err:!0,model:n,text:e.error});break}case"tool_result":{let n=typeof e.name==="string"?e.name:void 0,i=typeof e.output==="string"?e.output:"",s=e.isError===!0;if(r.push({part:0,kind:"tool_output",tool:n,err:s,text:i}),s)r.push({part:1,kind:"error",tool:n,err:s,text:i.slice(0,re)});break}case"run":if("error"in e&&typeof e.error==="string")r.push({part:0,kind:"error",err:!0,text:e.error});break;case"extension":{let n=e.display;if(n&&typeof n.text==="string")r.push({part:0,kind:"extension",text:`${n.title??""}
24
+ ${n.text}`});break}}if(!t)for(let n of r)n.text=I(n.text);return r.filter((n)=>n.text.trim())}function C(e){return e.trim()?[{part:0,kind:"title",text:I(e)}]:[]}function ne(e,t){return BigInt.asIntN(64,Bun.hash.wyhash(`${e?"B":"M"}${t}`))}class N{db;layout;readEntry;readTitle;previousModel;selectRefs;deleteRefs;insertRef;findDoc;insertDoc;increment;decrement;docRefs;deleteDoc;insertMsg;insertOut;deleteMsg;deleteOut;stats={entries:0,fields:0,bytes:0,newDocs:0,newBytes:0};outChanges=0;constructor(e,t){this.db=e;this.layout=t;this.readEntry=e.query("SELECT time, body FROM store.entries WHERE session_id = ? AND seq = ?"),this.readTitle=e.query("SELECT title, created FROM store.sessions WHERE id = ?"),this.previousModel=e.query("SELECT json_extract(body, '$.model') AS model FROM store.entries WHERE session_id = ? AND seq < ? AND json_extract(body, '$.type') = 'assistant' ORDER BY seq DESC LIMIT 1"),this.selectRefs=e.query("SELECT doc FROM main.ref WHERE session_id = ? AND seq = ?"),this.deleteRefs=e.query("DELETE FROM main.ref WHERE session_id = ? AND seq = ?"),this.insertRef=e.query("INSERT INTO main.ref (session_id, seq, part, doc, kind, tool, err, model, time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"),this.findDoc=e.query("SELECT id FROM main.doc WHERE hash = ?"),this.insertDoc=e.query("INSERT INTO main.doc (hash, refs, len, bulk) VALUES (?, 1, ?, ?)"),this.increment=e.query("UPDATE main.doc SET refs = refs + 1 WHERE id = ?"),this.decrement=e.query("UPDATE main.doc SET refs = refs - 1 WHERE id = ?"),this.docRefs=e.query("SELECT refs, bulk FROM main.doc WHERE id = ?"),this.deleteDoc=e.query("DELETE FROM main.doc WHERE id = ?"),this.insertMsg=e.query("INSERT INTO main.fts (rowid, text) VALUES (?, ?)"),this.insertOut=e.query("INSERT INTO main.fts_out (rowid, text) VALUES (?, ?)"),this.deleteMsg=e.query("DELETE FROM main.fts WHERE rowid = ?"),this.deleteOut=e.query("DELETE FROM main.fts_out WHERE rowid = ?")}reindex(e,t){let r=0,n=[];if(t===0){let i=this.readTitle.get(e);if(i)r=i.created,n=C(i.title)}else{let i=this.readEntry.get(e,t);if(i)r=i.time,n=this.fields(e,t,i.body)}this.apply(e,t,r,n)}indexRow(e,t,r,n){this.apply(e,t,r,this.fields(e,t,n))}fields(e,t,r){let n;try{n=JSON.parse(r)}catch{return[]}if(!n||typeof n!=="object")return[];let i=qt(n);if(n.type==="tool_result"&&i.length){let s=this.previousModel.get(e,t)?.model??void 0;if(s)for(let o of i)o.model=s}return i}apply(e,t,r,n){let i=this.selectRefs.all(e,t);if(i.length)this.deleteRefs.run(e,t);this.stats.entries++;for(let s of n){let o=v(s.kind),a=ne(o,s.text);this.stats.fields++,this.stats.bytes+=s.text.length;let u=this.findDoc.get(a)?.id;if(u===void 0){if(u=Number(this.insertDoc.run(a,s.text.length,o?1:0).lastInsertRowid),o)this.insertOut.run(u,b(s.text)),this.outChanges++;else this.insertMsg.run(u,this.layout.msg==="trigram"?w(s.text):b(s.text));this.stats.newDocs++,this.stats.newBytes+=s.text.length}else this.increment.run(u);this.insertRef.run(e,t,s.part,u,ft[s.kind],s.tool??null,s.err?1:0,s.model??null,r)}for(let{doc:s}of i)this.release(s)}release(e){this.decrement.run(e);let t=this.docRefs.get(e);if(!t||t.refs>0)return;if(this.deleteDoc.run(e),t.bulk)this.deleteOut.run(e),this.outChanges++;else this.deleteMsg.run(e)}}class L{db;page;clearRange;clearTail;upsert;constructor(e){this.db=e;this.page=e.query("SELECT term, doc FROM main.fts_out_vocab WHERE term > ? ORDER BY term LIMIT ?"),this.clearRange=e.query("DELETE FROM main.term WHERE t > ? AND t <= ?"),this.clearTail=e.query("DELETE FROM main.term WHERE t > ?"),this.upsert=e.query("INSERT OR REPLACE INTO main.term (t, n) VALUES (?, ?)")}step(e,t){let r=this.page.all(e,t),n=r.at(-1)?.term;if(r.length<t||n===void 0)this.clearTail.run(e);else this.clearRange.run(e,n);for(let{term:i,doc:s}of r)if(i.length<=q)this.upsert.run(i,s);return r.length<t?void 0:n}}var se=2000,ie=30000;class zc{options;db;layout;reset;indexer;backfill;terms;queueRows;queueMax;sliceMs;backfillSliceMs;queueBatch;termRefreshMs;queueDone;termCursor;termStale;lastTermRefresh=Number.NEGATIVE_INFINITY;rateStart;estimate;closed=!1;constructor(e){this.options=e;let t=_(e.indexPath,e.storePath,e.features);if(this.db=t.db,this.layout=t.layout,this.reset=t.reset,this.sliceMs=e.sliceMs??20,this.backfillSliceMs=e.backfillSliceMs??200,this.queueBatch=e.queueBatch??200,this.termRefreshMs=e.termRefreshMs??60000,this.indexer=new N(this.db,this.layout),this.terms=new L(this.db),this.backfill=new A(this.db,this.indexer,e.batch??500),this.queueRows=this.db.query("SELECT id, session_id, seq FROM store.search_queue WHERE id > ? ORDER BY id LIMIT ?"),this.queueMax=this.db.query("SELECT max(id) AS id FROM store.search_queue"),!this.backfill.state)this.backfill.begin(this.reset?"rebuild":"initial");this.queueDone=Number(p(this.db,"queue_done")??0),this.termStale=Number(p(this.db,"term_stale")??0)===1}step(e){if(this.closed)return!1;if(this.drainQueue(e??performance.now()+this.sliceMs))return!0;if(this.backfill.running){this.rateStart??={time:performance.now(),done:this.backfill.state?.done??0};let t=this.indexer.outChanges;if(this.backfill.step(e??performance.now()+this.backfillSliceMs),this.markTerms(t),!this.backfill.running)this.lastTermRefresh=Number.NEGATIVE_INFINITY;return!0}return this.refreshTerms(e??performance.now()+this.sliceMs)}drain(){while(this.step());}drainQueue(e){let t=!1;return this.db.transaction(()=>{let r=this.queueRows.all(this.queueDone,this.queueBatch);if(!r.length)return;t=!0;let n=this.indexer.outChanges,i=new Set,s=this.queueDone;for(let o of r){let a=`${o.seq}\x00${o.session_id}`;if(!i.has(a))i.add(a),this.indexer.reindex(o.session_id,o.seq);if(s=o.id,performance.now()>e)break}d(this.db,"queue_done",s),this.markTerms(n),this.queueDone=s})(),t}markTerms(e){if(this.indexer.outChanges===e||this.termStale)return;this.termStale=!0,d(this.db,"term_stale",1)}refreshTerms(e){if(this.termCursor===void 0){if(!this.termStale||performance.now()-this.lastTermRefresh<this.termRefreshMs)return!1;this.termCursor="",this.termStale=!1,this.indexer.outChanges=0,d(this.db,"term_stale",0)}while(this.termCursor!==void 0&&performance.now()<=e){let t=this.termCursor;this.db.transaction(()=>{this.termCursor=this.terms.step(t,se)})()}if(this.termCursor===void 0)this.lastTermRefresh=performance.now();return!0}status(){let e=this.queueMax.get()?.id??this.queueDone,t=this.backfill.state,r;if(t?.state==="running"&&this.rateStart){let i=(performance.now()-this.rateStart.time)/1000,s=(t.done-this.rateStart.done)/i;if(i>0.5&&s>0)r=Math.max(0,Math.round(Math.max(0,t.total-t.done)/s))}let n=t?{state:t.state,reason:t.reason,total:t.total,done:t.done,sessionsTotal:t.sessionsTotal,sessionsDone:t.sessionsDone,startedAt:t.startedAt}:void 0;if(!this.estimate||performance.now()-this.estimate.time>ie)this.estimate={time:performance.now(),entries:y(this.db)};return{queueDone:this.queueDone,lag:Math.max(0,e-this.queueDone),entries:this.estimate.entries,...n?{backfill:n}:{},...r!==void 0?{etaSec:r}:{},layout:this.layout,reset:this.reset}}withIndex(e){return e(this.db)}compact(e){if(this.closed)return;if(e.vacuum)this.db.run("INSERT INTO main.fts(fts) VALUES('optimize')"),this.db.run("INSERT INTO main.fts_out(fts_out) VALUES('optimize')"),this.db.run("VACUUM main");if(e.checkpoint||e.vacuum)this.db.run("PRAGMA main.wal_checkpoint(TRUNCATE)")}close(){if(this.closed)return;this.closed=!0,this.db.close()}}var F=1000,oe=100;function ae(e){let t,r,n,i=!1,s=!1,o=0,a=[],u=(f)=>e.postMessage(f),m=(f)=>{if(s)return;if(n)clearTimeout(n);n=setTimeout(U,f)},S=()=>{if(!r||Atomics.load(r,Ht)!==1)return;Atomics.store(r,Br,1),Atomics.notify(r,Br);while(Atomics.load(r,Ht)===1)Atomics.wait(r,Ht,1,1e4);Atomics.store(r,Br,0)};function U(){if(n=void 0,s||!t)return;S();let f=!1;try{f=t.step()}catch(E){u({type:"error",message:E instanceof Error?E.message:String(E),fatal:!1}),i=!1,m(F);return}let l=performance.now();if(f){if(i=!0,l-o>=oe)o=l,u({type:"status",status:t.status()});m(0);return}i=!1,o=l;let c=t.status();u({type:"status",status:c});for(let E of a.splice(0))u({type:"flushed",id:E,status:c});m(F)}e.onmessage=(f)=>{let l=f.data;if(l.type==="init"){r=new Int32Array(l.flags);try{t=new zc(l.options)}catch(c){u({type:"error",message:c instanceof Error?c.message:String(c),fatal:!0});return}u({type:"status",status:t.status()}),m(0)}else if(l.type==="dirty"){if(!i)m(0)}else if(l.type==="pause")S();else if(l.type==="flush"){if(a.push(l.id),!i)m(0)}else if(l.type==="compact"){if(S(),t){try{t.compact(l)}catch(c){u({type:"error",message:c instanceof Error?c.message:String(c),fatal:!1})}u({type:"flushed",id:l.id,status:t.status()})}}else if(l.type==="stop"){if(s=!0,n)clearTimeout(n);t?.close(),u({type:"stopped"})}}}if(!Bun.isMainThread)ae(globalThis);
25
+ export{Ea,Ht,Br,Aa,xs,Ta,Uc,Fc,zr,Bc,ft,vs,qt,zc};
@@ -0,0 +1,8 @@
1
+ // @bun
2
+ import{ne}from"./chunk-19nje7ny.js";import{O}from"./chunk-ma4nhnnj.js";import{le,Ue}from"./chunk-fpksd95h.js";import{J,dn,it}from"./chunk-23qfxx3v.js";class u extends Error{code;diagnosticDetails;constructor(r,t,n){super(r);this.name="PiMessagesResponseError",this.code=t,this.diagnosticDetails=n}}function x(r){try{let t=JSON.parse(r),n=t?.error;return t&&typeof n==="object"&&n!==null&&!Array.isArray(n)?t:void 0}catch{return}}function m(r){return r.length>8192?`${r.slice(0,8192)}\u2026`:r}function y(r,t,n){let e=typeof n?.error?.message==="string"?n.error.message:void 0,s=typeof n?.error?.code==="string"?n.error.code:void 0,a=e??t,o=s?` (${s})`:"";return`${r.status} ${r.statusText}: ${a}${o}`}function k(r,t,n,e){let s=x(e),a=typeof s?.error?.code==="string"?s.error.code:void 0;return new u(y(n,e,s),a,{version:1,provider:r.provider,model:r.id,url:t.toString(),status:n.status,statusText:n.statusText,...s?.error===void 0?{}:{error:s.error},...s?{}:{body:m(e)},timestampMs:Date.now()})}function h(){return{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}}}function l(r,t){if(!t)return;it(r,{type:"pi_messages_rewrite",timestamp:Date.now(),details:{...t}})}function w(r){let t={role:"assistant",content:[],api:r.api,provider:r.provider,model:r.id,usage:h(),stopReason:"pending",timestamp:Date.now()},n=new Map;return(e)=>{switch(e.type){case"done":if(Object.assign(t,{stopReason:e.reason,usage:e.usage,responseId:e.responseId}),e.providerThinkingLevel!==void 0)t.providerThinkingLevel=e.providerThinkingLevel;return l(t,e.rewrite),{type:"done",reason:e.reason,message:t};case"error":if(Object.assign(t,{stopReason:e.reason,usage:e.usage,errorMessage:e.errorMessage,responseId:e.responseId}),e.providerThinkingLevel!==void 0)t.providerThinkingLevel=e.providerThinkingLevel;return l(t,e.rewrite),{type:"error",reason:e.reason,error:t};case"start":break;case"text_start":t.content[e.contentIndex]={type:"text",text:""};break;case"text_delta":t.content[e.contentIndex].text+=e.delta;break;case"text_end":Object.assign(t.content[e.contentIndex],{text:e.content,textSignature:e.contentSignature});break;case"thinking_start":t.content[e.contentIndex]={type:"thinking",thinking:""};break;case"thinking_delta":t.content[e.contentIndex].thinking+=e.delta;break;case"thinking_end":Object.assign(t.content[e.contentIndex],{thinking:e.content,thinkingSignature:e.contentSignature,redacted:e.redacted});break;case"toolcall_start":t.content[e.contentIndex]={type:"toolCall",id:e.id,name:e.toolName,arguments:{}},n.set(e.contentIndex,"");break;case"toolcall_delta":{let s=`${n.get(e.contentIndex)??""}${e.delta}`;n.set(e.contentIndex,s),t.content[e.contentIndex].arguments=ne(s);break}case"toolcall_end":return Object.assign(t.content[e.contentIndex],e.toolCall),n.delete(e.contentIndex),{type:"toolcall_end",contentIndex:e.contentIndex,toolCall:t.content[e.contentIndex],partial:t}}return{...e,partial:t}}}async function*b(r){let t=new TextDecoder,n=r.getReader(),e="";try{while(!0){let{done:s,value:a}=await n.read();e+=s?t.decode():t.decode(a,{stream:!0}),e=e.replace(/\r\n/g,`
3
+ `);let o=e.indexOf(`
4
+
5
+ `);while(o!==-1){let c=f(e.slice(0,o));if(c)yield c;e=e.slice(o+2),o=e.indexOf(`
6
+
7
+ `)}if(s)break}if(e.trim()){let s=f(e);if(s)yield s}}finally{n.releaseLock()}}function f(r){let t=r.split(`
8
+ `).find((n)=>n.startsWith("data:"))?.slice(5).trim();return t&&t!=="[DONE]"?JSON.parse(t):void 0}function I(r,t,n){let e=n?"aborted":"error",s={role:"assistant",content:[],api:r.api,provider:r.provider,model:r.id,usage:h(),stopReason:e,errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()};if(!n&&t instanceof u)it(s,dn("pi_messages_response_failure",t,t.diagnosticDetails));return{type:"error",reason:e,error:s}}function E(r,t){if(r)return r;return O("PI_CACHE_RETENTION",t)==="long"?"long":void 0}var T=(r,t,n)=>{let e=new J,s=w(r);return(async()=>{try{let a=n?.apiKey;if(!a)throw Error(`No API key provided for provider "${r.provider}"`);let o=new URL(`${r.baseUrl.replace(/\/+$/u,"")}/messages`);if(n?.debug)o.searchParams.set("debug","1");let c={model:r.id,context:t,options:{temperature:n?.temperature,maxTokens:n?.maxTokens,reasoning:n?.reasoning,cacheRetention:E(n?.cacheRetention,n?.env),sessionId:n?.sessionId,toolChoice:n?.toolChoice}},p=await n?.onPayload?.(c,r);if(p!==void 0)c=p;let i=await(n?.fetch??globalThis.fetch)(o,{method:"POST",headers:{authorization:`Bearer ${a}`,accept:"text/event-stream","content-type":"application/json",...Ue(n?.headers)},body:JSON.stringify(c),signal:n?.signal});if(await n?.onResponse?.({status:i.status,headers:le(i.headers)},r),!i.ok){let d=await i.text();throw k(r,o,i,d)}if(!i.body)throw Error(`${r.provider} response has no body`);for await(let d of b(i.body)){await n?.onProviderStreamEvent?.(d,r);let g=s(d);if(e.push(g),g.type==="done"||g.type==="error")return}throw Error(`${r.provider} stream ended without a terminal event`)}catch(a){e.push(I(r,a,n?.signal?.aborted??!1))}})(),e},P=(r,t,n)=>{let e=n;return T(r,t,{...n,reasoning:n?.reasoning,toolChoice:n?.toolChoice,debug:e?.debug})};export{u as PiMessagesResponseError,T as stream,P as streamSimple};