@bkm016/basalt 0.1.26 → 0.1.27

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 (992) hide show
  1. package/chunk-00jhevnt.js +3 -0
  2. package/chunk-04tx0etc.js +2 -0
  3. package/chunk-0r86p29p.js +7 -0
  4. package/chunk-10x1zefx.js +25 -0
  5. package/chunk-1amcz1cz.js +10 -0
  6. package/chunk-1pfdps04.js +2 -0
  7. package/chunk-206g40v9.js +59 -0
  8. package/chunk-2364s958.js +7 -0
  9. package/chunk-3fv2qcpg.js +12 -0
  10. package/chunk-3zz4a5tn.js +31 -0
  11. package/chunk-45wfmdts.js +44 -0
  12. package/chunk-4hkwjw05.js +2 -0
  13. package/chunk-4pq7ycp2.js +5 -0
  14. package/chunk-51f8zbj5.js +3 -0
  15. package/chunk-5e0qfdgx.js +5 -0
  16. package/chunk-7hpf9qq2.js +3 -0
  17. package/chunk-82dkdvs9.js +2 -0
  18. package/chunk-8913dkey.js +3 -0
  19. package/chunk-8g1sbmwf.js +3 -0
  20. package/chunk-8hfch7d0.js +2 -0
  21. package/chunk-90arpvgz.js +2 -0
  22. package/chunk-912knnfg.js +11 -0
  23. package/chunk-97bazdk3.js +20 -0
  24. package/chunk-9akexjfn.js +2 -0
  25. package/chunk-9dgmbwcc.js +2 -0
  26. package/chunk-acd2cwza.js +3 -0
  27. package/chunk-ach16jbw.js +2 -0
  28. package/chunk-ax823t5v.js +3 -0
  29. package/chunk-b03hg30w.js +2 -0
  30. package/chunk-bh29df86.js +5 -0
  31. package/chunk-bhpg72c4.js +2 -0
  32. package/chunk-bwww6j2q.js +2 -0
  33. package/chunk-c126k8wc.js +2 -0
  34. package/chunk-cb3jgak9.js +3 -0
  35. package/chunk-cjeyy6da.js +3 -0
  36. package/chunk-cs4gb2hb.js +2 -0
  37. package/chunk-en5t6hwd.js +3 -0
  38. package/chunk-f4n1csz0.js +3 -0
  39. package/chunk-fqfjjhkj.js +3 -0
  40. package/chunk-h4bvkm6p.js +3 -0
  41. package/chunk-j01t6mnq.js +3 -0
  42. package/chunk-j16smb6d.js +2 -0
  43. package/chunk-j7eqp97m.js +2 -0
  44. package/chunk-jdrqn8m1.js +2 -0
  45. package/chunk-jp1gqkbp.js +4 -0
  46. package/chunk-jrcvxscb.js +9 -0
  47. package/chunk-jxcghx26.js +50 -0
  48. package/chunk-k8zq95wr.js +2 -0
  49. package/chunk-ken7ras9.js +8 -0
  50. package/chunk-kqgpjmcf.js +2 -0
  51. package/chunk-krbdx24j.js +3 -0
  52. package/chunk-ky2ym708.js +8 -0
  53. package/chunk-kzfy666j.js +16 -0
  54. package/chunk-n0stnnxv.js +2 -0
  55. package/chunk-n9m2pagh.js +2 -0
  56. package/chunk-nedvy6yk.js +10 -0
  57. package/chunk-ng5g0fy3.js +3 -0
  58. package/chunk-nqeqasyt.js +7 -0
  59. package/chunk-nt30x5a7.js +3 -0
  60. package/chunk-pa7yh2q3.js +3 -0
  61. package/chunk-q1s5r204.js +3 -0
  62. package/chunk-qj0vfk01.js +2 -0
  63. package/chunk-qqfdg01g.js +3 -0
  64. package/chunk-rj6qknjx.js +12 -0
  65. package/chunk-rvrj0nrs.js +3 -0
  66. package/chunk-sbhj5h2q.js +2 -0
  67. package/chunk-t71zzafh.js +3 -0
  68. package/chunk-t7fwvzmh.js +3 -0
  69. package/chunk-tpv5hz99.js +5 -0
  70. package/chunk-tx2rrrtq.js +2 -0
  71. package/chunk-tyzzbhr5.js +3 -0
  72. package/chunk-tzbefwf0.js +286 -0
  73. package/chunk-v4p8807b.js +18 -0
  74. package/chunk-vnxjcym9.js +17 -0
  75. package/chunk-w35r8v6x.js +39 -0
  76. package/chunk-wbygknv2.js +3 -0
  77. package/chunk-wk63htqy.js +2 -0
  78. package/chunk-wwazj6mz.js +3 -0
  79. package/chunk-x3g1bzq6.js +51 -0
  80. package/chunk-xpc75mkw.js +25 -0
  81. package/chunk-ydhdewcv.js +4014 -0
  82. package/chunk-ypxn8bec.js +3 -0
  83. package/chunk-yztc2q9q.js +490 -0
  84. package/compiled.js +9 -9
  85. package/package.json +1 -1
  86. package/ui-test-worker.js +52 -52
  87. package/web/chunk-00a6amwf.js +1 -0
  88. package/web/chunk-00a6amwf.js.br +0 -0
  89. package/web/chunk-00a6amwf.js.gz +0 -0
  90. package/web/chunk-023b3kdx.js +214 -0
  91. package/web/chunk-023b3kdx.js.br +0 -0
  92. package/web/chunk-023b3kdx.js.gz +0 -0
  93. package/web/chunk-1bzdt1n8.js +1 -0
  94. package/web/chunk-1bzdt1n8.js.br +2 -0
  95. package/web/chunk-1bzdt1n8.js.gz +0 -0
  96. package/web/chunk-1fnxbfkf.js +139 -0
  97. package/web/chunk-1fnxbfkf.js.br +0 -0
  98. package/web/chunk-1fnxbfkf.js.gz +0 -0
  99. package/web/chunk-1hmw1eaw.js +1 -0
  100. package/web/chunk-1hmw1eaw.js.br +0 -0
  101. package/web/chunk-1hmw1eaw.js.gz +0 -0
  102. package/web/chunk-1qd75yjn.js +2 -0
  103. package/web/chunk-1qd75yjn.js.br +0 -0
  104. package/web/chunk-1qd75yjn.js.gz +0 -0
  105. package/web/chunk-20gcnbgn.js +2 -0
  106. package/web/chunk-20gcnbgn.js.br +0 -0
  107. package/web/chunk-20gcnbgn.js.gz +0 -0
  108. package/web/chunk-20v068s6.js +1 -0
  109. package/web/chunk-20v068s6.js.br +0 -0
  110. package/web/chunk-20v068s6.js.gz +0 -0
  111. package/web/chunk-22jfhjk3.js +2 -0
  112. package/web/chunk-22jfhjk3.js.br +0 -0
  113. package/web/chunk-22jfhjk3.js.gz +0 -0
  114. package/web/chunk-2nwvdqxm.js +1 -0
  115. package/web/chunk-2nwvdqxm.js.br +0 -0
  116. package/web/chunk-2nwvdqxm.js.gz +0 -0
  117. package/web/chunk-2wvgy7f4.js +1 -0
  118. package/web/chunk-2wvgy7f4.js.br +0 -0
  119. package/web/chunk-2wvgy7f4.js.gz +0 -0
  120. package/web/chunk-37hn49td.js +2 -0
  121. package/web/chunk-37hn49td.js.br +0 -0
  122. package/web/chunk-37hn49td.js.gz +0 -0
  123. package/web/chunk-3crfxxst.js +21 -0
  124. package/web/chunk-3crfxxst.js.br +0 -0
  125. package/web/chunk-3crfxxst.js.gz +0 -0
  126. package/web/chunk-3hg9a6xa.js +1 -0
  127. package/web/chunk-3hg9a6xa.js.br +0 -0
  128. package/web/chunk-3hg9a6xa.js.gz +0 -0
  129. package/web/chunk-3m2nnnk5.js +1 -0
  130. package/web/chunk-3m2nnnk5.js.br +0 -0
  131. package/web/chunk-3m2nnnk5.js.gz +0 -0
  132. package/web/chunk-3ry5cjnp.js +169 -0
  133. package/web/chunk-3ry5cjnp.js.br +0 -0
  134. package/web/chunk-3ry5cjnp.js.gz +0 -0
  135. package/web/chunk-407zrkgx.js +40 -0
  136. package/web/chunk-407zrkgx.js.br +0 -0
  137. package/web/chunk-407zrkgx.js.gz +0 -0
  138. package/web/chunk-414npx47.js +1 -0
  139. package/web/chunk-414npx47.js.br +0 -0
  140. package/web/chunk-414npx47.js.gz +0 -0
  141. package/web/chunk-43e1ste5.js +1 -0
  142. package/web/chunk-43e1ste5.js.br +0 -0
  143. package/web/chunk-43e1ste5.js.gz +0 -0
  144. package/web/chunk-45ex0e3e.js +2 -0
  145. package/web/chunk-45ex0e3e.js.br +0 -0
  146. package/web/chunk-45ex0e3e.js.gz +0 -0
  147. package/web/chunk-508cpafz.js +142 -0
  148. package/web/chunk-508cpafz.js.br +0 -0
  149. package/web/chunk-508cpafz.js.gz +0 -0
  150. package/web/chunk-538r4sey.js +1 -0
  151. package/web/chunk-538r4sey.js.br +0 -0
  152. package/web/chunk-538r4sey.js.gz +0 -0
  153. package/web/chunk-55zs0yq1.js +1 -0
  154. package/web/chunk-55zs0yq1.js.br +0 -0
  155. package/web/chunk-55zs0yq1.js.gz +0 -0
  156. package/web/chunk-58gh3tbh.js +34 -0
  157. package/web/chunk-58gh3tbh.js.br +0 -0
  158. package/web/chunk-58gh3tbh.js.gz +0 -0
  159. package/web/chunk-5h3r1hpg.js +89 -0
  160. package/web/chunk-5h3r1hpg.js.br +0 -0
  161. package/web/chunk-5h3r1hpg.js.gz +0 -0
  162. package/web/chunk-68q4nnmc.js +2 -0
  163. package/web/chunk-68q4nnmc.js.br +3 -0
  164. package/web/chunk-68q4nnmc.js.gz +0 -0
  165. package/web/chunk-6ktmzq32.js +16 -0
  166. package/web/chunk-6ktmzq32.js.br +0 -0
  167. package/web/chunk-6ktmzq32.js.gz +0 -0
  168. package/web/chunk-6ry6x1ez.js +1 -0
  169. package/web/chunk-6ry6x1ez.js.br +0 -0
  170. package/web/chunk-6ry6x1ez.js.gz +0 -0
  171. package/web/chunk-6wxxypbv.js +7 -0
  172. package/web/chunk-6wxxypbv.js.br +0 -0
  173. package/web/chunk-6wxxypbv.js.gz +0 -0
  174. package/web/chunk-6x9r1z9z.js +291 -0
  175. package/web/chunk-6x9r1z9z.js.br +0 -0
  176. package/web/chunk-6x9r1z9z.js.gz +0 -0
  177. package/web/chunk-719tz8xw.js +1 -0
  178. package/web/chunk-719tz8xw.js.br +0 -0
  179. package/web/chunk-719tz8xw.js.gz +0 -0
  180. package/web/chunk-7devrtv4.js +2 -0
  181. package/web/chunk-7devrtv4.js.br +3 -0
  182. package/web/chunk-7devrtv4.js.gz +0 -0
  183. package/web/chunk-7rs26q98.js +2 -0
  184. package/web/chunk-7rs26q98.js.br +0 -0
  185. package/web/chunk-7rs26q98.js.gz +0 -0
  186. package/web/chunk-82aqq58f.js +24 -0
  187. package/web/chunk-82aqq58f.js.br +0 -0
  188. package/web/chunk-82aqq58f.js.gz +0 -0
  189. package/web/chunk-96n00vam.js +1 -0
  190. package/web/chunk-96n00vam.js.br +0 -0
  191. package/web/chunk-96n00vam.js.gz +0 -0
  192. package/web/chunk-99c0h3v7.js +1 -0
  193. package/web/chunk-99c0h3v7.js.br +0 -0
  194. package/web/chunk-99c0h3v7.js.gz +0 -0
  195. package/web/chunk-a11ev6ff.js +1 -0
  196. package/web/chunk-a11ev6ff.js.br +0 -0
  197. package/web/chunk-a11ev6ff.js.gz +0 -0
  198. package/web/chunk-a1cpkzwh.js +2 -0
  199. package/web/chunk-a1cpkzwh.js.br +0 -0
  200. package/web/chunk-a1cpkzwh.js.gz +0 -0
  201. package/web/chunk-a31z4c14.js +4 -0
  202. package/web/chunk-a31z4c14.js.br +0 -0
  203. package/web/chunk-a31z4c14.js.gz +0 -0
  204. package/web/chunk-aan5qk6x.js +1 -0
  205. package/web/chunk-aan5qk6x.js.br +0 -0
  206. package/web/chunk-aan5qk6x.js.gz +0 -0
  207. package/web/chunk-b07y0tzq.js +1 -0
  208. package/web/chunk-b07y0tzq.js.br +0 -0
  209. package/web/chunk-b07y0tzq.js.gz +0 -0
  210. package/web/chunk-b4d1948q.js +62 -0
  211. package/web/chunk-b4d1948q.js.br +0 -0
  212. package/web/chunk-b4d1948q.js.gz +0 -0
  213. package/web/chunk-btk2h3vh.js +36 -0
  214. package/web/chunk-btk2h3vh.js.br +0 -0
  215. package/web/chunk-btk2h3vh.js.gz +0 -0
  216. package/web/chunk-bw9crrb4.js +1 -0
  217. package/web/chunk-bw9crrb4.js.br +0 -0
  218. package/web/chunk-bw9crrb4.js.gz +0 -0
  219. package/web/chunk-c1s7faqj.js +2 -0
  220. package/web/chunk-c1s7faqj.js.br +0 -0
  221. package/web/chunk-c1s7faqj.js.gz +0 -0
  222. package/web/chunk-c3d08dw1.js +1 -0
  223. package/web/chunk-c3d08dw1.js.br +0 -0
  224. package/web/chunk-c3d08dw1.js.gz +0 -0
  225. package/web/chunk-cgt871p9.js +1 -0
  226. package/web/chunk-cgt871p9.js.br +0 -0
  227. package/web/chunk-cgt871p9.js.gz +0 -0
  228. package/web/chunk-crfbqd4d.js +2 -0
  229. package/web/chunk-crfbqd4d.js.br +0 -0
  230. package/web/chunk-crfbqd4d.js.gz +0 -0
  231. package/web/chunk-ctr4kt7p.js +332 -0
  232. package/web/chunk-ctr4kt7p.js.br +0 -0
  233. package/web/chunk-ctr4kt7p.js.gz +0 -0
  234. package/web/chunk-cys4n4sv.js +1 -0
  235. package/web/chunk-cys4n4sv.js.br +0 -0
  236. package/web/chunk-cys4n4sv.js.gz +0 -0
  237. package/web/chunk-d5n2yz4e.js +2 -0
  238. package/web/chunk-d5n2yz4e.js.br +0 -0
  239. package/web/chunk-d5n2yz4e.js.gz +0 -0
  240. package/web/chunk-d6wcabaa.css +1 -0
  241. package/web/chunk-d6wcabaa.css.br +0 -0
  242. package/web/chunk-d6wcabaa.css.gz +0 -0
  243. package/web/chunk-d7nrrcwp.js +38 -0
  244. package/web/chunk-d7nrrcwp.js.br +0 -0
  245. package/web/chunk-d7nrrcwp.js.gz +0 -0
  246. package/web/chunk-df9ja645.js +1 -0
  247. package/web/chunk-df9ja645.js.br +0 -0
  248. package/web/chunk-df9ja645.js.gz +0 -0
  249. package/web/chunk-dhxc6xe9.js +1 -0
  250. package/web/chunk-dhxc6xe9.js.br +2 -0
  251. package/web/chunk-dhxc6xe9.js.gz +0 -0
  252. package/web/chunk-dy2egpw5.js +12 -0
  253. package/web/chunk-dy2egpw5.js.br +0 -0
  254. package/web/chunk-dy2egpw5.js.gz +0 -0
  255. package/web/chunk-e4cwyn1g.js +2 -0
  256. package/web/chunk-e4cwyn1g.js.br +0 -0
  257. package/web/chunk-e4cwyn1g.js.gz +0 -0
  258. package/web/chunk-efjc9mga.js +2 -0
  259. package/web/chunk-efjc9mga.js.br +0 -0
  260. package/web/chunk-efjc9mga.js.gz +0 -0
  261. package/web/chunk-eq59kad4.js +303 -0
  262. package/web/chunk-eq59kad4.js.br +0 -0
  263. package/web/chunk-eq59kad4.js.gz +0 -0
  264. package/web/chunk-f05s9gsw.js +7 -0
  265. package/web/chunk-f05s9gsw.js.br +0 -0
  266. package/web/chunk-f05s9gsw.js.gz +0 -0
  267. package/web/chunk-f2bb976c.js +1 -0
  268. package/web/chunk-f2bb976c.js.br +0 -0
  269. package/web/chunk-f2bb976c.js.gz +0 -0
  270. package/web/chunk-f4aabnnv.js +1 -0
  271. package/web/chunk-f4aabnnv.js.br +0 -0
  272. package/web/chunk-f4aabnnv.js.gz +0 -0
  273. package/web/chunk-f5wyg9zh.js +2 -0
  274. package/web/chunk-f5wyg9zh.js.br +0 -0
  275. package/web/chunk-f5wyg9zh.js.gz +0 -0
  276. package/web/chunk-fmbc7t17.js +7 -0
  277. package/web/chunk-fmbc7t17.js.br +0 -0
  278. package/web/chunk-fmbc7t17.js.gz +0 -0
  279. package/web/chunk-ftdzs90e.js +1 -0
  280. package/web/chunk-ftdzs90e.js.br +0 -0
  281. package/web/chunk-ftdzs90e.js.gz +0 -0
  282. package/web/chunk-g0s2xxfd.js +324 -0
  283. package/web/chunk-g0s2xxfd.js.br +0 -0
  284. package/web/chunk-g0s2xxfd.js.gz +0 -0
  285. package/web/chunk-g1k9nggh.js +39 -0
  286. package/web/chunk-g1k9nggh.js.br +0 -0
  287. package/web/chunk-g1k9nggh.js.gz +0 -0
  288. package/web/chunk-g26mzwzc.js +1 -0
  289. package/web/chunk-g26mzwzc.js.br +0 -0
  290. package/web/chunk-g26mzwzc.js.gz +0 -0
  291. package/web/chunk-g7b4p9k9.js +1 -0
  292. package/web/chunk-g7b4p9k9.js.br +0 -0
  293. package/web/chunk-g7b4p9k9.js.gz +0 -0
  294. package/web/chunk-ghr3jf15.js +140 -0
  295. package/web/chunk-ghr3jf15.js.br +0 -0
  296. package/web/chunk-ghr3jf15.js.gz +0 -0
  297. package/web/chunk-gv4zh4er.js +1 -0
  298. package/web/chunk-gv4zh4er.js.br +0 -0
  299. package/web/chunk-gv4zh4er.js.gz +0 -0
  300. package/web/chunk-gvndjaan.js +2 -0
  301. package/web/chunk-gvndjaan.js.br +0 -0
  302. package/web/chunk-gvndjaan.js.gz +0 -0
  303. package/web/chunk-gw0e69yj.js +1 -0
  304. package/web/chunk-gw0e69yj.js.br +0 -0
  305. package/web/chunk-gw0e69yj.js.gz +0 -0
  306. package/web/chunk-gxwsf4t1.js +2 -0
  307. package/web/chunk-gxwsf4t1.js.br +0 -0
  308. package/web/chunk-gxwsf4t1.js.gz +0 -0
  309. package/web/chunk-hh6vpvar.js +84 -0
  310. package/web/chunk-hh6vpvar.js.br +0 -0
  311. package/web/chunk-hh6vpvar.js.gz +0 -0
  312. package/web/chunk-hxqqy585.js +1 -0
  313. package/web/chunk-hxqqy585.js.br +0 -0
  314. package/web/chunk-hxqqy585.js.gz +0 -0
  315. package/web/chunk-hxsrph02.js +1139 -0
  316. package/web/chunk-hxsrph02.js.br +0 -0
  317. package/web/chunk-hxsrph02.js.gz +0 -0
  318. package/web/chunk-hxx6ad4x.js +1 -0
  319. package/web/chunk-hxx6ad4x.js.br +0 -0
  320. package/web/chunk-hxx6ad4x.js.gz +0 -0
  321. package/web/chunk-hzvff525.js +2 -0
  322. package/web/chunk-hzvff525.js.br +0 -0
  323. package/web/chunk-hzvff525.js.gz +0 -0
  324. package/web/chunk-j2gkg76r.js +2 -0
  325. package/web/chunk-j2gkg76r.js.br +0 -0
  326. package/web/chunk-j2gkg76r.js.gz +0 -0
  327. package/web/chunk-jcbheqv1.js +1 -0
  328. package/web/chunk-jcbheqv1.js.br +0 -0
  329. package/web/chunk-jcbheqv1.js.gz +0 -0
  330. package/web/chunk-jhx6v9es.js +1 -0
  331. package/web/chunk-jhx6v9es.js.br +0 -0
  332. package/web/chunk-jhx6v9es.js.gz +0 -0
  333. package/web/chunk-jnhem746.js +292 -0
  334. package/web/chunk-jnhem746.js.br +0 -0
  335. package/web/chunk-jnhem746.js.gz +0 -0
  336. package/web/chunk-jr796qsk.js +1 -0
  337. package/web/chunk-jr796qsk.js.br +0 -0
  338. package/web/chunk-jr796qsk.js.gz +0 -0
  339. package/web/chunk-jw92texh.js +1 -0
  340. package/web/chunk-jw92texh.js.br +0 -0
  341. package/web/chunk-jw92texh.js.gz +0 -0
  342. package/web/chunk-k89686qj.js +2 -0
  343. package/web/chunk-k89686qj.js.br +0 -0
  344. package/web/chunk-k89686qj.js.gz +0 -0
  345. package/web/chunk-mqdvg55y.js +2 -0
  346. package/web/chunk-mqdvg55y.js.br +0 -0
  347. package/web/chunk-mqdvg55y.js.gz +0 -0
  348. package/web/chunk-mvm0gvwj.js +24 -0
  349. package/web/chunk-mvm0gvwj.js.br +0 -0
  350. package/web/chunk-mvm0gvwj.js.gz +0 -0
  351. package/web/chunk-n033azqs.js +30 -0
  352. package/web/chunk-n033azqs.js.br +0 -0
  353. package/web/chunk-n033azqs.js.gz +0 -0
  354. package/web/chunk-n0fqhrqv.js +89 -0
  355. package/web/chunk-n0fqhrqv.js.br +0 -0
  356. package/web/chunk-n0fqhrqv.js.gz +0 -0
  357. package/web/chunk-n1p03ng0.js +1 -0
  358. package/web/chunk-n1p03ng0.js.br +0 -0
  359. package/web/chunk-n1p03ng0.js.gz +0 -0
  360. package/web/chunk-nb73fq72.js +1 -0
  361. package/web/chunk-nb73fq72.js.br +0 -0
  362. package/web/chunk-nb73fq72.js.gz +0 -0
  363. package/web/chunk-ngsv0xfb.js +1 -0
  364. package/web/chunk-ngsv0xfb.js.br +0 -0
  365. package/web/chunk-ngsv0xfb.js.gz +0 -0
  366. package/web/chunk-nxnkb0w4.js +55 -0
  367. package/web/chunk-nxnkb0w4.js.br +0 -0
  368. package/web/chunk-nxnkb0w4.js.gz +0 -0
  369. package/web/chunk-nymsmy8d.js +78 -0
  370. package/web/chunk-nymsmy8d.js.br +0 -0
  371. package/web/chunk-nymsmy8d.js.gz +0 -0
  372. package/web/chunk-nzqxb0ea.js +1 -0
  373. package/web/chunk-nzqxb0ea.js.br +0 -0
  374. package/web/chunk-nzqxb0ea.js.gz +0 -0
  375. package/web/chunk-p26b4zdm.js +1 -0
  376. package/web/chunk-p26b4zdm.js.br +0 -0
  377. package/web/chunk-p26b4zdm.js.gz +0 -0
  378. package/web/chunk-qa0wwff0.js +1 -0
  379. package/web/chunk-qa0wwff0.js.br +0 -0
  380. package/web/chunk-qa0wwff0.js.gz +0 -0
  381. package/web/chunk-qgv81n98.js +1 -0
  382. package/web/chunk-qgv81n98.js.br +0 -0
  383. package/web/chunk-qgv81n98.js.gz +0 -0
  384. package/web/chunk-qtwjt5mm.js +3 -0
  385. package/web/chunk-qtwjt5mm.js.br +0 -0
  386. package/web/chunk-qtwjt5mm.js.gz +0 -0
  387. package/web/chunk-r49dy5vx.js +1 -0
  388. package/web/chunk-r49dy5vx.js.br +0 -0
  389. package/web/chunk-r49dy5vx.js.gz +0 -0
  390. package/web/chunk-r97hd8wk.js +98 -0
  391. package/web/chunk-r97hd8wk.js.br +0 -0
  392. package/web/chunk-r97hd8wk.js.gz +0 -0
  393. package/web/chunk-rj1rp0tc.js +1 -0
  394. package/web/chunk-rj1rp0tc.js.br +0 -0
  395. package/web/chunk-rj1rp0tc.js.gz +0 -0
  396. package/web/chunk-s00gxcxn.js +2 -0
  397. package/web/chunk-s00gxcxn.js.br +0 -0
  398. package/web/chunk-s00gxcxn.js.gz +0 -0
  399. package/web/chunk-s6a13wxe.js +2 -0
  400. package/web/chunk-s6a13wxe.js.br +0 -0
  401. package/web/chunk-s6a13wxe.js.gz +0 -0
  402. package/web/chunk-sb61aqg8.js +4 -0
  403. package/web/chunk-sb61aqg8.js.br +0 -0
  404. package/web/chunk-sb61aqg8.js.gz +0 -0
  405. package/web/chunk-scwrkcdw.js +1 -0
  406. package/web/chunk-scwrkcdw.js.br +0 -0
  407. package/web/chunk-scwrkcdw.js.gz +0 -0
  408. package/web/chunk-shtvhd61.js +200 -0
  409. package/web/chunk-shtvhd61.js.br +0 -0
  410. package/web/chunk-shtvhd61.js.gz +0 -0
  411. package/web/chunk-szwh742y.js +2 -0
  412. package/web/chunk-szwh742y.js.br +0 -0
  413. package/web/chunk-szwh742y.js.gz +0 -0
  414. package/web/chunk-t5e9vh89.js +1 -0
  415. package/web/chunk-t5e9vh89.js.br +0 -0
  416. package/web/chunk-t5e9vh89.js.gz +0 -0
  417. package/web/chunk-tbgavq0t.js +2 -0
  418. package/web/chunk-tbgavq0t.js.br +0 -0
  419. package/web/chunk-tbgavq0t.js.gz +0 -0
  420. package/web/chunk-tefm9md2.js +2 -0
  421. package/web/chunk-tefm9md2.js.br +0 -0
  422. package/web/chunk-tefm9md2.js.gz +0 -0
  423. package/web/chunk-tntwwpyh.js +2 -0
  424. package/web/chunk-tntwwpyh.js.br +0 -0
  425. package/web/chunk-tntwwpyh.js.gz +0 -0
  426. package/web/chunk-tp3fpa0t.js +1 -0
  427. package/web/chunk-tp3fpa0t.js.br +0 -0
  428. package/web/chunk-tp3fpa0t.js.gz +0 -0
  429. package/web/chunk-tr7fg3tv.js +8 -0
  430. package/web/chunk-tr7fg3tv.js.br +0 -0
  431. package/web/chunk-tr7fg3tv.js.gz +0 -0
  432. package/web/chunk-v5xf47q0.js +1 -0
  433. package/web/chunk-v5xf47q0.js.br +0 -0
  434. package/web/chunk-v5xf47q0.js.gz +0 -0
  435. package/web/chunk-vayamfxv.js +1 -0
  436. package/web/chunk-vayamfxv.js.br +0 -0
  437. package/web/chunk-vayamfxv.js.gz +0 -0
  438. package/web/chunk-vndrjeyr.js +2 -0
  439. package/web/chunk-vndrjeyr.js.br +0 -0
  440. package/web/chunk-vndrjeyr.js.gz +0 -0
  441. package/web/chunk-vwms8c7b.js +1 -0
  442. package/web/chunk-vwms8c7b.js.br +0 -0
  443. package/web/chunk-vwms8c7b.js.gz +0 -0
  444. package/web/chunk-w2gy2tmp.js +99 -0
  445. package/web/chunk-w2gy2tmp.js.br +0 -0
  446. package/web/chunk-w2gy2tmp.js.gz +0 -0
  447. package/web/chunk-wdd9pasx.js +1 -0
  448. package/web/chunk-wdd9pasx.js.br +0 -0
  449. package/web/chunk-wdd9pasx.js.gz +0 -0
  450. package/web/chunk-whfh2wev.js +41 -0
  451. package/web/chunk-whfh2wev.js.br +0 -0
  452. package/web/chunk-whfh2wev.js.gz +0 -0
  453. package/web/chunk-wjecy48x.js +1 -0
  454. package/web/chunk-wjecy48x.js.br +0 -0
  455. package/web/chunk-wjecy48x.js.gz +0 -0
  456. package/web/chunk-wqmyjj6w.js +370 -0
  457. package/web/chunk-wqmyjj6w.js.br +0 -0
  458. package/web/chunk-wqmyjj6w.js.gz +0 -0
  459. package/web/chunk-wv83gygp.js +1 -0
  460. package/web/chunk-wv83gygp.js.br +0 -0
  461. package/web/chunk-wv83gygp.js.gz +0 -0
  462. package/web/chunk-x1gr0017.js +70 -0
  463. package/web/chunk-x1gr0017.js.br +0 -0
  464. package/web/chunk-x1gr0017.js.gz +0 -0
  465. package/web/chunk-xa9m0mh2.js +106 -0
  466. package/web/chunk-xa9m0mh2.js.br +0 -0
  467. package/web/chunk-xa9m0mh2.js.gz +0 -0
  468. package/web/chunk-xjbxndxz.js +2 -0
  469. package/web/chunk-xjbxndxz.js.br +0 -0
  470. package/web/chunk-xjbxndxz.js.gz +0 -0
  471. package/web/chunk-xsfmh8rr.js +217 -0
  472. package/web/chunk-xsfmh8rr.js.br +0 -0
  473. package/web/chunk-xsfmh8rr.js.gz +0 -0
  474. package/web/chunk-xvsb3w1f.js +1 -0
  475. package/web/chunk-xvsb3w1f.js.br +0 -0
  476. package/web/chunk-xvsb3w1f.js.gz +0 -0
  477. package/web/chunk-y2jkaf1e.js +2 -0
  478. package/web/chunk-y2jkaf1e.js.br +0 -0
  479. package/web/chunk-y2jkaf1e.js.gz +0 -0
  480. package/web/chunk-ynpx7j96.js +1 -0
  481. package/web/chunk-ynpx7j96.js.br +0 -0
  482. package/web/chunk-ynpx7j96.js.gz +0 -0
  483. package/web/chunk-z04ncfs3.js +2 -0
  484. package/web/chunk-z04ncfs3.js.br +0 -0
  485. package/web/chunk-z04ncfs3.js.gz +0 -0
  486. package/web/chunk-zapwrc5k.js +2 -0
  487. package/web/chunk-zapwrc5k.js.br +0 -0
  488. package/web/chunk-zapwrc5k.js.gz +0 -0
  489. package/web/chunk-zq1qbaxb.js +2 -0
  490. package/web/chunk-zq1qbaxb.js.br +0 -0
  491. package/web/chunk-zq1qbaxb.js.gz +0 -0
  492. package/web/chunk-zs7physk.js +120 -0
  493. package/web/chunk-zs7physk.js.br +0 -0
  494. package/web/chunk-zs7physk.js.gz +0 -0
  495. package/web/index.html +1 -1
  496. package/web/index.html.br +0 -0
  497. package/web/index.html.gz +0 -0
  498. package/worker.js +1 -1
  499. package/chunk-05bkyxh9.js +0 -3
  500. package/chunk-080kr9ct.js +0 -15
  501. package/chunk-1a4rrb2v.js +0 -10
  502. package/chunk-1s560041.js +0 -2
  503. package/chunk-2expw9m3.js +0 -3
  504. package/chunk-2fm6g0ga.js +0 -3
  505. package/chunk-2scbc5yh.js +0 -3
  506. package/chunk-33jk5rw1.js +0 -3
  507. package/chunk-377w9fhp.js +0 -3
  508. package/chunk-3wqncn58.js +0 -3
  509. package/chunk-43n3k72q.js +0 -2
  510. package/chunk-44pv8c0b.js +0 -5
  511. package/chunk-5gk93yp2.js +0 -3
  512. package/chunk-5z5sbry2.js +0 -7
  513. package/chunk-6qvg49rk.js +0 -51
  514. package/chunk-7d6fdzs3.js +0 -50
  515. package/chunk-7h6k7vac.js +0 -3
  516. package/chunk-7t5yqsgn.js +0 -5
  517. package/chunk-7th9y456.js +0 -2
  518. package/chunk-7v98r8ft.js +0 -2
  519. package/chunk-82bb3whz.js +0 -3
  520. package/chunk-8e061pr3.js +0 -2
  521. package/chunk-8n83nvpa.js +0 -7
  522. package/chunk-9nng543t.js +0 -3
  523. package/chunk-a0ex6znf.js +0 -18
  524. package/chunk-a25etmgf.js +0 -3
  525. package/chunk-awzaxv88.js +0 -2
  526. package/chunk-b2s9aksm.js +0 -2
  527. package/chunk-bfrpy5jd.js +0 -4
  528. package/chunk-br64f072.js +0 -2
  529. package/chunk-btza2hna.js +0 -5
  530. package/chunk-c9bjdydc.js +0 -3
  531. package/chunk-cww7drfr.js +0 -2
  532. package/chunk-d0az9pq0.js +0 -2
  533. package/chunk-d47bpkyz.js +0 -12
  534. package/chunk-dkfpqbcr.js +0 -3
  535. package/chunk-dsk3r1s8.js +0 -2
  536. package/chunk-dw8p4zcz.js +0 -2
  537. package/chunk-edz2cxtp.js +0 -5
  538. package/chunk-epqgd8d0.js +0 -3
  539. package/chunk-f7tn67ff.js +0 -2
  540. package/chunk-fevkmd0j.js +0 -3
  541. package/chunk-fzdvrsvn.js +0 -482
  542. package/chunk-ghat319t.js +0 -25
  543. package/chunk-h19mfxzq.js +0 -7
  544. package/chunk-h6sh9pkr.js +0 -2
  545. package/chunk-jdazqwft.js +0 -2
  546. package/chunk-je52rmxs.js +0 -9
  547. package/chunk-jj5pkfgm.js +0 -2
  548. package/chunk-jp7f2kak.js +0 -2
  549. package/chunk-jqpb4q7h.js +0 -3
  550. package/chunk-jzf3qp0g.js +0 -2
  551. package/chunk-k5qg9az8.js +0 -8
  552. package/chunk-m51tryxx.js +0 -3
  553. package/chunk-mna7mgdw.js +0 -3
  554. package/chunk-nfgg1ksw.js +0 -3
  555. package/chunk-npd8k692.js +0 -2
  556. package/chunk-nqzqm9ad.js +0 -3
  557. package/chunk-nsrdzz1p.js +0 -20
  558. package/chunk-qdwzmvcq.js +0 -3923
  559. package/chunk-qgyjffh0.js +0 -16
  560. package/chunk-qnq3xa4h.js +0 -286
  561. package/chunk-r0gyd40q.js +0 -2
  562. package/chunk-ra4kx253.js +0 -7
  563. package/chunk-rq2b2a6n.js +0 -11
  564. package/chunk-s1m4dt0z.js +0 -3
  565. package/chunk-s78m24h4.js +0 -2
  566. package/chunk-sd9r82h2.js +0 -3
  567. package/chunk-smygzsyr.js +0 -10
  568. package/chunk-t0zexn7n.js +0 -2
  569. package/chunk-t2s0yyw0.js +0 -3
  570. package/chunk-v9a2y9rn.js +0 -3
  571. package/chunk-vkn4bfyp.js +0 -2
  572. package/chunk-vpzs9trn.js +0 -3
  573. package/chunk-w3tzsrkw.js +0 -12
  574. package/chunk-x0t8h6vv.js +0 -5
  575. package/chunk-x23g9em9.js +0 -39
  576. package/chunk-x316ag7c.js +0 -25
  577. package/chunk-x5zgyewh.js +0 -2
  578. package/chunk-xr35av3b.js +0 -59
  579. package/chunk-yd190t0s.js +0 -31
  580. package/chunk-zhvw8efz.js +0 -3
  581. package/chunk-zyqsqwn7.js +0 -2
  582. package/web/chunk-08tgd17j.js +0 -12
  583. package/web/chunk-08tgd17j.js.br +0 -0
  584. package/web/chunk-08tgd17j.js.gz +0 -0
  585. package/web/chunk-0mqyt9m7.js +0 -1
  586. package/web/chunk-0mqyt9m7.js.br +0 -0
  587. package/web/chunk-0mqyt9m7.js.gz +0 -0
  588. package/web/chunk-0n99y9n5.js +0 -1
  589. package/web/chunk-0n99y9n5.js.br +0 -0
  590. package/web/chunk-0n99y9n5.js.gz +0 -0
  591. package/web/chunk-0qjj75v7.js +0 -1
  592. package/web/chunk-0qjj75v7.js.br +0 -0
  593. package/web/chunk-0qjj75v7.js.gz +0 -0
  594. package/web/chunk-0x3wtwhf.js +0 -291
  595. package/web/chunk-0x3wtwhf.js.br +0 -0
  596. package/web/chunk-0x3wtwhf.js.gz +0 -0
  597. package/web/chunk-0zd5g2yw.js +0 -1
  598. package/web/chunk-0zd5g2yw.js.br +0 -0
  599. package/web/chunk-0zd5g2yw.js.gz +0 -0
  600. package/web/chunk-146ww24y.js +0 -55
  601. package/web/chunk-146ww24y.js.br +0 -0
  602. package/web/chunk-146ww24y.js.gz +0 -0
  603. package/web/chunk-1d8r3aeh.js +0 -3
  604. package/web/chunk-1d8r3aeh.js.br +0 -0
  605. package/web/chunk-1d8r3aeh.js.gz +0 -0
  606. package/web/chunk-1qs4nh4c.js +0 -1
  607. package/web/chunk-1qs4nh4c.js.br +0 -0
  608. package/web/chunk-1qs4nh4c.js.gz +0 -0
  609. package/web/chunk-1v13225a.js +0 -1
  610. package/web/chunk-1v13225a.js.br +0 -2
  611. package/web/chunk-1v13225a.js.gz +0 -0
  612. package/web/chunk-22caavs1.js +0 -1
  613. package/web/chunk-22caavs1.js.br +0 -0
  614. package/web/chunk-22caavs1.js.gz +0 -0
  615. package/web/chunk-28e0vn8m.js +0 -1
  616. package/web/chunk-28e0vn8m.js.br +0 -0
  617. package/web/chunk-28e0vn8m.js.gz +0 -0
  618. package/web/chunk-28sta4gj.js +0 -142
  619. package/web/chunk-28sta4gj.js.br +0 -0
  620. package/web/chunk-28sta4gj.js.gz +0 -0
  621. package/web/chunk-33eqjx7d.js +0 -2
  622. package/web/chunk-33eqjx7d.js.br +0 -0
  623. package/web/chunk-33eqjx7d.js.gz +0 -0
  624. package/web/chunk-3781tgyt.js +0 -21
  625. package/web/chunk-3781tgyt.js.br +0 -0
  626. package/web/chunk-3781tgyt.js.gz +0 -0
  627. package/web/chunk-3gt60qmf.js +0 -370
  628. package/web/chunk-3gt60qmf.js.br +0 -0
  629. package/web/chunk-3gt60qmf.js.gz +0 -0
  630. package/web/chunk-3rg8d23d.js +0 -2
  631. package/web/chunk-3rg8d23d.js.br +0 -0
  632. package/web/chunk-3rg8d23d.js.gz +0 -0
  633. package/web/chunk-40wx2kxh.js +0 -1
  634. package/web/chunk-40wx2kxh.js.br +0 -0
  635. package/web/chunk-40wx2kxh.js.gz +0 -0
  636. package/web/chunk-44kgdrrk.js +0 -1
  637. package/web/chunk-44kgdrrk.js.br +0 -0
  638. package/web/chunk-44kgdrrk.js.gz +0 -0
  639. package/web/chunk-4vqmgjbf.js +0 -1
  640. package/web/chunk-4vqmgjbf.js.br +0 -0
  641. package/web/chunk-4vqmgjbf.js.gz +0 -0
  642. package/web/chunk-55h6ya95.js +0 -1
  643. package/web/chunk-55h6ya95.js.br +0 -2
  644. package/web/chunk-55h6ya95.js.gz +0 -0
  645. package/web/chunk-5a80hcah.js +0 -1
  646. package/web/chunk-5a80hcah.js.br +0 -0
  647. package/web/chunk-5a80hcah.js.gz +0 -0
  648. package/web/chunk-5fed8tt3.js +0 -1
  649. package/web/chunk-5fed8tt3.js.br +0 -0
  650. package/web/chunk-5fed8tt3.js.gz +0 -0
  651. package/web/chunk-5kcmtrrk.js +0 -2
  652. package/web/chunk-5kcmtrrk.js.br +0 -0
  653. package/web/chunk-5kcmtrrk.js.gz +0 -0
  654. package/web/chunk-5y1v9ycq.js +0 -2
  655. package/web/chunk-5y1v9ycq.js.br +0 -0
  656. package/web/chunk-5y1v9ycq.js.gz +0 -0
  657. package/web/chunk-61wasm9a.js +0 -1
  658. package/web/chunk-61wasm9a.js.br +0 -0
  659. package/web/chunk-61wasm9a.js.gz +0 -0
  660. package/web/chunk-66mcaz0p.js +0 -7
  661. package/web/chunk-66mcaz0p.js.br +0 -0
  662. package/web/chunk-66mcaz0p.js.gz +0 -0
  663. package/web/chunk-6ew2qvxb.js +0 -1
  664. package/web/chunk-6ew2qvxb.js.br +0 -0
  665. package/web/chunk-6ew2qvxb.js.gz +0 -0
  666. package/web/chunk-6hkgy8ej.js +0 -36
  667. package/web/chunk-6hkgy8ej.js.br +0 -0
  668. package/web/chunk-6hkgy8ej.js.gz +0 -0
  669. package/web/chunk-75v6mnzm.js +0 -40
  670. package/web/chunk-75v6mnzm.js.br +0 -0
  671. package/web/chunk-75v6mnzm.js.gz +0 -0
  672. package/web/chunk-7ddgm832.js +0 -41
  673. package/web/chunk-7ddgm832.js.br +0 -0
  674. package/web/chunk-7ddgm832.js.gz +0 -0
  675. package/web/chunk-80htbw45.js +0 -1
  676. package/web/chunk-80htbw45.js.br +0 -0
  677. package/web/chunk-80htbw45.js.gz +0 -0
  678. package/web/chunk-8304998z.js +0 -1
  679. package/web/chunk-8304998z.js.br +0 -0
  680. package/web/chunk-8304998z.js.gz +0 -0
  681. package/web/chunk-84wf0ej8.js +0 -2
  682. package/web/chunk-84wf0ej8.js.br +0 -0
  683. package/web/chunk-84wf0ej8.js.gz +0 -0
  684. package/web/chunk-859ry2p4.js +0 -1
  685. package/web/chunk-859ry2p4.js.br +0 -0
  686. package/web/chunk-859ry2p4.js.gz +0 -0
  687. package/web/chunk-883weqxg.js +0 -2
  688. package/web/chunk-883weqxg.js.br +0 -0
  689. package/web/chunk-883weqxg.js.gz +0 -0
  690. package/web/chunk-8a46b2ww.js +0 -303
  691. package/web/chunk-8a46b2ww.js.br +0 -0
  692. package/web/chunk-8a46b2ww.js.gz +0 -0
  693. package/web/chunk-8cajyrkw.js +0 -1
  694. package/web/chunk-8cajyrkw.js.br +0 -0
  695. package/web/chunk-8cajyrkw.js.gz +0 -0
  696. package/web/chunk-8ejwy8g3.js +0 -30
  697. package/web/chunk-8ejwy8g3.js.br +0 -0
  698. package/web/chunk-8ejwy8g3.js.gz +0 -0
  699. package/web/chunk-951dg5kq.js +0 -8
  700. package/web/chunk-951dg5kq.js.br +0 -1
  701. package/web/chunk-951dg5kq.js.gz +0 -0
  702. package/web/chunk-97ccteq4.js +0 -106
  703. package/web/chunk-97ccteq4.js.br +0 -0
  704. package/web/chunk-97ccteq4.js.gz +0 -0
  705. package/web/chunk-98kr0bw8.js +0 -98
  706. package/web/chunk-98kr0bw8.js.br +0 -0
  707. package/web/chunk-98kr0bw8.js.gz +0 -0
  708. package/web/chunk-9bq7xgjz.js +0 -1
  709. package/web/chunk-9bq7xgjz.js.br +0 -0
  710. package/web/chunk-9bq7xgjz.js.gz +0 -0
  711. package/web/chunk-9g5jgnfe.js +0 -2
  712. package/web/chunk-9g5jgnfe.js.br +0 -0
  713. package/web/chunk-9g5jgnfe.js.gz +0 -0
  714. package/web/chunk-9kx2s040.js +0 -1
  715. package/web/chunk-9kx2s040.js.br +0 -0
  716. package/web/chunk-9kx2s040.js.gz +0 -0
  717. package/web/chunk-9v1f6yc8.js +0 -1
  718. package/web/chunk-9v1f6yc8.js.br +0 -0
  719. package/web/chunk-9v1f6yc8.js.gz +0 -0
  720. package/web/chunk-an6adjgz.js +0 -24
  721. package/web/chunk-an6adjgz.js.br +0 -0
  722. package/web/chunk-an6adjgz.js.gz +0 -0
  723. package/web/chunk-arp4g43b.js +0 -1
  724. package/web/chunk-arp4g43b.js.br +0 -0
  725. package/web/chunk-arp4g43b.js.gz +0 -0
  726. package/web/chunk-b2ads9ra.js +0 -1
  727. package/web/chunk-b2ads9ra.js.br +0 -0
  728. package/web/chunk-b2ads9ra.js.gz +0 -0
  729. package/web/chunk-bd90pxqc.js +0 -169
  730. package/web/chunk-bd90pxqc.js.br +0 -0
  731. package/web/chunk-bd90pxqc.js.gz +0 -0
  732. package/web/chunk-bmtzds29.js +0 -1
  733. package/web/chunk-bmtzds29.js.br +0 -0
  734. package/web/chunk-bmtzds29.js.gz +0 -0
  735. package/web/chunk-brsvdef4.js +0 -1
  736. package/web/chunk-brsvdef4.js.br +0 -0
  737. package/web/chunk-brsvdef4.js.gz +0 -0
  738. package/web/chunk-bv0vs331.js +0 -332
  739. package/web/chunk-bv0vs331.js.br +0 -0
  740. package/web/chunk-bv0vs331.js.gz +0 -0
  741. package/web/chunk-bzvserky.js +0 -89
  742. package/web/chunk-bzvserky.js.br +0 -0
  743. package/web/chunk-bzvserky.js.gz +0 -0
  744. package/web/chunk-cd3hhgn9.js +0 -2
  745. package/web/chunk-cd3hhgn9.js.br +0 -0
  746. package/web/chunk-cd3hhgn9.js.gz +0 -0
  747. package/web/chunk-cdwn0hd1.js +0 -2
  748. package/web/chunk-cdwn0hd1.js.br +0 -0
  749. package/web/chunk-cdwn0hd1.js.gz +0 -0
  750. package/web/chunk-ckpx6ky8.js +0 -2
  751. package/web/chunk-ckpx6ky8.js.br +0 -0
  752. package/web/chunk-ckpx6ky8.js.gz +0 -0
  753. package/web/chunk-d11xvhrx.js +0 -140
  754. package/web/chunk-d11xvhrx.js.br +0 -0
  755. package/web/chunk-d11xvhrx.js.gz +0 -0
  756. package/web/chunk-d25jazap.js +0 -89
  757. package/web/chunk-d25jazap.js.br +0 -0
  758. package/web/chunk-d25jazap.js.gz +0 -0
  759. package/web/chunk-d5jk5ftp.js +0 -2
  760. package/web/chunk-d5jk5ftp.js.br +0 -0
  761. package/web/chunk-d5jk5ftp.js.gz +0 -0
  762. package/web/chunk-dkdedpn5.js +0 -1
  763. package/web/chunk-dkdedpn5.js.br +0 -0
  764. package/web/chunk-dkdedpn5.js.gz +0 -0
  765. package/web/chunk-drr7mqg2.js +0 -1
  766. package/web/chunk-drr7mqg2.js.br +0 -0
  767. package/web/chunk-drr7mqg2.js.gz +0 -0
  768. package/web/chunk-dxejr2wc.js +0 -7
  769. package/web/chunk-dxejr2wc.js.br +0 -0
  770. package/web/chunk-dxejr2wc.js.gz +0 -0
  771. package/web/chunk-dym50nnh.js +0 -292
  772. package/web/chunk-dym50nnh.js.br +0 -0
  773. package/web/chunk-dym50nnh.js.gz +0 -0
  774. package/web/chunk-e1fv9zdp.js +0 -1
  775. package/web/chunk-e1fv9zdp.js.br +0 -0
  776. package/web/chunk-e1fv9zdp.js.gz +0 -0
  777. package/web/chunk-e9ycc491.js +0 -120
  778. package/web/chunk-e9ycc491.js.br +0 -0
  779. package/web/chunk-e9ycc491.js.gz +0 -0
  780. package/web/chunk-eww9ygx5.js +0 -2
  781. package/web/chunk-eww9ygx5.js.br +0 -0
  782. package/web/chunk-eww9ygx5.js.gz +0 -0
  783. package/web/chunk-ey2fy3vm.js +0 -4
  784. package/web/chunk-ey2fy3vm.js.br +0 -0
  785. package/web/chunk-ey2fy3vm.js.gz +0 -0
  786. package/web/chunk-ez498328.js +0 -39
  787. package/web/chunk-ez498328.js.br +0 -0
  788. package/web/chunk-ez498328.js.gz +0 -0
  789. package/web/chunk-f0x62xvv.js +0 -84
  790. package/web/chunk-f0x62xvv.js.br +0 -0
  791. package/web/chunk-f0x62xvv.js.gz +0 -0
  792. package/web/chunk-f1z92c2d.js +0 -1
  793. package/web/chunk-f1z92c2d.js.br +0 -2
  794. package/web/chunk-f1z92c2d.js.gz +0 -0
  795. package/web/chunk-fwvar7a7.js +0 -1
  796. package/web/chunk-fwvar7a7.js.br +0 -0
  797. package/web/chunk-fwvar7a7.js.gz +0 -0
  798. package/web/chunk-g8bw60t3.js +0 -324
  799. package/web/chunk-g8bw60t3.js.br +0 -0
  800. package/web/chunk-g8bw60t3.js.gz +0 -0
  801. package/web/chunk-g8se5rtx.js +0 -2
  802. package/web/chunk-g8se5rtx.js.br +0 -0
  803. package/web/chunk-g8se5rtx.js.gz +0 -0
  804. package/web/chunk-gkwkbkr4.js +0 -217
  805. package/web/chunk-gkwkbkr4.js.br +0 -0
  806. package/web/chunk-gkwkbkr4.js.gz +0 -0
  807. package/web/chunk-h50zbzfg.js +0 -24
  808. package/web/chunk-h50zbzfg.js.br +0 -0
  809. package/web/chunk-h50zbzfg.js.gz +0 -0
  810. package/web/chunk-j3vqhfgg.js +0 -1
  811. package/web/chunk-j3vqhfgg.js.br +0 -0
  812. package/web/chunk-j3vqhfgg.js.gz +0 -0
  813. package/web/chunk-jk6j68wv.js +0 -1
  814. package/web/chunk-jk6j68wv.js.br +0 -0
  815. package/web/chunk-jk6j68wv.js.gz +0 -0
  816. package/web/chunk-jrdx4yfq.js +0 -2
  817. package/web/chunk-jrdx4yfq.js.br +0 -0
  818. package/web/chunk-jrdx4yfq.js.gz +0 -0
  819. package/web/chunk-k2by2sj0.css +0 -1
  820. package/web/chunk-k2by2sj0.css.br +0 -0
  821. package/web/chunk-k2by2sj0.css.gz +0 -0
  822. package/web/chunk-kc4ymfvv.js +0 -2
  823. package/web/chunk-kc4ymfvv.js.br +0 -1
  824. package/web/chunk-kc4ymfvv.js.gz +0 -0
  825. package/web/chunk-kh9d9x20.js +0 -1
  826. package/web/chunk-kh9d9x20.js.br +0 -0
  827. package/web/chunk-kh9d9x20.js.gz +0 -0
  828. package/web/chunk-kkv1h28t.js +0 -2
  829. package/web/chunk-kkv1h28t.js.br +0 -0
  830. package/web/chunk-kkv1h28t.js.gz +0 -0
  831. package/web/chunk-kzkjfngw.js +0 -7
  832. package/web/chunk-kzkjfngw.js.br +0 -0
  833. package/web/chunk-kzkjfngw.js.gz +0 -0
  834. package/web/chunk-mj8xb4z9.js +0 -2
  835. package/web/chunk-mj8xb4z9.js.br +0 -0
  836. package/web/chunk-mj8xb4z9.js.gz +0 -0
  837. package/web/chunk-msn8bpe6.js +0 -1
  838. package/web/chunk-msn8bpe6.js.br +0 -0
  839. package/web/chunk-msn8bpe6.js.gz +0 -0
  840. package/web/chunk-mv0pwdz6.js +0 -1
  841. package/web/chunk-mv0pwdz6.js.br +0 -0
  842. package/web/chunk-mv0pwdz6.js.gz +0 -0
  843. package/web/chunk-myhtb5ps.js +0 -2
  844. package/web/chunk-myhtb5ps.js.br +0 -0
  845. package/web/chunk-myhtb5ps.js.gz +0 -0
  846. package/web/chunk-n8qc0chz.js +0 -34
  847. package/web/chunk-n8qc0chz.js.br +0 -0
  848. package/web/chunk-n8qc0chz.js.gz +0 -0
  849. package/web/chunk-nf83ezt5.js +0 -1136
  850. package/web/chunk-nf83ezt5.js.br +0 -0
  851. package/web/chunk-nf83ezt5.js.gz +0 -0
  852. package/web/chunk-nh3m09b1.js +0 -1
  853. package/web/chunk-nh3m09b1.js.br +0 -0
  854. package/web/chunk-nh3m09b1.js.gz +0 -0
  855. package/web/chunk-nqvjw71s.js +0 -1
  856. package/web/chunk-nqvjw71s.js.br +0 -0
  857. package/web/chunk-nqvjw71s.js.gz +0 -0
  858. package/web/chunk-nyydkfyf.js +0 -1
  859. package/web/chunk-nyydkfyf.js.br +0 -0
  860. package/web/chunk-nyydkfyf.js.gz +0 -0
  861. package/web/chunk-p0zneef1.js +0 -2
  862. package/web/chunk-p0zneef1.js.br +0 -0
  863. package/web/chunk-p0zneef1.js.gz +0 -0
  864. package/web/chunk-pjd16rfv.js +0 -1
  865. package/web/chunk-pjd16rfv.js.br +0 -0
  866. package/web/chunk-pjd16rfv.js.gz +0 -0
  867. package/web/chunk-praang0j.js +0 -214
  868. package/web/chunk-praang0j.js.br +0 -0
  869. package/web/chunk-praang0j.js.gz +0 -0
  870. package/web/chunk-prynwp2t.js +0 -1
  871. package/web/chunk-prynwp2t.js.br +0 -0
  872. package/web/chunk-prynwp2t.js.gz +0 -0
  873. package/web/chunk-q0kx0wyj.js +0 -2
  874. package/web/chunk-q0kx0wyj.js.br +0 -0
  875. package/web/chunk-q0kx0wyj.js.gz +0 -0
  876. package/web/chunk-q6aqg79d.js +0 -2
  877. package/web/chunk-q6aqg79d.js.br +0 -0
  878. package/web/chunk-q6aqg79d.js.gz +0 -0
  879. package/web/chunk-qd3x1kbw.js +0 -1
  880. package/web/chunk-qd3x1kbw.js.br +0 -2
  881. package/web/chunk-qd3x1kbw.js.gz +0 -0
  882. package/web/chunk-qgqg2kr5.js +0 -1
  883. package/web/chunk-qgqg2kr5.js.br +0 -0
  884. package/web/chunk-qgqg2kr5.js.gz +0 -0
  885. package/web/chunk-qha5j25q.js +0 -2
  886. package/web/chunk-qha5j25q.js.br +0 -0
  887. package/web/chunk-qha5j25q.js.gz +0 -0
  888. package/web/chunk-qhf717ek.js +0 -2
  889. package/web/chunk-qhf717ek.js.br +0 -0
  890. package/web/chunk-qhf717ek.js.gz +0 -0
  891. package/web/chunk-qjswcwvm.js +0 -1
  892. package/web/chunk-qjswcwvm.js.br +0 -0
  893. package/web/chunk-qjswcwvm.js.gz +0 -0
  894. package/web/chunk-qt2ktkps.js +0 -1
  895. package/web/chunk-qt2ktkps.js.br +0 -0
  896. package/web/chunk-qt2ktkps.js.gz +0 -0
  897. package/web/chunk-rjvdk0s6.js +0 -1
  898. package/web/chunk-rjvdk0s6.js.br +0 -0
  899. package/web/chunk-rjvdk0s6.js.gz +0 -0
  900. package/web/chunk-scnew5q6.js +0 -1
  901. package/web/chunk-scnew5q6.js.br +0 -0
  902. package/web/chunk-scnew5q6.js.gz +0 -0
  903. package/web/chunk-scrrgk6n.js +0 -2
  904. package/web/chunk-scrrgk6n.js.br +0 -0
  905. package/web/chunk-scrrgk6n.js.gz +0 -0
  906. package/web/chunk-sy1ta5rp.js +0 -1
  907. package/web/chunk-sy1ta5rp.js.br +0 -0
  908. package/web/chunk-sy1ta5rp.js.gz +0 -0
  909. package/web/chunk-t092etr1.js +0 -2
  910. package/web/chunk-t092etr1.js.br +0 -0
  911. package/web/chunk-t092etr1.js.gz +0 -0
  912. package/web/chunk-t34g8qj4.js +0 -2
  913. package/web/chunk-t34g8qj4.js.br +0 -0
  914. package/web/chunk-t34g8qj4.js.gz +0 -0
  915. package/web/chunk-tfdwgjr1.js +0 -2
  916. package/web/chunk-tfdwgjr1.js.br +0 -0
  917. package/web/chunk-tfdwgjr1.js.gz +0 -0
  918. package/web/chunk-ty54ph0y.js +0 -1
  919. package/web/chunk-ty54ph0y.js.br +0 -2
  920. package/web/chunk-ty54ph0y.js.gz +0 -0
  921. package/web/chunk-v36p2ccs.js +0 -2
  922. package/web/chunk-v36p2ccs.js.br +0 -0
  923. package/web/chunk-v36p2ccs.js.gz +0 -0
  924. package/web/chunk-v7nv1ve8.js +0 -1
  925. package/web/chunk-v7nv1ve8.js.br +0 -0
  926. package/web/chunk-v7nv1ve8.js.gz +0 -0
  927. package/web/chunk-vchzf900.js +0 -2
  928. package/web/chunk-vchzf900.js.br +0 -0
  929. package/web/chunk-vchzf900.js.gz +0 -0
  930. package/web/chunk-vmpry714.js +0 -1
  931. package/web/chunk-vmpry714.js.br +0 -0
  932. package/web/chunk-vmpry714.js.gz +0 -0
  933. package/web/chunk-vtn7g6n0.js +0 -2
  934. package/web/chunk-vtn7g6n0.js.br +0 -0
  935. package/web/chunk-vtn7g6n0.js.gz +0 -0
  936. package/web/chunk-w1bp9wwx.js +0 -1
  937. package/web/chunk-w1bp9wwx.js.br +0 -0
  938. package/web/chunk-w1bp9wwx.js.gz +0 -0
  939. package/web/chunk-w4h1c0eb.js +0 -200
  940. package/web/chunk-w4h1c0eb.js.br +0 -0
  941. package/web/chunk-w4h1c0eb.js.gz +0 -0
  942. package/web/chunk-ww5c1dmz.js +0 -1
  943. package/web/chunk-ww5c1dmz.js.br +0 -0
  944. package/web/chunk-ww5c1dmz.js.gz +0 -0
  945. package/web/chunk-wx0jmdbq.js +0 -62
  946. package/web/chunk-wx0jmdbq.js.br +0 -0
  947. package/web/chunk-wx0jmdbq.js.gz +0 -0
  948. package/web/chunk-xdns99dp.js +0 -99
  949. package/web/chunk-xdns99dp.js.br +0 -0
  950. package/web/chunk-xdns99dp.js.gz +0 -0
  951. package/web/chunk-xnhzragz.js +0 -1
  952. package/web/chunk-xnhzragz.js.br +0 -0
  953. package/web/chunk-xnhzragz.js.gz +0 -0
  954. package/web/chunk-xq241z8c.js +0 -38
  955. package/web/chunk-xq241z8c.js.br +0 -0
  956. package/web/chunk-xq241z8c.js.gz +0 -0
  957. package/web/chunk-xve7x5x1.js +0 -2
  958. package/web/chunk-xve7x5x1.js.br +0 -0
  959. package/web/chunk-xve7x5x1.js.gz +0 -0
  960. package/web/chunk-xvn1wg8g.js +0 -2
  961. package/web/chunk-xvn1wg8g.js.br +0 -0
  962. package/web/chunk-xvn1wg8g.js.gz +0 -0
  963. package/web/chunk-xwy6m9v6.js +0 -1
  964. package/web/chunk-xwy6m9v6.js.br +0 -0
  965. package/web/chunk-xwy6m9v6.js.gz +0 -0
  966. package/web/chunk-y7zvyd6m.js +0 -1
  967. package/web/chunk-y7zvyd6m.js.br +0 -0
  968. package/web/chunk-y7zvyd6m.js.gz +0 -0
  969. package/web/chunk-yh07726r.js +0 -78
  970. package/web/chunk-yh07726r.js.br +0 -0
  971. package/web/chunk-yh07726r.js.gz +0 -0
  972. package/web/chunk-yr94dbhk.js +0 -1
  973. package/web/chunk-yr94dbhk.js.br +0 -0
  974. package/web/chunk-yr94dbhk.js.gz +0 -0
  975. package/web/chunk-ysqfkg2v.js +0 -70
  976. package/web/chunk-ysqfkg2v.js.br +0 -0
  977. package/web/chunk-ysqfkg2v.js.gz +0 -0
  978. package/web/chunk-yxax25q6.js +0 -4
  979. package/web/chunk-yxax25q6.js.br +0 -0
  980. package/web/chunk-yxax25q6.js.gz +0 -0
  981. package/web/chunk-z7024nm8.js +0 -16
  982. package/web/chunk-z7024nm8.js.br +0 -0
  983. package/web/chunk-z7024nm8.js.gz +0 -0
  984. package/web/chunk-z91sdj83.js +0 -139
  985. package/web/chunk-z91sdj83.js.br +0 -0
  986. package/web/chunk-z91sdj83.js.gz +0 -0
  987. package/web/chunk-za5j3w7x.js +0 -2
  988. package/web/chunk-za5j3w7x.js.br +0 -0
  989. package/web/chunk-za5j3w7x.js.gz +0 -0
  990. package/web/chunk-zw958xwq.js +0 -1
  991. package/web/chunk-zw958xwq.js.br +0 -0
  992. package/web/chunk-zw958xwq.js.gz +0 -0
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ import{w}from"./chunk-3zz4a5tn.js";import{V}from"./chunk-bh29df86.js";import{E}from"./chunk-qqfdg01g.js";import{pt}from"./chunk-fqfjjhkj.js";import{xt}from"./chunk-00jhevnt.js";import{zt,jt}from"./chunk-8g1sbmwf.js";import{ce}from"./chunk-51f8zbj5.js";import{ge}from"./chunk-h4bvkm6p.js";import{Q,ee}from"./chunk-pa7yh2q3.js";import{_e,kn,Cn,we,Ir,Ue,Mt,te,Yi,Xi,Ee}from"./chunk-7hpf9qq2.js";import{x}from"./chunk-chfzk1fx.js";import{J}from"./chunk-cjeyy6da.js";import{j,Ve,pe,Pe,ke,ne,Y}from"./chunk-rj6qknjx.js";import{W}from"./chunk-q1s5r204.js";function U(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 oe(e,n,t){if(n)return n;if(U(t,"authorization")||U(t,"cf-aig-authorization"))return"unused";throw Error(`No API key for provider: ${e}`)}function me(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 Z(e){return e.type==="text"}function ye(e){return e.type==="thinking"}function Te(e){return e.type==="toolCall"}function Re(e){return e.type==="image"}function xe(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function ve(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(!xe(e)||!ve(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 Ae(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 Ce(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 X(e,n){e.id??=n.id,e.format||=n.format,e.index??=n.index}function Me(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,X(t,n);return}if(n.type==="reasoning.summary"&&t?.type==="reasoning.summary"){t.summary+=n.summary,X(t,n);return}e.push({...n})}var Ie=["reasoning","reasoning_content","reasoning_text"];function Se(e){return Ie.includes(e)}function ie(e,n){if(e)return e;if(E("PI_CACHE_RETENTION",n)==="long")return"long";return"short"}var Fe=(e,n,t)=>{let s=new W,u=pe(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=oe(e.provider,t?.apiKey,t?.headers),a=D(e),T=Ue(Pe(u.messages),a.supportsOpenAIGrammarTools),p=ie(t?.cacheRetention,t?.env),d=p==="none"?void 0:t?.sessionId,o=Oe(e,u,R,t?.headers,t?.fetch,d,a),f=be(e,u,t,a,p,T),h=await t?.onPayload?.(f,e);if(h!==void 0)f=h;let C={...t?.signal?{signal:t.signal}:{},...t?.timeoutMs!==void 0?{timeout:t.timeoutMs}:{},maxRetries:0},{data:M,response:P}=await ge(()=>o.chat.completions.create(f,C).withResponse(),{maxRetries:t?.maxRetries,maxRetryDelayMs:t?.maxRetryDelayMs,signal:t?.signal});await t?.onResponse?.({status:P.status,headers:J(P.headers)},e),s.push({type:"start",partial:r});let O=null,F=null,A=!1,b=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 _=i.arguments[c];return typeof _==="string"?_:""},K=(i,c,_)=>{let m=i.customInput;if(!m)return;let S=Cn(m.jsonBuffer,m.property,c,_);return i.arguments={[m.property]:c},S},fe=(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 _=K(i,N(i),!0);if(_!==void 0)s.push({type:"toolcall_delta",contentIndex:c,delta:_,partial:r})}else i.arguments=V(i.partialArgs);delete i.partialArgs,delete i.customInput,delete i.streamIndex,s.push({type:"toolcall_end",contentIndex:c,toolCall:i,partial:r})}},le=()=>{if(!O)O={type:"text",text:""},l.push(O),s.push({type:"text_start",contentIndex:I(O),partial:r});return O},H=(i)=>{if(!F)F={type:"thinking",thinking:"",thinkingSignature:i},l.push(F),s.push({type:"thinking_start",contentIndex:I(F),partial:r});return F},de=(i)=>{let c=typeof i.index==="number"?i.index:void 0,_=i.function?.name??i.custom?.name??"",m=c!==void 0?b.get(c):void 0;if(!m&&i.id)m=L.get(i.id);if(!m){let S=i.custom&&!i.function?T.get(_)??"input":void 0,B=S!==void 0;if(m={type:"toolCall",id:i.id||"",name:_,arguments:B?{[S]:""}:{},partialArgs:B?void 0:"",customInput:B?{property:S,jsonBuffer:{input:"",started:!1,closed:!1}}:void 0,streamIndex:c},c!==void 0)b.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,b.set(c,m);if(i.id)L.set(i.id,m);if(!m.name&&_)m.name=_;if(i.custom&&!i.function&&!m.customInput){let S=T.get(m.name)??"input";m.arguments={[S]:""},m.customInput={property:S,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=re(i.usage,e);let c=Array.isArray(i.choices)?i.choices[0]:void 0;if(!c)continue;if(!i.usage&&c.usage)r.usage=re(c.usage,e);if(c.finish_reason){r.rawStopReason=c.finish_reason;let _=We(c.finish_reason);if(r.stopReason=_.stopReason,_.errorMessage)r.errorMessage=_.errorMessage;A=!0}if(c.delta){if(c.delta.content!==null&&c.delta.content!==void 0&&c.delta.content.length>0){let y=le();y.text+=c.delta.content,s.push({type:"text_delta",contentIndex:I(y),delta:c.delta.content,partial:r})}let _=["reasoning_content","reasoning","reasoning_text"],m=c.delta,S=null;for(let y of _){let v=m[y];if(typeof v==="string"&&v.length>0){S=y;break}}if(S){let y=m[S];if(typeof y==="string"&&y.length>0){let v=e.provider==="opencode-go"&&S==="reasoning"?"reasoning_content":S,q=H(v);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 v=de(y);if(!v.id&&y.id)v.id=y.id,L.set(y.id,v);let q=y.function?.name??y.custom?.name;if(!v.name&&q)v.name=q;let z="";if(y.function?.arguments)z=y.function.arguments,v.partialArgs=(v.partialArgs??"")+y.function.arguments,v.arguments=V(v.partialArgs);else if(y.custom?.input){let he=N(v)+y.custom.input;z=K(v,he,!1)??""}s.push({type:"toolcall_delta",contentIndex:I(v),delta:z,partial:r})}let B=c.delta.reasoning_details;if(Array.isArray(B))for(let y of B){if(!G(y))continue;H(""),k??=[],Me(k,y)}}}for(let i of l)fe(i);if(t?.signal?.aborted)throw Error("Request was aborted");if(r.stopReason==="aborted")throw Error("Request was aborted");if(!A&&!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&&!A||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=ee(Q(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},ht=(e,n,t)=>{oe(e.provider,t?.apiKey,t?.headers);let s={...te(e,n,t,t?.apiKey),toolChoice:t?.toolChoice},u=t?.reasoning?Y(e,t.reasoning):void 0;return Fe(e,n,{...s,reasoningEffort:u==="off"?void 0:u,thinkingBudgets:t?.thinkingBudgets})};function Oe(e,n,t,s,u,r,k=D(e)){let g={"User-Agent":ce(),...e.headers};if(e.provider==="github-copilot"){let R=zt(n.messages),a=jt({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 w({apiKey:t,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:u,defaultHeaders:g})}function be(e,n,t,s=D(e),u=ie(t?.cacheRetention,t?.env),r=Ue(Pe(n.messages),s.supportsOpenAIGrammarTools)){let k=ke(n.messages,s.supportsMidConvoSystemMessages===!0&&s.supportsMidConvoToolAdditions===!0),g=He(e,n,s,{grammarToolInputProperties:r}),R=De(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?pt(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=ue(k.requestTools,s),s.zaiToolStream)a.tool_stream=!0}else if(me(n.messages))a.tools=[];if(R)ze(g,a.tools,R);if(t?.toolChoice)a.tool_choice=t.toolChoice;if(s.vllmPriority!==void 0)a.priority=s.vllmPriority;let T=Be(s),p=Le(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=se(e,t,s.chatTemplateKwargs,p);if(o)a.chat_template_kwargs=o}else if(s.thinkingFormat==="baseten"&&e.reasoning){let o=a,f=se(e,t,s.chatTemplateArgs,p);if(f)o.chat_template_args=f;if(s.supportsReasoningEffort){let h=t?.reasoningEffort,C=h?e.thinkingLevelMap?.[h]:e.thinkingLevelMap?.off,M=C===void 0?h:C;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=Mt(e,t?.reasoningEffort??"off",t?.samplingParams);if(d)Object.assign(a,d);return a}function Be(e){if(e.thinkingTokenBudgetField)return e.thinkingTokenBudgetField;if(e.supportsThinkingTokenBudget)return"thinking_token_budget";return}function Le(e,n,t){if(!n?.reasoningEffort||!e.reasoning)return;let s=t.max_tokens??t.max_completion_tokens??e.maxTokens,u=Xi(Yi(n.reasoningEffort,n.thinkingBudgets),s);return u>0?u:void 0}function se(e,n,t,s){let u={};for(let[r,k]of Object.entries(t)){let g=qe(e,n,k,s);if(g!==void 0)u[r]=g}return Object.keys(u).length>0?u:void 0}function qe(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 De(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 ze(e,n,t){Ge(e,t),je(n,t),Ne(e,t)}function Ge(e,n){for(let t of e)if(t.role==="system"||t.role==="developer"){$e(t,n);return}}function Ne(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(Ke(s,n))return}}}function je(e,n){if(!e||e.length===0)return;let t=e[e.length-1];t.cache_control=n}function $e(e,n){return ae(e,n)}function Ke(e,n){if(e.role==="user"||e.role==="assistant"||e.role==="tool")return ae(e,n);return!1}function ae(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 He(e,n,t,s){let u=pe(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 C=xt(p).slice(0,8);return`${o.slice(0,Math.max(1,40-C.length-1))}_${C}`}if(e.provider==="openai")return p.length>40?p.slice(0,40):p;return p},g=Ee(u.messages,e,(p)=>k(p)),R=ke(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:ue(o,t)};r.push(h)}let f=p===0?j(d):Ve(d);if(f.length>0)r.push({role:a,content:x(f)})}else if(d.role==="user")if(typeof d.content==="string")r.push({role:"user",content:x(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:x(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(Z).filter((l)=>l.text.trim().length>0).map((l)=>({type:"text",text:x(l.text)})),h=f.map((l)=>l.text).join(""),C=d.content.filter(ye),M=d.content.filter(Te),P=C.map((l)=>Ae(l.thinkingSignature)).find((l)=>l!==void 0),O=M.map((l)=>Ce(l.thoughtSignature)).filter((l)=>l!==void 0),F=P??(O.length>0?O:void 0),A=C.filter((l)=>l.thinking.trim().length>0);if(A.length>0)if(t.requiresThinkingAsText){let l=A.map((I)=>x(I.thinking)).join(`
4
+
5
+ `);o.content=[{type:"text",text:l},...f]}else{if(h.length>0)o.content=h;if(!F){let l=A[0].thinkingSignature;if(e.provider==="opencode-go"&&l==="reasoning")l="reasoning_content";if(l&&Se(l))o[l]=A.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:x(kn(l.name,l.arguments,I))}};return{id:l.id,type:"function",function:{name:l.name,arguments:JSON.stringify(l.arguments)}}});if(F)o.reasoning_details=F;if(t.requiresReasoningContentOnAssistantMessages&&e.reasoning&&o.reasoning_content===void 0)o.reasoning_content="";let b=o.content;if(!(b!==null&&b!==void 0&&(typeof b==="string"?b.length>0:b.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],C=h.content.filter(Z).map((A)=>A.text).join(`
7
+ `),M=h.content.some((A)=>A.type==="image"),O=C.length>0?C:M?"(see attached image)":"(no tool output)",F={role:"tool",content:x(O),tool_call_id:h.toolCallId};if(t.requiresToolResultName&&h.toolName)F.name=h.toolName;if(r.push(F),M&&e.input.includes("image")){for(let A of h.content)if(Re(A))o.push({type:"image_url",image_url:{url:`data:${A.mimeType};base64,${A.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 ue(e,n){return e.map((t)=>{let s=Ir(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=we(t,n.supportsStrictMode!==!1);return{type:"function",function:{name:t.name,description:t.description,parameters:_e(t,u),...n.supportsStrictMode!==!1&&{strict:u??!1}}}})}function re(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 ne(n,g),g}function We(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 Je(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"),C=k&&(e.id.startsWith("anthropic/")||e.id.startsWith("openai/")),M=n==="openrouter"&&e.id.startsWith("anthropic/")?"anthropic":void 0;return{supportsStore:!o,supportsDeveloperRole:C||!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=Je(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{He as convertMessages,Fe as stream,ht as streamSimple};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{be,Xe,Sn,wn}from"./chunk-en5t6hwd.js";import{Q,ee}from"./chunk-pa7yh2q3.js";function a(r,o,s){if(!be(o))throw Error(`${r} returned invalid probabilities for ${s}`);return Object.fromEntries(Object.entries(o).map(([t,e])=>[t,Xe(r,e,`probability for ${s}.${t}`)]))}function f(r,o,s){if(!be(o))throw Error(`${r} returned an unexpected response`);let t=[];for(let[e,n]of Object.entries(s.questions)){let i=o[e];if(!be(i))throw Error(`${r} did not return an answer for ${e}`);if(n.type==="choice"){if(i.type!=="choice"||typeof i.choice!=="string")throw Error(`${r} did not return a choice answer for ${e}`);t.push([e,{type:"choice",choice:i.choice,probabilities:a(r,i.probabilities,e),confidence:Xe(r,i.confidence,`confidence for ${e}`)}])}else if(n.type==="score"){if(i.type!=="score")throw Error(`${r} did not return a score answer for ${e}`);t.push([e,{type:"score",score:Xe(r,i.score,`score for ${e}`),confidence:Xe(r,i.confidence,`confidence for ${e}`)}])}else{if(i.type!=="noul")throw Error(`${r} did not return a bool answer for ${e}`);t.push([e,{type:"bool",probability:Xe(r,i.noul,`probability for ${e}`)}])}}return Object.fromEntries(t)}function p(r){return{state:r.state,questions:Object.fromEntries(Object.entries(r.questions).map(([o,s])=>[o,s.type==="bool"?{...s,type:"noul"}:s]))}}async function bn(r,o,s,t){let e={api:o.api,provider:o.provider,model:o.id,answers:{},stopReason:"stop",timestamp:Date.now()};try{if(o.api!==r.api)throw Error(`Unsupported classifier API: ${o.api}`);if(s.images?.length)throw Error(`${r.label} does not support image input`);let n=await Sn(r.label,r.url(o),o,r.payload(o,p(s)),t),i=r.output(n),c=wn(i.usage,o);if(c)e.usage=c;return e.answers=f(r.label,i.answers,s),e}catch(n){return e.stopReason=t?.signal?.aborted?"aborted":"error",e.errorMessage=ee(Q(n),`${r.label} error`),e}}
3
+ export{bn};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ function Q(t){if(!(t instanceof Error))return{message:u(t),messageCarriesBody:!1};let e=t,n=d(e),s=o(e),r=s===void 0||t.message.includes(s);return{status:n,body:s,message:t.message,messageCarriesBody:r}}function d(t){if(typeof t.statusCode==="number")return t.statusCode;if(typeof t.status==="number")return t.status;if(typeof t.$metadata?.httpStatusCode==="number")return t.$metadata.httpStatusCode;if(typeof t.$response?.statusCode==="number")return t.$response.statusCode;return}function o(t){let e=f(t);if(e===void 0)return;let n=e.trim();if(n.length===0)return;return c(n,4000)}function f(t){if(typeof t.body==="string")return t.body;if(i(t.error))return u(t.error);let e=t.$response?.body;if(typeof e==="string")return e;if(a(e))return;if(i(e))return u(e);return}function a(t){return typeof t==="object"&&t!==null&&"pipe"in t&&typeof t.pipe==="function"}function i(t){if(typeof t!=="object"||t===null)return!1;let e=Object.getPrototypeOf(t);if(e!==Object.prototype&&e!==null)return!1;return Object.keys(t).length>0}function ee(t,e){if(t.messageCarriesBody||t.status===void 0||t.body===void 0)return e!==void 0&&t.status!==void 0?`${e} (${t.status}): ${t.message}`:t.message;return e!==void 0?`${e} (${t.status}): ${t.body}`:`${t.status}: ${t.body}`}function c(t,e){if(t.length<=e)return t;return`${t.slice(0,e)}... [truncated ${t.length-e} chars]`}function u(t){try{let e=JSON.stringify(t);return e===void 0?String(t):e}catch{return String(t)}}
3
+ export{Q,ee};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ class n{incoming=[];outgoing=[];get length(){return this.incoming.length+this.outgoing.length}enqueue(e){this.incoming.push(e)}dequeue(){if(this.outgoing.length===0)while(this.incoming.length>0)this.outgoing.push(this.incoming.pop());return this.outgoing.pop()}}class mi{queue=new n;waiting=new n;done=!1;finalResultPromise;resolveFinalResult;isComplete;extractResult;constructor(e,t){this.isComplete=e,this.extractResult=t,this.finalResultPromise=new Promise((i)=>{this.resolveFinalResult=i})}push(e){if(this.done)return;if(this.isComplete(e))this.done=!0,this.resolveFinalResult(this.extractResult(e));let t=this.waiting.dequeue();if(t)t({value:e,done:!1});else this.queue.enqueue(e)}end(e){if(this.done=!0,e!==void 0)this.resolveFinalResult(e);while(this.waiting.length>0)this.waiting.dequeue()({value:void 0,done:!0})}async*[Symbol.asyncIterator](){while(!0)if(this.queue.length>0)yield this.queue.dequeue();else if(this.done)return;else{let e=await new Promise((t)=>this.waiting.enqueue(t));if(e.done)return;yield e.value}}result(){return this.finalResultPromise}}class W extends mi{#t=Date.now();#i=performance.now();constructor(){super((e)=>e.type==="done"||e.type==="error",(e)=>{if(e.type==="done")return e.message;else if(e.type==="error")return e.error;throw Error("Unexpected event type for final result")})}push(e){if(e.type==="done")this.#e(e.message);else if(e.type==="error")this.#e(e.error);super.push(e)}end(e){if(e!==void 0)this.#e(e);super.end(e)}#e(e){if(this.done||e.durationMs!==void 0||e.timestamp<this.#t)return;e.durationMs=Math.max(0,Math.round(performance.now()-this.#i))}}function hi(){return new W}function gt(e){if(e instanceof Error)return e.message||e.name;if(typeof e==="string")return e;return String(e)}function Pa(e){if(!(e instanceof Error))return{name:"ThrownValue",message:gt(e)};let t=e.code;return{name:e.name||void 0,message:e.message||e.name,stack:e.stack,code:typeof t==="string"||typeof t==="number"?t:void 0}}function xr(e,t,i){return{type:e,timestamp:Date.now(),error:Pa(t),details:i}}function We(e,t){e.diagnostics=[...e.diagnostics??[],t]}
3
+ export{mi,W,hi,gt,Pa,xr,We};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ve,nt,or}from"./chunk-206g40v9.js";export{ve as UnauthorizedError,nt as auth,or as extractWWWAuthenticateParams};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{u}from"./chunk-wwazj6mz.js";var n=null;function c(e){if(typeof process>"u"||!process.versions?.bun||Object.keys(process.env).length>0)return;if(n===null){n=new Map;try{let{readFileSync:t}=u("fs"),s=t("/proc/self/environ","utf-8");for(let r of s.split("\x00")){let o=r.indexOf("=");if(o>0)n.set(r.slice(0,o),r.slice(o+1))}}catch{}}return n.get(e)}function E(e,t){return t?.[e]||(typeof process<"u"?process.env[e]:void 0)||c(e)||void 0}
3
+ export{E};
@@ -0,0 +1,12 @@
1
+ // @bun
2
+ import{W,gt}from"./chunk-q1s5r204.js";function N(e,t,r){return{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:"error",errorMessage:t instanceof Error?t.message:String(t),timestamp:r}}function H(e){return typeof e.result==="function"}async function z(e,t){for await(let r of t)e.push(r);e.end(H(t)?await t.result():void 0)}function ze(e,t){let r=Date.now(),n=new W;return t().then((s)=>z(n,s)).catch((s)=>{let o=N(e,s,r);n.push({type:"error",reason:"error",error:o}),n.end(o)}),n}function ae(e,t){let r={stream:(n,s,o)=>ze(n,async()=>(await e()).stream(n,s,o)),streamSimple:(n,s,o)=>ze(n,async()=>(await e()).streamSimple(n,s,o))};if(t?.fetchDeferred)r.fetchDeferred=(n,s,o)=>ze(n,async()=>{let i=await e();if(!i.fetchDeferred)throw Error("API does not support deferred responses");return i.fetchDeferred(n,s,o)});if(t?.cancelDeferred)r.cancelDeferred=async(n,s,o)=>{let i=await e();if(!i.cancelDeferred)throw Error("API cannot cancel deferred responses");await i.cancelDeferred(n,s,o)};return r}var G=function(e,t){if(typeof e==="string"&&/^\.\.?\//.test(e))return e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,s,o,i){return n?t?".jsx":".js":s&&(!o||!i)?r:s+o+"."+i.toLowerCase()+"js"});return e},D=(e)=>import(G(e));function F(){return globalThis.process?.env}function ps(){return{async env(e){let t=F()?.[e];return typeof t==="string"&&t.trim().length>0?t:void 0},async fileExists(e){try{let t=await D("node:fs/promises"),r=e;if(r.startsWith("~"))r=(await D("node:os")).homedir()+r.slice(1);return await t.access(r),!0}catch{return!1}}}}function O(e){if(e.reason!==void 0)return e.reason;let t=Error("The operation was aborted");return t.name="AbortError",t}function g(e){return e??new AbortController().signal}function v(e,t){if(t.aborted)return e.catch(()=>{}),Promise.reject(O(t));return new Promise((r,n)=>{let s=!1,o=()=>t.removeEventListener("abort",i),i=()=>{if(s)return;s=!0,o(),n(O(t))};if(t.addEventListener("abort",i,{once:!0}),e.then((c)=>{if(s)return;s=!0,o(),r(c)},(c)=>{if(s)return;s=!0,o(),n(c)}),t.aborted)i()})}class li{credentials=new Map;chains=new Map;enqueue(e,t,r){let n=g(r?.signal),s=this.chains.get(e)??Promise.resolve(),o=(async()=>(await s.catch(()=>{}),n.throwIfAborted(),t()))(),i=o.catch(()=>{});return this.chains.set(e,i),i.then(()=>{if(this.chains.get(e)===i)this.chains.delete(e)}),v(o,n)}async read(e,t){return t?.signal?.throwIfAborted(),this.credentials.get(e)}async list(e){return e?.signal?.throwIfAborted(),[...this.credentials].map(([t,r])=>({providerId:t,type:r.type}))}modify(e,t,r){return this.enqueue(e,async()=>{let n=this.credentials.get(e),s=await t(n);if(r?.signal?.throwIfAborted(),s!==void 0)this.credentials.set(e,s);return s??n},r)}delete(e,t){return this.enqueue(e,async()=>{this.credentials.delete(e)},t)}}class B extends Error{code;constructor(e,t,r){super(J(t,r?.cause),r);this.name="ModelsError",this.code=e}}function J(e,t){if(t===void 0||t===null)return e;let r=gt(t).trim();if(!r||e.includes(r))return e;return`${e}: ${r}`}function P(e,t,r,n){let s=g(n?.signal);return v(V(e,t,r,n,s),s)}async function V(e,t,r,n,s){s.throwIfAborted();let o=n?.env?X(r,n.env):r;if(n?.apiKey!==void 0&&e.auth.apiKey)return C(o,e.auth.apiKey,e.id,{type:"api_key",key:n.apiKey,env:n.env},s);let i=await te(t,e.id,s);if(i){if(i.type==="oauth"&&e.auth.oauth)return ee(t,e.id,e.auth.oauth,i,s,n?.minOAuthValidityMs);if(i.type==="api_key"&&e.auth.apiKey){let c=n?.env?{...i,env:{...i.env,...n.env}}:i;return C(o,e.auth.apiKey,e.id,c,s)}return}return e.auth.apiKey?C(o,e.auth.apiKey,e.id,void 0,s):void 0}function X(e,t){return{env:async(r)=>t[r]||await e.env(r),fileExists:(r)=>e.fileExists(r)}}var Q=300000,Z=15000;async function E(e,t,r,n,s){let o,i=new AbortController,c=()=>i.abort(s.reason);if(s.addEventListener("abort",c,{once:!0}),s.aborted)c();try{o=await e.modify(t,async(u)=>{if(s.removeEventListener("abort",c),s.throwIfAborted(),u?.type!=="oauth")return;if(!n(u))return;try{return await r.refresh(u,AbortSignal.timeout(Z))}catch(f){throw new B("oauth",`OAuth refresh failed for ${t}`,{cause:f})}},{signal:i.signal})}catch(u){if(u instanceof B)throw u;throw s.throwIfAborted(),new B("auth",`Credential store modify failed for ${t}`,{cause:u})}finally{s.removeEventListener("abort",c)}return o?.type==="oauth"?o:void 0}async function ee(e,t,r,n,s,o){let i=Math.max(Q,o??0),c=(f)=>Date.now()+i>=f.expires,u=n;if(c(u)){let f=await E(e,t,r,c,s);if(!f)return;if(u=f,o!==void 0&&c(u))throw new B("oauth",`OAuth refresh returned a token that expires too soon for ${t}`)}try{return{auth:await r.toAuth(u),source:"OAuth"}}catch(f){throw new B("oauth",`OAuth auth derivation failed for ${t}`,{cause:f})}}async function C(e,t,r,n,s){try{return await t.resolve({ctx:e,credential:n,signal:s})}catch(o){throw new B("auth",`API key auth failed for provider ${r}`,{cause:o})}}async function te(e,t,r){try{return await e.read(t,{signal:r})}catch(n){throw new B("auth",`Credential store read failed for ${t}`,{cause:n})}}class ci{entries=new Map;async read(e,t){t?.signal?.throwIfAborted();let r=this.entries.get(e);return r?structuredClone(r):void 0}async write(e,t,r){r?.signal?.throwIfAborted(),this.entries.set(e,structuredClone(t))}async delete(e,t){t?.signal?.throwIfAborted(),this.entries.delete(e)}}function Dt(e){return e.type??"chat"}function je(e,t){return Dt(e)===t}function R(e){if(!je(e,"chat"))throw new B("provider",`Model ${e.provider}/${e.id} is not a chat model`)}function q(e){if(!je(e,"image"))throw new B("provider",`Model ${e.provider}/${e.id} is not an image model`)}function _(e){if(!je(e,"classifier"))throw new B("provider",`Model ${e.provider}/${e.id} is not a classifier model`)}function K(e,t){if(t.images?.length&&!e.input.includes("image"))throw new B("provider",`Model ${e.provider}/${e.id} does not accept image input`)}function T(e,t,r=!1){return{api:e.api,provider:e.provider,model:e.id,output:[],stopReason:r?"aborted":"error",errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}function k(e,t,r=!1){return{api:e.api,provider:e.provider,model:e.id,answers:{},stopReason:r?"aborted":"error",errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()}}function Xr(e,t=`
3
+ `){if(typeof e==="string")return e;return e.filter((r)=>r.type==="text").map((r)=>r.text).join(t)}function j(e){let t=[Xr(e.content)];for(let r of Object.values(e.sections??{}))if(r!==null)t.push(r);return t.filter((r)=>r.length>0).join(`
4
+
5
+ `)}function Ve(e){let t=[],r=Xr(e.content);if(r.length>0)t.push(r);for(let[n,s]of Object.entries(e.sections??{}))t.push(s===null?`Removed system prompt section "${n}".`:`Updated system prompt section "${n}":
6
+
7
+ ${s}`);return t.join(`
8
+
9
+ `)}function ui(e,t){let r=e!==void 0&&e.length>0,n=t!==void 0&&t.length>0;if(!r&&!n)return;return{role:"system",content:e??"",...n?{toolsAdded:t}:{},timestamp:0}}function Nt(e){let t=ui(e.systemPrompt,e.tools);return{messages:t?[t,...e.messages]:e.messages}}function b(e){return e.role==="system"}function xe(e){let t=e[0];return t&&b(t)?t:void 0}function wr(e){return xe(e)?e.slice(1):e}function me(e){let t=new Map;for(let r of e){if(!b(r))continue;for(let n of r.toolsRemoved??[])t.delete(n.name);for(let n of r.toolsAdded??[])t.set(n.name,n)}return[...t.values()]}function Kn(e){let t=[],r=new Map,n;for(let o of e){if(!b(o))continue;n??=o.timestamp;let i=Xr(o.content);if(i.length>0)t.push(i);for(let[c,u]of Object.entries(o.sections??{}))if(u===null)r.delete(c);else r.set(c,u)}let s=me(e);if(n===void 0&&s.length===0)return;return{role:"system",content:t.join(`
10
+
11
+ `),...r.size>0?{sections:Object.fromEntries(r)}:{},...s.length>0?{toolsAdded:s}:{},timestamp:n??0}}function ds(e){let t=Kn(e);return t?j(t):""}function Ke(e){let t=Kn(e.messages),r=e.messages.filter((n)=>n.role!=="system");return{messages:t?[t,...r]:r}}function pe(e,t){return t?e:Ke(e)}function Tt(e){return{name:e.name,description:e.description,parameters:JSON.parse(JSON.stringify(e.parameters)),...e.constrainedSampling===void 0?{}:{constrainedSampling:e.constrainedSampling}}}function pi(e,t){return JSON.stringify(Tt(e))===JSON.stringify(Tt(t))}function ms(e,t){let r=new Map(e.map((s)=>[s.name,s])),n=new Map(t.map((s)=>[s.name,s]));return{toolsAdded:t.filter((s)=>{let o=r.get(s.name);return o===void 0||!pi(o,s)}).map(Tt),toolsRemoved:e.filter((s)=>{let o=n.get(s.name);return o===void 0||!pi(s,o)}).map((s)=>({name:s.name}))}}function Pe(e){let t=new Map;for(let r of e){if(!b(r))continue;for(let n of r.toolsAdded??[])t.set(n.name,n)}return[...t.values()]}function La(e){let t=new Map;for(let r of e){if(!b(r))continue;for(let n of r.toolsAdded??[]){let s=t.get(n.name);if(s!==void 0&&!pi(s,n))return!0;t.set(n.name,n)}}return!1}function Ta(e){let t=new Set;for(let r of e){if(!b(r))continue;if((r.toolsRemoved?.length??0)>0)return!0;for(let n of r.toolsAdded??[]){if(t.has(n.name))return!0;t.add(n.name)}}return!1}function ke(e,t){let r=t&&!Ta(e);return{requestTools:r?xe(e)?.toolsAdded??[]:me(e),anchorsAdditions:r}}var re={chat:!0,image:!0,classifier:!0};function L(e){return Object.hasOwn(re,Dt(e))}function se(e){return{...e,models:e.models.filter(L)}}function I(e,t){if(!e&&!t)return;let r={...e};for(let[n,s]of Object.entries(t??{})){let o=n.toLowerCase();for(let i of Object.keys(r))if(i.toLowerCase()===o)delete r[i];r[n]=s}return r}class U{providers=new Map;credentials;modelsStore;authContext;refreshGenerations=new Map;refreshControllers=new Map;publicationChains=new Map;constructor(e){this.credentials=e?.credentials??new li,this.modelsStore=e?.modelsStore??new ci,this.authContext=e?.authContext??ps()}setProvider(e){this.supersedeProviderRefresh(e.id),this.providers.set(e.id,e)}deleteProvider(e){this.supersedeProviderRefresh(e),this.providers.delete(e)}clearProviders(){for(let e of new Set([...this.providers.keys(),...this.refreshControllers.keys()]))this.supersedeProviderRefresh(e);this.providers.clear()}getProviders(){return Array.from(this.providers.values())}getProvider(e){return this.providers.get(e)}getModels(e){if(e!==void 0){let r=this.providers.get(e);if(!r)return[];try{return r.getModels()}catch{return[]}}let t=[];for(let r of this.providers.values())try{t.push(...r.getModels())}catch{}return t}getAllModels(e){if(e!==void 0){let r=this.providers.get(e);if(!r)return[];try{return r.getAllModels?.()??r.getModels()}catch{return[]}}let t=[];for(let r of this.providers.values())try{t.push(...r.getAllModels?.()??r.getModels())}catch{}return t}getModelsOfType(e,t){return this.getAllModels(t).filter((r)=>je(r,e))}getModel(e,t){return this.getModels(e).find((r)=>r.id===t)}getModelOfType(e,t,r){return this.getModelsOfType(e,t).find((n)=>n.id===r)}supersedeProviderRefresh(e){let t=(this.refreshGenerations.get(e)??0)+1;this.refreshGenerations.set(e,t);let r=this.refreshControllers.get(e);if(r)this.refreshControllers.delete(e),r.abort();return t}beginProviderRefresh(e){let t=this.supersedeProviderRefresh(e),r=new AbortController;return this.refreshControllers.set(e,r),{generation:t,controller:r}}publishProviderModels(e,t,r,n){let s=this.publicationChains.get(e)??Promise.resolve(),o=(async()=>{if(await s.catch(()=>{}),r.aborted||this.refreshGenerations.get(e)!==t)return!1;if(n.persist===null)await this.modelsStore.delete(e,{signal:r});else if(n.persist!==void 0)await this.modelsStore.write(e,structuredClone(n.persist),{signal:r});if(r.aborted||this.refreshGenerations.get(e)!==t)return!1;return n.update?.(),!0})(),i=o.catch(()=>{});return this.publicationChains.set(e,i),i.then(()=>{if(this.publicationChains.get(e)===i)this.publicationChains.delete(e)}),v(o,r)}async runProviderRefreshPhase(e,t,r,n,s,o){let i=await this.modelsStore.read(e.id,{signal:o});await e.refreshModels({credential:t,stored:i?se(structuredClone(i)):void 0,publish:(c)=>this.publishProviderModels(e.id,s,o,c),allowNetwork:r,force:r?n:void 0,signal:o,baseUrl:e.baseUrl})}async refresh(e={}){let t=e.allowNetwork??!0,r=g(e.signal),n=new Map;if(r.aborted)return{aborted:!0,errors:n};let s=e.providers?new Set(e.providers):void 0,o=Array.from(this.providers.values()).filter((c)=>c.refreshModels!==void 0&&(!s||s.has(c.id))),i=Promise.all(o.map(async(c)=>{let{generation:u,controller:f}=this.beginProviderRefresh(c.id),m=AbortSignal.any([r,f.signal]),A=(async()=>{let w,y;try{w=await this.readCredential(c.id,m)}catch(a){y=a}if(await this.runProviderRefreshPhase(c,w,!1,void 0,u,m),y!==void 0)throw y;if(!t||m.aborted)return;let M=await this.resolveRefreshCredential(c,w,m);if(!M)return;await this.runProviderRefreshPhase(c,M,!0,e.force,u,m)})();try{await v(A,m)}catch(w){if(!m.aborted)n.set(c.id,w instanceof Error?w:new B("model_source",`Model refresh failed for ${c.id}`,{cause:w}))}finally{if(this.refreshControllers.get(c.id)===f)this.refreshControllers.delete(c.id)}}));try{await v(i,r)}catch(c){if(!r.aborted)throw c}return{aborted:r.aborted,errors:new Map(n)}}async resolveRefreshCredential(e,t,r){if(t?.type==="oauth"){let i=e.auth.oauth;if(!i)return;if(Date.now()<t.expires)return t;if(r.aborted)return;return E(this.credentials,e.id,i,(c)=>Date.now()>=c.expires,r)}let n=e.auth.apiKey;if(!n)return;let s=t?.type==="api_key"?t:void 0,o=await n.resolve({ctx:this.authContext,credential:s,signal:r});if(!o)return;return{type:"api_key",key:o.auth.apiKey,env:o.env}}async readCredential(e,t){try{return await this.credentials.read(e,{signal:t})}catch(r){throw new B("auth",`Credential store read failed for ${e}`,{cause:r})}}async checkProviderAuth(e,t,r){if(t?.type==="oauth")return e.auth.oauth?{source:"OAuth",type:"oauth"}:void 0;let n=e.auth.apiKey;if(!n)return;if(n.check)try{return await n.check({ctx:this.authContext,credential:t?.type==="api_key"?t:void 0,signal:r})}catch(o){throw new B("auth",`API key auth check failed for provider ${e.id}`,{cause:o})}let s=await P(e,this.credentials,this.authContext,{signal:r});return s?{source:s.source,type:"api_key"}:void 0}checkAuth(e,t){let r=g(t?.signal),n=(async()=>{r.throwIfAborted();let s=this.providers.get(e);if(!s)return;return this.checkProviderAuth(s,await this.readCredential(e,r),r)})();return v(n,r)}async getAuthenticatedProviders(e,t){t.throwIfAborted();let r=e?[this.providers.get(e)].filter((s)=>s!==void 0):this.getProviders();return(await Promise.all(r.map(async(s)=>{let o=await this.readCredential(s.id,t);return{provider:s,credential:o,auth:await this.checkProviderAuth(s,o,t)}}))).filter((s)=>s.auth!==void 0)}getAvailable(e,t){let r=g(t?.signal),n=(async()=>(await this.getAuthenticatedProviders(e,r)).flatMap(({provider:o,credential:i})=>{let c=o.getModels();return o.filterModels?.(c,i)??c}))();return v(n,r)}async getAvailableOfType(e,t,r){return(await this.getAllAvailable(t,r)).filter((n)=>je(n,e))}getAllAvailable(e,t){let r=g(t?.signal),n=(async()=>(await this.getAuthenticatedProviders(e,r)).flatMap(({provider:o,credential:i})=>{let c=o.getAllModels?.()??o.getModels();if(o.filterAllModels)return o.filterAllModels(c,i);if(!o.filterModels)return c;let u=new Set(o.filterModels(o.getModels(),i).map((f)=>f.id));return c.filter((f)=>!je(f,"chat")||u.has(f.id))}))();return v(n,r)}async getAuth(e,t){let r=g(t?.signal),n=typeof e==="string"?e:e.provider,s=this.providers.get(n);if(!s)return;let o=await P(s,this.credentials,this.authContext,{...t,signal:r});if(!o||typeof e==="string"||!e.headers)return o;return{...o,auth:{...o.auth,headers:I(o.auth.headers,e.headers)}}}async login(e,t,r,n){let s=g(r.signal);s.throwIfAborted();let o=this.providers.get(e);if(!o)throw new B("provider",`Unknown provider: ${e}`);let i=t==="oauth"?o.auth.oauth:o.auth.apiKey;if(!i?.login)throw new B("auth",`${o.name} does not support ${t} login`);let c=i.login({...r,signal:s},n),u=await v(c,s),f=!1,m,A=new Promise((y)=>{m=y}),w=this.credentials.modify(e,async()=>(f=!0,m?.(),u),{signal:s});w.catch(()=>{});try{await new Promise((y,M)=>{let a=()=>{if(!f)M(s.reason)};if(s.addEventListener("abort",a,{once:!0}),Promise.race([A,w]).then(()=>{s.removeEventListener("abort",a),y()},(l)=>{s.removeEventListener("abort",a),M(l)}),s.aborted)a()}),await w}catch(y){throw s.throwIfAborted(),new B("auth",`Credential store modify failed for ${e}`,{cause:y})}return u}async logout(e,t){let r=g(t?.signal);r.throwIfAborted();try{await this.credentials.delete(e,{signal:r})}catch(n){throw r.throwIfAborted(),new B("auth",`Credential store delete failed for ${e}`,{cause:n})}}requireProvider(e){let t=this.providers.get(e.provider);if(!t)throw new B("provider",`Unknown provider: ${e.provider}`);return t}requireChatProvider(e){return R(e),this.requireProvider(e)}async applyAuth(e,t){this.requireProvider(e);let r=await this.getAuth(e,{apiKey:t?.apiKey,env:t?.env,signal:t?.signal});if(!r)throw new B("auth",`Provider is not configured: ${e.provider}`);let n=r.auth,s=t?.apiKey??n.apiKey,o=I(n.headers,t?.headers);if(t?.transformHeaders)o=await t.transformHeaders(o??{});let i=r.env||t?.env?{...r.env??{},...t?.env??{}}:void 0,c=n.baseUrl?{...e,baseUrl:n.baseUrl}:e,{transformHeaders:u,...f}=t??{},m={...f,apiKey:s,headers:o,env:i};return{requestModel:c,requestOptions:m}}stream(e,t,r){let n=Nt(t);return ze(e,async()=>{let s=this.requireChatProvider(e),{requestModel:o,requestOptions:i}=await this.applyAuth(e,r);return s.stream(o,n,i)})}async complete(e,t,r){return this.stream(e,t,r).result()}streamSimple(e,t,r){let n=Nt(t);return ze(e,async()=>{let s=this.requireChatProvider(e),{requestModel:o,requestOptions:i}=await this.applyAuth(e,r);return s.streamSimple(o,n,i)})}async completeSimple(e,t,r){return this.streamSimple(e,t,r).result()}streamDeferred(e,t,r){return ze(e,async()=>{let n=this.requireChatProvider(e);if(!n.fetchDeferred)throw new B("provider",`Provider ${e.provider} does not support deferred responses`);let{requestModel:s,requestOptions:o}=await this.applyAuth(e,r);return n.fetchDeferred(s,t,o)})}async fetchDeferred(e,t,r){return this.streamDeferred(e,t,r).result()}async cancelDeferred(e,t,r){let n=this.requireChatProvider(e);if(!n.cancelDeferred)throw new B("provider",`Provider ${e.provider} does not support deferred responses`);let{requestModel:s,requestOptions:o}=await this.applyAuth(e,r);await n.cancelDeferred(s,t,o)}async generateImages(e,t,r){try{q(e);let n=this.requireProvider(e);if(!n.generateImages)throw new B("provider",`Provider ${e.provider} does not support image generation`);let{requestModel:s,requestOptions:o}=await this.applyAuth(e,r);return await n.generateImages(s,t,o)}catch(n){return T(e,n,r?.signal?.aborted)}}async classify(e,t,r){try{_(e),K(e,t);let n=this.requireProvider(e);if(!n.classify)throw new B("provider",`Provider ${e.provider} does not support classification`);let{requestModel:s,requestOptions:o}=await this.applyAuth(e,r);return await n.classify(s,t,o)}catch(n){return k(e,n,r?.signal?.aborted)}}}function di(e){return new U(e)}function d(e){let t=e.api&&typeof e.api.stream==="function"?e.api:void 0,r=t||!e.api?void 0:e.api,{images:n,classifiers:s}=e,o=t?[t]:Object.values(r??{}).filter((a)=>a!==void 0),i=Object.values(n??{}).filter((a)=>a!==void 0),c=Object.values(s??{}).filter((a)=>a!==void 0);if(o.length===0&&i.length===0&&c.length===0)throw Error(`Provider ${e.id}: at least one of "api", "images", or "classifiers" is required.`);let u=e.models,f=[],m=e.fetchModels,A=()=>{let a=[...u];for(let l of f){let h=a.findIndex((p)=>Dt(p)===Dt(l)&&p.id===l.id);if(h>=0)a[h]=l;else a.push(l)}return a},w=(a)=>t??r?.[a.api],y=(a,l)=>{let h=w(a);if(!h)return ze(a,async()=>{throw new B("stream",`Provider ${e.id} has no API implementation for "${a.api}"`)});return l(h)},M={id:e.id,name:e.name??e.id,baseUrl:e.baseUrl,headers:e.headers,auth:e.auth,getModels:()=>A().filter((a)=>je(a,"chat")),getAllModels:A,refreshModels:m?async(a)=>{if(a.stored){let p=a.stored.models.filter((S)=>S.provider===e.id).map((S)=>S);if(!await a.publish({update:()=>{f=p}}))return}if(!a.allowNetwork||a.signal.aborted)return;let l=await m(a);if(a.signal.aborted)return;let h=l.filter(L);await a.publish({persist:{models:h,checkedAt:Date.now()},update:()=>{f=h}})}:void 0,filterModels:e.filterModels,filterAllModels:e.filterAllModels,stream:(a,l,h)=>y(a,(p)=>p.stream(a,l,h)),streamSimple:(a,l,h)=>y(a,(p)=>p.streamSimple(a,l,h))};if(o.some((a)=>a.fetchDeferred!==void 0))M.fetchDeferred=(a,l,h)=>ze(a,async()=>{let p=w(a);if(!p?.fetchDeferred)throw new B("provider",`Provider ${e.id} does not support deferred responses for "${a.api}"`);return p.fetchDeferred(a,l,h)});if(o.some((a)=>a.cancelDeferred!==void 0))M.cancelDeferred=async(a,l,h)=>{let p=w(a);if(!p?.cancelDeferred)throw new B("provider",`Provider ${e.id} cannot cancel deferred responses for "${a.api}"`);await p.cancelDeferred(a,l,h)};if(n&&i.length>0)M.generateImages=async(a,l,h)=>{let p=n[a.api];if(!p)return T(a,new B("provider",`Provider ${e.id} has no image generation implementation for "${a.api}"`));return p.generateImages(a,l,h)};if(s&&c.length>0)M.classify=async(a,l,h)=>{let p=s[a.api];if(!p)return k(a,new B("provider",`Provider ${e.id} has no classifier implementation for "${a.api}"`));return p.classify(a,l,h)};return M}function Da(e,t){return je(e,"chat")&&e.api===t}function ne(e,t){let r=t.input+t.cacheRead+t.cacheWrite,n=e.cost,s=-1;for(let c of e.cost.tiers??[])if(r>c.inputTokensAbove&&c.inputTokensAbove>s)n=c,s=c.inputTokensAbove;let o=t.cacheWrite1h??0,i=t.cacheWrite-o;return t.cost.input=n.input/1e6*t.input,t.cost.output=n.output/1e6*t.output,t.cost.cacheRead=n.cacheRead/1e6*t.cacheRead,t.cost.cacheWrite=(n.cacheWrite*i+n.input*2*o)/1e6,t.cost.total=t.cost.input+t.cost.output+t.cost.cacheRead+t.cost.cacheWrite,t.cost}var x=["off","minimal","low","medium","high","xhigh","max"];function Qn(e){if(!e.reasoning)return["off"];return x.filter((t)=>{let r=e.thinkingLevelMap?.[t];if(r===null)return!1;if(t==="xhigh"||t==="max")return r!==void 0;return!0})}function Y(e,t){let r=Qn(e);if(r.includes(t))return t;let n=x.indexOf(t);if(n===-1)return r[0]??"off";for(let s=n;s<x.length;s++){let o=x[s];if(r.includes(o))return o}for(let s=n-1;s>=0;s--){let o=x[s];if(r.includes(o))return o}return r[0]??"off"}function Na(e,t){if(!e||!t)return!1;return Dt(e)===Dt(t)&&e.id===t.id&&e.provider===t.provider}
12
+ export{ze,ae,ps,li,B,ci,Dt,je,Xr,j,Ve,ui,Nt,xe,wr,me,Kn,ds,Ke,pe,Tt,pi,ms,Pe,La,Ta,ke,di,d,Da,ne,Qn,Y,Na};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{w}from"./chunk-3zz4a5tn.js";import{E}from"./chunk-qqfdg01g.js";import"./chunk-bh29df86.js";import{Rt,wt,It}from"./chunk-3fv2qcpg.js";import{pt}from"./chunk-fqfjjhkj.js";import{zt,jt}from"./chunk-8g1sbmwf.js";import{ce}from"./chunk-51f8zbj5.js";import{ge}from"./chunk-h4bvkm6p.js";import{Q,ee}from"./chunk-pa7yh2q3.js";import{Ue,Mt,te}from"./chunk-7hpf9qq2.js";import{J}from"./chunk-cjeyy6da.js";import{pe,Pe,ke,Y}from"./chunk-rj6qknjx.js";import{W}from"./chunk-q1s5r204.js";var C=new Set(["openai","openai-codex","opencode","chatgpt:subscription"]),A=16,P="https://chatgpt.com/settings/usage";function O(e,s){return(e.provider==="openai"||e.provider==="chatgpt:subscription")&&e.baseUrl==="https://api.openai.com/v1"&&s!==void 0&&!s.startsWith("sk-")}function h(e,s){if(!e)return!1;let r=s.toLowerCase();for(let[t,i]of Object.entries(e))if(t.toLowerCase()===r&&i!==null&&i.trim().length>0)return!0;return!1}function T(e,s,r){if(s)return s;if(h(r,"authorization")||h(r,"cf-aig-authorization"))return"unused";throw Error(`No API key for provider: ${e}`)}function _(e){return e.provider==="openrouter"||e.baseUrl.includes("openrouter.ai")?"openrouter":"openai"}function v(e,s){if(e)return e;if(E("PI_CACHE_RETENTION",s)==="long")return"long";return"short"}function d(e){return{supportsDeveloperRole:e.compat?.supportsDeveloperRole??!0,supportsMidConvoSystemMessages:e.compat?.supportsMidConvoSystemMessages??!1,sessionAffinityFormat:e.compat?.sessionAffinityFormat??_(e),supportsLongCacheRetention:e.compat?.supportsLongCacheRetention??!0,supportsStrictMode:e.compat?.supportsStrictMode??!1,supportsOpenAIGrammarTools:e.compat?.supportsOpenAIGrammarTools??!1,supportsAdditionalTools:e.compat?.supportsAdditionalTools??!1,supportsToolSearch:e.compat?.supportsToolSearch??!1,supportsExplicitPromptCacheMode:e.compat?.supportsExplicitPromptCacheMode??!1,supportsMaxOutputTokens:e.compat?.supportsMaxOutputTokens??!0}}function I(e,s){return s==="long"&&e.supportsLongCacheRetention&&!e.supportsExplicitPromptCacheMode?"24h":void 0}function x(e,s){if(!e.supportsExplicitPromptCacheMode)return;if(s==="none")return{mode:"explicit"};if(s==="long"&&e.supportsLongCacheRetention)return{ttl:"30m"};return}var b=(e,s,r)=>{let t=new W,i=pe(s,d(e).supportsMidConvoSystemMessages);return(async()=>{let o={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()};try{let c=T(e.provider,r?.apiKey,r?.headers),p=v(r?.cacheRetention,r?.env)==="none"?void 0:r?.sessionId,n=d(e),u=Ue(Pe(i.messages),n.supportsOpenAIGrammarTools),l=k(e,i,c,r?.headers,r?.fetch,p),f=L(e,i,r,n,u),m=await r?.onPayload?.(f,e);if(m!==void 0)f=m;let R={...r?.signal?{signal:r.signal}:{},...r?.timeoutMs!==void 0?{timeout:r.timeoutMs}:{},maxRetries:0},{data:y,response:g}=await ge(()=>l.responses.create(f,R).withResponse(),{maxRetries:r?.maxRetries,maxRetryDelayMs:r?.maxRetryDelayMs,signal:r?.signal});if(await r?.onResponse?.({status:g.status,headers:J(g.headers)},e),t.push({type:"start",partial:o}),await It(y,o,t,e,{onProviderStreamEvent:r?.onProviderStreamEvent,serviceTier:r?.serviceTier,grammarToolInputProperties:u,applyServiceTierPricing:(M,S)=>U(M,S,e)}),r?.signal?.aborted)throw Error("Request was aborted");if(o.stopReason==="pending")throw Error("OpenAI Responses stream ended without a stop reason");if(o.stopReason==="aborted"||o.stopReason==="error")throw Error(o.errorMessage||"An unknown error occurred");t.push({type:"done",reason:o.stopReason,message:o}),t.end()}catch(c){for(let p of o.content)delete p.index,delete p.partialJson,delete p.customInput;o.stopReason=r?.signal?.aborted?"aborted":"error";let a=ee(Q(c),`${e.provider==="openai"?"OpenAI":e.provider} API error`);o.errorMessage=a.includes("subscription_sharing_usage_limit_exceeded")?`${a}
3
+ Check your ChatGPT usage: ${P}`:a,t.push({type:"error",reason:o.stopReason,error:o}),t.end()}})(),t},oe=(e,s,r)=>{T(e.provider,r?.apiKey,r?.headers);let t={...te(e,s,r,r?.apiKey),toolChoice:r?.toolChoice},i=r?.reasoning?Y(e,r.reasoning):void 0;return b(e,s,{...t,reasoningEffort:i==="off"?void 0:i})};function k(e,s,r,t,i,o){let c=d(e),a={"User-Agent":ce(),...e.headers};if(e.provider==="github-copilot"){let p=zt(s.messages),n=jt({messages:s.messages,hasImages:p});Object.assign(a,n)}if(o)if(c.sessionAffinityFormat==="openrouter")a["x-session-id"]=o;else{if(c.sessionAffinityFormat==="openai")a.session_id=o;a["x-client-request-id"]=o}if(t)Object.assign(a,t);return new w({apiKey:r,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:i,defaultHeaders:a})}function L(e,s,r,t=d(e),i=Ue(Pe(s.messages),t.supportsOpenAIGrammarTools)){let o=ke(s.messages,t.supportsAdditionalTools||t.supportsToolSearch),c=Rt(e,s,C,{grammarToolInputProperties:i,supportsMidConvoSystemMessages:t.supportsMidConvoSystemMessages,supportsAdditionalTools:t.supportsAdditionalTools,supportsToolSearch:t.supportsToolSearch,toolOptions:{supportsStrictMode:t.supportsStrictMode,supportsOpenAIGrammarTools:t.supportsOpenAIGrammarTools}}),a=v(r?.cacheRetention,r?.env),p=O(e,r?.apiKey),n={model:e.id,input:c,stream:!0,prompt_cache_key:a==="none"?void 0:pt(r?.sessionId),prompt_cache_retention:p?void 0:I(t,a),prompt_cache_options:p?void 0:x(t,a),store:!1};if(r?.maxTokens&&t.supportsMaxOutputTokens&&!p)n.max_output_tokens=Math.max(r.maxTokens,A);if(r?.temperature!==void 0&&!p)n.temperature=r?.temperature;if(r?.serviceTier!==void 0)n.service_tier=r.serviceTier;if(o.requestTools.length>0)n.tools=wt(o.requestTools,{supportsStrictMode:t.supportsStrictMode,supportsOpenAIGrammarTools:t.supportsOpenAIGrammarTools});if(r?.toolChoice!==void 0)n.tool_choice=r.toolChoice;let u=r?.reasoningEffort??(r?.reasoningSummary?"medium":void 0);if(e.reasoning){if(u){let f=r?.reasoningEffort?e.thinkingLevelMap?.[r.reasoningEffort]??r.reasoningEffort:u;n.reasoning={effort:f,summary:r?.reasoningSummary||"auto"},n.include=["reasoning.encrypted_content"]}else if(e.provider!=="github-copilot"&&e.thinkingLevelMap?.off!==null)n.reasoning={effort:e.thinkingLevelMap?.off??"none"};if(e.provider==="xai")n.include=["reasoning.encrypted_content"]}let l=Mt(e,u??"off",r?.samplingParams);if(l)Object.assign(n,l);return n}function G(e,s){switch(s){case"flex":return 0.5;case"priority":case"fast":return e.id==="gpt-5.5"?2.5:2;default:return 1}}function U(e,s,r){let t=G(r,s);if(t===1)return;e.cost.input*=t,e.cost.output*=t,e.cost.cacheRead*=t,e.cost.cacheWrite*=t,e.cost.total=e.cost.input+e.cost.output+e.cost.cacheRead+e.cost.cacheWrite}export{b as stream,oe as streamSimple};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{In,Mn,Uo}from"./chunk-82dkdvs9.js";export{In as ENV_KEY,Mn as ENV_SECRET,Uo as fromEnv};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{E}from"./chunk-qqfdg01g.js";var a={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function p(e,r){let o=e.toLowerCase(),t=e.toUpperCase();return r?.[o]||r?.[t]||E(o)||E(t)||""}function f(e){if(e instanceof URL)return e;try{return new URL(e)}catch{return}}function u(e){return e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e}function l(e){let r=e.trim().toLowerCase();if(!r)return;if(r.startsWith("[")){let t=r.indexOf("]");if(t!==-1){let n=r.slice(1,t),c=r.slice(t+1);if(c.startsWith(":")){let s=Number.parseInt(c.slice(1),10);return{host:n,port:Number.isNaN(s)?0:s}}return{host:n,port:0}}}if(r.includes(":")&&r.split(":").length>2)return{host:r,port:0};let o=r.lastIndexOf(":");if(o!==-1&&o===r.indexOf(":")){let t=r.slice(0,o),n=Number.parseInt(r.slice(o+1),10);if(!Number.isNaN(n))return{host:t,port:n}}return{host:r,port:0}}function d(e,r,o){let t=p("no_proxy",o).toLowerCase();if(!t)return!0;if(t==="*")return!1;let n=u(e.toLowerCase());return t.split(/[,\s]/).every((c)=>{let s=l(c);if(!s)return!0;if(s.port&&s.port!==r)return!0;let i=u(s.host);if(i.startsWith("*."))i=i.slice(2);else if(i.startsWith(".")||i.startsWith("*"))i=i.slice(1);if(!i)return!0;if(n===i)return!1;if(n.endsWith(`.${i}`))return!1;return!0})}function h(e,r){let o=f(e);if(!o?.protocol||!o.host)return"";let t=o.protocol.split(":",1)[0],n=u(o.hostname||o.host.replace(/:\d*$/,"")),c=Number.parseInt(o.port,10)||a[t]||0;if(!d(n,c,r))return"";let s=p(`${t}_proxy`,r)||p("all_proxy",r);if(s&&!s.includes("://"))s=`${t}://${s}`;return s}var x="Unsupported proxy protocol. SOCKS and PAC proxy URLs are not supported; use an HTTP or HTTPS proxy URL.";function Tn(e,r){let o=h(e,r);if(!o)return;let t;try{t=new URL(o)}catch(n){throw Error(`Invalid proxy URL ${JSON.stringify(o)}: ${n instanceof Error?n.message:String(n)}`)}if(t.protocol!=="http:"&&t.protocol!=="https:")throw Error(`${x} Got ${t.protocol}`);return t}
3
+ export{Tn};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{h,f,g}from"./chunk-acd2cwza.js";import{ae}from"./chunk-rj6qknjx.js";var c=function(t,i){if(typeof t==="string"&&/^\.\.?\//.test(t))return t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,a,o,s,p){return a?i?".jsx":".js":o&&(!s||!p)?e:o+s+"."+p.toLowerCase()+"js"});return t},l=(t)=>{let i=import.meta.url.endsWith(".js")?t.replace(/\.ts$/,".js"):t;return import(c(i))},r;function Gs(t){r=t}var zs=()=>ae(async()=>r??await l("./bedrock-converse-stream.ts"));var n={"anthropic-messages":{"chat:claude-fable-5":{id:"claude-fable-5",name:"Claude Fable 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-fable-5.1":{id:"claude-fable-5.1",name:"Claude Fable 5.1",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:0.25,cacheWrite:12.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-haiku-4.5":{id:"claude-haiku-4.5",name:"Claude Haiku 4.5 (latest)",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:0.1,cacheWrite:1.25},contextWindow:200000,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsEagerToolInputStreaming:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-haiku-5.5":{id:"claude-haiku-5.5",name:"Claude Haiku 5.5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.1,output:0.5,cacheRead:0.01,cacheWrite:0.125,tiers:[{inputTokensAbove:1e5,input:0.5,output:2.5,cacheRead:0.05,cacheWrite:0.625}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-4.7":{id:"claude-opus-4.7",name:"Claude Opus 4.7",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:0.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:32000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-4.8":{id:"claude-opus-4.8",name:"Claude Opus 4.8",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:0.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-5":{id:"claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:0.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-5.5":{id:"claude-opus-5.5",name:"Claude Opus 5.5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:4,output:20,cacheRead:0.2,cacheWrite:5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-sonnet-4.6":{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:0.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:32000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-sonnet-5":{id:"claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-sonnet-5.5":{id:"claude-sonnet-5.5",name:"Claude Sonnet 5.5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.1,cacheWrite:2.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"}},"openai-completions":{"chat:gemini-3.5-flash":{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:0.15,cacheWrite:0},contextWindow:200000,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:3.75,cacheRead:0.075,cacheWrite:0},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gemini-3.7-flash":{id:"gemini-3.7-flash",name:"Gemini 3.7 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:3.75,cacheRead:0.075,cacheWrite:0},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gemini-3.8-flash":{id:"gemini-3.8-flash",name:"Gemini 3.8 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:3.75,cacheRead:0.075,cacheWrite:0},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.95,output:4,cacheRead:0.19,cacheWrite:0},contextWindow:256000,maxTokens:32000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:0.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsMidConvoSystemMessages:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"}},"openai-responses":{"chat:gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 Mini",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.25,output:2,cacheRead:0.025,cacheWrite:0},contextWindow:264000,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsOpenAIGrammarTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:0.25,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:5,output:22.5,cacheRead:0.5,cacheWrite:0}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 mini",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:4.5,cacheRead:0.075,cacheWrite:0},contextWindow:400000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.4-nano":{id:"gpt-5.4-nano",name:"GPT-5.4 nano",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.25,cacheRead:0.02,cacheWrite:0},contextWindow:400000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:10,output:45,cacheRead:1,cacheWrite:0}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.2,cacheRead:0.02,cacheWrite:0.25,tiers:[{inputTokensAbove:200000,input:0.4,output:1.8,cacheRead:0.04,cacheWrite:0.5}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:4,output:20,cacheRead:0.4,cacheWrite:5,tiers:[{inputTokensAbove:272000,input:8,output:30,cacheRead:0.8,cacheWrite:10}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:0.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272000,input:4,output:18,cacheRead:0.4,cacheWrite:5}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6-astra":{id:"gpt-6-astra",name:"GPT-6 Astra",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5,tiers:[{inputTokensAbove:272000,input:20,output:75,cacheRead:2,cacheWrite:25}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6-luna":{id:"gpt-6-luna",name:"GPT-6 Luna",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.1,output:0.5,cacheRead:0.01,cacheWrite:0.125,tiers:[{inputTokensAbove:272000,input:0.2,output:0.75,cacheRead:0.02,cacheWrite:0.25}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6-sol":{id:"gpt-6-sol",name:"GPT-6 Sol",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272000,input:4,output:15,cacheRead:0.4,cacheWrite:5}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6.1-sol":{id:"gpt-6.1-sol",name:"GPT-6.1 Sol",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.1,cacheWrite:2.5,tiers:[{inputTokensAbove:272000,input:4,output:15,cacheRead:0.2,cacheWrite:5}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:grok-4.5":{id:"grok-4.5",name:"Grok 4.5",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:200000,input:4,output:12,cacheRead:1,cacheWrite:0}]},contextWindow:500000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:grok-4.6":{id:"grok-4.6",name:"Grok 4.6",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:200000,input:4,output:12,cacheRead:1,cacheWrite:0}]},contextWindow:500000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:grok-4.7":{id:"grok-4.7",name:"Grok 4.7",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:200000,input:4,output:12,cacheRead:1,cacheWrite:0}]},contextWindow:500000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:mai-code-1-flash-picker":{id:"mai-code-1-flash-picker",name:"MAI-Code-1-Flash",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text"],cost:{input:0.75,output:4.5,cacheRead:0.075,cacheWrite:0},contextWindow:256000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},type:"chat"},"chat:mai-code-1.1-flash":{id:"mai-code-1.1-flash",name:"MAI-Code-1.1-Flash",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.2,cacheRead:0.02,cacheWrite:0},contextWindow:256000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"}}};var Pn=h("github-copilot",n),T=f("github-copilot",n),w=g("github-copilot",n);var Vi="https://radius.pi.dev";function m(t){if(typeof t!=="object"||t===null||Array.isArray(t))return!1;let i=t;return typeof i.id==="string"&&typeof i.name==="string"&&typeof i.reasoning==="boolean"&&Array.isArray(i.input)&&typeof i.cost==="object"&&i.cost!==null&&!Array.isArray(i.cost)&&typeof i.contextWindow==="number"&&typeof i.maxTokens==="number"}function u(t){if(typeof t!=="object"||t===null||Array.isArray(t))return;let{baseUrl:i,models:e}=t;if(typeof i!=="string"||!Array.isArray(e))return;return{baseUrl:i,models:e.filter(m).map((a)=>({...a}))}}function Rr(t){return(/^https?:\/\//iu.test(t)?t:`https://${t}`).replace(/\/+$/u,"")}function x(t){return u(t?.gatewayConfig)}function Ki(t,i){return i.models.map((e)=>({...e,api:"pi-messages",provider:t,baseUrl:i.baseUrl}))}function js(t,i){let e=x(i);return e?Ki(t,e):[]}function v(t){let i=t.trim();return i.length>512?`${i.slice(0,512)}\u2026`:i}async function Vs(t,i,e){let a={accept:"application/json"};if(i)a.authorization=`Bearer ${i}`;let o=await fetch(new URL("/v1/config",t),{headers:a,signal:e});if(!o.ok)throw Error(`Could not load Radius config from ${t}: ${o.status}: ${v(await o.text())}`);let s=u(await o.json());if(!s)throw Error(`Invalid Radius config from ${t}`);return s}
3
+ export{Gs,zs,Pn,Vi,Rr,Ki,js,Vs};
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{ie,K}from"./chunk-v4p8807b.js";import{r,u}from"./chunk-wwazj6mz.js";var rt=r(function(me){var{hasOwn:Q}=ie(),{streamCollector:oe}=ie();me.streamCollector=oe;var{buildQueryString:J,HttpResponse:G}=K(),A=u("https"),{Readable:ne}=u("stream"),O=u("http2");function M(e){let t=e&&typeof e==="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let s=Error("Request aborted");return s.name="AbortError",s.cause=t,s}let n=Error(String(t));return n.name="AbortError",n}let o=Error("Request aborted");return o.name="AbortError",o}var se=["ECONNRESET","EPIPE","ETIMEDOUT"],X=(e)=>{let t={};for(let o in e){if(!Q(e,o))continue;let n=e[o];t[o]=Array.isArray(n)?n.join(","):n}return t},m={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:(e)=>clearTimeout(e)},j=1000,re=(e,t,o=0)=>{if(!o)return-1;let n=(s)=>{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 ${o} ms.`),{name:"TimeoutError"}))},o-s),a=(f)=>{if(f?.connecting)f.on("connect",()=>{m.clearTimeout(c)});else m.clearTimeout(c)};if(e.socket)a(e.socket);else e.on("socket",a)};if(o<2000)return n(0),0;return m.setTimeout(n.bind(null,j),j)},ce=(e,t,o=0,n,s)=>{if(o)return m.setTimeout(()=>{let c=`@smithy/node-http-handler - [${n?"ERROR":"WARN"}] a request has exceeded the configured ${o} ms requestTimeout.`;if(n){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.",s?.warn?.(c)},o);return-1},ae=3000,ue=(e,{keepAlive:t,keepAliveMsecs:o},n=ae)=>{if(t!==!0)return-1;let s=()=>{if(e.socket)e.socket.setKeepAlive(t,o||0);else e.on("socket",(c)=>{c.setKeepAlive(t,o||0)})};if(n===0)return s(),0;return m.setTimeout(s,n)},B=3000,fe=(e,t,o=0)=>{let n=(s)=>{let c=o-s,a=()=>{e.destroy(),t(Object.assign(Error(`@smithy/node-http-handler - the request socket timed out after ${o} 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<o&&o<6000)return n(0),0;return m.setTimeout(n.bind(null,o===0?0:B),B)},W=6000;async function Y(e,t,o=W,n=!1){let s=t.headers,c=s?s.Expect||s.expect:void 0,a=-1,f=!0;if(!n&&c==="100-continue")f=await Promise.race([new Promise((d)=>{a=Number(m.setTimeout(()=>d(!0),Math.max(W,o)))}),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(f)de(e,t.body)}function de(e,t){if(t instanceof ne){t.pipe(e);return}if(t){let o=Buffer.isBuffer(t);if(o||typeof t==="string"){if(o&&t.byteLength===0)e.end();else e.end(t);return}let s=t;if(typeof s==="object"&&s.buffer&&typeof s.byteOffset==="number"&&typeof s.byteLength==="number"){e.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}e.end(Buffer.from(t));return}e.end()}var he=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,o=console){let{sockets:n,requests:s,maxSockets:c}=e;if(typeof c!=="number"||c===1/0)return t;let a=15000;if(Date.now()-a<t)return t;if(n&&s)for(let f in n){if(!Q(n,f))continue;let d=n[f]?.length??0,g=s[f]?.length??0;if(d>=c&&g>=2*c)return o?.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,o)=>{if(typeof e==="function")e().then((n)=>{t(this.resolveDefaultConfig(n))}).catch(o);else t(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t,requestTimeout:o}={}){if(!this.config)this.config=await this.configProvider;let n=this.config,s=n.logger,c=e.protocol==="https:";if(!c&&!this.config.httpAgent)this.config.httpAgent=await this.config.httpAgentProvider();return new Promise((a,f)=>{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,_(),f(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?n.httpsAgent:n.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,s)},n.socketAcquisitionWarningTimeout??(n.requestTimeout??2000)+(n.connectionTimeout??1000));let I=e.query?J(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 G({statusCode:i.statusCode||-1,reason:i.statusMessage,headers:X(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=o??n.requestTimeout;p=re(T,E,n.connectionTimeout),w=ce(T,E,R,n.throwOnRequestTimeout,s??console),v=fe(T,E,n.socketTimeout);let l=S.agent;if(typeof l==="object"&&"keepAlive"in l)C=ue(T,{keepAlive:l.keepAlive,keepAliveMsecs:l.keepAliveMsecs});d=Y(T,e,R,this.externalAgent).catch((i)=>(_(),f(i)))})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((o)=>{if(e===Symbol.for("logger"))return{...o,logger:o.logger??t};return{...o,[e]:t}})}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:t,connectionTimeout:o,socketTimeout:n,socketAcquisitionWarningTimeout:s,httpAgent:c,httpsAgent:a,throwOnRequestTimeout:f,logger:d}=e||{},g=!0,p=50;return{connectionTimeout:o,requestTimeout:t,socketTimeout:n,socketAcquisitionWarningTimeout:s,throwOnRequestTimeout:f,httpAgentProvider:async()=>{let w=u("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 le=new Uint16Array(1);class N{id=le[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 Z{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 ee{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 o=this.getUrlString(e),n=this.getPool(o);if(!this.config.disableConcurrency&&!t.isEventStream){let d=n.poll();if(d)return d.retain(),d}let s=new N(this.connect(o)),c=s.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(o,s)},f=()=>{this.removeFromPoolAndCheckedDestroy(o,s)};if(c.on("goaway",a),c.on("error",f),c.on("frameError",f),c.on("close",f),t.requestTimeout)c.setTimeout(t.requestTimeout,f);return n.offerLast(s),s.retain(),s}release(e,t){t.free()}createIsolatedSession(e,t){let o=this.getUrlString(e),n=new N(this.connect(o)),s=n.deref();s.settings({maxConcurrentStreams:1});let c=()=>{n.destroy()};s.on("error",c),s.on("frameError",c),s.on("close",c);let a=t.requestTimeout??300000;return s.setTimeout(a,c),n.retain(),n}destroy(){for(let[e,t]of this.connectionPools){for(let o of[...t])o.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,o]of this.connectionPools){let n=[];for(let s of o)n.push({id:s.id,active:s.useCount(),maxConcurrent:s.max,totalRequests:s.total});e[t]={sessions:n}}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 Z;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 ee({});static create(e){if(typeof e?.handle==="function")return e;return new q(e)}constructor(e){this.configProvider=new Promise((t,o)=>{if(typeof e==="function")e().then((n)=>{t(n||{})}).catch(o);else t(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:o,isEventStream:n}={}){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:s,disableConcurrentStreams:c}=this.config,a=c||n,f=o??s;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:n},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?J(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(f)l.setTimeout(f,()=>{l.close();let i=Error(`Stream timed out because of no activity for ${f} 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,te)=>{x(Error(`Frame type id ${i} in stream id ${te} 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 G({statusCode:i[":status"]??-1,headers:X(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=Y(l,e,f)})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((o)=>({...o,[e]:t}))}httpHandlerConfigs(){return this.config??{}}}me.DEFAULT_REQUEST_TIMEOUT=he;me.NodeHttp2Handler=q;me.NodeHttpHandler=U});
5
+ export{rt};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Jr,Zt,_r,Er,Ar,Tr,Zr,en,er,tn,rn,nn,on,sn,an}from"./chunk-w35r8v6x.js";import{E}from"./chunk-qqfdg01g.js";import{ce}from"./chunk-51f8zbj5.js";import{Q,ee}from"./chunk-pa7yh2q3.js";import{te}from"./chunk-7hpf9qq2.js";import{x}from"./chunk-chfzk1fx.js";import{Ae}from"./chunk-cjeyy6da.js";import{j,xe,me,Ke,ne,Y}from"./chunk-rj6qknjx.js";import{W}from"./chunk-q1s5r204.js";var b="v1",O="gcp-vertex-credentials",R=0,C=(e,o,t)=>{let i=new W,u=Ke(o);return(async()=>{let n={role:"assistant",content:[],api:"google-vertex",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()};try{if(t?.fetch&&t.fetch!==globalThis.fetch)throw Error("Custom fetch is not supported by the Google Vertex adapter");let c=L(t),g=c?S(e,c,t?.headers):I(e,M(t),P(t),t?.headers,t?.env),h=U(e,u,t),m=await t?.onPayload?.(h,e);if(m!==void 0)h=m;let p=await an(()=>g.models.generateContentStream(h),t);i.push({type:"start",partial:n});let r=null,f=n.content,l=()=>f.length-1;for await(let s of p){await t?.onProviderStreamEvent?.(s,e),n.responseId||=s.responseId;let k=s.candidates?.[0];if(k?.content?.parts)for(let a of k.content.parts){if(a.text!==void 0){let d=en(a);if(!r||d&&r.type!=="thinking"||!d&&r.type!=="text"){if(r)if(r.type==="text")i.push({type:"text_end",contentIndex:f.length-1,content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});if(d)r={type:"thinking",thinking:"",thinkingSignature:void 0},n.content.push(r),i.push({type:"thinking_start",contentIndex:l(),partial:n});else r={type:"text",text:""},n.content.push(r),i.push({type:"text_start",contentIndex:l(),partial:n})}if(r.type==="thinking")r.thinking+=a.text,r.thinkingSignature=er(r.thinkingSignature,a.thoughtSignature),i.push({type:"thinking_delta",contentIndex:l(),delta:a.text,partial:n});else r.text+=a.text,r.textSignature=er(r.textSignature,a.thoughtSignature),i.push({type:"text_delta",contentIndex:l(),delta:a.text,partial:n})}if(a.functionCall){if(r){if(r.type==="text")i.push({type:"text_end",contentIndex:l(),content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});r=null}let d=a.functionCall.id,y={type:"toolCall",id:!d||n.content.some((T)=>T.type==="toolCall"&&T.id===d)?`${a.functionCall.name}_${Date.now()}_${++R}`:d,name:a.functionCall.name||"",arguments:a.functionCall.args??{},...a.thoughtSignature&&{thoughtSignature:a.thoughtSignature}};n.content.push(y),i.push({type:"toolcall_start",contentIndex:l(),partial:n}),i.push({type:"toolcall_delta",contentIndex:l(),delta:JSON.stringify(y.arguments),partial:n}),i.push({type:"toolcall_end",contentIndex:l(),toolCall:y,partial:n})}}if(k?.finishReason){if(n.rawStopReason=k.finishReason,n.stopReason=sn(k.finishReason),n.content.some((a)=>a.type==="toolCall")&&n.stopReason==="stop")n.stopReason="toolUse"}if(s.usageMetadata)n.usage={input:(s.usageMetadata.promptTokenCount||0)-(s.usageMetadata.cachedContentTokenCount||0),output:(s.usageMetadata.candidatesTokenCount||0)+(s.usageMetadata.thoughtsTokenCount||0),cacheRead:s.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,reasoning:s.usageMetadata.thoughtsTokenCount||0,totalTokens:s.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},ne(e,n.usage)}if(r)if(r.type==="text")i.push({type:"text_end",contentIndex:l(),content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});if(t?.signal?.aborted)throw Error("Request was aborted");if(n.stopReason==="pending")throw Error("Google Vertex stream ended without a finish reason");if(n.stopReason==="aborted"||n.stopReason==="error"){let s=n.rawStopReason?`Provider stopped with: ${n.rawStopReason}`:"An unknown error occurred";throw Error(s)}i.push({type:"done",reason:n.stopReason,message:n}),i.end()}catch(c){for(let g of n.content)if("index"in g)delete g.index;n.stopReason=t?.signal?.aborted?"aborted":"error",n.errorMessage=ee(Q(c)),i.push({type:"error",reason:n.stopReason,error:n}),i.end()}})(),i},ae=(e,o,t)=>{let i={...te(e,o,t,void 0),toolChoice:t?.toolChoice};if(!t?.reasoning)return C(e,o,{...i,thinking:{enabled:!1}});let u=Y(e,t.reasoning);if(u==="off")return C(e,o,{...i,thinking:{enabled:!1}});let n=_r(e,u);if(Er(e))return C(e,o,{...i,thinking:{enabled:!0,level:Ar(n)}});return C(e,o,{...i,thinking:{enabled:!0,budgetTokens:D(e,n,t.thinkingBudgets)}})};function I(e,o,t,i,u){let n=G(u);return new Zt({vertexai:!0,project:o,location:t,apiVersion:b,...n?{googleAuthOptions:n}:{},httpOptions:v(e,i)})}function S(e,o,t){return new Zt({vertexai:!0,apiKey:o,apiVersion:b,httpOptions:v(e,t)})}function v(e,o){let t={},i=w(e.baseUrl);if(i){if(t.baseUrl=i,t.baseUrlResourceScope=Jr.COLLECTION,_(i))t.apiVersion=""}let u=Ae({"User-Agent":ce(),...e.headers,...o});if(u)t.headers=u;return Object.keys(t).length>0?t:void 0}function w(e){let o=e.trim();if(!o||o.includes("{location}"))return;return o}function _(e){try{return new URL(e).pathname.split("/").some((t)=>/^v\d+(?:beta\d*)?$/.test(t))}catch{return/(?:^|\/)v\d+(?:beta\d*)?(?:\/|$)/.test(e)}}function G(e){let o=E("GOOGLE_APPLICATION_CREDENTIALS",e);return o?{keyFilename:o}:void 0}function L(e){let o=e?.apiKey?.trim();if(!o||o===O||A(o))return;return o}function A(e){return/^<[^>]+>$/.test(e)}function M(e){let o=e?.project||E("GOOGLE_CLOUD_PROJECT",e?.env)||E("GCLOUD_PROJECT",e?.env);if(!o)throw Error("Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.");return o}function P(e){let o=e?.location||E("GOOGLE_CLOUD_LOCATION",e?.env);if(!o)throw Error("Vertex AI requires a location. Set GOOGLE_CLOUD_LOCATION or pass location in options.");return o}function U(e,o,t={}){let i=tn(e,o),u=xe(o.messages),n=me(o.messages),c={};if(t.temperature!==void 0)c.temperature=t.temperature;if(t.maxTokens!==void 0)c.maxOutputTokens=t.maxTokens;let g=nn(e.id),h=n.length>0?on(n,t.toolChoice,g):void 0,m=u?j(u):"",p={...Object.keys(c).length>0&&c,...m&&{systemInstruction:x(m)},...n.length>0&&{tools:rn(n,!1,g)},...h!==void 0&&{toolConfig:{functionCallingConfig:{mode:h}}}};if(t.thinking?.enabled&&e.reasoning){let f={includeThoughts:!0};if(t.thinking.level!==void 0)f.thinkingLevel=Tr(t.thinking.level);else if(t.thinking.budgetTokens!==void 0)f.thinkingBudget=t.thinking.budgetTokens;p.thinkingConfig=f}else if(e.reasoning&&t.thinking&&!t.thinking.enabled)p.thinkingConfig=Zr(e);if(t.signal){if(t.signal.aborted)throw Error("Request aborted");p.abortSignal=t.signal}return{model:e.id,contents:i,config:p}}function D(e,o,t){if(t?.[o]!==void 0)return t[o];if(e.id.includes("2.5-pro"))return{minimal:128,low:2048,medium:8192,high:32768}[o];if(e.id.includes("2.5-flash"))return{minimal:128,low:2048,medium:8192,high:24576}[o];return-1}export{C as stream,ae as streamSimple};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ function o(t,r,n,i,s){if(i==="m")throw TypeError("Private method is not writable");if(i==="a"&&!s)throw TypeError("Private accessor was defined without a setter");if(typeof r==="function"?t!==r||!s:!r.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(t,n):s?s.value=n:r.set(t,n),n}function e(t,r,n,i){if(n==="a"&&!i)throw TypeError("Private accessor was defined without a getter");if(typeof r==="function"?t!==r||!i:!r.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(t):i?i.value:r.get(t)}function dt(t){return typeof t==="object"&&t!==null&&(("name"in t)&&t.name==="AbortError"||("message"in t)&&String(t.message).includes("FetchRequestCanceledException"))}var ir=(t)=>{if(t instanceof Error)return t;if(typeof t==="object"&&t!==null){try{let r=Object.prototype.toString.call(t);if(r==="[object Error]"||r==="[object DOMException]"){let n=Error(t.message,t.cause?{cause:t.cause}:{});if(t.stack)n.stack=t.stack;if(t.cause&&!n.cause)n.cause=t.cause;if(t.name)n.name=t.name;return n}}catch{}try{return Error(JSON.stringify(t))}catch{}}return Error(t)};var p=(()=>{class t extends Error{}return t})();class le extends p{constructor(t,r,n,i,s){super(`${le.makeMessage(t,r,n)}`);this.status=t,this.headers=i,this.requestID=i?.get("request-id"),this.workspaceID=i?.get("anthropic-workspace-id"),this.error=r,this.type=s??null}static makeMessage(t,r,n){let i=r?.message?typeof r.message==="string"?r.message:JSON.stringify(r.message):r?JSON.stringify(r):n;if(t&&i)return`${t} ${i}`;if(t)return`${t} status code (no body)`;if(i)return i;return"(no status code or body)"}static generate(t,r,n,i){if(!t||!i)return new Ht({message:n,cause:ir(r)});let s=r,c=s?.error?.type;if(t===400)return new vo(t,s,n,i,c);if(t===401)return new _o(t,s,n,i,c);if(t===403)return new Eo(t,s,n,i,c);if(t===404)return new Ao(t,s,n,i,c);if(t===409)return new To(t,s,n,i,c);if(t===422)return new Po(t,s,n,i,c);if(t===429)return new ko(t,s,n,i,c);if(t>=500)return new Co(t,s,n,i,c);return new le(t,s,n,i,c)}}class Ne extends le{constructor({message:t}={}){super(void 0,void 0,t||"Request was aborted.",void 0)}}class Ht extends le{constructor({message:t,cause:r}){super(void 0,void 0,t||"Connection error.",void 0);if(r)this.cause=r}}class xo extends Ht{constructor({message:t}={}){super({message:t??"Request timed out."})}}class Bi extends p{constructor(t,{cause:r}={}){super(t??"Retryable error.");if(r!==void 0)this.cause=r}}class vo extends le{}class _o extends le{}class Eo extends le{}class Ao extends le{}class To extends le{}class Po extends le{}class ko extends le{}class Co extends le{}var b=/^[a-z][a-z0-9+.-]*:/i,$s=(t)=>b.test(t),Me=(t)=>(Me=Array.isArray,Me(t)),$i=Me;function _n(t){if(typeof t!=="object")return{};return t??{}}function Wi(t){if(!t)return!0;for(let r in t)return!1;return!0}function l(t,r){return Object.prototype.hasOwnProperty.call(t,r)}function Hi(t){return t!=null&&typeof t==="object"&&!Array.isArray(t)}var Ro=(t,r)=>{if(typeof r!=="number"||!Number.isInteger(r))throw new p(`${t} must be an integer`);if(r<0)throw new p(`${t} must be a positive integer`);return r};var Io=(t)=>{try{return JSON.parse(t)}catch(r){return}};function qt(t){}var N=(t)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[t]?.trim()||void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(t)?.trim()||void 0;return};function Ws(t){let r=0;for(let s of t)r+=s.length;let n=new Uint8Array(r),i=0;for(let s of t)n.set(s,i),i+=s.length;return n}var y;function sr(t){let r;return(y??(r=new globalThis.TextEncoder,y=r.encode.bind(r)))(t)}var w;function Gt(t){let r;return(w??(r=new globalThis.TextDecoder,w=r.decode.bind(r)))(t)}var En="warn",a={off:0,error:200,warn:300,info:400,debug:500},Mo=(t,r,n)=>{if(!t)return;if(l(a,t))return t;n.warn(`${r} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(a))}`);return};function u(){}function f(t,r,n){if(!r||a[t]>a[n])return u;else return r[t].bind(r)}var O={error:u,warn:u,info:u,debug:u},h=new WeakMap;function x(t,r){let n=h.get(t);if(n&&n[0]===r)return n[1];let i={error:f("error",t,r),warn:f("warn",t,r),info:f("info",t,r),debug:f("debug",t,r)};return h.set(t,[r,i]),i}function D(t){let r=t.logger,n=t.logLevel??"off";if(!r)return O;return x(r,n)}var m,d;function Hs(){let t=N("ANTHROPIC_LOG");if(!d||t!==m)m=t,d=x(console,Mo(t,"process.env['ANTHROPIC_LOG']",x(console,En))??En);return d}function vt(t,r,n){if(t.debug===u)return;t.debug(r,E(n))}var E=(t)=>{if(t.options)t.options={...t.options},delete t.options.headers;if(t.headers)t.headers=Object.fromEntries((t.headers instanceof Headers?[...t.headers]:Object.entries(t.headers)).map(([r,n])=>[r,r.toLowerCase()==="authorization"||r.toLowerCase()==="api-key"||r.toLowerCase()==="x-api-key"||r.toLowerCase()==="cookie"||r.toLowerCase()==="set-cookie"?"***":n]));if("retryOfRequestLogID"in t){if(t.retryOfRequestLogID)t.retryOf=t.retryOfRequestLogID;delete t.retryOfRequestLogID}return t};function Se(t,r){return t instanceof le&&t.status===r}function T(t){return t instanceof le&&typeof t.status==="number"&&t.status>=400&&t.status<500}function ar(t){return T(t)&&!Se(t,408)&&!Se(t,409)&&!Se(t,429)}function Oo(t,r,n){return Math.min(r*2**t,n)}function qs(t,r){return t+Math.random()*(r-t)}function Lo(t){return t*(1-Math.random()*0.25)}var I=(()=>{class t extends Error{constructor(r){let n=typeof r==="string"?r:r.map((i)=>{if(i.type==="text")return i.text;return`[${i.type}]`}).join(" ");super(n);this.name="ToolError",this.content=r}}return t})();var qi=15000,g=5000;function An(t,r){if(!(t>=g))throw new p(`${r} must be at least ${g}ms (got ${t}); to run without memory sync, pass \`memorySyncIntervalMs: null\` to the worker instead`)}function lr(){let t,r;return{promise:new Promise((i,s)=>{t=i,r=s}),resolve:t,reject:r}}
3
+ export{o,e,dt,ir,p,le,Ne,Ht,xo,Bi,vo,_o,Eo,Ao,To,Po,ko,Co,$s,Me,$i,_n,Wi,Hi,Ro,Io,qt,N,Ws,sr,Gt,En,Mo,D,Hs,vt,Se,ar,Oo,qs,Lo,I,qi,An,lr};