@qitqode/qitqode-android-arm64 0.1.29 → 0.1.30

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 (386) hide show
  1. package/bundle/{chunk-fj7kd4gc.js → chunk-04tw0r4s.js} +1 -1
  2. package/bundle/{chunk-sbx9z70j.js → chunk-07g7cybt.js} +1 -1
  3. package/bundle/chunk-07ws99b1.js +2 -0
  4. package/bundle/chunk-09c4ngag.js +2 -0
  5. package/bundle/{chunk-j2zay4da.js → chunk-09kba1hg.js} +2 -2
  6. package/bundle/{chunk-dd3m74rc.js → chunk-0ch32p4c.js} +1 -1
  7. package/bundle/{chunk-2p2ch1k2.js → chunk-0df4kede.js} +1 -1
  8. package/bundle/{chunk-f29n7826.js → chunk-0fmbz83g.js} +1 -1
  9. package/bundle/{chunk-gd5stg49.js → chunk-0jgsp4c2.js} +1 -1
  10. package/bundle/chunk-0jgst767.js +2 -0
  11. package/bundle/chunk-0psrr9vp.js +2 -0
  12. package/bundle/{chunk-hn1f6rne.js → chunk-12bssxd4.js} +2 -2
  13. package/bundle/{chunk-a2qerqgd.js → chunk-1bhvt33f.js} +1 -1
  14. package/bundle/{chunk-3rt2k5sc.js → chunk-1dwcga8g.js} +1 -1
  15. package/bundle/{chunk-xn5v8wgh.js → chunk-1fbeendk.js} +1 -1
  16. package/bundle/chunk-1j73cnvz.js +2 -0
  17. package/bundle/{chunk-tqsx2m1j.js → chunk-1ngtxja9.js} +1 -1
  18. package/bundle/{chunk-p7h2qd7z.js → chunk-1qshjfzm.js} +1 -1
  19. package/bundle/{chunk-0626rvy2.js → chunk-1rp1cvmc.js} +1 -1
  20. package/bundle/{chunk-csdm3n24.js → chunk-1sgby720.js} +1 -1
  21. package/bundle/{chunk-6hmj972a.js → chunk-1t9jne14.js} +1 -1
  22. package/bundle/chunk-1yddn03z.js +2 -0
  23. package/bundle/{chunk-74zgcxeg.js → chunk-26nfphsg.js} +1 -1
  24. package/bundle/{chunk-71pmrpkc.js → chunk-27dgtm8r.js} +1 -1
  25. package/bundle/{chunk-n3t52cz2.js → chunk-27yxgy03.js} +1 -1
  26. package/bundle/{chunk-2hw0jzv4.js → chunk-2ahqhh4z.js} +1 -1
  27. package/bundle/{chunk-z5yrvg40.js → chunk-2bn4b42t.js} +1 -1
  28. package/bundle/{chunk-9kjj44cr.js → chunk-2dzk5txw.js} +1 -1
  29. package/bundle/chunk-2ec6ps8r.js +5 -0
  30. package/bundle/{chunk-q5363rr9.js → chunk-2gerf08b.js} +2 -2
  31. package/bundle/{chunk-2mjc44ev.js → chunk-2jmxt3fb.js} +1 -1
  32. package/bundle/{chunk-7926bzm7.js → chunk-2km50rd3.js} +1 -1
  33. package/bundle/{chunk-rptvpa1v.js → chunk-2q96x1t5.js} +1 -1
  34. package/bundle/{chunk-pg8dz1rq.js → chunk-2rs39vj2.js} +1 -1
  35. package/bundle/{chunk-3n49y4kh.js → chunk-2tnarng3.js} +1 -1
  36. package/bundle/{chunk-z160s5p5.js → chunk-2vepzgek.js} +1 -1
  37. package/bundle/{chunk-b9hstp7h.js → chunk-2y90ad1v.js} +1 -1
  38. package/bundle/{chunk-ed723mw1.js → chunk-371r2111.js} +1 -1
  39. package/bundle/{chunk-g06rv5fq.js → chunk-37n34pzd.js} +1 -1
  40. package/bundle/chunk-38g8yzw0.js +2 -0
  41. package/bundle/chunk-3bkd0ar3.js +2 -0
  42. package/bundle/{chunk-9atkgkaq.js → chunk-3bmzjznz.js} +1 -1
  43. package/bundle/chunk-3f4zht9e.js +2 -0
  44. package/bundle/{chunk-0yqbyres.js → chunk-3g1yz39h.js} +1 -1
  45. package/bundle/{chunk-k095hd3c.js → chunk-3n1324bt.js} +1 -1
  46. package/bundle/{chunk-ef2b07fm.js → chunk-3nwve06r.js} +1 -1
  47. package/bundle/{chunk-cev2qj7w.js → chunk-3nyqh1d6.js} +1 -1
  48. package/bundle/{chunk-p5360c2q.js → chunk-3pxnp6jb.js} +1 -1
  49. package/bundle/{chunk-94qmhz2p.js → chunk-3szwfy7w.js} +2 -2
  50. package/bundle/chunk-426dt7be.js +2 -0
  51. package/bundle/{chunk-6jewfaqa.js → chunk-42f7p0hq.js} +2 -2
  52. package/bundle/chunk-4amgp4yd.js +3 -0
  53. package/bundle/{chunk-3vmh2ge6.js → chunk-4p5e5tsz.js} +1 -1
  54. package/bundle/{chunk-nfzmvy30.js → chunk-4pjm21a5.js} +1 -1
  55. package/bundle/{chunk-6hdjkvr1.js → chunk-4qqkqrn9.js} +2 -2
  56. package/bundle/chunk-4sz3jbc5.js +2 -0
  57. package/bundle/{chunk-bsf6n350.js → chunk-4tbwha3m.js} +2 -2
  58. package/bundle/{chunk-qtsmgjk7.js → chunk-4xh1qm90.js} +1 -1
  59. package/bundle/{chunk-t3q7qakr.js → chunk-58x5seqn.js} +1 -1
  60. package/bundle/{chunk-thk93j3e.js → chunk-5a5t01ka.js} +1 -1
  61. package/bundle/{chunk-hhgjbag9.js → chunk-5fgx6fa4.js} +1 -1
  62. package/bundle/{chunk-n86s4fw4.js → chunk-5fz8tph5.js} +1 -1
  63. package/bundle/{chunk-n5sh2790.js → chunk-5qam3c8r.js} +1 -1
  64. package/bundle/{chunk-45jqjyk9.js → chunk-5v4py9p2.js} +1 -1
  65. package/bundle/{chunk-z44m19vm.js → chunk-5xe6x2rt.js} +1 -1
  66. package/bundle/chunk-618tmyx9.js +2 -0
  67. package/bundle/{chunk-zasd8cz8.js → chunk-61c62e5s.js} +1 -1
  68. package/bundle/chunk-6d9wsjxm.js +2 -0
  69. package/bundle/{chunk-zqxmr01r.js → chunk-6fp8a9ek.js} +1 -1
  70. package/bundle/{chunk-ndmrg80b.js → chunk-6hv59ere.js} +1 -1
  71. package/bundle/{chunk-yaj9ywvz.js → chunk-6nbzdb0r.js} +1 -1
  72. package/bundle/{chunk-k7dcfqjs.js → chunk-6qy1ghrx.js} +1 -1
  73. package/bundle/chunk-730a2d1k.js +2 -0
  74. package/bundle/{chunk-gf5pwww1.js → chunk-76wrw0cs.js} +1 -1
  75. package/bundle/chunk-7bd0x9vf.js +2 -0
  76. package/bundle/chunk-7czkntef.js +2 -0
  77. package/bundle/chunk-7ex57nyh.js +2 -0
  78. package/bundle/chunk-7gpczxbh.js +2 -0
  79. package/bundle/chunk-7j0bgeh2.js +2 -0
  80. package/bundle/{chunk-cfxjwfn4.js → chunk-7jbz3dgt.js} +1 -1
  81. package/bundle/{chunk-cjfgs1x8.js → chunk-7ppd2phw.js} +1 -1
  82. package/bundle/chunk-7py443fe.js +2 -0
  83. package/bundle/{chunk-v7deh7aj.js → chunk-7yrhe3xq.js} +1 -1
  84. package/bundle/{chunk-xhncwg5v.js → chunk-89q1y7tc.js} +1 -1
  85. package/bundle/{chunk-yn576pje.js → chunk-89v6dgpp.js} +2 -2
  86. package/bundle/chunk-8qkhddq3.js +8 -0
  87. package/bundle/chunk-90q5sae0.js +2 -0
  88. package/bundle/chunk-9amwe0ed.js +2 -0
  89. package/bundle/chunk-9grvepmd.js +2 -0
  90. package/bundle/chunk-9hrh15p2.js +2 -0
  91. package/bundle/{chunk-azx0zxnx.js → chunk-9j1qqdr2.js} +1 -1
  92. package/bundle/{chunk-s2za1n7h.js → chunk-a0v55ywn.js} +2 -2
  93. package/bundle/{chunk-a8p9aggx.js → chunk-a1p2f16h.js} +2 -2
  94. package/bundle/{chunk-8f0g7d7k.js → chunk-a1pw9r6f.js} +1 -1
  95. package/bundle/{chunk-95qs7wnz.js → chunk-a2qz9m10.js} +1 -1
  96. package/bundle/{chunk-az9hsk6z.js → chunk-ab6cabxh.js} +1 -1
  97. package/bundle/chunk-av6ezvxm.js +2 -0
  98. package/bundle/{chunk-yjj4cvqg.js → chunk-aztre27e.js} +1 -1
  99. package/bundle/{chunk-b4qd109w.js → chunk-b0syck9r.js} +1 -1
  100. package/bundle/{chunk-hevb7k95.js → chunk-b3dqcbsc.js} +1 -1
  101. package/bundle/{chunk-pq2prhb2.js → chunk-b3rpzkcb.js} +1 -1
  102. package/bundle/{chunk-tsb9g1nz.js → chunk-b8bytvka.js} +1 -1
  103. package/bundle/{chunk-awav98j0.js → chunk-b8tw709r.js} +1 -1
  104. package/bundle/{chunk-6528bthc.js → chunk-b9za12y1.js} +1 -1
  105. package/bundle/{chunk-fsy279s5.js → chunk-be216spx.js} +2 -2
  106. package/bundle/chunk-beksar7w.js +2 -0
  107. package/bundle/chunk-bg66rqrx.js +2 -0
  108. package/bundle/{chunk-a94s0jks.js → chunk-bn15mzd7.js} +1 -1
  109. package/bundle/{chunk-z29fwg61.js → chunk-bpbptx89.js} +1 -1
  110. package/bundle/{chunk-qzjpea91.js → chunk-bss414qz.js} +1 -1
  111. package/bundle/chunk-bt6yw07v.js +2 -0
  112. package/bundle/{chunk-d0qqgxs4.js → chunk-btz9jvec.js} +1 -1
  113. package/bundle/{chunk-ypthfv6d.js → chunk-bvkq0a5q.js} +1 -1
  114. package/bundle/{chunk-bx6kyvg7.js → chunk-c01z3cvg.js} +1 -1
  115. package/bundle/{chunk-s6me101a.js → chunk-c5e6sk9c.js} +1 -1
  116. package/bundle/{chunk-yn05n0az.js → chunk-cafzcmrg.js} +2 -2
  117. package/bundle/{chunk-2xxefrps.js → chunk-cdhmc0t0.js} +1 -1
  118. package/bundle/{chunk-qredfmch.js → chunk-chmrvbbj.js} +1 -1
  119. package/bundle/{chunk-b1ntb3dh.js → chunk-ct48575c.js} +1 -1
  120. package/bundle/{chunk-yp3dj4wh.js → chunk-cvdxgsq1.js} +1 -1
  121. package/bundle/chunk-cy9s1ma5.js +2 -0
  122. package/bundle/chunk-d0nkvp57.js +2 -0
  123. package/bundle/{chunk-abtn6nec.js → chunk-d5bxan80.js} +1 -1
  124. package/bundle/{chunk-5n4hpc4f.js → chunk-d6r4xwtg.js} +3 -3
  125. package/bundle/{chunk-xk1nh1ay.js → chunk-dcvatax2.js} +2 -2
  126. package/bundle/{chunk-m2ny1en7.js → chunk-ddnpx1yx.js} +4 -4
  127. package/bundle/{chunk-qzcfjz9g.js → chunk-dfnv7vkn.js} +1 -1
  128. package/bundle/{chunk-18vygvnc.js → chunk-dhjp0zx2.js} +1 -1
  129. package/bundle/{chunk-sv48x9h8.js → chunk-dq9kpj4a.js} +1 -1
  130. package/bundle/{chunk-88dhcv37.js → chunk-drs1gv2b.js} +1 -1
  131. package/bundle/{chunk-geccvf9d.js → chunk-ds69qc8b.js} +1 -1
  132. package/bundle/chunk-dvk2wwjj.js +2 -0
  133. package/bundle/chunk-dxe29jj6.js +2 -0
  134. package/bundle/chunk-e0jy9qxd.js +2 -0
  135. package/bundle/{chunk-fhdpp77n.js → chunk-eb9mytjq.js} +1 -1
  136. package/bundle/{chunk-c19t7e8s.js → chunk-ecn8gbtz.js} +1 -1
  137. package/bundle/chunk-eercqt72.js +2 -0
  138. package/bundle/{chunk-8jzjvmaz.js → chunk-efxd6b2k.js} +1 -1
  139. package/bundle/{chunk-hd2kb05a.js → chunk-ejjea8hh.js} +1 -1
  140. package/bundle/chunk-eneawsj8.js +2 -0
  141. package/bundle/{chunk-v9xnk9pz.js → chunk-ezja6njs.js} +1 -1
  142. package/bundle/{chunk-8kz3n8ye.js → chunk-f45tp3e3.js} +1 -1
  143. package/bundle/chunk-f72pppr7.js +2 -0
  144. package/bundle/chunk-feyphhxd.js +2 -0
  145. package/bundle/{chunk-2w20mhch.js → chunk-fjgyrsbw.js} +1 -1
  146. package/bundle/{chunk-v00cptj6.js → chunk-fkgv2hqd.js} +1 -1
  147. package/bundle/{chunk-8d2ddmf0.js → chunk-fnbpap62.js} +1 -1
  148. package/bundle/chunk-fnnch1e9.js +2 -0
  149. package/bundle/{chunk-7wthn44y.js → chunk-fqw4y7x0.js} +2 -2
  150. package/bundle/{chunk-yk8kk25c.js → chunk-ft93f33g.js} +1 -1
  151. package/bundle/{chunk-3q6650we.js → chunk-g1dwbvkg.js} +1 -1
  152. package/bundle/{chunk-mb4wvwfw.js → chunk-g3dhsmbt.js} +3 -3
  153. package/bundle/{chunk-1xw68zak.js → chunk-g7rjtehn.js} +1 -1
  154. package/bundle/{chunk-q0xzbad1.js → chunk-gf0pdgjs.js} +1 -1
  155. package/bundle/{chunk-gd45tjbd.js → chunk-ggqst87g.js} +1 -1
  156. package/bundle/{chunk-n34y5gp6.js → chunk-gj3hzx3d.js} +2 -2
  157. package/bundle/chunk-gk34kh8p.js +2 -0
  158. package/bundle/{chunk-pycjksh4.js → chunk-gm85xefs.js} +1 -1
  159. package/bundle/chunk-gn50xqbd.js +2 -0
  160. package/bundle/{chunk-89f8v2y8.js → chunk-h0rpmne5.js} +1 -1
  161. package/bundle/chunk-h6rv626m.js +2 -0
  162. package/bundle/chunk-h7s2w1e2.js +2 -0
  163. package/bundle/{chunk-yyqrbv2f.js → chunk-h9pvnp5c.js} +1 -1
  164. package/bundle/{chunk-hpfqnjfz.js → chunk-hj5y7fvk.js} +1 -1
  165. package/bundle/chunk-hmv2cdnz.js +2 -0
  166. package/bundle/chunk-ht81ensf.js +2 -0
  167. package/bundle/{chunk-44jpsp97.js → chunk-hw1dmx28.js} +1 -1
  168. package/bundle/{chunk-43ae3chd.js → chunk-hwbyqezq.js} +2 -2
  169. package/bundle/{chunk-97h0jx8y.js → chunk-hxpgs78j.js} +1 -1
  170. package/bundle/{chunk-yj73ehjd.js → chunk-hxz2rdjq.js} +1 -1
  171. package/bundle/chunk-j59ktwny.js +2 -0
  172. package/bundle/{chunk-cd867geb.js → chunk-j5kb0y1m.js} +1 -1
  173. package/bundle/{chunk-1rn0vmvv.js → chunk-j6emx6jn.js} +2 -2
  174. package/bundle/{chunk-ekndhwnn.js → chunk-j9pcnkkq.js} +2 -2
  175. package/bundle/{chunk-2p9py4rw.js → chunk-jje0srjq.js} +1 -1
  176. package/bundle/{chunk-kkae8ead.js → chunk-jm1ptn8n.js} +1 -1
  177. package/bundle/chunk-jmz2mq3t.js +2 -0
  178. package/bundle/{chunk-11d987sj.js → chunk-jvqbvgjy.js} +1 -1
  179. package/bundle/chunk-k309zez0.js +3 -0
  180. package/bundle/chunk-k3fn3yed.js +2 -0
  181. package/bundle/{chunk-1fz0383p.js → chunk-k7gq9bra.js} +1 -1
  182. package/bundle/{chunk-eqcd9k9p.js → chunk-k8ss3135.js} +130 -130
  183. package/bundle/{chunk-4fk4se02.js → chunk-kfsb2stm.js} +1 -1
  184. package/bundle/{chunk-b73s2h43.js → chunk-knpt9n8f.js} +1 -1
  185. package/bundle/chunk-kpw6nghv.js +2 -0
  186. package/bundle/{chunk-81h5f8ev.js → chunk-kqn9h2gk.js} +1 -1
  187. package/bundle/{chunk-jwtev7b7.js → chunk-m02zt1a3.js} +2 -2
  188. package/bundle/{chunk-ktqrbbkh.js → chunk-m1h5a4vg.js} +1 -1
  189. package/bundle/chunk-m5ghbt5y.js +2 -0
  190. package/bundle/{chunk-4vze3djr.js → chunk-m612agnk.js} +1 -1
  191. package/bundle/{chunk-hbtd620x.js → chunk-m67tcnk4.js} +1 -1
  192. package/bundle/{chunk-6bsgrr5h.js → chunk-mgk9sh16.js} +1 -1
  193. package/bundle/{chunk-wnwesaap.js → chunk-mj4bepvj.js} +1 -1
  194. package/bundle/{chunk-t3tkp1em.js → chunk-mk6cddvd.js} +1 -1
  195. package/bundle/chunk-mn41f9qv.js +2 -0
  196. package/bundle/chunk-mqjf9sbm.js +2 -0
  197. package/bundle/{chunk-r4mnbhe1.js → chunk-mrw279k3.js} +1 -1
  198. package/bundle/{chunk-qje3683x.js → chunk-msegx0t7.js} +1 -1
  199. package/bundle/{chunk-x6nbck7p.js → chunk-mskwkcgj.js} +1 -1
  200. package/bundle/{chunk-ce5t444d.js → chunk-my6sz5d6.js} +1 -1
  201. package/bundle/{chunk-scqxmv8k.js → chunk-n26yf3he.js} +1 -1
  202. package/bundle/chunk-n5gwrrbb.js +2 -0
  203. package/bundle/{chunk-6scqd8fh.js → chunk-n8h6x2en.js} +1 -1
  204. package/bundle/chunk-nfjhem1c.js +2 -0
  205. package/bundle/{chunk-h8chkene.js → chunk-ngchsw2g.js} +1 -1
  206. package/bundle/{chunk-rf524gez.js → chunk-ngytjdg2.js} +1 -1
  207. package/bundle/chunk-nj4d554m.js +11 -0
  208. package/bundle/chunk-nrc3bj9p.js +2 -0
  209. package/bundle/{chunk-0xm85ayc.js → chunk-nt4e3em9.js} +1 -1
  210. package/bundle/chunk-nxyyn2ra.js +2 -0
  211. package/bundle/{chunk-t35n89t9.js → chunk-nzehfpxp.js} +1 -1
  212. package/bundle/chunk-p5tceb4k.js +2 -0
  213. package/bundle/{chunk-js9wdh67.js → chunk-p68rwmhc.js} +1 -1
  214. package/bundle/{chunk-g0mbbysk.js → chunk-pekm54ce.js} +1 -1
  215. package/bundle/{chunk-yvqbewmc.js → chunk-phxrg7aw.js} +2 -2
  216. package/bundle/{chunk-3h4y7n1a.js → chunk-ppfjf7qx.js} +1 -1
  217. package/bundle/{chunk-d7t0bcvk.js → chunk-pvpy9kq1.js} +6 -6
  218. package/bundle/{chunk-k16s2dnx.js → chunk-q1v2pytx.js} +1 -1
  219. package/bundle/{chunk-svrxk3vf.js → chunk-q6ztpfcs.js} +2 -2
  220. package/bundle/{chunk-8k55xz7z.js → chunk-qhc90p4a.js} +1 -1
  221. package/bundle/chunk-qjgm3e2p.js +2 -0
  222. package/bundle/{chunk-4mrz9b6d.js → chunk-qjjch1zt.js} +2 -2
  223. package/bundle/{chunk-b20xjnpw.js → chunk-qjn86fc0.js} +1 -1
  224. package/bundle/{chunk-9epjgend.js → chunk-qrey2gwb.js} +2 -2
  225. package/bundle/chunk-qt80mhdn.js +2 -0
  226. package/bundle/chunk-qtw5nrr4.js +2 -0
  227. package/bundle/{chunk-xk7je9y8.js → chunk-qv2s39dv.js} +1 -1
  228. package/bundle/chunk-rc9ex3vt.js +2 -0
  229. package/bundle/{chunk-xn61fgrh.js → chunk-s07j8hfy.js} +1 -1
  230. package/bundle/{chunk-y212x7ws.js → chunk-s3yna2wm.js} +1 -1
  231. package/bundle/chunk-s9672vvv.js +2 -0
  232. package/bundle/chunk-sbyey0qb.js +2 -0
  233. package/bundle/{chunk-ps6jk326.js → chunk-scnz207s.js} +1 -1
  234. package/bundle/{chunk-k20nrwbg.js → chunk-sermjas1.js} +1 -1
  235. package/bundle/chunk-shpq6es1.js +3 -0
  236. package/bundle/chunk-sj5v361q.js +2 -0
  237. package/bundle/{chunk-qsszerj7.js → chunk-sn4nez18.js} +2 -2
  238. package/bundle/{chunk-t299e2aw.js → chunk-snm5q21k.js} +2 -2
  239. package/bundle/{chunk-yt2k9ga8.js → chunk-srh4xvsj.js} +1 -1
  240. package/bundle/{chunk-a2g69pv6.js → chunk-svvgv1s0.js} +1 -1
  241. package/bundle/{chunk-n4gjpgnk.js → chunk-szr0f7k2.js} +1 -1
  242. package/bundle/{chunk-4vemws1t.js → chunk-t12xrrfr.js} +2 -2
  243. package/bundle/chunk-ta3k9syc.js +2 -0
  244. package/bundle/{chunk-d86ma6zk.js → chunk-tj78jsp9.js} +1 -1
  245. package/bundle/chunk-tk5afan4.js +2 -0
  246. package/bundle/chunk-tpndnprb.js +2 -0
  247. package/bundle/{chunk-jkm54mha.js → chunk-tr8sf0dk.js} +1 -1
  248. package/bundle/{chunk-hgbkg85g.js → chunk-v2zp22r3.js} +1 -1
  249. package/bundle/{chunk-jntqzhxr.js → chunk-v4xcysh0.js} +1 -1
  250. package/bundle/{chunk-19sa03c1.js → chunk-v965rsr8.js} +2 -2
  251. package/bundle/{chunk-2ztdqtnk.js → chunk-vcmrrt8b.js} +1 -1
  252. package/bundle/chunk-vcrn3v70.js +2 -0
  253. package/bundle/{chunk-b9nwaaqs.js → chunk-vg2fmyje.js} +2 -2
  254. package/bundle/{chunk-98vfbn0h.js → chunk-vj62pc0h.js} +1 -1
  255. package/bundle/{chunk-g3ch14a1.js → chunk-vn7nkrqb.js} +1 -1
  256. package/bundle/chunk-vwxfgea7.js +2 -0
  257. package/bundle/chunk-w0kgcz1t.js +2 -0
  258. package/bundle/{chunk-50w28xj1.js → chunk-w87a3mzm.js} +1 -1
  259. package/bundle/{chunk-09j71kp6.js → chunk-wfs4pcwa.js} +3 -3
  260. package/bundle/{chunk-zqjp7jdd.js → chunk-wgpsmxqx.js} +1 -1
  261. package/bundle/{chunk-kw09hbrb.js → chunk-whcg14sc.js} +1 -1
  262. package/bundle/{chunk-20d0cd1j.js → chunk-whxjkz9a.js} +2 -2
  263. package/bundle/chunk-wksczmes.js +2 -0
  264. package/bundle/{chunk-m6wceqay.js → chunk-wnqwb6fd.js} +1 -1
  265. package/bundle/{chunk-7mc8nxve.js → chunk-wpajh5s5.js} +1 -1
  266. package/bundle/chunk-wsxta33r.js +2 -0
  267. package/bundle/{chunk-byc7ev8p.js → chunk-wsy0m70r.js} +1 -1
  268. package/bundle/{chunk-csyw14fj.js → chunk-wy46mbwt.js} +1 -1
  269. package/bundle/{chunk-0wdtbn59.js → chunk-wz0zcddf.js} +2 -2
  270. package/bundle/{chunk-gjvymdhp.js → chunk-x067eetw.js} +1 -1
  271. package/bundle/{chunk-s1sepxdp.js → chunk-xc5044tm.js} +1 -1
  272. package/bundle/{chunk-tj00kzk4.js → chunk-xck0sq3k.js} +1 -1
  273. package/bundle/chunk-xjyhtm8r.js +2 -0
  274. package/bundle/{chunk-rs1698xs.js → chunk-xm08fc2q.js} +1 -1
  275. package/bundle/{chunk-bv8pf0m1.js → chunk-xpc2zgj7.js} +2 -2
  276. package/bundle/{chunk-nxn4arcf.js → chunk-xs3xtz6x.js} +1 -1
  277. package/bundle/{chunk-6saj1dhz.js → chunk-y062spw2.js} +1 -1
  278. package/bundle/{chunk-qk9vccja.js → chunk-y2v09y71.js} +1 -1
  279. package/bundle/{chunk-61yatzp8.js → chunk-ydp0q1hk.js} +1 -1
  280. package/bundle/{chunk-z4nay2ef.js → chunk-yfkvjphe.js} +1 -1
  281. package/bundle/chunk-ygc5qegv.js +2 -0
  282. package/bundle/chunk-yjqmzm51.js +2 -0
  283. package/bundle/{chunk-nv2r4cns.js → chunk-yjtdgcq5.js} +1 -1
  284. package/bundle/{chunk-5z7mjwwa.js → chunk-yn6sbycg.js} +1 -1
  285. package/bundle/{chunk-4fspp5fg.js → chunk-yp0a8q29.js} +3 -3
  286. package/bundle/{chunk-bzrsnv2k.js → chunk-yq3m8190.js} +2 -2
  287. package/bundle/{chunk-7m8fdp5p.js → chunk-yy526n9c.js} +1 -1
  288. package/bundle/chunk-yzc53n88.js +2 -0
  289. package/bundle/{chunk-j0znryc6.js → chunk-yzjc15vp.js} +1 -1
  290. package/bundle/chunk-z7y9pdj7.js +2 -0
  291. package/bundle/{chunk-rqgcz2zr.js → chunk-z8g819cz.js} +1 -1
  292. package/bundle/{chunk-4kpvceap.js → chunk-z8r65yw3.js} +1 -1
  293. package/bundle/{chunk-31wxbws4.js → chunk-zb0me4kk.js} +1 -1
  294. package/bundle/{chunk-asmfntjm.js → chunk-zcm2jdr5.js} +1 -1
  295. package/bundle/chunk-zt1nbwmm.js +2 -0
  296. package/bundle/{chunk-zbq60sw6.js → chunk-ztc3gm8y.js} +1 -1
  297. package/bundle/{chunk-v9bmpndq.js → chunk-zv6pjtz1.js} +1 -1
  298. package/bundle/{chunk-1d9f53sk.js → chunk-zyhdxggp.js} +2 -2
  299. package/bundle/{chunk-ma0m6kpj.js → chunk-zz36xg2n.js} +1 -1
  300. package/bundle/index.js +3 -3
  301. package/bundle/parser.worker.js +2 -2
  302. package/bundle/worker.js +1 -1
  303. package/package.json +1 -1
  304. package/bundle/chunk-07c1mvy1.js +0 -2
  305. package/bundle/chunk-0p7qcm51.js +0 -2
  306. package/bundle/chunk-0pmb7zzh.js +0 -2
  307. package/bundle/chunk-1s9ctg0d.js +0 -2
  308. package/bundle/chunk-2f9fn9xr.js +0 -2
  309. package/bundle/chunk-2fhcvfyg.js +0 -2
  310. package/bundle/chunk-3mfj0x4p.js +0 -2
  311. package/bundle/chunk-3shnje9k.js +0 -2
  312. package/bundle/chunk-3tz1qhpt.js +0 -2
  313. package/bundle/chunk-4dtbdycg.js +0 -2
  314. package/bundle/chunk-4pz8av2y.js +0 -2
  315. package/bundle/chunk-4r4xh8a6.js +0 -2
  316. package/bundle/chunk-5hpq59t1.js +0 -2
  317. package/bundle/chunk-5s90ehww.js +0 -2
  318. package/bundle/chunk-63kcg127.js +0 -2
  319. package/bundle/chunk-6fejrpht.js +0 -2
  320. package/bundle/chunk-6zzdw7q1.js +0 -2
  321. package/bundle/chunk-78m8rayq.js +0 -2
  322. package/bundle/chunk-7j6p5j2g.js +0 -2
  323. package/bundle/chunk-7tjd6ba1.js +0 -2
  324. package/bundle/chunk-8d8efdry.js +0 -2
  325. package/bundle/chunk-93jxndr8.js +0 -2
  326. package/bundle/chunk-99ve54r6.js +0 -2
  327. package/bundle/chunk-9ksaqyb2.js +0 -2
  328. package/bundle/chunk-9p7t748e.js +0 -2
  329. package/bundle/chunk-a69jgepp.js +0 -2
  330. package/bundle/chunk-ar310tc3.js +0 -2
  331. package/bundle/chunk-at03h9eq.js +0 -2
  332. package/bundle/chunk-ay9p70xx.js +0 -2
  333. package/bundle/chunk-b6dsv601.js +0 -3
  334. package/bundle/chunk-bajtytm5.js +0 -2
  335. package/bundle/chunk-bh8v3mfg.js +0 -2
  336. package/bundle/chunk-bn0h9dny.js +0 -10
  337. package/bundle/chunk-bp8sxnrm.js +0 -2
  338. package/bundle/chunk-bw5e8thn.js +0 -2
  339. package/bundle/chunk-c8ajbhv3.js +0 -2
  340. package/bundle/chunk-c8n72r2k.js +0 -8
  341. package/bundle/chunk-ccddzk10.js +0 -2
  342. package/bundle/chunk-ch8cx9jn.js +0 -2
  343. package/bundle/chunk-cm4jtnkg.js +0 -2
  344. package/bundle/chunk-cq7j5tv5.js +0 -2
  345. package/bundle/chunk-cttqh20d.js +0 -2
  346. package/bundle/chunk-cvvfa1jf.js +0 -2
  347. package/bundle/chunk-dfja6dj6.js +0 -5
  348. package/bundle/chunk-e3qtndrt.js +0 -2
  349. package/bundle/chunk-e8cac405.js +0 -2
  350. package/bundle/chunk-ez92ah9y.js +0 -2
  351. package/bundle/chunk-fazvedgy.js +0 -2
  352. package/bundle/chunk-gtzcm5sb.js +0 -2
  353. package/bundle/chunk-kfgn4apg.js +0 -2
  354. package/bundle/chunk-kzrw6h8t.js +0 -2
  355. package/bundle/chunk-mjrvj2cg.js +0 -2
  356. package/bundle/chunk-mpebdv59.js +0 -2
  357. package/bundle/chunk-n20v44zr.js +0 -2
  358. package/bundle/chunk-nksathh4.js +0 -2
  359. package/bundle/chunk-q14890p6.js +0 -2
  360. package/bundle/chunk-q4n02cwv.js +0 -2
  361. package/bundle/chunk-q7s17j1b.js +0 -2
  362. package/bundle/chunk-qm07wesh.js +0 -2
  363. package/bundle/chunk-qrrg9v3d.js +0 -2
  364. package/bundle/chunk-rdqgss38.js +0 -2
  365. package/bundle/chunk-rzc528ym.js +0 -2
  366. package/bundle/chunk-sbv96mj0.js +0 -3
  367. package/bundle/chunk-th78zcds.js +0 -2
  368. package/bundle/chunk-tv26mwx5.js +0 -2
  369. package/bundle/chunk-v69n6mef.js +0 -2
  370. package/bundle/chunk-vegwb3t0.js +0 -2
  371. package/bundle/chunk-w9seyn69.js +0 -2
  372. package/bundle/chunk-wanf4se3.js +0 -2
  373. package/bundle/chunk-wdhzmk1b.js +0 -2
  374. package/bundle/chunk-wxqtda70.js +0 -2
  375. package/bundle/chunk-wzb6s9rk.js +0 -2
  376. package/bundle/chunk-x0dg9rg6.js +0 -2
  377. package/bundle/chunk-xmnzrzbs.js +0 -2
  378. package/bundle/chunk-xzf62kc6.js +0 -2
  379. package/bundle/chunk-yned6vmd.js +0 -3
  380. package/bundle/chunk-yra49yga.js +0 -2
  381. package/bundle/chunk-ytye0p7f.js +0 -2
  382. package/bundle/chunk-yv2mxxbq.js +0 -2
  383. package/bundle/chunk-z2fqqer0.js +0 -2
  384. package/bundle/chunk-z3qanc8m.js +0 -2
  385. package/bundle/chunk-zcagdtab.js +0 -2
  386. package/bundle/chunk-zervk6c5.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ap as CG,Dp as p,Ep as u,Jp as _,Lp as yG,Mp as YG,Np as d,Op as IG,Pp as RG,Rp as xG,So as g,Uo as FG,Wo as NG,Yo as wG,Zo as QG,_o as SG,gp as $G,lp as OG,mp as XG,pp as fG,tp as v,wp as k,xp as s}from"./chunk-bzrsnv2k.js";import{Tp as l,Up as GG,bq as BG,eq as c}from"./chunk-d0qqgxs4.js";import"./chunk-cqtkxwd8.js";import"./chunk-v00cptj6.js";import{Tt as G}from"./chunk-j2zay4da.js";import"./chunk-4vemws1t.js";import"./chunk-yjj4cvqg.js";function vG(J){var D;let L=[],q=[];for(let{role:K,content:z}of J)switch(K){case"system":{L.push({role:"system",content:z});break}case"user":{if(z.length===1&&z[0].type==="text"){L.push({role:"user",content:z[0].text});break}L.push({role:"user",content:z.map((A)=>{switch(A.type){case"text":return{type:"text",text:A.text};case"file":if(A.mediaType.startsWith("image/")){let Y=A.mediaType==="image/*"?"image/jpeg":A.mediaType;return{type:"image_url",image_url:{url:A.data instanceof URL?A.data.toString():`data:${Y};base64,${QG(A.data)}`}}}else throw new c({functionality:`file part media type ${A.mediaType}`})}})});break}case"assistant":{let A="",Y=[];for(let X of z)switch(X.type){case"text":{A+=X.text;break}case"tool-call":{Y.push({id:X.toolCallId,type:"function",function:{name:X.toolName,arguments:JSON.stringify(X.input)}});break}}L.push({role:"assistant",content:A,tool_calls:Y.length>0?Y:void 0});break}case"tool":{for(let A of z){if(A.type==="tool-approval-response")continue;let Y=A.output,X;switch(Y.type){case"text":case"error-text":X=Y.value;break;case"execution-denied":X=(D=Y.reason)!=null?D:"Tool execution denied.";break;case"content":case"json":case"error-json":X=JSON.stringify(Y.value);break}L.push({role:"tool",tool_call_id:A.toolCallId,content:X})}break}default:throw Error(`Unsupported role: ${K}`)}return{messages:L,warnings:q}}function EG(J){var D,L,q,K;let z=(L=(D=J.prompt_tokens_details)==null?void 0:D.cached_tokens)!=null?L:0,A=(K=(q=J.completion_tokens_details)==null?void 0:q.reasoning_tokens)!=null?K:0,Y=z<=J.prompt_tokens;return{inputTokens:{total:Y?J.prompt_tokens:J.prompt_tokens+z,noCache:Y?J.prompt_tokens-z:J.prompt_tokens,cacheRead:z,cacheWrite:void 0},outputTokens:{total:J.completion_tokens+A,text:J.completion_tokens,reasoning:A},raw:J}}function JG({id:J,model:D,created:L,created_at:q}){let K=L!=null?L:q;return{id:J!=null?J:void 0,modelId:D!=null?D:void 0,timestamp:K!=null?new Date(K*1000):void 0}}function WG(J){switch(J){case"stop":return"stop";case"length":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}var kG=G.object({type:G.literal("web"),country:G.string().length(2).optional(),excludedWebsites:G.array(G.string()).max(5).optional(),allowedWebsites:G.array(G.string()).max(5).optional(),safeSearch:G.boolean().optional()}),bG=G.object({type:G.literal("x"),excludedXHandles:G.array(G.string()).optional(),includedXHandles:G.array(G.string()).optional(),postFavoriteCount:G.number().int().optional(),postViewCount:G.number().int().optional(),xHandles:G.array(G.string()).optional()}),hG=G.object({type:G.literal("news"),country:G.string().length(2).optional(),excludedWebsites:G.array(G.string()).max(5).optional(),safeSearch:G.boolean().optional()}),_G=G.object({type:G.literal("rss"),links:G.array(G.string().url()).max(1)}),mG=G.discriminatedUnion("type",[kG,bG,hG,_G]),gG=G.object({reasoningEffort:G.enum(["low","high"]).optional(),logprobs:G.boolean().optional(),topLogprobs:G.number().int().min(0).max(8).optional(),parallel_function_calling:G.boolean().optional(),searchParameters:G.object({mode:G.enum(["off","auto","on"]),returnCitations:G.boolean().optional(),fromDate:G.string().optional(),toDate:G.string().optional(),maxSearchResults:G.number().min(1).max(50).optional(),sources:G.array(mG).optional()}).optional()}),uG=G.object({error:G.object({message:G.string(),type:G.string().nullish(),param:G.any().nullish(),code:G.union([G.string(),G.number()]).nullish()})}),r=yG({errorSchema:uG,errorToMessage:(J)=>J.error.message});function dG({tools:J,toolChoice:D}){J=(J==null?void 0:J.length)?J:void 0;let L=[];if(J==null)return{tools:void 0,toolChoice:void 0,toolWarnings:L};let q=[];for(let z of J)if(z.type==="provider")L.push({type:"unsupported",feature:`provider-defined tool ${z.name}`});else q.push({type:"function",function:{name:z.name,description:z.description,parameters:z.inputSchema,...z.strict!=null?{strict:z.strict}:{}}});if(D==null)return{tools:q,toolChoice:void 0,toolWarnings:L};let K=D.type;switch(K){case"auto":case"none":return{tools:q,toolChoice:K,toolWarnings:L};case"required":return{tools:q,toolChoice:"required",toolWarnings:L};case"tool":return{tools:q,toolChoice:{type:"function",function:{name:D.toolName}},toolWarnings:L};default:throw new c({functionality:`tool choice type: ${K}`})}}var cG=class{constructor(J,D){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=J,this.config=D}get provider(){return this.config.provider}async getArgs({prompt:J,maxOutputTokens:D,temperature:L,topP:q,topK:K,frequencyPenalty:z,presencePenalty:A,stopSequences:Y,seed:X,responseFormat:Z,providerOptions:M,tools:E,toolChoice:F}){var B,R,N;let $=[],W=(B=await p({provider:"xai",providerOptions:M,schema:gG}))!=null?B:{};if(K!=null)$.push({type:"unsupported",feature:"topK"});if(z!=null)$.push({type:"unsupported",feature:"frequencyPenalty"});if(A!=null)$.push({type:"unsupported",feature:"presencePenalty"});if(Y!=null)$.push({type:"unsupported",feature:"stopSequences"});let{messages:H,warnings:O}=vG(J);$.push(...O);let{tools:C,toolChoice:w,toolWarnings:j}=dG({tools:E,toolChoice:F});return $.push(...j),{args:{model:this.modelId,logprobs:W.logprobs===!0||W.topLogprobs!=null?!0:void 0,top_logprobs:W.topLogprobs,max_completion_tokens:D,temperature:L,top_p:q,seed:X,reasoning_effort:W.reasoningEffort,parallel_function_calling:W.parallel_function_calling,response_format:(Z==null?void 0:Z.type)==="json"?Z.schema!=null?{type:"json_schema",json_schema:{name:(R=Z.name)!=null?R:"response",schema:Z.schema,strict:!0}}:{type:"json_object"}:void 0,search_parameters:W.searchParameters?{mode:W.searchParameters.mode,return_citations:W.searchParameters.returnCitations,from_date:W.searchParameters.fromDate,to_date:W.searchParameters.toDate,max_search_results:W.searchParameters.maxSearchResults,sources:(N=W.searchParameters.sources)==null?void 0:N.map((S)=>{var h;return{type:S.type,...S.type==="web"&&{country:S.country,excluded_websites:S.excludedWebsites,allowed_websites:S.allowedWebsites,safe_search:S.safeSearch},...S.type==="x"&&{excluded_x_handles:S.excludedXHandles,included_x_handles:(h=S.includedXHandles)!=null?h:S.xHandles,post_favorite_count:S.postFavoriteCount,post_view_count:S.postViewCount},...S.type==="news"&&{country:S.country,excluded_websites:S.excludedWebsites,safe_search:S.safeSearch},...S.type==="rss"&&{links:S.links}}})}:void 0,messages:H,tools:C,tool_choice:w},warnings:$}}async doGenerate(J){var D,L;let{args:q,warnings:K}=await this.getArgs(J),z=`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:A,value:Y,rawValue:X}=await u({url:z,headers:g(this.config.headers(),J.headers),body:q,failedResponseHandler:r,successfulResponseHandler:d(pG),abortSignal:J.abortSignal,fetch:this.config.fetch});if(Y.error!=null)throw new GG({message:Y.error,url:z,requestBodyValues:q,statusCode:200,responseHeaders:A,responseBody:JSON.stringify(X),isRetryable:Y.code==="The service is currently unavailable"});let Z=Y.choices[0],M=[];if(Z.message.content!=null&&Z.message.content.length>0){let E=Z.message.content,F=q.messages[q.messages.length-1];if((F==null?void 0:F.role)==="assistant"&&E===F.content)E="";if(E.length>0)M.push({type:"text",text:E})}if(Z.message.reasoning_content!=null&&Z.message.reasoning_content.length>0)M.push({type:"reasoning",text:Z.message.reasoning_content});if(Z.message.tool_calls!=null)for(let E of Z.message.tool_calls)M.push({type:"tool-call",toolCallId:E.id,toolName:E.function.name,input:E.function.arguments});if(Y.citations!=null)for(let E of Y.citations)M.push({type:"source",sourceType:"url",id:this.config.generateId(),url:E});return{content:M,finishReason:{unified:WG(Z.finish_reason),raw:(L=Z.finish_reason)!=null?L:void 0},usage:Y.usage?EG(Y.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:q},response:{...JG(Y),headers:A,body:X},warnings:K}}async doStream(J){var D;let{args:L,warnings:q}=await this.getArgs(J),K={...L,stream:!0,stream_options:{include_usage:!0}},z=`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:A,value:Y}=await u({url:z,headers:g(this.config.headers(),J.headers),body:K,failedResponseHandler:r,successfulResponseHandler:async({response:N})=>{let $=NG(N),W=N.headers.get("content-type");if(W==null?void 0:W.includes("application/json")){let H=await N.text(),O=await CG({text:H,schema:lG});if(O.success)throw new GG({message:O.value.error,url:z,requestBodyValues:K,statusCode:200,responseHeaders:$,responseBody:H,isRetryable:O.value.code==="The service is currently unavailable"});throw new GG({message:"Invalid JSON response",url:z,requestBodyValues:K,statusCode:200,responseHeaders:$,responseBody:H})}return YG(iG)({response:N,url:z,requestBodyValues:K})},abortSignal:J.abortSignal,fetch:this.config.fetch}),X={unified:"other",raw:void 0},Z=void 0,M=!0,E={},F={},B=void 0,R=this;return{stream:Y.pipeThrough(new TransformStream({start(N){N.enqueue({type:"stream-start",warnings:q})},transform(N,$){if(J.includeRawChunks)$.enqueue({type:"raw",rawValue:N.rawValue});if(!N.success){$.enqueue({type:"error",error:N.error});return}let W=N.value;if(M)$.enqueue({type:"response-metadata",...JG(W)}),M=!1;if(W.citations!=null)for(let w of W.citations)$.enqueue({type:"source",sourceType:"url",id:R.config.generateId(),url:w});if(W.usage!=null)Z=EG(W.usage);let H=W.choices[0];if((H==null?void 0:H.finish_reason)!=null)X={unified:WG(H.finish_reason),raw:H.finish_reason};if((H==null?void 0:H.delta)==null)return;let{delta:O,index:C}=H;if(O.content!=null&&O.content.length>0){let w=O.content;if(B!=null&&!E[B].ended)$.enqueue({type:"reasoning-end",id:B}),E[B].ended=!0,B=void 0;let j=K.messages[K.messages.length-1];if((j==null?void 0:j.role)==="assistant"&&w===j.content)return;let y=`text-${W.id||C}`;if(E[y]==null)E[y]={type:"text",ended:!1},$.enqueue({type:"text-start",id:y});$.enqueue({type:"text-delta",id:y,delta:w})}if(O.reasoning_content!=null&&O.reasoning_content.length>0){let w=`reasoning-${W.id||C}`;if(F[w]===O.reasoning_content)return;if(F[w]=O.reasoning_content,E[w]==null)E[w]={type:"reasoning",ended:!1},B=w,$.enqueue({type:"reasoning-start",id:w});$.enqueue({type:"reasoning-delta",id:w,delta:O.reasoning_content})}if(O.tool_calls!=null){if(B!=null&&!E[B].ended)$.enqueue({type:"reasoning-end",id:B}),E[B].ended=!0,B=void 0;for(let w of O.tool_calls){let j=w.id;$.enqueue({type:"tool-input-start",id:j,toolName:w.function.name}),$.enqueue({type:"tool-input-delta",id:j,delta:w.function.arguments}),$.enqueue({type:"tool-input-end",id:j}),$.enqueue({type:"tool-call",toolCallId:j,toolName:w.function.name,input:w.function.arguments})}}},flush(N){for(let[$,W]of Object.entries(E))if(!W.ended)N.enqueue({type:W.type==="text"?"text-end":"reasoning-end",id:$});N.enqueue({type:"finish",finishReason:X,usage:Z!=null?Z:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:K},response:{headers:A}}}},TG=G.object({prompt_tokens:G.number(),completion_tokens:G.number(),total_tokens:G.number(),prompt_tokens_details:G.object({text_tokens:G.number().nullish(),audio_tokens:G.number().nullish(),image_tokens:G.number().nullish(),cached_tokens:G.number().nullish()}).nullish(),completion_tokens_details:G.object({reasoning_tokens:G.number().nullish(),audio_tokens:G.number().nullish(),accepted_prediction_tokens:G.number().nullish(),rejected_prediction_tokens:G.number().nullish()}).nullish()}),pG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({message:G.object({role:G.literal("assistant"),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({id:G.string(),type:G.literal("function"),function:G.object({name:G.string(),arguments:G.string()})})).nullish()}),index:G.number(),finish_reason:G.string().nullish()})).nullish(),object:G.literal("chat.completion").nullish(),usage:TG.nullish(),citations:G.array(G.string().url()).nullish(),code:G.string().nullish(),error:G.string().nullish()}),iG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({delta:G.object({role:G.enum(["assistant"]).optional(),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({id:G.string(),type:G.literal("function"),function:G.object({name:G.string(),arguments:G.string()})})).nullish()}),finish_reason:G.string().nullish(),index:G.number()})),usage:TG.nullish(),citations:G.array(G.string().url()).nullish()}),lG=G.object({code:G.string(),error:G.string()}),rG=G.object({aspect_ratio:G.string().optional(),output_format:G.string().optional(),sync_mode:G.boolean().optional(),resolution:G.enum(["1k","2k"]).optional(),quality:G.enum(["low","medium","high"]).optional(),user:G.string().optional()}),aG=class{constructor(J,D){this.modelId=J,this.config=D,this.specificationVersion="v3",this.maxImagesPerCall=3}get provider(){return this.config.provider}async doGenerate({prompt:J,n:D,size:L,aspectRatio:q,seed:K,providerOptions:z,headers:A,abortSignal:Y,files:X,mask:Z}){var M,E,F,B,R;let N=[];if(L!=null)N.push({type:"unsupported",feature:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});if(K!=null)N.push({type:"unsupported",feature:"seed"});if(Z!=null)N.push({type:"unsupported",feature:"mask"});let $=await p({provider:"xai",providerOptions:z,schema:rG}),W=X!=null&&X.length>0,H=W?X.map((I)=>SG(I)):[],O=W?"/images/edits":"/images/generations",C={model:this.modelId,prompt:J,n:D,response_format:"b64_json"};if(q!=null)C.aspect_ratio=q;if(($==null?void 0:$.output_format)!=null)C.output_format=$.output_format;if(($==null?void 0:$.sync_mode)!=null)C.sync_mode=$.sync_mode;if(($==null?void 0:$.aspect_ratio)!=null&&q==null)C.aspect_ratio=$.aspect_ratio;if(($==null?void 0:$.resolution)!=null)C.resolution=$.resolution;if(($==null?void 0:$.quality)!=null)C.quality=$.quality;if(($==null?void 0:$.user)!=null)C.user=$.user;if(H.length===1)C.image={url:H[0],type:"image_url"};else if(H.length>1)C.images=H.map((I)=>({url:I,type:"image_url"}));let w=(M=this.config.baseURL)!=null?M:"https://api.x.ai/v1",j=(B=(F=(E=this.config._internal)==null?void 0:E.currentDate)==null?void 0:F.call(E))!=null?B:new Date,{value:y,responseHeaders:S}=await u({url:`${w}${O}`,headers:g(this.config.headers(),A),body:C,failedResponseHandler:r,successfulResponseHandler:d(nG),abortSignal:Y,fetch:this.config.fetch});return{images:y.data.every((I)=>I.b64_json!=null)?y.data.map((I)=>I.b64_json):await Promise.all(y.data.map((I)=>this.downloadImage(I.url,Y))),warnings:N,response:{timestamp:j,modelId:this.modelId,headers:S},providerMetadata:{xai:{images:y.data.map((I)=>({...I.revised_prompt?{revisedPrompt:I.revised_prompt}:{}})),...((R=y.usage)==null?void 0:R.cost_in_usd_ticks)!=null?{costInUsdTicks:y.usage.cost_in_usd_ticks}:{}}}}}async downloadImage(J,D){let{value:L}=await XG({url:J,abortSignal:D,failedResponseHandler:RG(),successfulResponseHandler:IG(),fetch:this.config.fetch});return L}},nG=G.object({data:G.array(G.object({url:G.string().nullish(),b64_json:G.string().nullish(),revised_prompt:G.string().nullish()})),usage:G.object({cost_in_usd_ticks:G.number().nullish()}).nullish()});async function sG({prompt:J}){var D,L,q,K,z;let A=[],Y=[];for(let X of J)switch(X.role){case"system":{A.push({role:"system",content:X.content});break}case"user":{let Z=[];for(let M of X.content)switch(M.type){case"text":{Z.push({type:"input_text",text:M.text});break}case"file":{if(M.mediaType.startsWith("image/")){let E=M.mediaType==="image/*"?"image/jpeg":M.mediaType,F=M.data instanceof URL?M.data.toString():`data:${E};base64,${QG(M.data)}`;Z.push({type:"input_image",image_url:F})}else throw new c({functionality:`file part media type ${M.mediaType}`});break}default:{let E=M;Y.push({type:"other",message:"xAI Responses API does not support this content type in user messages"})}}A.push({role:"user",content:Z});break}case"assistant":{for(let Z of X.content)switch(Z.type){case"text":{let M=typeof((L=(D=Z.providerOptions)==null?void 0:D.xai)==null?void 0:L.itemId)==="string"?Z.providerOptions.xai.itemId:void 0;A.push({role:"assistant",content:Z.text,id:M});break}case"tool-call":{if(Z.providerExecuted)break;let M=typeof((K=(q=Z.providerOptions)==null?void 0:q.xai)==null?void 0:K.itemId)==="string"?Z.providerOptions.xai.itemId:void 0;A.push({type:"function_call",id:M!=null?M:Z.toolCallId,call_id:Z.toolCallId,name:Z.toolName,arguments:JSON.stringify(Z.input),status:"completed"});break}case"tool-result":break;case"reasoning":case"file":{Y.push({type:"other",message:`xAI Responses API does not support ${Z.type} in assistant messages`});break}default:{let M=Z;Y.push({type:"other",message:"xAI Responses API does not support this content type in assistant messages"})}}break}case"tool":{for(let Z of X.content){if(Z.type==="tool-approval-response")continue;let M=Z.output,E;switch(M.type){case"text":case"error-text":E=M.value;break;case"execution-denied":E=(z=M.reason)!=null?z:"tool execution denied";break;case"json":case"error-json":E=JSON.stringify(M.value);break;case"content":E=M.value.map((F)=>{if(F.type==="text")return F.text;return""}).join("");break;default:{let F=M;E=""}}A.push({type:"function_call_output",call_id:Z.toolCallId,output:E})}break}default:{let Z=X;Y.push({type:"other",message:"unsupported message role"})}}return{input:A,inputWarnings:Y}}function ZG(J){var D,L,q,K;let z=(L=(D=J.input_tokens_details)==null?void 0:D.cached_tokens)!=null?L:0,A=(K=(q=J.output_tokens_details)==null?void 0:q.reasoning_tokens)!=null?K:0,Y=z<=J.input_tokens;return{inputTokens:{total:Y?J.input_tokens:J.input_tokens+z,noCache:Y?J.input_tokens-z:J.input_tokens,cacheRead:z,cacheWrite:void 0},outputTokens:{total:J.output_tokens,text:J.output_tokens-A,reasoning:A},raw:J}}function o(J){switch(J){case"stop":case"completed":return"stop";case"length":case"max_output_tokens":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}var KG=G.union([G.object({type:G.literal("url_citation"),url:G.string(),title:G.string().optional()}),G.object({type:G.string()})]),AG=G.object({type:G.string(),text:G.string().optional(),logprobs:G.array(G.any()).optional(),annotations:G.array(KG).optional()}),jG=G.object({type:G.string(),text:G.string()}),i=G.object({name:G.string().optional(),arguments:G.string().optional(),input:G.string().optional(),call_id:G.string().optional(),id:G.string(),status:G.string(),action:G.any().optional()}),tG=G.object({name:G.string().optional(),arguments:G.string().optional(),output:G.string().optional(),error:G.string().optional(),id:G.string(),status:G.string(),server_label:G.string().optional()}),DG=G.discriminatedUnion("type",[G.object({type:G.literal("web_search_call"),...i.shape}),G.object({type:G.literal("x_search_call"),...i.shape}),G.object({type:G.literal("code_interpreter_call"),...i.shape}),G.object({type:G.literal("code_execution_call"),...i.shape}),G.object({type:G.literal("view_image_call"),...i.shape}),G.object({type:G.literal("view_x_video_call"),...i.shape}),G.object({type:G.literal("file_search_call"),id:G.string(),status:G.string(),queries:G.array(G.string()).optional(),results:G.array(G.object({file_id:G.string(),filename:G.string(),score:G.number(),text:G.string()})).nullish()}),G.object({type:G.literal("custom_tool_call"),...i.shape}),G.object({type:G.literal("mcp_call"),...tG.shape}),G.object({type:G.literal("message"),role:G.string(),content:G.array(AG),id:G.string(),status:G.string()}),G.object({type:G.literal("function_call"),name:G.string(),arguments:G.string(),call_id:G.string(),id:G.string()}),G.object({type:G.literal("reasoning"),id:G.string(),summary:G.array(jG),status:G.string(),encrypted_content:G.string().nullish()})]),qG=G.object({input_tokens:G.number(),output_tokens:G.number(),total_tokens:G.number().optional(),input_tokens_details:G.object({cached_tokens:G.number().optional()}).optional(),output_tokens_details:G.object({reasoning_tokens:G.number().optional()}).optional(),num_sources_used:G.number().optional(),num_server_side_tools_used:G.number().optional()}),t=G.object({id:G.string().nullish(),created_at:G.number().nullish(),model:G.string().nullish(),object:G.literal("response"),output:G.array(DG),usage:qG.nullish(),status:G.string()}),eG=G.union([G.object({type:G.literal("response.created"),response:t.partial({usage:!0,status:!0})}),G.object({type:G.literal("response.in_progress"),response:t.partial({usage:!0,status:!0})}),G.object({type:G.literal("response.output_item.added"),item:DG,output_index:G.number()}),G.object({type:G.literal("response.output_item.done"),item:DG,output_index:G.number()}),G.object({type:G.literal("response.content_part.added"),item_id:G.string(),output_index:G.number(),content_index:G.number(),part:AG}),G.object({type:G.literal("response.content_part.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),part:AG}),G.object({type:G.literal("response.output_text.delta"),item_id:G.string(),output_index:G.number(),content_index:G.number(),delta:G.string(),logprobs:G.array(G.any()).optional()}),G.object({type:G.literal("response.output_text.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),text:G.string(),logprobs:G.array(G.any()).optional(),annotations:G.array(KG).optional()}),G.object({type:G.literal("response.output_text.annotation.added"),item_id:G.string(),output_index:G.number(),content_index:G.number(),annotation_index:G.number(),annotation:KG}),G.object({type:G.literal("response.reasoning_summary_part.added"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),part:jG}),G.object({type:G.literal("response.reasoning_summary_part.done"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),part:jG}),G.object({type:G.literal("response.reasoning_summary_text.delta"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.reasoning_summary_text.done"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),text:G.string()}),G.object({type:G.literal("response.reasoning_text.delta"),item_id:G.string(),output_index:G.number(),content_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.reasoning_text.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),text:G.string()}),G.object({type:G.literal("response.web_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.web_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.web_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.interpreting"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call_code.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.code_interpreter_call_code.done"),item_id:G.string(),output_index:G.number(),code:G.string()}),G.object({type:G.literal("response.custom_tool_call_input.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.custom_tool_call_input.done"),item_id:G.string(),output_index:G.number(),input:G.string()}),G.object({type:G.literal("response.function_call_arguments.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.function_call_arguments.done"),item_id:G.string(),output_index:G.number(),arguments:G.string()}),G.object({type:G.literal("response.mcp_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.failed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call_arguments.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.mcp_call_arguments.done"),item_id:G.string(),output_index:G.number(),arguments:G.string().optional()}),G.object({type:G.literal("response.mcp_call_output.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.mcp_call_output.done"),item_id:G.string(),output_index:G.number(),output:G.string().optional()}),G.object({type:G.literal("response.incomplete"),response:G.object({incomplete_details:G.object({reason:G.string()}).nullish(),usage:qG.nullish()})}),G.object({type:G.literal("response.failed"),response:G.object({error:G.object({code:G.string().nullish(),message:G.string()}).nullish(),incomplete_details:G.object({reason:G.string()}).nullish(),usage:qG.nullish()})}),G.object({type:G.literal("error"),code:G.string().nullish(),message:G.string(),param:G.string().nullish()}),G.object({type:G.literal("response.done"),response:t}),G.object({type:G.literal("response.completed"),response:t})]),oG=G.object({reasoningEffort:G.enum(["low","medium","high"]).optional(),logprobs:G.boolean().optional(),topLogprobs:G.number().int().min(0).max(8).optional(),store:G.boolean().optional(),previousResponseId:G.string().optional(),include:G.array(G.enum(["file_search_call.results"])).nullish()}),GJ=v(()=>k(G.object({vectorStoreIds:G.array(G.string()),maxNumResults:G.number().optional()}))),JJ=v(()=>k(G.object({queries:G.array(G.string()),results:G.array(G.object({fileId:G.string(),filename:G.string(),score:G.number().min(0).max(1),text:G.string()})).nullable()}))),QJ=_({id:"xai.file_search",inputSchema:v(()=>k(G.object({}))),outputSchema:JJ}),XJ=(J)=>QJ(J),YJ=v(()=>k(G.object({serverUrl:G.string().describe("The URL of the MCP server"),serverLabel:G.string().optional().describe("A label for the MCP server"),serverDescription:G.string().optional().describe("Description of the MCP server"),allowedTools:G.array(G.string()).optional().describe("List of allowed tool names"),headers:G.record(G.string(),G.string()).optional().describe("Custom headers to send"),authorization:G.string().optional().describe("Authorization header value")}))),ZJ=v(()=>k(G.object({name:G.string(),arguments:G.string(),result:G.unknown()}))),$J=_({id:"xai.mcp",inputSchema:v(()=>k(G.object({}))),outputSchema:ZJ}),KJ=(J)=>$J(J),AJ=v(()=>k(G.object({allowedDomains:G.array(G.string()).max(5).optional(),excludedDomains:G.array(G.string()).max(5).optional(),enableImageUnderstanding:G.boolean().optional()}))),jJ=v(()=>k(G.object({query:G.string(),sources:G.array(G.object({title:G.string(),url:G.string(),snippet:G.string()}))}))),DJ=_({id:"xai.web_search",inputSchema:v(()=>k(G.object({}))),outputSchema:jJ}),qJ=(J={})=>DJ(J),zJ=v(()=>k(G.object({allowedXHandles:G.array(G.string()).max(10).optional(),excludedXHandles:G.array(G.string()).max(10).optional(),fromDate:G.string().optional(),toDate:G.string().optional(),enableImageUnderstanding:G.boolean().optional(),enableVideoUnderstanding:G.boolean().optional()}))),VJ=v(()=>k(G.object({query:G.string(),posts:G.array(G.object({author:G.string(),text:G.string(),url:G.string(),likes:G.number()}))}))),LJ=_({id:"xai.x_search",inputSchema:v(()=>k(G.object({}))),outputSchema:VJ}),UJ=(J={})=>LJ(J);async function HJ({tools:J,toolChoice:D}){let L=(J==null?void 0:J.length)?J:void 0,q=[];if(L==null)return{tools:void 0,toolChoice:void 0,toolWarnings:q};let K=[],z=new Map;for(let Y of L)if(z.set(Y.name,Y),Y.type==="provider")switch(Y.id){case"xai.web_search":{let X=await s({value:Y.args,schema:AJ});K.push({type:"web_search",allowed_domains:X.allowedDomains,excluded_domains:X.excludedDomains,enable_image_understanding:X.enableImageUnderstanding});break}case"xai.x_search":{let X=await s({value:Y.args,schema:zJ});K.push({type:"x_search",allowed_x_handles:X.allowedXHandles,excluded_x_handles:X.excludedXHandles,from_date:X.fromDate,to_date:X.toDate,enable_image_understanding:X.enableImageUnderstanding,enable_video_understanding:X.enableVideoUnderstanding});break}case"xai.code_execution":{K.push({type:"code_interpreter"});break}case"xai.view_image":{K.push({type:"view_image"});break}case"xai.view_x_video":{K.push({type:"view_x_video"});break}case"xai.file_search":{let X=await s({value:Y.args,schema:GJ});K.push({type:"file_search",vector_store_ids:X.vectorStoreIds,max_num_results:X.maxNumResults});break}case"xai.mcp":{let X=await s({value:Y.args,schema:YJ});K.push({type:"mcp",server_url:X.serverUrl,server_label:X.serverLabel,server_description:X.serverDescription,allowed_tools:X.allowedTools,headers:X.headers,authorization:X.authorization});break}default:{q.push({type:"unsupported",feature:`provider-defined tool ${Y.name}`});break}}else K.push({type:"function",name:Y.name,description:Y.description,parameters:Y.inputSchema,...Y.strict!=null?{strict:Y.strict}:{}});if(D==null)return{tools:K,toolChoice:void 0,toolWarnings:q};let A=D.type;switch(A){case"auto":case"none":return{tools:K,toolChoice:A,toolWarnings:q};case"required":return{tools:K,toolChoice:"required",toolWarnings:q};case"tool":{let Y=z.get(D.toolName);if(Y==null)return{tools:K,toolChoice:void 0,toolWarnings:q};if(Y.type==="provider")return q.push({type:"unsupported",feature:`toolChoice for server-side tool "${Y.name}"`}),{tools:K,toolChoice:void 0,toolWarnings:q};return{tools:K,toolChoice:{type:"function",name:Y.name},toolWarnings:q}}default:throw new c({functionality:`tool choice type: ${A}`})}}var MJ=class{constructor(J,D){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=J,this.config=D}get provider(){return this.config.provider}async getArgs({prompt:J,maxOutputTokens:D,temperature:L,topP:q,stopSequences:K,seed:z,responseFormat:A,providerOptions:Y,tools:X,toolChoice:Z}){var M,E,F,B,R,N,$;let W=[],H=(M=await p({provider:"xai",providerOptions:Y,schema:oG}))!=null?M:{};if(K!=null)W.push({type:"unsupported",feature:"stopSequences"});let O=(E=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.web_search"))==null?void 0:E.name,C=(F=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.x_search"))==null?void 0:F.name,w=(B=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.code_execution"))==null?void 0:B.name,j=(R=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.mcp"))==null?void 0:R.name,y=(N=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.file_search"))==null?void 0:N.name,{input:S,inputWarnings:h}=await sG({prompt:J,store:!0});W.push(...h);let{tools:m,toolChoice:I,toolWarnings:P}=await HJ({tools:X,toolChoice:Z});W.push(...P);let f=H.include?[...H.include]:void 0;if(H.store===!1)if(f==null)f=["reasoning.encrypted_content"];else f=[...f,"reasoning.encrypted_content"];let U={model:this.modelId,input:S,logprobs:H.logprobs===!0||H.topLogprobs!=null?!0:void 0,top_logprobs:H.topLogprobs,max_output_tokens:D,temperature:L,top_p:q,seed:z,...(A==null?void 0:A.type)==="json"&&{text:{format:A.schema!=null?{type:"json_schema",strict:!0,name:($=A.name)!=null?$:"response",description:A.description,schema:A.schema}:{type:"json_object"}}},...H.reasoningEffort!=null&&{reasoning:{effort:H.reasoningEffort}},...H.store===!1&&{store:H.store},...f!=null&&{include:f},...H.previousResponseId!=null&&{previous_response_id:H.previousResponseId}};if(m&&m.length>0)U.tools=m;if(I!=null)U.tool_choice=I;return{args:U,warnings:W,webSearchToolName:O,xSearchToolName:C,codeExecutionToolName:w,mcpToolName:j,fileSearchToolName:y}}async doGenerate(J){var D,L,q,K,z,A,Y,X,Z,M,E,F,B;let{args:R,warnings:N,webSearchToolName:$,xSearchToolName:W,codeExecutionToolName:H,mcpToolName:O,fileSearchToolName:C}=await this.getArgs(J),{responseHeaders:w,value:j,rawValue:y}=await u({url:`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/responses`,headers:g(this.config.headers(),J.headers),body:R,failedResponseHandler:r,successfulResponseHandler:d(t),abortSignal:J.abortSignal,fetch:this.config.fetch}),S=[],h=!1,m=["web_search","web_search_with_snippets","browse_page"],I=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"];for(let P of j.output){if(P.type==="file_search_call"){let f=C!=null?C:"file_search";S.push({type:"tool-call",toolCallId:P.id,toolName:f,input:"",providerExecuted:!0}),S.push({type:"tool-result",toolCallId:P.id,toolName:f,result:{queries:(L=P.queries)!=null?L:[],results:(K=(q=P.results)==null?void 0:q.map((U)=>({fileId:U.file_id,filename:U.filename,score:U.score,text:U.text})))!=null?K:null}});continue}if(P.type==="web_search_call"||P.type==="x_search_call"||P.type==="code_interpreter_call"||P.type==="code_execution_call"||P.type==="view_image_call"||P.type==="view_x_video_call"||P.type==="custom_tool_call"||P.type==="mcp_call"){let f=(z=P.name)!=null?z:"";if(m.includes((A=P.name)!=null?A:"")||P.type==="web_search_call")f=$!=null?$:"web_search";else if(I.includes((Y=P.name)!=null?Y:"")||P.type==="x_search_call")f=W!=null?W:"x_search";else if(P.name==="code_execution"||P.type==="code_interpreter_call"||P.type==="code_execution_call")f=H!=null?H:"code_execution";else if(P.type==="mcp_call")f=(X=O!=null?O:P.name)!=null?X:"mcp";let U=P.type==="custom_tool_call"?(Z=P.input)!=null?Z:"":P.type==="mcp_call"?(M=P.arguments)!=null?M:"":(E=P.arguments)!=null?E:"";S.push({type:"tool-call",toolCallId:P.id,toolName:f,input:U,providerExecuted:!0});continue}switch(P.type){case"message":{for(let f of P.content){if(f.text)S.push({type:"text",text:f.text});if(f.annotations){for(let U of f.annotations)if(U.type==="url_citation"&&"url"in U)S.push({type:"source",sourceType:"url",id:this.config.generateId(),url:U.url,title:(F=U.title)!=null?F:U.url})}}break}case"function_call":{h=!0,S.push({type:"tool-call",toolCallId:P.call_id,toolName:P.name,input:P.arguments});break}case"reasoning":{let f=P.summary.map((U)=>U.text).filter((U)=>U&&U.length>0);if(f.length>0){let U=f.join("");if(P.encrypted_content||P.id)S.push({type:"reasoning",text:U,providerMetadata:{xai:{...P.encrypted_content&&{reasoningEncryptedContent:P.encrypted_content},...P.id&&{itemId:P.id}}}});else S.push({type:"reasoning",text:U})}break}default:break}}return{content:S,finishReason:{unified:h?"tool-calls":o(j.status),raw:(B=j.status)!=null?B:void 0},usage:j.usage?ZG(j.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:R},response:{...JG(j),headers:w,body:y},warnings:N}}async doStream(J){var D;let{args:L,warnings:q,webSearchToolName:K,xSearchToolName:z,codeExecutionToolName:A,mcpToolName:Y,fileSearchToolName:X}=await this.getArgs(J),Z={...L,stream:!0},{responseHeaders:M,value:E}=await u({url:`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/responses`,headers:g(this.config.headers(),J.headers),body:Z,failedResponseHandler:r,successfulResponseHandler:YG(eG),abortSignal:J.abortSignal,fetch:this.config.fetch}),F={unified:"other",raw:void 0},B=!1,R=void 0,N=!0,$={},W=new Set,H={},O={},C=this;return{stream:E.pipeThrough(new TransformStream({start(w){w.enqueue({type:"stream-start",warnings:q})},transform(w,j){var y,S,h,m,I,P,f,U,x,zG,VG,LG,UG,HG,MG;if(J.includeRawChunks)j.enqueue({type:"raw",rawValue:w.rawValue});if(!w.success){j.enqueue({type:"error",error:w.error});return}let V=w.value;if(V.type==="response.created"||V.type==="response.in_progress"){if(N)j.enqueue({type:"response-metadata",...JG(V.response)}),N=!1;return}if(V.type==="response.reasoning_summary_part.added"){let Q=`reasoning-${V.item_id}`;O[V.item_id]={},j.enqueue({type:"reasoning-start",id:Q,providerMetadata:{xai:{itemId:V.item_id}}})}if(V.type==="response.reasoning_summary_text.delta"){let Q=`reasoning-${V.item_id}`;j.enqueue({type:"reasoning-delta",id:Q,delta:V.delta,providerMetadata:{xai:{itemId:V.item_id}}});return}if(V.type==="response.reasoning_summary_text.done")return;if(V.type==="response.reasoning_text.delta"){let Q=`reasoning-${V.item_id}`;if(O[V.item_id]==null)O[V.item_id]={},j.enqueue({type:"reasoning-start",id:Q,providerMetadata:{xai:{itemId:V.item_id}}});j.enqueue({type:"reasoning-delta",id:Q,delta:V.delta,providerMetadata:{xai:{itemId:V.item_id}}});return}if(V.type==="response.reasoning_text.done")return;if(V.type==="response.output_text.delta"){let Q=`text-${V.item_id}`;if($[Q]==null)$[Q]={type:"text"},j.enqueue({type:"text-start",id:Q});j.enqueue({type:"text-delta",id:Q,delta:V.delta});return}if(V.type==="response.output_text.done"){if(V.annotations){for(let Q of V.annotations)if(Q.type==="url_citation"&&"url"in Q)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:Q.url,title:(y=Q.title)!=null?y:Q.url})}return}if(V.type==="response.output_text.annotation.added"){let Q=V.annotation;if(Q.type==="url_citation"&&"url"in Q)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:Q.url,title:(S=Q.title)!=null?S:Q.url});return}if(V.type==="response.done"||V.type==="response.completed"||V.type==="response.incomplete"){let Q=V.response;if(Q.usage)R=ZG(Q.usage);if(V.type==="response.incomplete"){let T="incomplete_details"in Q?(h=Q.incomplete_details)==null?void 0:h.reason:void 0;F={unified:T?o(T):"other",raw:T!=null?T:"incomplete"}}else if("status"in Q&&Q.status)F={unified:B?"tool-calls":o(Q.status),raw:Q.status};return}if(V.type==="response.failed"){let Q=(m=V.response.incomplete_details)==null?void 0:m.reason;if(F={unified:Q?o(Q):"error",raw:Q!=null?Q:"error"},V.response.usage)R=ZG(V.response.usage);return}if(V.type==="error"){j.enqueue({type:"error",error:V});return}if(V.type==="response.custom_tool_call_input.delta"||V.type==="response.custom_tool_call_input.done")return;if(V.type==="response.function_call_arguments.delta"){let Q=H[V.output_index];if(Q!=null)j.enqueue({type:"tool-input-delta",id:Q.toolCallId,delta:V.delta});return}if(V.type==="response.function_call_arguments.done")return;if(V.type==="response.output_item.added"||V.type==="response.output_item.done"){let Q=V.item;if(Q.type==="reasoning"){if(V.type==="response.output_item.done"){let T=`reasoning-${Q.id}`;if(!(Q.id in O))O[Q.id]={},j.enqueue({type:"reasoning-start",id:T,providerMetadata:{xai:{...Q.id&&{itemId:Q.id}}}});j.enqueue({type:"reasoning-end",id:T,providerMetadata:{xai:{...Q.encrypted_content&&{reasoningEncryptedContent:Q.encrypted_content},...Q.id&&{itemId:Q.id}}}}),delete O[Q.id]}return}if(Q.type==="file_search_call"){let T=X!=null?X:"file_search";if(!W.has(Q.id))W.add(Q.id),j.enqueue({type:"tool-input-start",id:Q.id,toolName:T}),j.enqueue({type:"tool-input-delta",id:Q.id,delta:""}),j.enqueue({type:"tool-input-end",id:Q.id}),j.enqueue({type:"tool-call",toolCallId:Q.id,toolName:T,input:"",providerExecuted:!0});if(V.type==="response.output_item.done")j.enqueue({type:"tool-result",toolCallId:Q.id,toolName:T,result:{queries:(I=Q.queries)!=null?I:[],results:(f=(P=Q.results)==null?void 0:P.map((b)=>({fileId:b.file_id,filename:b.filename,score:b.score,text:b.text})))!=null?f:null}});return}if(Q.type==="web_search_call"||Q.type==="x_search_call"||Q.type==="code_interpreter_call"||Q.type==="code_execution_call"||Q.type==="view_image_call"||Q.type==="view_x_video_call"||Q.type==="custom_tool_call"||Q.type==="mcp_call"){let T=["web_search","web_search_with_snippets","browse_page"],b=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"],n=(U=Q.name)!=null?U:"";if(T.includes((x=Q.name)!=null?x:"")||Q.type==="web_search_call")n=K!=null?K:"web_search";else if(b.includes((zG=Q.name)!=null?zG:"")||Q.type==="x_search_call")n=z!=null?z:"x_search";else if(Q.name==="code_execution"||Q.type==="code_interpreter_call"||Q.type==="code_execution_call")n=A!=null?A:"code_execution";else if(Q.type==="mcp_call")n=(VG=Y!=null?Y:Q.name)!=null?VG:"mcp";let PG=Q.type==="custom_tool_call"?(LG=Q.input)!=null?LG:"":Q.type==="mcp_call"?(UG=Q.arguments)!=null?UG:"":(HG=Q.arguments)!=null?HG:"";if((Q.type==="custom_tool_call"?V.type==="response.output_item.done":!W.has(Q.id))&&!W.has(Q.id))W.add(Q.id),j.enqueue({type:"tool-input-start",id:Q.id,toolName:n}),j.enqueue({type:"tool-input-delta",id:Q.id,delta:PG}),j.enqueue({type:"tool-input-end",id:Q.id}),j.enqueue({type:"tool-call",toolCallId:Q.id,toolName:n,input:PG,providerExecuted:!0});return}if(Q.type==="message")for(let T of Q.content){if(T.text&&T.text.length>0){let b=`text-${Q.id}`;if($[b]==null)$[b]={type:"text"},j.enqueue({type:"text-start",id:b}),j.enqueue({type:"text-delta",id:b,delta:T.text})}if(T.annotations){for(let b of T.annotations)if(b.type==="url_citation"&&"url"in b)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:b.url,title:(MG=b.title)!=null?MG:b.url})}}else if(Q.type==="function_call"){if(V.type==="response.output_item.added")H[V.output_index]={toolName:Q.name,toolCallId:Q.call_id},j.enqueue({type:"tool-input-start",id:Q.call_id,toolName:Q.name});else if(V.type==="response.output_item.done")B=!0,H[V.output_index]=void 0,j.enqueue({type:"tool-input-end",id:Q.call_id}),j.enqueue({type:"tool-call",toolCallId:Q.call_id,toolName:Q.name,input:Q.arguments})}}},flush(w){for(let[j,y]of Object.entries($))if(y.type==="text")w.enqueue({type:"text-end",id:j});w.enqueue({type:"finish",finishReason:F,usage:R!=null?R:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:Z},response:{headers:M}}}},PJ=G.object({output:G.string().describe("the output of the code execution"),error:G.string().optional().describe("any error that occurred")}),EJ=_({id:"xai.code_execution",inputSchema:G.object({}).describe("no input parameters"),outputSchema:PJ}),WJ=(J={})=>EJ(J),BJ=G.object({description:G.string().describe("description of the image"),objects:G.array(G.string()).optional().describe("objects detected in the image")}),FJ=_({id:"xai.view_image",inputSchema:G.object({}).describe("no input parameters"),outputSchema:BJ}),NJ=(J={})=>FJ(J),wJ=G.object({transcript:G.string().optional().describe("transcript of the video"),description:G.string().describe("description of the video content"),duration:G.number().optional().describe("duration in seconds")}),SJ=_({id:"xai.view_x_video",inputSchema:G.object({}).describe("no input parameters"),outputSchema:wJ}),OJ=(J={})=>SJ(J),fJ={codeExecution:WJ,fileSearch:XJ,mcpServer:KJ,viewImage:NJ,viewXVideo:OJ,webSearch:qJ,xSearch:UJ},CJ="3.0.82",a=G.string().min(1),yJ=G.enum(["480p","720p"]),IJ=G.enum(["edit-video","extend-video","reference-to-video"]),e={pollIntervalMs:G.number().positive().nullish(),pollTimeoutMs:G.number().positive().nullish(),resolution:yJ.nullish()},RJ=G.object({...e,mode:G.literal("edit-video"),videoUrl:a,referenceImageUrls:G.undefined().optional()}),xJ=G.object({...e,mode:G.literal("extend-video"),videoUrl:a,referenceImageUrls:G.undefined().optional()}),TJ=G.object({...e,mode:G.literal("reference-to-video"),referenceImageUrls:G.array(a).min(1).max(7),videoUrl:G.undefined().optional()}),vJ=G.object({...e,mode:G.undefined().optional(),videoUrl:a.optional(),referenceImageUrls:G.array(a).min(1).max(7).optional()}),IQ=G.union([RJ,xJ,TJ,vJ]),kJ=G.object({mode:IJ.optional(),videoUrl:a.optional(),referenceImageUrls:G.array(a).min(1).max(7).optional(),...e}).passthrough(),bJ=v(()=>k(kJ)),hJ={"1280x720":"720p","854x480":"480p","640x480":"480p"};function _J(J){if((J==null?void 0:J.mode)!=null)return J.mode;if((J==null?void 0:J.videoUrl)!=null)return"edit-video";if((J==null?void 0:J.referenceImageUrls)!=null&&J.referenceImageUrls.length>0)return"reference-to-video";return}var mJ=class{constructor(J,D){this.modelId=J,this.config=D,this.specificationVersion="v3",this.maxVideosPerCall=1}get provider(){return this.config.provider}async doGenerate(J){var D,L,q,K,z,A,Y,X,Z,M;let E=(q=(L=(D=this.config._internal)==null?void 0:D.currentDate)==null?void 0:L.call(D))!=null?q:new Date,F=[],B=await p({provider:"xai",providerOptions:J.providerOptions,schema:bJ}),R=_J(B),N=R==="edit-video",$=R==="extend-video",W=R==="reference-to-video";if(J.fps!=null)F.push({type:"unsupported",feature:"fps",details:"xAI video models do not support custom FPS."});if(J.seed!=null)F.push({type:"unsupported",feature:"seed",details:"xAI video models do not support seed."});if(J.n!=null&&J.n>1)F.push({type:"unsupported",feature:"n",details:"xAI video models do not support generating multiple videos per call. Only 1 video will be generated."});if(N&&J.duration!=null)F.push({type:"unsupported",feature:"duration",details:"xAI video editing does not support custom duration."});if(N&&J.aspectRatio!=null)F.push({type:"unsupported",feature:"aspectRatio",details:"xAI video editing does not support custom aspect ratio."});if(N&&((B==null?void 0:B.resolution)!=null||J.resolution!=null))F.push({type:"unsupported",feature:"resolution",details:"xAI video editing does not support custom resolution."});if($&&J.aspectRatio!=null)F.push({type:"unsupported",feature:"aspectRatio",details:"xAI video extension does not support custom aspect ratio."});if($&&((B==null?void 0:B.resolution)!=null||J.resolution!=null))F.push({type:"unsupported",feature:"resolution",details:"xAI video extension does not support custom resolution."});let H={model:this.modelId,prompt:J.prompt},O=!N,C=!N&&!$,w=!N&&!$;if(O&&J.duration!=null)H.duration=J.duration;if(C&&J.aspectRatio!=null)H.aspect_ratio=J.aspectRatio;if(w&&(B==null?void 0:B.resolution)!=null)H.resolution=B.resolution;else if(w&&J.resolution!=null){let U=hJ[J.resolution];if(U!=null)H.resolution=U;else F.push({type:"unsupported",feature:"resolution",details:`Unrecognized resolution "${J.resolution}". Use providerOptions.xai.resolution with "480p" or "720p" instead.`})}if(N)H.video={url:B.videoUrl};if($)H.video={url:B.videoUrl};if(J.image!=null)if(J.image.type==="url")H.image={url:J.image.url};else{let U=typeof J.image.data==="string"?J.image.data:wG(J.image.data);H.image={url:`data:${J.image.mediaType};base64,${U}`}}if(W)H.reference_images=B.referenceImageUrls.map((U)=>({url:U}));if(B!=null){for(let[U,x]of Object.entries(B))if(!["mode","pollIntervalMs","pollTimeoutMs","resolution","videoUrl","referenceImageUrls"].includes(U))H[U]=x}let j=(K=this.config.baseURL)!=null?K:"https://api.x.ai/v1",y;if(N)y=`${j}/videos/edits`;else if($)y=`${j}/videos/extensions`;else y=`${j}/videos/generations`;let{value:S}=await u({url:y,headers:g(this.config.headers(),J.headers),body:H,failedResponseHandler:r,successfulResponseHandler:d(gJ),abortSignal:J.abortSignal,fetch:this.config.fetch}),h=S.request_id;if(!h)throw new l({name:"XAI_VIDEO_GENERATION_ERROR",message:`No request_id returned from xAI API. Response: ${JSON.stringify(S)}`});let m=(z=B==null?void 0:B.pollIntervalMs)!=null?z:5000,I=(A=B==null?void 0:B.pollTimeoutMs)!=null?A:600000,P=Date.now(),f;while(!0){if(await FG(m,{abortSignal:J.abortSignal}),Date.now()-P>I)throw new l({name:"XAI_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${I}ms`});let{value:U,responseHeaders:x}=await XG({url:`${j}/videos/${h}`,headers:g(this.config.headers(),J.headers),successfulResponseHandler:d(uJ),failedResponseHandler:r,abortSignal:J.abortSignal,fetch:this.config.fetch});if(f=x,U.status==="done"||U.status==null&&((Y=U.video)==null?void 0:Y.url)){if(((X=U.video)==null?void 0:X.respect_moderation)===!1)throw new l({name:"XAI_VIDEO_MODERATION_ERROR",message:"Video generation was blocked due to a content policy violation."});if(!((Z=U.video)==null?void 0:Z.url))throw new l({name:"XAI_VIDEO_GENERATION_ERROR",message:"Video generation completed but no video URL was returned."});return{videos:[{type:"url",url:U.video.url,mediaType:"video/mp4"}],warnings:F,response:{timestamp:E,modelId:this.modelId,headers:f},providerMetadata:{xai:{requestId:h,videoUrl:U.video.url,...U.video.duration!=null?{duration:U.video.duration}:{},...((M=U.usage)==null?void 0:M.cost_in_usd_ticks)!=null?{costInUsdTicks:U.usage.cost_in_usd_ticks}:{},...U.progress!=null?{progress:U.progress}:{}}}}}if(U.status==="expired")throw new l({name:"XAI_VIDEO_GENERATION_EXPIRED",message:"Video generation request expired."});if(U.status==="failed")throw new l({name:"XAI_VIDEO_GENERATION_FAILED",message:"Video generation failed."})}}},gJ=G.object({request_id:G.string().nullish()}),uJ=G.object({status:G.string().nullish(),video:G.object({url:G.string(),duration:G.number().nullish(),respect_moderation:G.boolean().nullish()}).nullish(),model:G.string().nullish(),usage:G.object({cost_in_usd_ticks:G.number().nullish()}).nullish(),progress:G.number().nullish(),error:G.object({code:G.string().nullish(),message:G.string().nullish()}).nullish()});function dJ(J={}){var D;let L=xG((D=J.baseURL)!=null?D:"https://api.x.ai/v1"),q=()=>OG({Authorization:`Bearer ${fG({apiKey:J.apiKey,environmentVariableName:"XAI_API_KEY",description:"xAI API key"})}`,...J.headers},`ai-sdk/xai/${CJ}`),K=(Z)=>{return new cG(Z,{provider:"xai.chat",baseURL:L,headers:q,generateId:$G,fetch:J.fetch})},z=(Z)=>{return new MJ(Z,{provider:"xai.responses",baseURL:L,headers:q,generateId:$G,fetch:J.fetch})},A=(Z)=>{return new aG(Z,{provider:"xai.image",baseURL:L,headers:q,fetch:J.fetch})},Y=(Z)=>{return new mJ(Z,{provider:"xai.video",baseURL:L,headers:q,fetch:J.fetch})},X=(Z)=>K(Z);return X.specificationVersion="v3",X.languageModel=K,X.chat=K,X.responses=z,X.embeddingModel=(Z)=>{throw new BG({modelId:Z,modelType:"embeddingModel"})},X.textEmbeddingModel=X.embeddingModel,X.imageModel=A,X.image=A,X.videoModel=Y,X.video=Y,X.tools=fJ,X}var RQ=dJ();export{fJ as xaiTools,RQ as xai,UJ as xSearch,qJ as webSearch,OJ as viewXVideo,NJ as viewImage,KJ as mcpServer,dJ as createXai,WJ as codeExecution,CJ as VERSION};
2
+ import{Fq as $G,Kq as OG,Lq as XG,Oq as fG,Sq as v,Vq as k,Wq as s,Zq as CG,ar as p,br as u,gr as _,ir as yG,jr as YG,kr as d,lr as IG,mr as RG,or as xG,pq as g,rq as FG,tq as NG,vq as wG,wq as QG,xq as SG}from"./chunk-yq3m8190.js";import{Ar as BG,Dr as c,qr as l,rr as GG}from"./chunk-btz9jvec.js";import"./chunk-cqtkxwd8.js";import"./chunk-fkgv2hqd.js";import{qv as G}from"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-aztre27e.js";function vG(J){var D;let L=[],q=[];for(let{role:K,content:z}of J)switch(K){case"system":{L.push({role:"system",content:z});break}case"user":{if(z.length===1&&z[0].type==="text"){L.push({role:"user",content:z[0].text});break}L.push({role:"user",content:z.map((A)=>{switch(A.type){case"text":return{type:"text",text:A.text};case"file":if(A.mediaType.startsWith("image/")){let Y=A.mediaType==="image/*"?"image/jpeg":A.mediaType;return{type:"image_url",image_url:{url:A.data instanceof URL?A.data.toString():`data:${Y};base64,${QG(A.data)}`}}}else throw new c({functionality:`file part media type ${A.mediaType}`})}})});break}case"assistant":{let A="",Y=[];for(let X of z)switch(X.type){case"text":{A+=X.text;break}case"tool-call":{Y.push({id:X.toolCallId,type:"function",function:{name:X.toolName,arguments:JSON.stringify(X.input)}});break}}L.push({role:"assistant",content:A,tool_calls:Y.length>0?Y:void 0});break}case"tool":{for(let A of z){if(A.type==="tool-approval-response")continue;let Y=A.output,X;switch(Y.type){case"text":case"error-text":X=Y.value;break;case"execution-denied":X=(D=Y.reason)!=null?D:"Tool execution denied.";break;case"content":case"json":case"error-json":X=JSON.stringify(Y.value);break}L.push({role:"tool",tool_call_id:A.toolCallId,content:X})}break}default:throw Error(`Unsupported role: ${K}`)}return{messages:L,warnings:q}}function EG(J){var D,L,q,K;let z=(L=(D=J.prompt_tokens_details)==null?void 0:D.cached_tokens)!=null?L:0,A=(K=(q=J.completion_tokens_details)==null?void 0:q.reasoning_tokens)!=null?K:0,Y=z<=J.prompt_tokens;return{inputTokens:{total:Y?J.prompt_tokens:J.prompt_tokens+z,noCache:Y?J.prompt_tokens-z:J.prompt_tokens,cacheRead:z,cacheWrite:void 0},outputTokens:{total:J.completion_tokens+A,text:J.completion_tokens,reasoning:A},raw:J}}function JG({id:J,model:D,created:L,created_at:q}){let K=L!=null?L:q;return{id:J!=null?J:void 0,modelId:D!=null?D:void 0,timestamp:K!=null?new Date(K*1000):void 0}}function WG(J){switch(J){case"stop":return"stop";case"length":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}var kG=G.object({type:G.literal("web"),country:G.string().length(2).optional(),excludedWebsites:G.array(G.string()).max(5).optional(),allowedWebsites:G.array(G.string()).max(5).optional(),safeSearch:G.boolean().optional()}),bG=G.object({type:G.literal("x"),excludedXHandles:G.array(G.string()).optional(),includedXHandles:G.array(G.string()).optional(),postFavoriteCount:G.number().int().optional(),postViewCount:G.number().int().optional(),xHandles:G.array(G.string()).optional()}),hG=G.object({type:G.literal("news"),country:G.string().length(2).optional(),excludedWebsites:G.array(G.string()).max(5).optional(),safeSearch:G.boolean().optional()}),_G=G.object({type:G.literal("rss"),links:G.array(G.string().url()).max(1)}),mG=G.discriminatedUnion("type",[kG,bG,hG,_G]),gG=G.object({reasoningEffort:G.enum(["low","high"]).optional(),logprobs:G.boolean().optional(),topLogprobs:G.number().int().min(0).max(8).optional(),parallel_function_calling:G.boolean().optional(),searchParameters:G.object({mode:G.enum(["off","auto","on"]),returnCitations:G.boolean().optional(),fromDate:G.string().optional(),toDate:G.string().optional(),maxSearchResults:G.number().min(1).max(50).optional(),sources:G.array(mG).optional()}).optional()}),uG=G.object({error:G.object({message:G.string(),type:G.string().nullish(),param:G.any().nullish(),code:G.union([G.string(),G.number()]).nullish()})}),r=yG({errorSchema:uG,errorToMessage:(J)=>J.error.message});function dG({tools:J,toolChoice:D}){J=(J==null?void 0:J.length)?J:void 0;let L=[];if(J==null)return{tools:void 0,toolChoice:void 0,toolWarnings:L};let q=[];for(let z of J)if(z.type==="provider")L.push({type:"unsupported",feature:`provider-defined tool ${z.name}`});else q.push({type:"function",function:{name:z.name,description:z.description,parameters:z.inputSchema,...z.strict!=null?{strict:z.strict}:{}}});if(D==null)return{tools:q,toolChoice:void 0,toolWarnings:L};let K=D.type;switch(K){case"auto":case"none":return{tools:q,toolChoice:K,toolWarnings:L};case"required":return{tools:q,toolChoice:"required",toolWarnings:L};case"tool":return{tools:q,toolChoice:{type:"function",function:{name:D.toolName}},toolWarnings:L};default:throw new c({functionality:`tool choice type: ${K}`})}}var cG=class{constructor(J,D){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=J,this.config=D}get provider(){return this.config.provider}async getArgs({prompt:J,maxOutputTokens:D,temperature:L,topP:q,topK:K,frequencyPenalty:z,presencePenalty:A,stopSequences:Y,seed:X,responseFormat:Z,providerOptions:M,tools:E,toolChoice:F}){var B,R,N;let $=[],W=(B=await p({provider:"xai",providerOptions:M,schema:gG}))!=null?B:{};if(K!=null)$.push({type:"unsupported",feature:"topK"});if(z!=null)$.push({type:"unsupported",feature:"frequencyPenalty"});if(A!=null)$.push({type:"unsupported",feature:"presencePenalty"});if(Y!=null)$.push({type:"unsupported",feature:"stopSequences"});let{messages:H,warnings:O}=vG(J);$.push(...O);let{tools:C,toolChoice:w,toolWarnings:j}=dG({tools:E,toolChoice:F});return $.push(...j),{args:{model:this.modelId,logprobs:W.logprobs===!0||W.topLogprobs!=null?!0:void 0,top_logprobs:W.topLogprobs,max_completion_tokens:D,temperature:L,top_p:q,seed:X,reasoning_effort:W.reasoningEffort,parallel_function_calling:W.parallel_function_calling,response_format:(Z==null?void 0:Z.type)==="json"?Z.schema!=null?{type:"json_schema",json_schema:{name:(R=Z.name)!=null?R:"response",schema:Z.schema,strict:!0}}:{type:"json_object"}:void 0,search_parameters:W.searchParameters?{mode:W.searchParameters.mode,return_citations:W.searchParameters.returnCitations,from_date:W.searchParameters.fromDate,to_date:W.searchParameters.toDate,max_search_results:W.searchParameters.maxSearchResults,sources:(N=W.searchParameters.sources)==null?void 0:N.map((S)=>{var h;return{type:S.type,...S.type==="web"&&{country:S.country,excluded_websites:S.excludedWebsites,allowed_websites:S.allowedWebsites,safe_search:S.safeSearch},...S.type==="x"&&{excluded_x_handles:S.excludedXHandles,included_x_handles:(h=S.includedXHandles)!=null?h:S.xHandles,post_favorite_count:S.postFavoriteCount,post_view_count:S.postViewCount},...S.type==="news"&&{country:S.country,excluded_websites:S.excludedWebsites,safe_search:S.safeSearch},...S.type==="rss"&&{links:S.links}}})}:void 0,messages:H,tools:C,tool_choice:w},warnings:$}}async doGenerate(J){var D,L;let{args:q,warnings:K}=await this.getArgs(J),z=`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:A,value:Y,rawValue:X}=await u({url:z,headers:g(this.config.headers(),J.headers),body:q,failedResponseHandler:r,successfulResponseHandler:d(pG),abortSignal:J.abortSignal,fetch:this.config.fetch});if(Y.error!=null)throw new GG({message:Y.error,url:z,requestBodyValues:q,statusCode:200,responseHeaders:A,responseBody:JSON.stringify(X),isRetryable:Y.code==="The service is currently unavailable"});let Z=Y.choices[0],M=[];if(Z.message.content!=null&&Z.message.content.length>0){let E=Z.message.content,F=q.messages[q.messages.length-1];if((F==null?void 0:F.role)==="assistant"&&E===F.content)E="";if(E.length>0)M.push({type:"text",text:E})}if(Z.message.reasoning_content!=null&&Z.message.reasoning_content.length>0)M.push({type:"reasoning",text:Z.message.reasoning_content});if(Z.message.tool_calls!=null)for(let E of Z.message.tool_calls)M.push({type:"tool-call",toolCallId:E.id,toolName:E.function.name,input:E.function.arguments});if(Y.citations!=null)for(let E of Y.citations)M.push({type:"source",sourceType:"url",id:this.config.generateId(),url:E});return{content:M,finishReason:{unified:WG(Z.finish_reason),raw:(L=Z.finish_reason)!=null?L:void 0},usage:Y.usage?EG(Y.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:q},response:{...JG(Y),headers:A,body:X},warnings:K}}async doStream(J){var D;let{args:L,warnings:q}=await this.getArgs(J),K={...L,stream:!0,stream_options:{include_usage:!0}},z=`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:A,value:Y}=await u({url:z,headers:g(this.config.headers(),J.headers),body:K,failedResponseHandler:r,successfulResponseHandler:async({response:N})=>{let $=NG(N),W=N.headers.get("content-type");if(W==null?void 0:W.includes("application/json")){let H=await N.text(),O=await CG({text:H,schema:lG});if(O.success)throw new GG({message:O.value.error,url:z,requestBodyValues:K,statusCode:200,responseHeaders:$,responseBody:H,isRetryable:O.value.code==="The service is currently unavailable"});throw new GG({message:"Invalid JSON response",url:z,requestBodyValues:K,statusCode:200,responseHeaders:$,responseBody:H})}return YG(iG)({response:N,url:z,requestBodyValues:K})},abortSignal:J.abortSignal,fetch:this.config.fetch}),X={unified:"other",raw:void 0},Z=void 0,M=!0,E={},F={},B=void 0,R=this;return{stream:Y.pipeThrough(new TransformStream({start(N){N.enqueue({type:"stream-start",warnings:q})},transform(N,$){if(J.includeRawChunks)$.enqueue({type:"raw",rawValue:N.rawValue});if(!N.success){$.enqueue({type:"error",error:N.error});return}let W=N.value;if(M)$.enqueue({type:"response-metadata",...JG(W)}),M=!1;if(W.citations!=null)for(let w of W.citations)$.enqueue({type:"source",sourceType:"url",id:R.config.generateId(),url:w});if(W.usage!=null)Z=EG(W.usage);let H=W.choices[0];if((H==null?void 0:H.finish_reason)!=null)X={unified:WG(H.finish_reason),raw:H.finish_reason};if((H==null?void 0:H.delta)==null)return;let{delta:O,index:C}=H;if(O.content!=null&&O.content.length>0){let w=O.content;if(B!=null&&!E[B].ended)$.enqueue({type:"reasoning-end",id:B}),E[B].ended=!0,B=void 0;let j=K.messages[K.messages.length-1];if((j==null?void 0:j.role)==="assistant"&&w===j.content)return;let y=`text-${W.id||C}`;if(E[y]==null)E[y]={type:"text",ended:!1},$.enqueue({type:"text-start",id:y});$.enqueue({type:"text-delta",id:y,delta:w})}if(O.reasoning_content!=null&&O.reasoning_content.length>0){let w=`reasoning-${W.id||C}`;if(F[w]===O.reasoning_content)return;if(F[w]=O.reasoning_content,E[w]==null)E[w]={type:"reasoning",ended:!1},B=w,$.enqueue({type:"reasoning-start",id:w});$.enqueue({type:"reasoning-delta",id:w,delta:O.reasoning_content})}if(O.tool_calls!=null){if(B!=null&&!E[B].ended)$.enqueue({type:"reasoning-end",id:B}),E[B].ended=!0,B=void 0;for(let w of O.tool_calls){let j=w.id;$.enqueue({type:"tool-input-start",id:j,toolName:w.function.name}),$.enqueue({type:"tool-input-delta",id:j,delta:w.function.arguments}),$.enqueue({type:"tool-input-end",id:j}),$.enqueue({type:"tool-call",toolCallId:j,toolName:w.function.name,input:w.function.arguments})}}},flush(N){for(let[$,W]of Object.entries(E))if(!W.ended)N.enqueue({type:W.type==="text"?"text-end":"reasoning-end",id:$});N.enqueue({type:"finish",finishReason:X,usage:Z!=null?Z:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:K},response:{headers:A}}}},TG=G.object({prompt_tokens:G.number(),completion_tokens:G.number(),total_tokens:G.number(),prompt_tokens_details:G.object({text_tokens:G.number().nullish(),audio_tokens:G.number().nullish(),image_tokens:G.number().nullish(),cached_tokens:G.number().nullish()}).nullish(),completion_tokens_details:G.object({reasoning_tokens:G.number().nullish(),audio_tokens:G.number().nullish(),accepted_prediction_tokens:G.number().nullish(),rejected_prediction_tokens:G.number().nullish()}).nullish()}),pG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({message:G.object({role:G.literal("assistant"),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({id:G.string(),type:G.literal("function"),function:G.object({name:G.string(),arguments:G.string()})})).nullish()}),index:G.number(),finish_reason:G.string().nullish()})).nullish(),object:G.literal("chat.completion").nullish(),usage:TG.nullish(),citations:G.array(G.string().url()).nullish(),code:G.string().nullish(),error:G.string().nullish()}),iG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({delta:G.object({role:G.enum(["assistant"]).optional(),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({id:G.string(),type:G.literal("function"),function:G.object({name:G.string(),arguments:G.string()})})).nullish()}),finish_reason:G.string().nullish(),index:G.number()})),usage:TG.nullish(),citations:G.array(G.string().url()).nullish()}),lG=G.object({code:G.string(),error:G.string()}),rG=G.object({aspect_ratio:G.string().optional(),output_format:G.string().optional(),sync_mode:G.boolean().optional(),resolution:G.enum(["1k","2k"]).optional(),quality:G.enum(["low","medium","high"]).optional(),user:G.string().optional()}),aG=class{constructor(J,D){this.modelId=J,this.config=D,this.specificationVersion="v3",this.maxImagesPerCall=3}get provider(){return this.config.provider}async doGenerate({prompt:J,n:D,size:L,aspectRatio:q,seed:K,providerOptions:z,headers:A,abortSignal:Y,files:X,mask:Z}){var M,E,F,B,R;let N=[];if(L!=null)N.push({type:"unsupported",feature:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});if(K!=null)N.push({type:"unsupported",feature:"seed"});if(Z!=null)N.push({type:"unsupported",feature:"mask"});let $=await p({provider:"xai",providerOptions:z,schema:rG}),W=X!=null&&X.length>0,H=W?X.map((I)=>SG(I)):[],O=W?"/images/edits":"/images/generations",C={model:this.modelId,prompt:J,n:D,response_format:"b64_json"};if(q!=null)C.aspect_ratio=q;if(($==null?void 0:$.output_format)!=null)C.output_format=$.output_format;if(($==null?void 0:$.sync_mode)!=null)C.sync_mode=$.sync_mode;if(($==null?void 0:$.aspect_ratio)!=null&&q==null)C.aspect_ratio=$.aspect_ratio;if(($==null?void 0:$.resolution)!=null)C.resolution=$.resolution;if(($==null?void 0:$.quality)!=null)C.quality=$.quality;if(($==null?void 0:$.user)!=null)C.user=$.user;if(H.length===1)C.image={url:H[0],type:"image_url"};else if(H.length>1)C.images=H.map((I)=>({url:I,type:"image_url"}));let w=(M=this.config.baseURL)!=null?M:"https://api.x.ai/v1",j=(B=(F=(E=this.config._internal)==null?void 0:E.currentDate)==null?void 0:F.call(E))!=null?B:new Date,{value:y,responseHeaders:S}=await u({url:`${w}${O}`,headers:g(this.config.headers(),A),body:C,failedResponseHandler:r,successfulResponseHandler:d(nG),abortSignal:Y,fetch:this.config.fetch});return{images:y.data.every((I)=>I.b64_json!=null)?y.data.map((I)=>I.b64_json):await Promise.all(y.data.map((I)=>this.downloadImage(I.url,Y))),warnings:N,response:{timestamp:j,modelId:this.modelId,headers:S},providerMetadata:{xai:{images:y.data.map((I)=>({...I.revised_prompt?{revisedPrompt:I.revised_prompt}:{}})),...((R=y.usage)==null?void 0:R.cost_in_usd_ticks)!=null?{costInUsdTicks:y.usage.cost_in_usd_ticks}:{}}}}}async downloadImage(J,D){let{value:L}=await XG({url:J,abortSignal:D,failedResponseHandler:RG(),successfulResponseHandler:IG(),fetch:this.config.fetch});return L}},nG=G.object({data:G.array(G.object({url:G.string().nullish(),b64_json:G.string().nullish(),revised_prompt:G.string().nullish()})),usage:G.object({cost_in_usd_ticks:G.number().nullish()}).nullish()});async function sG({prompt:J}){var D,L,q,K,z;let A=[],Y=[];for(let X of J)switch(X.role){case"system":{A.push({role:"system",content:X.content});break}case"user":{let Z=[];for(let M of X.content)switch(M.type){case"text":{Z.push({type:"input_text",text:M.text});break}case"file":{if(M.mediaType.startsWith("image/")){let E=M.mediaType==="image/*"?"image/jpeg":M.mediaType,F=M.data instanceof URL?M.data.toString():`data:${E};base64,${QG(M.data)}`;Z.push({type:"input_image",image_url:F})}else throw new c({functionality:`file part media type ${M.mediaType}`});break}default:{let E=M;Y.push({type:"other",message:"xAI Responses API does not support this content type in user messages"})}}A.push({role:"user",content:Z});break}case"assistant":{for(let Z of X.content)switch(Z.type){case"text":{let M=typeof((L=(D=Z.providerOptions)==null?void 0:D.xai)==null?void 0:L.itemId)==="string"?Z.providerOptions.xai.itemId:void 0;A.push({role:"assistant",content:Z.text,id:M});break}case"tool-call":{if(Z.providerExecuted)break;let M=typeof((K=(q=Z.providerOptions)==null?void 0:q.xai)==null?void 0:K.itemId)==="string"?Z.providerOptions.xai.itemId:void 0;A.push({type:"function_call",id:M!=null?M:Z.toolCallId,call_id:Z.toolCallId,name:Z.toolName,arguments:JSON.stringify(Z.input),status:"completed"});break}case"tool-result":break;case"reasoning":case"file":{Y.push({type:"other",message:`xAI Responses API does not support ${Z.type} in assistant messages`});break}default:{let M=Z;Y.push({type:"other",message:"xAI Responses API does not support this content type in assistant messages"})}}break}case"tool":{for(let Z of X.content){if(Z.type==="tool-approval-response")continue;let M=Z.output,E;switch(M.type){case"text":case"error-text":E=M.value;break;case"execution-denied":E=(z=M.reason)!=null?z:"tool execution denied";break;case"json":case"error-json":E=JSON.stringify(M.value);break;case"content":E=M.value.map((F)=>{if(F.type==="text")return F.text;return""}).join("");break;default:{let F=M;E=""}}A.push({type:"function_call_output",call_id:Z.toolCallId,output:E})}break}default:{let Z=X;Y.push({type:"other",message:"unsupported message role"})}}return{input:A,inputWarnings:Y}}function ZG(J){var D,L,q,K;let z=(L=(D=J.input_tokens_details)==null?void 0:D.cached_tokens)!=null?L:0,A=(K=(q=J.output_tokens_details)==null?void 0:q.reasoning_tokens)!=null?K:0,Y=z<=J.input_tokens;return{inputTokens:{total:Y?J.input_tokens:J.input_tokens+z,noCache:Y?J.input_tokens-z:J.input_tokens,cacheRead:z,cacheWrite:void 0},outputTokens:{total:J.output_tokens,text:J.output_tokens-A,reasoning:A},raw:J}}function o(J){switch(J){case"stop":case"completed":return"stop";case"length":case"max_output_tokens":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}var KG=G.union([G.object({type:G.literal("url_citation"),url:G.string(),title:G.string().optional()}),G.object({type:G.string()})]),AG=G.object({type:G.string(),text:G.string().optional(),logprobs:G.array(G.any()).optional(),annotations:G.array(KG).optional()}),jG=G.object({type:G.string(),text:G.string()}),i=G.object({name:G.string().optional(),arguments:G.string().optional(),input:G.string().optional(),call_id:G.string().optional(),id:G.string(),status:G.string(),action:G.any().optional()}),tG=G.object({name:G.string().optional(),arguments:G.string().optional(),output:G.string().optional(),error:G.string().optional(),id:G.string(),status:G.string(),server_label:G.string().optional()}),DG=G.discriminatedUnion("type",[G.object({type:G.literal("web_search_call"),...i.shape}),G.object({type:G.literal("x_search_call"),...i.shape}),G.object({type:G.literal("code_interpreter_call"),...i.shape}),G.object({type:G.literal("code_execution_call"),...i.shape}),G.object({type:G.literal("view_image_call"),...i.shape}),G.object({type:G.literal("view_x_video_call"),...i.shape}),G.object({type:G.literal("file_search_call"),id:G.string(),status:G.string(),queries:G.array(G.string()).optional(),results:G.array(G.object({file_id:G.string(),filename:G.string(),score:G.number(),text:G.string()})).nullish()}),G.object({type:G.literal("custom_tool_call"),...i.shape}),G.object({type:G.literal("mcp_call"),...tG.shape}),G.object({type:G.literal("message"),role:G.string(),content:G.array(AG),id:G.string(),status:G.string()}),G.object({type:G.literal("function_call"),name:G.string(),arguments:G.string(),call_id:G.string(),id:G.string()}),G.object({type:G.literal("reasoning"),id:G.string(),summary:G.array(jG),status:G.string(),encrypted_content:G.string().nullish()})]),qG=G.object({input_tokens:G.number(),output_tokens:G.number(),total_tokens:G.number().optional(),input_tokens_details:G.object({cached_tokens:G.number().optional()}).optional(),output_tokens_details:G.object({reasoning_tokens:G.number().optional()}).optional(),num_sources_used:G.number().optional(),num_server_side_tools_used:G.number().optional()}),t=G.object({id:G.string().nullish(),created_at:G.number().nullish(),model:G.string().nullish(),object:G.literal("response"),output:G.array(DG),usage:qG.nullish(),status:G.string()}),eG=G.union([G.object({type:G.literal("response.created"),response:t.partial({usage:!0,status:!0})}),G.object({type:G.literal("response.in_progress"),response:t.partial({usage:!0,status:!0})}),G.object({type:G.literal("response.output_item.added"),item:DG,output_index:G.number()}),G.object({type:G.literal("response.output_item.done"),item:DG,output_index:G.number()}),G.object({type:G.literal("response.content_part.added"),item_id:G.string(),output_index:G.number(),content_index:G.number(),part:AG}),G.object({type:G.literal("response.content_part.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),part:AG}),G.object({type:G.literal("response.output_text.delta"),item_id:G.string(),output_index:G.number(),content_index:G.number(),delta:G.string(),logprobs:G.array(G.any()).optional()}),G.object({type:G.literal("response.output_text.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),text:G.string(),logprobs:G.array(G.any()).optional(),annotations:G.array(KG).optional()}),G.object({type:G.literal("response.output_text.annotation.added"),item_id:G.string(),output_index:G.number(),content_index:G.number(),annotation_index:G.number(),annotation:KG}),G.object({type:G.literal("response.reasoning_summary_part.added"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),part:jG}),G.object({type:G.literal("response.reasoning_summary_part.done"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),part:jG}),G.object({type:G.literal("response.reasoning_summary_text.delta"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.reasoning_summary_text.done"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),text:G.string()}),G.object({type:G.literal("response.reasoning_text.delta"),item_id:G.string(),output_index:G.number(),content_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.reasoning_text.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),text:G.string()}),G.object({type:G.literal("response.web_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.web_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.web_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.interpreting"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call_code.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.code_interpreter_call_code.done"),item_id:G.string(),output_index:G.number(),code:G.string()}),G.object({type:G.literal("response.custom_tool_call_input.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.custom_tool_call_input.done"),item_id:G.string(),output_index:G.number(),input:G.string()}),G.object({type:G.literal("response.function_call_arguments.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.function_call_arguments.done"),item_id:G.string(),output_index:G.number(),arguments:G.string()}),G.object({type:G.literal("response.mcp_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.failed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call_arguments.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.mcp_call_arguments.done"),item_id:G.string(),output_index:G.number(),arguments:G.string().optional()}),G.object({type:G.literal("response.mcp_call_output.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.mcp_call_output.done"),item_id:G.string(),output_index:G.number(),output:G.string().optional()}),G.object({type:G.literal("response.incomplete"),response:G.object({incomplete_details:G.object({reason:G.string()}).nullish(),usage:qG.nullish()})}),G.object({type:G.literal("response.failed"),response:G.object({error:G.object({code:G.string().nullish(),message:G.string()}).nullish(),incomplete_details:G.object({reason:G.string()}).nullish(),usage:qG.nullish()})}),G.object({type:G.literal("error"),code:G.string().nullish(),message:G.string(),param:G.string().nullish()}),G.object({type:G.literal("response.done"),response:t}),G.object({type:G.literal("response.completed"),response:t})]),oG=G.object({reasoningEffort:G.enum(["low","medium","high"]).optional(),logprobs:G.boolean().optional(),topLogprobs:G.number().int().min(0).max(8).optional(),store:G.boolean().optional(),previousResponseId:G.string().optional(),include:G.array(G.enum(["file_search_call.results"])).nullish()}),GJ=v(()=>k(G.object({vectorStoreIds:G.array(G.string()),maxNumResults:G.number().optional()}))),JJ=v(()=>k(G.object({queries:G.array(G.string()),results:G.array(G.object({fileId:G.string(),filename:G.string(),score:G.number().min(0).max(1),text:G.string()})).nullable()}))),QJ=_({id:"xai.file_search",inputSchema:v(()=>k(G.object({}))),outputSchema:JJ}),XJ=(J)=>QJ(J),YJ=v(()=>k(G.object({serverUrl:G.string().describe("The URL of the MCP server"),serverLabel:G.string().optional().describe("A label for the MCP server"),serverDescription:G.string().optional().describe("Description of the MCP server"),allowedTools:G.array(G.string()).optional().describe("List of allowed tool names"),headers:G.record(G.string(),G.string()).optional().describe("Custom headers to send"),authorization:G.string().optional().describe("Authorization header value")}))),ZJ=v(()=>k(G.object({name:G.string(),arguments:G.string(),result:G.unknown()}))),$J=_({id:"xai.mcp",inputSchema:v(()=>k(G.object({}))),outputSchema:ZJ}),KJ=(J)=>$J(J),AJ=v(()=>k(G.object({allowedDomains:G.array(G.string()).max(5).optional(),excludedDomains:G.array(G.string()).max(5).optional(),enableImageUnderstanding:G.boolean().optional()}))),jJ=v(()=>k(G.object({query:G.string(),sources:G.array(G.object({title:G.string(),url:G.string(),snippet:G.string()}))}))),DJ=_({id:"xai.web_search",inputSchema:v(()=>k(G.object({}))),outputSchema:jJ}),qJ=(J={})=>DJ(J),zJ=v(()=>k(G.object({allowedXHandles:G.array(G.string()).max(10).optional(),excludedXHandles:G.array(G.string()).max(10).optional(),fromDate:G.string().optional(),toDate:G.string().optional(),enableImageUnderstanding:G.boolean().optional(),enableVideoUnderstanding:G.boolean().optional()}))),VJ=v(()=>k(G.object({query:G.string(),posts:G.array(G.object({author:G.string(),text:G.string(),url:G.string(),likes:G.number()}))}))),LJ=_({id:"xai.x_search",inputSchema:v(()=>k(G.object({}))),outputSchema:VJ}),UJ=(J={})=>LJ(J);async function HJ({tools:J,toolChoice:D}){let L=(J==null?void 0:J.length)?J:void 0,q=[];if(L==null)return{tools:void 0,toolChoice:void 0,toolWarnings:q};let K=[],z=new Map;for(let Y of L)if(z.set(Y.name,Y),Y.type==="provider")switch(Y.id){case"xai.web_search":{let X=await s({value:Y.args,schema:AJ});K.push({type:"web_search",allowed_domains:X.allowedDomains,excluded_domains:X.excludedDomains,enable_image_understanding:X.enableImageUnderstanding});break}case"xai.x_search":{let X=await s({value:Y.args,schema:zJ});K.push({type:"x_search",allowed_x_handles:X.allowedXHandles,excluded_x_handles:X.excludedXHandles,from_date:X.fromDate,to_date:X.toDate,enable_image_understanding:X.enableImageUnderstanding,enable_video_understanding:X.enableVideoUnderstanding});break}case"xai.code_execution":{K.push({type:"code_interpreter"});break}case"xai.view_image":{K.push({type:"view_image"});break}case"xai.view_x_video":{K.push({type:"view_x_video"});break}case"xai.file_search":{let X=await s({value:Y.args,schema:GJ});K.push({type:"file_search",vector_store_ids:X.vectorStoreIds,max_num_results:X.maxNumResults});break}case"xai.mcp":{let X=await s({value:Y.args,schema:YJ});K.push({type:"mcp",server_url:X.serverUrl,server_label:X.serverLabel,server_description:X.serverDescription,allowed_tools:X.allowedTools,headers:X.headers,authorization:X.authorization});break}default:{q.push({type:"unsupported",feature:`provider-defined tool ${Y.name}`});break}}else K.push({type:"function",name:Y.name,description:Y.description,parameters:Y.inputSchema,...Y.strict!=null?{strict:Y.strict}:{}});if(D==null)return{tools:K,toolChoice:void 0,toolWarnings:q};let A=D.type;switch(A){case"auto":case"none":return{tools:K,toolChoice:A,toolWarnings:q};case"required":return{tools:K,toolChoice:"required",toolWarnings:q};case"tool":{let Y=z.get(D.toolName);if(Y==null)return{tools:K,toolChoice:void 0,toolWarnings:q};if(Y.type==="provider")return q.push({type:"unsupported",feature:`toolChoice for server-side tool "${Y.name}"`}),{tools:K,toolChoice:void 0,toolWarnings:q};return{tools:K,toolChoice:{type:"function",name:Y.name},toolWarnings:q}}default:throw new c({functionality:`tool choice type: ${A}`})}}var MJ=class{constructor(J,D){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=J,this.config=D}get provider(){return this.config.provider}async getArgs({prompt:J,maxOutputTokens:D,temperature:L,topP:q,stopSequences:K,seed:z,responseFormat:A,providerOptions:Y,tools:X,toolChoice:Z}){var M,E,F,B,R,N,$;let W=[],H=(M=await p({provider:"xai",providerOptions:Y,schema:oG}))!=null?M:{};if(K!=null)W.push({type:"unsupported",feature:"stopSequences"});let O=(E=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.web_search"))==null?void 0:E.name,C=(F=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.x_search"))==null?void 0:F.name,w=(B=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.code_execution"))==null?void 0:B.name,j=(R=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.mcp"))==null?void 0:R.name,y=(N=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.file_search"))==null?void 0:N.name,{input:S,inputWarnings:h}=await sG({prompt:J,store:!0});W.push(...h);let{tools:m,toolChoice:I,toolWarnings:P}=await HJ({tools:X,toolChoice:Z});W.push(...P);let f=H.include?[...H.include]:void 0;if(H.store===!1)if(f==null)f=["reasoning.encrypted_content"];else f=[...f,"reasoning.encrypted_content"];let U={model:this.modelId,input:S,logprobs:H.logprobs===!0||H.topLogprobs!=null?!0:void 0,top_logprobs:H.topLogprobs,max_output_tokens:D,temperature:L,top_p:q,seed:z,...(A==null?void 0:A.type)==="json"&&{text:{format:A.schema!=null?{type:"json_schema",strict:!0,name:($=A.name)!=null?$:"response",description:A.description,schema:A.schema}:{type:"json_object"}}},...H.reasoningEffort!=null&&{reasoning:{effort:H.reasoningEffort}},...H.store===!1&&{store:H.store},...f!=null&&{include:f},...H.previousResponseId!=null&&{previous_response_id:H.previousResponseId}};if(m&&m.length>0)U.tools=m;if(I!=null)U.tool_choice=I;return{args:U,warnings:W,webSearchToolName:O,xSearchToolName:C,codeExecutionToolName:w,mcpToolName:j,fileSearchToolName:y}}async doGenerate(J){var D,L,q,K,z,A,Y,X,Z,M,E,F,B;let{args:R,warnings:N,webSearchToolName:$,xSearchToolName:W,codeExecutionToolName:H,mcpToolName:O,fileSearchToolName:C}=await this.getArgs(J),{responseHeaders:w,value:j,rawValue:y}=await u({url:`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/responses`,headers:g(this.config.headers(),J.headers),body:R,failedResponseHandler:r,successfulResponseHandler:d(t),abortSignal:J.abortSignal,fetch:this.config.fetch}),S=[],h=!1,m=["web_search","web_search_with_snippets","browse_page"],I=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"];for(let P of j.output){if(P.type==="file_search_call"){let f=C!=null?C:"file_search";S.push({type:"tool-call",toolCallId:P.id,toolName:f,input:"",providerExecuted:!0}),S.push({type:"tool-result",toolCallId:P.id,toolName:f,result:{queries:(L=P.queries)!=null?L:[],results:(K=(q=P.results)==null?void 0:q.map((U)=>({fileId:U.file_id,filename:U.filename,score:U.score,text:U.text})))!=null?K:null}});continue}if(P.type==="web_search_call"||P.type==="x_search_call"||P.type==="code_interpreter_call"||P.type==="code_execution_call"||P.type==="view_image_call"||P.type==="view_x_video_call"||P.type==="custom_tool_call"||P.type==="mcp_call"){let f=(z=P.name)!=null?z:"";if(m.includes((A=P.name)!=null?A:"")||P.type==="web_search_call")f=$!=null?$:"web_search";else if(I.includes((Y=P.name)!=null?Y:"")||P.type==="x_search_call")f=W!=null?W:"x_search";else if(P.name==="code_execution"||P.type==="code_interpreter_call"||P.type==="code_execution_call")f=H!=null?H:"code_execution";else if(P.type==="mcp_call")f=(X=O!=null?O:P.name)!=null?X:"mcp";let U=P.type==="custom_tool_call"?(Z=P.input)!=null?Z:"":P.type==="mcp_call"?(M=P.arguments)!=null?M:"":(E=P.arguments)!=null?E:"";S.push({type:"tool-call",toolCallId:P.id,toolName:f,input:U,providerExecuted:!0});continue}switch(P.type){case"message":{for(let f of P.content){if(f.text)S.push({type:"text",text:f.text});if(f.annotations){for(let U of f.annotations)if(U.type==="url_citation"&&"url"in U)S.push({type:"source",sourceType:"url",id:this.config.generateId(),url:U.url,title:(F=U.title)!=null?F:U.url})}}break}case"function_call":{h=!0,S.push({type:"tool-call",toolCallId:P.call_id,toolName:P.name,input:P.arguments});break}case"reasoning":{let f=P.summary.map((U)=>U.text).filter((U)=>U&&U.length>0);if(f.length>0){let U=f.join("");if(P.encrypted_content||P.id)S.push({type:"reasoning",text:U,providerMetadata:{xai:{...P.encrypted_content&&{reasoningEncryptedContent:P.encrypted_content},...P.id&&{itemId:P.id}}}});else S.push({type:"reasoning",text:U})}break}default:break}}return{content:S,finishReason:{unified:h?"tool-calls":o(j.status),raw:(B=j.status)!=null?B:void 0},usage:j.usage?ZG(j.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:R},response:{...JG(j),headers:w,body:y},warnings:N}}async doStream(J){var D;let{args:L,warnings:q,webSearchToolName:K,xSearchToolName:z,codeExecutionToolName:A,mcpToolName:Y,fileSearchToolName:X}=await this.getArgs(J),Z={...L,stream:!0},{responseHeaders:M,value:E}=await u({url:`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/responses`,headers:g(this.config.headers(),J.headers),body:Z,failedResponseHandler:r,successfulResponseHandler:YG(eG),abortSignal:J.abortSignal,fetch:this.config.fetch}),F={unified:"other",raw:void 0},B=!1,R=void 0,N=!0,$={},W=new Set,H={},O={},C=this;return{stream:E.pipeThrough(new TransformStream({start(w){w.enqueue({type:"stream-start",warnings:q})},transform(w,j){var y,S,h,m,I,P,f,U,x,zG,VG,LG,UG,HG,MG;if(J.includeRawChunks)j.enqueue({type:"raw",rawValue:w.rawValue});if(!w.success){j.enqueue({type:"error",error:w.error});return}let V=w.value;if(V.type==="response.created"||V.type==="response.in_progress"){if(N)j.enqueue({type:"response-metadata",...JG(V.response)}),N=!1;return}if(V.type==="response.reasoning_summary_part.added"){let Q=`reasoning-${V.item_id}`;O[V.item_id]={},j.enqueue({type:"reasoning-start",id:Q,providerMetadata:{xai:{itemId:V.item_id}}})}if(V.type==="response.reasoning_summary_text.delta"){let Q=`reasoning-${V.item_id}`;j.enqueue({type:"reasoning-delta",id:Q,delta:V.delta,providerMetadata:{xai:{itemId:V.item_id}}});return}if(V.type==="response.reasoning_summary_text.done")return;if(V.type==="response.reasoning_text.delta"){let Q=`reasoning-${V.item_id}`;if(O[V.item_id]==null)O[V.item_id]={},j.enqueue({type:"reasoning-start",id:Q,providerMetadata:{xai:{itemId:V.item_id}}});j.enqueue({type:"reasoning-delta",id:Q,delta:V.delta,providerMetadata:{xai:{itemId:V.item_id}}});return}if(V.type==="response.reasoning_text.done")return;if(V.type==="response.output_text.delta"){let Q=`text-${V.item_id}`;if($[Q]==null)$[Q]={type:"text"},j.enqueue({type:"text-start",id:Q});j.enqueue({type:"text-delta",id:Q,delta:V.delta});return}if(V.type==="response.output_text.done"){if(V.annotations){for(let Q of V.annotations)if(Q.type==="url_citation"&&"url"in Q)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:Q.url,title:(y=Q.title)!=null?y:Q.url})}return}if(V.type==="response.output_text.annotation.added"){let Q=V.annotation;if(Q.type==="url_citation"&&"url"in Q)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:Q.url,title:(S=Q.title)!=null?S:Q.url});return}if(V.type==="response.done"||V.type==="response.completed"||V.type==="response.incomplete"){let Q=V.response;if(Q.usage)R=ZG(Q.usage);if(V.type==="response.incomplete"){let T="incomplete_details"in Q?(h=Q.incomplete_details)==null?void 0:h.reason:void 0;F={unified:T?o(T):"other",raw:T!=null?T:"incomplete"}}else if("status"in Q&&Q.status)F={unified:B?"tool-calls":o(Q.status),raw:Q.status};return}if(V.type==="response.failed"){let Q=(m=V.response.incomplete_details)==null?void 0:m.reason;if(F={unified:Q?o(Q):"error",raw:Q!=null?Q:"error"},V.response.usage)R=ZG(V.response.usage);return}if(V.type==="error"){j.enqueue({type:"error",error:V});return}if(V.type==="response.custom_tool_call_input.delta"||V.type==="response.custom_tool_call_input.done")return;if(V.type==="response.function_call_arguments.delta"){let Q=H[V.output_index];if(Q!=null)j.enqueue({type:"tool-input-delta",id:Q.toolCallId,delta:V.delta});return}if(V.type==="response.function_call_arguments.done")return;if(V.type==="response.output_item.added"||V.type==="response.output_item.done"){let Q=V.item;if(Q.type==="reasoning"){if(V.type==="response.output_item.done"){let T=`reasoning-${Q.id}`;if(!(Q.id in O))O[Q.id]={},j.enqueue({type:"reasoning-start",id:T,providerMetadata:{xai:{...Q.id&&{itemId:Q.id}}}});j.enqueue({type:"reasoning-end",id:T,providerMetadata:{xai:{...Q.encrypted_content&&{reasoningEncryptedContent:Q.encrypted_content},...Q.id&&{itemId:Q.id}}}}),delete O[Q.id]}return}if(Q.type==="file_search_call"){let T=X!=null?X:"file_search";if(!W.has(Q.id))W.add(Q.id),j.enqueue({type:"tool-input-start",id:Q.id,toolName:T}),j.enqueue({type:"tool-input-delta",id:Q.id,delta:""}),j.enqueue({type:"tool-input-end",id:Q.id}),j.enqueue({type:"tool-call",toolCallId:Q.id,toolName:T,input:"",providerExecuted:!0});if(V.type==="response.output_item.done")j.enqueue({type:"tool-result",toolCallId:Q.id,toolName:T,result:{queries:(I=Q.queries)!=null?I:[],results:(f=(P=Q.results)==null?void 0:P.map((b)=>({fileId:b.file_id,filename:b.filename,score:b.score,text:b.text})))!=null?f:null}});return}if(Q.type==="web_search_call"||Q.type==="x_search_call"||Q.type==="code_interpreter_call"||Q.type==="code_execution_call"||Q.type==="view_image_call"||Q.type==="view_x_video_call"||Q.type==="custom_tool_call"||Q.type==="mcp_call"){let T=["web_search","web_search_with_snippets","browse_page"],b=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"],n=(U=Q.name)!=null?U:"";if(T.includes((x=Q.name)!=null?x:"")||Q.type==="web_search_call")n=K!=null?K:"web_search";else if(b.includes((zG=Q.name)!=null?zG:"")||Q.type==="x_search_call")n=z!=null?z:"x_search";else if(Q.name==="code_execution"||Q.type==="code_interpreter_call"||Q.type==="code_execution_call")n=A!=null?A:"code_execution";else if(Q.type==="mcp_call")n=(VG=Y!=null?Y:Q.name)!=null?VG:"mcp";let PG=Q.type==="custom_tool_call"?(LG=Q.input)!=null?LG:"":Q.type==="mcp_call"?(UG=Q.arguments)!=null?UG:"":(HG=Q.arguments)!=null?HG:"";if((Q.type==="custom_tool_call"?V.type==="response.output_item.done":!W.has(Q.id))&&!W.has(Q.id))W.add(Q.id),j.enqueue({type:"tool-input-start",id:Q.id,toolName:n}),j.enqueue({type:"tool-input-delta",id:Q.id,delta:PG}),j.enqueue({type:"tool-input-end",id:Q.id}),j.enqueue({type:"tool-call",toolCallId:Q.id,toolName:n,input:PG,providerExecuted:!0});return}if(Q.type==="message")for(let T of Q.content){if(T.text&&T.text.length>0){let b=`text-${Q.id}`;if($[b]==null)$[b]={type:"text"},j.enqueue({type:"text-start",id:b}),j.enqueue({type:"text-delta",id:b,delta:T.text})}if(T.annotations){for(let b of T.annotations)if(b.type==="url_citation"&&"url"in b)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:b.url,title:(MG=b.title)!=null?MG:b.url})}}else if(Q.type==="function_call"){if(V.type==="response.output_item.added")H[V.output_index]={toolName:Q.name,toolCallId:Q.call_id},j.enqueue({type:"tool-input-start",id:Q.call_id,toolName:Q.name});else if(V.type==="response.output_item.done")B=!0,H[V.output_index]=void 0,j.enqueue({type:"tool-input-end",id:Q.call_id}),j.enqueue({type:"tool-call",toolCallId:Q.call_id,toolName:Q.name,input:Q.arguments})}}},flush(w){for(let[j,y]of Object.entries($))if(y.type==="text")w.enqueue({type:"text-end",id:j});w.enqueue({type:"finish",finishReason:F,usage:R!=null?R:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:Z},response:{headers:M}}}},PJ=G.object({output:G.string().describe("the output of the code execution"),error:G.string().optional().describe("any error that occurred")}),EJ=_({id:"xai.code_execution",inputSchema:G.object({}).describe("no input parameters"),outputSchema:PJ}),WJ=(J={})=>EJ(J),BJ=G.object({description:G.string().describe("description of the image"),objects:G.array(G.string()).optional().describe("objects detected in the image")}),FJ=_({id:"xai.view_image",inputSchema:G.object({}).describe("no input parameters"),outputSchema:BJ}),NJ=(J={})=>FJ(J),wJ=G.object({transcript:G.string().optional().describe("transcript of the video"),description:G.string().describe("description of the video content"),duration:G.number().optional().describe("duration in seconds")}),SJ=_({id:"xai.view_x_video",inputSchema:G.object({}).describe("no input parameters"),outputSchema:wJ}),OJ=(J={})=>SJ(J),fJ={codeExecution:WJ,fileSearch:XJ,mcpServer:KJ,viewImage:NJ,viewXVideo:OJ,webSearch:qJ,xSearch:UJ},CJ="3.0.82",a=G.string().min(1),yJ=G.enum(["480p","720p"]),IJ=G.enum(["edit-video","extend-video","reference-to-video"]),e={pollIntervalMs:G.number().positive().nullish(),pollTimeoutMs:G.number().positive().nullish(),resolution:yJ.nullish()},RJ=G.object({...e,mode:G.literal("edit-video"),videoUrl:a,referenceImageUrls:G.undefined().optional()}),xJ=G.object({...e,mode:G.literal("extend-video"),videoUrl:a,referenceImageUrls:G.undefined().optional()}),TJ=G.object({...e,mode:G.literal("reference-to-video"),referenceImageUrls:G.array(a).min(1).max(7),videoUrl:G.undefined().optional()}),vJ=G.object({...e,mode:G.undefined().optional(),videoUrl:a.optional(),referenceImageUrls:G.array(a).min(1).max(7).optional()}),IQ=G.union([RJ,xJ,TJ,vJ]),kJ=G.object({mode:IJ.optional(),videoUrl:a.optional(),referenceImageUrls:G.array(a).min(1).max(7).optional(),...e}).passthrough(),bJ=v(()=>k(kJ)),hJ={"1280x720":"720p","854x480":"480p","640x480":"480p"};function _J(J){if((J==null?void 0:J.mode)!=null)return J.mode;if((J==null?void 0:J.videoUrl)!=null)return"edit-video";if((J==null?void 0:J.referenceImageUrls)!=null&&J.referenceImageUrls.length>0)return"reference-to-video";return}var mJ=class{constructor(J,D){this.modelId=J,this.config=D,this.specificationVersion="v3",this.maxVideosPerCall=1}get provider(){return this.config.provider}async doGenerate(J){var D,L,q,K,z,A,Y,X,Z,M;let E=(q=(L=(D=this.config._internal)==null?void 0:D.currentDate)==null?void 0:L.call(D))!=null?q:new Date,F=[],B=await p({provider:"xai",providerOptions:J.providerOptions,schema:bJ}),R=_J(B),N=R==="edit-video",$=R==="extend-video",W=R==="reference-to-video";if(J.fps!=null)F.push({type:"unsupported",feature:"fps",details:"xAI video models do not support custom FPS."});if(J.seed!=null)F.push({type:"unsupported",feature:"seed",details:"xAI video models do not support seed."});if(J.n!=null&&J.n>1)F.push({type:"unsupported",feature:"n",details:"xAI video models do not support generating multiple videos per call. Only 1 video will be generated."});if(N&&J.duration!=null)F.push({type:"unsupported",feature:"duration",details:"xAI video editing does not support custom duration."});if(N&&J.aspectRatio!=null)F.push({type:"unsupported",feature:"aspectRatio",details:"xAI video editing does not support custom aspect ratio."});if(N&&((B==null?void 0:B.resolution)!=null||J.resolution!=null))F.push({type:"unsupported",feature:"resolution",details:"xAI video editing does not support custom resolution."});if($&&J.aspectRatio!=null)F.push({type:"unsupported",feature:"aspectRatio",details:"xAI video extension does not support custom aspect ratio."});if($&&((B==null?void 0:B.resolution)!=null||J.resolution!=null))F.push({type:"unsupported",feature:"resolution",details:"xAI video extension does not support custom resolution."});let H={model:this.modelId,prompt:J.prompt},O=!N,C=!N&&!$,w=!N&&!$;if(O&&J.duration!=null)H.duration=J.duration;if(C&&J.aspectRatio!=null)H.aspect_ratio=J.aspectRatio;if(w&&(B==null?void 0:B.resolution)!=null)H.resolution=B.resolution;else if(w&&J.resolution!=null){let U=hJ[J.resolution];if(U!=null)H.resolution=U;else F.push({type:"unsupported",feature:"resolution",details:`Unrecognized resolution "${J.resolution}". Use providerOptions.xai.resolution with "480p" or "720p" instead.`})}if(N)H.video={url:B.videoUrl};if($)H.video={url:B.videoUrl};if(J.image!=null)if(J.image.type==="url")H.image={url:J.image.url};else{let U=typeof J.image.data==="string"?J.image.data:wG(J.image.data);H.image={url:`data:${J.image.mediaType};base64,${U}`}}if(W)H.reference_images=B.referenceImageUrls.map((U)=>({url:U}));if(B!=null){for(let[U,x]of Object.entries(B))if(!["mode","pollIntervalMs","pollTimeoutMs","resolution","videoUrl","referenceImageUrls"].includes(U))H[U]=x}let j=(K=this.config.baseURL)!=null?K:"https://api.x.ai/v1",y;if(N)y=`${j}/videos/edits`;else if($)y=`${j}/videos/extensions`;else y=`${j}/videos/generations`;let{value:S}=await u({url:y,headers:g(this.config.headers(),J.headers),body:H,failedResponseHandler:r,successfulResponseHandler:d(gJ),abortSignal:J.abortSignal,fetch:this.config.fetch}),h=S.request_id;if(!h)throw new l({name:"XAI_VIDEO_GENERATION_ERROR",message:`No request_id returned from xAI API. Response: ${JSON.stringify(S)}`});let m=(z=B==null?void 0:B.pollIntervalMs)!=null?z:5000,I=(A=B==null?void 0:B.pollTimeoutMs)!=null?A:600000,P=Date.now(),f;while(!0){if(await FG(m,{abortSignal:J.abortSignal}),Date.now()-P>I)throw new l({name:"XAI_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${I}ms`});let{value:U,responseHeaders:x}=await XG({url:`${j}/videos/${h}`,headers:g(this.config.headers(),J.headers),successfulResponseHandler:d(uJ),failedResponseHandler:r,abortSignal:J.abortSignal,fetch:this.config.fetch});if(f=x,U.status==="done"||U.status==null&&((Y=U.video)==null?void 0:Y.url)){if(((X=U.video)==null?void 0:X.respect_moderation)===!1)throw new l({name:"XAI_VIDEO_MODERATION_ERROR",message:"Video generation was blocked due to a content policy violation."});if(!((Z=U.video)==null?void 0:Z.url))throw new l({name:"XAI_VIDEO_GENERATION_ERROR",message:"Video generation completed but no video URL was returned."});return{videos:[{type:"url",url:U.video.url,mediaType:"video/mp4"}],warnings:F,response:{timestamp:E,modelId:this.modelId,headers:f},providerMetadata:{xai:{requestId:h,videoUrl:U.video.url,...U.video.duration!=null?{duration:U.video.duration}:{},...((M=U.usage)==null?void 0:M.cost_in_usd_ticks)!=null?{costInUsdTicks:U.usage.cost_in_usd_ticks}:{},...U.progress!=null?{progress:U.progress}:{}}}}}if(U.status==="expired")throw new l({name:"XAI_VIDEO_GENERATION_EXPIRED",message:"Video generation request expired."});if(U.status==="failed")throw new l({name:"XAI_VIDEO_GENERATION_FAILED",message:"Video generation failed."})}}},gJ=G.object({request_id:G.string().nullish()}),uJ=G.object({status:G.string().nullish(),video:G.object({url:G.string(),duration:G.number().nullish(),respect_moderation:G.boolean().nullish()}).nullish(),model:G.string().nullish(),usage:G.object({cost_in_usd_ticks:G.number().nullish()}).nullish(),progress:G.number().nullish(),error:G.object({code:G.string().nullish(),message:G.string().nullish()}).nullish()});function dJ(J={}){var D;let L=xG((D=J.baseURL)!=null?D:"https://api.x.ai/v1"),q=()=>OG({Authorization:`Bearer ${fG({apiKey:J.apiKey,environmentVariableName:"XAI_API_KEY",description:"xAI API key"})}`,...J.headers},`ai-sdk/xai/${CJ}`),K=(Z)=>{return new cG(Z,{provider:"xai.chat",baseURL:L,headers:q,generateId:$G,fetch:J.fetch})},z=(Z)=>{return new MJ(Z,{provider:"xai.responses",baseURL:L,headers:q,generateId:$G,fetch:J.fetch})},A=(Z)=>{return new aG(Z,{provider:"xai.image",baseURL:L,headers:q,fetch:J.fetch})},Y=(Z)=>{return new mJ(Z,{provider:"xai.video",baseURL:L,headers:q,fetch:J.fetch})},X=(Z)=>K(Z);return X.specificationVersion="v3",X.languageModel=K,X.chat=K,X.responses=z,X.embeddingModel=(Z)=>{throw new BG({modelId:Z,modelType:"embeddingModel"})},X.textEmbeddingModel=X.embeddingModel,X.imageModel=A,X.image=A,X.videoModel=Y,X.video=Y,X.tools=fJ,X}var RQ=dJ();export{fJ as xaiTools,RQ as xai,UJ as xSearch,qJ as webSearch,OJ as viewXVideo,NJ as viewImage,KJ as mcpServer,dJ as createXai,WJ as codeExecution,CJ as VERSION};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{De as u,Ee as S,Fe as v}from"./chunk-b4qd109w.js";import{$e as A,Ge as q,Le as U,Pe as k,Se as y,Ve as $,We as D,_e as N,df as E,ff as H,hf as O}from"./chunk-xk7je9y8.js";import"./chunk-d0qqgxs4.js";import"./chunk-cqtkxwd8.js";import"./chunk-v00cptj6.js";import{Tt as j}from"./chunk-j2zay4da.js";import"./chunk-4vemws1t.js";import"./chunk-yjj4cvqg.js";var C=$(()=>D(j.object({error:j.object({message:j.string()})}))),f=$(()=>D(j.object({id:j.string().nullish(),model:j.string().nullish(),results:j.array(j.object({index:j.number(),relevance_score:j.number()})),usage:j.object({prompt_tokens:j.number(),completion_tokens:j.number(),total_tokens:j.number()})}))),M=$(()=>D(j.object({rankFields:j.array(j.string()).optional()}))),h=class{constructor(F,G){this.specificationVersion="v3",this.modelId=F,this.config=G}get provider(){return this.config.provider}async doRerank({documents:F,headers:G,query:K,topN:V,abortSignal:W,providerOptions:Y}){var J,P;let Z=await N({provider:"togetherai",providerOptions:Y,schema:M}),{responseHeaders:X,value:B,rawValue:x}=await A({url:`${this.config.baseURL}/rerank`,headers:q(this.config.headers(),G),body:{model:this.modelId,documents:F.values,query:K,top_n:V,rank_fields:Z==null?void 0:Z.rankFields,return_documents:!1},failedResponseHandler:E({errorSchema:C,errorToMessage:(Q)=>Q.error.message}),successfulResponseHandler:H(f),abortSignal:W,fetch:this.config.fetch});return{ranking:B.results.map((Q)=>({index:Q.index,relevanceScore:Q.relevance_score})),response:{id:(J=B.id)!=null?J:void 0,modelId:(P=B.model)!=null?P:void 0,headers:X,body:x}}}},I=class{constructor(F,G){this.modelId=F,this.config=G,this.specificationVersion="v3",this.maxImagesPerCall=1}get provider(){return this.config.provider}async doGenerate({prompt:F,n:G,size:K,seed:V,providerOptions:W,headers:Y,abortSignal:J,files:P,mask:Z}){var X,B,x;let Q=[];if(Z!=null)throw Error("Together AI does not support mask-based image editing. Use FLUX Kontext models (e.g., black-forest-labs/FLUX.1-kontext-pro) with a reference image and descriptive prompt instead.");if(K!=null)Q.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support the `aspectRatio` option. Use `size` instead."});let _=(x=(B=(X=this.config._internal)==null?void 0:X.currentDate)==null?void 0:B.call(X))!=null?x:new Date,R=await N({provider:"togetherai",providerOptions:W,schema:m}),w;if(P!=null&&P.length>0){if(w=U(P[0]),P.length>1)Q.push({type:"other",message:"Together AI only supports a single input image. Additional images are ignored."})}let T=K==null?void 0:K.split("x"),{value:b,responseHeaders:z}=await A({url:`${this.config.baseURL}/images/generations`,headers:q(this.config.headers(),Y),body:{model:this.modelId,prompt:F,seed:V,...G>1?{n:G}:{},...T&&{width:parseInt(T[0]),height:parseInt(T[1])},...w!=null?{image_url:w}:{},response_format:"base64",...R!=null?R:{}},failedResponseHandler:E({errorSchema:g,errorToMessage:(L)=>L.error.message}),successfulResponseHandler:H(c),abortSignal:J,fetch:this.config.fetch});return{images:b.data.map((L)=>L.b64_json),warnings:Q,response:{timestamp:_,modelId:this.modelId,headers:z}}}},c=j.object({data:j.array(j.object({b64_json:j.string()}))}),g=j.object({error:j.object({message:j.string()})}),m=$(()=>D(j.object({steps:j.number().nullish(),guidance:j.number().nullish(),negative_prompt:j.string().nullish(),disable_safety_checker:j.boolean().nullish()}).passthrough())),p="2.0.41";function l(){if(typeof process>"u")return;if(typeof process.env.TOGETHER_API_KEY==="string")return;let F=process.env.TOGETHER_AI_API_KEY;if(typeof F==="string")console.warn("TOGETHER_AI_API_KEY is deprecated and will be removed in a future release. Please use TOGETHER_API_KEY instead.");return F}function n(F={}){var G;let K=O((G=F.baseURL)!=null?G:"https://api.together.xyz/v1/"),V=()=>{var x;return k({Authorization:`Bearer ${y({apiKey:(x=F.apiKey)!=null?x:l(),environmentVariableName:"TOGETHER_API_KEY",description:"TogetherAI"})}`,...F.headers},`ai-sdk/togetherai/${p}`)},W=(x)=>({provider:`togetherai.${x}`,url:({path:Q})=>`${K}${Q}`,headers:V,fetch:F.fetch}),Y=(x)=>{return new u(x,W("chat"))},J=(x)=>new S(x,W("completion")),P=(x)=>new v(x,W("embedding")),Z=(x)=>new I(x,{...W("image"),baseURL:K!=null?K:"https://api.together.xyz/v1/"}),X=(x)=>new h(x,{...W("reranking"),baseURL:K!=null?K:"https://api.together.xyz/v1/"}),B=(x)=>Y(x);return B.specificationVersion="v3",B.completionModel=J,B.languageModel=Y,B.chatModel=Y,B.embeddingModel=P,B.textEmbeddingModel=P,B.image=Z,B.imageModel=Z,B.reranking=X,B.rerankingModel=X,B}var xj=n();export{xj as togetherai,n as createTogetherAI,p as VERSION};
2
+ import{De as u,Ee as S,Fe as v}from"./chunk-b0syck9r.js";import{$e as A,Ge as q,Le as U,Pe as k,Se as y,Ve as $,We as D,_e as N,df as E,ff as H,hf as O}from"./chunk-qv2s39dv.js";import"./chunk-btz9jvec.js";import"./chunk-cqtkxwd8.js";import"./chunk-fkgv2hqd.js";import{qv as j}from"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-aztre27e.js";var C=$(()=>D(j.object({error:j.object({message:j.string()})}))),f=$(()=>D(j.object({id:j.string().nullish(),model:j.string().nullish(),results:j.array(j.object({index:j.number(),relevance_score:j.number()})),usage:j.object({prompt_tokens:j.number(),completion_tokens:j.number(),total_tokens:j.number()})}))),M=$(()=>D(j.object({rankFields:j.array(j.string()).optional()}))),h=class{constructor(F,G){this.specificationVersion="v3",this.modelId=F,this.config=G}get provider(){return this.config.provider}async doRerank({documents:F,headers:G,query:K,topN:V,abortSignal:W,providerOptions:Y}){var J,P;let Z=await N({provider:"togetherai",providerOptions:Y,schema:M}),{responseHeaders:X,value:B,rawValue:x}=await A({url:`${this.config.baseURL}/rerank`,headers:q(this.config.headers(),G),body:{model:this.modelId,documents:F.values,query:K,top_n:V,rank_fields:Z==null?void 0:Z.rankFields,return_documents:!1},failedResponseHandler:E({errorSchema:C,errorToMessage:(Q)=>Q.error.message}),successfulResponseHandler:H(f),abortSignal:W,fetch:this.config.fetch});return{ranking:B.results.map((Q)=>({index:Q.index,relevanceScore:Q.relevance_score})),response:{id:(J=B.id)!=null?J:void 0,modelId:(P=B.model)!=null?P:void 0,headers:X,body:x}}}},I=class{constructor(F,G){this.modelId=F,this.config=G,this.specificationVersion="v3",this.maxImagesPerCall=1}get provider(){return this.config.provider}async doGenerate({prompt:F,n:G,size:K,seed:V,providerOptions:W,headers:Y,abortSignal:J,files:P,mask:Z}){var X,B,x;let Q=[];if(Z!=null)throw Error("Together AI does not support mask-based image editing. Use FLUX Kontext models (e.g., black-forest-labs/FLUX.1-kontext-pro) with a reference image and descriptive prompt instead.");if(K!=null)Q.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support the `aspectRatio` option. Use `size` instead."});let _=(x=(B=(X=this.config._internal)==null?void 0:X.currentDate)==null?void 0:B.call(X))!=null?x:new Date,R=await N({provider:"togetherai",providerOptions:W,schema:m}),w;if(P!=null&&P.length>0){if(w=U(P[0]),P.length>1)Q.push({type:"other",message:"Together AI only supports a single input image. Additional images are ignored."})}let T=K==null?void 0:K.split("x"),{value:b,responseHeaders:z}=await A({url:`${this.config.baseURL}/images/generations`,headers:q(this.config.headers(),Y),body:{model:this.modelId,prompt:F,seed:V,...G>1?{n:G}:{},...T&&{width:parseInt(T[0]),height:parseInt(T[1])},...w!=null?{image_url:w}:{},response_format:"base64",...R!=null?R:{}},failedResponseHandler:E({errorSchema:g,errorToMessage:(L)=>L.error.message}),successfulResponseHandler:H(c),abortSignal:J,fetch:this.config.fetch});return{images:b.data.map((L)=>L.b64_json),warnings:Q,response:{timestamp:_,modelId:this.modelId,headers:z}}}},c=j.object({data:j.array(j.object({b64_json:j.string()}))}),g=j.object({error:j.object({message:j.string()})}),m=$(()=>D(j.object({steps:j.number().nullish(),guidance:j.number().nullish(),negative_prompt:j.string().nullish(),disable_safety_checker:j.boolean().nullish()}).passthrough())),p="2.0.41";function l(){if(typeof process>"u")return;if(typeof process.env.TOGETHER_API_KEY==="string")return;let F=process.env.TOGETHER_AI_API_KEY;if(typeof F==="string")console.warn("TOGETHER_AI_API_KEY is deprecated and will be removed in a future release. Please use TOGETHER_API_KEY instead.");return F}function n(F={}){var G;let K=O((G=F.baseURL)!=null?G:"https://api.together.xyz/v1/"),V=()=>{var x;return k({Authorization:`Bearer ${y({apiKey:(x=F.apiKey)!=null?x:l(),environmentVariableName:"TOGETHER_API_KEY",description:"TogetherAI"})}`,...F.headers},`ai-sdk/togetherai/${p}`)},W=(x)=>({provider:`togetherai.${x}`,url:({path:Q})=>`${K}${Q}`,headers:V,fetch:F.fetch}),Y=(x)=>{return new u(x,W("chat"))},J=(x)=>new S(x,W("completion")),P=(x)=>new v(x,W("embedding")),Z=(x)=>new I(x,{...W("image"),baseURL:K!=null?K:"https://api.together.xyz/v1/"}),X=(x)=>new h(x,{...W("reranking"),baseURL:K!=null?K:"https://api.together.xyz/v1/"}),B=(x)=>Y(x);return B.specificationVersion="v3",B.completionModel=J,B.languageModel=Y,B.chatModel=Y,B.embeddingModel=P,B.textEmbeddingModel=P,B.image=Z,B.imageModel=Z,B.reranking=X,B.rerankingModel=X,B}var xj=n();export{xj as togetherai,n as createTogetherAI,p as VERSION};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-kdcnder5.js";import"./chunk-yjj4cvqg.js";var e={"ui.sessionReview.title":"Sitzungs\xE4nderungen","ui.sessionReview.title.lastTurn":"\xC4nderungen der letzten Runde","ui.sessionReview.diffStyle.unified":"Vereinheitlicht","ui.sessionReview.diffStyle.split":"Geteilt","ui.sessionReview.openFile":"Datei \xF6ffnen","ui.sessionReview.selection.line":"Zeile {{line}}","ui.sessionReview.selection.lines":"Zeilen {{start}}-{{end}}","ui.sessionReview.expandAll":"Alle erweitern","ui.sessionReview.collapseAll":"Alle reduzieren","ui.sessionReview.change.added":"Hinzugef\xFCgt","ui.sessionReview.change.removed":"Entfernt","ui.sessionReview.change.modified":"Ge\xE4ndert","ui.sessionReview.image.loading":"Wird geladen...","ui.sessionReview.image.placeholder":"Bild","ui.sessionReview.largeDiff.title":"Diff zu gro\xDF zum Rendern","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} ge\xE4nderte Zeilen. Aktuell: {{current}} ge\xE4nderte Zeilen.","ui.sessionReview.largeDiff.renderAnyway":"Trotzdem rendern","ui.fileMedia.kind.image":"bild","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"{{kind}} entfernt","ui.fileMedia.state.loading":"{{kind}} wird geladen","ui.fileMedia.state.error":"Fehler bei {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} nicht verf\xFCgbar","ui.fileMedia.binary.title":"Bin\xE4rdatei","ui.fileMedia.binary.description.path":"{{path}} kann nicht angezeigt werden, da es sich um eine Bin\xE4rdatei handelt.","ui.fileMedia.binary.description.default":"Diese Datei kann nicht angezeigt werden, da es sich um eine Bin\xE4rdatei handelt.","ui.lineComment.label.prefix":"Kommentar zu ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Kommentiere ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Kommentar hinzuf\xFCgen","ui.lineComment.submit":"Kommentieren","ui.sessionTurn.steps.show":"Schritte anzeigen","ui.sessionTurn.steps.hide":"Schritte ausblenden","ui.sessionTurn.summary.response":"Antwort","ui.sessionTurn.diff.showMore":"Weitere \xC4nderungen anzeigen ({{count}})","ui.sessionTurn.retry.retrying":"erneuter Versuch","ui.sessionTurn.retry.inSeconds":"in {{seconds}}s","ui.sessionTurn.retry.attempt":"Versuch #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - Versuch #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini ist gerade sehr \xFCberlastet","ui.sessionTurn.error.freeUsageExceeded":"Kostenloses Nutzungslimit \xFCberschritten","ui.sessionTurn.error.addQredits":"Guthaben aufladen","ui.sessionTurn.status.delegating":"Arbeit delegieren","ui.sessionTurn.status.planning":"N\xE4chste Schritte planen","ui.sessionTurn.status.gatheringContext":"Erkunden","ui.sessionTurn.status.gatheredContext":"Erkundet","ui.sessionTurn.status.searchingCodebase":"Codebasis durchsuchen","ui.sessionTurn.status.searchingWeb":"Web durchsuchen","ui.sessionTurn.status.makingEdits":"\xC4nderungen vornehmen","ui.sessionTurn.status.runningCommands":"Befehle ausf\xFChren","ui.sessionTurn.status.thinking":"Denken","ui.sessionTurn.status.thinkingWithTopic":"Denken - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Gedanken sammeln","ui.sessionTurn.status.consideringNextSteps":"N\xE4chste Schritte erw\xE4gen","ui.messagePart.questions.dismissed":"Fragen verworfen","ui.messagePart.compaction":"Sitzung komprimiert","ui.messagePart.context.read.one":"{{count}} Lesevorgang","ui.messagePart.context.read.other":"{{count}} Lesevorg\xE4nge","ui.messagePart.context.search.one":"{{count}} Suche","ui.messagePart.context.search.other":"{{count}} Suchen","ui.messagePart.context.list.one":"{{count}} Liste","ui.messagePart.context.list.other":"{{count}} Listen","ui.messagePart.diagnostic.error":"Fehler","ui.messagePart.title.edit":"Bearbeiten","ui.messagePart.title.write":"Schreiben","ui.messagePart.option.typeOwnAnswer":"Eigene Antwort eingeben","ui.messagePart.review.title":"Antworten \xFCberpr\xFCfen","ui.list.loading":"Laden","ui.list.empty":"Keine Ergebnisse","ui.list.clearFilter":"Filter l\xF6schen","ui.list.emptyWithFilter.prefix":"Keine Ergebnisse f\xFCr","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Neue Nachricht","ui.textField.copyToClipboard":"In die Zwischenablage kopieren","ui.textField.copyLink":"Link kopieren","ui.textField.copied":"Kopiert","ui.imagePreview.alt":"Bildvorschau","ui.scrollView.ariaLabel":"scrollbarer Inhalt","ui.tool.read":"Lesen","ui.tool.loaded":"Geladen","ui.tool.list":"Auflisten","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webabruf","ui.tool.websearch":"Websuche","ui.tool.codesearch":"Codesuche","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Aufgaben","ui.tool.todos.read":"Aufgaben lesen","ui.tool.questions":"Fragen","ui.tool.agent":"{{type}} Agent","ui.tool.agent.default":"Agent","ui.common.file.one":"Datei","ui.common.file.other":"Dateien","ui.common.question.one":"Frage","ui.common.question.other":"Fragen","ui.common.add":"Hinzuf\xFCgen","ui.common.back":"Zur\xFCck","ui.common.cancel":"Abbrechen","ui.common.confirm":"Best\xE4tigen","ui.common.dismiss":"Verwerfen","ui.common.close":"Schlie\xDFen","ui.common.next":"Weiter","ui.common.submit":"Absenden","ui.permission.deny":"Verweigern","ui.permission.allowAlways":"Immer erlauben","ui.permission.allowOnce":"Einmal erlauben","ui.message.expand":"Nachricht erweitern","ui.message.collapse":"Nachricht reduzieren","ui.message.copy":"Kopieren","ui.message.copyMessage":"Nachricht kopieren","ui.message.forkMessage":"In neue Sitzung abzweigen","ui.message.revertMessage":"Auf diesen Punkt zur\xFCcksetzen","ui.message.copyResponse":"Antwort kopieren","ui.message.copied":"Kopiert!","ui.message.interrupted":"Unterbrochen","ui.message.queued":"In Warteschlange","ui.message.attachment.alt":"Anhang","ui.patch.action.deleted":"Gel\xF6scht","ui.patch.action.created":"Erstellt","ui.patch.action.moved":"Verschoben","ui.patch.action.patched":"Gepatched","ui.question.subtitle.answered":"{{count}} beantwortet","ui.question.answer.none":"(keine Antwort)","ui.question.review.notAnswered":"(nicht beantwortet)","ui.question.multiHint":"Alle zutreffenden ausw\xE4hlen","ui.question.singleHint":"Eine Antwort ausw\xE4hlen","ui.question.custom.placeholder":"Geben Sie Ihre Antwort ein...","ui.fileSearch.placeholder":"Suchen","ui.fileSearch.previousMatch":"Vorheriges Ergebnis","ui.fileSearch.nextMatch":"N\xE4chstes Ergebnis","ui.fileSearch.close":"Suche schlie\xDFen","ui.tool.task":"Aufgabe","ui.tool.skill":"F\xE4higkeit","ui.basicTool.called":"`{{tool}}` aufgerufen","ui.toolErrorCard.failed":"Fehlgeschlagen","ui.toolErrorCard.copyError":"Fehler kopieren","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
2
+ import"./chunk-kdcnder5.js";import"./chunk-aztre27e.js";var e={"ui.sessionReview.title":"Sitzungs\xE4nderungen","ui.sessionReview.title.lastTurn":"\xC4nderungen der letzten Runde","ui.sessionReview.diffStyle.unified":"Vereinheitlicht","ui.sessionReview.diffStyle.split":"Geteilt","ui.sessionReview.openFile":"Datei \xF6ffnen","ui.sessionReview.selection.line":"Zeile {{line}}","ui.sessionReview.selection.lines":"Zeilen {{start}}-{{end}}","ui.sessionReview.expandAll":"Alle erweitern","ui.sessionReview.collapseAll":"Alle reduzieren","ui.sessionReview.change.added":"Hinzugef\xFCgt","ui.sessionReview.change.removed":"Entfernt","ui.sessionReview.change.modified":"Ge\xE4ndert","ui.sessionReview.image.loading":"Wird geladen...","ui.sessionReview.image.placeholder":"Bild","ui.sessionReview.largeDiff.title":"Diff zu gro\xDF zum Rendern","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} ge\xE4nderte Zeilen. Aktuell: {{current}} ge\xE4nderte Zeilen.","ui.sessionReview.largeDiff.renderAnyway":"Trotzdem rendern","ui.fileMedia.kind.image":"bild","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"{{kind}} entfernt","ui.fileMedia.state.loading":"{{kind}} wird geladen","ui.fileMedia.state.error":"Fehler bei {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} nicht verf\xFCgbar","ui.fileMedia.binary.title":"Bin\xE4rdatei","ui.fileMedia.binary.description.path":"{{path}} kann nicht angezeigt werden, da es sich um eine Bin\xE4rdatei handelt.","ui.fileMedia.binary.description.default":"Diese Datei kann nicht angezeigt werden, da es sich um eine Bin\xE4rdatei handelt.","ui.lineComment.label.prefix":"Kommentar zu ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Kommentiere ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Kommentar hinzuf\xFCgen","ui.lineComment.submit":"Kommentieren","ui.sessionTurn.steps.show":"Schritte anzeigen","ui.sessionTurn.steps.hide":"Schritte ausblenden","ui.sessionTurn.summary.response":"Antwort","ui.sessionTurn.diff.showMore":"Weitere \xC4nderungen anzeigen ({{count}})","ui.sessionTurn.retry.retrying":"erneuter Versuch","ui.sessionTurn.retry.inSeconds":"in {{seconds}}s","ui.sessionTurn.retry.attempt":"Versuch #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - Versuch #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini ist gerade sehr \xFCberlastet","ui.sessionTurn.error.freeUsageExceeded":"Kostenloses Nutzungslimit \xFCberschritten","ui.sessionTurn.error.addQredits":"Guthaben aufladen","ui.sessionTurn.status.delegating":"Arbeit delegieren","ui.sessionTurn.status.planning":"N\xE4chste Schritte planen","ui.sessionTurn.status.gatheringContext":"Erkunden","ui.sessionTurn.status.gatheredContext":"Erkundet","ui.sessionTurn.status.searchingCodebase":"Codebasis durchsuchen","ui.sessionTurn.status.searchingWeb":"Web durchsuchen","ui.sessionTurn.status.makingEdits":"\xC4nderungen vornehmen","ui.sessionTurn.status.runningCommands":"Befehle ausf\xFChren","ui.sessionTurn.status.thinking":"Denken","ui.sessionTurn.status.thinkingWithTopic":"Denken - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Gedanken sammeln","ui.sessionTurn.status.consideringNextSteps":"N\xE4chste Schritte erw\xE4gen","ui.messagePart.questions.dismissed":"Fragen verworfen","ui.messagePart.compaction":"Sitzung komprimiert","ui.messagePart.context.read.one":"{{count}} Lesevorgang","ui.messagePart.context.read.other":"{{count}} Lesevorg\xE4nge","ui.messagePart.context.search.one":"{{count}} Suche","ui.messagePart.context.search.other":"{{count}} Suchen","ui.messagePart.context.list.one":"{{count}} Liste","ui.messagePart.context.list.other":"{{count}} Listen","ui.messagePart.diagnostic.error":"Fehler","ui.messagePart.title.edit":"Bearbeiten","ui.messagePart.title.write":"Schreiben","ui.messagePart.option.typeOwnAnswer":"Eigene Antwort eingeben","ui.messagePart.review.title":"Antworten \xFCberpr\xFCfen","ui.list.loading":"Laden","ui.list.empty":"Keine Ergebnisse","ui.list.clearFilter":"Filter l\xF6schen","ui.list.emptyWithFilter.prefix":"Keine Ergebnisse f\xFCr","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Neue Nachricht","ui.textField.copyToClipboard":"In die Zwischenablage kopieren","ui.textField.copyLink":"Link kopieren","ui.textField.copied":"Kopiert","ui.imagePreview.alt":"Bildvorschau","ui.scrollView.ariaLabel":"scrollbarer Inhalt","ui.tool.read":"Lesen","ui.tool.loaded":"Geladen","ui.tool.list":"Auflisten","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webabruf","ui.tool.websearch":"Websuche","ui.tool.codesearch":"Codesuche","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Aufgaben","ui.tool.todos.read":"Aufgaben lesen","ui.tool.questions":"Fragen","ui.tool.agent":"{{type}} Agent","ui.tool.agent.default":"Agent","ui.common.file.one":"Datei","ui.common.file.other":"Dateien","ui.common.question.one":"Frage","ui.common.question.other":"Fragen","ui.common.add":"Hinzuf\xFCgen","ui.common.back":"Zur\xFCck","ui.common.cancel":"Abbrechen","ui.common.confirm":"Best\xE4tigen","ui.common.dismiss":"Verwerfen","ui.common.close":"Schlie\xDFen","ui.common.next":"Weiter","ui.common.submit":"Absenden","ui.permission.deny":"Verweigern","ui.permission.allowAlways":"Immer erlauben","ui.permission.allowOnce":"Einmal erlauben","ui.message.expand":"Nachricht erweitern","ui.message.collapse":"Nachricht reduzieren","ui.message.copy":"Kopieren","ui.message.copyMessage":"Nachricht kopieren","ui.message.forkMessage":"In neue Sitzung abzweigen","ui.message.revertMessage":"Auf diesen Punkt zur\xFCcksetzen","ui.message.copyResponse":"Antwort kopieren","ui.message.copied":"Kopiert!","ui.message.interrupted":"Unterbrochen","ui.message.queued":"In Warteschlange","ui.message.attachment.alt":"Anhang","ui.patch.action.deleted":"Gel\xF6scht","ui.patch.action.created":"Erstellt","ui.patch.action.moved":"Verschoben","ui.patch.action.patched":"Gepatched","ui.question.subtitle.answered":"{{count}} beantwortet","ui.question.answer.none":"(keine Antwort)","ui.question.review.notAnswered":"(nicht beantwortet)","ui.question.multiHint":"Alle zutreffenden ausw\xE4hlen","ui.question.singleHint":"Eine Antwort ausw\xE4hlen","ui.question.custom.placeholder":"Geben Sie Ihre Antwort ein...","ui.fileSearch.placeholder":"Suchen","ui.fileSearch.previousMatch":"Vorheriges Ergebnis","ui.fileSearch.nextMatch":"N\xE4chstes Ergebnis","ui.fileSearch.close":"Suche schlie\xDFen","ui.tool.task":"Aufgabe","ui.tool.skill":"F\xE4higkeit","ui.basicTool.called":"`{{tool}}` aufgerufen","ui.toolErrorCard.failed":"Fehlgeschlagen","ui.toolErrorCard.copyError":"Fehler kopieren","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{le as a,me as b,ne as c,oe as d,pe as e,qe as f,re as g}from"./chunk-ab6cabxh.js";import"./chunk-j9pcnkkq.js";import"./chunk-dq9kpj4a.js";import"./chunk-cvdxgsq1.js";import"./chunk-aztre27e.js";export{g as fromEnv,c as ENV_SESSION,b as ENV_SECRET,a as ENV_KEY,d as ENV_EXPIRATION,e as ENV_CREDENTIAL_SCOPE,f as ENV_ACCOUNT_ID};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-aztre27e.js";var k="./opentui-drfwd3v7.dll";export{k as default};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-yjj4cvqg.js";var e={"ui.sessionReview.title":"\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u5909\u66F4","ui.sessionReview.title.lastTurn":"\u524D\u56DE\u30BF\u30FC\u30F3\u306E\u5909\u66F4","ui.sessionReview.diffStyle.unified":"Unified","ui.sessionReview.diffStyle.split":"Split","ui.sessionReview.openFile":"\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F","ui.sessionReview.selection.line":"{{line}} \u884C\u76EE","ui.sessionReview.selection.lines":"{{start}}-{{end}} \u884C\u76EE","ui.sessionReview.expandAll":"\u3059\u3079\u3066\u5C55\u958B","ui.sessionReview.collapseAll":"\u3059\u3079\u3066\u6298\u308A\u305F\u305F\u3080","ui.sessionReview.change.added":"\u8FFD\u52A0","ui.sessionReview.change.removed":"\u524A\u9664","ui.sessionReview.change.modified":"\u5909\u66F4","ui.sessionReview.image.loading":"\u8AAD\u307F\u8FBC\u307F\u4E2D...","ui.sessionReview.image.placeholder":"\u753B\u50CF","ui.sessionReview.largeDiff.title":"\u5DEE\u5206\u304C\u5927\u304D\u3059\u304E\u3066\u8868\u793A\u3067\u304D\u307E\u305B\u3093","ui.sessionReview.largeDiff.meta":"\u4E0A\u9650: {{limit}} \u5909\u66F4\u884C\u3002\u73FE\u5728: {{current}} \u5909\u66F4\u884C\u3002","ui.sessionReview.largeDiff.renderAnyway":"\u305D\u308C\u3067\u3082\u8868\u793A\u3059\u308B","ui.fileMedia.kind.image":"\u753B\u50CF","ui.fileMedia.kind.audio":"\u97F3\u58F0","ui.fileMedia.state.removed":"{{kind}}\u306F\u524A\u9664\u3055\u308C\u307E\u3057\u305F","ui.fileMedia.state.loading":"{{kind}}\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059...","ui.fileMedia.state.error":"{{kind}}\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F","ui.fileMedia.state.unavailable":"{{kind}}\u306F\u8868\u793A\u3067\u304D\u307E\u305B\u3093","ui.fileMedia.binary.title":"\u30D0\u30A4\u30CA\u30EA\u30D5\u30A1\u30A4\u30EB","ui.fileMedia.binary.description.path":"{{path}} \u306F\u30D0\u30A4\u30CA\u30EA\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u8868\u793A\u3067\u304D\u307E\u305B\u3093\u3002","ui.fileMedia.binary.description.default":"\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u30D0\u30A4\u30CA\u30EA\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u8868\u793A\u3067\u304D\u307E\u305B\u3093\u3002","ui.lineComment.label.prefix":"","ui.lineComment.label.suffix":"\u3078\u306E\u30B3\u30E1\u30F3\u30C8","ui.lineComment.editorLabel.prefix":"","ui.lineComment.editorLabel.suffix":"\u3078\u306E\u30B3\u30E1\u30F3\u30C8\u3092\u4F5C\u6210\u4E2D","ui.lineComment.placeholder":"\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0","ui.lineComment.submit":"\u30B3\u30E1\u30F3\u30C8","ui.sessionTurn.steps.show":"\u30B9\u30C6\u30C3\u30D7\u3092\u8868\u793A","ui.sessionTurn.steps.hide":"\u30B9\u30C6\u30C3\u30D7\u3092\u96A0\u3059","ui.sessionTurn.summary.response":"\u5FDC\u7B54","ui.sessionTurn.diff.showMore":"\u3055\u3089\u306B\u5909\u66F4\u3092\u8868\u793A ({{count}})","ui.sessionTurn.retry.retrying":"\u518D\u8A66\u884C\u4E2D","ui.sessionTurn.retry.inSeconds":"{{seconds}}\u79D2\u5F8C","ui.sessionTurn.retry.attempt":"{{attempt}}\u56DE\u76EE","ui.sessionTurn.retry.attemptLine":"{{line}} - {{attempt}}\u56DE\u76EE","ui.sessionTurn.retry.geminiHot":"gemini \u304C\u6DF7\u96D1\u3057\u3066\u3044\u307E\u3059","ui.sessionTurn.error.freeUsageExceeded":"\u7121\u6599\u4F7F\u7528\u5236\u9650\u306B\u9054\u3057\u307E\u3057\u305F","ui.sessionTurn.error.addQredits":"\u30AF\u30EC\u30B8\u30C3\u30C8\u3092\u8FFD\u52A0","ui.sessionTurn.status.delegating":"\u4F5C\u696D\u3092\u59D4\u4EFB\u4E2D","ui.sessionTurn.status.planning":"\u6B21\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u8A08\u753B\u4E2D","ui.sessionTurn.status.gatheringContext":"\u63A2\u7D22\u4E2D","ui.sessionTurn.status.gatheredContext":"\u63A2\u7D22\u6E08\u307F","ui.sessionTurn.status.searchingCodebase":"\u30B3\u30FC\u30C9\u30D9\u30FC\u30B9\u3092\u691C\u7D22\u4E2D","ui.sessionTurn.status.searchingWeb":"\u30A6\u30A7\u30D6\u3092\u691C\u7D22\u4E2D","ui.sessionTurn.status.makingEdits":"\u7DE8\u96C6\u3092\u5B9F\u884C\u4E2D","ui.sessionTurn.status.runningCommands":"\u30B3\u30DE\u30F3\u30C9\u3092\u5B9F\u884C\u4E2D","ui.sessionTurn.status.thinking":"\u601D\u8003\u4E2D","ui.sessionTurn.status.thinkingWithTopic":"\u601D\u8003\u4E2D - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u8003\u3048\u3092\u307E\u3068\u3081\u3066\u3044\u307E\u3059","ui.sessionTurn.status.consideringNextSteps":"\u6B21\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u691C\u8A0E\u4E2D","ui.messagePart.questions.dismissed":"\u8CEA\u554F\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3057\u305F","ui.messagePart.compaction":"\u30BB\u30C3\u30B7\u30E7\u30F3\u3092\u5727\u7E2E\u3057\u307E\u3057\u305F","ui.messagePart.context.read.one":"{{count}} \u4EF6\u306E\u8AAD\u307F\u53D6\u308A","ui.messagePart.context.read.other":"{{count}} \u4EF6\u306E\u8AAD\u307F\u53D6\u308A","ui.messagePart.context.search.one":"{{count}} \u4EF6\u306E\u691C\u7D22","ui.messagePart.context.search.other":"{{count}} \u4EF6\u306E\u691C\u7D22","ui.messagePart.context.list.one":"{{count}} \u4EF6\u306E\u30EA\u30B9\u30C8","ui.messagePart.context.list.other":"{{count}} \u4EF6\u306E\u30EA\u30B9\u30C8","ui.messagePart.diagnostic.error":"\u30A8\u30E9\u30FC","ui.messagePart.title.edit":"\u7DE8\u96C6","ui.messagePart.title.write":"\u4F5C\u6210","ui.messagePart.option.typeOwnAnswer":"\u81EA\u5206\u306E\u56DE\u7B54\u3092\u5165\u529B","ui.messagePart.review.title":"\u56DE\u7B54\u3092\u78BA\u8A8D","ui.list.loading":"\u8AAD\u307F\u8FBC\u307F\u4E2D","ui.list.empty":"\u7D50\u679C\u306A\u3057","ui.list.clearFilter":"\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u30AF\u30EA\u30A2","ui.list.emptyWithFilter.prefix":"\u6B21\u306E\u691C\u7D22\u7D50\u679C\u306F\u3042\u308A\u307E\u305B\u3093: ","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"\u65B0\u3057\u3044\u30E1\u30C3\u30BB\u30FC\u30B8","ui.textField.copyToClipboard":"\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC","ui.textField.copyLink":"\u30EA\u30F3\u30AF\u3092\u30B3\u30D4\u30FC","ui.textField.copied":"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F","ui.imagePreview.alt":"\u753B\u50CF\u30D7\u30EC\u30D3\u30E5\u30FC","ui.scrollView.ariaLabel":"\u30B9\u30AF\u30ED\u30FC\u30EB\u53EF\u80FD\u306A\u30B3\u30F3\u30C6\u30F3\u30C4","ui.tool.read":"\u8AAD\u307F\u8FBC\u307F","ui.tool.loaded":"\u8AAD\u307F\u8FBC\u307F\u6E08\u307F","ui.tool.list":"\u30EA\u30B9\u30C8","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Web\u691C\u7D22","ui.tool.codesearch":"\u30B3\u30FC\u30C9\u691C\u7D22","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Todo","ui.tool.todos.read":"Todo\u8AAD\u307F\u8FBC\u307F","ui.tool.questions":"\u8CEA\u554F","ui.tool.agent":"{{type}}\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8","ui.tool.agent.default":"\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8","ui.common.file.one":"\u30D5\u30A1\u30A4\u30EB","ui.common.file.other":"\u30D5\u30A1\u30A4\u30EB","ui.common.question.one":"\u8CEA\u554F","ui.common.question.other":"\u8CEA\u554F","ui.common.add":"\u8FFD\u52A0","ui.common.back":"\u623B\u308B","ui.common.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB","ui.common.confirm":"\u78BA\u8A8D","ui.common.dismiss":"\u9589\u3058\u308B","ui.common.close":"\u9589\u3058\u308B","ui.common.next":"\u6B21\u3078","ui.common.submit":"\u9001\u4FE1","ui.permission.deny":"\u62D2\u5426","ui.permission.allowAlways":"\u5E38\u306B\u8A31\u53EF","ui.permission.allowOnce":"\u4ECA\u56DE\u306E\u307F\u8A31\u53EF","ui.message.expand":"\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u5C55\u958B","ui.message.collapse":"\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u6298\u308A\u305F\u305F\u3080","ui.message.copy":"\u30B3\u30D4\u30FC","ui.message.copyMessage":"\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30B3\u30D4\u30FC","ui.message.forkMessage":"\u65B0\u3057\u3044\u30BB\u30C3\u30B7\u30E7\u30F3\u306B\u30D5\u30A9\u30FC\u30AF","ui.message.revertMessage":"\u3053\u306E\u6642\u70B9\u307E\u3067\u30EA\u30BB\u30C3\u30C8","ui.message.copyResponse":"\u5FDC\u7B54\u3092\u30B3\u30D4\u30FC","ui.message.copied":"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F\uFF01","ui.message.interrupted":"\u4E2D\u65AD","ui.message.queued":"\u5F85\u6A5F\u4E2D","ui.message.attachment.alt":"\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB","ui.patch.action.deleted":"\u524A\u9664\u6E08\u307F","ui.patch.action.created":"\u4F5C\u6210\u6E08\u307F","ui.patch.action.moved":"\u79FB\u52D5\u6E08\u307F","ui.patch.action.patched":"\u30D1\u30C3\u30C1\u9069\u7528\u6E08\u307F","ui.question.subtitle.answered":"{{count}}\u4EF6\u56DE\u7B54\u6E08\u307F","ui.question.answer.none":"(\u56DE\u7B54\u306A\u3057)","ui.question.review.notAnswered":"(\u672A\u56DE\u7B54)","ui.question.multiHint":"\u8A72\u5F53\u3059\u308B\u3082\u306E\u3092\u3059\u3079\u3066\u9078\u629E","ui.question.singleHint":"1 \u3064\u9078\u629E","ui.question.custom.placeholder":"\u56DE\u7B54\u3092\u5165\u529B...","ui.fileSearch.placeholder":"\u691C\u7D22","ui.fileSearch.previousMatch":"\u524D\u306E\u4E00\u81F4","ui.fileSearch.nextMatch":"\u6B21\u306E\u4E00\u81F4","ui.fileSearch.close":"\u691C\u7D22\u3092\u9589\u3058\u308B","ui.tool.task":"\u30BF\u30B9\u30AF","ui.tool.skill":"\u30B9\u30AD\u30EB","ui.basicTool.called":"`{{tool}}` \u3092\u547C\u3073\u51FA\u3057\u307E\u3057\u305F","ui.toolErrorCard.failed":"\u5931\u6557","ui.toolErrorCard.copyError":"\u30A8\u30E9\u30FC\u3092\u30B3\u30D4\u30FC","ui.message.duration.seconds":"{{count}}\u79D2","ui.message.duration.minutesSeconds":"{{minutes}}\u5206 {{seconds}}\u79D2"};export{e as dict};
2
+ import"./chunk-aztre27e.js";var e={"ui.sessionReview.title":"\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u5909\u66F4","ui.sessionReview.title.lastTurn":"\u524D\u56DE\u30BF\u30FC\u30F3\u306E\u5909\u66F4","ui.sessionReview.diffStyle.unified":"Unified","ui.sessionReview.diffStyle.split":"Split","ui.sessionReview.openFile":"\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F","ui.sessionReview.selection.line":"{{line}} \u884C\u76EE","ui.sessionReview.selection.lines":"{{start}}-{{end}} \u884C\u76EE","ui.sessionReview.expandAll":"\u3059\u3079\u3066\u5C55\u958B","ui.sessionReview.collapseAll":"\u3059\u3079\u3066\u6298\u308A\u305F\u305F\u3080","ui.sessionReview.change.added":"\u8FFD\u52A0","ui.sessionReview.change.removed":"\u524A\u9664","ui.sessionReview.change.modified":"\u5909\u66F4","ui.sessionReview.image.loading":"\u8AAD\u307F\u8FBC\u307F\u4E2D...","ui.sessionReview.image.placeholder":"\u753B\u50CF","ui.sessionReview.largeDiff.title":"\u5DEE\u5206\u304C\u5927\u304D\u3059\u304E\u3066\u8868\u793A\u3067\u304D\u307E\u305B\u3093","ui.sessionReview.largeDiff.meta":"\u4E0A\u9650: {{limit}} \u5909\u66F4\u884C\u3002\u73FE\u5728: {{current}} \u5909\u66F4\u884C\u3002","ui.sessionReview.largeDiff.renderAnyway":"\u305D\u308C\u3067\u3082\u8868\u793A\u3059\u308B","ui.fileMedia.kind.image":"\u753B\u50CF","ui.fileMedia.kind.audio":"\u97F3\u58F0","ui.fileMedia.state.removed":"{{kind}}\u306F\u524A\u9664\u3055\u308C\u307E\u3057\u305F","ui.fileMedia.state.loading":"{{kind}}\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059...","ui.fileMedia.state.error":"{{kind}}\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F","ui.fileMedia.state.unavailable":"{{kind}}\u306F\u8868\u793A\u3067\u304D\u307E\u305B\u3093","ui.fileMedia.binary.title":"\u30D0\u30A4\u30CA\u30EA\u30D5\u30A1\u30A4\u30EB","ui.fileMedia.binary.description.path":"{{path}} \u306F\u30D0\u30A4\u30CA\u30EA\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u8868\u793A\u3067\u304D\u307E\u305B\u3093\u3002","ui.fileMedia.binary.description.default":"\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u30D0\u30A4\u30CA\u30EA\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u8868\u793A\u3067\u304D\u307E\u305B\u3093\u3002","ui.lineComment.label.prefix":"","ui.lineComment.label.suffix":"\u3078\u306E\u30B3\u30E1\u30F3\u30C8","ui.lineComment.editorLabel.prefix":"","ui.lineComment.editorLabel.suffix":"\u3078\u306E\u30B3\u30E1\u30F3\u30C8\u3092\u4F5C\u6210\u4E2D","ui.lineComment.placeholder":"\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0","ui.lineComment.submit":"\u30B3\u30E1\u30F3\u30C8","ui.sessionTurn.steps.show":"\u30B9\u30C6\u30C3\u30D7\u3092\u8868\u793A","ui.sessionTurn.steps.hide":"\u30B9\u30C6\u30C3\u30D7\u3092\u96A0\u3059","ui.sessionTurn.summary.response":"\u5FDC\u7B54","ui.sessionTurn.diff.showMore":"\u3055\u3089\u306B\u5909\u66F4\u3092\u8868\u793A ({{count}})","ui.sessionTurn.retry.retrying":"\u518D\u8A66\u884C\u4E2D","ui.sessionTurn.retry.inSeconds":"{{seconds}}\u79D2\u5F8C","ui.sessionTurn.retry.attempt":"{{attempt}}\u56DE\u76EE","ui.sessionTurn.retry.attemptLine":"{{line}} - {{attempt}}\u56DE\u76EE","ui.sessionTurn.retry.geminiHot":"gemini \u304C\u6DF7\u96D1\u3057\u3066\u3044\u307E\u3059","ui.sessionTurn.error.freeUsageExceeded":"\u7121\u6599\u4F7F\u7528\u5236\u9650\u306B\u9054\u3057\u307E\u3057\u305F","ui.sessionTurn.error.addQredits":"\u30AF\u30EC\u30B8\u30C3\u30C8\u3092\u8FFD\u52A0","ui.sessionTurn.status.delegating":"\u4F5C\u696D\u3092\u59D4\u4EFB\u4E2D","ui.sessionTurn.status.planning":"\u6B21\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u8A08\u753B\u4E2D","ui.sessionTurn.status.gatheringContext":"\u63A2\u7D22\u4E2D","ui.sessionTurn.status.gatheredContext":"\u63A2\u7D22\u6E08\u307F","ui.sessionTurn.status.searchingCodebase":"\u30B3\u30FC\u30C9\u30D9\u30FC\u30B9\u3092\u691C\u7D22\u4E2D","ui.sessionTurn.status.searchingWeb":"\u30A6\u30A7\u30D6\u3092\u691C\u7D22\u4E2D","ui.sessionTurn.status.makingEdits":"\u7DE8\u96C6\u3092\u5B9F\u884C\u4E2D","ui.sessionTurn.status.runningCommands":"\u30B3\u30DE\u30F3\u30C9\u3092\u5B9F\u884C\u4E2D","ui.sessionTurn.status.thinking":"\u601D\u8003\u4E2D","ui.sessionTurn.status.thinkingWithTopic":"\u601D\u8003\u4E2D - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u8003\u3048\u3092\u307E\u3068\u3081\u3066\u3044\u307E\u3059","ui.sessionTurn.status.consideringNextSteps":"\u6B21\u306E\u30B9\u30C6\u30C3\u30D7\u3092\u691C\u8A0E\u4E2D","ui.messagePart.questions.dismissed":"\u8CEA\u554F\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3057\u305F","ui.messagePart.compaction":"\u30BB\u30C3\u30B7\u30E7\u30F3\u3092\u5727\u7E2E\u3057\u307E\u3057\u305F","ui.messagePart.context.read.one":"{{count}} \u4EF6\u306E\u8AAD\u307F\u53D6\u308A","ui.messagePart.context.read.other":"{{count}} \u4EF6\u306E\u8AAD\u307F\u53D6\u308A","ui.messagePart.context.search.one":"{{count}} \u4EF6\u306E\u691C\u7D22","ui.messagePart.context.search.other":"{{count}} \u4EF6\u306E\u691C\u7D22","ui.messagePart.context.list.one":"{{count}} \u4EF6\u306E\u30EA\u30B9\u30C8","ui.messagePart.context.list.other":"{{count}} \u4EF6\u306E\u30EA\u30B9\u30C8","ui.messagePart.diagnostic.error":"\u30A8\u30E9\u30FC","ui.messagePart.title.edit":"\u7DE8\u96C6","ui.messagePart.title.write":"\u4F5C\u6210","ui.messagePart.option.typeOwnAnswer":"\u81EA\u5206\u306E\u56DE\u7B54\u3092\u5165\u529B","ui.messagePart.review.title":"\u56DE\u7B54\u3092\u78BA\u8A8D","ui.list.loading":"\u8AAD\u307F\u8FBC\u307F\u4E2D","ui.list.empty":"\u7D50\u679C\u306A\u3057","ui.list.clearFilter":"\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u30AF\u30EA\u30A2","ui.list.emptyWithFilter.prefix":"\u6B21\u306E\u691C\u7D22\u7D50\u679C\u306F\u3042\u308A\u307E\u305B\u3093: ","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"\u65B0\u3057\u3044\u30E1\u30C3\u30BB\u30FC\u30B8","ui.textField.copyToClipboard":"\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC","ui.textField.copyLink":"\u30EA\u30F3\u30AF\u3092\u30B3\u30D4\u30FC","ui.textField.copied":"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F","ui.imagePreview.alt":"\u753B\u50CF\u30D7\u30EC\u30D3\u30E5\u30FC","ui.scrollView.ariaLabel":"\u30B9\u30AF\u30ED\u30FC\u30EB\u53EF\u80FD\u306A\u30B3\u30F3\u30C6\u30F3\u30C4","ui.tool.read":"\u8AAD\u307F\u8FBC\u307F","ui.tool.loaded":"\u8AAD\u307F\u8FBC\u307F\u6E08\u307F","ui.tool.list":"\u30EA\u30B9\u30C8","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Web\u691C\u7D22","ui.tool.codesearch":"\u30B3\u30FC\u30C9\u691C\u7D22","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Todo","ui.tool.todos.read":"Todo\u8AAD\u307F\u8FBC\u307F","ui.tool.questions":"\u8CEA\u554F","ui.tool.agent":"{{type}}\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8","ui.tool.agent.default":"\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8","ui.common.file.one":"\u30D5\u30A1\u30A4\u30EB","ui.common.file.other":"\u30D5\u30A1\u30A4\u30EB","ui.common.question.one":"\u8CEA\u554F","ui.common.question.other":"\u8CEA\u554F","ui.common.add":"\u8FFD\u52A0","ui.common.back":"\u623B\u308B","ui.common.cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB","ui.common.confirm":"\u78BA\u8A8D","ui.common.dismiss":"\u9589\u3058\u308B","ui.common.close":"\u9589\u3058\u308B","ui.common.next":"\u6B21\u3078","ui.common.submit":"\u9001\u4FE1","ui.permission.deny":"\u62D2\u5426","ui.permission.allowAlways":"\u5E38\u306B\u8A31\u53EF","ui.permission.allowOnce":"\u4ECA\u56DE\u306E\u307F\u8A31\u53EF","ui.message.expand":"\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u5C55\u958B","ui.message.collapse":"\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u6298\u308A\u305F\u305F\u3080","ui.message.copy":"\u30B3\u30D4\u30FC","ui.message.copyMessage":"\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30B3\u30D4\u30FC","ui.message.forkMessage":"\u65B0\u3057\u3044\u30BB\u30C3\u30B7\u30E7\u30F3\u306B\u30D5\u30A9\u30FC\u30AF","ui.message.revertMessage":"\u3053\u306E\u6642\u70B9\u307E\u3067\u30EA\u30BB\u30C3\u30C8","ui.message.copyResponse":"\u5FDC\u7B54\u3092\u30B3\u30D4\u30FC","ui.message.copied":"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F\uFF01","ui.message.interrupted":"\u4E2D\u65AD","ui.message.queued":"\u5F85\u6A5F\u4E2D","ui.message.attachment.alt":"\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB","ui.patch.action.deleted":"\u524A\u9664\u6E08\u307F","ui.patch.action.created":"\u4F5C\u6210\u6E08\u307F","ui.patch.action.moved":"\u79FB\u52D5\u6E08\u307F","ui.patch.action.patched":"\u30D1\u30C3\u30C1\u9069\u7528\u6E08\u307F","ui.question.subtitle.answered":"{{count}}\u4EF6\u56DE\u7B54\u6E08\u307F","ui.question.answer.none":"(\u56DE\u7B54\u306A\u3057)","ui.question.review.notAnswered":"(\u672A\u56DE\u7B54)","ui.question.multiHint":"\u8A72\u5F53\u3059\u308B\u3082\u306E\u3092\u3059\u3079\u3066\u9078\u629E","ui.question.singleHint":"1 \u3064\u9078\u629E","ui.question.custom.placeholder":"\u56DE\u7B54\u3092\u5165\u529B...","ui.fileSearch.placeholder":"\u691C\u7D22","ui.fileSearch.previousMatch":"\u524D\u306E\u4E00\u81F4","ui.fileSearch.nextMatch":"\u6B21\u306E\u4E00\u81F4","ui.fileSearch.close":"\u691C\u7D22\u3092\u9589\u3058\u308B","ui.tool.task":"\u30BF\u30B9\u30AF","ui.tool.skill":"\u30B9\u30AD\u30EB","ui.basicTool.called":"`{{tool}}` \u3092\u547C\u3073\u51FA\u3057\u307E\u3057\u305F","ui.toolErrorCard.failed":"\u5931\u6557","ui.toolErrorCard.copyError":"\u30A8\u30E9\u30FC\u3092\u30B3\u30D4\u30FC","ui.message.duration.seconds":"{{count}}\u79D2","ui.message.duration.minutesSeconds":"{{minutes}}\u5206 {{seconds}}\u79D2"};export{e as dict};