@qitqode/qitqode-android-arm64 0.1.30 → 0.1.32

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 (417) hide show
  1. package/bundle/{chunk-37n34pzd.js → chunk-01my2y0c.js} +1 -1
  2. package/bundle/{chunk-ejjea8hh.js → chunk-02jtpxe0.js} +1 -1
  3. package/bundle/{chunk-6qy1ghrx.js → chunk-05mce0j3.js} +1 -1
  4. package/bundle/chunk-096pd6c4.js +2 -0
  5. package/bundle/{chunk-g1dwbvkg.js → chunk-0bbs01f0.js} +1 -1
  6. package/bundle/chunk-0c2p3a6v.js +2 -0
  7. package/bundle/chunk-0c5rxty9.js +2 -0
  8. package/bundle/{chunk-j6emx6jn.js → chunk-0dt0bxz6.js} +2 -2
  9. package/bundle/chunk-0e86gt9r.js +2 -0
  10. package/bundle/{chunk-mskwkcgj.js → chunk-0mx2psfc.js} +1 -1
  11. package/bundle/chunk-0p27fvfr.js +2 -0
  12. package/bundle/chunk-0qs1vx97.js +2 -0
  13. package/bundle/{chunk-f45tp3e3.js → chunk-0v0vqbn5.js} +1 -1
  14. package/bundle/{chunk-be216spx.js → chunk-10bjs581.js} +2 -2
  15. package/bundle/{chunk-bss414qz.js → chunk-12vef2pr.js} +1 -1
  16. package/bundle/{chunk-jm1ptn8n.js → chunk-15hw2z9t.js} +1 -1
  17. package/bundle/chunk-15j5cn4t.js +2 -0
  18. package/bundle/{chunk-srh4xvsj.js → chunk-1gx18dm5.js} +1 -1
  19. package/bundle/chunk-1r95p0tp.js +2 -0
  20. package/bundle/chunk-1rhhhm88.js +2 -0
  21. package/bundle/{chunk-b0syck9r.js → chunk-1sgahe1s.js} +1 -1
  22. package/bundle/{chunk-26nfphsg.js → chunk-1vb79bw1.js} +1 -1
  23. package/bundle/chunk-1wbjh23g.js +2 -0
  24. package/bundle/chunk-20702epe.js +2 -0
  25. package/bundle/{chunk-371r2111.js → chunk-24jg9d61.js} +1 -1
  26. package/bundle/chunk-257me4z3.js +800 -0
  27. package/bundle/{chunk-1sgby720.js → chunk-2hc5z7b5.js} +1 -1
  28. package/bundle/{chunk-yq3m8190.js → chunk-2maqde7w.js} +2 -2
  29. package/bundle/{chunk-mrw279k3.js → chunk-2phz0bn9.js} +1 -1
  30. package/bundle/{chunk-b8tw709r.js → chunk-2vn41ecx.js} +1 -1
  31. package/bundle/chunk-2wajs9xv.js +2 -0
  32. package/bundle/{chunk-w87a3mzm.js → chunk-2zq4k837.js} +1 -1
  33. package/bundle/{chunk-1bhvt33f.js → chunk-31qrzrwy.js} +1 -1
  34. package/bundle/{chunk-d5bxan80.js → chunk-326p5b10.js} +2 -2
  35. package/bundle/{chunk-0df4kede.js → chunk-33e9y2aw.js} +1 -1
  36. package/bundle/{chunk-zcm2jdr5.js → chunk-35xk4g91.js} +1 -1
  37. package/bundle/{chunk-5fz8tph5.js → chunk-3632wgg1.js} +1 -1
  38. package/bundle/{chunk-1ngtxja9.js → chunk-3bxg5bta.js} +1 -1
  39. package/bundle/{chunk-mgk9sh16.js → chunk-3c6p8tm3.js} +1 -1
  40. package/bundle/{chunk-fqw4y7x0.js → chunk-3nx7112w.js} +2 -2
  41. package/bundle/{chunk-n26yf3he.js → chunk-3wetyrjs.js} +1 -1
  42. package/bundle/{chunk-2jmxt3fb.js → chunk-40efytmk.js} +1 -1
  43. package/bundle/chunk-42p59wm4.js +2 -0
  44. package/bundle/chunk-4512pvca.js +2 -0
  45. package/bundle/chunk-456bmaww.js +2 -0
  46. package/bundle/{chunk-c5e6sk9c.js → chunk-48ge2ryx.js} +1 -1
  47. package/bundle/chunk-48pajrnt.js +2 -0
  48. package/bundle/{chunk-12bssxd4.js → chunk-4cnwn1rh.js} +2 -2
  49. package/bundle/chunk-4fy9c54h.js +2 -0
  50. package/bundle/{chunk-4tbwha3m.js → chunk-4jtxtkj7.js} +2 -2
  51. package/bundle/chunk-4sc82a27.js +2 -0
  52. package/bundle/chunk-52bam8g7.js +2 -0
  53. package/bundle/{chunk-6fp8a9ek.js → chunk-53bqcctj.js} +1 -1
  54. package/bundle/{chunk-hwbyqezq.js → chunk-56z7x7h4.js} +2 -2
  55. package/bundle/chunk-59y8q9m5.js +2 -0
  56. package/bundle/chunk-59yqvk48.js +3 -0
  57. package/bundle/{chunk-a1pw9r6f.js → chunk-5hw6xa49.js} +2 -2
  58. package/bundle/{chunk-8qkhddq3.js → chunk-5jx0yadh.js} +2 -2
  59. package/bundle/chunk-5pb551dx.js +2 -0
  60. package/bundle/{chunk-qrey2gwb.js → chunk-5q4harvc.js} +2 -2
  61. package/bundle/chunk-5tray1fw.js +3 -0
  62. package/bundle/{chunk-my6sz5d6.js → chunk-60v5jvgt.js} +1 -1
  63. package/bundle/chunk-634pnryq.js +2 -0
  64. package/bundle/chunk-64ezpbwt.js +2 -0
  65. package/bundle/{chunk-5fgx6fa4.js → chunk-69nzndk7.js} +1 -1
  66. package/bundle/{chunk-k8ss3135.js → chunk-6aqyhfag.js} +218 -218
  67. package/bundle/{chunk-chmrvbbj.js → chunk-6d5rrre9.js} +1 -1
  68. package/bundle/{chunk-g3dhsmbt.js → chunk-6hpgb8h4.js} +3 -3
  69. package/bundle/{chunk-drs1gv2b.js → chunk-6kp07m7p.js} +1 -1
  70. package/bundle/{chunk-wy46mbwt.js → chunk-6phh70sp.js} +1 -1
  71. package/bundle/{chunk-v2zp22r3.js → chunk-70ck4v3t.js} +1 -1
  72. package/bundle/{chunk-2tnarng3.js → chunk-71sjjjr8.js} +1 -1
  73. package/bundle/{chunk-ds69qc8b.js → chunk-71xz70r9.js} +1 -1
  74. package/bundle/{chunk-2dzk5txw.js → chunk-73e409hd.js} +1 -1
  75. package/bundle/chunk-764fksh3.js +2 -0
  76. package/bundle/{chunk-g7rjtehn.js → chunk-78ymd20x.js} +1 -1
  77. package/bundle/{chunk-szr0f7k2.js → chunk-7avcnwv8.js} +1 -1
  78. package/bundle/{chunk-z8v2tsz2.js → chunk-7hm0c2yg.js} +1 -1
  79. package/bundle/chunk-7mke41x0.js +2 -0
  80. package/bundle/chunk-7ry9cvby.js +2 -0
  81. package/bundle/chunk-7tr9ejyk.js +7 -0
  82. package/bundle/chunk-7wczs9mx.js +2 -0
  83. package/bundle/{chunk-aztre27e.js → chunk-7xm75w1e.js} +1 -1
  84. package/bundle/{chunk-s3yna2wm.js → chunk-7z5jh4ra.js} +1 -1
  85. package/bundle/chunk-7z777y9k.js +2 -0
  86. package/bundle/{chunk-vj62pc0h.js → chunk-81qwdg5s.js} +1 -1
  87. package/bundle/chunk-85wcc1tp.js +3 -0
  88. package/bundle/chunk-89w3yhf8.js +2 -0
  89. package/bundle/chunk-8dwq41q1.js +28 -0
  90. package/bundle/{chunk-6hv59ere.js → chunk-8hytwgwf.js} +1 -1
  91. package/bundle/{chunk-wz0zcddf.js → chunk-8n20thvd.js} +2 -2
  92. package/bundle/{chunk-s07j8hfy.js → chunk-8qswepp2.js} +1 -1
  93. package/bundle/{chunk-bpbptx89.js → chunk-8r6ht39z.js} +1 -1
  94. package/bundle/chunk-8v96pmqn.js +2 -0
  95. package/bundle/chunk-8y2scz6z.js +2 -0
  96. package/bundle/chunk-8zx7vnx6.js +2 -0
  97. package/bundle/{chunk-qhc90p4a.js → chunk-93p131d5.js} +1 -1
  98. package/bundle/chunk-94a76f8w.js +2 -0
  99. package/bundle/{chunk-ppfjf7qx.js → chunk-9emq67vc.js} +1 -1
  100. package/bundle/{chunk-bvkq0a5q.js → chunk-9f1z9xce.js} +1 -1
  101. package/bundle/{chunk-dcvatax2.js → chunk-9gazyynx.js} +2 -2
  102. package/bundle/chunk-9ng7jjp7.js +2 -0
  103. package/bundle/chunk-9tpgnjy8.js +2 -0
  104. package/bundle/{chunk-mk6cddvd.js → chunk-a1wdeapb.js} +1 -1
  105. package/bundle/{chunk-qjn86fc0.js → chunk-a7amey9s.js} +1 -1
  106. package/bundle/chunk-a7ym9f0v.js +2 -0
  107. package/bundle/chunk-a8f2xvy3.js +2 -0
  108. package/bundle/chunk-a99cvwta.js +2 -0
  109. package/bundle/{chunk-42f7p0hq.js → chunk-ad72gb5f.js} +2 -2
  110. package/bundle/{chunk-89v6dgpp.js → chunk-ag8kz1e7.js} +2 -2
  111. package/bundle/{chunk-zv6pjtz1.js → chunk-avf8v3hb.js} +1 -1
  112. package/bundle/chunk-avys5mnz.js +2 -0
  113. package/bundle/chunk-axvjd10y.js +2 -0
  114. package/bundle/{chunk-m612agnk.js → chunk-ay8emwym.js} +1 -1
  115. package/bundle/chunk-b4pphqab.js +2 -0
  116. package/bundle/chunk-b6087ak4.js +2 -0
  117. package/bundle/{chunk-msegx0t7.js → chunk-b8gjz6bk.js} +1 -1
  118. package/bundle/{chunk-gf0pdgjs.js → chunk-bh53dz71.js} +1 -1
  119. package/bundle/chunk-bn0h9dny.js +10 -0
  120. package/bundle/chunk-brkqxbjy.js +2 -0
  121. package/bundle/{chunk-09kba1hg.js → chunk-c11d28qn.js} +2 -2
  122. package/bundle/chunk-c26qxt5g.js +2 -0
  123. package/bundle/chunk-c6zscb38.js +2 -0
  124. package/bundle/{chunk-ddnpx1yx.js → chunk-caj1b9y7.js} +5 -5
  125. package/bundle/{chunk-pekm54ce.js → chunk-cfgvm15x.js} +1 -1
  126. package/bundle/{chunk-v4xcysh0.js → chunk-chpr8ekb.js} +1 -1
  127. package/bundle/chunk-cjww2jmv.js +3 -0
  128. package/bundle/{chunk-m67tcnk4.js → chunk-ck2gfaba.js} +1 -1
  129. package/bundle/{chunk-9j1qqdr2.js → chunk-cphrgyp6.js} +1 -1
  130. package/bundle/{chunk-eb9mytjq.js → chunk-ctaze2hn.js} +1 -1
  131. package/bundle/{chunk-5qam3c8r.js → chunk-cxnfy6qk.js} +1 -1
  132. package/bundle/{chunk-cafzcmrg.js → chunk-d07p6fpk.js} +2 -2
  133. package/bundle/chunk-d0damw6y.js +2 -0
  134. package/bundle/{chunk-b8bytvka.js → chunk-d3ermm6d.js} +2 -2
  135. package/bundle/{chunk-4qqkqrn9.js → chunk-d6ry9418.js} +2 -2
  136. package/bundle/{chunk-sn4nez18.js → chunk-d9hbhkbq.js} +2 -2
  137. package/bundle/{chunk-ztc3gm8y.js → chunk-dactgryw.js} +1 -1
  138. package/bundle/chunk-dafmkrhn.js +2 -0
  139. package/bundle/{chunk-dfnv7vkn.js → chunk-db405hjg.js} +1 -1
  140. package/bundle/chunk-dgprdym0.js +2 -0
  141. package/bundle/{chunk-7yrhe3xq.js → chunk-dnwefyhv.js} +1 -1
  142. package/bundle/chunk-dryzt12j.js +2 -0
  143. package/bundle/chunk-dsamees2.js +2 -0
  144. package/bundle/{chunk-xpc2zgj7.js → chunk-dxpj0cxh.js} +2 -2
  145. package/bundle/{chunk-yjtdgcq5.js → chunk-dynv30gm.js} +1 -1
  146. package/bundle/chunk-dyqpxx3b.js +2 -0
  147. package/bundle/{chunk-2rs39vj2.js → chunk-e01wnqvc.js} +1 -1
  148. package/bundle/{chunk-2vepzgek.js → chunk-e10py6yr.js} +1 -1
  149. package/bundle/chunk-e5mv5wnt.js +2 -0
  150. package/bundle/{chunk-qv2s39dv.js → chunk-e7ny0b3x.js} +1 -1
  151. package/bundle/{chunk-n8h6x2en.js → chunk-ejrhvy38.js} +1 -1
  152. package/bundle/{chunk-dq9kpj4a.js → chunk-enpzvmtc.js} +1 -1
  153. package/bundle/chunk-ew9pdrp9.js +3 -0
  154. package/bundle/{chunk-gj3hzx3d.js → chunk-ezfy0b6q.js} +2 -2
  155. package/bundle/{chunk-2km50rd3.js → chunk-fgg9txzb.js} +1 -1
  156. package/bundle/{chunk-b9za12y1.js → chunk-fn9h4ync.js} +1 -1
  157. package/bundle/{chunk-ngchsw2g.js → chunk-fvzwbjh8.js} +1 -1
  158. package/bundle/{chunk-nzehfpxp.js → chunk-g10d6x57.js} +1 -1
  159. package/bundle/{chunk-zyhdxggp.js → chunk-g5rabwre.js} +2 -2
  160. package/bundle/{chunk-kfsb2stm.js → chunk-g7ccdh7r.js} +1 -1
  161. package/bundle/{chunk-phxrg7aw.js → chunk-gagtmjmp.js} +2 -2
  162. package/bundle/{chunk-yp0a8q29.js → chunk-gb00fh4z.js} +3 -3
  163. package/bundle/{chunk-hw1dmx28.js → chunk-gbpvs0fx.js} +1 -1
  164. package/bundle/{chunk-j8efst22.js → chunk-gj0wt0cy.js} +1 -1
  165. package/bundle/{chunk-2q96x1t5.js → chunk-gsar6xda.js} +1 -1
  166. package/bundle/{chunk-xs3xtz6x.js → chunk-gt31468k.js} +1 -1
  167. package/bundle/{chunk-ecn8gbtz.js → chunk-gwp17r03.js} +1 -1
  168. package/bundle/chunk-gwzw92jt.js +2 -0
  169. package/bundle/chunk-gz8sz7z1.js +9 -0
  170. package/bundle/{chunk-2bn4b42t.js → chunk-h2afsbm1.js} +1 -1
  171. package/bundle/{chunk-tj78jsp9.js → chunk-h4j5xzc8.js} +1 -1
  172. package/bundle/chunk-h6f3kbz2.js +2 -0
  173. package/bundle/{chunk-b3dqcbsc.js → chunk-hbbsbyyq.js} +1 -1
  174. package/bundle/{chunk-2gerf08b.js → chunk-hnvn2c25.js} +2 -2
  175. package/bundle/{chunk-vn7nkrqb.js → chunk-hnzegjgv.js} +1 -1
  176. package/bundle/chunk-hp7tssgv.js +2 -0
  177. package/bundle/chunk-ht0hbdmx.js +2 -0
  178. package/bundle/{chunk-j9pcnkkq.js → chunk-ht5w06x7.js} +2 -2
  179. package/bundle/{chunk-a1p2f16h.js → chunk-htz93dsd.js} +2 -2
  180. package/bundle/{chunk-q6ztpfcs.js → chunk-jbx3s7nw.js} +2 -2
  181. package/bundle/{chunk-hxz2rdjq.js → chunk-jdynx7m6.js} +1 -1
  182. package/bundle/{chunk-h9pvnp5c.js → chunk-jef04wyf.js} +1 -1
  183. package/bundle/{chunk-ct48575c.js → chunk-jh0bw59r.js} +1 -1
  184. package/bundle/{chunk-knpt9n8f.js → chunk-jrqb0jwy.js} +1 -1
  185. package/bundle/{chunk-1dwcga8g.js → chunk-js1n8tgv.js} +1 -1
  186. package/bundle/chunk-k1txw65h.js +2 -0
  187. package/bundle/chunk-k5atbdbm.js +2 -0
  188. package/bundle/chunk-k75jqg60.js +3 -0
  189. package/bundle/{chunk-yn6sbycg.js → chunk-k7aenxan.js} +2 -2
  190. package/bundle/{chunk-1rp1cvmc.js → chunk-kf167jw7.js} +1 -1
  191. package/bundle/{chunk-wsy0m70r.js → chunk-kfxv5rfg.js} +1 -1
  192. package/bundle/{chunk-btz9jvec.js → chunk-kj20f048.js} +1 -1
  193. package/bundle/{chunk-j5kb0y1m.js → chunk-kq6b222y.js} +1 -1
  194. package/bundle/{chunk-1t9jne14.js → chunk-ktzq4ha1.js} +1 -1
  195. package/bundle/{chunk-5v4py9p2.js → chunk-m2q317gh.js} +1 -1
  196. package/bundle/chunk-mahgmbt9.js +2 -0
  197. package/bundle/{chunk-1qshjfzm.js → chunk-mk1bfzg5.js} +1 -1
  198. package/bundle/{chunk-2y90ad1v.js → chunk-mqd1jsg2.js} +1 -1
  199. package/bundle/{chunk-t12xrrfr.js → chunk-mzs2pjyc.js} +2 -2
  200. package/bundle/{chunk-m02zt1a3.js → chunk-n9xns8by.js} +2 -2
  201. package/bundle/chunk-ngm6pqyt.js +2 -0
  202. package/bundle/chunk-ngtavamt.js +2 -0
  203. package/bundle/chunk-nkhc32s3.js +2 -0
  204. package/bundle/{chunk-wpajh5s5.js → chunk-nkkch4h7.js} +1 -1
  205. package/bundle/chunk-npse2xrd.js +2 -0
  206. package/bundle/{chunk-k7gq9bra.js → chunk-nv3eyyaj.js} +1 -1
  207. package/bundle/{chunk-ab6cabxh.js → chunk-p18axz0m.js} +1 -1
  208. package/bundle/{chunk-jje0srjq.js → chunk-p62gb4wj.js} +1 -1
  209. package/bundle/chunk-p6e4vqy7.js +2 -0
  210. package/bundle/{chunk-m1h5a4vg.js → chunk-p9qfbr02.js} +1 -1
  211. package/bundle/{chunk-ggqst87g.js → chunk-pe29yy6s.js} +1 -1
  212. package/bundle/{chunk-yy526n9c.js → chunk-pje60pj2.js} +1 -1
  213. package/bundle/{chunk-3n1324bt.js → chunk-pp2eqkse.js} +1 -1
  214. package/bundle/{chunk-x067eetw.js → chunk-pp6vhqrr.js} +1 -1
  215. package/bundle/chunk-pqkjhn8h.js +2 -0
  216. package/bundle/{chunk-ezja6njs.js → chunk-pv67gwce.js} +1 -1
  217. package/bundle/{chunk-b3rpzkcb.js → chunk-q7vasbxn.js} +1 -1
  218. package/bundle/chunk-qadw6j20.js +2 -0
  219. package/bundle/{chunk-89q1y7tc.js → chunk-qc8rsn4v.js} +1 -1
  220. package/bundle/chunk-qd8w2gkd.js +2 -0
  221. package/bundle/chunk-qggcszs2.js +2 -0
  222. package/bundle/{chunk-q1v2pytx.js → chunk-qrsveve6.js} +1 -1
  223. package/bundle/chunk-r7sqdfad.js +2 -0
  224. package/bundle/chunk-r8m7rtfc.js +2 -0
  225. package/bundle/{chunk-7ppd2phw.js → chunk-rbk8seme.js} +1 -1
  226. package/bundle/chunk-rf12t4n5.js +2 -0
  227. package/bundle/{chunk-04tw0r4s.js → chunk-rg0mrprz.js} +1 -1
  228. package/bundle/{chunk-cdhmc0t0.js → chunk-rjd8gbs5.js} +1 -1
  229. package/bundle/chunk-rkyf0cp8.js +2 -0
  230. package/bundle/chunk-rpgne7xh.js +2 -0
  231. package/bundle/chunk-rvgj1vky.js +2 -0
  232. package/bundle/{chunk-c01z3cvg.js → chunk-rvkrgkeq.js} +1 -1
  233. package/bundle/chunk-rza530gm.js +5 -0
  234. package/bundle/{chunk-2ahqhh4z.js → chunk-rzhdkkpz.js} +1 -1
  235. package/bundle/chunk-s3mnrhbx.js +5 -0
  236. package/bundle/chunk-s6ktx2sx.js +2 -0
  237. package/bundle/{chunk-kqn9h2gk.js → chunk-skqbaadf.js} +1 -1
  238. package/bundle/chunk-ss2jvqrg.js +2 -0
  239. package/bundle/{chunk-ydp0q1hk.js → chunk-ss2ms1r3.js} +1 -1
  240. package/bundle/{chunk-1fbeendk.js → chunk-t56r99hp.js} +1 -1
  241. package/bundle/{chunk-xc5044tm.js → chunk-t8m74g39.js} +1 -1
  242. package/bundle/{chunk-s6bar2f9.js → chunk-t9mz17gb.js} +2 -2
  243. package/bundle/{chunk-cvdxgsq1.js → chunk-tq0239xp.js} +1 -1
  244. package/bundle/{chunk-whxjkz9a.js → chunk-tqj69nh6.js} +2 -2
  245. package/bundle/{chunk-hj5y7fvk.js → chunk-tt30dybd.js} +1 -1
  246. package/bundle/{chunk-5a5t01ka.js → chunk-tvdmnee6.js} +1 -1
  247. package/bundle/chunk-tvwwq4b3.js +2 -0
  248. package/bundle/{chunk-dhjp0zx2.js → chunk-v1xjc3s8.js} +1 -1
  249. package/bundle/chunk-v2n26eg4.js +2 -0
  250. package/bundle/chunk-vcw00k0n.js +3 -0
  251. package/bundle/{chunk-7jbz3dgt.js → chunk-vhe0tth1.js} +1 -1
  252. package/bundle/{chunk-yfkvjphe.js → chunk-vvxmwyrw.js} +1 -1
  253. package/bundle/{chunk-p68rwmhc.js → chunk-vxyy2dp3.js} +2 -2
  254. package/bundle/{chunk-y2v09y71.js → chunk-vywnd5sf.js} +1 -1
  255. package/bundle/{chunk-0jgsp4c2.js → chunk-w18xs2h5.js} +1 -1
  256. package/bundle/{chunk-fjgyrsbw.js → chunk-w7vh8cxt.js} +1 -1
  257. package/bundle/chunk-w8saweey.js +2 -0
  258. package/bundle/chunk-we9cv8we.js +8 -0
  259. package/bundle/chunk-wezarrvy.js +2 -0
  260. package/bundle/{chunk-d6r4xwtg.js → chunk-wfb608qf.js} +3 -3
  261. package/bundle/{chunk-3g1yz39h.js → chunk-whe7h2mj.js} +1 -1
  262. package/bundle/chunk-wmqsdt2c.js +3 -0
  263. package/bundle/chunk-wqj0xasg.js +2 -0
  264. package/bundle/chunk-wr42tphe.js +2 -0
  265. package/bundle/chunk-x24y7qyd.js +2 -0
  266. package/bundle/{chunk-07g7cybt.js → chunk-x25zkrz7.js} +1 -1
  267. package/bundle/{chunk-tr8sf0dk.js → chunk-x3y2xzhn.js} +1 -1
  268. package/bundle/{chunk-27yxgy03.js → chunk-x4sp99g6.js} +1 -1
  269. package/bundle/{chunk-3nwve06r.js → chunk-x562b0xk.js} +1 -1
  270. package/bundle/{chunk-61c62e5s.js → chunk-x7k5yeey.js} +1 -1
  271. package/bundle/{chunk-fkgv2hqd.js → chunk-x9rbv6p6.js} +1 -1
  272. package/bundle/{chunk-wnqwb6fd.js → chunk-xcmgkc57.js} +1 -1
  273. package/bundle/chunk-xj765svc.js +3 -0
  274. package/bundle/{chunk-gm85xefs.js → chunk-xm7wascx.js} +1 -1
  275. package/bundle/{chunk-whcg14sc.js → chunk-xrs18kzn.js} +1 -1
  276. package/bundle/{chunk-6nbzdb0r.js → chunk-xthkjax9.js} +1 -1
  277. package/bundle/{chunk-scnz207s.js → chunk-xvwvd4kq.js} +2 -2
  278. package/bundle/{chunk-zb0me4kk.js → chunk-xzrb857v.js} +1 -1
  279. package/bundle/chunk-y2d0w09y.js +2 -0
  280. package/bundle/{chunk-3nyqh1d6.js → chunk-y3b4k38p.js} +1 -1
  281. package/bundle/{chunk-svvgv1s0.js → chunk-y6123zvq.js} +1 -1
  282. package/bundle/chunk-y7sy3w6z.js +2 -0
  283. package/bundle/{chunk-vg2fmyje.js → chunk-y9q0hb7b.js} +2 -2
  284. package/bundle/chunk-yb79f79m.js +2 -0
  285. package/bundle/{chunk-fnbpap62.js → chunk-yek0sk2q.js} +1 -1
  286. package/bundle/{chunk-wfs4pcwa.js → chunk-ygs5pzk7.js} +4 -4
  287. package/bundle/{chunk-3bmzjznz.js → chunk-yhbcbjfk.js} +1 -1
  288. package/bundle/{chunk-sermjas1.js → chunk-yjf3kyej.js} +1 -1
  289. package/bundle/chunk-yjnyzpmt.js +2 -0
  290. package/bundle/{chunk-0a0vat1h.js → chunk-yp5bypsp.js} +2 -2
  291. package/bundle/{chunk-h0rpmne5.js → chunk-yp8wyzzm.js} +1 -1
  292. package/bundle/chunk-yqbcnsa1.js +2 -0
  293. package/bundle/{chunk-4xh1qm90.js → chunk-yv0xrnn9.js} +1 -1
  294. package/bundle/chunk-z3mra3nm.js +2 -0
  295. package/bundle/chunk-za7mwbye.js +2 -0
  296. package/bundle/chunk-zaks8cae.js +11 -0
  297. package/bundle/{chunk-0fmbz83g.js → chunk-zcsgqk9f.js} +1 -1
  298. package/bundle/chunk-zqqx96jx.js +3 -0
  299. package/bundle/{chunk-snm5q21k.js → chunk-zs8kqdsf.js} +2 -2
  300. package/bundle/{chunk-y062spw2.js → chunk-zscer8rc.js} +1 -1
  301. package/bundle/{chunk-qjjch1zt.js → chunk-zw815d68.js} +2 -2
  302. package/bundle/chunk-zy9w1vkc.js +2 -0
  303. package/bundle/index.js +3 -3
  304. package/bundle/parser.worker.js +2 -2
  305. package/bundle/worker.js +1 -1
  306. package/package.json +1 -1
  307. package/bundle/chunk-07ws99b1.js +0 -2
  308. package/bundle/chunk-09c4ngag.js +0 -2
  309. package/bundle/chunk-0ch32p4c.js +0 -3
  310. package/bundle/chunk-0jgst767.js +0 -2
  311. package/bundle/chunk-0psrr9vp.js +0 -2
  312. package/bundle/chunk-1j73cnvz.js +0 -2
  313. package/bundle/chunk-1yddn03z.js +0 -2
  314. package/bundle/chunk-27dgtm8r.js +0 -2
  315. package/bundle/chunk-2ec6ps8r.js +0 -5
  316. package/bundle/chunk-38g8yzw0.js +0 -2
  317. package/bundle/chunk-3bkd0ar3.js +0 -2
  318. package/bundle/chunk-3f4zht9e.js +0 -2
  319. package/bundle/chunk-3pxnp6jb.js +0 -2
  320. package/bundle/chunk-3szwfy7w.js +0 -3
  321. package/bundle/chunk-426dt7be.js +0 -2
  322. package/bundle/chunk-4amgp4yd.js +0 -3
  323. package/bundle/chunk-4p5e5tsz.js +0 -28
  324. package/bundle/chunk-4pjm21a5.js +0 -2
  325. package/bundle/chunk-4sz3jbc5.js +0 -2
  326. package/bundle/chunk-58x5seqn.js +0 -2
  327. package/bundle/chunk-5xe6x2rt.js +0 -2
  328. package/bundle/chunk-618tmyx9.js +0 -2
  329. package/bundle/chunk-6d9wsjxm.js +0 -2
  330. package/bundle/chunk-730a2d1k.js +0 -2
  331. package/bundle/chunk-76wrw0cs.js +0 -2
  332. package/bundle/chunk-7bd0x9vf.js +0 -2
  333. package/bundle/chunk-7czkntef.js +0 -2
  334. package/bundle/chunk-7ex57nyh.js +0 -2
  335. package/bundle/chunk-7gpczxbh.js +0 -2
  336. package/bundle/chunk-7j0bgeh2.js +0 -2
  337. package/bundle/chunk-7py443fe.js +0 -2
  338. package/bundle/chunk-90q5sae0.js +0 -2
  339. package/bundle/chunk-9amwe0ed.js +0 -2
  340. package/bundle/chunk-9grvepmd.js +0 -2
  341. package/bundle/chunk-9hrh15p2.js +0 -2
  342. package/bundle/chunk-a0v55ywn.js +0 -8
  343. package/bundle/chunk-a2qz9m10.js +0 -2
  344. package/bundle/chunk-av6ezvxm.js +0 -2
  345. package/bundle/chunk-beksar7w.js +0 -2
  346. package/bundle/chunk-bg66rqrx.js +0 -2
  347. package/bundle/chunk-bn15mzd7.js +0 -2
  348. package/bundle/chunk-bt6yw07v.js +0 -2
  349. package/bundle/chunk-cy9s1ma5.js +0 -2
  350. package/bundle/chunk-d0nkvp57.js +0 -2
  351. package/bundle/chunk-dvk2wwjj.js +0 -2
  352. package/bundle/chunk-dxe29jj6.js +0 -2
  353. package/bundle/chunk-e0jy9qxd.js +0 -2
  354. package/bundle/chunk-eercqt72.js +0 -2
  355. package/bundle/chunk-efxd6b2k.js +0 -2
  356. package/bundle/chunk-eneawsj8.js +0 -2
  357. package/bundle/chunk-f72pppr7.js +0 -2
  358. package/bundle/chunk-feyphhxd.js +0 -2
  359. package/bundle/chunk-fnnch1e9.js +0 -2
  360. package/bundle/chunk-ft93f33g.js +0 -3
  361. package/bundle/chunk-gk34kh8p.js +0 -2
  362. package/bundle/chunk-gn50xqbd.js +0 -2
  363. package/bundle/chunk-h6rv626m.js +0 -2
  364. package/bundle/chunk-h7s2w1e2.js +0 -2
  365. package/bundle/chunk-hmv2cdnz.js +0 -2
  366. package/bundle/chunk-ht81ensf.js +0 -2
  367. package/bundle/chunk-hxpgs78j.js +0 -5
  368. package/bundle/chunk-j59ktwny.js +0 -2
  369. package/bundle/chunk-jmz2mq3t.js +0 -2
  370. package/bundle/chunk-jvqbvgjy.js +0 -11
  371. package/bundle/chunk-k309zez0.js +0 -3
  372. package/bundle/chunk-k3fn3yed.js +0 -2
  373. package/bundle/chunk-kpw6nghv.js +0 -2
  374. package/bundle/chunk-m5ghbt5y.js +0 -2
  375. package/bundle/chunk-mj4bepvj.js +0 -2
  376. package/bundle/chunk-mn41f9qv.js +0 -2
  377. package/bundle/chunk-mqjf9sbm.js +0 -2
  378. package/bundle/chunk-n5gwrrbb.js +0 -2
  379. package/bundle/chunk-nfjhem1c.js +0 -2
  380. package/bundle/chunk-ngytjdg2.js +0 -3
  381. package/bundle/chunk-nj4d554m.js +0 -11
  382. package/bundle/chunk-nrc3bj9p.js +0 -2
  383. package/bundle/chunk-nt4e3em9.js +0 -3
  384. package/bundle/chunk-nxyyn2ra.js +0 -2
  385. package/bundle/chunk-p5tceb4k.js +0 -2
  386. package/bundle/chunk-pvpy9kq1.js +0 -800
  387. package/bundle/chunk-qjgm3e2p.js +0 -2
  388. package/bundle/chunk-qt80mhdn.js +0 -2
  389. package/bundle/chunk-qtw5nrr4.js +0 -2
  390. package/bundle/chunk-rc9ex3vt.js +0 -2
  391. package/bundle/chunk-s9672vvv.js +0 -2
  392. package/bundle/chunk-sbyey0qb.js +0 -2
  393. package/bundle/chunk-shpq6es1.js +0 -3
  394. package/bundle/chunk-sj5v361q.js +0 -2
  395. package/bundle/chunk-ta3k9syc.js +0 -2
  396. package/bundle/chunk-tk5afan4.js +0 -2
  397. package/bundle/chunk-tpndnprb.js +0 -2
  398. package/bundle/chunk-v965rsr8.js +0 -3
  399. package/bundle/chunk-vcmrrt8b.js +0 -3
  400. package/bundle/chunk-vcrn3v70.js +0 -2
  401. package/bundle/chunk-vwxfgea7.js +0 -2
  402. package/bundle/chunk-w0kgcz1t.js +0 -2
  403. package/bundle/chunk-wgpsmxqx.js +0 -7
  404. package/bundle/chunk-wksczmes.js +0 -2
  405. package/bundle/chunk-wsxta33r.js +0 -2
  406. package/bundle/chunk-xck0sq3k.js +0 -2
  407. package/bundle/chunk-xjyhtm8r.js +0 -2
  408. package/bundle/chunk-xm08fc2q.js +0 -3
  409. package/bundle/chunk-ygc5qegv.js +0 -2
  410. package/bundle/chunk-yjqmzm51.js +0 -2
  411. package/bundle/chunk-yzc53n88.js +0 -2
  412. package/bundle/chunk-yzjc15vp.js +0 -9
  413. package/bundle/chunk-z7y9pdj7.js +0 -2
  414. package/bundle/chunk-z8g819cz.js +0 -2
  415. package/bundle/chunk-z8r65yw3.js +0 -2
  416. package/bundle/chunk-zt1nbwmm.js +0 -2
  417. package/bundle/chunk-zz36xg2n.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-aztre27e.js";var e={"ui.sessionReview.title":"\uC138\uC158 \uBCC0\uACBD \uC0AC\uD56D","ui.sessionReview.title.lastTurn":"\uB9C8\uC9C0\uB9C9 \uD134 \uBCC0\uACBD \uC0AC\uD56D","ui.sessionReview.diffStyle.unified":"\uD1B5\uD569 \uBCF4\uAE30","ui.sessionReview.diffStyle.split":"\uBD84\uD560 \uBCF4\uAE30","ui.sessionReview.openFile":"\uD30C\uC77C \uC5F4\uAE30","ui.sessionReview.selection.line":"{{line}}\uBC88 \uC904","ui.sessionReview.selection.lines":"{{start}}-{{end}}\uBC88 \uC904","ui.sessionReview.expandAll":"\uBAA8\uB450 \uD3BC\uCE58\uAE30","ui.sessionReview.collapseAll":"\uBAA8\uB450 \uC811\uAE30","ui.sessionReview.change.added":"\uCD94\uAC00\uB428","ui.sessionReview.change.removed":"\uC0AD\uC81C\uB428","ui.sessionReview.change.modified":"\uC218\uC815\uB428","ui.sessionReview.image.loading":"\uB85C\uB529 \uC911...","ui.sessionReview.image.placeholder":"\uC774\uBBF8\uC9C0","ui.sessionReview.largeDiff.title":"\uCC28\uC774\uAC00 \uB108\uBB34 \uCEE4\uC11C \uB80C\uB354\uB9C1\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","ui.sessionReview.largeDiff.meta":"\uC81C\uD55C: {{limit}} \uBCC0\uACBD \uC904. \uD604\uC7AC: {{current}} \uBCC0\uACBD \uC904.","ui.sessionReview.largeDiff.renderAnyway":"\uADF8\uB798\uB3C4 \uB80C\uB354\uB9C1","ui.fileMedia.kind.image":"\uC774\uBBF8\uC9C0","ui.fileMedia.kind.audio":"\uC624\uB514\uC624","ui.fileMedia.state.removed":"{{kind}} \uC81C\uAC70\uB428","ui.fileMedia.state.loading":"{{kind}} \uB85C\uB4DC \uC911...","ui.fileMedia.state.error":"{{kind}} \uB85C\uB4DC \uC624\uB958","ui.fileMedia.state.unavailable":"{{kind}} \uC0AC\uC6A9 \uBD88\uAC00","ui.fileMedia.binary.title":"\uBC14\uC774\uB108\uB9AC \uD30C\uC77C","ui.fileMedia.binary.description.path":"{{path}}\uC740(\uB294) \uBC14\uC774\uB108\uB9AC \uD30C\uC77C\uC774\uBBC0\uB85C \uD45C\uC2DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","ui.fileMedia.binary.description.default":"\uBC14\uC774\uB108\uB9AC \uD30C\uC77C\uC774\uBBC0\uB85C \uD45C\uC2DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","ui.lineComment.label.prefix":"","ui.lineComment.label.suffix":"\uC5D0 \uB313\uAE00 \uB2EC\uAE30","ui.lineComment.editorLabel.prefix":"","ui.lineComment.editorLabel.suffix":"\uC5D0 \uB313\uAE00 \uC791\uC131 \uC911","ui.lineComment.placeholder":"\uB313\uAE00 \uCD94\uAC00","ui.lineComment.submit":"\uB313\uAE00","ui.sessionTurn.steps.show":"\uB2E8\uACC4 \uD45C\uC2DC","ui.sessionTurn.steps.hide":"\uB2E8\uACC4 \uC228\uAE30\uAE30","ui.sessionTurn.summary.response":"\uC751\uB2F5","ui.sessionTurn.diff.showMore":"\uBCC0\uACBD \uC0AC\uD56D \uB354 \uBCF4\uAE30 ({{count}})","ui.sessionTurn.retry.retrying":"\uC7AC\uC2DC\uB3C4 \uC911","ui.sessionTurn.retry.inSeconds":"{{seconds}}\uCD08 \uD6C4","ui.sessionTurn.retry.attempt":"{{attempt}}\uBC88\uC9F8","ui.sessionTurn.retry.attemptLine":"{{line}} - {{attempt}}\uBC88\uC9F8","ui.sessionTurn.retry.geminiHot":"gemini\uAC00 \uD604\uC7AC \uACFC\uBD80\uD558 \uC0C1\uD0DC\uC785\uB2C8\uB2E4","ui.sessionTurn.error.freeUsageExceeded":"\uBB34\uB8CC \uC0AC\uC6A9\uB7C9 \uCD08\uACFC","ui.sessionTurn.error.addQredits":"\uD06C\uB808\uB527 \uCD94\uAC00","ui.sessionTurn.status.delegating":"\uC791\uC5C5 \uC704\uC784 \uC911","ui.sessionTurn.status.planning":"\uB2E4\uC74C \uB2E8\uACC4 \uACC4\uD68D \uC911","ui.sessionTurn.status.gatheringContext":"\uD0D0\uC0C9 \uC911","ui.sessionTurn.status.gatheredContext":"\uD0D0\uC0C9\uB428","ui.sessionTurn.status.searchingCodebase":"\uCF54\uB4DC\uBCA0\uC774\uC2A4 \uAC80\uC0C9 \uC911","ui.sessionTurn.status.searchingWeb":"\uC6F9 \uAC80\uC0C9 \uC911","ui.sessionTurn.status.makingEdits":"\uD3B8\uC9D1 \uC218\uD589 \uC911","ui.sessionTurn.status.runningCommands":"\uBA85\uB839\uC5B4 \uC2E4\uD589 \uC911","ui.sessionTurn.status.thinking":"\uC0DD\uAC01 \uC911","ui.sessionTurn.status.thinkingWithTopic":"\uC0DD\uAC01 \uC911 - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"\uC0DD\uAC01 \uC815\uB9AC \uC911","ui.sessionTurn.status.consideringNextSteps":"\uB2E4\uC74C \uB2E8\uACC4 \uACE0\uB824 \uC911","ui.messagePart.questions.dismissed":"\uC9C8\uBB38 \uBB34\uC2DC\uB428","ui.messagePart.compaction":"\uC138\uC158 \uC555\uCD95\uB428","ui.messagePart.context.read.one":"{{count}}\uAC1C \uC77D\uC74C","ui.messagePart.context.read.other":"{{count}}\uAC1C \uC77D\uC74C","ui.messagePart.context.search.one":"{{count}}\uAC1C \uAC80\uC0C9","ui.messagePart.context.search.other":"{{count}}\uAC1C \uAC80\uC0C9","ui.messagePart.context.list.one":"{{count}}\uAC1C \uBAA9\uB85D","ui.messagePart.context.list.other":"{{count}}\uAC1C \uBAA9\uB85D","ui.messagePart.diagnostic.error":"\uC624\uB958","ui.messagePart.title.edit":"\uD3B8\uC9D1","ui.messagePart.title.write":"\uC791\uC131","ui.messagePart.option.typeOwnAnswer":"\uC9C1\uC811 \uB2F5\uBCC0 \uC785\uB825","ui.messagePart.review.title":"\uB2F5\uBCC0 \uAC80\uD1A0","ui.list.loading":"\uB85C\uB529 \uC911","ui.list.empty":"\uACB0\uACFC \uC5C6\uC74C","ui.list.clearFilter":"\uD544\uD130 \uC9C0\uC6B0\uAE30","ui.list.emptyWithFilter.prefix":"\uB2E4\uC74C\uC5D0 \uB300\uD55C \uACB0\uACFC \uC5C6\uC74C: ","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"\uC0C8 \uBA54\uC2DC\uC9C0","ui.textField.copyToClipboard":"\uD074\uB9BD\uBCF4\uB4DC\uC5D0 \uBCF5\uC0AC","ui.textField.copyLink":"\uB9C1\uD06C \uBCF5\uC0AC","ui.textField.copied":"\uBCF5\uC0AC\uB428","ui.imagePreview.alt":"\uC774\uBBF8\uC9C0 \uBBF8\uB9AC\uBCF4\uAE30","ui.scrollView.ariaLabel":"\uC2A4\uD06C\uB864 \uAC00\uB2A5\uD55C \uCF58\uD150\uCE20","ui.tool.read":"\uC77D\uAE30","ui.tool.loaded":"\uB85C\uB4DC\uB428","ui.tool.list":"\uBAA9\uB85D","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"\uC6F9 \uAC00\uC838\uC624\uAE30","ui.tool.websearch":"\uC6F9 \uAC80\uC0C9","ui.tool.codesearch":"\uCF54\uB4DC \uAC80\uC0C9","ui.tool.shell":"\uC178","ui.tool.patch":"\uD328\uCE58","ui.tool.todos":"\uD560 \uC77C","ui.tool.todos.read":"\uD560 \uC77C \uC77D\uAE30","ui.tool.questions":"\uC9C8\uBB38","ui.tool.agent":"{{type}} \uC5D0\uC774\uC804\uD2B8","ui.tool.agent.default":"\uC5D0\uC774\uC804\uD2B8","ui.common.file.one":"\uD30C\uC77C","ui.common.file.other":"\uD30C\uC77C","ui.common.question.one":"\uC9C8\uBB38","ui.common.question.other":"\uC9C8\uBB38","ui.common.add":"\uCD94\uAC00","ui.common.back":"\uB4A4\uB85C","ui.common.cancel":"\uCDE8\uC18C","ui.common.confirm":"\uD655\uC778","ui.common.dismiss":"\uB2EB\uAE30","ui.common.close":"\uB2EB\uAE30","ui.common.next":"\uB2E4\uC74C","ui.common.submit":"\uC81C\uCD9C","ui.permission.deny":"\uAC70\uBD80","ui.permission.allowAlways":"\uD56D\uC0C1 \uD5C8\uC6A9","ui.permission.allowOnce":"\uD55C \uBC88\uB9CC \uD5C8\uC6A9","ui.message.expand":"\uBA54\uC2DC\uC9C0 \uD3BC\uCE58\uAE30","ui.message.collapse":"\uBA54\uC2DC\uC9C0 \uC811\uAE30","ui.message.copy":"\uBCF5\uC0AC","ui.message.copyMessage":"\uBA54\uC2DC\uC9C0 \uBCF5\uC0AC","ui.message.forkMessage":"\uC0C8 \uC138\uC158\uC73C\uB85C \uBD84\uAE30","ui.message.revertMessage":"\uC774 \uC2DC\uC810\uC73C\uB85C \uCD08\uAE30\uD654","ui.message.copyResponse":"\uC751\uB2F5 \uBCF5\uC0AC","ui.message.copied":"\uBCF5\uC0AC\uB428!","ui.message.interrupted":"\uC911\uB2E8\uB428","ui.message.queued":"\uB300\uAE30 \uC911","ui.message.attachment.alt":"\uCCA8\uBD80 \uD30C\uC77C","ui.patch.action.deleted":"\uC0AD\uC81C\uB428","ui.patch.action.created":"\uC0DD\uC131\uB428","ui.patch.action.moved":"\uC774\uB3D9\uB428","ui.patch.action.patched":"\uD328\uCE58\uB428","ui.question.subtitle.answered":"{{count}}\uAC1C \uB2F5\uBCC0\uB428","ui.question.answer.none":"(\uB2F5\uBCC0 \uC5C6\uC74C)","ui.question.review.notAnswered":"(\uB2F5\uBCC0\uB418\uC9C0 \uC54A\uC74C)","ui.question.multiHint":"\uD574\uB2F9\uD558\uB294 \uD56D\uBAA9 \uBAA8\uB450 \uC120\uD0DD","ui.question.singleHint":"\uD558\uB098\uC758 \uB2F5\uBCC0\uC744 \uC120\uD0DD","ui.question.custom.placeholder":"\uB2F5\uBCC0 \uC785\uB825...","ui.fileSearch.placeholder":"\uCC3E\uAE30","ui.fileSearch.previousMatch":"\uC774\uC804 \uD56D\uBAA9","ui.fileSearch.nextMatch":"\uB2E4\uC74C \uD56D\uBAA9","ui.fileSearch.close":"\uAC80\uC0C9 \uB2EB\uAE30","ui.tool.task":"\uC791\uC5C5","ui.tool.skill":"\uC2A4\uD0AC","ui.basicTool.called":"`{{tool}}` \uD638\uCD9C\uB428","ui.toolErrorCard.failed":"\uC2E4\uD328","ui.toolErrorCard.copyError":"\uC624\uB958 \uBCF5\uC0AC","ui.message.duration.seconds":"{{count}}\uCD08","ui.message.duration.minutesSeconds":"{{minutes}}\uBD84 {{seconds}}\uCD08"};export{e as dict};
2
+ import"./chunk-7xm75w1e.js";var e={"ui.sessionReview.title":"\uC138\uC158 \uBCC0\uACBD \uC0AC\uD56D","ui.sessionReview.title.lastTurn":"\uB9C8\uC9C0\uB9C9 \uD134 \uBCC0\uACBD \uC0AC\uD56D","ui.sessionReview.diffStyle.unified":"\uD1B5\uD569 \uBCF4\uAE30","ui.sessionReview.diffStyle.split":"\uBD84\uD560 \uBCF4\uAE30","ui.sessionReview.openFile":"\uD30C\uC77C \uC5F4\uAE30","ui.sessionReview.selection.line":"{{line}}\uBC88 \uC904","ui.sessionReview.selection.lines":"{{start}}-{{end}}\uBC88 \uC904","ui.sessionReview.expandAll":"\uBAA8\uB450 \uD3BC\uCE58\uAE30","ui.sessionReview.collapseAll":"\uBAA8\uB450 \uC811\uAE30","ui.sessionReview.change.added":"\uCD94\uAC00\uB428","ui.sessionReview.change.removed":"\uC0AD\uC81C\uB428","ui.sessionReview.change.modified":"\uC218\uC815\uB428","ui.sessionReview.image.loading":"\uB85C\uB529 \uC911...","ui.sessionReview.image.placeholder":"\uC774\uBBF8\uC9C0","ui.sessionReview.largeDiff.title":"\uCC28\uC774\uAC00 \uB108\uBB34 \uCEE4\uC11C \uB80C\uB354\uB9C1\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4","ui.sessionReview.largeDiff.meta":"\uC81C\uD55C: {{limit}} \uBCC0\uACBD \uC904. \uD604\uC7AC: {{current}} \uBCC0\uACBD \uC904.","ui.sessionReview.largeDiff.renderAnyway":"\uADF8\uB798\uB3C4 \uB80C\uB354\uB9C1","ui.fileMedia.kind.image":"\uC774\uBBF8\uC9C0","ui.fileMedia.kind.audio":"\uC624\uB514\uC624","ui.fileMedia.state.removed":"{{kind}} \uC81C\uAC70\uB428","ui.fileMedia.state.loading":"{{kind}} \uB85C\uB4DC \uC911...","ui.fileMedia.state.error":"{{kind}} \uB85C\uB4DC \uC624\uB958","ui.fileMedia.state.unavailable":"{{kind}} \uC0AC\uC6A9 \uBD88\uAC00","ui.fileMedia.binary.title":"\uBC14\uC774\uB108\uB9AC \uD30C\uC77C","ui.fileMedia.binary.description.path":"{{path}}\uC740(\uB294) \uBC14\uC774\uB108\uB9AC \uD30C\uC77C\uC774\uBBC0\uB85C \uD45C\uC2DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","ui.fileMedia.binary.description.default":"\uBC14\uC774\uB108\uB9AC \uD30C\uC77C\uC774\uBBC0\uB85C \uD45C\uC2DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","ui.lineComment.label.prefix":"","ui.lineComment.label.suffix":"\uC5D0 \uB313\uAE00 \uB2EC\uAE30","ui.lineComment.editorLabel.prefix":"","ui.lineComment.editorLabel.suffix":"\uC5D0 \uB313\uAE00 \uC791\uC131 \uC911","ui.lineComment.placeholder":"\uB313\uAE00 \uCD94\uAC00","ui.lineComment.submit":"\uB313\uAE00","ui.sessionTurn.steps.show":"\uB2E8\uACC4 \uD45C\uC2DC","ui.sessionTurn.steps.hide":"\uB2E8\uACC4 \uC228\uAE30\uAE30","ui.sessionTurn.summary.response":"\uC751\uB2F5","ui.sessionTurn.diff.showMore":"\uBCC0\uACBD \uC0AC\uD56D \uB354 \uBCF4\uAE30 ({{count}})","ui.sessionTurn.retry.retrying":"\uC7AC\uC2DC\uB3C4 \uC911","ui.sessionTurn.retry.inSeconds":"{{seconds}}\uCD08 \uD6C4","ui.sessionTurn.retry.attempt":"{{attempt}}\uBC88\uC9F8","ui.sessionTurn.retry.attemptLine":"{{line}} - {{attempt}}\uBC88\uC9F8","ui.sessionTurn.retry.geminiHot":"gemini\uAC00 \uD604\uC7AC \uACFC\uBD80\uD558 \uC0C1\uD0DC\uC785\uB2C8\uB2E4","ui.sessionTurn.error.freeUsageExceeded":"\uBB34\uB8CC \uC0AC\uC6A9\uB7C9 \uCD08\uACFC","ui.sessionTurn.error.addQredits":"\uD06C\uB808\uB527 \uCD94\uAC00","ui.sessionTurn.status.delegating":"\uC791\uC5C5 \uC704\uC784 \uC911","ui.sessionTurn.status.planning":"\uB2E4\uC74C \uB2E8\uACC4 \uACC4\uD68D \uC911","ui.sessionTurn.status.gatheringContext":"\uD0D0\uC0C9 \uC911","ui.sessionTurn.status.gatheredContext":"\uD0D0\uC0C9\uB428","ui.sessionTurn.status.searchingCodebase":"\uCF54\uB4DC\uBCA0\uC774\uC2A4 \uAC80\uC0C9 \uC911","ui.sessionTurn.status.searchingWeb":"\uC6F9 \uAC80\uC0C9 \uC911","ui.sessionTurn.status.makingEdits":"\uD3B8\uC9D1 \uC218\uD589 \uC911","ui.sessionTurn.status.runningCommands":"\uBA85\uB839\uC5B4 \uC2E4\uD589 \uC911","ui.sessionTurn.status.thinking":"\uC0DD\uAC01 \uC911","ui.sessionTurn.status.thinkingWithTopic":"\uC0DD\uAC01 \uC911 - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"\uC0DD\uAC01 \uC815\uB9AC \uC911","ui.sessionTurn.status.consideringNextSteps":"\uB2E4\uC74C \uB2E8\uACC4 \uACE0\uB824 \uC911","ui.messagePart.questions.dismissed":"\uC9C8\uBB38 \uBB34\uC2DC\uB428","ui.messagePart.compaction":"\uC138\uC158 \uC555\uCD95\uB428","ui.messagePart.context.read.one":"{{count}}\uAC1C \uC77D\uC74C","ui.messagePart.context.read.other":"{{count}}\uAC1C \uC77D\uC74C","ui.messagePart.context.search.one":"{{count}}\uAC1C \uAC80\uC0C9","ui.messagePart.context.search.other":"{{count}}\uAC1C \uAC80\uC0C9","ui.messagePart.context.list.one":"{{count}}\uAC1C \uBAA9\uB85D","ui.messagePart.context.list.other":"{{count}}\uAC1C \uBAA9\uB85D","ui.messagePart.diagnostic.error":"\uC624\uB958","ui.messagePart.title.edit":"\uD3B8\uC9D1","ui.messagePart.title.write":"\uC791\uC131","ui.messagePart.option.typeOwnAnswer":"\uC9C1\uC811 \uB2F5\uBCC0 \uC785\uB825","ui.messagePart.review.title":"\uB2F5\uBCC0 \uAC80\uD1A0","ui.list.loading":"\uB85C\uB529 \uC911","ui.list.empty":"\uACB0\uACFC \uC5C6\uC74C","ui.list.clearFilter":"\uD544\uD130 \uC9C0\uC6B0\uAE30","ui.list.emptyWithFilter.prefix":"\uB2E4\uC74C\uC5D0 \uB300\uD55C \uACB0\uACFC \uC5C6\uC74C: ","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"\uC0C8 \uBA54\uC2DC\uC9C0","ui.textField.copyToClipboard":"\uD074\uB9BD\uBCF4\uB4DC\uC5D0 \uBCF5\uC0AC","ui.textField.copyLink":"\uB9C1\uD06C \uBCF5\uC0AC","ui.textField.copied":"\uBCF5\uC0AC\uB428","ui.imagePreview.alt":"\uC774\uBBF8\uC9C0 \uBBF8\uB9AC\uBCF4\uAE30","ui.scrollView.ariaLabel":"\uC2A4\uD06C\uB864 \uAC00\uB2A5\uD55C \uCF58\uD150\uCE20","ui.tool.read":"\uC77D\uAE30","ui.tool.loaded":"\uB85C\uB4DC\uB428","ui.tool.list":"\uBAA9\uB85D","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"\uC6F9 \uAC00\uC838\uC624\uAE30","ui.tool.websearch":"\uC6F9 \uAC80\uC0C9","ui.tool.codesearch":"\uCF54\uB4DC \uAC80\uC0C9","ui.tool.shell":"\uC178","ui.tool.patch":"\uD328\uCE58","ui.tool.todos":"\uD560 \uC77C","ui.tool.todos.read":"\uD560 \uC77C \uC77D\uAE30","ui.tool.questions":"\uC9C8\uBB38","ui.tool.agent":"{{type}} \uC5D0\uC774\uC804\uD2B8","ui.tool.agent.default":"\uC5D0\uC774\uC804\uD2B8","ui.common.file.one":"\uD30C\uC77C","ui.common.file.other":"\uD30C\uC77C","ui.common.question.one":"\uC9C8\uBB38","ui.common.question.other":"\uC9C8\uBB38","ui.common.add":"\uCD94\uAC00","ui.common.back":"\uB4A4\uB85C","ui.common.cancel":"\uCDE8\uC18C","ui.common.confirm":"\uD655\uC778","ui.common.dismiss":"\uB2EB\uAE30","ui.common.close":"\uB2EB\uAE30","ui.common.next":"\uB2E4\uC74C","ui.common.submit":"\uC81C\uCD9C","ui.permission.deny":"\uAC70\uBD80","ui.permission.allowAlways":"\uD56D\uC0C1 \uD5C8\uC6A9","ui.permission.allowOnce":"\uD55C \uBC88\uB9CC \uD5C8\uC6A9","ui.message.expand":"\uBA54\uC2DC\uC9C0 \uD3BC\uCE58\uAE30","ui.message.collapse":"\uBA54\uC2DC\uC9C0 \uC811\uAE30","ui.message.copy":"\uBCF5\uC0AC","ui.message.copyMessage":"\uBA54\uC2DC\uC9C0 \uBCF5\uC0AC","ui.message.forkMessage":"\uC0C8 \uC138\uC158\uC73C\uB85C \uBD84\uAE30","ui.message.revertMessage":"\uC774 \uC2DC\uC810\uC73C\uB85C \uCD08\uAE30\uD654","ui.message.copyResponse":"\uC751\uB2F5 \uBCF5\uC0AC","ui.message.copied":"\uBCF5\uC0AC\uB428!","ui.message.interrupted":"\uC911\uB2E8\uB428","ui.message.queued":"\uB300\uAE30 \uC911","ui.message.attachment.alt":"\uCCA8\uBD80 \uD30C\uC77C","ui.patch.action.deleted":"\uC0AD\uC81C\uB428","ui.patch.action.created":"\uC0DD\uC131\uB428","ui.patch.action.moved":"\uC774\uB3D9\uB428","ui.patch.action.patched":"\uD328\uCE58\uB428","ui.question.subtitle.answered":"{{count}}\uAC1C \uB2F5\uBCC0\uB428","ui.question.answer.none":"(\uB2F5\uBCC0 \uC5C6\uC74C)","ui.question.review.notAnswered":"(\uB2F5\uBCC0\uB418\uC9C0 \uC54A\uC74C)","ui.question.multiHint":"\uD574\uB2F9\uD558\uB294 \uD56D\uBAA9 \uBAA8\uB450 \uC120\uD0DD","ui.question.singleHint":"\uD558\uB098\uC758 \uB2F5\uBCC0\uC744 \uC120\uD0DD","ui.question.custom.placeholder":"\uB2F5\uBCC0 \uC785\uB825...","ui.fileSearch.placeholder":"\uCC3E\uAE30","ui.fileSearch.previousMatch":"\uC774\uC804 \uD56D\uBAA9","ui.fileSearch.nextMatch":"\uB2E4\uC74C \uD56D\uBAA9","ui.fileSearch.close":"\uAC80\uC0C9 \uB2EB\uAE30","ui.tool.task":"\uC791\uC5C5","ui.tool.skill":"\uC2A4\uD0AC","ui.basicTool.called":"`{{tool}}` \uD638\uCD9C\uB428","ui.toolErrorCard.failed":"\uC2E4\uD328","ui.toolErrorCard.copyError":"\uC624\uB958 \uBCF5\uC0AC","ui.message.duration.seconds":"{{count}}\uCD08","ui.message.duration.minutesSeconds":"{{minutes}}\uBD84 {{seconds}}\uCD08"};export{e as dict};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Be as K}from"./chunk-j9pcnkkq.js";import{wf as A}from"./chunk-cvdxgsq1.js";import{$P as w}from"./chunk-aztre27e.js";var i=w(A(),1);var t=w(A(),1);import{exec as T}from"child_process";import{promisify as y}from"util";var x=w(K(),1),_=(c,n,e)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){let u=new Date;if(new Date(n.Expiration)<u)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let s=n.AccountId;if(!s&&e?.[c]?.aws_account_id)s=e[c].aws_account_id;let o={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...s&&{accountId:s}};return x.setCredentialFeature(o,"CREDENTIALS_PROCESS","w"),o};var E=async(c,n,e)=>{let s=n[c];if(n[c]){let o=s.credential_process;if(o!==void 0){let u=y(t.externalDataInterceptor?.getTokenRecord?.().exec??T);try{let{stdout:r}=await u(o),S;try{S=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return _(c,S,n)}catch(r){throw new t.CredentialsProviderError(r.message,{logger:e})}}else throw new t.CredentialsProviderError(`Profile ${c} did not contain credential_process.`,{logger:e})}else throw new t.CredentialsProviderError(`Profile ${c} could not be found in shared credentials file.`,{logger:e})};var C=(c={})=>async({callerClientConfig:n}={})=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let e=await i.parseKnownFiles(c);return E(i.getProfileName({profile:c.profile??n?.profile}),e,c.logger)};export{C as se};
2
+ import{Be as K}from"./chunk-ht5w06x7.js";import{wf as A}from"./chunk-tq0239xp.js";import{BO as w}from"./chunk-7xm75w1e.js";var i=w(A(),1);var t=w(A(),1);import{exec as T}from"child_process";import{promisify as y}from"util";var x=w(K(),1),_=(c,n,e)=>{if(n.Version!==1)throw Error(`Profile ${c} credential_process did not return Version 1.`);if(n.AccessKeyId===void 0||n.SecretAccessKey===void 0)throw Error(`Profile ${c} credential_process returned invalid credentials.`);if(n.Expiration){let u=new Date;if(new Date(n.Expiration)<u)throw Error(`Profile ${c} credential_process returned expired credentials.`)}let s=n.AccountId;if(!s&&e?.[c]?.aws_account_id)s=e[c].aws_account_id;let o={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,...n.SessionToken&&{sessionToken:n.SessionToken},...n.Expiration&&{expiration:new Date(n.Expiration)},...n.CredentialScope&&{credentialScope:n.CredentialScope},...s&&{accountId:s}};return x.setCredentialFeature(o,"CREDENTIALS_PROCESS","w"),o};var E=async(c,n,e)=>{let s=n[c];if(n[c]){let o=s.credential_process;if(o!==void 0){let u=y(t.externalDataInterceptor?.getTokenRecord?.().exec??T);try{let{stdout:r}=await u(o),S;try{S=JSON.parse(r.trim())}catch{throw Error(`Profile ${c} credential_process returned invalid JSON.`)}return _(c,S,n)}catch(r){throw new t.CredentialsProviderError(r.message,{logger:e})}}else throw new t.CredentialsProviderError(`Profile ${c} did not contain credential_process.`,{logger:e})}else throw new t.CredentialsProviderError(`Profile ${c} could not be found in shared credentials file.`,{logger:e})};var C=(c={})=>async({callerClientConfig:n}={})=>{c.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let e=await i.parseKnownFiles(c);return E(i.getProfileName({profile:c.profile??n?.profile}),e,c.logger)};export{C as se};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-7xm75w1e.js";var R="./libopentui-c8ye7mqw.dylib";export{R as default};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{id as a,jd as b,kd as c,ld as d,md as e,nd as f,od as g,pd as h,qd as i,rd as j,sd as k,td as l}from"./chunk-d6r4xwtg.js";import"./chunk-aztre27e.js";export{i as setRendererCapabilities,a as pasteBytes,f as createTestRenderer,h as createTerminalCapabilities,j as createSpy,e as createMockMouse,c as createMockKeys,l as TestRecorder,d as MouseButtons,g as MockTreeSitterClient,k as ManualClock,b as KeyCodes};
2
+ import{id as a,jd as b,kd as c,ld as d,md as e,nd as f,od as g,pd as h,qd as i,rd as j,sd as k,td as l}from"./chunk-wfb608qf.js";import"./chunk-7xm75w1e.js";export{i as setRendererCapabilities,a as pasteBytes,f as createTestRenderer,h as createTerminalCapabilities,j as createSpy,e as createMockMouse,c as createMockKeys,l as TestRecorder,d as MouseButtons,g as MockTreeSitterClient,k as ManualClock,b as KeyCodes};
@@ -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-p18axz0m.js";import"./chunk-ht5w06x7.js";import"./chunk-enpzvmtc.js";import"./chunk-tq0239xp.js";import"./chunk-7xm75w1e.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,3 @@
1
+ // @bun
2
+ import{ut as L}from"./chunk-5tray1fw.js";import{UH as F,pH as M,uB as C}from"./chunk-zs8kqdsf.js";var g=(q)=>(H)=>Object.assign(H,q(H));function k(){return(q,H)=>{class G{static make(J){return J}}return Object.setPrototypeOf(G,H),G}}var y=Symbol.for("effect-zod/override"),A=Symbol.for("effect-zod/preprocess"),B=new WeakMap,N={};function n(q){return V(q.ast)}function V(q){let H=B.get(q);if(H)return H;let G=D(q);return B.set(q,G),G}function D(q){let H=q.annotations?.[y];if(H)return H;let X=q.encoding?.length&&q._tag!=="Declaration"&&!(F.isOptional(q)&&_(q)!==void 0)?I(q):x(q),R=q.checks?.length?E(X,q.checks,q):X,Y=q.annotations?.[A],W=Y?L.preprocess(Y,R):R,U=F.resolveDescription(q),j=F.resolveIdentifier(q),Z=U?W.describe(U):W;return j?Z.meta({ref:j}):Z}function I(q){let H=q.encoding;return H.reduce((G,J)=>G.transform((X)=>P(J.transformation,X)),V(H[0].to))}function P(q,H){let G=M.runSyncExit(q.decode.run(C.some(H),N));if(G._tag==="Failure")throw Error(`effect-zod: transform failed: ${String(G.cause)}`);return C.getOrElse(G.value,()=>H)}function E(q,H,G){let J=[],X=(W)=>{if(W._tag==="FilterGroup")W.checks.forEach(X);else J.push(W)};H.forEach(X);let R=[],Y=J.reduce((W,U)=>{let j=O(W,U);if(j)return j;return R.push(U),W},q);if(R.length===0)return Y;return Y.superRefine((W,U)=>{for(let j of R){let Z=j.run(W,G,N);if(!Z)continue;let Q=b(Z)??j.annotations?.message??"Validation failed";U.addIssue({code:"custom",message:Q})}})}function O(q,H){let G=H.annotations?.meta;if(!G||typeof G._tag!=="string")return;switch(G._tag){case"isInt":return K(q,"int");case"isFinite":return K(q,"finite");case"isGreaterThan":return K(q,"gt",G.exclusiveMinimum);case"isGreaterThanOrEqualTo":return K(q,"gte",G.minimum);case"isLessThan":return K(q,"lt",G.exclusiveMaximum);case"isLessThanOrEqualTo":return K(q,"lte",G.maximum);case"isBetween":{let J=G.exclusiveMinimum?K(q,"gt",G.minimum):K(q,"gte",G.minimum);if(!J)return;return G.exclusiveMaximum?K(J,"lt",G.maximum):K(J,"lte",G.maximum)}case"isMultipleOf":return K(q,"multipleOf",G.divisor);case"isMinLength":return K(q,"min",G.minLength);case"isMaxLength":return K(q,"max",G.maxLength);case"isLengthBetween":{let J=K(q,"min",G.minimum);if(!J)return;return K(J,"max",G.maximum)}case"isPattern":return K(q,"regex",G.regExp);case"isStartsWith":return K(q,"startsWith",G.startsWith);case"isEndsWith":return K(q,"endsWith",G.endsWith);case"isIncludes":return K(q,"includes",G.includes);case"isUUID":return K(q,"uuid");case"isULID":return K(q,"ulid");case"isBase64":return K(q,"base64");case"isBase64Url":return K(q,"base64url")}return}function K(q,H,...G){let J=q[H];return typeof J==="function"?J.apply(q,G):void 0}function b(q){if(typeof q?.annotations?.message==="string")return q.annotations.message;if(typeof q?.message==="string")return q.message;return}function x(q){if(F.isOptional(q))return T(q);switch(q._tag){case"String":return L.string();case"Number":return L.number();case"Boolean":return L.boolean();case"Null":return L.null();case"Undefined":return L.undefined();case"Any":case"Unknown":return L.unknown();case"Never":return L.never();case"Literal":return L.literal(q.literal);case"Union":return v(q);case"Objects":return w(q);case"Arrays":return S(q);case"Declaration":return z(q);default:return $(q)}}function T(q){if(q._tag!=="Union")return $(q);let H=q.types.filter((X)=>X._tag!=="Undefined"),G=H.length===1?V(H[0]):H.length>1?L.union(H.map(V)):L.undefined(),J=_(q);if(J!==void 0)return G.default(J.value);return G.optional()}function _(q){let H=q.encoding;if(!H?.length)return;for(let G of H){let J=M.runSyncExit(G.transformation.decode.run(C.none(),{}));if(J._tag!=="Success")continue;if(C.isSome(J.value))return{value:J.value.value}}return}function v(q){if(q.types.length>=2&&q.types.every((J)=>J._tag==="Literal"&&typeof J.literal==="string"))return L.enum(q.types.map((J)=>J.literal));let H=q.types.map(V);if(H.length===1)return H[0];if(H.length<2)return $(q);let G=q.annotations?.discriminator;if(typeof G==="string")return L.discriminatedUnion(G,H);return L.union(H)}function w(q){if(q.propertySignatures.length===0&&q.indexSignatures.length===1){let G=q.indexSignatures[0];if(G.parameter._tag!=="String")return $(q);return L.record(L.string(),V(G.type))}if(q.indexSignatures.length===0)return L.object(Object.fromEntries(q.propertySignatures.map((G)=>[String(G.name),V(G.type)])));if(q.indexSignatures.length!==1)return $(q);let H=q.indexSignatures[0];if(H.parameter._tag!=="String")return $(q);return L.object(Object.fromEntries(q.propertySignatures.map((G)=>[String(G.name),V(G.type)]))).catchall(V(H.type))}function S(q){if(q.elements.length===0){if(q.rest.length!==1)return $(q);return L.array(V(q.rest[0]))}if(q.rest.length>0)return $(q);let H=q.elements.map(V);return L.tuple(H)}function z(q){if(q.typeParameters.length!==1)return $(q);return V(q.typeParameters[0])}function $(q){let H=F.resolveIdentifier(q);throw Error(`unsupported effect schema: ${H??q._tag}`)}
3
+ export{g as ho,k as io,y as jo,A as ko,n as lo};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{te as Sw}from"./chunk-fnbpap62.js";import{xe as $w}from"./chunk-37n34pzd.js";import{ye as dw}from"./chunk-v2zp22r3.js";import{Ae as xw,Be as Cw,ze as Aw}from"./chunk-j9pcnkkq.js";import{Ce as Ew}from"./chunk-dq9kpj4a.js";import{uf as yw,vf as Rw,wf as Pw,xf as vw,yf as Tw}from"./chunk-cvdxgsq1.js";import"./chunk-aztre27e.js";var W=Cw(),j=xw(),L=Rw(),Q=Pw(),b=vw(),N=Ew(),H=Aw(),$=yw(),l=Sw(),D=Tw(),a=dw(),lw=$w(),mw=async(w,z,F)=>{return{operation:L.getSmithyContext(z).operation,region:await L.normalizeProvider(w.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function uw(w){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:w.region},propertiesExtractor:(z,F)=>({signingProperties:{config:z,context:F}})}}function hw(w){return{schemeId:"smithy.api#noAuth"}}var _w=(w)=>{let z=[];switch(w.operation){case"CreateOAuth2Token":{z.push(hw());break}default:z.push(uw(w))}return z},pw=(w)=>{let z=l.resolveAwsSdkSigV4Config(w);return Object.assign(z,{authSchemePreference:L.normalizeProvider(w.authSchemePreference??[])})},aw=(w)=>{return Object.assign(w,{useDualstackEndpoint:w.useDualstackEndpoint??!1,useFipsEndpoint:w.useFipsEndpoint??!1,defaultSigningName:"signin"})},sw={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fw="3.997.14",rw={version:fw},M="ref",B=-1,I=!0,s="isSet",Lw="PartitionResult",O="booleanEquals",S="getAttr",x="stringEquals",f={[M]:"Endpoint"},d={[M]:Lw},C={fn:S,argv:[d,"name"]},Z={},r=[{[M]:"Region"}],g={conditions:[[s,[f]],[s,r],["aws.partition",r,Lw],[O,[{[M]:"UseFIPS"},I]],[O,[{[M]:"UseDualStack"},I]],[O,[{fn:S,argv:[d,"supportsDualStack"]},I]],[O,[{fn:S,argv:[d,"supportsFIPS"]},I]],[x,[C,"aws"]],[x,[C,"aws-cn"]],[x,[C,"aws-us-gov"]]],results:[[B],[B,"Invalid Configuration: FIPS and custom endpoint are not supported"],[B,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[f,Z],["https://{Region}.signin.aws.amazon.com",Z],["https://{Region}.signin.amazonaws.cn",Z],["https://{Region}.signin.amazonaws-us-gov.com",Z],["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"FIPS is enabled but this partition does not support FIPS"],["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"DualStack is enabled but this partition does not support DualStack"],["https://signin.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"Invalid Configuration: Missing Region"]]},gw=2,G=1e8,cw=new Int32Array([-1,1,-1,0,15,3,1,4,G+14,2,5,G+14,3,11,6,4,10,7,7,G+4,8,8,G+5,9,9,G+6,G+13,5,G+11,G+12,4,13,12,6,G+9,G+10,5,14,G+8,6,G+7,G+8,3,G+1,16,4,G+2,G+3]),tw=b.BinaryDecisionDiagram.from(cw,gw,g.conditions,g.results),ew=new b.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ow=(w,z={})=>{return ew.get(w,()=>b.decideEndpoint(tw,{endpointParams:w,logger:z.logger}))};b.customEndpointFunctions.aws=W.awsEndpointFunctions;class q extends L.ServiceException{constructor(w){super(w);Object.setPrototypeOf(this,q.prototype)}}class R extends q{name="AccessDeniedException";$fault="client";error;constructor(w){super({name:"AccessDeniedException",$fault:"client",...w});Object.setPrototypeOf(this,R.prototype),this.error=w.error}}class P extends q{name="InternalServerException";$fault="server";error;constructor(w){super({name:"InternalServerException",$fault:"server",...w});Object.setPrototypeOf(this,P.prototype),this.error=w.error}}class v extends q{name="TooManyRequestsError";$fault="client";error;constructor(w){super({name:"TooManyRequestsError",$fault:"client",...w});Object.setPrototypeOf(this,v.prototype),this.error=w.error}}class T extends q{name="ValidationException";$fault="client";error;constructor(w){super({name:"ValidationException",$fault:"client",...w});Object.setPrototypeOf(this,T.prototype),this.error=w.error}}var iw="AccessDeniedException",nw="AccessToken",wz="CreateOAuth2Token",zz="CreateOAuth2TokenRequest",Fz="CreateOAuth2TokenRequestBody",Gz="CreateOAuth2TokenResponseBody",Jz="CreateOAuth2TokenResponse",Lz="InternalServerException",Qz="RefreshToken",Uz="TooManyRequestsError",Wz="ValidationException",c="accessKeyId",t="accessToken",m="client",e="clientId",o="codeVerifier",Xz="code",K="error",i="expiresIn",n="grantType",Yz="http",u="httpError",ww="idToken",U="jsonName",E="message",y="refreshToken",zw="redirectUri",Qw="smithy.ts.sdk.synthetic.com.amazonaws.signin",Fw="secretAccessKey",Gw="sessionToken",Zz="server",Kz="tokenInput",qz="tokenOutput",Jw="tokenType",X="com.amazonaws.signin",Uw=$.TypeRegistry.for(Qw),Ww=[-3,Qw,"SigninServiceException",0,[],[]];Uw.registerError(Ww,q);var k=$.TypeRegistry.for(X),Xw=[-3,X,iw,{[K]:m},[K,E],[0,0],2];k.registerError(Xw,R);var Yw=[-3,X,Lz,{[K]:Zz,[u]:500},[K,E],[0,0],2];k.registerError(Yw,P);var Zw=[-3,X,Uz,{[K]:m,[u]:429},[K,E],[0,0],2];k.registerError(Zw,v);var Kw=[-3,X,Wz,{[K]:m,[u]:400},[K,E],[0,0],2];k.registerError(Kw,T);var qw=[Uw,k],Bw=[0,X,Qz,8,0],Dw=[3,X,nw,8,[c,Fw,Gw],[[0,{[U]:c}],[0,{[U]:Fw}],[0,{[U]:Gw}]],3],bw=[3,X,zz,0,[Kz],[[()=>Hw,16]],1],Hw=[3,X,Fz,0,[e,n,Xz,zw,o,y],[[0,{[U]:e}],[0,{[U]:n}],0,[0,{[U]:zw}],[0,{[U]:o}],[()=>Bw,{[U]:y}]],2],Mw=[3,X,Jz,0,[qz],[[()=>kw,16]],1],kw=[3,X,Gz,0,[t,Jw,i,y,ww],[[()=>Dw,{[U]:t}],[0,{[U]:Jw}],[1,{[U]:i}],[()=>Bw,{[U]:y}],[0,{[U]:ww}]],4],Vw=[9,X,wz,{[Yz]:["POST","/v1/token",200]},()=>bw,()=>Mw],Bz=(w)=>{return{apiVersion:"2023-01-01",base64Decoder:w?.base64Decoder??D.fromBase64,base64Encoder:w?.base64Encoder??D.toBase64,disableHostPrefix:w?.disableHostPrefix??!1,endpointProvider:w?.endpointProvider??ow,extensions:w?.extensions??[],httpAuthSchemeProvider:w?.httpAuthSchemeProvider??_w,httpAuthSchemes:w?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(z)=>z.getIdentityProvider("aws.auth#sigv4"),signer:new l.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(z)=>z.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new j.NoAuthSigner}],logger:w?.logger??new L.NoOpLogger,protocol:w?.protocol??lw.AwsRestJsonProtocol,protocolSettings:w?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:qw,version:"2023-01-01",serviceTarget:"Signin"},serviceId:w?.serviceId??"Signin",urlParser:w?.urlParser??N.parseUrl,utf8Decoder:w?.utf8Decoder??D.fromUtf8,utf8Encoder:w?.utf8Encoder??D.toUtf8}},Dz=(w)=>{L.emitWarningIfUnsupportedVersion(process.version);let z=Q.resolveDefaultsModeConfig(w),F=()=>z().then(L.loadConfigsForDefaultMode),Y=Bz(w);W.emitWarningIfUnsupportedVersion(process.version);let J={profile:w?.profile,logger:Y.logger};return{...Y,...w,runtime:"node",defaultsMode:z,authSchemePreference:w?.authSchemePreference??Q.loadConfig(l.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,J),bodyLengthChecker:w?.bodyLengthChecker??D.calculateBodyLength,defaultUserAgentProvider:w?.defaultUserAgentProvider??W.createDefaultUserAgentProvider({serviceId:Y.serviceId,clientVersion:rw.version}),maxAttempts:w?.maxAttempts??Q.loadConfig(H.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,w),region:w?.region??Q.loadConfig(Q.NODE_REGION_CONFIG_OPTIONS,{...Q.NODE_REGION_CONFIG_FILE_OPTIONS,...J}),requestHandler:a.NodeHttpHandler.create(w?.requestHandler??F),retryMode:w?.retryMode??Q.loadConfig({...H.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await F()).retryMode||H.DEFAULT_RETRY_MODE},w),sha256:w?.sha256??D.Hash.bind(null,"sha256"),streamCollector:w?.streamCollector??a.streamCollector,useDualstackEndpoint:w?.useDualstackEndpoint??Q.loadConfig(Q.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,J),useFipsEndpoint:w?.useFipsEndpoint??Q.loadConfig(Q.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,J),userAgentAppId:w?.userAgentAppId??Q.loadConfig(W.NODE_APP_ID_CONFIG_OPTIONS,J)}},bz=(w)=>{let{httpAuthSchemes:z,httpAuthSchemeProvider:F,credentials:Y}=w;return{setHttpAuthScheme(J){let V=z.findIndex((A)=>A.schemeId===J.schemeId);if(V===-1)z.push(J);else z.splice(V,1,J)},httpAuthSchemes(){return z},setHttpAuthSchemeProvider(J){F=J},httpAuthSchemeProvider(){return F},setCredentials(J){Y=J},credentials(){return Y}}},Hz=(w)=>{return{httpAuthSchemes:w.httpAuthSchemes(),httpAuthSchemeProvider:w.httpAuthSchemeProvider(),credentials:w.credentials()}},Mz=(w,z)=>{let F=Object.assign(W.getAwsRegionExtensionConfiguration(w),L.getDefaultExtensionConfiguration(w),N.getHttpHandlerExtensionConfiguration(w),bz(w));return z.forEach((Y)=>Y.configure(F)),Object.assign(w,W.resolveAwsRegionExtensionConfiguration(F),L.resolveDefaultRuntimeConfig(F),N.resolveHttpHandlerRuntimeConfig(F),Hz(F))};class h extends L.Client{config;constructor(...[w]){let z=Dz(w||{});super(z);this.initConfig=z;let F=aw(z),Y=W.resolveUserAgentConfig(F),J=H.resolveRetryConfig(Y),V=Q.resolveRegionConfig(J),A=W.resolveHostHeaderConfig(V),Iw=b.resolveEndpointConfig(A),Ow=pw(Iw),jw=Mz(Ow,w?.extensions||[]);this.config=jw,this.middlewareStack.use($.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(W.getUserAgentPlugin(this.config)),this.middlewareStack.use(H.getRetryPlugin(this.config)),this.middlewareStack.use(N.getContentLengthPlugin(this.config)),this.middlewareStack.use(W.getHostHeaderPlugin(this.config)),this.middlewareStack.use(W.getLoggerPlugin(this.config)),this.middlewareStack.use(W.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(j.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:mw,identityProviderConfigProvider:async(Nw)=>new j.DefaultIdentityProviderConfig({"aws.auth#sigv4":Nw.credentials})})),this.middlewareStack.use(j.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class _ extends L.Command.classBuilder().ep(sw).m(function(w,z,F,Y){return[b.getEndpointPlugin(F,w.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(Vw).build(){}var kz={CreateOAuth2TokenCommand:_};class p extends h{}L.createAggregatedClient(kz,p);var Vz={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};var{Command:Iz,Client:Oz}=L,jz=R,Nz=Xw,yz=Dw,Rz=Vw,Pz=_,vz=bw,Tz=Hw,Ez=Mw,Az=kw,xz=P,Cz=Yw,Sz=Vz,dz=p,$z=h,lz=q,mz=Ww,uz=v,hz=Zw,_z=T,pz=Kw,az=qw;export{az as errorTypeRegistries,Oz as __Client,pz as ValidationException$,_z as ValidationException,hz as TooManyRequestsError$,uz as TooManyRequestsError,mz as SigninServiceException$,lz as SigninServiceException,$z as SigninClient,dz as Signin,Sz as OAuth2ErrorCode,Cz as InternalServerException$,xz as InternalServerException,Az as CreateOAuth2TokenResponseBody$,Ez as CreateOAuth2TokenResponse$,Tz as CreateOAuth2TokenRequestBody$,vz as CreateOAuth2TokenRequest$,Pz as CreateOAuth2TokenCommand,Rz as CreateOAuth2Token$,yz as AccessToken$,Nz as AccessDeniedException$,jz as AccessDeniedException,Iz as $Command};export default {get errorTypeRegistries(){return az},get __Client(){return Oz},get ValidationException$(){return pz},get ValidationException(){return _z},get TooManyRequestsError$(){return hz},get TooManyRequestsError(){return uz},get SigninServiceException$(){return mz},get SigninServiceException(){return lz},get SigninClient(){return $z},get Signin(){return dz},get OAuth2ErrorCode(){return Sz},get InternalServerException$(){return Cz},get InternalServerException(){return xz},get CreateOAuth2TokenResponseBody$(){return Az},get CreateOAuth2TokenResponse$(){return Ez},get CreateOAuth2TokenRequestBody$(){return Tz},get CreateOAuth2TokenRequest$(){return vz},get CreateOAuth2TokenCommand(){return Pz},get CreateOAuth2Token$(){return Rz},get AccessToken$(){return yz},get AccessDeniedException$(){return Nz},get AccessDeniedException(){return jz},get $Command(){return Iz}};
2
+ import{te as Sw}from"./chunk-yek0sk2q.js";import{xe as $w}from"./chunk-01my2y0c.js";import{ye as dw}from"./chunk-70ck4v3t.js";import{Ae as xw,Be as Cw,ze as Aw}from"./chunk-ht5w06x7.js";import{Ce as Ew}from"./chunk-enpzvmtc.js";import{uf as yw,vf as Rw,wf as Pw,xf as vw,yf as Tw}from"./chunk-tq0239xp.js";import"./chunk-7xm75w1e.js";var W=Cw(),j=xw(),L=Rw(),Q=Pw(),b=vw(),N=Ew(),H=Aw(),$=yw(),l=Sw(),D=Tw(),a=dw(),lw=$w(),mw=async(w,z,F)=>{return{operation:L.getSmithyContext(z).operation,region:await L.normalizeProvider(w.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function uw(w){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:w.region},propertiesExtractor:(z,F)=>({signingProperties:{config:z,context:F}})}}function hw(w){return{schemeId:"smithy.api#noAuth"}}var _w=(w)=>{let z=[];switch(w.operation){case"CreateOAuth2Token":{z.push(hw());break}default:z.push(uw(w))}return z},pw=(w)=>{let z=l.resolveAwsSdkSigV4Config(w);return Object.assign(z,{authSchemePreference:L.normalizeProvider(w.authSchemePreference??[])})},aw=(w)=>{return Object.assign(w,{useDualstackEndpoint:w.useDualstackEndpoint??!1,useFipsEndpoint:w.useFipsEndpoint??!1,defaultSigningName:"signin"})},sw={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fw="3.997.14",rw={version:fw},M="ref",B=-1,I=!0,s="isSet",Lw="PartitionResult",O="booleanEquals",S="getAttr",x="stringEquals",f={[M]:"Endpoint"},d={[M]:Lw},C={fn:S,argv:[d,"name"]},Z={},r=[{[M]:"Region"}],g={conditions:[[s,[f]],[s,r],["aws.partition",r,Lw],[O,[{[M]:"UseFIPS"},I]],[O,[{[M]:"UseDualStack"},I]],[O,[{fn:S,argv:[d,"supportsDualStack"]},I]],[O,[{fn:S,argv:[d,"supportsFIPS"]},I]],[x,[C,"aws"]],[x,[C,"aws-cn"]],[x,[C,"aws-us-gov"]]],results:[[B],[B,"Invalid Configuration: FIPS and custom endpoint are not supported"],[B,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[f,Z],["https://{Region}.signin.aws.amazon.com",Z],["https://{Region}.signin.amazonaws.cn",Z],["https://{Region}.signin.amazonaws-us-gov.com",Z],["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"FIPS is enabled but this partition does not support FIPS"],["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"DualStack is enabled but this partition does not support DualStack"],["https://signin.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"Invalid Configuration: Missing Region"]]},gw=2,G=1e8,cw=new Int32Array([-1,1,-1,0,15,3,1,4,G+14,2,5,G+14,3,11,6,4,10,7,7,G+4,8,8,G+5,9,9,G+6,G+13,5,G+11,G+12,4,13,12,6,G+9,G+10,5,14,G+8,6,G+7,G+8,3,G+1,16,4,G+2,G+3]),tw=b.BinaryDecisionDiagram.from(cw,gw,g.conditions,g.results),ew=new b.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ow=(w,z={})=>{return ew.get(w,()=>b.decideEndpoint(tw,{endpointParams:w,logger:z.logger}))};b.customEndpointFunctions.aws=W.awsEndpointFunctions;class q extends L.ServiceException{constructor(w){super(w);Object.setPrototypeOf(this,q.prototype)}}class R extends q{name="AccessDeniedException";$fault="client";error;constructor(w){super({name:"AccessDeniedException",$fault:"client",...w});Object.setPrototypeOf(this,R.prototype),this.error=w.error}}class P extends q{name="InternalServerException";$fault="server";error;constructor(w){super({name:"InternalServerException",$fault:"server",...w});Object.setPrototypeOf(this,P.prototype),this.error=w.error}}class v extends q{name="TooManyRequestsError";$fault="client";error;constructor(w){super({name:"TooManyRequestsError",$fault:"client",...w});Object.setPrototypeOf(this,v.prototype),this.error=w.error}}class T extends q{name="ValidationException";$fault="client";error;constructor(w){super({name:"ValidationException",$fault:"client",...w});Object.setPrototypeOf(this,T.prototype),this.error=w.error}}var iw="AccessDeniedException",nw="AccessToken",wz="CreateOAuth2Token",zz="CreateOAuth2TokenRequest",Fz="CreateOAuth2TokenRequestBody",Gz="CreateOAuth2TokenResponseBody",Jz="CreateOAuth2TokenResponse",Lz="InternalServerException",Qz="RefreshToken",Uz="TooManyRequestsError",Wz="ValidationException",c="accessKeyId",t="accessToken",m="client",e="clientId",o="codeVerifier",Xz="code",K="error",i="expiresIn",n="grantType",Yz="http",u="httpError",ww="idToken",U="jsonName",E="message",y="refreshToken",zw="redirectUri",Qw="smithy.ts.sdk.synthetic.com.amazonaws.signin",Fw="secretAccessKey",Gw="sessionToken",Zz="server",Kz="tokenInput",qz="tokenOutput",Jw="tokenType",X="com.amazonaws.signin",Uw=$.TypeRegistry.for(Qw),Ww=[-3,Qw,"SigninServiceException",0,[],[]];Uw.registerError(Ww,q);var k=$.TypeRegistry.for(X),Xw=[-3,X,iw,{[K]:m},[K,E],[0,0],2];k.registerError(Xw,R);var Yw=[-3,X,Lz,{[K]:Zz,[u]:500},[K,E],[0,0],2];k.registerError(Yw,P);var Zw=[-3,X,Uz,{[K]:m,[u]:429},[K,E],[0,0],2];k.registerError(Zw,v);var Kw=[-3,X,Wz,{[K]:m,[u]:400},[K,E],[0,0],2];k.registerError(Kw,T);var qw=[Uw,k],Bw=[0,X,Qz,8,0],Dw=[3,X,nw,8,[c,Fw,Gw],[[0,{[U]:c}],[0,{[U]:Fw}],[0,{[U]:Gw}]],3],bw=[3,X,zz,0,[Kz],[[()=>Hw,16]],1],Hw=[3,X,Fz,0,[e,n,Xz,zw,o,y],[[0,{[U]:e}],[0,{[U]:n}],0,[0,{[U]:zw}],[0,{[U]:o}],[()=>Bw,{[U]:y}]],2],Mw=[3,X,Jz,0,[qz],[[()=>kw,16]],1],kw=[3,X,Gz,0,[t,Jw,i,y,ww],[[()=>Dw,{[U]:t}],[0,{[U]:Jw}],[1,{[U]:i}],[()=>Bw,{[U]:y}],[0,{[U]:ww}]],4],Vw=[9,X,wz,{[Yz]:["POST","/v1/token",200]},()=>bw,()=>Mw],Bz=(w)=>{return{apiVersion:"2023-01-01",base64Decoder:w?.base64Decoder??D.fromBase64,base64Encoder:w?.base64Encoder??D.toBase64,disableHostPrefix:w?.disableHostPrefix??!1,endpointProvider:w?.endpointProvider??ow,extensions:w?.extensions??[],httpAuthSchemeProvider:w?.httpAuthSchemeProvider??_w,httpAuthSchemes:w?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(z)=>z.getIdentityProvider("aws.auth#sigv4"),signer:new l.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(z)=>z.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new j.NoAuthSigner}],logger:w?.logger??new L.NoOpLogger,protocol:w?.protocol??lw.AwsRestJsonProtocol,protocolSettings:w?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:qw,version:"2023-01-01",serviceTarget:"Signin"},serviceId:w?.serviceId??"Signin",urlParser:w?.urlParser??N.parseUrl,utf8Decoder:w?.utf8Decoder??D.fromUtf8,utf8Encoder:w?.utf8Encoder??D.toUtf8}},Dz=(w)=>{L.emitWarningIfUnsupportedVersion(process.version);let z=Q.resolveDefaultsModeConfig(w),F=()=>z().then(L.loadConfigsForDefaultMode),Y=Bz(w);W.emitWarningIfUnsupportedVersion(process.version);let J={profile:w?.profile,logger:Y.logger};return{...Y,...w,runtime:"node",defaultsMode:z,authSchemePreference:w?.authSchemePreference??Q.loadConfig(l.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,J),bodyLengthChecker:w?.bodyLengthChecker??D.calculateBodyLength,defaultUserAgentProvider:w?.defaultUserAgentProvider??W.createDefaultUserAgentProvider({serviceId:Y.serviceId,clientVersion:rw.version}),maxAttempts:w?.maxAttempts??Q.loadConfig(H.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,w),region:w?.region??Q.loadConfig(Q.NODE_REGION_CONFIG_OPTIONS,{...Q.NODE_REGION_CONFIG_FILE_OPTIONS,...J}),requestHandler:a.NodeHttpHandler.create(w?.requestHandler??F),retryMode:w?.retryMode??Q.loadConfig({...H.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await F()).retryMode||H.DEFAULT_RETRY_MODE},w),sha256:w?.sha256??D.Hash.bind(null,"sha256"),streamCollector:w?.streamCollector??a.streamCollector,useDualstackEndpoint:w?.useDualstackEndpoint??Q.loadConfig(Q.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,J),useFipsEndpoint:w?.useFipsEndpoint??Q.loadConfig(Q.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,J),userAgentAppId:w?.userAgentAppId??Q.loadConfig(W.NODE_APP_ID_CONFIG_OPTIONS,J)}},bz=(w)=>{let{httpAuthSchemes:z,httpAuthSchemeProvider:F,credentials:Y}=w;return{setHttpAuthScheme(J){let V=z.findIndex((A)=>A.schemeId===J.schemeId);if(V===-1)z.push(J);else z.splice(V,1,J)},httpAuthSchemes(){return z},setHttpAuthSchemeProvider(J){F=J},httpAuthSchemeProvider(){return F},setCredentials(J){Y=J},credentials(){return Y}}},Hz=(w)=>{return{httpAuthSchemes:w.httpAuthSchemes(),httpAuthSchemeProvider:w.httpAuthSchemeProvider(),credentials:w.credentials()}},Mz=(w,z)=>{let F=Object.assign(W.getAwsRegionExtensionConfiguration(w),L.getDefaultExtensionConfiguration(w),N.getHttpHandlerExtensionConfiguration(w),bz(w));return z.forEach((Y)=>Y.configure(F)),Object.assign(w,W.resolveAwsRegionExtensionConfiguration(F),L.resolveDefaultRuntimeConfig(F),N.resolveHttpHandlerRuntimeConfig(F),Hz(F))};class h extends L.Client{config;constructor(...[w]){let z=Dz(w||{});super(z);this.initConfig=z;let F=aw(z),Y=W.resolveUserAgentConfig(F),J=H.resolveRetryConfig(Y),V=Q.resolveRegionConfig(J),A=W.resolveHostHeaderConfig(V),Iw=b.resolveEndpointConfig(A),Ow=pw(Iw),jw=Mz(Ow,w?.extensions||[]);this.config=jw,this.middlewareStack.use($.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(W.getUserAgentPlugin(this.config)),this.middlewareStack.use(H.getRetryPlugin(this.config)),this.middlewareStack.use(N.getContentLengthPlugin(this.config)),this.middlewareStack.use(W.getHostHeaderPlugin(this.config)),this.middlewareStack.use(W.getLoggerPlugin(this.config)),this.middlewareStack.use(W.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(j.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:mw,identityProviderConfigProvider:async(Nw)=>new j.DefaultIdentityProviderConfig({"aws.auth#sigv4":Nw.credentials})})),this.middlewareStack.use(j.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class _ extends L.Command.classBuilder().ep(sw).m(function(w,z,F,Y){return[b.getEndpointPlugin(F,w.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(Vw).build(){}var kz={CreateOAuth2TokenCommand:_};class p extends h{}L.createAggregatedClient(kz,p);var Vz={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};var{Command:Iz,Client:Oz}=L,jz=R,Nz=Xw,yz=Dw,Rz=Vw,Pz=_,vz=bw,Tz=Hw,Ez=Mw,Az=kw,xz=P,Cz=Yw,Sz=Vz,dz=p,$z=h,lz=q,mz=Ww,uz=v,hz=Zw,_z=T,pz=Kw,az=qw;export{az as errorTypeRegistries,Oz as __Client,pz as ValidationException$,_z as ValidationException,hz as TooManyRequestsError$,uz as TooManyRequestsError,mz as SigninServiceException$,lz as SigninServiceException,$z as SigninClient,dz as Signin,Sz as OAuth2ErrorCode,Cz as InternalServerException$,xz as InternalServerException,Az as CreateOAuth2TokenResponseBody$,Ez as CreateOAuth2TokenResponse$,Tz as CreateOAuth2TokenRequestBody$,vz as CreateOAuth2TokenRequest$,Pz as CreateOAuth2TokenCommand,Rz as CreateOAuth2Token$,yz as AccessToken$,Nz as AccessDeniedException$,jz as AccessDeniedException,Iz as $Command};export default {get errorTypeRegistries(){return az},get __Client(){return Oz},get ValidationException$(){return pz},get ValidationException(){return _z},get TooManyRequestsError$(){return hz},get TooManyRequestsError(){return uz},get SigninServiceException$(){return mz},get SigninServiceException(){return lz},get SigninClient(){return $z},get Signin(){return dz},get OAuth2ErrorCode(){return Sz},get InternalServerException$(){return Cz},get InternalServerException(){return xz},get CreateOAuth2TokenResponseBody$(){return Az},get CreateOAuth2TokenResponse$(){return Ez},get CreateOAuth2TokenRequestBody$(){return Tz},get CreateOAuth2TokenRequest$(){return vz},get CreateOAuth2TokenCommand(){return Pz},get CreateOAuth2Token$(){return Rz},get AccessToken$(){return yz},get AccessDeniedException$(){return Nz},get AccessDeniedException(){return jz},get $Command(){return Iz}};
@@ -1,2 +1,2 @@
1
1
  // @bun
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};
2
+ import"./chunk-kdcnder5.js";import"./chunk-7xm75w1e.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};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Or as C}from"./chunk-q6ztpfcs.js";import{spawn as E}from"child_process";async function H(z){if(process.platform==="linux"){if(await new Promise((D)=>{let A=!1,x=(j)=>{if(A)return;A=!0,D(j)};try{let j=E("xdg-open",[z],{stdio:"ignore",detached:!0});j.once("error",()=>x(!1)),j.once("spawn",()=>{j.unref(),x(!0)})}catch{x(!1)}}))return!0}try{let q=await C(z);if(!q)return!1;return q.once("error",()=>{}),!0}catch{return!1}}
3
- export{H as bi};
2
+ import{oq as C}from"./chunk-jbx3s7nw.js";import{spawn as E}from"child_process";async function H(z){if(process.platform==="linux"){if(await new Promise((D)=>{let A=!1,x=(j)=>{if(A)return;A=!0,D(j)};try{let j=E("xdg-open",[z],{stdio:"ignore",detached:!0});j.once("error",()=>x(!1)),j.once("spawn",()=>{j.unref(),x(!0)})}catch{x(!1)}}))return!0}try{let q=await C(z);if(!q)return!1;return q.once("error",()=>{}),!0}catch{return!1}}
3
+ export{H as ai};
@@ -1,2 +1,2 @@
1
1
  // @bun
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};
2
+ import{Cp as p,Dp as u,Ip as _,Kp as yG,Lp as YG,Mp as d,Np as IG,Op as RG,Qp as xG,Ro as g,To as FG,Vo as NG,Xo as wG,Yo as QG,Zo as SG,fp as $G,kp as OG,lp as XG,op as fG,sp as v,vp as k,wp as s,zp as CG}from"./chunk-2maqde7w.js";import{Sp as l,Tp as GG,aq as BG,dq as c}from"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import{St as G}from"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-7xm75w1e.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{wd as a}from"./chunk-tge53d52.js";import"./chunk-bzgj60w4.js";import"./chunk-aztre27e.js";export{a as dict};
2
+ import{wd as a}from"./chunk-tge53d52.js";import"./chunk-bzgj60w4.js";import"./chunk-7xm75w1e.js";export{a as dict};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{aq as J}from"./chunk-1sgby720.js";import{Eu as H,Fu as I,Gu as N,Qu as Q}from"./chunk-whxjkz9a.js";import{dQ as L}from"./chunk-aztre27e.js";import{platform as R,release as U}from"os";import{tmpdir as V}from"os";import X from"path";import Y from"fs/promises";var Z=J(async()=>{let{which:D}=await import("./chunk-3f4zht9e.js");return D}),T=J(async()=>{let{default:D}=await import("./chunk-h0rpmne5.js");return D});function _(D){if(!process.stdout.isTTY)return;let A=`\x1B]52;c;${Buffer.from(D).toString("base64")}\x07`,E=process.env.TMUX||process.env.STY?`\x1BPtmux;\x1B${A}\x1B\\`:A;process.stdout.write(E)}async function $(){let D=R();if(D==="darwin"){let k=X.join(V(),"qitqode-clipboard.png");try{return await I(["osascript","-e",'set imageData to the clipboard as "PNGf"',"-e",`set fileRef to open for access POSIX file "${k}" with write permission`,"-e","set eof fileRef to 0","-e","write imageData to fileRef","-e","close access fileRef"],{nothrow:!0}),{data:(await Q(k)).toString("base64"),mime:"image/png"}}catch{}finally{await Y.rm(k,{force:!0}).catch(()=>{})}}if(D==="win32"||U().includes("WSL")){let E=await N(["powershell.exe","-NonInteractive","-NoProfile","-command","Add-Type -AssemblyName System.Windows.Forms; $img = [System.Windows.Forms.Clipboard]::GetImage(); if ($img) { $ms = New-Object System.IO.MemoryStream; $img.Save($ms, [System.Drawing.Imaging.ImageFormat]::Png); [System.Convert]::ToBase64String($ms.ToArray()) }"],{nothrow:!0});if(E.text){let K=Buffer.from(E.text.trim(),"base64");if(K.length>0)return{data:K.toString("base64"),mime:"image/png"}}}if(D==="linux"){let k=await I(["wl-paste","-t","image/png"],{nothrow:!0});if(k.stdout.byteLength>0)return{data:Buffer.from(k.stdout).toString("base64"),mime:"image/png"};let E=await I(["xclip","-selection","clipboard","-t","image/png","-o"],{nothrow:!0});if(E.stdout.byteLength>0)return{data:Buffer.from(E.stdout).toString("base64"),mime:"image/png"}}let A=await(await T()).read().catch(()=>{});if(A)return{data:A,mime:"text/plain"}}var j=J(async()=>{let D=R(),G=await Z();if(D==="darwin"&&G("osascript"))return console.log("clipboard: using osascript"),async(A)=>{let k=A.replace(/\\/g,"\\\\").replace(/"/g,"\\\"");await I(["osascript","-e",`set the clipboard to "${k}"`],{nothrow:!0})};if(D==="linux"){if(process.env.WAYLAND_DISPLAY&&G("wl-copy"))return console.log("clipboard: using wl-copy"),async(A)=>{let k=H(["wl-copy"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};if(G("xclip"))return console.log("clipboard: using xclip"),async(A)=>{let k=H(["xclip","-selection","clipboard"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};if(G("xsel"))return console.log("clipboard: using xsel"),async(A)=>{let k=H(["xsel","--clipboard","--input"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})}}if(D==="win32")return console.log("clipboard: using powershell"),async(A)=>{let k=H(["powershell.exe","-NonInteractive","-NoProfile","-Command","[Console]::InputEncoding = [System.Text.Encoding]::UTF8; Set-Clipboard -Value ([Console]::In.ReadToEnd())"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};return console.log("clipboard: no native support"),async(A)=>{await(await T()).write(A).catch(()=>{})}});async function v(D){_(D),await(await j())(D)}
2
+ import{Co as J}from"./chunk-2hc5z7b5.js";import{et as H,ft as I,gt as N,qt as Q}from"./chunk-tqj69nh6.js";import{FO as L}from"./chunk-7xm75w1e.js";import{platform as R,release as U}from"os";import{tmpdir as V}from"os";import X from"path";import Y from"fs/promises";var Z=J(async()=>{let{which:D}=await import("./chunk-r8m7rtfc.js");return D}),T=J(async()=>{let{default:D}=await import("./chunk-yp8wyzzm.js");return D});function _(D){if(!process.stdout.isTTY)return;let A=`\x1B]52;c;${Buffer.from(D).toString("base64")}\x07`,E=process.env.TMUX||process.env.STY?`\x1BPtmux;\x1B${A}\x1B\\`:A;process.stdout.write(E)}async function $(){let D=R();if(D==="darwin"){let k=X.join(V(),"qitqode-clipboard.png");try{return await I(["osascript","-e",'set imageData to the clipboard as "PNGf"',"-e",`set fileRef to open for access POSIX file "${k}" with write permission`,"-e","set eof fileRef to 0","-e","write imageData to fileRef","-e","close access fileRef"],{nothrow:!0}),{data:(await Q(k)).toString("base64"),mime:"image/png"}}catch{}finally{await Y.rm(k,{force:!0}).catch(()=>{})}}if(D==="win32"||U().includes("WSL")){let E=await N(["powershell.exe","-NonInteractive","-NoProfile","-command","Add-Type -AssemblyName System.Windows.Forms; $img = [System.Windows.Forms.Clipboard]::GetImage(); if ($img) { $ms = New-Object System.IO.MemoryStream; $img.Save($ms, [System.Drawing.Imaging.ImageFormat]::Png); [System.Convert]::ToBase64String($ms.ToArray()) }"],{nothrow:!0});if(E.text){let K=Buffer.from(E.text.trim(),"base64");if(K.length>0)return{data:K.toString("base64"),mime:"image/png"}}}if(D==="linux"){let k=await I(["wl-paste","-t","image/png"],{nothrow:!0});if(k.stdout.byteLength>0)return{data:Buffer.from(k.stdout).toString("base64"),mime:"image/png"};let E=await I(["xclip","-selection","clipboard","-t","image/png","-o"],{nothrow:!0});if(E.stdout.byteLength>0)return{data:Buffer.from(E.stdout).toString("base64"),mime:"image/png"}}let A=await(await T()).read().catch(()=>{});if(A)return{data:A,mime:"text/plain"}}var j=J(async()=>{let D=R(),G=await Z();if(D==="darwin"&&G("osascript"))return console.log("clipboard: using osascript"),async(A)=>{let k=A.replace(/\\/g,"\\\\").replace(/"/g,"\\\"");await I(["osascript","-e",`set the clipboard to "${k}"`],{nothrow:!0})};if(D==="linux"){if(process.env.WAYLAND_DISPLAY&&G("wl-copy"))return console.log("clipboard: using wl-copy"),async(A)=>{let k=H(["wl-copy"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};if(G("xclip"))return console.log("clipboard: using xclip"),async(A)=>{let k=H(["xclip","-selection","clipboard"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};if(G("xsel"))return console.log("clipboard: using xsel"),async(A)=>{let k=H(["xsel","--clipboard","--input"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})}}if(D==="win32")return console.log("clipboard: using powershell"),async(A)=>{let k=H(["powershell.exe","-NonInteractive","-NoProfile","-Command","[Console]::InputEncoding = [System.Text.Encoding]::UTF8; Set-Clipboard -Value ([Console]::In.ReadToEnd())"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};return console.log("clipboard: no native support"),async(A)=>{await(await T()).write(A).catch(()=>{})}});async function v(D){_(D),await(await j())(D)}
3
3
  export{$ as ud,v as vd};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Fd as m,Id as P,Jd as R,Kd as k,Ld as O,Nd as q,Od as $,Pd as I}from"./chunk-p62gb4wj.js";import"./chunk-x4sp99g6.js";import{Rd as h}from"./chunk-yajd975f.js";import{Vf as r}from"./chunk-rbk8seme.js";import{gh as L}from"./chunk-caj1b9y7.js";import{Uh as E}from"./chunk-ygs5pzk7.js";import"./chunk-vxyy2dp3.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-5hw6xa49.js";import"./chunk-326p5b10.js";import{ck as N,rl as x}from"./chunk-257me4z3.js";import"./chunk-nkkch4h7.js";import{lm as i}from"./chunk-s3mnrhbx.js";import"./chunk-ezfy0b6q.js";import"./chunk-bn0h9dny.js";import"./chunk-hnvn2c25.js";import"./chunk-3nx7112w.js";import"./chunk-htz93dsd.js";import"./chunk-vcw00k0n.js";import"./chunk-we9cv8we.js";import"./chunk-2hc5z7b5.js";import"./chunk-9gazyynx.js";import"./chunk-4jtxtkj7.js";import"./chunk-ay8emwym.js";import"./chunk-2maqde7w.js";import"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import"./chunk-g5rabwre.js";import"./chunk-jbx3s7nw.js";import"./chunk-15hw2z9t.js";import"./chunk-48ge2ryx.js";import"./chunk-n9xns8by.js";import"./chunk-y9q0hb7b.js";import"./chunk-d9hbhkbq.js";import"./chunk-ad72gb5f.js";import"./chunk-d6ry9418.js";import"./chunk-0dt0bxz6.js";import"./chunk-10bjs581.js";import"./chunk-4cnwn1rh.js";import"./chunk-764fksh3.js";import{Qs as j}from"./chunk-xj765svc.js";import{st as C}from"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-5tray1fw.js";import"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-gagtmjmp.js";import"./chunk-zs8kqdsf.js";import"./chunk-dxpj0cxh.js";import"./chunk-zw815d68.js";import{BO as F}from"./chunk-7xm75w1e.js";import u from"path";import U from"fs/promises";var T=F(N(),1);import{EOL as S}from"os";var c=["bash","read","write","edit","glob","grep","webfetch","actor","task"],B=h({command:"create",describe:"create a new agent",builder:(o)=>o.option("path",{type:"string",describe:"directory path to generate the agent file"}).option("description",{type:"string",describe:"what the agent should do"}).option("mode",{type:"string",describe:"agent mode",choices:["all","primary","subagent"]}).option("tools",{type:"string",describe:`comma-separated list of tools to enable (default: all). Available: "${c.join(", ")}"`}).option("model",{type:"string",alias:["m"],describe:"model to use in the format of provider/model"}),async handler(o){await i.provide({directory:process.cwd(),async fn(){let{path:l,description:t,mode:s,tools:p}=o,d=l&&t&&s&&p!==void 0;if(!d)r.empty(),R("Create agent");let D=i.project,g;if(l)g=u.join(l,"agent");else{let e="global";if(D.vcs==="git"){let n=await $({message:"Location",options:[{label:"Current project",value:"project",hint:i.worktree},{label:"Global",value:"global",hint:j.Path.config}]});if(m(n))throw new r.CancelledError;e=n}g=u.join(e==="global"?j.Path.config:u.join(i.worktree,".qitqode"),"agent")}let b;if(t)b=t;else{let e=await I({message:"Description",placeholder:"What should this agent do?",validate:(n)=>n&&n.length>0?void 0:"Required"});if(m(e))throw new r.CancelledError;b=e}let w=q();w.start("Generating agent configuration...");let G=o.model?x.parseModel(o.model):void 0,f=await L.runPromise(E.Service.use((e)=>e.generate({description:b,model:G}))).catch((e)=>{if(w.stop(`LLM failed to generate agent: ${e.message}`,1),d)process.exit(1);throw new r.CancelledError});w.stop(`Agent ${f.identifier} generated`);let y;if(p!==void 0)y=p?p.split(",").map((e)=>e.trim()):c;else{let e=await O({message:"Select tools to enable (Space to toggle)",options:c.map((n)=>({label:n,value:n})),initialValues:c});if(m(e))throw new r.CancelledError;y=e}let v;if(s)v=s;else{let e=await $({message:"Agent mode",options:[{label:"All",value:"all",hint:"Can function in both primary and subagent roles"},{label:"Primary",value:"primary",hint:"Acts as a primary/main agent"},{label:"Subagent",value:"subagent",hint:"Can be used as a subagent by other agents"}],initialValue:"all"});if(m(e))throw new r.CancelledError;v=e}let A={};for(let e of c)if(!y.includes(e))A[e]=!1;let M={description:f.whenToUse,mode:v};if(Object.keys(A).length>0)M.tools=A;let V=T.default.stringify(f.systemPrompt,M),a=u.join(g,`${f.identifier}.md`);if(await U.mkdir(g,{recursive:!0}),await C.exists(a)){if(d)console.error(`Error: Agent file already exists: ${a}`),process.exit(1);throw P.error(`Agent file already exists: ${a}`),new r.CancelledError}if(await C.write(a,V),d)console.log(a);else P.success(`Agent created: ${a}`),k("Done")}})}}),J=h({command:"list",describe:"list all available agents",async handler(){await i.provide({directory:process.cwd(),async fn(){let l=(await L.runPromise(E.Service.use((t)=>t.list()))).sort((t,s)=>{if(t.native!==s.native)return t.native?-1:1;return t.name.localeCompare(s.name)});for(let t of l)process.stdout.write(`${t.name} (${t.mode})`+S),process.stdout.write(` ${JSON.stringify(t.permission,null,2)}`+S)}})}}),ne=h({command:"agent",describe:"manage agents",builder:(o)=>o.command(B).command(J).demandCommand(),async handler(){}});export{ne as AgentCommand};