@qitqode/qitqode-android-arm64 0.1.35 → 0.1.36

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 (451) hide show
  1. package/bundle/{chunk-7311jry1.js → chunk-00sr2gwz.js} +2 -2
  2. package/bundle/{chunk-azhw650z.js → chunk-02xcb52z.js} +2 -2
  3. package/bundle/{chunk-gws1rn1v.js → chunk-08q55ya0.js} +1 -1
  4. package/bundle/chunk-092bx2yw.js +2 -0
  5. package/bundle/{chunk-xgr6jnd6.js → chunk-0g25z230.js} +1 -1
  6. package/bundle/chunk-0j6dhrew.js +2 -0
  7. package/bundle/chunk-0jrgk6vk.js +2 -0
  8. package/bundle/chunk-0qn52zsd.js +2 -0
  9. package/bundle/chunk-10accb7b.js +2 -0
  10. package/bundle/{chunk-t3eymzg1.js → chunk-132tcp2j.js} +2 -2
  11. package/bundle/chunk-13kpdfr7.js +2 -0
  12. package/bundle/chunk-15s8zwgf.js +2 -0
  13. package/bundle/{chunk-nj4d554m.js → chunk-1bx2sjn6.js} +1 -1
  14. package/bundle/chunk-1kgyfja6.js +2 -0
  15. package/bundle/{chunk-bv29k2pf.js → chunk-1mcsf4yb.js} +2 -2
  16. package/bundle/{chunk-kwx9ewe0.js → chunk-1wpjmwnh.js} +1 -1
  17. package/bundle/chunk-1yv5h8k4.js +2 -0
  18. package/bundle/chunk-24rw1br0.js +3 -0
  19. package/bundle/{chunk-snr44en9.js → chunk-25bp7pcm.js} +2 -2
  20. package/bundle/{chunk-kmcsz8yv.js → chunk-2dkrfc1s.js} +1 -1
  21. package/bundle/chunk-364ccew0.js +3 -0
  22. package/bundle/{chunk-aa8hymcv.js → chunk-37dvnent.js} +2 -2
  23. package/bundle/chunk-3bkdbqjj.js +2 -0
  24. package/bundle/chunk-3bnqw3xp.js +3 -0
  25. package/bundle/{chunk-08m0hkdz.js → chunk-3dr4469n.js} +1 -1
  26. package/bundle/{chunk-hv6eccx1.js → chunk-3gw6r3hf.js} +179 -179
  27. package/bundle/{chunk-n96tvjgj.js → chunk-3mepk08v.js} +2 -2
  28. package/bundle/chunk-3sz6gw10.js +3 -0
  29. package/bundle/chunk-41x11r2s.js +3 -0
  30. package/bundle/{chunk-xqdrr7xg.js → chunk-45mjcxqk.js} +1 -1
  31. package/bundle/{chunk-qrtc3etn.js → chunk-4fa390yr.js} +2 -2
  32. package/bundle/chunk-4gs87ghj.js +3 -0
  33. package/bundle/chunk-4kqdzdv5.js +3 -0
  34. package/bundle/{chunk-3k2b05fv.js → chunk-4sazy0nq.js} +1 -1
  35. package/bundle/chunk-4tbqsrsn.js +2 -0
  36. package/bundle/{chunk-ngccf7ga.js → chunk-52b1v7mn.js} +1 -1
  37. package/bundle/chunk-53kns5wy.js +2 -0
  38. package/bundle/{chunk-11v7vz3y.js → chunk-549ptbaj.js} +1 -1
  39. package/bundle/chunk-559ek1ym.js +2 -0
  40. package/bundle/{chunk-34p46th6.js → chunk-5bate758.js} +1 -1
  41. package/bundle/{chunk-kdcnder5.js → chunk-5kmfnkzv.js} +1 -1
  42. package/bundle/{chunk-w1n4rf6n.js → chunk-5pkg052s.js} +2 -2
  43. package/bundle/chunk-5yfzzmv0.js +2 -0
  44. package/bundle/{chunk-rsszcqxd.js → chunk-60qyqqxx.js} +1 -1
  45. package/bundle/{chunk-94pcpztx.js → chunk-64s7vfj7.js} +2 -2
  46. package/bundle/{chunk-bzgj60w4.js → chunk-6sfhbckv.js} +1 -1
  47. package/bundle/{chunk-8762ty72.js → chunk-70pb4kcm.js} +2 -2
  48. package/bundle/{chunk-04hvaaje.js → chunk-72zxassf.js} +1 -1
  49. package/bundle/{chunk-yz6898wy.js → chunk-73ckx171.js} +1 -1
  50. package/bundle/chunk-7cbj28fp.js +2 -0
  51. package/bundle/chunk-7dep7g7c.js +2 -0
  52. package/bundle/{chunk-gj0wt0cy.js → chunk-7fawtcnn.js} +1 -1
  53. package/bundle/{chunk-zfn0z4sh.js → chunk-7gbytqkn.js} +2 -2
  54. package/bundle/{chunk-x66ycpfs.js → chunk-7jhrxzjx.js} +2 -2
  55. package/bundle/{chunk-09pkckr1.js → chunk-7vftsy04.js} +1 -1
  56. package/bundle/{chunk-zfd70p01.js → chunk-8dxdeksr.js} +1 -1
  57. package/bundle/{chunk-6styp5dn.js → chunk-8fgamz4y.js} +1 -1
  58. package/bundle/{chunk-9qdr9t8c.js → chunk-8q6z6emx.js} +1 -1
  59. package/bundle/{chunk-4ttf9rjd.js → chunk-8r3410c2.js} +1 -1
  60. package/bundle/{chunk-3mzcr3fw.js → chunk-8tp4whyw.js} +1 -1
  61. package/bundle/chunk-8yn64y27.js +2 -0
  62. package/bundle/{chunk-41v0x1jk.js → chunk-8yr682pv.js} +2 -2
  63. package/bundle/chunk-8ywa7az5.js +2 -0
  64. package/bundle/chunk-8ywdddts.js +2 -0
  65. package/bundle/chunk-8zmreqxx.js +2 -0
  66. package/bundle/chunk-92zjark4.js +2 -0
  67. package/bundle/chunk-983rqajz.js +7 -0
  68. package/bundle/{chunk-kjyw00jp.js → chunk-9cw4cnz0.js} +1 -1
  69. package/bundle/{chunk-2swch6mx.js → chunk-9dh9bc9d.js} +1 -1
  70. package/bundle/{chunk-y437vyza.js → chunk-9fkmhmh6.js} +1 -1
  71. package/bundle/{chunk-7vd91wsd.js → chunk-9nk0ts0s.js} +1 -1
  72. package/bundle/{chunk-p9cnzxb8.js → chunk-9s4whpg1.js} +2 -2
  73. package/bundle/{chunk-yajd975f.js → chunk-9xvctnjr.js} +1 -1
  74. package/bundle/chunk-9yakc5yv.js +28 -0
  75. package/bundle/{chunk-4wxxyrxn.js → chunk-9zre5e54.js} +1 -1
  76. package/bundle/chunk-a42q5mx4.js +3 -0
  77. package/bundle/{chunk-yt3f3j35.js → chunk-a9y27zd2.js} +1 -1
  78. package/bundle/{chunk-mex0fe9s.js → chunk-acyj91wq.js} +1 -1
  79. package/bundle/chunk-aq28ejhv.js +2 -0
  80. package/bundle/{chunk-pkc4ddw1.js → chunk-atpzz901.js} +1 -1
  81. package/bundle/chunk-ax1y4699.js +2 -0
  82. package/bundle/{chunk-dctj3c22.js → chunk-b0jh0rby.js} +2 -2
  83. package/bundle/chunk-b0x888w9.js +2 -0
  84. package/bundle/chunk-b10px5g4.js +2 -0
  85. package/bundle/chunk-b1qhpxee.js +2 -0
  86. package/bundle/chunk-b4ysd5b4.js +9 -0
  87. package/bundle/chunk-bcs2gvmp.js +2 -0
  88. package/bundle/{chunk-7mxt5b0h.js → chunk-bjcb9kt0.js} +1 -1
  89. package/bundle/{chunk-67d5d8mr.js → chunk-bnz0mxak.js} +1 -1
  90. package/bundle/{chunk-er38zew1.js → chunk-brh35yt5.js} +2 -2
  91. package/bundle/chunk-bs020a3x.js +2 -0
  92. package/bundle/{chunk-7eexey82.js → chunk-c72jajx9.js} +1 -1
  93. package/bundle/{chunk-81trveht.js → chunk-cagk1sjd.js} +1 -1
  94. package/bundle/{chunk-1byd3wma.js → chunk-cdh26622.js} +2 -2
  95. package/bundle/chunk-cjxcnhmq.js +14 -0
  96. package/bundle/{chunk-zddknkw7.js → chunk-cx0j6mpq.js} +1 -1
  97. package/bundle/{chunk-zh3fny3z.js → chunk-cx7p4ezk.js} +2 -2
  98. package/bundle/chunk-d0xs3j5h.js +2 -0
  99. package/bundle/{chunk-pxmhe36r.js → chunk-d1rn44wz.js} +1 -1
  100. package/bundle/chunk-d72rty3t.js +2 -0
  101. package/bundle/{chunk-0c6ep9mc.js → chunk-d93z6hrn.js} +1 -1
  102. package/bundle/{chunk-seghf5fc.js → chunk-dgx4rq86.js} +1 -1
  103. package/bundle/{chunk-qzj6027k.js → chunk-dh1h513y.js} +1 -1
  104. package/bundle/chunk-dj951pms.js +2 -0
  105. package/bundle/chunk-dp6zktka.js +2 -0
  106. package/bundle/{chunk-ba3h1pzs.js → chunk-dshnn54c.js} +1 -1
  107. package/bundle/{chunk-73myw3bj.js → chunk-dt899wbf.js} +2 -2
  108. package/bundle/chunk-dvqdtdza.js +2 -0
  109. package/bundle/{chunk-6ynxf3q7.js → chunk-dvxk6mr6.js} +2 -2
  110. package/bundle/chunk-dx7h5r8j.js +2 -0
  111. package/bundle/{chunk-bnss5dkk.js → chunk-dykqn0nj.js} +2 -2
  112. package/bundle/chunk-e03tgfpb.js +8 -0
  113. package/bundle/chunk-e07dbha4.js +2 -0
  114. package/bundle/chunk-e88wd9ex.js +2 -0
  115. package/bundle/{chunk-y9zstzed.js → chunk-eaqfnwdj.js} +1 -1
  116. package/bundle/chunk-ebabnv33.js +3 -0
  117. package/bundle/chunk-ebdpg3cn.js +2 -0
  118. package/bundle/{chunk-8vg4fmg2.js → chunk-ebkztnpf.js} +180 -178
  119. package/bundle/chunk-ec7pznsp.js +2 -0
  120. package/bundle/chunk-et7kz7kx.js +2 -0
  121. package/bundle/{chunk-kfmz2p27.js → chunk-ev3a2sxv.js} +2 -2
  122. package/bundle/{chunk-d00c1k9w.js → chunk-ewpzqnj4.js} +1 -1
  123. package/bundle/chunk-eyc6tb5h.js +2 -0
  124. package/bundle/chunk-eywryd3k.js +2 -0
  125. package/bundle/chunk-eze57bty.js +2 -0
  126. package/bundle/{chunk-qddt2gcs.js → chunk-ezrskm25.js} +1 -1
  127. package/bundle/chunk-f36ctnbp.js +3 -0
  128. package/bundle/{chunk-9ayxg9mq.js → chunk-f77nxt23.js} +2 -2
  129. package/bundle/chunk-fa47vzfc.js +2 -0
  130. package/bundle/chunk-fe397ph0.js +2 -0
  131. package/bundle/chunk-fjm9kstr.js +5 -0
  132. package/bundle/{chunk-exmw8jfa.js → chunk-fmxm4kaj.js} +2 -2
  133. package/bundle/chunk-fr75ytdr.js +2 -0
  134. package/bundle/chunk-fw2tnbt6.js +2 -0
  135. package/bundle/chunk-fwr2qgqb.js +2 -0
  136. package/bundle/chunk-g204pt98.js +2 -0
  137. package/bundle/chunk-g5prcvq2.js +14 -0
  138. package/bundle/{chunk-ggydr1ze.js → chunk-g794ey6w.js} +1 -1
  139. package/bundle/chunk-gcgmwqhh.js +2 -0
  140. package/bundle/{chunk-rmve21dh.js → chunk-gg7bg3ek.js} +1 -1
  141. package/bundle/{chunk-9x25d115.js → chunk-gkj4a27z.js} +1 -1
  142. package/bundle/chunk-gvtjxg0d.js +2 -0
  143. package/bundle/chunk-gw36mrg4.js +2 -0
  144. package/bundle/{chunk-z8gdmvgg.js → chunk-gwfx7tx7.js} +2 -2
  145. package/bundle/{chunk-q8hd01j7.js → chunk-gxmxx8jb.js} +1 -1
  146. package/bundle/{chunk-tge53d52.js → chunk-h1kg35mn.js} +1 -1
  147. package/bundle/chunk-h36qec67.js +2 -0
  148. package/bundle/{chunk-0msqaywp.js → chunk-h7w35n7w.js} +1 -1
  149. package/bundle/chunk-h9gtymfm.js +2 -0
  150. package/bundle/chunk-h9qn35pn.js +2 -0
  151. package/bundle/{chunk-mr8j7rc6.js → chunk-hb9mc5f9.js} +1 -1
  152. package/bundle/{chunk-5a7fs1hg.js → chunk-hbh2034m.js} +1 -1
  153. package/bundle/{chunk-df2aswz3.js → chunk-hcy77w6t.js} +1 -1
  154. package/bundle/{chunk-6a7c7wnf.js → chunk-hgsykghj.js} +2 -2
  155. package/bundle/chunk-hhjkezfz.js +2 -0
  156. package/bundle/chunk-hnz570f9.js +3 -0
  157. package/bundle/{chunk-tbgczapt.js → chunk-htkwc2se.js} +2 -2
  158. package/bundle/chunk-j21dnncc.js +4 -0
  159. package/bundle/{chunk-1yt5rsew.js → chunk-j63fkt6n.js} +1 -1
  160. package/bundle/chunk-ja18tvc7.js +2 -0
  161. package/bundle/{chunk-03xppy47.js → chunk-jcjaw7tk.js} +2 -2
  162. package/bundle/{chunk-jkh6eg7d.js → chunk-jf6ry79j.js} +4 -4
  163. package/bundle/{chunk-ke7n9t5p.js → chunk-jgz1a29w.js} +3 -3
  164. package/bundle/{chunk-ebcdxmdd.js → chunk-jngchw38.js} +1 -1
  165. package/bundle/{chunk-j5ymkhry.js → chunk-jqn27885.js} +1 -1
  166. package/bundle/chunk-jr2q5295.js +3 -0
  167. package/bundle/{chunk-hj3ddt53.js → chunk-jts0dma5.js} +2 -2
  168. package/bundle/chunk-jw16f6t0.js +4 -0
  169. package/bundle/chunk-jxg15t11.js +2 -0
  170. package/bundle/{chunk-7hm0c2yg.js → chunk-kqhh2pm9.js} +1 -1
  171. package/bundle/{chunk-0h8wdch6.js → chunk-kt0ej3nq.js} +1 -1
  172. package/bundle/chunk-kwzawx7r.js +2 -0
  173. package/bundle/{chunk-n6msxne8.js → chunk-kx2dp8ch.js} +1 -1
  174. package/bundle/chunk-m0mek3es.js +2 -0
  175. package/bundle/chunk-m31d2n6h.js +2 -0
  176. package/bundle/{chunk-egn55fa2.js → chunk-mcc5ynma.js} +3 -3
  177. package/bundle/{chunk-md8161zd.js → chunk-mdzzcrf9.js} +2 -2
  178. package/bundle/{chunk-gckgaqqr.js → chunk-mqtqcc10.js} +2 -2
  179. package/bundle/{chunk-ynwkr3yh.js → chunk-mvnxwwe7.js} +2 -2
  180. package/bundle/{chunk-6a77w77q.js → chunk-mvsrzvc4.js} +4 -4
  181. package/bundle/{chunk-b4knxpqh.js → chunk-mw2hr4pd.js} +1 -1
  182. package/bundle/{chunk-vszbqv24.js → chunk-mzbr0m2v.js} +1 -1
  183. package/bundle/{chunk-bj00xk8k.js → chunk-n0trgp1c.js} +2 -2
  184. package/bundle/chunk-n14qktbg.js +2 -0
  185. package/bundle/{chunk-yjk6zv2z.js → chunk-n2ygpy76.js} +1 -1
  186. package/bundle/{chunk-54wh8b12.js → chunk-n7xgfm5x.js} +2 -2
  187. package/bundle/{chunk-06k6egt2.js → chunk-neqy8j4n.js} +1 -1
  188. package/bundle/{chunk-nj61v4n7.js → chunk-njkserae.js} +1 -1
  189. package/bundle/{chunk-n6gtdx5h.js → chunk-nq495be3.js} +1 -1
  190. package/bundle/chunk-nr4q9fv7.js +2 -0
  191. package/bundle/{chunk-p3qkexpk.js → chunk-nsjp44fp.js} +1 -1
  192. package/bundle/chunk-nzzsj54n.js +2 -0
  193. package/bundle/chunk-p19qfw59.js +2 -0
  194. package/bundle/chunk-p2yxj9s4.js +2 -0
  195. package/bundle/{chunk-1dtzxt2w.js → chunk-p3rp99na.js} +1 -1
  196. package/bundle/chunk-p8czsxp0.js +3 -0
  197. package/bundle/chunk-p8k48st6.js +5 -0
  198. package/bundle/{chunk-79agp7v3.js → chunk-p8kpqyxb.js} +2 -2
  199. package/bundle/{chunk-9fxkh84w.js → chunk-p9zrk16q.js} +1 -1
  200. package/bundle/{chunk-6ged58yw.js → chunk-pmv8yr8c.js} +2 -2
  201. package/bundle/{chunk-ee23d2nz.js → chunk-pnq1h5az.js} +2 -2
  202. package/bundle/chunk-pq3qwxa8.js +2 -0
  203. package/bundle/{chunk-wfd5h6ax.js → chunk-pqnbdygz.js} +2 -2
  204. package/bundle/chunk-ps9p14y6.js +2 -0
  205. package/bundle/{chunk-zfcp509b.js → chunk-pxx2hz0g.js} +2 -2
  206. package/bundle/{chunk-txbwmwxj.js → chunk-q7rt76qw.js} +1 -1
  207. package/bundle/{chunk-rq4w0by4.js → chunk-q81m4m9z.js} +1 -1
  208. package/bundle/chunk-qagc6v17.js +2 -0
  209. package/bundle/{chunk-mq6jn47r.js → chunk-qb35hqm4.js} +1 -1
  210. package/bundle/chunk-qc0zhbhm.js +2 -0
  211. package/bundle/{chunk-keveg5gx.js → chunk-qdcf1ay5.js} +2 -2
  212. package/bundle/chunk-qp9y0g73.js +3 -0
  213. package/bundle/chunk-qpd0gab8.js +2 -0
  214. package/bundle/{chunk-axdzm75h.js → chunk-qqne79vp.js} +2 -2
  215. package/bundle/{chunk-g4gjz7sq.js → chunk-qs4wef8c.js} +1 -1
  216. package/bundle/chunk-r0ewmh6f.js +2 -0
  217. package/bundle/chunk-r3df289z.js +2 -0
  218. package/bundle/{chunk-by855es0.js → chunk-r58gzg6m.js} +1 -1
  219. package/bundle/{chunk-fmq0m4k5.js → chunk-r6ndvzd0.js} +1 -1
  220. package/bundle/chunk-r78kfhvz.js +2 -0
  221. package/bundle/{chunk-dyv2hqvc.js → chunk-rcyhqkv5.js} +1 -1
  222. package/bundle/{chunk-t2vm08v6.js → chunk-rd4x4tsv.js} +1 -1
  223. package/bundle/chunk-rebsz3bj.js +2 -0
  224. package/bundle/{chunk-yp5bypsp.js → chunk-rexdr63q.js} +2 -2
  225. package/bundle/{chunk-1me21qdc.js → chunk-rgxy4ngt.js} +1 -1
  226. package/bundle/chunk-rph5xswc.js +2 -0
  227. package/bundle/{chunk-dcndy4sr.js → chunk-rph9zj24.js} +1 -1
  228. package/bundle/chunk-rqmvj7f4.js +3 -0
  229. package/bundle/{chunk-ryfqwsft.js → chunk-rrd0jf5m.js} +1 -1
  230. package/bundle/{chunk-mpygdb5a.js → chunk-s8mghr5a.js} +2 -2
  231. package/bundle/chunk-schtpyjs.js +2 -0
  232. package/bundle/{chunk-nmehsm3w.js → chunk-shwjjrj8.js} +1 -1
  233. package/bundle/{chunk-08f4khsw.js → chunk-snt1kefv.js} +3 -3
  234. package/bundle/{chunk-s8hq6trz.js → chunk-srxx88nb.js} +1 -1
  235. package/bundle/{chunk-gy0wm7e1.js → chunk-std2bgv7.js} +2 -2
  236. package/bundle/{chunk-dffhkd30.js → chunk-swcgsrbj.js} +1 -1
  237. package/bundle/chunk-sy3n0qhc.js +800 -0
  238. package/bundle/{chunk-wgk7ynt3.js → chunk-t01bhw5h.js} +3 -3
  239. package/bundle/chunk-t0jjes17.js +2 -0
  240. package/bundle/{chunk-yprmd5b7.js → chunk-t5tfppwv.js} +2 -2
  241. package/bundle/chunk-t8rke5fr.js +8 -0
  242. package/bundle/chunk-tabcpx7t.js +4 -0
  243. package/bundle/{chunk-gmzrvxnv.js → chunk-tdmn21z0.js} +2 -2
  244. package/bundle/{chunk-71zw0qhf.js → chunk-tdxbm1nd.js} +1 -1
  245. package/bundle/{chunk-p825vsjy.js → chunk-te5tfq79.js} +1 -1
  246. package/bundle/chunk-tf4xwqz7.js +2 -0
  247. package/bundle/{chunk-fg35hwa0.js → chunk-tgd5ctnt.js} +2 -2
  248. package/bundle/chunk-tqazneg6.js +2 -0
  249. package/bundle/{chunk-qa2j0qmy.js → chunk-txqc7543.js} +2 -2
  250. package/bundle/chunk-tzg4z74d.js +2 -0
  251. package/bundle/{chunk-a3a1trap.js → chunk-v3x5nrc4.js} +2 -2
  252. package/bundle/chunk-v8dd6tyn.js +2 -0
  253. package/bundle/chunk-v8ksjgc3.js +2 -0
  254. package/bundle/chunk-v8vcwx23.js +2 -0
  255. package/bundle/chunk-vc4e6xc4.js +10 -0
  256. package/bundle/chunk-vcrakhgy.js +3 -0
  257. package/bundle/{chunk-a1hzeejj.js → chunk-vdpd4akk.js} +2 -2
  258. package/bundle/{chunk-6p7yg5sr.js → chunk-vftqwdpg.js} +1 -1
  259. package/bundle/chunk-vg41rtdy.js +2 -0
  260. package/bundle/{chunk-r0k21apr.js → chunk-vgaxv70x.js} +2 -2
  261. package/bundle/{chunk-nkk4fyqf.js → chunk-vgnddhdj.js} +1 -1
  262. package/bundle/{chunk-xd3xc1vv.js → chunk-vm58fkrv.js} +1 -1
  263. package/bundle/{chunk-qg2vk5fw.js → chunk-vsys768k.js} +1 -1
  264. package/bundle/{chunk-s4qtphwx.js → chunk-w03fdrxe.js} +1 -1
  265. package/bundle/chunk-w1ypf53m.js +3 -0
  266. package/bundle/chunk-w24660y4.js +3 -0
  267. package/bundle/{chunk-z1ay3qd0.js → chunk-w3bmf3zz.js} +1 -1
  268. package/bundle/{chunk-5e4fxy99.js → chunk-w57j3pgz.js} +82 -82
  269. package/bundle/{chunk-vsr8mnj6.js → chunk-w5940jxm.js} +1 -1
  270. package/bundle/chunk-w6rf2knb.js +2 -0
  271. package/bundle/chunk-w9pdvcf9.js +3 -0
  272. package/bundle/{chunk-yk97q51d.js → chunk-wev34grp.js} +2 -2
  273. package/bundle/chunk-wh7r96t3.js +2 -0
  274. package/bundle/{chunk-1pg6pv0m.js → chunk-wm77svwm.js} +1 -1
  275. package/bundle/chunk-wnjqaxze.js +2 -0
  276. package/bundle/{chunk-qkjdr337.js → chunk-x6rr6ss1.js} +1 -1
  277. package/bundle/{chunk-bbzztav6.js → chunk-xdacgfba.js} +1 -1
  278. package/bundle/{chunk-6p94fpbn.js → chunk-xdjwapwy.js} +2 -2
  279. package/bundle/chunk-xfz698bh.js +2 -0
  280. package/bundle/{chunk-zwnhf4z1.js → chunk-xhbb8b5g.js} +1 -1
  281. package/bundle/chunk-xqwvx3qq.js +2 -0
  282. package/bundle/chunk-xxj3sgd5.js +2 -0
  283. package/bundle/chunk-xyjehgzm.js +3 -0
  284. package/bundle/{chunk-cs38g1bx.js → chunk-y0ydzdfc.js} +1 -1
  285. package/bundle/{chunk-wvf5q2hz.js → chunk-y1b2h15z.js} +1 -1
  286. package/bundle/{chunk-1gf116rg.js → chunk-yacccwf6.js} +1 -1
  287. package/bundle/chunk-ydc6ypjt.js +77 -0
  288. package/bundle/{chunk-dhqaqeq6.js → chunk-yeq7b87a.js} +1 -1
  289. package/bundle/chunk-yfp9y71y.js +2 -0
  290. package/bundle/chunk-yg9c1v8v.js +2 -0
  291. package/bundle/{chunk-e6xnynaz.js → chunk-yha554nm.js} +2 -2
  292. package/bundle/{chunk-rv1stdvb.js → chunk-yj6rbe9p.js} +2 -2
  293. package/bundle/chunk-yjjh339w.js +2 -0
  294. package/bundle/{chunk-sjw56r2n.js → chunk-yjp0btmq.js} +3 -3
  295. package/bundle/{chunk-c5pb87yf.js → chunk-ymtcm4xd.js} +1 -1
  296. package/bundle/chunk-yt6vd7a5.js +2 -0
  297. package/bundle/{chunk-ssk8tkwd.js → chunk-yw9pfqxt.js} +1 -1
  298. package/bundle/{chunk-g6cyhxwg.js → chunk-yykjvt7f.js} +2 -2
  299. package/bundle/{chunk-sfes6pp1.js → chunk-yzh4rmrt.js} +1 -1
  300. package/bundle/chunk-yzq3c3dq.js +2 -0
  301. package/bundle/{chunk-prh3c44x.js → chunk-yzwgvjzd.js} +1 -1
  302. package/bundle/chunk-z1j25911.js +2 -0
  303. package/bundle/{chunk-rkwrjphh.js → chunk-z1rshv6g.js} +1 -1
  304. package/bundle/chunk-z29ahthm.js +2 -0
  305. package/bundle/{chunk-jgjnz82k.js → chunk-zaan8jk6.js} +1 -1
  306. package/bundle/{chunk-6gb65bv1.js → chunk-zbqzm65q.js} +1 -1
  307. package/bundle/{chunk-bk4phk66.js → chunk-zesbm9k1.js} +1 -1
  308. package/bundle/{chunk-c6vfwjg4.js → chunk-zfcfyagt.js} +1 -1
  309. package/bundle/{chunk-ywkvq7zb.js → chunk-zfnbk5gy.js} +1 -1
  310. package/bundle/chunk-zgre4gc2.js +2 -0
  311. package/bundle/{chunk-z7430qxg.js → chunk-zrmx397j.js} +1 -1
  312. package/bundle/chunk-zthkjx33.js +2 -0
  313. package/bundle/chunk-zxddasg8.js +2 -0
  314. package/bundle/index.js +3 -3
  315. package/bundle/parser.worker.js +2 -2
  316. package/bundle/worker.js +1 -1
  317. package/package.json +1 -1
  318. package/bundle/chunk-0442cmw2.js +0 -2
  319. package/bundle/chunk-085pvqr4.js +0 -2
  320. package/bundle/chunk-0x5jn813.js +0 -2
  321. package/bundle/chunk-11g2rpv8.js +0 -3
  322. package/bundle/chunk-28t9akfn.js +0 -2
  323. package/bundle/chunk-2h1fcqvf.js +0 -2
  324. package/bundle/chunk-2kens6wh.js +0 -2
  325. package/bundle/chunk-2scyp9ns.js +0 -2
  326. package/bundle/chunk-2tw58kwb.js +0 -2
  327. package/bundle/chunk-2vxx0tax.js +0 -2
  328. package/bundle/chunk-2ybt3p5z.js +0 -2
  329. package/bundle/chunk-2zpkw3ge.js +0 -2
  330. package/bundle/chunk-31g86yn6.js +0 -2
  331. package/bundle/chunk-397be2x0.js +0 -2
  332. package/bundle/chunk-3c78nkgn.js +0 -2
  333. package/bundle/chunk-3d91q2qd.js +0 -2
  334. package/bundle/chunk-43yv7tz1.js +0 -2
  335. package/bundle/chunk-496ajawz.js +0 -2
  336. package/bundle/chunk-499gp5g5.js +0 -2
  337. package/bundle/chunk-4hzm14xt.js +0 -3
  338. package/bundle/chunk-4xw14sed.js +0 -2
  339. package/bundle/chunk-536naqqv.js +0 -2
  340. package/bundle/chunk-57nvmhjq.js +0 -2
  341. package/bundle/chunk-5he3d7cy.js +0 -2
  342. package/bundle/chunk-5qr286w8.js +0 -2
  343. package/bundle/chunk-606vpgc4.js +0 -4
  344. package/bundle/chunk-6a1skxcj.js +0 -3
  345. package/bundle/chunk-6cj7cn5x.js +0 -2
  346. package/bundle/chunk-6hybp2mt.js +0 -2
  347. package/bundle/chunk-6y423jax.js +0 -3
  348. package/bundle/chunk-72ghkgcn.js +0 -2
  349. package/bundle/chunk-741teh8k.js +0 -2
  350. package/bundle/chunk-7b3wx6kn.js +0 -2
  351. package/bundle/chunk-891yevv2.js +0 -2
  352. package/bundle/chunk-8c1ypgw5.js +0 -3
  353. package/bundle/chunk-8ktgy41r.js +0 -2
  354. package/bundle/chunk-8q73cjyj.js +0 -2
  355. package/bundle/chunk-8rt63jbm.js +0 -2
  356. package/bundle/chunk-8y623qdx.js +0 -2
  357. package/bundle/chunk-921vn745.js +0 -2
  358. package/bundle/chunk-945ebhte.js +0 -2
  359. package/bundle/chunk-9548cc0c.js +0 -2
  360. package/bundle/chunk-9yrypq1r.js +0 -14
  361. package/bundle/chunk-a0rp7gh4.js +0 -77
  362. package/bundle/chunk-a48t0g95.js +0 -3
  363. package/bundle/chunk-a949at1c.js +0 -3
  364. package/bundle/chunk-akk84fnc.js +0 -2
  365. package/bundle/chunk-aw7j7brm.js +0 -2
  366. package/bundle/chunk-b6cybdj3.js +0 -2
  367. package/bundle/chunk-c5fa8cb1.js +0 -2
  368. package/bundle/chunk-ca4r31we.js +0 -2
  369. package/bundle/chunk-ckbwdrm3.js +0 -2
  370. package/bundle/chunk-cqj21rfj.js +0 -3
  371. package/bundle/chunk-cz3h5n1v.js +0 -3
  372. package/bundle/chunk-dhc6e1t7.js +0 -2
  373. package/bundle/chunk-dk6rbqvp.js +0 -2
  374. package/bundle/chunk-dk975etf.js +0 -3
  375. package/bundle/chunk-dwajajaq.js +0 -2
  376. package/bundle/chunk-dxcrggvq.js +0 -2
  377. package/bundle/chunk-dyt3n3fe.js +0 -2
  378. package/bundle/chunk-e74efvj2.js +0 -800
  379. package/bundle/chunk-e7ah0e61.js +0 -2
  380. package/bundle/chunk-e7v9trve.js +0 -11
  381. package/bundle/chunk-e8ws454m.js +0 -2
  382. package/bundle/chunk-efndtzby.js +0 -2
  383. package/bundle/chunk-eq2pepce.js +0 -2
  384. package/bundle/chunk-eva3nqqb.js +0 -14
  385. package/bundle/chunk-f3bnn9rf.js +0 -8
  386. package/bundle/chunk-f693s9vn.js +0 -2
  387. package/bundle/chunk-ftepqwyq.js +0 -2
  388. package/bundle/chunk-g18ax6yp.js +0 -2
  389. package/bundle/chunk-gadyp6mb.js +0 -2
  390. package/bundle/chunk-ge8315te.js +0 -5
  391. package/bundle/chunk-gk28ffhg.js +0 -2
  392. package/bundle/chunk-gpfc4z4v.js +0 -2
  393. package/bundle/chunk-gqvg02zp.js +0 -2
  394. package/bundle/chunk-gsyt2sv7.js +0 -2
  395. package/bundle/chunk-h3k1dk9m.js +0 -2
  396. package/bundle/chunk-h8c3dcqt.js +0 -2
  397. package/bundle/chunk-hfq11w4h.js +0 -2
  398. package/bundle/chunk-hw5qyht3.js +0 -3
  399. package/bundle/chunk-hwf58w1k.js +0 -2
  400. package/bundle/chunk-jyczz3yh.js +0 -8
  401. package/bundle/chunk-k8k8z6b7.js +0 -3
  402. package/bundle/chunk-kk3ve911.js +0 -2
  403. package/bundle/chunk-kv72hxkp.js +0 -3
  404. package/bundle/chunk-m4j7jyrd.js +0 -3
  405. package/bundle/chunk-mf3sm0pk.js +0 -2
  406. package/bundle/chunk-mkng9ykt.js +0 -2
  407. package/bundle/chunk-mxvypy3s.js +0 -2
  408. package/bundle/chunk-n5ypgxrn.js +0 -28
  409. package/bundle/chunk-n9xw9kqc.js +0 -2
  410. package/bundle/chunk-nc4wbc89.js +0 -2
  411. package/bundle/chunk-ngk67rt3.js +0 -3
  412. package/bundle/chunk-nj2bbtmx.js +0 -2
  413. package/bundle/chunk-nr1g57b2.js +0 -2
  414. package/bundle/chunk-p0ahbpxv.js +0 -2
  415. package/bundle/chunk-p7y8z5rd.js +0 -2
  416. package/bundle/chunk-pt26gerr.js +0 -2
  417. package/bundle/chunk-qkk1as5n.js +0 -2
  418. package/bundle/chunk-qsm9xw87.js +0 -2
  419. package/bundle/chunk-qw980y8h.js +0 -2
  420. package/bundle/chunk-r2w3gr8d.js +0 -2
  421. package/bundle/chunk-r5bqcpkz.js +0 -2
  422. package/bundle/chunk-r67c858b.js +0 -2
  423. package/bundle/chunk-r9fvfkee.js +0 -2
  424. package/bundle/chunk-rcn0dhbj.js +0 -2
  425. package/bundle/chunk-rq47pn3r.js +0 -2
  426. package/bundle/chunk-rvt1tdy8.js +0 -2
  427. package/bundle/chunk-ry7q8xn6.js +0 -2
  428. package/bundle/chunk-s27xvrft.js +0 -2
  429. package/bundle/chunk-s5nde2kd.js +0 -5
  430. package/bundle/chunk-scy39p6q.js +0 -2
  431. package/bundle/chunk-srpe3v8e.js +0 -9
  432. package/bundle/chunk-st5jaszz.js +0 -3
  433. package/bundle/chunk-t5qamf96.js +0 -2
  434. package/bundle/chunk-t9mz17gb.js +0 -3
  435. package/bundle/chunk-tns5x4w0.js +0 -3
  436. package/bundle/chunk-ttevj0pj.js +0 -2
  437. package/bundle/chunk-v7c54cyj.js +0 -2
  438. package/bundle/chunk-vgefaens.js +0 -2
  439. package/bundle/chunk-vv59b4re.js +0 -2
  440. package/bundle/chunk-vwqy7n3g.js +0 -2
  441. package/bundle/chunk-vysa9hp4.js +0 -7
  442. package/bundle/chunk-wn076jwj.js +0 -2
  443. package/bundle/chunk-x0m1qye9.js +0 -2
  444. package/bundle/chunk-xvntsbb1.js +0 -3
  445. package/bundle/chunk-y70aachh.js +0 -2
  446. package/bundle/chunk-yqk58hf6.js +0 -3
  447. package/bundle/chunk-ysgxt83y.js +0 -2
  448. package/bundle/chunk-ze9e6nt3.js +0 -3
  449. package/bundle/chunk-znzan00b.js +0 -3
  450. package/bundle/chunk-zrp55k47.js +0 -2
  451. package/bundle/chunk-zwdnh860.js +0 -2
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-4sazy0nq.js";var k="./opentui-drfwd3v7.dll";export{k as default};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Nr as C}from"./chunk-n96tvjgj.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};
2
+ import{Sr as C}from"./chunk-3mepk08v.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 Rh};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{h as S}from"./chunk-8c1ypgw5.js";import"./chunk-t9mz17gb.js";import{Rd as $}from"./chunk-yajd975f.js";import{Vf as v}from"./chunk-p9cnzxb8.js";import"./chunk-srpe3v8e.js";import{gh as L}from"./chunk-5e4fxy99.js";import"./chunk-8vg4fmg2.js";import"./chunk-zfcp509b.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-md8161zd.js";import"./chunk-yk97q51d.js";import"./chunk-e74efvj2.js";import"./chunk-st5jaszz.js";import"./chunk-a1hzeejj.js";import"./chunk-sjw56r2n.js";import"./chunk-nj4d554m.js";import"./chunk-eva3nqqb.js";import"./chunk-yprmd5b7.js";import"./chunk-snr44en9.js";import"./chunk-keveg5gx.js";import{Rp as g,Sp as y,Tp as B,_p as N}from"./chunk-f3bnn9rf.js";import"./chunk-xqdrr7xg.js";import"./chunk-axdzm75h.js";import"./chunk-94pcpztx.js";import"./chunk-hw5qyht3.js";import"./chunk-z8gdmvgg.js";import"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import"./chunk-g6cyhxwg.js";import"./chunk-n96tvjgj.js";import"./chunk-pkc4ddw1.js";import"./chunk-xgr6jnd6.js";import"./chunk-a48t0g95.js";import"./chunk-yqk58hf6.js";import"./chunk-er38zew1.js";import"./chunk-dk975etf.js";import"./chunk-6p94fpbn.js";import"./chunk-fg35hwa0.js";import"./chunk-79agp7v3.js";import"./chunk-kv72hxkp.js";import{rt as q}from"./chunk-nj2bbtmx.js";import"./chunk-tns5x4w0.js";import"./chunk-e7v9trve.js";import"./chunk-zh3fny3z.js";import"./chunk-m4j7jyrd.js";import"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-wfd5h6ax.js";import{OI as z}from"./chunk-a0rp7gh4.js";import"./chunk-kfmz2p27.js";import"./chunk-ee23d2nz.js";import"./chunk-3k2b05fv.js";import j from"fs/promises";import P from"path";function F(x){return z.promise(async()=>{try{return{ok:!0,value:await x()}}catch(D){return{ok:!1,err:D}}})}function A(x){if(x instanceof g)return"Not signed in. Run `qitqode auth login` first.";if(x instanceof y)return x.message+q.copy().insufficientBalanceCliSuffix;if(x instanceof B)return x.message;return"Request failed: "+(x instanceof Error?x.message:String(x))}var w=(x)=>z.gen(function*(){if((yield*S())==="revoked")return;let D=yield*z.promise(async()=>{try{return{ok:!0,content:await j.readFile(P.resolve(x),"utf8")}}catch(V){let K=V;return{ok:!1,message:`Cannot read '${x}': ${K.message??String(K)}`}}});if(!D.ok){yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+D.message+v.Style.TEXT_NORMAL));return}let O=[],T=D.content.split(`
2
+ import{h as S}from"./chunk-41x11r2s.js";import{Pd as $}from"./chunk-9xvctnjr.js";import{Sf as v}from"./chunk-9s4whpg1.js";import"./chunk-b4ysd5b4.js";import{Xg as L}from"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import{kq as g,lq as y,mq as B,sq as N}from"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import{Qt as q}from"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import{UI as z}from"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";import j from"fs/promises";import P from"path";function F(x){return z.promise(async()=>{try{return{ok:!0,value:await x()}}catch(D){return{ok:!1,err:D}}})}function A(x){if(x instanceof g)return"Your QitQode sign-in has ended and couldn't be renewed automatically. Run `qitqode auth login` to sign in again.";if(x instanceof y)return x.message+q.copy().insufficientBalanceCliSuffix;if(x instanceof B)return x.message;return"Request failed: "+(x instanceof Error?x.message:String(x))}var w=(x)=>z.gen(function*(){if((yield*S())==="revoked")return;let D=yield*z.promise(async()=>{try{return{ok:!0,content:await j.readFile(P.resolve(x),"utf8")}}catch(V){let K=V;return{ok:!1,message:`Cannot read '${x}': ${K.message??String(K)}`}}});if(!D.ok){yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+D.message+v.Style.TEXT_NORMAL));return}let O=[],T=D.content.split(`
3
3
  `);for(let V=0;V<T.length;V++){let K=T[V];if(!K||!K.trim())continue;let G=V+1,H;try{H=JSON.parse(K)}catch{yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+`Error: line ${G} is not valid JSON.`+v.Style.TEXT_NORMAL));return}if(typeof H!=="object"||H===null||Array.isArray(H)){yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+`Error: line ${G} must be a JSON object (got ${H===null?"null":Array.isArray(H)?"array":typeof H}).`+v.Style.TEXT_NORMAL));return}let J=H;if(typeof J.prompt!=="string"||!J.prompt.trim()){yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+`Error: line ${G} must have a non-empty string 'prompt' field.`+v.Style.TEXT_NORMAL));return}let W={prompt:J.prompt};if(typeof J.options==="object"&&J.options!==null&&!Array.isArray(J.options))W.options=J.options;O.push(W)}if(O.length===0){yield*z.sync(()=>v.println(v.Style.TEXT_WARNING+"No prompts found in the file."+v.Style.TEXT_NORMAL));return}yield*z.sync(()=>v.println(v.Style.TEXT_DIM+`Submitting ${O.length} request${O.length===1?"":"s"}\u2026`+v.Style.TEXT_NORMAL));let Q=yield*F(()=>N.resolveSubmitBatch({requests:O}));if(!Q.ok){yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+A(Q.err)+v.Style.TEXT_NORMAL));return}let{batchId:X,status:Y,createdAt:Z,totalCount:_}=Q.value;process.stdout.write(X+`
4
4
  `),yield*z.sync(()=>{if(v.println(v.Style.TEXT_SUCCESS+"Batch submitted."+v.Style.TEXT_NORMAL),v.println(" ID: "+v.Style.TEXT_HIGHLIGHT_BOLD+X+v.Style.TEXT_NORMAL),Y)v.println(" Status: "+Y);if(_!==void 0)v.println(" Requests: "+_);if(Z)v.println(" Created: "+v.Style.TEXT_DIM+new Date(Z).toLocaleString()+v.Style.TEXT_NORMAL);v.println(`
5
5
  `+v.Style.TEXT_DIM+`Run \`qitqode batch status ${X}\` to check progress.`+v.Style.TEXT_NORMAL)})}).pipe(z.withSpan("batch.submit")),k=(x,D)=>z.gen(function*(){if((yield*S())==="revoked")return;let O=yield*F(()=>N.resolveRetrieveBatch({batchId:x}));if(!O.ok){yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+A(O.err)+v.Style.TEXT_NORMAL));return}let{status:T,results:Q,completedCount:X,totalCount:Y,createdAt:Z,completedAt:_}=O.value,V=T==="completed"?v.Style.TEXT_SUCCESS:T==="failed"?v.Style.TEXT_DANGER:v.Style.TEXT_WARNING;if(yield*z.sync(()=>{v.println(" ID: "+v.Style.TEXT_HIGHLIGHT_BOLD+x+v.Style.TEXT_NORMAL),v.println(" Status: "+V+T+v.Style.TEXT_NORMAL);let K=X??Q?.length;if(Y!==void 0)v.println(" Progress: "+(K??"?")+" / "+Y);if(Z)v.println(" Created: "+v.Style.TEXT_DIM+new Date(Z).toLocaleString()+v.Style.TEXT_NORMAL);if(_)v.println(" Finished: "+v.Style.TEXT_DIM+new Date(_).toLocaleString()+v.Style.TEXT_NORMAL);if(Q&&Q.length>0){v.println(""),v.println(v.Style.TEXT_DIM+" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"+v.Style.TEXT_NORMAL);for(let G of Q){let H=` [${G.index+1}] `;if(G.error)v.println(H+v.Style.TEXT_DANGER+G.error+v.Style.TEXT_NORMAL);else{let J=G.content??"",W=J.length>500?J.slice(0,500)+"\u2026":J;v.println(H+W)}}}else if(T!=="completed"&&T!=="failed")v.println(`
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$q as VQ,Cq as wQ,Eq as QQ,Jq as JV,Lq as FQ,Nq as KV,Oq as SV,Qq as PV,Rq as D,Uq as F,Vq as t,Xq as BV,Zq as qQ,ar as WQ,br as xQ,er as EV,fr as a,hr as UV,ir as BQ,jr as $Q,kr as AV,nr as xV,oq as l,pq as zV,tq as UQ,vq as JQ,xq as GV}from"./chunk-z8gdmvgg.js";import{Ar as jV,Cr as YQ,qr as ZV,ur as $V,vr as AQ}from"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import{pv as Q}from"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-3k2b05fv.js";var HQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),zQ=UV({errorSchema:HQ,errorToMessage:(V)=>V.error.message});function LV(V){let Y=V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),J=V.startsWith("gpt-4")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-nano")&&!V.startsWith("gpt-5-chat")&&!V.startsWith("gpt-5.4-nano")||V.startsWith("o3")||V.startsWith("o4-mini"),G=V.startsWith("o1")||V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),j=V.startsWith("gpt-5.1")||V.startsWith("gpt-5.2")||V.startsWith("gpt-5.3")||V.startsWith("gpt-5.4");return{supportsFlexProcessing:Y,supportsPriorityProcessing:J,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:j}}function cQ(V){var Y,J,G,j,E,P;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Y=V.prompt_tokens)!=null?Y:0,A=(J=V.completion_tokens)!=null?J:0,O=(j=(G=V.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?j:0,K=(P=(E=V.completion_tokens_details)==null?void 0:E.reasoning_tokens)!=null?P:0;return{inputTokens:{total:$,noCache:$-O,cacheRead:O,cacheWrite:void 0},outputTokens:{total:A,text:A-K,reasoning:K},raw:V}}function HV(V){return JSON.stringify(V===void 0?{}:V)}function MV({prompt:V,systemMessageMode:Y="system"}){var J;let G=[],j=[];for(let{role:E,content:P}of V)switch(E){case"system":{switch(Y){case"system":{G.push({role:"system",content:P});break}case"developer":{G.push({role:"developer",content:P});break}case"remove":{j.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(P.length===1&&P[0].type==="text"){G.push({role:"user",content:P[0].text});break}G.push({role:"user",content:P.map(($,A)=>{var O,K,Z;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let q=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${q};base64,${JQ($.data)}`,detail:(K=(O=$.providerOptions)==null?void 0:O.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new YQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:JQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:JQ($.data),format:"mp3"}};default:throw new YQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new YQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(Z=$.filename)!=null?Z:`part-${A}.pdf`,file_data:`data:application/pdf;base64,${JQ($.data)}`}}}else throw new YQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",A=[];for(let O of P)switch(O.type){case"text":{$+=O.text;break}case"tool-call":{A.push({id:O.toolCallId,type:"function",function:{name:O.toolName,arguments:HV(O.input)}});break}}G.push({role:"assistant",content:$,tool_calls:A.length>0?A:void 0});break}case"tool":{for(let $ of P){if($.type==="tool-approval-response")continue;let A=$.output,O;switch(A.type){case"text":case"error-text":O=A.value;break;case"execution-denied":O=(J=A.reason)!=null?J:"Tool execution denied.";break;case"content":case"json":case"error-json":O=JSON.stringify(A.value);break}G.push({role:"tool",tool_call_id:$.toolCallId,content:O})}break}default:throw Error(`Unsupported role: ${E}`)}return{messages:G,warnings:j}}function LQ({id:V,model:Y,created:J}){return{id:V!=null?V:void 0,modelId:Y!=null?Y:void 0,timestamp:J?new Date(J*1000):void 0}}function vQ(V){switch(V){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var bV=D(()=>F(Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}))),yV=D(()=>F(Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}),HQ]))),RV=D(()=>F(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function kV({tools:V,toolChoice:Y}){V=(V==null?void 0:V.length)?V:void 0;let J=[];if(V==null)return{tools:void 0,toolChoice:void 0,toolWarnings:J};let G=[];for(let E of V)switch(E.type){case"function":G.push({type:"function",function:{name:E.name,description:E.description,parameters:E.inputSchema,...E.strict!=null?{strict:E.strict}:{}}});break;default:J.push({type:"unsupported",feature:`tool type: ${E.type}`});break}if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:J};let j=Y.type;switch(j){case"auto":case"none":case"required":return{tools:G,toolChoice:j,toolWarnings:J};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:J};default:throw new YQ({functionality:`tool choice type: ${j}`})}}var gV=class{constructor(V,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=V,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:V,maxOutputTokens:Y,temperature:J,topP:G,topK:j,frequencyPenalty:E,presencePenalty:P,stopSequences:$,responseFormat:A,seed:O,tools:K,toolChoice:Z,providerOptions:q}){var x,f,y,w,M;let g=[],b=(x=await VQ({provider:"openai",providerOptions:q,schema:RV}))!=null?x:{},n=LV(this.modelId),i=(f=b.forceReasoning)!=null?f:n.isReasoningModel;if(j!=null)g.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=MV({prompt:V,systemMessageMode:(y=b.systemMessageMode)!=null?y:i?"developer":n.systemMessageMode});g.push(...m);let s=(w=b.strictJsonSchema)!=null?w:!0,X={model:this.modelId,logit_bias:b.logitBias,logprobs:b.logprobs===!0||typeof b.logprobs==="number"?!0:void 0,top_logprobs:typeof b.logprobs==="number"?b.logprobs:typeof b.logprobs==="boolean"?b.logprobs?0:void 0:void 0,user:b.user,parallel_tool_calls:b.parallelToolCalls,max_tokens:Y,temperature:J,top_p:G,frequency_penalty:E,presence_penalty:P,response_format:(A==null?void 0:A.type)==="json"?A.schema!=null?{type:"json_schema",json_schema:{schema:A.schema,strict:s,name:(M=A.name)!=null?M:"response",description:A.description}}:{type:"json_object"}:void 0,stop:$,seed:O,verbosity:b.textVerbosity,max_completion_tokens:b.maxCompletionTokens,store:b.store,metadata:b.metadata,prediction:b.prediction,reasoning_effort:b.reasoningEffort,service_tier:b.serviceTier,prompt_cache_key:b.promptCacheKey,prompt_cache_retention:b.promptCacheRetention,safety_identifier:b.safetyIdentifier,messages:p};if(i){if(b.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(X.top_p!=null)X.top_p=void 0,g.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(X.logprobs!=null)X.logprobs=void 0,g.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(X.frequency_penalty!=null)X.frequency_penalty=void 0,g.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(X.presence_penalty!=null)X.presence_penalty=void 0,g.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(X.logit_bias!=null)X.logit_bias=void 0,g.push({type:"other",message:"logitBias is not supported for reasoning models"});if(X.top_logprobs!=null)X.top_logprobs=void 0,g.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(X.max_tokens!=null){if(X.max_completion_tokens==null)X.max_completion_tokens=X.max_tokens;X.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(b.serviceTier==="flex"&&!n.supportsFlexProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),X.service_tier=void 0;if(b.serviceTier==="priority"&&!n.supportsPriorityProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),X.service_tier=void 0;let{tools:u,toolChoice:I,toolWarnings:H}=kV({tools:K,toolChoice:Z});return{args:{...X,tools:u,tool_choice:I},warnings:[...g,...H]}}async doGenerate(V){var Y,J,G,j,E,P,$;let{args:A,warnings:O}=await this.getArgs(V),{responseHeaders:K,value:Z,rawValue:q}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:A,failedResponseHandler:zQ,successfulResponseHandler:$Q(bV),abortSignal:V.abortSignal,fetch:this.config.fetch}),x=Z.choices[0],f=[],y=x.message.content;if(y!=null&&y.length>0)f.push({type:"text",text:y});for(let b of(Y=x.message.tool_calls)!=null?Y:[])f.push({type:"tool-call",toolCallId:(J=b.id)!=null?J:QQ(),toolName:b.function.name,input:b.function.arguments});for(let b of(G=x.message.annotations)!=null?G:[])f.push({type:"source",sourceType:"url",id:QQ(),url:b.url_citation.url,title:b.url_citation.title});let w=(j=Z.usage)==null?void 0:j.completion_tokens_details,M=(E=Z.usage)==null?void 0:E.prompt_tokens_details,g={openai:{}};if((w==null?void 0:w.accepted_prediction_tokens)!=null)g.openai.acceptedPredictionTokens=w==null?void 0:w.accepted_prediction_tokens;if((w==null?void 0:w.rejected_prediction_tokens)!=null)g.openai.rejectedPredictionTokens=w==null?void 0:w.rejected_prediction_tokens;if(((P=x.logprobs)==null?void 0:P.content)!=null)g.openai.logprobs=x.logprobs.content;return{content:f,finishReason:{unified:vQ(x.finish_reason),raw:($=x.finish_reason)!=null?$:void 0},usage:cQ(Z.usage),request:{body:A},response:{...LQ(Z),headers:K,body:q},warnings:O,providerMetadata:g}}async doStream(V){let{args:Y,warnings:J}=await this.getArgs(V),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:j,value:E}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:G,failedResponseHandler:zQ,successfulResponseHandler:BQ(yV),abortSignal:V.abortSignal,fetch:this.config.fetch}),P=[],$={unified:"other",raw:void 0},A=void 0,O=!1,K=!1,Z={openai:{}};return{stream:E.pipeThrough(new TransformStream({start(q){q.enqueue({type:"stream-start",warnings:J})},transform(q,x){var f,y,w,M,g,b,n,i,p,m,s,X,u,I,H,d,e;if(V.includeRawChunks)x.enqueue({type:"raw",rawValue:q.rawValue});if(!q.success){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:q.error});return}let C=q.value;if("error"in C){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:C.error});return}if(!O){let z=LQ(C);if(Object.values(z).some(Boolean))O=!0,x.enqueue({type:"response-metadata",...LQ(C)})}if(C.usage!=null){if(A=C.usage,((f=C.usage.completion_tokens_details)==null?void 0:f.accepted_prediction_tokens)!=null)Z.openai.acceptedPredictionTokens=(y=C.usage.completion_tokens_details)==null?void 0:y.accepted_prediction_tokens;if(((w=C.usage.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens)!=null)Z.openai.rejectedPredictionTokens=(M=C.usage.completion_tokens_details)==null?void 0:M.rejected_prediction_tokens}let k=C.choices[0];if((k==null?void 0:k.finish_reason)!=null)$={unified:vQ(k.finish_reason),raw:k.finish_reason};if(((g=k==null?void 0:k.logprobs)==null?void 0:g.content)!=null)Z.openai.logprobs=k.logprobs.content;if((k==null?void 0:k.delta)==null)return;let L=k.delta;if(L.content!=null){if(!K)x.enqueue({type:"text-start",id:"0"}),K=!0;x.enqueue({type:"text-delta",id:"0",delta:L.content})}if(L.tool_calls!=null)for(let z of L.tool_calls){let T=z.index;if(P[T]==null){if(z.type!=null&&z.type!=="function")throw new AQ({data:z,message:"Expected 'function' type."});if(z.id==null)throw new AQ({data:z,message:"Expected 'id' to be a string."});if(((b=z.function)==null?void 0:b.name)==null)throw new AQ({data:z,message:"Expected 'function.name' to be a string."});x.enqueue({type:"tool-input-start",id:z.id,toolName:z.function.name}),P[T]={id:z.id,type:"function",function:{name:z.function.name,arguments:(n=z.function.arguments)!=null?n:""},hasFinished:!1};let B=P[T];if(((i=B.function)==null?void 0:i.name)!=null&&((p=B.function)==null?void 0:p.arguments)!=null){if(B.function.arguments.length>0)x.enqueue({type:"tool-input-delta",id:B.id,delta:B.function.arguments});if(qQ(B.function.arguments))x.enqueue({type:"tool-input-end",id:B.id}),x.enqueue({type:"tool-call",toolCallId:(m=B.id)!=null?m:QQ(),toolName:B.function.name,input:B.function.arguments}),B.hasFinished=!0}continue}let N=P[T];if(N.hasFinished)continue;if(((s=z.function)==null?void 0:s.arguments)!=null)N.function.arguments+=(u=(X=z.function)==null?void 0:X.arguments)!=null?u:"";if(x.enqueue({type:"tool-input-delta",id:N.id,delta:(I=z.function.arguments)!=null?I:""}),((H=N.function)==null?void 0:H.name)!=null&&((d=N.function)==null?void 0:d.arguments)!=null&&qQ(N.function.arguments))x.enqueue({type:"tool-input-end",id:N.id}),x.enqueue({type:"tool-call",toolCallId:(e=N.id)!=null?e:QQ(),toolName:N.function.name,input:N.function.arguments}),N.hasFinished=!0}if(L.annotations!=null)for(let z of L.annotations)x.enqueue({type:"source",sourceType:"url",id:QQ(),url:z.url_citation.url,title:z.url_citation.title})},flush(q){if(K)q.enqueue({type:"text-end",id:"0"});q.enqueue({type:"finish",finishReason:$,usage:cQ(A),...Z!=null?{providerMetadata:Z}:{}})}})),request:{body:G},response:{headers:j}}}};function nQ(V){var Y,J,G,j;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let E=(Y=V.prompt_tokens)!=null?Y:0,P=(J=V.completion_tokens)!=null?J:0;return{inputTokens:{total:(G=V.prompt_tokens)!=null?G:void 0,noCache:E,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(j=V.completion_tokens)!=null?j:void 0,text:P,reasoning:void 0},raw:V}}function CV({prompt:V,user:Y="user",assistant:J="assistant"}){let G="";if(V[0].role==="system")G+=`${V[0].content}
2
+ import{Aq as JQ,Cq as GV,Hq as wQ,Jq as QQ,Oq as JV,Qq as FQ,Sq as KV,Tq as SV,Vq as PV,Wq as D,Zq as F,_q as t,ar as BV,cr as qQ,er as VQ,fr as WQ,gr as xQ,jr as EV,kr as a,mr as UV,nr as BQ,or as $Q,pr as AV,sr as xV,tq as l,uq as zV,yq as UQ}from"./chunk-gwfx7tx7.js";import{Ar as AQ,Fr as jV,Hr as YQ,vr as ZV,zr as $V}from"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import{xv as Q}from"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-4sazy0nq.js";var HQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),zQ=UV({errorSchema:HQ,errorToMessage:(V)=>V.error.message});function LV(V){let Y=V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),J=V.startsWith("gpt-4")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-nano")&&!V.startsWith("gpt-5-chat")&&!V.startsWith("gpt-5.4-nano")||V.startsWith("o3")||V.startsWith("o4-mini"),G=V.startsWith("o1")||V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),j=V.startsWith("gpt-5.1")||V.startsWith("gpt-5.2")||V.startsWith("gpt-5.3")||V.startsWith("gpt-5.4");return{supportsFlexProcessing:Y,supportsPriorityProcessing:J,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:j}}function cQ(V){var Y,J,G,j,E,P;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Y=V.prompt_tokens)!=null?Y:0,A=(J=V.completion_tokens)!=null?J:0,O=(j=(G=V.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?j:0,K=(P=(E=V.completion_tokens_details)==null?void 0:E.reasoning_tokens)!=null?P:0;return{inputTokens:{total:$,noCache:$-O,cacheRead:O,cacheWrite:void 0},outputTokens:{total:A,text:A-K,reasoning:K},raw:V}}function HV(V){return JSON.stringify(V===void 0?{}:V)}function MV({prompt:V,systemMessageMode:Y="system"}){var J;let G=[],j=[];for(let{role:E,content:P}of V)switch(E){case"system":{switch(Y){case"system":{G.push({role:"system",content:P});break}case"developer":{G.push({role:"developer",content:P});break}case"remove":{j.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(P.length===1&&P[0].type==="text"){G.push({role:"user",content:P[0].text});break}G.push({role:"user",content:P.map(($,A)=>{var O,K,Z;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let q=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${q};base64,${JQ($.data)}`,detail:(K=(O=$.providerOptions)==null?void 0:O.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new YQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:JQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:JQ($.data),format:"mp3"}};default:throw new YQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new YQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(Z=$.filename)!=null?Z:`part-${A}.pdf`,file_data:`data:application/pdf;base64,${JQ($.data)}`}}}else throw new YQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",A=[];for(let O of P)switch(O.type){case"text":{$+=O.text;break}case"tool-call":{A.push({id:O.toolCallId,type:"function",function:{name:O.toolName,arguments:HV(O.input)}});break}}G.push({role:"assistant",content:$,tool_calls:A.length>0?A:void 0});break}case"tool":{for(let $ of P){if($.type==="tool-approval-response")continue;let A=$.output,O;switch(A.type){case"text":case"error-text":O=A.value;break;case"execution-denied":O=(J=A.reason)!=null?J:"Tool execution denied.";break;case"content":case"json":case"error-json":O=JSON.stringify(A.value);break}G.push({role:"tool",tool_call_id:$.toolCallId,content:O})}break}default:throw Error(`Unsupported role: ${E}`)}return{messages:G,warnings:j}}function LQ({id:V,model:Y,created:J}){return{id:V!=null?V:void 0,modelId:Y!=null?Y:void 0,timestamp:J?new Date(J*1000):void 0}}function vQ(V){switch(V){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var bV=D(()=>F(Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}))),yV=D(()=>F(Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}),HQ]))),RV=D(()=>F(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function kV({tools:V,toolChoice:Y}){V=(V==null?void 0:V.length)?V:void 0;let J=[];if(V==null)return{tools:void 0,toolChoice:void 0,toolWarnings:J};let G=[];for(let E of V)switch(E.type){case"function":G.push({type:"function",function:{name:E.name,description:E.description,parameters:E.inputSchema,...E.strict!=null?{strict:E.strict}:{}}});break;default:J.push({type:"unsupported",feature:`tool type: ${E.type}`});break}if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:J};let j=Y.type;switch(j){case"auto":case"none":case"required":return{tools:G,toolChoice:j,toolWarnings:J};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:J};default:throw new YQ({functionality:`tool choice type: ${j}`})}}var gV=class{constructor(V,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=V,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:V,maxOutputTokens:Y,temperature:J,topP:G,topK:j,frequencyPenalty:E,presencePenalty:P,stopSequences:$,responseFormat:A,seed:O,tools:K,toolChoice:Z,providerOptions:q}){var x,f,y,w,M;let g=[],b=(x=await VQ({provider:"openai",providerOptions:q,schema:RV}))!=null?x:{},n=LV(this.modelId),i=(f=b.forceReasoning)!=null?f:n.isReasoningModel;if(j!=null)g.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=MV({prompt:V,systemMessageMode:(y=b.systemMessageMode)!=null?y:i?"developer":n.systemMessageMode});g.push(...m);let s=(w=b.strictJsonSchema)!=null?w:!0,X={model:this.modelId,logit_bias:b.logitBias,logprobs:b.logprobs===!0||typeof b.logprobs==="number"?!0:void 0,top_logprobs:typeof b.logprobs==="number"?b.logprobs:typeof b.logprobs==="boolean"?b.logprobs?0:void 0:void 0,user:b.user,parallel_tool_calls:b.parallelToolCalls,max_tokens:Y,temperature:J,top_p:G,frequency_penalty:E,presence_penalty:P,response_format:(A==null?void 0:A.type)==="json"?A.schema!=null?{type:"json_schema",json_schema:{schema:A.schema,strict:s,name:(M=A.name)!=null?M:"response",description:A.description}}:{type:"json_object"}:void 0,stop:$,seed:O,verbosity:b.textVerbosity,max_completion_tokens:b.maxCompletionTokens,store:b.store,metadata:b.metadata,prediction:b.prediction,reasoning_effort:b.reasoningEffort,service_tier:b.serviceTier,prompt_cache_key:b.promptCacheKey,prompt_cache_retention:b.promptCacheRetention,safety_identifier:b.safetyIdentifier,messages:p};if(i){if(b.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(X.top_p!=null)X.top_p=void 0,g.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(X.logprobs!=null)X.logprobs=void 0,g.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(X.frequency_penalty!=null)X.frequency_penalty=void 0,g.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(X.presence_penalty!=null)X.presence_penalty=void 0,g.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(X.logit_bias!=null)X.logit_bias=void 0,g.push({type:"other",message:"logitBias is not supported for reasoning models"});if(X.top_logprobs!=null)X.top_logprobs=void 0,g.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(X.max_tokens!=null){if(X.max_completion_tokens==null)X.max_completion_tokens=X.max_tokens;X.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(b.serviceTier==="flex"&&!n.supportsFlexProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),X.service_tier=void 0;if(b.serviceTier==="priority"&&!n.supportsPriorityProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),X.service_tier=void 0;let{tools:u,toolChoice:I,toolWarnings:H}=kV({tools:K,toolChoice:Z});return{args:{...X,tools:u,tool_choice:I},warnings:[...g,...H]}}async doGenerate(V){var Y,J,G,j,E,P,$;let{args:A,warnings:O}=await this.getArgs(V),{responseHeaders:K,value:Z,rawValue:q}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:A,failedResponseHandler:zQ,successfulResponseHandler:$Q(bV),abortSignal:V.abortSignal,fetch:this.config.fetch}),x=Z.choices[0],f=[],y=x.message.content;if(y!=null&&y.length>0)f.push({type:"text",text:y});for(let b of(Y=x.message.tool_calls)!=null?Y:[])f.push({type:"tool-call",toolCallId:(J=b.id)!=null?J:QQ(),toolName:b.function.name,input:b.function.arguments});for(let b of(G=x.message.annotations)!=null?G:[])f.push({type:"source",sourceType:"url",id:QQ(),url:b.url_citation.url,title:b.url_citation.title});let w=(j=Z.usage)==null?void 0:j.completion_tokens_details,M=(E=Z.usage)==null?void 0:E.prompt_tokens_details,g={openai:{}};if((w==null?void 0:w.accepted_prediction_tokens)!=null)g.openai.acceptedPredictionTokens=w==null?void 0:w.accepted_prediction_tokens;if((w==null?void 0:w.rejected_prediction_tokens)!=null)g.openai.rejectedPredictionTokens=w==null?void 0:w.rejected_prediction_tokens;if(((P=x.logprobs)==null?void 0:P.content)!=null)g.openai.logprobs=x.logprobs.content;return{content:f,finishReason:{unified:vQ(x.finish_reason),raw:($=x.finish_reason)!=null?$:void 0},usage:cQ(Z.usage),request:{body:A},response:{...LQ(Z),headers:K,body:q},warnings:O,providerMetadata:g}}async doStream(V){let{args:Y,warnings:J}=await this.getArgs(V),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:j,value:E}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:G,failedResponseHandler:zQ,successfulResponseHandler:BQ(yV),abortSignal:V.abortSignal,fetch:this.config.fetch}),P=[],$={unified:"other",raw:void 0},A=void 0,O=!1,K=!1,Z={openai:{}};return{stream:E.pipeThrough(new TransformStream({start(q){q.enqueue({type:"stream-start",warnings:J})},transform(q,x){var f,y,w,M,g,b,n,i,p,m,s,X,u,I,H,d,e;if(V.includeRawChunks)x.enqueue({type:"raw",rawValue:q.rawValue});if(!q.success){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:q.error});return}let C=q.value;if("error"in C){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:C.error});return}if(!O){let z=LQ(C);if(Object.values(z).some(Boolean))O=!0,x.enqueue({type:"response-metadata",...LQ(C)})}if(C.usage!=null){if(A=C.usage,((f=C.usage.completion_tokens_details)==null?void 0:f.accepted_prediction_tokens)!=null)Z.openai.acceptedPredictionTokens=(y=C.usage.completion_tokens_details)==null?void 0:y.accepted_prediction_tokens;if(((w=C.usage.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens)!=null)Z.openai.rejectedPredictionTokens=(M=C.usage.completion_tokens_details)==null?void 0:M.rejected_prediction_tokens}let k=C.choices[0];if((k==null?void 0:k.finish_reason)!=null)$={unified:vQ(k.finish_reason),raw:k.finish_reason};if(((g=k==null?void 0:k.logprobs)==null?void 0:g.content)!=null)Z.openai.logprobs=k.logprobs.content;if((k==null?void 0:k.delta)==null)return;let L=k.delta;if(L.content!=null){if(!K)x.enqueue({type:"text-start",id:"0"}),K=!0;x.enqueue({type:"text-delta",id:"0",delta:L.content})}if(L.tool_calls!=null)for(let z of L.tool_calls){let T=z.index;if(P[T]==null){if(z.type!=null&&z.type!=="function")throw new AQ({data:z,message:"Expected 'function' type."});if(z.id==null)throw new AQ({data:z,message:"Expected 'id' to be a string."});if(((b=z.function)==null?void 0:b.name)==null)throw new AQ({data:z,message:"Expected 'function.name' to be a string."});x.enqueue({type:"tool-input-start",id:z.id,toolName:z.function.name}),P[T]={id:z.id,type:"function",function:{name:z.function.name,arguments:(n=z.function.arguments)!=null?n:""},hasFinished:!1};let B=P[T];if(((i=B.function)==null?void 0:i.name)!=null&&((p=B.function)==null?void 0:p.arguments)!=null){if(B.function.arguments.length>0)x.enqueue({type:"tool-input-delta",id:B.id,delta:B.function.arguments});if(qQ(B.function.arguments))x.enqueue({type:"tool-input-end",id:B.id}),x.enqueue({type:"tool-call",toolCallId:(m=B.id)!=null?m:QQ(),toolName:B.function.name,input:B.function.arguments}),B.hasFinished=!0}continue}let N=P[T];if(N.hasFinished)continue;if(((s=z.function)==null?void 0:s.arguments)!=null)N.function.arguments+=(u=(X=z.function)==null?void 0:X.arguments)!=null?u:"";if(x.enqueue({type:"tool-input-delta",id:N.id,delta:(I=z.function.arguments)!=null?I:""}),((H=N.function)==null?void 0:H.name)!=null&&((d=N.function)==null?void 0:d.arguments)!=null&&qQ(N.function.arguments))x.enqueue({type:"tool-input-end",id:N.id}),x.enqueue({type:"tool-call",toolCallId:(e=N.id)!=null?e:QQ(),toolName:N.function.name,input:N.function.arguments}),N.hasFinished=!0}if(L.annotations!=null)for(let z of L.annotations)x.enqueue({type:"source",sourceType:"url",id:QQ(),url:z.url_citation.url,title:z.url_citation.title})},flush(q){if(K)q.enqueue({type:"text-end",id:"0"});q.enqueue({type:"finish",finishReason:$,usage:cQ(A),...Z!=null?{providerMetadata:Z}:{}})}})),request:{body:G},response:{headers:j}}}};function nQ(V){var Y,J,G,j;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let E=(Y=V.prompt_tokens)!=null?Y:0,P=(J=V.completion_tokens)!=null?J:0;return{inputTokens:{total:(G=V.prompt_tokens)!=null?G:void 0,noCache:E,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(j=V.completion_tokens)!=null?j:void 0,text:P,reasoning:void 0},raw:V}}function CV({prompt:V,user:Y="user",assistant:J="assistant"}){let G="";if(V[0].role==="system")G+=`${V[0].content}
3
3
 
4
4
  `,V=V.slice(1);for(let{role:j,content:E}of V)switch(j){case"system":throw new $V({message:"Unexpected system message in prompt: ${content}",prompt:V});case"user":{let P=E.map(($)=>{switch($.type){case"text":return $.text}}).filter(Boolean).join("");G+=`${Y}:
5
5
  ${P}
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{kQ as t}from"./chunk-4sazy0nq.js";var e=await import("./chunk-tzg4z74d.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Aj as w,Bj as x,Cj as y,Dj as z,Ej as A,Fj as B,Gj as C,Hj as D,Ij as E,Jj as F,Kj as G,Lj as H,Mj as I,Nj as J,Oj as K,Pj as L,Qj as M,Rj as N,Sj as O,Tj as P,Uj as Q,Vj as R,ej as a,fj as b,gj as c,hj as d,ij as e,jj as f,kj as g,lj as h,mj as i,nj as j,oj as k,pj as l,qj as m,rj as n,sj as o,tj as p,uj as q,vj as r,wj as s,xj as t,yj as u,zj as v}from"./chunk-yk97q51d.js";import"./chunk-c5pb87yf.js";import"./chunk-3k2b05fv.js";export{Q as zodToJsonSchema,u as zodPatterns,g as setResponseValueAndErrors,O as selectParser,B as primitiveMappings,M as parseUnknownDef,C as parseUnionDef,L as parseUndefinedDef,K as parseTupleDef,v as parseStringDef,J as parseSetDef,w as parseRecordDef,N as parseReadonlyDef,I as parsePromiseDef,H as parsePipelineDef,G as parseOptionalDef,F as parseObjectDef,E as parseNumberDef,D as parseNullableDef,A as parseNullDef,z as parseNeverDef,y as parseNativeEnumDef,x as parseMapDef,t as parseLiteralDef,s as parseIntersectionDef,r as parseEnumDef,q as parseEffectsDef,p as parseDefaultDef,P as parseDef,o as parseDateDef,n as parseCatchDef,m as parseBrandedDef,l as parseBooleanDef,k as parseBigintDef,j as parseArrayDef,i as parseAnyDef,b as jsonDescription,a as ignoreOverride,h as getRelativePath,e as getRefs,d as getDefaultOptions,c as defaultOptions,R as default,f as addErrorMessage};
2
+ import{$i as g,Aj as H,Bj as I,Cj as J,Dj as K,Ej as L,Fj as M,Gj as N,Hj as O,Ij as P,Jj as Q,Kj as R,Vi as a,Wi as b,Xi as c,Yi as d,Zi as e,_i as f,aj as h,bj as i,cj as j,dj as k,ej as l,fj as m,gj as n,hj as o,ij as p,jj as q,kj as r,lj as s,mj as t,nj as u,oj as v,pj as w,qj as x,rj as y,sj as z,tj as A,uj as B,vj as C,wj as D,xj as E,yj as F,zj as G}from"./chunk-wev34grp.js";import"./chunk-ymtcm4xd.js";import"./chunk-4sazy0nq.js";export{Q as zodToJsonSchema,u as zodPatterns,g as setResponseValueAndErrors,O as selectParser,B as primitiveMappings,M as parseUnknownDef,C as parseUnionDef,L as parseUndefinedDef,K as parseTupleDef,v as parseStringDef,J as parseSetDef,w as parseRecordDef,N as parseReadonlyDef,I as parsePromiseDef,H as parsePipelineDef,G as parseOptionalDef,F as parseObjectDef,E as parseNumberDef,D as parseNullableDef,A as parseNullDef,z as parseNeverDef,y as parseNativeEnumDef,x as parseMapDef,t as parseLiteralDef,s as parseIntersectionDef,r as parseEnumDef,q as parseEffectsDef,p as parseDefaultDef,P as parseDef,o as parseDateDef,n as parseCatchDef,m as parseBrandedDef,l as parseBooleanDef,k as parseBigintDef,j as parseArrayDef,i as parseAnyDef,b as jsonDescription,a as ignoreOverride,h as getRelativePath,e as getRefs,d as getDefaultOptions,c as defaultOptions,R as default,f as addErrorMessage};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-4sazy0nq.js";var r="./highlights-eq9cgrbb.scm";export{r as default};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Tu as L}from"./chunk-m4j7jyrd.js";import{OI as M,TC as C,rJ as F}from"./chunk-a0rp7gh4.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 Gp,k as Hp,y as Ip,A as Jp,n as Kp};
2
+ import{$u as L}from"./chunk-hnz570f9.js";import{$C as C,UI as M,yJ as F}from"./chunk-ydc6ypjt.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 wp,k as xp,y as yp,A as zp,n as Ap};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{iQ as fr}from"./chunk-4sazy0nq.js";var gr="0.1.36",xr="latest",yr="4fceec981eacf82ea16734f293cefeb78b163aae",hr=!1;var u={done:!1,hasNext:!1};function l(r,...a){let o=r,t=a.map((i)=>("lazy"in i)?v(i):void 0),s=0;for(;s<a.length;){if(t[s]===void 0||!S(o)){let n=a[s];o=n(o),s+=1;continue}let i=[];for(let n=s;n<a.length;n++){let f=t[n];if(f===void 0||(i.push(f),f.isSingle))break}let e=[];for(let n of o)if(j(n,e,i))break;let{isSingle:p}=i.at(-1);o=p?e[0]:e,s+=i.length}return o}function j(r,a,o){if(o.length===0)return a.push(r),!1;let t=r,s=u,i=!1;for(let[e,p]of o.entries()){let{index:n,items:f}=p;if(f.push(t),s=p(t,n,f),p.index+=1,s.hasNext){if(s.hasMany??!1){for(let g of s.next)if(j(g,a,o.slice(e+1)))return!0;return i}t=s.next}if(!s.hasNext)break;s.done&&(i=!0)}return s.hasNext&&a.push(t),i}function v(r){let{lazy:a,lazyArgs:o}=r,t=a(...o);return Object.assign(t,{isSingle:a.single??!1,index:0,items:[]})}function S(r){return typeof r=="string"||typeof r=="object"&&r!==null&&Symbol.iterator in r}function x(r,a){let o=a.length-r.length;if(o===1){let[t,...s]=a;return l(t,{lazy:r,lazyArgs:s})}if(o===0){let t={lazy:r,lazyArgs:a};return Object.assign((s)=>l(s,t),t)}throw Error("Wrong number of arguments")}function B(...r){return x(_,r)}function _(){let r=new Set;return(a)=>r.has(a)?u:(r.add(a),{done:!1,hasNext:!0,next:a})}function N(r,a,o){let t=(s)=>r(s,...a);return o===void 0?t:Object.assign(t,{lazy:o,lazyArgs:a})}function m(r,a,o){let t=r.length-a.length;if(t===0)return r(...a);if(t===1)return N(r,a,o);throw Error("Wrong number of arguments")}function C(...r){return m(Object.values,r)}var D={asc:(r,a)=>r>a,desc:(r,a)=>r<a};function y(r,a){let[o,...t]=a;if(!P(o)){let i=b(...t);return r(o,i)}let s=b(o,...t);return(i)=>r(i,s)}function b(r,a,...o){let t=typeof r=="function"?r:r[0],s=typeof r=="function"?"asc":r[1],{[s]:i}=D,e=a===void 0?void 0:b(a,...o);return(p,n)=>{let f=t(p),g=t(n);return i(f,g)?1:i(g,f)?-1:e?.(p,n)??0}}function P(r){if(Q(r))return!0;if(typeof r!="object"||!Array.isArray(r))return!1;let[a,o,...t]=r;return Q(a)&&typeof o=="string"&&o in D&&t.length===0}var Q=(r)=>typeof r=="function"&&r.length===1;function h(...r){return y(z,r)}var z=(r,a)=>[...r].sort(a);function I(r){if(typeof r!="object"||r===null)return!1;let a=Object.getPrototypeOf(r);return a===null||a===Object.prototype}function A(...r){return m(T,r)}function T(r,a){let o={...r,...a};for(let t in a){if(!(t in r))continue;let{[t]:s}=r;if(!I(s))continue;let{[t]:i}=a;I(i)&&(o[t]=T(s,i))}return o}function L(...r){return m(R,r,W)}var R=(r,a)=>r.map(a),W=(r)=>(a,o,t)=>({done:!1,hasNext:!0,next:r(a,o,t)});function k(...r){return x(M,r)}function M(r){let a=r,o=new Set;return(t,s,i)=>{let e=a(t,s,i);return o.has(e)?u:(o.add(e),{done:!1,hasNext:!0,next:t})}}function w(...r){return m(U,r)}function U(r,a){let o={};for(let[t,s]of Object.entries(r))a(s,t,r)&&(o[t]=s);return o}function c(...r){return m(V,r)}var V=(r,a)=>r.length>=a;function F(...r){return m(q,r)}function q(r,a){if(!c(a,1))return{...r};if(!c(a,2)){let{[a[0]]:t,...s}=r;return s}let o={...r};for(let t of a)delete o[t];return o}function H(...r){return m(K,r)}function K(r,a){let o={};for(let[t,s]of Object.entries(r)){let i=a(s,t,r);o[t]=i}return o}function G(...r){return m(J,r)}var J=(r,a)=>{let o=Object.create(null);for(let t=0;t<r.length;t++){let s=r[t],i=a(s,t,r);if(i!==void 0){let e=o[i];e===void 0?o[i]=[s]:e.push(s)}}return Object.setPrototypeOf(o,Object.prototype),o};function X(...r){return m(d,r)}function d(r,a){if(r===a||Object.is(r,a))return!0;if(typeof r!="object"||typeof a!="object"||r===null||a===null||Object.getPrototypeOf(r)!==Object.getPrototypeOf(a))return!1;if(Array.isArray(r))return Y(r,a);if(r instanceof Map)return Z(r,a);if(r instanceof Set)return $(r,a);if(r instanceof Date)return r.getTime()===a.getTime();if(r instanceof RegExp)return r.toString()===a.toString();if(Object.keys(r).length!==Object.keys(a).length)return!1;for(let[o,t]of Object.entries(r))if(!(o in a)||!d(t,a[o]))return!1;return!0}function Y(r,a){if(r.length!==a.length)return!1;for(let[o,t]of r.entries())if(!d(t,a[o]))return!1;return!0}function Z(r,a){if(r.size!==a.size)return!1;for(let[o,t]of r.entries())if(!a.has(o)||!d(t,a.get(o)))return!1;return!0}function $(r,a){if(r.size!==a.size)return!1;let o=[...a];for(let t of r){let s=!1;for(let[i,e]of o.entries())if(d(t,e)){s=!0,o.splice(i,1);break}if(!s)return!1}return!0}function rr(...r){return y(ar,r)}function ar(r,a){if(!c(r,2))return r[0];let[o]=r,[,...t]=r;for(let s of t)a(s,o)<0&&(o=s);return o}function or(...r){return m(tr,r,sr)}var tr=(r,a)=>r.flatMap(a),sr=(r)=>(a,o,t)=>{let s=r(a,o,t);return Array.isArray(s)?{done:!1,hasNext:!0,hasMany:!0,next:s}:{done:!1,hasNext:!0,next:s}};function ir(...r){return m(Object.entries,r)}function mr(...r){return m(er,r,nr)}var er=(r,a)=>r.filter(a),nr=(r)=>(a,o,t)=>r(a,o,t)?{done:!1,hasNext:!0,next:a}:u;var lr={};fr(lr,{match:()=>O,allStructured:()=>ur,all:()=>pr});function O(r,a){if(r)r=r.replaceAll("\\","/");if(a)a=a.replaceAll("\\","/");let o=a.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");if(o.endsWith(" .*"))o=o.slice(0,-3)+"( .*)?";let t=process.platform==="win32"?"si":"s";return new RegExp("^"+o+"$",t).test(r)}function pr(r,a){let o=l(a,Object.entries,h([([s])=>s.length,"asc"],[([s])=>s,"asc"])),t=void 0;for(let[s,i]of o)if(O(r,s)){t=i;continue}return t}function ur(r,a){let o=l(a,Object.entries,h([([s])=>s.length,"asc"],[([s])=>s,"asc"])),t=void 0;for(let[s,i]of o){let e=s.split(/\s+/);if(!O(r.head,e[0]))continue;if(e.length===1||E(r.tail,e.slice(1))){t=i;continue}}return t}function E(r,a){if(a.length===0)return!0;let[o,...t]=a;if(o==="*")return E(r,t);for(let s=0;s<r.length;s++)if(O(r[s],o)&&E(r.slice(s+1),t))return!0;return!1}var Jm="QITQODE_RUN_ID",Xm="QITQODE_PROCESS_ROLE";function cr(){return process.env.QITQODE_RUN_ID??=crypto.randomUUID()}function dr(r){return process.env.QITQODE_PROCESS_ROLE??=r}function Ym(r){return{runID:cr(),processRole:dr(r)}}function Zm(r){let a=Object.fromEntries(Object.entries(process.env).filter((o)=>o[1]!==void 0));return r?Object.assign(a,r):a}
3
+ export{gr as Rt,xr as St,yr as Tt,hr as Ut,l as Vt,B as Wt,k as Xt,C as Yt,h as Zt,w as _t,A as $t,F as au,H as bu,L as cu,G as du,X as eu,rr as fu,or as gu,ir as hu,mr as iu,O as ju,lr as ku,Jm as lu,Xm as mu,cr as nu,Ym as ou,Zm as pu};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cd as d}from"./chunk-37dvnent.js";import{Pd as f}from"./chunk-9xvctnjr.js";import{Sf as e}from"./chunk-9s4whpg1.js";import{Xg as l}from"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{$j as m,rl as u}from"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var v=f({command:"usage [sessionID]",describe:"show per-turn token/cost breakdown for a session (debug/verification tool)",builder:(o)=>{return o.positional("sessionID",{describe:"session ID to inspect (default: most recently updated session)",type:"string"}).option("format",{describe:"output format",type:"string",choices:["table","json"],default:"table"}).option("limit",{describe:"number of most recent turns to show (default: all)",type:"number"})},handler:async(o)=>{await d(process.cwd(),async()=>{let a=o.sessionID?m.make(o.sessionID):[...u.list({roots:!1,limit:1})][0]?.id;if(!a)e.error("No sessions found"),process.exit(1);let p=(await l.runPromise(u.Service.use((s)=>s.messages({sessionID:a,agentID:"*"})))).filter((s)=>s.info.role==="assistant").map((s)=>{let t=s.info,c=s.parts.filter((n)=>n.type==="step-finish");return{messageID:t.id,provider:t.providerID,model:t.modelID,finish:t.finish,cost:t.cost??0,tokens:t.tokens??{input:0,output:0,reasoning:0,cache:{read:0,write:0}},steps:c.map((n)=>({cost:n.cost,tokens:n.tokens}))}}),r=o.limit?p.slice(-o.limit):p;if(r.length===0){e.println("No assistant turns found for this session");return}if(o.format==="json"){console.log(JSON.stringify({sessionID:a,turns:r},null,2));return}e.println(`Session ${a} \u2014 ${r.length} turn(s)`),e.println("");for(let s of r){let t=s.tokens,c=t.input+t.cache.read+t.cache.write,n=t.output+t.reasoning;if(e.println(`${s.messageID} ${s.provider}/${s.model} finish=${s.finish??"-"}`),e.println(` tokens input=${t.input} cache.read=${t.cache.read} cache.write=${t.cache.write} output=${t.output} reasoning=${t.reasoning} (in=${c} out=${n})`),e.println(` cost $${s.cost.toFixed(6)}`),s.steps.length>1)e.println(` steps ${s.steps.length}`),s.steps.forEach((i,g)=>{e.println(` [${g}] input=${i.tokens.input} output=${i.tokens.output} cache.read=${i.tokens.cache.read} cache.write=${i.tokens.cache.write} reasoning=${i.tokens.reasoning} cost=$${i.cost.toFixed(6)}`)});e.println("")}let h=r.reduce((s,t)=>s+t.cost,0);e.println(`Total cost for shown turns: $${h.toFixed(6)}`),e.println("(source: Session.getUsage(), same numbers persisted to the message record \u2014 see session.usage log tag)")})}});export{v as UsageCommand};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{nt as i}from"./chunk-79agp7v3.js";import{nu as o}from"./chunk-tns5x4w0.js";import{_P as c}from"./chunk-3k2b05fv.js";var e=c(i(),1);import p from"path";function l(n,t){let r=t?.PATH??t?.Path??process.env.PATH??process.env.Path??"",h=r?r+p.delimiter+o.Path.bin:o.Path.bin,s=e.default.sync(n,{nothrow:!0,path:h,pathExt:t?.PATHEXT??t?.PathExt??process.env.PATHEXT??process.env.PathExt});return typeof s==="string"?s:null}
3
- export{l as aq};
2
+ import{Kt as i}from"./chunk-p8kpqyxb.js";import{_u as o}from"./chunk-vc4e6xc4.js";import{gQ as c}from"./chunk-4sazy0nq.js";var e=c(i(),1);import p from"path";function l(n,t){let r=t?.PATH??t?.Path??process.env.PATH??process.env.Path??"",h=r?r+p.delimiter+o.Path.bin:o.Path.bin,s=e.default.sync(n,{nothrow:!0,path:h,pathExt:t?.PATHEXT??t?.PathExt??process.env.PATHEXT??process.env.PathExt});return typeof s==="string"?s:null}
3
+ export{l as Cp};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-3k2b05fv.js";var e={"ui.sessionReview.title":"Modifications de la session","ui.sessionReview.title.lastTurn":"Modifications du dernier tour","ui.sessionReview.diffStyle.unified":"Unifi\xE9","ui.sessionReview.diffStyle.split":"Divis\xE9","ui.sessionReview.openFile":"Ouvrir le fichier","ui.sessionReview.selection.line":"ligne {{line}}","ui.sessionReview.selection.lines":"lignes {{start}}-{{end}}","ui.sessionReview.expandAll":"Tout d\xE9velopper","ui.sessionReview.collapseAll":"Tout r\xE9duire","ui.sessionReview.change.added":"Ajout\xE9","ui.sessionReview.change.removed":"Supprim\xE9","ui.sessionReview.change.modified":"Modifi\xE9","ui.sessionReview.image.loading":"Chargement...","ui.sessionReview.image.placeholder":"Image","ui.sessionReview.largeDiff.title":"Diff trop volumineux pour \xEAtre affich\xE9","ui.sessionReview.largeDiff.meta":"Limite : {{limit}} lignes modifi\xE9es. Actuel : {{current}} lignes modifi\xE9es.","ui.sessionReview.largeDiff.renderAnyway":"Afficher quand m\xEAme","ui.fileMedia.kind.image":"image","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Fichier {{kind}} supprim\xE9","ui.fileMedia.state.loading":"Chargement du fichier {{kind}}","ui.fileMedia.state.error":"Erreur avec le fichier {{kind}}","ui.fileMedia.state.unavailable":"Fichier {{kind}} indisponible","ui.fileMedia.binary.title":"Fichier binaire","ui.fileMedia.binary.description.path":"Impossible d'afficher {{path}} car il s'agit d'un fichier binaire.","ui.fileMedia.binary.description.default":"Impossible d'afficher ce fichier car il s'agit d'un fichier binaire.","ui.lineComment.label.prefix":"Commenter sur ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Commentaire sur ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Ajouter un commentaire","ui.lineComment.submit":"Commenter","ui.sessionTurn.steps.show":"Afficher les \xE9tapes","ui.sessionTurn.steps.hide":"Masquer les \xE9tapes","ui.sessionTurn.summary.response":"R\xE9ponse","ui.sessionTurn.diff.showMore":"Afficher plus de modifications ({{count}})","ui.sessionTurn.retry.retrying":"nouvelle tentative","ui.sessionTurn.retry.inSeconds":"dans {{seconds}}s","ui.sessionTurn.retry.attempt":"tentative n\xB0{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentative n\xB0{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est en surchauffe","ui.sessionTurn.error.freeUsageExceeded":"Limite d'utilisation gratuite d\xE9pass\xE9e","ui.sessionTurn.error.addQredits":"Ajouter des cr\xE9dits","ui.sessionTurn.status.delegating":"D\xE9l\xE9gation du travail","ui.sessionTurn.status.planning":"Planification des prochaines \xE9tapes","ui.sessionTurn.status.gatheringContext":"Exploration","ui.sessionTurn.status.gatheredContext":"Explor\xE9","ui.sessionTurn.status.searchingCodebase":"Recherche dans la base de code","ui.sessionTurn.status.searchingWeb":"Recherche sur le web","ui.sessionTurn.status.makingEdits":"Application des modifications","ui.sessionTurn.status.runningCommands":"Ex\xE9cution des commandes","ui.sessionTurn.status.thinking":"R\xE9flexion","ui.sessionTurn.status.thinkingWithTopic":"R\xE9flexion - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Rassemblement des id\xE9es","ui.sessionTurn.status.consideringNextSteps":"Examen des prochaines \xE9tapes","ui.messagePart.questions.dismissed":"Questions ignor\xE9es","ui.messagePart.compaction":"Session compact\xE9e","ui.messagePart.context.read.one":"{{count}} lecture","ui.messagePart.context.read.other":"{{count}} lectures","ui.messagePart.context.search.one":"{{count}} recherche","ui.messagePart.context.search.other":"{{count}} recherches","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} listes","ui.messagePart.diagnostic.error":"Erreur","ui.messagePart.title.edit":"Modifier","ui.messagePart.title.write":"\xC9crire","ui.messagePart.option.typeOwnAnswer":"Tapez votre propre r\xE9ponse","ui.messagePart.review.title":"Passez en revue vos r\xE9ponses","ui.list.loading":"Chargement","ui.list.empty":"Aucun r\xE9sultat","ui.list.clearFilter":"Effacer le filtre","ui.list.emptyWithFilter.prefix":"Aucun r\xE9sultat pour","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nouveau message","ui.textField.copyToClipboard":"Copier dans le presse-papiers","ui.textField.copyLink":"Copier le lien","ui.textField.copied":"Copi\xE9","ui.imagePreview.alt":"Aper\xE7u de l'image","ui.scrollView.ariaLabel":"contenu d\xE9filable","ui.tool.read":"Lire","ui.tool.loaded":"Charg\xE9","ui.tool.list":"Lister","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Recherche Web","ui.tool.codesearch":"Recherche de code","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"T\xE2ches","ui.tool.todos.read":"Lire les t\xE2ches","ui.tool.questions":"Questions","ui.tool.agent":"Agent {{type}}","ui.tool.agent.default":"Agent","ui.common.file.one":"fichier","ui.common.file.other":"fichiers","ui.common.question.one":"question","ui.common.question.other":"questions","ui.common.add":"Ajouter","ui.common.back":"Retour","ui.common.cancel":"Annuler","ui.common.confirm":"Confirmer","ui.common.dismiss":"Ignorer","ui.common.close":"Fermer","ui.common.next":"Suivant","ui.common.submit":"Soumettre","ui.permission.deny":"Refuser","ui.permission.allowAlways":"Toujours autoriser","ui.permission.allowOnce":"Autoriser une fois","ui.message.expand":"D\xE9velopper le message","ui.message.collapse":"R\xE9duire le message","ui.message.copy":"Copier","ui.message.copyMessage":"Copier le message","ui.message.forkMessage":"Bifurquer vers une nouvelle session","ui.message.revertMessage":"R\xE9initialiser \xE0 ce point","ui.message.copyResponse":"Copier la r\xE9ponse","ui.message.copied":"Copi\xE9 !","ui.message.interrupted":"Interrompu","ui.message.queued":"En file","ui.message.attachment.alt":"pi\xE8ce jointe","ui.patch.action.deleted":"Supprim\xE9","ui.patch.action.created":"Cr\xE9\xE9","ui.patch.action.moved":"D\xE9plac\xE9","ui.patch.action.patched":"Corrig\xE9","ui.question.subtitle.answered":"{{count}} r\xE9pondu(s)","ui.question.answer.none":"(pas de r\xE9ponse)","ui.question.review.notAnswered":"(non r\xE9pondu)","ui.question.multiHint":"S\xE9lectionnez tout ce qui s'applique","ui.question.singleHint":"S\xE9lectionnez une r\xE9ponse","ui.question.custom.placeholder":"Tapez votre r\xE9ponse...","ui.fileSearch.placeholder":"Rechercher","ui.fileSearch.previousMatch":"Pr\xE9c\xE9dent","ui.fileSearch.nextMatch":"Suivant","ui.fileSearch.close":"Fermer la recherche","ui.tool.task":"T\xE2che","ui.tool.skill":"Comp\xE9tence","ui.basicTool.called":"Appel\xE9 `{{tool}}`","ui.toolErrorCard.failed":"\xC9chou\xE9","ui.toolErrorCard.copyError":"Copier l'erreur","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
2
+ import"./chunk-4sazy0nq.js";var e={"ui.sessionReview.title":"Modifications de la session","ui.sessionReview.title.lastTurn":"Modifications du dernier tour","ui.sessionReview.diffStyle.unified":"Unifi\xE9","ui.sessionReview.diffStyle.split":"Divis\xE9","ui.sessionReview.openFile":"Ouvrir le fichier","ui.sessionReview.selection.line":"ligne {{line}}","ui.sessionReview.selection.lines":"lignes {{start}}-{{end}}","ui.sessionReview.expandAll":"Tout d\xE9velopper","ui.sessionReview.collapseAll":"Tout r\xE9duire","ui.sessionReview.change.added":"Ajout\xE9","ui.sessionReview.change.removed":"Supprim\xE9","ui.sessionReview.change.modified":"Modifi\xE9","ui.sessionReview.image.loading":"Chargement...","ui.sessionReview.image.placeholder":"Image","ui.sessionReview.largeDiff.title":"Diff trop volumineux pour \xEAtre affich\xE9","ui.sessionReview.largeDiff.meta":"Limite : {{limit}} lignes modifi\xE9es. Actuel : {{current}} lignes modifi\xE9es.","ui.sessionReview.largeDiff.renderAnyway":"Afficher quand m\xEAme","ui.fileMedia.kind.image":"image","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Fichier {{kind}} supprim\xE9","ui.fileMedia.state.loading":"Chargement du fichier {{kind}}","ui.fileMedia.state.error":"Erreur avec le fichier {{kind}}","ui.fileMedia.state.unavailable":"Fichier {{kind}} indisponible","ui.fileMedia.binary.title":"Fichier binaire","ui.fileMedia.binary.description.path":"Impossible d'afficher {{path}} car il s'agit d'un fichier binaire.","ui.fileMedia.binary.description.default":"Impossible d'afficher ce fichier car il s'agit d'un fichier binaire.","ui.lineComment.label.prefix":"Commenter sur ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Commentaire sur ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Ajouter un commentaire","ui.lineComment.submit":"Commenter","ui.sessionTurn.steps.show":"Afficher les \xE9tapes","ui.sessionTurn.steps.hide":"Masquer les \xE9tapes","ui.sessionTurn.summary.response":"R\xE9ponse","ui.sessionTurn.diff.showMore":"Afficher plus de modifications ({{count}})","ui.sessionTurn.retry.retrying":"nouvelle tentative","ui.sessionTurn.retry.inSeconds":"dans {{seconds}}s","ui.sessionTurn.retry.attempt":"tentative n\xB0{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentative n\xB0{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est en surchauffe","ui.sessionTurn.error.freeUsageExceeded":"Limite d'utilisation gratuite d\xE9pass\xE9e","ui.sessionTurn.error.addQredits":"Ajouter des cr\xE9dits","ui.sessionTurn.status.delegating":"D\xE9l\xE9gation du travail","ui.sessionTurn.status.planning":"Planification des prochaines \xE9tapes","ui.sessionTurn.status.gatheringContext":"Exploration","ui.sessionTurn.status.gatheredContext":"Explor\xE9","ui.sessionTurn.status.searchingCodebase":"Recherche dans la base de code","ui.sessionTurn.status.searchingWeb":"Recherche sur le web","ui.sessionTurn.status.makingEdits":"Application des modifications","ui.sessionTurn.status.runningCommands":"Ex\xE9cution des commandes","ui.sessionTurn.status.thinking":"R\xE9flexion","ui.sessionTurn.status.thinkingWithTopic":"R\xE9flexion - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Rassemblement des id\xE9es","ui.sessionTurn.status.consideringNextSteps":"Examen des prochaines \xE9tapes","ui.messagePart.questions.dismissed":"Questions ignor\xE9es","ui.messagePart.compaction":"Session compact\xE9e","ui.messagePart.context.read.one":"{{count}} lecture","ui.messagePart.context.read.other":"{{count}} lectures","ui.messagePart.context.search.one":"{{count}} recherche","ui.messagePart.context.search.other":"{{count}} recherches","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} listes","ui.messagePart.diagnostic.error":"Erreur","ui.messagePart.title.edit":"Modifier","ui.messagePart.title.write":"\xC9crire","ui.messagePart.option.typeOwnAnswer":"Tapez votre propre r\xE9ponse","ui.messagePart.review.title":"Passez en revue vos r\xE9ponses","ui.list.loading":"Chargement","ui.list.empty":"Aucun r\xE9sultat","ui.list.clearFilter":"Effacer le filtre","ui.list.emptyWithFilter.prefix":"Aucun r\xE9sultat pour","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nouveau message","ui.textField.copyToClipboard":"Copier dans le presse-papiers","ui.textField.copyLink":"Copier le lien","ui.textField.copied":"Copi\xE9","ui.imagePreview.alt":"Aper\xE7u de l'image","ui.scrollView.ariaLabel":"contenu d\xE9filable","ui.tool.read":"Lire","ui.tool.loaded":"Charg\xE9","ui.tool.list":"Lister","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Recherche Web","ui.tool.codesearch":"Recherche de code","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"T\xE2ches","ui.tool.todos.read":"Lire les t\xE2ches","ui.tool.questions":"Questions","ui.tool.agent":"Agent {{type}}","ui.tool.agent.default":"Agent","ui.common.file.one":"fichier","ui.common.file.other":"fichiers","ui.common.question.one":"question","ui.common.question.other":"questions","ui.common.add":"Ajouter","ui.common.back":"Retour","ui.common.cancel":"Annuler","ui.common.confirm":"Confirmer","ui.common.dismiss":"Ignorer","ui.common.close":"Fermer","ui.common.next":"Suivant","ui.common.submit":"Soumettre","ui.permission.deny":"Refuser","ui.permission.allowAlways":"Toujours autoriser","ui.permission.allowOnce":"Autoriser une fois","ui.message.expand":"D\xE9velopper le message","ui.message.collapse":"R\xE9duire le message","ui.message.copy":"Copier","ui.message.copyMessage":"Copier le message","ui.message.forkMessage":"Bifurquer vers une nouvelle session","ui.message.revertMessage":"R\xE9initialiser \xE0 ce point","ui.message.copyResponse":"Copier la r\xE9ponse","ui.message.copied":"Copi\xE9 !","ui.message.interrupted":"Interrompu","ui.message.queued":"En file","ui.message.attachment.alt":"pi\xE8ce jointe","ui.patch.action.deleted":"Supprim\xE9","ui.patch.action.created":"Cr\xE9\xE9","ui.patch.action.moved":"D\xE9plac\xE9","ui.patch.action.patched":"Corrig\xE9","ui.question.subtitle.answered":"{{count}} r\xE9pondu(s)","ui.question.answer.none":"(pas de r\xE9ponse)","ui.question.review.notAnswered":"(non r\xE9pondu)","ui.question.multiHint":"S\xE9lectionnez tout ce qui s'applique","ui.question.singleHint":"S\xE9lectionnez une r\xE9ponse","ui.question.custom.placeholder":"Tapez votre r\xE9ponse...","ui.fileSearch.placeholder":"Rechercher","ui.fileSearch.previousMatch":"Pr\xE9c\xE9dent","ui.fileSearch.nextMatch":"Suivant","ui.fileSearch.close":"Fermer la recherche","ui.tool.task":"T\xE2che","ui.tool.skill":"Comp\xE9tence","ui.basicTool.called":"Appel\xE9 `{{tool}}`","ui.toolErrorCard.failed":"\xC9chou\xE9","ui.toolErrorCard.copyError":"Copier l'erreur","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{zg as a}from"./chunk-f77nxt23.js";import{Mg as t,Xg as c}from"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import{$u as i}from"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var n=i.object({name:a.shape.name,branch:a.shape.branch.unwrap(),directory:a.shape.directory.unwrap()}),d={name:"Worktree",description:"Create a git worktree",async configure(e){let r=await c.runPromise(t.Service.use((o)=>o.makeWorktreeInfo()));return{...e,name:r.name,branch:r.branch,directory:r.directory}},async create(e){let r=n.parse(e);await c.runPromise(t.Service.use((o)=>o.createFromInfo({name:r.name,directory:r.directory,branch:r.branch})))},async remove(e){let r=n.parse(e);await c.runPromise(t.Service.use((o)=>o.remove({directory:r.directory})))},target(e){return{type:"local",directory:n.parse(e).directory}}};export{d as WorktreeAdaptor};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Gd as q,Hd as K,Id as D,Ld as L,Md as N}from"./chunk-7jhrxzjx.js";import"./chunk-jcjaw7tk.js";import{Sf as B}from"./chunk-9s4whpg1.js";import{Xg as G}from"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-sy3n0qhc.js";import{ul as C}from"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import{Rt as J}from"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var X={command:"upgrade [target]",describe:"upgrade qitqode to the latest or a specific version",builder:(z)=>{return z.positional("target",{describe:"version to upgrade to, for ex '0.1.48' or 'v0.1.48'",type:"string"}).option("method",{alias:"m",describe:"installation method to use",type:"string",choices:["curl","npm","pnpm","bun","brew","choco","scoop"]})},handler:async(z)=>{B.empty(),B.println(B.logo(" ")),B.empty(),K("Upgrade");let O=await G.runPromise(C.Service.use((j)=>j.method())),E=z.method??O;if(E==="unknown"){if(q.error(`qitqode is installed to ${process.execPath} and may be managed by a package manager`),!await N({message:"Install anyways?",options:[{label:"Yes",value:!0},{label:"No",value:!1}],initialValue:!1})){D("Done");return}}q.info("Using method: "+E);let F=z.target?z.target.replace(/^v/,""):await G.runPromise(C.Service.use((j)=>j.latest()));if(J===F){q.warn(`qitqode upgrade skipped: ${F} is already installed`),D("Done");return}q.info(`From ${J} \u2192 ${F}`);let H=L();H.start("Upgrading...");let x=await G.runPromise(C.Service.use((j)=>j.upgrade(E,F))).catch((j)=>j);if(x){if(H.stop("Upgrade failed",1),x instanceof C.UpgradeFailedError)if(E==="choco"&&x.stderr.includes("not running from an elevated command shell"))q.error("Please run the terminal as Administrator and try again");else q.error(x.stderr);else if(x instanceof Error)q.error(x.message);D("Done");return}H.stop("Upgrade complete"),D("Done")}};export{X as UpgradeCommand};
@@ -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-jkh6eg7d.js";import"./chunk-3k2b05fv.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{gd as a,hd as b,id as c,jd as d,kd as e,ld as f,md as g,nd as h,od as i,pd as j,qd as k,rd as l}from"./chunk-jf6ry79j.js";import"./chunk-4sazy0nq.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};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-3k2b05fv.js";var e={"ui.sessionReview.title":"Sessions\xE6ndringer","ui.sessionReview.title.lastTurn":"\xC6ndringer fra sidste tur","ui.sessionReview.diffStyle.unified":"Samlet","ui.sessionReview.diffStyle.split":"Opdelt","ui.sessionReview.openFile":"\xC5bn fil","ui.sessionReview.selection.line":"linje {{line}}","ui.sessionReview.selection.lines":"linjer {{start}}-{{end}}","ui.sessionReview.expandAll":"Udvid alle","ui.sessionReview.collapseAll":"Skjul alle","ui.sessionReview.change.added":"Tilf\xF8jet","ui.sessionReview.change.removed":"Fjernet","ui.sessionReview.change.modified":"\xC6ndret","ui.sessionReview.image.loading":"Indl\xE6ser...","ui.sessionReview.image.placeholder":"Billede","ui.sessionReview.largeDiff.title":"Diff er for stor til at blive vist","ui.sessionReview.largeDiff.meta":"Gr\xE6nse: {{limit}} \xE6ndrede linjer. Nuv\xE6rende: {{current}} \xE6ndrede linjer.","ui.sessionReview.largeDiff.renderAnyway":"Vis alligevel","ui.fileMedia.kind.image":"billede","ui.fileMedia.kind.audio":"lyd","ui.fileMedia.state.removed":"Fjernet: {{kind}}","ui.fileMedia.state.loading":"Indl\xE6ser {{kind}}...","ui.fileMedia.state.error":"Fejl ved indl\xE6sning: {{kind}}","ui.fileMedia.state.unavailable":"Utilg\xE6ngelig: {{kind}}","ui.fileMedia.binary.title":"Bin\xE6r fil","ui.fileMedia.binary.description.path":"{{path}} kan ikke vises, fordi det er en bin\xE6r fil.","ui.fileMedia.binary.description.default":"Denne fil kan ikke vises, fordi det er en bin\xE6r fil.","ui.lineComment.label.prefix":"Kommenter p\xE5 ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Kommenterer p\xE5 ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Tilf\xF8j kommentar","ui.lineComment.submit":"Kommenter","ui.sessionTurn.steps.show":"Vis trin","ui.sessionTurn.steps.hide":"Skjul trin","ui.sessionTurn.summary.response":"Svar","ui.sessionTurn.diff.showMore":"Vis flere \xE6ndringer ({{count}})","ui.sessionTurn.retry.retrying":"pr\xF8ver igen","ui.sessionTurn.retry.inSeconds":"om {{seconds}}s","ui.sessionTurn.retry.attempt":"fors\xF8g #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - fors\xF8g #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini er meget overbelastet lige nu","ui.sessionTurn.error.freeUsageExceeded":"Gratis forbrug overskredet","ui.sessionTurn.error.addQredits":"Tilf\xF8j kreditter","ui.sessionTurn.status.delegating":"Delegerer arbejde","ui.sessionTurn.status.planning":"Planl\xE6gger n\xE6ste trin","ui.sessionTurn.status.gatheringContext":"Udforsker","ui.sessionTurn.status.gatheredContext":"Udforsket","ui.sessionTurn.status.searchingCodebase":"S\xF8ger i koden","ui.sessionTurn.status.searchingWeb":"S\xF8ger p\xE5 nettet","ui.sessionTurn.status.makingEdits":"Laver \xE6ndringer","ui.sessionTurn.status.runningCommands":"K\xF8rer kommandoer","ui.sessionTurn.status.thinking":"T\xE6nker","ui.sessionTurn.status.thinkingWithTopic":"T\xE6nker - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Samler tanker","ui.sessionTurn.status.consideringNextSteps":"Overvejer n\xE6ste skridt","ui.messagePart.questions.dismissed":"Sp\xF8rgsm\xE5l afvist","ui.messagePart.compaction":"Session komprimeret","ui.messagePart.context.read.one":"{{count}} l\xE6sning","ui.messagePart.context.read.other":"{{count}} l\xE6sninger","ui.messagePart.context.search.one":"{{count}} s\xF8gning","ui.messagePart.context.search.other":"{{count}} s\xF8gninger","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} lister","ui.messagePart.diagnostic.error":"Fejl","ui.messagePart.title.edit":"Rediger","ui.messagePart.title.write":"Skriv","ui.messagePart.option.typeOwnAnswer":"Skriv dit eget svar","ui.messagePart.review.title":"Gennemg\xE5 dine svar","ui.list.loading":"Indl\xE6ser","ui.list.empty":"Ingen resultater","ui.list.clearFilter":"Ryd filter","ui.list.emptyWithFilter.prefix":"Ingen resultater for","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Ny besked","ui.textField.copyToClipboard":"Kopier til udklipsholder","ui.textField.copyLink":"Kopier link","ui.textField.copied":"Kopieret","ui.imagePreview.alt":"Billedforh\xE5ndsvisning","ui.scrollView.ariaLabel":"rulbart indhold","ui.tool.read":"L\xE6s","ui.tool.loaded":"Indl\xE6st","ui.tool.list":"Liste","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webhentning","ui.tool.websearch":"Webs\xF8gning","ui.tool.codesearch":"Kodes\xF8gning","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Opgaver","ui.tool.todos.read":"L\xE6s opgaver","ui.tool.questions":"Sp\xF8rgsm\xE5l","ui.tool.agent":"{{type}} Agent","ui.tool.agent.default":"Agent","ui.common.file.one":"fil","ui.common.file.other":"filer","ui.common.question.one":"sp\xF8rgsm\xE5l","ui.common.question.other":"sp\xF8rgsm\xE5l","ui.common.add":"Tilf\xF8j","ui.common.back":"Tilbage","ui.common.cancel":"Annuller","ui.common.confirm":"Bekr\xE6ft","ui.common.dismiss":"Afvis","ui.common.close":"Luk","ui.common.next":"N\xE6ste","ui.common.submit":"Indsend","ui.permission.deny":"Afvis","ui.permission.allowAlways":"Tillad altid","ui.permission.allowOnce":"Tillad \xE9n gang","ui.message.expand":"Udvid besked","ui.message.collapse":"Skjul besked","ui.message.copy":"Kopier","ui.message.copyMessage":"Kopier besked","ui.message.forkMessage":"Forgren til ny session","ui.message.revertMessage":"Nulstil til dette punkt","ui.message.copyResponse":"Kopier svar","ui.message.copied":"Kopieret!","ui.message.interrupted":"Afbrudt","ui.message.queued":"I k\xF8","ui.message.attachment.alt":"vedh\xE6ftning","ui.patch.action.deleted":"Slettet","ui.patch.action.created":"Oprettet","ui.patch.action.moved":"Flyttet","ui.patch.action.patched":"Patchet","ui.question.subtitle.answered":"{{count}} besvaret","ui.question.answer.none":"(intet svar)","ui.question.review.notAnswered":"(ikke besvaret)","ui.question.multiHint":"V\xE6lg alle der g\xE6lder","ui.question.singleHint":"V\xE6lg \xE9t svar","ui.question.custom.placeholder":"Skriv dit svar...","ui.fileSearch.placeholder":"Find","ui.fileSearch.previousMatch":"Forrige match","ui.fileSearch.nextMatch":"N\xE6ste match","ui.fileSearch.close":"Luk s\xF8gning","ui.tool.task":"Opgave","ui.tool.skill":"F\xE6rdighed","ui.basicTool.called":"Kaldte `{{tool}}`","ui.toolErrorCard.failed":"Fejlede","ui.toolErrorCard.copyError":"Kopier fejl","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
2
+ import"./chunk-4sazy0nq.js";var e={"ui.sessionReview.title":"Sessions\xE6ndringer","ui.sessionReview.title.lastTurn":"\xC6ndringer fra sidste tur","ui.sessionReview.diffStyle.unified":"Samlet","ui.sessionReview.diffStyle.split":"Opdelt","ui.sessionReview.openFile":"\xC5bn fil","ui.sessionReview.selection.line":"linje {{line}}","ui.sessionReview.selection.lines":"linjer {{start}}-{{end}}","ui.sessionReview.expandAll":"Udvid alle","ui.sessionReview.collapseAll":"Skjul alle","ui.sessionReview.change.added":"Tilf\xF8jet","ui.sessionReview.change.removed":"Fjernet","ui.sessionReview.change.modified":"\xC6ndret","ui.sessionReview.image.loading":"Indl\xE6ser...","ui.sessionReview.image.placeholder":"Billede","ui.sessionReview.largeDiff.title":"Diff er for stor til at blive vist","ui.sessionReview.largeDiff.meta":"Gr\xE6nse: {{limit}} \xE6ndrede linjer. Nuv\xE6rende: {{current}} \xE6ndrede linjer.","ui.sessionReview.largeDiff.renderAnyway":"Vis alligevel","ui.fileMedia.kind.image":"billede","ui.fileMedia.kind.audio":"lyd","ui.fileMedia.state.removed":"Fjernet: {{kind}}","ui.fileMedia.state.loading":"Indl\xE6ser {{kind}}...","ui.fileMedia.state.error":"Fejl ved indl\xE6sning: {{kind}}","ui.fileMedia.state.unavailable":"Utilg\xE6ngelig: {{kind}}","ui.fileMedia.binary.title":"Bin\xE6r fil","ui.fileMedia.binary.description.path":"{{path}} kan ikke vises, fordi det er en bin\xE6r fil.","ui.fileMedia.binary.description.default":"Denne fil kan ikke vises, fordi det er en bin\xE6r fil.","ui.lineComment.label.prefix":"Kommenter p\xE5 ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Kommenterer p\xE5 ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Tilf\xF8j kommentar","ui.lineComment.submit":"Kommenter","ui.sessionTurn.steps.show":"Vis trin","ui.sessionTurn.steps.hide":"Skjul trin","ui.sessionTurn.summary.response":"Svar","ui.sessionTurn.diff.showMore":"Vis flere \xE6ndringer ({{count}})","ui.sessionTurn.retry.retrying":"pr\xF8ver igen","ui.sessionTurn.retry.inSeconds":"om {{seconds}}s","ui.sessionTurn.retry.attempt":"fors\xF8g #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - fors\xF8g #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini er meget overbelastet lige nu","ui.sessionTurn.error.freeUsageExceeded":"Gratis forbrug overskredet","ui.sessionTurn.error.addQredits":"Tilf\xF8j kreditter","ui.sessionTurn.status.delegating":"Delegerer arbejde","ui.sessionTurn.status.planning":"Planl\xE6gger n\xE6ste trin","ui.sessionTurn.status.gatheringContext":"Udforsker","ui.sessionTurn.status.gatheredContext":"Udforsket","ui.sessionTurn.status.searchingCodebase":"S\xF8ger i koden","ui.sessionTurn.status.searchingWeb":"S\xF8ger p\xE5 nettet","ui.sessionTurn.status.makingEdits":"Laver \xE6ndringer","ui.sessionTurn.status.runningCommands":"K\xF8rer kommandoer","ui.sessionTurn.status.thinking":"T\xE6nker","ui.sessionTurn.status.thinkingWithTopic":"T\xE6nker - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Samler tanker","ui.sessionTurn.status.consideringNextSteps":"Overvejer n\xE6ste skridt","ui.messagePart.questions.dismissed":"Sp\xF8rgsm\xE5l afvist","ui.messagePart.compaction":"Session komprimeret","ui.messagePart.context.read.one":"{{count}} l\xE6sning","ui.messagePart.context.read.other":"{{count}} l\xE6sninger","ui.messagePart.context.search.one":"{{count}} s\xF8gning","ui.messagePart.context.search.other":"{{count}} s\xF8gninger","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} lister","ui.messagePart.diagnostic.error":"Fejl","ui.messagePart.title.edit":"Rediger","ui.messagePart.title.write":"Skriv","ui.messagePart.option.typeOwnAnswer":"Skriv dit eget svar","ui.messagePart.review.title":"Gennemg\xE5 dine svar","ui.list.loading":"Indl\xE6ser","ui.list.empty":"Ingen resultater","ui.list.clearFilter":"Ryd filter","ui.list.emptyWithFilter.prefix":"Ingen resultater for","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Ny besked","ui.textField.copyToClipboard":"Kopier til udklipsholder","ui.textField.copyLink":"Kopier link","ui.textField.copied":"Kopieret","ui.imagePreview.alt":"Billedforh\xE5ndsvisning","ui.scrollView.ariaLabel":"rulbart indhold","ui.tool.read":"L\xE6s","ui.tool.loaded":"Indl\xE6st","ui.tool.list":"Liste","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webhentning","ui.tool.websearch":"Webs\xF8gning","ui.tool.codesearch":"Kodes\xF8gning","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Opgaver","ui.tool.todos.read":"L\xE6s opgaver","ui.tool.questions":"Sp\xF8rgsm\xE5l","ui.tool.agent":"{{type}} Agent","ui.tool.agent.default":"Agent","ui.common.file.one":"fil","ui.common.file.other":"filer","ui.common.question.one":"sp\xF8rgsm\xE5l","ui.common.question.other":"sp\xF8rgsm\xE5l","ui.common.add":"Tilf\xF8j","ui.common.back":"Tilbage","ui.common.cancel":"Annuller","ui.common.confirm":"Bekr\xE6ft","ui.common.dismiss":"Afvis","ui.common.close":"Luk","ui.common.next":"N\xE6ste","ui.common.submit":"Indsend","ui.permission.deny":"Afvis","ui.permission.allowAlways":"Tillad altid","ui.permission.allowOnce":"Tillad \xE9n gang","ui.message.expand":"Udvid besked","ui.message.collapse":"Skjul besked","ui.message.copy":"Kopier","ui.message.copyMessage":"Kopier besked","ui.message.forkMessage":"Forgren til ny session","ui.message.revertMessage":"Nulstil til dette punkt","ui.message.copyResponse":"Kopier svar","ui.message.copied":"Kopieret!","ui.message.interrupted":"Afbrudt","ui.message.queued":"I k\xF8","ui.message.attachment.alt":"vedh\xE6ftning","ui.patch.action.deleted":"Slettet","ui.patch.action.created":"Oprettet","ui.patch.action.moved":"Flyttet","ui.patch.action.patched":"Patchet","ui.question.subtitle.answered":"{{count}} besvaret","ui.question.answer.none":"(intet svar)","ui.question.review.notAnswered":"(ikke besvaret)","ui.question.multiHint":"V\xE6lg alle der g\xE6lder","ui.question.singleHint":"V\xE6lg \xE9t svar","ui.question.custom.placeholder":"Skriv dit svar...","ui.fileSearch.placeholder":"Find","ui.fileSearch.previousMatch":"Forrige match","ui.fileSearch.nextMatch":"N\xE6ste match","ui.fileSearch.close":"Luk s\xF8gning","ui.tool.task":"Opgave","ui.tool.skill":"F\xE6rdighed","ui.basicTool.called":"Kaldte `{{tool}}`","ui.toolErrorCard.failed":"Fejlede","ui.toolErrorCard.copyError":"Kopier fejl","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-4sazy0nq.js";var G="./tree-sitter-bash-hq5s6fxb.wasm";export{G as default};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$q as l,Eq as o,Jq as xQ,Kq as NQ,Nq as bQ,Rq as f,Uq as C,ar as p,er as h,fr as yQ,gr as c,hr as PQ,ir as MQ,jr as i,nr as kQ,oq as g,qq as jQ,uq as RQ,vq as ZQ}from"./chunk-z8gdmvgg.js";import{Ar as wQ,Cr as YQ,pr as e}from"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import{pv as Q}from"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-3k2b05fv.js";var _Q="3.0.63",vQ=f(()=>C(Q.object({error:Q.object({code:Q.number().nullable(),message:Q.string(),status:Q.string()})}))),QQ=PQ({errorSchema:vQ,errorToMessage:(X)=>X.error.message}),hQ=Q.union([Q.object({text:Q.string()}),Q.object({inlineData:Q.object({mimeType:Q.string(),data:Q.string()})})]),mQ=f(()=>C(Q.object({outputDimensionality:Q.number().optional(),taskType:Q.enum(["SEMANTIC_SIMILARITY","CLASSIFICATION","CLUSTERING","RETRIEVAL_DOCUMENT","RETRIEVAL_QUERY","QUESTION_ANSWERING","FACT_VERIFICATION","CODE_RETRIEVAL_QUERY"]).optional(),content:Q.array(Q.array(hQ).min(1).nullable()).optional()}))),uQ=class{constructor(X,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=X,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:X,headers:Y,abortSignal:Z,providerOptions:$}){let J=await l({provider:"google",providerOptions:$,schema:mQ});if(X.length>this.maxEmbeddingsPerCall)throw new wQ({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:X});let L=g(await c(this.config.headers),Y),H=J==null?void 0:J.content;if(H!=null&&H.length!==X.length)throw Error(`The number of multimodal content entries (${H.length}) must match the number of values (${X.length}).`);if(X.length===1){let U=H==null?void 0:H[0],G=X[0]?[{text:X[0]}]:[],D=U!=null?[...G,...U]:[{text:X[0]}],{responseHeaders:N,value:E,rawValue:q}=await p({url:`${this.config.baseURL}/models/${this.modelId}:embedContent`,headers:L,body:{model:`models/${this.modelId}`,content:{parts:D},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType},failedResponseHandler:QQ,successfulResponseHandler:i(dQ),abortSignal:Z,fetch:this.config.fetch});return{warnings:[],embeddings:[E.embedding.values],usage:void 0,response:{headers:N,body:q}}}let{responseHeaders:w,value:V,rawValue:x}=await p({url:`${this.config.baseURL}/models/${this.modelId}:batchEmbedContents`,headers:L,body:{requests:X.map((U,G)=>{let D=H==null?void 0:H[G],N=U?[{text:U}]:[];return{model:`models/${this.modelId}`,content:{role:"user",parts:D!=null?[...N,...D]:[{text:U}]},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType}})},failedResponseHandler:QQ,successfulResponseHandler:i(cQ),abortSignal:Z,fetch:this.config.fetch});return{warnings:[],embeddings:V.embeddings.map((U)=>U.values),usage:void 0,response:{headers:w,body:x}}}},cQ=f(()=>C(Q.object({embeddings:Q.array(Q.object({values:Q.array(Q.number())}))}))),dQ=f(()=>C(Q.object({embedding:Q.object({values:Q.array(Q.number())})})));function AQ(X){var Y,Z,$,J;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let L=(Y=X.promptTokenCount)!=null?Y:0,H=(Z=X.candidatesTokenCount)!=null?Z:0,w=($=X.cachedContentTokenCount)!=null?$:0,V=(J=X.thoughtsTokenCount)!=null?J:0;return{inputTokens:{total:L,noCache:L-w,cacheRead:w,cacheWrite:void 0},outputTokens:{total:H+V,text:H,reasoning:V},raw:X}}function u(X,Y=!0){if(X==null)return;if(gQ(X)){if(Y)return;if(typeof X==="object"&&X.description)return{type:"object",description:X.description};return{type:"object"}}if(typeof X==="boolean")return{type:"boolean",properties:{}};let{type:Z,description:$,required:J,properties:L,items:H,allOf:w,anyOf:V,oneOf:x,format:U,const:G,minLength:D,enum:N}=X,E={};if($)E.description=$;if(J)E.required=J;if(U)E.format=U;if(G!==void 0)E.enum=[G];if(Z)if(Array.isArray(Z)){let q=Z.includes("null"),j=Z.filter((B)=>B!=="null");if(j.length===0)E.type="null";else if(E.anyOf=j.map((B)=>({type:B})),q)E.nullable=!0}else E.type=Z;if(N!==void 0)E.enum=N;if(L!=null)E.properties=Object.entries(L).reduce((q,[j,B])=>{return q[j]=u(B,!1),q},{});if(H)E.items=Array.isArray(H)?H.map((q)=>u(q,!1)):u(H,!1);if(w)E.allOf=w.map((q)=>u(q,!1));if(V)if(V.some((q)=>typeof q==="object"&&(q==null?void 0:q.type)==="null")){let q=V.filter((j)=>!(typeof j==="object"&&(j==null?void 0:j.type)==="null"));if(q.length===1){let j=u(q[0],!1);if(typeof j==="object")E.nullable=!0,Object.assign(E,j)}else E.anyOf=q.map((j)=>u(j,!1)),E.nullable=!0}else E.anyOf=V.map((q)=>u(q,!1));if(x)E.oneOf=x.map((q)=>u(q,!1));if(D!==void 0)E.minLength=D;return E}function gQ(X){return X!=null&&typeof X==="object"&&X.type==="object"&&(X.properties==null||Object.keys(X.properties).length===0)&&!X.additionalProperties}var pQ=/^data:([^;,]+);base64,(.+)$/s;function iQ(X){let Y=pQ.exec(X);if(Y==null)return;return{mediaType:Y[1],data:Y[2]}}function lQ(X){let Y=iQ(X);if(Y==null)return;return{inlineData:{mimeType:Y.mediaType,data:Y.data}}}function sQ(X,Y,Z){let $=[],J=[];for(let L of Z)switch(L.type){case"text":{J.push(L.text);break}case"image-data":case"file-data":{$.push({inlineData:{mimeType:L.mediaType,data:L.data}});break}case"image-url":case"file-url":{let H=lQ(L.url);if(H!=null)$.push(H);else J.push(JSON.stringify(L));break}default:{J.push(JSON.stringify(L));break}}X.push({functionResponse:{name:Y,response:{name:Y,content:J.length>0?J.join(`
2
+ import{Aq as ZQ,Jq as o,Oq as xQ,Pq as NQ,Sq as bQ,Wq as f,Zq as C,er as l,fr as p,jr as h,kr as yQ,lr as c,mr as PQ,nr as MQ,or as i,sr as kQ,tq as g,vq as jQ,zq as RQ}from"./chunk-gwfx7tx7.js";import{Fr as wQ,Hr as YQ,ur as e}from"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import{xv as Q}from"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-4sazy0nq.js";var _Q="3.0.63",vQ=f(()=>C(Q.object({error:Q.object({code:Q.number().nullable(),message:Q.string(),status:Q.string()})}))),QQ=PQ({errorSchema:vQ,errorToMessage:(X)=>X.error.message}),hQ=Q.union([Q.object({text:Q.string()}),Q.object({inlineData:Q.object({mimeType:Q.string(),data:Q.string()})})]),mQ=f(()=>C(Q.object({outputDimensionality:Q.number().optional(),taskType:Q.enum(["SEMANTIC_SIMILARITY","CLASSIFICATION","CLUSTERING","RETRIEVAL_DOCUMENT","RETRIEVAL_QUERY","QUESTION_ANSWERING","FACT_VERIFICATION","CODE_RETRIEVAL_QUERY"]).optional(),content:Q.array(Q.array(hQ).min(1).nullable()).optional()}))),uQ=class{constructor(X,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=X,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:X,headers:Y,abortSignal:Z,providerOptions:$}){let J=await l({provider:"google",providerOptions:$,schema:mQ});if(X.length>this.maxEmbeddingsPerCall)throw new wQ({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:X});let L=g(await c(this.config.headers),Y),H=J==null?void 0:J.content;if(H!=null&&H.length!==X.length)throw Error(`The number of multimodal content entries (${H.length}) must match the number of values (${X.length}).`);if(X.length===1){let U=H==null?void 0:H[0],G=X[0]?[{text:X[0]}]:[],D=U!=null?[...G,...U]:[{text:X[0]}],{responseHeaders:N,value:E,rawValue:q}=await p({url:`${this.config.baseURL}/models/${this.modelId}:embedContent`,headers:L,body:{model:`models/${this.modelId}`,content:{parts:D},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType},failedResponseHandler:QQ,successfulResponseHandler:i(dQ),abortSignal:Z,fetch:this.config.fetch});return{warnings:[],embeddings:[E.embedding.values],usage:void 0,response:{headers:N,body:q}}}let{responseHeaders:w,value:V,rawValue:x}=await p({url:`${this.config.baseURL}/models/${this.modelId}:batchEmbedContents`,headers:L,body:{requests:X.map((U,G)=>{let D=H==null?void 0:H[G],N=U?[{text:U}]:[];return{model:`models/${this.modelId}`,content:{role:"user",parts:D!=null?[...N,...D]:[{text:U}]},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType}})},failedResponseHandler:QQ,successfulResponseHandler:i(cQ),abortSignal:Z,fetch:this.config.fetch});return{warnings:[],embeddings:V.embeddings.map((U)=>U.values),usage:void 0,response:{headers:w,body:x}}}},cQ=f(()=>C(Q.object({embeddings:Q.array(Q.object({values:Q.array(Q.number())}))}))),dQ=f(()=>C(Q.object({embedding:Q.object({values:Q.array(Q.number())})})));function AQ(X){var Y,Z,$,J;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let L=(Y=X.promptTokenCount)!=null?Y:0,H=(Z=X.candidatesTokenCount)!=null?Z:0,w=($=X.cachedContentTokenCount)!=null?$:0,V=(J=X.thoughtsTokenCount)!=null?J:0;return{inputTokens:{total:L,noCache:L-w,cacheRead:w,cacheWrite:void 0},outputTokens:{total:H+V,text:H,reasoning:V},raw:X}}function u(X,Y=!0){if(X==null)return;if(gQ(X)){if(Y)return;if(typeof X==="object"&&X.description)return{type:"object",description:X.description};return{type:"object"}}if(typeof X==="boolean")return{type:"boolean",properties:{}};let{type:Z,description:$,required:J,properties:L,items:H,allOf:w,anyOf:V,oneOf:x,format:U,const:G,minLength:D,enum:N}=X,E={};if($)E.description=$;if(J)E.required=J;if(U)E.format=U;if(G!==void 0)E.enum=[G];if(Z)if(Array.isArray(Z)){let q=Z.includes("null"),j=Z.filter((B)=>B!=="null");if(j.length===0)E.type="null";else if(E.anyOf=j.map((B)=>({type:B})),q)E.nullable=!0}else E.type=Z;if(N!==void 0)E.enum=N;if(L!=null)E.properties=Object.entries(L).reduce((q,[j,B])=>{return q[j]=u(B,!1),q},{});if(H)E.items=Array.isArray(H)?H.map((q)=>u(q,!1)):u(H,!1);if(w)E.allOf=w.map((q)=>u(q,!1));if(V)if(V.some((q)=>typeof q==="object"&&(q==null?void 0:q.type)==="null")){let q=V.filter((j)=>!(typeof j==="object"&&(j==null?void 0:j.type)==="null"));if(q.length===1){let j=u(q[0],!1);if(typeof j==="object")E.nullable=!0,Object.assign(E,j)}else E.anyOf=q.map((j)=>u(j,!1)),E.nullable=!0}else E.anyOf=V.map((q)=>u(q,!1));if(x)E.oneOf=x.map((q)=>u(q,!1));if(D!==void 0)E.minLength=D;return E}function gQ(X){return X!=null&&typeof X==="object"&&X.type==="object"&&(X.properties==null||Object.keys(X.properties).length===0)&&!X.additionalProperties}var pQ=/^data:([^;,]+);base64,(.+)$/s;function iQ(X){let Y=pQ.exec(X);if(Y==null)return;return{mediaType:Y[1],data:Y[2]}}function lQ(X){let Y=iQ(X);if(Y==null)return;return{inlineData:{mimeType:Y.mediaType,data:Y.data}}}function sQ(X,Y,Z){let $=[],J=[];for(let L of Z)switch(L.type){case"text":{J.push(L.text);break}case"image-data":case"file-data":{$.push({inlineData:{mimeType:L.mediaType,data:L.data}});break}case"image-url":case"file-url":{let H=lQ(L.url);if(H!=null)$.push(H);else J.push(JSON.stringify(L));break}default:{J.push(JSON.stringify(L));break}}X.push({functionResponse:{name:Y,response:{name:Y,content:J.length>0?J.join(`
3
3
  `):"Tool executed successfully."},...$.length>0?{parts:$}:{}}})}function nQ(X,Y,Z){for(let $ of Z)switch($.type){case"text":X.push({functionResponse:{name:Y,response:{name:Y,content:$.text}}});break;case"image-data":X.push({inlineData:{mimeType:String($.mediaType),data:String($.data)}},{text:"Tool executed successfully and returned this image as a response"});break;default:X.push({text:JSON.stringify($)});break}}function aQ(X,Y){var Z,$,J,L,H,w,V,x;let U=[],G=[],D=!0,N=(Z=Y==null?void 0:Y.isGemmaModel)!=null?Z:!1,E=($=Y==null?void 0:Y.providerOptionsName)!=null?$:"google",q=(J=Y==null?void 0:Y.supportsFunctionResponseParts)!=null?J:!0;for(let{role:j,content:B}of X)switch(j){case"system":{if(!D)throw new YQ({functionality:"system messages are only supported at the beginning of the conversation"});U.push({text:B});break}case"user":{D=!1;let K=[];for(let F of B)switch(F.type){case"text":{K.push({text:F.text});break}case"file":{let b=F.mediaType==="image/*"?"image/jpeg":F.mediaType;K.push(F.data instanceof URL?{fileData:{mimeType:b,fileUri:F.data.toString()}}:{inlineData:{mimeType:b,data:ZQ(F.data)}});break}}G.push({role:"user",parts:K});break}case"assistant":{D=!1,G.push({role:"model",parts:B.map((K)=>{var F,b,S,k;let z=(k=(F=K.providerOptions)==null?void 0:F[E])!=null?k:E!=="google"?(b=K.providerOptions)==null?void 0:b.google:(S=K.providerOptions)==null?void 0:S.vertex,y=(z==null?void 0:z.thoughtSignature)!=null?String(z.thoughtSignature):void 0;switch(K.type){case"text":return K.text.length===0?void 0:{text:K.text,thoughtSignature:y};case"reasoning":return K.text.length===0?void 0:{text:K.text,thought:!0,thoughtSignature:y};case"file":{if(K.data instanceof URL)throw new YQ({functionality:"File data URLs in assistant messages are not supported"});return{inlineData:{mimeType:K.mediaType,data:ZQ(K.data)},...(z==null?void 0:z.thought)===!0?{thought:!0}:{},thoughtSignature:y}}case"tool-call":{let P=(z==null?void 0:z.serverToolCallId)!=null?String(z.serverToolCallId):void 0,O=(z==null?void 0:z.serverToolType)!=null?String(z.serverToolType):void 0;if(P&&O)return{toolCall:{toolType:O,args:typeof K.input==="string"?JSON.parse(K.input):K.input,id:P},thoughtSignature:y};return{functionCall:{name:K.toolName,args:K.input},thoughtSignature:y}}case"tool-result":{let P=(z==null?void 0:z.serverToolCallId)!=null?String(z.serverToolCallId):void 0,O=(z==null?void 0:z.serverToolType)!=null?String(z.serverToolType):void 0;if(P&&O)return{toolResponse:{toolType:O,response:K.output.type==="json"?K.output.value:{},id:P},thoughtSignature:y};return}}}).filter((K)=>K!==void 0)});break}case"tool":{D=!1;let K=[];for(let F of B){if(F.type==="tool-approval-response")continue;let b=(V=(L=F.providerOptions)==null?void 0:L[E])!=null?V:E!=="google"?(H=F.providerOptions)==null?void 0:H.google:(w=F.providerOptions)==null?void 0:w.vertex,S=(b==null?void 0:b.serverToolCallId)!=null?String(b.serverToolCallId):void 0,k=(b==null?void 0:b.serverToolType)!=null?String(b.serverToolType):void 0;if(S&&k){let y=(b==null?void 0:b.thoughtSignature)!=null?String(b.thoughtSignature):void 0;if(G.length>0){let P=G[G.length-1];if(P.role==="model"){P.parts.push({toolResponse:{toolType:k,response:F.output.type==="json"?F.output.value:{},id:S},thoughtSignature:y});continue}}}let z=F.output;if(z.type==="content")if(q)sQ(K,F.toolName,z.value);else nQ(K,F.toolName,z.value);else K.push({functionResponse:{name:F.toolName,response:{name:F.toolName,content:z.type==="execution-denied"?(x=z.reason)!=null?x:"Tool execution denied.":z.value}}})}G.push({role:"user",parts:K});break}}if(N&&U.length>0&&G.length>0&&G[0].role==="user"){let j=U.map((B)=>B.text).join(`
4
4
 
5
5
  `);G[0].parts.unshift({text:j+`