@qitqode/qitqode-android-arm64 0.2.2 → 0.2.4

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 (427) hide show
  1. package/bun +2 -2
  2. package/bundle/{chunk-2hv2c8d5.js → chunk-0428v6mw.js} +1 -1
  3. package/bundle/{chunk-0f3ft9dh.js → chunk-05ck7acg.js} +1 -1
  4. package/bundle/{chunk-xmjntwjc.js → chunk-09geev0j.js} +2 -2
  5. package/bundle/{chunk-j5ymkhry.js → chunk-0cnwsf8p.js} +1 -1
  6. package/bundle/chunk-0ppnq3a4.js +2 -0
  7. package/bundle/{chunk-6kf4vw2g.js → chunk-0qd3567w.js} +1 -1
  8. package/bundle/{chunk-jw114bbt.js → chunk-0smnwqk6.js} +2 -2
  9. package/bundle/chunk-0te0vcdn.js +2 -0
  10. package/bundle/{chunk-q4fn41ex.js → chunk-0xrb12s8.js} +2 -2
  11. package/bundle/chunk-11h06z17.js +2 -0
  12. package/bundle/{chunk-vyh300ac.js → chunk-1rtx2zsc.js} +2 -2
  13. package/bundle/{chunk-3jms025t.js → chunk-1t0c86bz.js} +1 -1
  14. package/bundle/{chunk-6dfjtzqb.js → chunk-21rq4592.js} +2 -2
  15. package/bundle/{chunk-y3dfk6n5.js → chunk-24rkf2gk.js} +1 -1
  16. package/bundle/{chunk-rdwma0de.js → chunk-24ygjbpf.js} +2 -2
  17. package/bundle/{chunk-q46pzk9z.js → chunk-25ganjcn.js} +2 -2
  18. package/bundle/chunk-28yv4fqe.js +2 -0
  19. package/bundle/{chunk-3tmq81kq.js → chunk-2drzgtv3.js} +2 -2
  20. package/bundle/{chunk-xd3xc1vv.js → chunk-2md6sx8d.js} +1 -1
  21. package/bundle/chunk-2mm37s1w.js +2 -0
  22. package/bundle/chunk-2prf30p3.js +2 -0
  23. package/bundle/{chunk-v9rg0a8g.js → chunk-313zqzc1.js} +1 -1
  24. package/bundle/{chunk-zfd70p01.js → chunk-32j0q58h.js} +1 -1
  25. package/bundle/chunk-34a52hyr.js +2 -0
  26. package/bundle/{chunk-86jsqc7d.js → chunk-39z96pc6.js} +3 -3
  27. package/bundle/chunk-3hcr2bzt.js +2 -0
  28. package/bundle/{chunk-e6wp96vm.js → chunk-3jf3jhrs.js} +1 -1
  29. package/bundle/{chunk-4sxg9cgr.js → chunk-3kpse7zy.js} +1 -1
  30. package/bundle/chunk-3n3gb3vd.js +2 -0
  31. package/bundle/chunk-3sq60y9f.js +2 -0
  32. package/bundle/{chunk-2qwmrp16.js → chunk-3vvd7j14.js} +1 -1
  33. package/bundle/{chunk-h10wjk96.js → chunk-3zrr4n6k.js} +2 -2
  34. package/bundle/{chunk-rcyzqa3g.js → chunk-450fef7h.js} +2 -2
  35. package/bundle/{chunk-kxjrrdj0.js → chunk-45a4n21f.js} +1 -1
  36. package/bundle/{chunk-xny5ecn0.js → chunk-47k5jy1p.js} +2 -2
  37. package/bundle/{chunk-0gab4v98.js → chunk-48r70n4s.js} +1 -1
  38. package/bundle/chunk-49mbnqvc.js +2 -0
  39. package/bundle/{chunk-t9zbp2qw.js → chunk-4agaj51z.js} +1 -1
  40. package/bundle/chunk-4fr6kae9.js +2 -0
  41. package/bundle/chunk-4v2pzx22.js +2 -0
  42. package/bundle/chunk-516w1nc4.js +2 -0
  43. package/bundle/chunk-535nm66j.js +2 -0
  44. package/bundle/{chunk-1p6jjrea.js → chunk-55fcmswd.js} +2 -2
  45. package/bundle/{chunk-n7kqdqkh.js → chunk-55ykn8nz.js} +4 -4
  46. package/bundle/chunk-58dpxf8r.js +2 -0
  47. package/bundle/chunk-58w8c6c2.js +2 -0
  48. package/bundle/{chunk-as845ya4.js → chunk-5c2438af.js} +1 -1
  49. package/bundle/chunk-5kpxpm8e.js +2 -0
  50. package/bundle/chunk-5nm5s0h2.js +2 -0
  51. package/bundle/{chunk-07s30fpb.js → chunk-5nrc5rhh.js} +1 -1
  52. package/bundle/{chunk-jwph7tpc.js → chunk-5pwv2p3s.js} +1 -1
  53. package/bundle/{chunk-q5abwn50.js → chunk-5pzs51sp.js} +1 -1
  54. package/bundle/{chunk-r0s28gnb.js → chunk-5tky3csh.js} +1 -1
  55. package/bundle/{chunk-yajd975f.js → chunk-5w76kdjr.js} +1 -1
  56. package/bundle/{chunk-wcqfr8vr.js → chunk-5ysbwr4x.js} +1 -1
  57. package/bundle/{chunk-85xh72hk.js → chunk-5zkj5xv9.js} +2 -2
  58. package/bundle/chunk-620dpezx.js +5 -0
  59. package/bundle/{chunk-fgn83bs7.js → chunk-65bmsp2t.js} +1 -1
  60. package/bundle/{chunk-9jrxrjzt.js → chunk-68v3b6ns.js} +2 -2
  61. package/bundle/{chunk-7ntw4rrn.js → chunk-6ar91jvd.js} +1 -1
  62. package/bundle/{chunk-bbbh69ys.js → chunk-6evh2ke8.js} +1 -1
  63. package/bundle/{chunk-9bm9z52r.js → chunk-6fc3gw3e.js} +1 -1
  64. package/bundle/chunk-6gpf2bjs.js +2 -0
  65. package/bundle/{chunk-a2dz9nqh.js → chunk-6m9jb0s9.js} +2 -2
  66. package/bundle/{chunk-e374shb8.js → chunk-6pe60dsw.js} +2 -2
  67. package/bundle/{chunk-yvjke593.js → chunk-6scf311w.js} +1 -1
  68. package/bundle/{chunk-epa576pa.js → chunk-6v5867cy.js} +3 -3
  69. package/bundle/{chunk-5wwd40t3.js → chunk-70q8qcb2.js} +1 -1
  70. package/bundle/{chunk-pfkm3j8g.js → chunk-73r8bjjz.js} +2 -2
  71. package/bundle/{chunk-hs3vfhar.js → chunk-7bcm7gg1.js} +1 -1
  72. package/bundle/chunk-7bgzcpdw.js +2 -0
  73. package/bundle/{chunk-ezfzb8qc.js → chunk-7g66qc1v.js} +2 -2
  74. package/bundle/{chunk-fd7fmvyw.js → chunk-7hvf9dgx.js} +1 -1
  75. package/bundle/{chunk-7zc04q43.js → chunk-7j4qne3q.js} +2 -2
  76. package/bundle/chunk-7kjvcbwa.js +2 -0
  77. package/bundle/{chunk-6j339s7a.js → chunk-7mppvhv9.js} +2 -2
  78. package/bundle/{chunk-7z884mz2.js → chunk-7msfwk15.js} +2 -2
  79. package/bundle/{chunk-kmwy6c9g.js → chunk-7vmx8bg9.js} +2 -2
  80. package/bundle/{chunk-7njz51r4.js → chunk-7x6yrtzn.js} +1 -1
  81. package/bundle/{chunk-yhsnmpzv.js → chunk-7zx1ve4w.js} +1 -1
  82. package/bundle/{chunk-skv9ww0s.js → chunk-804vmbcd.js} +1 -1
  83. package/bundle/chunk-8jma2btf.js +2 -0
  84. package/bundle/{chunk-543pt030.js → chunk-8q38721t.js} +2 -2
  85. package/bundle/{chunk-kdcnder5.js → chunk-8wwdrwf2.js} +1 -1
  86. package/bundle/{chunk-4fk46ngj.js → chunk-920z7g7j.js} +1 -1
  87. package/bundle/chunk-93e0w75z.js +2 -0
  88. package/bundle/{chunk-pzefsndd.js → chunk-953pqp3w.js} +1 -1
  89. package/bundle/chunk-97gp818s.js +2 -0
  90. package/bundle/chunk-9epf2zbh.js +2 -0
  91. package/bundle/{chunk-4hd3v58j.js → chunk-9hz56z6a.js} +1 -1
  92. package/bundle/chunk-9pmmf4k1.js +2 -0
  93. package/bundle/chunk-9y03z65a.js +2 -0
  94. package/bundle/{chunk-rk2bk4s7.js → chunk-9zm6r55d.js} +2 -2
  95. package/bundle/{chunk-t1475j9f.js → chunk-a3edstpn.js} +1 -1
  96. package/bundle/{chunk-8d6e4jg7.js → chunk-ab4dq1bn.js} +2 -2
  97. package/bundle/{chunk-w7em72p8.js → chunk-ac7482n2.js} +2 -2
  98. package/bundle/chunk-agv04nt7.js +2 -0
  99. package/bundle/{chunk-sjreby6e.js → chunk-aj1sgq1d.js} +1 -1
  100. package/bundle/chunk-ak8e1nrf.js +2 -0
  101. package/bundle/{chunk-cbmwhvxw.js → chunk-at22twxx.js} +2 -2
  102. package/bundle/{chunk-frsd6e1h.js → chunk-avefgbjg.js} +2 -2
  103. package/bundle/chunk-b034nf8g.js +2 -0
  104. package/bundle/chunk-b2p54yka.js +2 -0
  105. package/bundle/{chunk-z2h1gxyx.js → chunk-bbng1cea.js} +1 -1
  106. package/bundle/{chunk-5az84brc.js → chunk-bd21p9zz.js} +2 -2
  107. package/bundle/chunk-be7smmar.js +2 -0
  108. package/bundle/chunk-bghqsh7r.js +2 -0
  109. package/bundle/{chunk-y4e7e42x.js → chunk-bne5w117.js} +4 -4
  110. package/bundle/{chunk-j3jqk62r.js → chunk-bqn6bqws.js} +1 -1
  111. package/bundle/chunk-bryx5cx9.js +2 -0
  112. package/bundle/{chunk-tge53d52.js → chunk-bwbqkfv0.js} +1 -1
  113. package/bundle/chunk-c13rrw41.js +2 -0
  114. package/bundle/chunk-c2kkv619.js +2 -0
  115. package/bundle/{chunk-64c8q9zg.js → chunk-c36p881g.js} +3 -3
  116. package/bundle/chunk-c5xj1y5v.js +2 -0
  117. package/bundle/{chunk-91z7azf7.js → chunk-cdja76vj.js} +1 -1
  118. package/bundle/{chunk-7ab3yw9j.js → chunk-ckb1y6gv.js} +2 -2
  119. package/bundle/chunk-ckpm4dvv.js +2 -0
  120. package/bundle/{chunk-732yr6qq.js → chunk-cmb62jkt.js} +2 -2
  121. package/bundle/chunk-ct8twng1.js +2 -0
  122. package/bundle/{chunk-s77qktcn.js → chunk-cx78hhbx.js} +2 -2
  123. package/bundle/{chunk-1q1cddy4.js → chunk-cz5vta94.js} +1 -1
  124. package/bundle/{chunk-fpm2vgz6.js → chunk-d0x5pbkm.js} +1 -1
  125. package/bundle/chunk-d38y7bvh.js +2 -0
  126. package/bundle/chunk-d5qgc18n.js +2 -0
  127. package/bundle/chunk-d6hxsfm6.js +2 -0
  128. package/bundle/{chunk-29zm623f.js → chunk-d6jhs818.js} +2 -2
  129. package/bundle/chunk-descb9jz.js +2 -0
  130. package/bundle/{chunk-ssdw9zre.js → chunk-dj1jen1p.js} +1 -1
  131. package/bundle/{chunk-mswx4k75.js → chunk-dnnkq5y4.js} +2 -2
  132. package/bundle/{chunk-6pcmv8vs.js → chunk-dnsh1v42.js} +2 -2
  133. package/bundle/chunk-dvr2b9r1.js +2 -0
  134. package/bundle/chunk-dwhjgd8j.js +2 -0
  135. package/bundle/{chunk-s0ty36qg.js → chunk-dxdggn90.js} +1 -1
  136. package/bundle/chunk-dypdyrmy.js +2 -0
  137. package/bundle/{chunk-w30b563s.js → chunk-e8p92vz4.js} +2 -2
  138. package/bundle/chunk-ea5fktnn.js +2 -0
  139. package/bundle/{chunk-t1jgx17a.js → chunk-eg3syjtv.js} +2 -2
  140. package/bundle/{chunk-2a9rzgk6.js → chunk-ehb4hd9c.js} +1 -1
  141. package/bundle/{chunk-9jsgs71h.js → chunk-ejqzcdcx.js} +1 -1
  142. package/bundle/{chunk-5t0w9ecw.js → chunk-et3804wr.js} +1 -1
  143. package/bundle/{chunk-yd8bzhv6.js → chunk-ezrqhqkp.js} +1 -1
  144. package/bundle/chunk-f0t7rryn.js +3 -0
  145. package/bundle/{chunk-p635phfw.js → chunk-f31yvp20.js} +1 -1
  146. package/bundle/chunk-f4mf6tpp.js +2 -0
  147. package/bundle/chunk-f97k17t8.js +2 -0
  148. package/bundle/{chunk-yx1h0b5v.js → chunk-faee8zgc.js} +1 -1
  149. package/bundle/{chunk-p9mj4zyk.js → chunk-ff548b0j.js} +2 -2
  150. package/bundle/{chunk-bgng3rdj.js → chunk-fhqfqd5v.js} +2 -2
  151. package/bundle/{chunk-zek5c15t.js → chunk-fjbv3jht.js} +1 -1
  152. package/bundle/{chunk-hq9bgnqb.js → chunk-g22e4gw7.js} +1 -1
  153. package/bundle/chunk-g26tersc.js +2 -0
  154. package/bundle/{chunk-s0ptrw0z.js → chunk-g3wvtyw3.js} +1 -1
  155. package/bundle/{chunk-x4pdpka8.js → chunk-g42krp0z.js} +1 -1
  156. package/bundle/chunk-g4ehhdzp.js +2 -0
  157. package/bundle/{chunk-a9y27zd2.js → chunk-gbkz04ke.js} +1 -1
  158. package/bundle/chunk-gd6qpdjw.js +2 -0
  159. package/bundle/chunk-gehn9fd9.js +2 -0
  160. package/bundle/{chunk-0zxwjsvz.js → chunk-ggxzf22k.js} +1 -1
  161. package/bundle/{chunk-45fyv9f1.js → chunk-grnjm8ev.js} +2 -2
  162. package/bundle/{chunk-kzvvvj79.js → chunk-gszvgz76.js} +2 -2
  163. package/bundle/{chunk-g3kd4957.js → chunk-gy21fw82.js} +2 -2
  164. package/bundle/{chunk-cbf1y12x.js → chunk-h62chdmw.js} +1 -1
  165. package/bundle/{chunk-c1g8n10t.js → chunk-ha1w0xzh.js} +1 -1
  166. package/bundle/{chunk-rpfhgncs.js → chunk-has2rz35.js} +1 -1
  167. package/bundle/{chunk-6f8qqbac.js → chunk-hg4039nz.js} +166 -205
  168. package/bundle/chunk-hhax4mxw.js +2 -0
  169. package/bundle/{chunk-087tnr8a.js → chunk-hwrrrbqd.js} +1 -1
  170. package/bundle/chunk-hz3h6e19.js +2 -0
  171. package/bundle/{chunk-yd2emszh.js → chunk-j0bwa5dk.js} +2 -2
  172. package/bundle/{chunk-9b4aqcde.js → chunk-j164q40b.js} +2 -2
  173. package/bundle/{chunk-et5dnymk.js → chunk-j4ad3mde.js} +2 -2
  174. package/bundle/{chunk-qhnpq5gb.js → chunk-j8fcfhr2.js} +2 -2
  175. package/bundle/chunk-j8nkz81m.js +7 -0
  176. package/bundle/{chunk-9ea1n338.js → chunk-j9h1sp4g.js} +2 -2
  177. package/bundle/{chunk-zcp0wx4j.js → chunk-jdx3jshm.js} +2 -2
  178. package/bundle/chunk-jebss7x8.js +2 -0
  179. package/bundle/{chunk-yrfq22a5.js → chunk-jg1ccs3j.js} +1 -1
  180. package/bundle/chunk-jqekpprn.js +3 -0
  181. package/bundle/{chunk-d307vb2d.js → chunk-jqk3v8d6.js} +1 -1
  182. package/bundle/chunk-jvkzdap1.js +2 -0
  183. package/bundle/{chunk-pp9neaaz.js → chunk-jww55nk9.js} +1 -1
  184. package/bundle/{chunk-fvy24yhq.js → chunk-k1nh5sd2.js} +1 -1
  185. package/bundle/chunk-k2g8346v.js +3 -0
  186. package/bundle/chunk-k2vsezeb.js +2 -0
  187. package/bundle/{chunk-wfggztm4.js → chunk-k4gsktts.js} +1 -1
  188. package/bundle/{chunk-qaz100ht.js → chunk-k5q9px67.js} +1 -1
  189. package/bundle/{chunk-mrn44msr.js → chunk-k6y2vw0d.js} +2 -2
  190. package/bundle/chunk-kg8fcv91.js +2 -0
  191. package/bundle/chunk-kgptyf7n.js +3 -0
  192. package/bundle/{chunk-b50t4jc5.js → chunk-khzzmyk2.js} +1 -1
  193. package/bundle/chunk-kjjjrjnb.js +2 -0
  194. package/bundle/{chunk-dbztxdea.js → chunk-kp6gh35c.js} +2 -2
  195. package/bundle/{chunk-g7k6ecb2.js → chunk-kqhczjf6.js} +1 -1
  196. package/bundle/{chunk-jvjq554f.js → chunk-ksme3gj1.js} +1 -1
  197. package/bundle/chunk-m5cfmhwh.js +2 -0
  198. package/bundle/{chunk-4v61ysex.js → chunk-m5dm7a1t.js} +1 -1
  199. package/bundle/{chunk-yr35q7q1.js → chunk-m7ganre7.js} +1 -1
  200. package/bundle/chunk-m7qxxbns.js +2 -0
  201. package/bundle/{chunk-y287zwkr.js → chunk-mh19kwzw.js} +1 -1
  202. package/bundle/{chunk-7my2231h.js → chunk-mhhtf0v3.js} +1 -1
  203. package/bundle/{chunk-grw4gg9j.js → chunk-mjjaezwq.js} +2 -2
  204. package/bundle/{chunk-03mbn7nj.js → chunk-mmjgf680.js} +2 -2
  205. package/bundle/{chunk-jv4th87b.js → chunk-mn9end71.js} +1 -1
  206. package/bundle/{chunk-3h49k2ck.js → chunk-n23d0q00.js} +1 -1
  207. package/bundle/{chunk-mpe8zxc0.js → chunk-n78f8hfk.js} +1 -1
  208. package/bundle/chunk-n8wg5h5p.js +2 -0
  209. package/bundle/{chunk-gr4bctqj.js → chunk-nj1ntakd.js} +2 -2
  210. package/bundle/{chunk-wdaf713t.js → chunk-nrat6ncm.js} +1 -1
  211. package/bundle/{chunk-rm5ntsvn.js → chunk-nty5z2cj.js} +1 -1
  212. package/bundle/{chunk-rp8asmq7.js → chunk-p169ee92.js} +1 -1
  213. package/bundle/{chunk-fbm6qczy.js → chunk-p4027t94.js} +1 -1
  214. package/bundle/{chunk-94qhpkfx.js → chunk-p54bzjtv.js} +1 -1
  215. package/bundle/{chunk-cp39f96a.js → chunk-p5be5ddp.js} +1 -1
  216. package/bundle/{chunk-ngvp6zc2.js → chunk-p6crzjtf.js} +2 -2
  217. package/bundle/chunk-p6hcj3kv.js +2 -0
  218. package/bundle/{chunk-p4ewy9xh.js → chunk-pb30kkbs.js} +6 -6
  219. package/bundle/chunk-pdjafjry.js +3 -0
  220. package/bundle/chunk-pexmns0j.js +2 -0
  221. package/bundle/{chunk-my3cswnp.js → chunk-ph8hn1wt.js} +2 -2
  222. package/bundle/chunk-pkn85169.js +2 -0
  223. package/bundle/{chunk-99148b1k.js → chunk-pmg53fdd.js} +1 -1
  224. package/bundle/{chunk-wf4x5cjc.js → chunk-pr7z5dj8.js} +1 -1
  225. package/bundle/chunk-pt603np4.js +2 -0
  226. package/bundle/{chunk-4mvg7jt1.js → chunk-ptqk1j2r.js} +1 -1
  227. package/bundle/{chunk-a92hh67a.js → chunk-pxm4qvqk.js} +2 -2
  228. package/bundle/{chunk-3qfpw8f6.js → chunk-qey1efpx.js} +1 -1
  229. package/bundle/chunk-qk5bfcv8.js +2 -0
  230. package/bundle/{chunk-9s785py4.js → chunk-qk9x8j8d.js} +1 -1
  231. package/bundle/chunk-qnaw8k98.js +2 -0
  232. package/bundle/{chunk-ks1cs80p.js → chunk-qnvsqnz5.js} +2 -2
  233. package/bundle/{chunk-bcx2vkv4.js → chunk-qp1n7kwe.js} +1 -1
  234. package/bundle/chunk-qr06byhp.js +2 -0
  235. package/bundle/{chunk-gtjn3yc4.js → chunk-qxcyz5hc.js} +2 -2
  236. package/bundle/{chunk-tj3rem3q.js → chunk-r5zy4za0.js} +2 -2
  237. package/bundle/chunk-r6p0bd2w.js +8251 -0
  238. package/bundle/chunk-r7sq3maz.js +2 -0
  239. package/bundle/{chunk-f83wv08n.js → chunk-r9w0thdk.js} +1 -1
  240. package/bundle/chunk-rmgs9nmj.js +2 -0
  241. package/bundle/{chunk-p887g1xj.js → chunk-rn83r0js.js} +1 -1
  242. package/bundle/{chunk-n90eh3e7.js → chunk-rrv0n73b.js} +1 -1
  243. package/bundle/chunk-rv08wm9j.js +2 -0
  244. package/bundle/chunk-rytavefg.js +2 -0
  245. package/bundle/{chunk-yz0pwv2m.js → chunk-s4vx9x1v.js} +1 -1
  246. package/bundle/{chunk-x2cavpa9.js → chunk-sfw5qddj.js} +1 -1
  247. package/bundle/chunk-sh9vjnsh.js +2 -0
  248. package/bundle/{chunk-6avjq7my.js → chunk-smznrv7k.js} +1 -1
  249. package/bundle/{chunk-vtw0wwch.js → chunk-snqa3zsm.js} +3 -3
  250. package/bundle/chunk-st0c5wwc.js +2 -0
  251. package/bundle/{chunk-vqss3e48.js → chunk-t0761rhq.js} +2 -2
  252. package/bundle/{chunk-vqpfpmha.js → chunk-t239rvej.js} +2 -2
  253. package/bundle/{chunk-5js6a6gf.js → chunk-t2n7vgsq.js} +1 -1
  254. package/bundle/chunk-t6yzrmww.js +2 -0
  255. package/bundle/{chunk-bggybm9k.js → chunk-t8c4cs6z.js} +1 -1
  256. package/bundle/chunk-teb3k2sf.js +2 -0
  257. package/bundle/{chunk-ve3np791.js → chunk-tg226j37.js} +1 -1
  258. package/bundle/chunk-thrfabyv.js +35 -0
  259. package/bundle/{chunk-73fz0cf4.js → chunk-tkrwcjkr.js} +2 -2
  260. package/bundle/{chunk-v5z6sx6j.js → chunk-tm34qp8j.js} +1 -1
  261. package/bundle/chunk-tr6rdr6h.js +4 -0
  262. package/bundle/chunk-ts798jvf.js +2 -0
  263. package/bundle/{chunk-a550vst5.js → chunk-twp3mjj0.js} +9 -9
  264. package/bundle/chunk-tx5aj02v.js +2 -0
  265. package/bundle/chunk-v1t51rrq.js +2 -0
  266. package/bundle/{chunk-vk88jj60.js → chunk-v3arcn10.js} +1 -1
  267. package/bundle/{chunk-e586sjb0.js → chunk-vcygx6hs.js} +2 -2
  268. package/bundle/{chunk-86yk21g4.js → chunk-venprxdp.js} +1 -1
  269. package/bundle/{chunk-ywkvq7zb.js → chunk-vf492zs6.js} +1 -1
  270. package/bundle/chunk-vh9ptqn0.js +2 -0
  271. package/bundle/{chunk-w79jzf8w.js → chunk-vnrjk2be.js} +1 -1
  272. package/bundle/{chunk-8q5ns61h.js → chunk-vshycswk.js} +1 -1
  273. package/bundle/{chunk-8e6gx3gg.js → chunk-vsz4s6zt.js} +1 -1
  274. package/bundle/{chunk-vhe92p7a.js → chunk-vygkwwjd.js} +2 -2
  275. package/bundle/{chunk-9rxyq6f9.js → chunk-w46g7kdq.js} +2 -2
  276. package/bundle/{chunk-q128vfc6.js → chunk-w4brava0.js} +1 -1
  277. package/bundle/{chunk-drwqag0f.js → chunk-w4synhfg.js} +1 -1
  278. package/bundle/chunk-w72rctxz.js +2 -0
  279. package/bundle/{chunk-h2bmss2m.js → chunk-w88ve2pm.js} +1 -1
  280. package/bundle/{chunk-mxhb5adq.js → chunk-w9gzfsy7.js} +2 -2
  281. package/bundle/chunk-wbw9zv3h.js +2 -0
  282. package/bundle/{chunk-1sfcxdbw.js → chunk-wkg3c643.js} +2 -2
  283. package/bundle/{chunk-2bgqy6z7.js → chunk-wwdpw27v.js} +1 -1
  284. package/bundle/{chunk-km1n4ttr.js → chunk-wy3a4cab.js} +1 -1
  285. package/bundle/{chunk-tczbhj0e.js → chunk-wyj8cpx5.js} +1 -1
  286. package/bundle/{chunk-3888asr7.js → chunk-x65xbskr.js} +1 -1
  287. package/bundle/chunk-x6mw98c2.js +2 -0
  288. package/bundle/chunk-x749e61j.js +2 -0
  289. package/bundle/{chunk-8rh0femq.js → chunk-xdd3553a.js} +1 -1
  290. package/bundle/{chunk-2jpmxt4v.js → chunk-xdteq9bd.js} +1 -1
  291. package/bundle/{chunk-9y15zjxa.js → chunk-xe69cnsk.js} +1 -1
  292. package/bundle/chunk-xpjhe9gz.js +2 -0
  293. package/bundle/{chunk-8v6x712g.js → chunk-xv5z1bj6.js} +2 -2
  294. package/bundle/{chunk-bk3z400e.js → chunk-y0527cg0.js} +1 -1
  295. package/bundle/{chunk-hrw5rmj1.js → chunk-y29ejqg2.js} +1 -1
  296. package/bundle/{chunk-42r7z6sq.js → chunk-y67kaj0b.js} +1 -1
  297. package/bundle/chunk-y6p57wgh.js +2 -0
  298. package/bundle/chunk-y6xs8v17.js +2 -0
  299. package/bundle/{chunk-zdzxsyxs.js → chunk-y7hgevfv.js} +2 -2
  300. package/bundle/{chunk-k1gddnkm.js → chunk-ybane1en.js} +1 -1
  301. package/bundle/{chunk-k6cbfrzc.js → chunk-yhj01dz9.js} +2 -2
  302. package/bundle/chunk-ym09zrxe.js +3 -0
  303. package/bundle/{chunk-2xqqkf86.js → chunk-ypdt9mmr.js} +2 -2
  304. package/bundle/chunk-ytetprwr.js +2 -0
  305. package/bundle/{chunk-vm1ek7yf.js → chunk-yz25607t.js} +1 -1
  306. package/bundle/{chunk-ypcc3cnb.js → chunk-z1932c3f.js} +1 -1
  307. package/bundle/chunk-z3xsfpc6.js +2 -0
  308. package/bundle/{chunk-6ypafpg8.js → chunk-z6sbjvtv.js} +1 -1
  309. package/bundle/{chunk-ta7mfkms.js → chunk-zc0cdvcv.js} +2 -2
  310. package/bundle/chunk-zn5pw733.js +2 -0
  311. package/bundle/chunk-ztn9e8g1.js +2 -0
  312. package/bundle/{chunk-ywdtp534.js → chunk-ztyy3ga3.js} +2 -2
  313. package/bundle/chunk-zxwvnmea.js +2 -0
  314. package/bundle/chunk-zzznad30.js +2 -0
  315. package/bundle/index.js +18 -18
  316. package/bundle/parser.worker.js +2 -2
  317. package/bundle/qffi-compat.so +0 -0
  318. package/bundle/qffi.node +0 -0
  319. package/bundle/worker.js +1 -1
  320. package/package.json +1 -1
  321. package/bundle/chunk-0cdtq1r3.js +0 -2
  322. package/bundle/chunk-0ych0f5w.js +0 -2
  323. package/bundle/chunk-0yjdatm6.js +0 -3
  324. package/bundle/chunk-0ykeedfm.js +0 -2
  325. package/bundle/chunk-22hr3ndh.js +0 -2
  326. package/bundle/chunk-23tyxyyj.js +0 -2
  327. package/bundle/chunk-2517cev8.js +0 -2
  328. package/bundle/chunk-28g1ndpx.js +0 -2
  329. package/bundle/chunk-2avxtbv3.js +0 -2
  330. package/bundle/chunk-2faah8w1.js +0 -2
  331. package/bundle/chunk-2qk0k2eb.js +0 -2
  332. package/bundle/chunk-3c3xzz0g.js +0 -3
  333. package/bundle/chunk-42wdfks8.js +0 -2
  334. package/bundle/chunk-44y6dffe.js +0 -2
  335. package/bundle/chunk-4f19vqxf.js +0 -2
  336. package/bundle/chunk-4m3k1atq.js +0 -2
  337. package/bundle/chunk-4n2ytddp.js +0 -2
  338. package/bundle/chunk-4yg42p6y.js +0 -2
  339. package/bundle/chunk-4zx3ze68.js +0 -2
  340. package/bundle/chunk-637sjdzq.js +0 -2
  341. package/bundle/chunk-6h8f89tt.js +0 -2
  342. package/bundle/chunk-6sjj203r.js +0 -2
  343. package/bundle/chunk-79aka9xe.js +0 -2
  344. package/bundle/chunk-7nqdhe7x.js +0 -2
  345. package/bundle/chunk-7q003wdd.js +0 -4
  346. package/bundle/chunk-7x88b2n2.js +0 -2
  347. package/bundle/chunk-8apeexas.js +0 -3
  348. package/bundle/chunk-8mthftwc.js +0 -2
  349. package/bundle/chunk-8wdara3b.js +0 -2
  350. package/bundle/chunk-8xhzpnph.js +0 -2
  351. package/bundle/chunk-96sqbyvf.js +0 -2
  352. package/bundle/chunk-9akz8w0d.js +0 -2
  353. package/bundle/chunk-9etpppyv.js +0 -3
  354. package/bundle/chunk-9pnpmtb2.js +0 -2
  355. package/bundle/chunk-a5pbvp1f.js +0 -7
  356. package/bundle/chunk-a7p0x4sw.js +0 -2
  357. package/bundle/chunk-ae0a496j.js +0 -2
  358. package/bundle/chunk-aq1j9y18.js +0 -2
  359. package/bundle/chunk-aq8nz9hp.js +0 -2
  360. package/bundle/chunk-b4zy78be.js +0 -2
  361. package/bundle/chunk-basjzwqp.js +0 -2
  362. package/bundle/chunk-bhetpmgq.js +0 -3
  363. package/bundle/chunk-bm7xpjh6.js +0 -2
  364. package/bundle/chunk-c1bw1q75.js +0 -2
  365. package/bundle/chunk-c2k556rk.js +0 -2
  366. package/bundle/chunk-c47vp7ne.js +0 -2
  367. package/bundle/chunk-cbhgf058.js +0 -2
  368. package/bundle/chunk-d41mg7at.js +0 -2
  369. package/bundle/chunk-d50kpss6.js +0 -2
  370. package/bundle/chunk-day0rb5p.js +0 -2
  371. package/bundle/chunk-dp7cww4v.js +0 -2
  372. package/bundle/chunk-dy31mchw.js +0 -3
  373. package/bundle/chunk-e5rda9mx.js +0 -2
  374. package/bundle/chunk-e999xtfj.js +0 -2
  375. package/bundle/chunk-ehfxypks.js +0 -7610
  376. package/bundle/chunk-eyr0vf92.js +0 -2
  377. package/bundle/chunk-gbmmbhy4.js +0 -2
  378. package/bundle/chunk-gp877cq5.js +0 -2
  379. package/bundle/chunk-h4f582d6.js +0 -2
  380. package/bundle/chunk-h57c6ne3.js +0 -2
  381. package/bundle/chunk-hk8vvc10.js +0 -2
  382. package/bundle/chunk-hnrqhcgq.js +0 -2
  383. package/bundle/chunk-hwavzxdm.js +0 -2
  384. package/bundle/chunk-hwnc2sa5.js +0 -2
  385. package/bundle/chunk-hy86wfad.js +0 -2
  386. package/bundle/chunk-j17421hz.js +0 -2
  387. package/bundle/chunk-j2gvpa15.js +0 -2
  388. package/bundle/chunk-j7n8khk7.js +0 -2
  389. package/bundle/chunk-jkh98wby.js +0 -2
  390. package/bundle/chunk-k5a652s4.js +0 -2
  391. package/bundle/chunk-k6w32q2p.js +0 -2
  392. package/bundle/chunk-kghwk0yh.js +0 -2
  393. package/bundle/chunk-kh8de8re.js +0 -2
  394. package/bundle/chunk-mce8aa9y.js +0 -2
  395. package/bundle/chunk-me1ja46g.js +0 -2
  396. package/bundle/chunk-mgadsp7r.js +0 -2
  397. package/bundle/chunk-n0k0pp4k.js +0 -2
  398. package/bundle/chunk-n393nnh5.js +0 -2
  399. package/bundle/chunk-n5vyed7w.js +0 -2
  400. package/bundle/chunk-pasm65wq.js +0 -2
  401. package/bundle/chunk-phpmxjf8.js +0 -2
  402. package/bundle/chunk-q2q3dmg3.js +0 -2
  403. package/bundle/chunk-qvzvxsjw.js +0 -2
  404. package/bundle/chunk-racrb1b3.js +0 -2
  405. package/bundle/chunk-s0c0t6qr.js +0 -5
  406. package/bundle/chunk-sghy9s7m.js +0 -2
  407. package/bundle/chunk-skpkjnyy.js +0 -2
  408. package/bundle/chunk-skxhg212.js +0 -2
  409. package/bundle/chunk-snt4kwab.js +0 -2
  410. package/bundle/chunk-sq47t8f1.js +0 -2
  411. package/bundle/chunk-sqhgnvvs.js +0 -2
  412. package/bundle/chunk-t114r59h.js +0 -2
  413. package/bundle/chunk-t1f56k0j.js +0 -2
  414. package/bundle/chunk-t69jx6fz.js +0 -2
  415. package/bundle/chunk-tsb3jsx4.js +0 -2
  416. package/bundle/chunk-ttpbpzbh.js +0 -2
  417. package/bundle/chunk-v667egp5.js +0 -2
  418. package/bundle/chunk-vrv67tt0.js +0 -2
  419. package/bundle/chunk-wcx7hc2p.js +0 -635
  420. package/bundle/chunk-wv8qx8sa.js +0 -2
  421. package/bundle/chunk-xxrtr6sd.js +0 -2
  422. package/bundle/chunk-y2ptjam9.js +0 -3
  423. package/bundle/chunk-y6h35v4a.js +0 -2
  424. package/bundle/chunk-y72p79v2.js +0 -2
  425. package/bundle/chunk-y8eggnrr.js +0 -2
  426. package/bundle/chunk-y9q0f9qz.js +0 -2
  427. package/bundle/chunk-yck5h49c.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$e as m,Ge as I,Ie as r,Ke as l,Oe as O,Pe as t,Se as e,Ue as o,Ve as NN,We as QN,Ze as _,_e as h,af as XN,bf as YN,df as ZN,ef as $N,ff as C,hf as JN}from"./chunk-6j339s7a.js";import{dq as q,hq as u,kq as v}from"./chunk-4mvg7jt1.js";import"./chunk-cqtkxwd8.js";import"./chunk-wf4x5cjc.js";import{au as N}from"./chunk-9ea1n338.js";import"./chunk-ngvp6zc2.js";import"./chunk-f83wv08n.js";function s(Q){var J,z,B,j;if(Q==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 $=(J=Q.prompt_tokens)!=null?J:0,X=(z=Q.completion_tokens)!=null?z:0,Y=(j=(B=Q.completion_tokens_details)==null?void 0:B.reasoning_tokens)!=null?j:void 0,Z=Y!=null?X-Y:X;return{inputTokens:{total:$,noCache:$,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:X,text:Z,reasoning:Y},raw:Q}}function BN(Q){var J;let z=[];for(let{role:B,content:j}of Q)switch(B){case"system":{z.push({role:"system",content:j});break}case"user":{if(j.length===1&&j[0].type==="text"){z.push({role:"user",content:j[0].text});break}z.push({role:"user",content:j.map(($)=>{switch($.type){case"text":return{type:"text",text:$.text};case"file":{if(!$.mediaType.startsWith("image/"))throw new v({functionality:"Non-image file content parts"});let X=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${X};base64,${l($.data)}`}}}}})});break}case"assistant":{let $="",X="",Y=[];for(let Z of j)switch(Z.type){case"reasoning":{X+=Z.text;break}case"text":{$+=Z.text;break}case"tool-call":{Y.push({id:Z.toolCallId,type:"function",function:{name:Z.toolName,arguments:JSON.stringify(Z.input)}});break}}z.push({role:"assistant",content:$,...X.length>0?{reasoning:X}:null,...Y.length>0?{tool_calls:Y}:null});break}case"tool":{for(let $ of j){if($.type==="tool-approval-response")continue;let X=$.output,Y;switch(X.type){case"text":case"error-text":Y=X.value;break;case"execution-denied":Y=(J=X.reason)!=null?J:"Tool execution denied.";break;case"content":case"json":case"error-json":Y=JSON.stringify(X.value);break}z.push({role:"tool",tool_call_id:$.toolCallId,content:Y})}break}default:throw Error(`Unsupported role: ${B}`)}return z}function a({id:Q,model:J,created:z}){return{id:Q!=null?Q:void 0,modelId:J!=null?J:void 0,timestamp:z!=null?new Date(z*1000):void 0}}var GN=N.object({reasoningFormat:N.enum(["parsed","raw","hidden"]).optional(),reasoningEffort:N.enum(["none","default","low","medium","high"]).optional(),parallelToolCalls:N.boolean().optional(),user:N.string().optional(),structuredOutputs:N.boolean().optional(),strictJsonSchema:N.boolean().optional(),serviceTier:N.enum(["on_demand","flex","auto"]).optional()}),jN=N.object({error:N.object({message:N.string(),type:N.string()})}),g=ZN({errorSchema:jN,errorToMessage:(Q)=>Q.error.message}),zN=["openai/gpt-oss-20b","openai/gpt-oss-120b"];function KN(Q){return zN.includes(Q)}function UN(){return zN.join(", ")}function VN({tools:Q,toolChoice:J,modelId:z}){Q=(Q==null?void 0:Q.length)?Q:void 0;let B=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:B};let j=[];for(let X of Q)if(X.type==="provider")if(X.id==="groq.browser_search")if(!KN(z))B.push({type:"unsupported",feature:`provider-defined tool ${X.id}`,details:`Browser search is only supported on the following models: ${UN()}. Current model: ${z}`});else j.push({type:"browser_search"});else B.push({type:"unsupported",feature:`provider-defined tool ${X.id}`});else j.push({type:"function",function:{name:X.name,description:X.description,parameters:X.inputSchema,...X.strict!=null?{strict:X.strict}:{}}});if(J==null)return{tools:j,toolChoice:void 0,toolWarnings:B};let $=J.type;switch($){case"auto":case"none":case"required":return{tools:j,toolChoice:$,toolWarnings:B};case"tool":return{tools:j,toolChoice:{type:"function",function:{name:J.toolName}},toolWarnings:B};default:throw new v({functionality:`tool choice type: ${$}`})}}function n(Q){switch(Q){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 LN=class{constructor(Q,J){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=Q,this.config=J}get provider(){return this.config.provider}async getArgs({prompt:Q,maxOutputTokens:J,temperature:z,topP:B,topK:j,frequencyPenalty:$,presencePenalty:X,stopSequences:Y,responseFormat:Z,seed:K,stream:L,tools:V,toolChoice:W,providerOptions:U}){var G,E,S;let b=[],H=await h({provider:"groq",providerOptions:U,schema:GN}),F=(G=H==null?void 0:H.structuredOutputs)!=null?G:!0,f=(E=H==null?void 0:H.strictJsonSchema)!=null?E:!0;if(j!=null)b.push({type:"unsupported",feature:"topK"});if((Z==null?void 0:Z.type)==="json"&&Z.schema!=null&&!F)b.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:k,toolChoice:D,toolWarnings:R}=VN({tools:V,toolChoice:W,modelId:this.modelId});return{args:{model:this.modelId,user:H==null?void 0:H.user,parallel_tool_calls:H==null?void 0:H.parallelToolCalls,max_tokens:J,temperature:z,top_p:B,frequency_penalty:$,presence_penalty:X,stop:Y,seed:K,response_format:(Z==null?void 0:Z.type)==="json"?F&&Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:f,name:(S=Z.name)!=null?S:"response",description:Z.description}}:{type:"json_object"}:void 0,reasoning_format:H==null?void 0:H.reasoningFormat,reasoning_effort:H==null?void 0:H.reasoningEffort,service_tier:H==null?void 0:H.serviceTier,messages:BN(Q),tools:k,tool_choice:D},warnings:[...b,...R]}}async doGenerate(Q){var J,z;let{args:B,warnings:j}=await this.getArgs({...Q,stream:!1}),$=JSON.stringify(B),{responseHeaders:X,value:Y,rawValue:Z}=await m({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),body:B,failedResponseHandler:g,successfulResponseHandler:C(HN),abortSignal:Q.abortSignal,fetch:this.config.fetch}),K=Y.choices[0],L=[],V=K.message.content;if(V!=null&&V.length>0)L.push({type:"text",text:V});let W=K.message.reasoning;if(W!=null&&W.length>0)L.push({type:"reasoning",text:W});if(K.message.tool_calls!=null)for(let U of K.message.tool_calls)L.push({type:"tool-call",toolCallId:(J=U.id)!=null?J:O(),toolName:U.function.name,input:U.function.arguments});return{content:L,finishReason:{unified:n(K.finish_reason),raw:(z=K.finish_reason)!=null?z:void 0},usage:s(Y.usage),response:{...a(Y),headers:X,body:Z},warnings:j,request:{body:$}}}async doStream(Q){let{args:J,warnings:z}=await this.getArgs({...Q,stream:!0}),B=JSON.stringify({...J,stream:!0}),{responseHeaders:j,value:$}=await m({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),body:{...J,stream:!0},failedResponseHandler:g,successfulResponseHandler:$N(wN),abortSignal:Q.abortSignal,fetch:this.config.fetch}),X=[],Y={unified:"other",raw:void 0},Z=void 0,K=!0,L=!1,V=!1,W;return{stream:$.pipeThrough(new TransformStream({start(U){U.enqueue({type:"stream-start",warnings:z})},transform(U,G){var E,S,b,H,F,f,k,D,R,d,c,p,i;if(Q.includeRawChunks)G.enqueue({type:"raw",rawValue:U.rawValue});if(!U.success){Y={unified:"error",raw:void 0},G.enqueue({type:"error",error:U.error});return}let y=U.value;if("error"in y){Y={unified:"error",raw:void 0},G.enqueue({type:"error",error:y.error});return}if(K)K=!1,G.enqueue({type:"response-metadata",...a(y)});if(((E=y.x_groq)==null?void 0:E.usage)!=null)Z=y.x_groq.usage;let x=y.choices[0];if((x==null?void 0:x.finish_reason)!=null)Y={unified:n(x.finish_reason),raw:x.finish_reason};if((x==null?void 0:x.delta)==null)return;let M=x.delta;if(M.reasoning!=null&&M.reasoning.length>0){if(!V)G.enqueue({type:"reasoning-start",id:"reasoning-0"}),V=!0;G.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:M.reasoning})}if(M.content!=null&&M.content.length>0){if(V)G.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;if(!L)G.enqueue({type:"text-start",id:"txt-0"}),L=!0;G.enqueue({type:"text-delta",id:"txt-0",delta:M.content})}if(M.tool_calls!=null){if(V)G.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;for(let w of M.tool_calls){let T=w.index;if(X[T]==null){if(w.type!=="function")throw new q({data:w,message:"Expected 'function' type."});if(w.id==null)throw new q({data:w,message:"Expected 'id' to be a string."});if(((S=w.function)==null?void 0:S.name)==null)throw new q({data:w,message:"Expected 'function.name' to be a string."});G.enqueue({type:"tool-input-start",id:w.id,toolName:w.function.name}),X[T]={id:w.id,type:"function",function:{name:w.function.name,arguments:(b=w.function.arguments)!=null?b:""},hasFinished:!1};let A=X[T];if(((H=A.function)==null?void 0:H.name)!=null&&((F=A.function)==null?void 0:F.arguments)!=null){if(A.function.arguments.length>0)G.enqueue({type:"tool-input-delta",id:A.id,delta:A.function.arguments});if(_(A.function.arguments))G.enqueue({type:"tool-input-end",id:A.id}),G.enqueue({type:"tool-call",toolCallId:(f=A.id)!=null?f:O(),toolName:A.function.name,input:A.function.arguments}),A.hasFinished=!0}continue}let P=X[T];if(P.hasFinished)continue;if(((k=w.function)==null?void 0:k.arguments)!=null)P.function.arguments+=(R=(D=w.function)==null?void 0:D.arguments)!=null?R:"";if(G.enqueue({type:"tool-input-delta",id:P.id,delta:(d=w.function.arguments)!=null?d:""}),((c=P.function)==null?void 0:c.name)!=null&&((p=P.function)==null?void 0:p.arguments)!=null&&_(P.function.arguments))G.enqueue({type:"tool-input-end",id:P.id}),G.enqueue({type:"tool-call",toolCallId:(i=P.id)!=null?i:O(),toolName:P.function.name,input:P.function.arguments}),P.hasFinished=!0}}},flush(U){if(V)U.enqueue({type:"reasoning-end",id:"reasoning-0"});if(L)U.enqueue({type:"text-end",id:"txt-0"});U.enqueue({type:"finish",finishReason:Y,usage:s(Z),...W!=null?{providerMetadata:W}:{}})}})),request:{body:B},response:{headers:j}}}},HN=N.object({id:N.string().nullish(),created:N.number().nullish(),model:N.string().nullish(),choices:N.array(N.object({message:N.object({content:N.string().nullish(),reasoning:N.string().nullish(),tool_calls:N.array(N.object({id:N.string().nullish(),type:N.literal("function"),function:N.object({name:N.string(),arguments:N.string()})})).nullish()}),index:N.number(),finish_reason:N.string().nullish()})),usage:N.object({prompt_tokens:N.number().nullish(),completion_tokens:N.number().nullish(),total_tokens:N.number().nullish(),prompt_tokens_details:N.object({cached_tokens:N.number().nullish()}).nullish(),completion_tokens_details:N.object({reasoning_tokens:N.number().nullish()}).nullish()}).nullish()}),wN=N.union([N.object({id:N.string().nullish(),created:N.number().nullish(),model:N.string().nullish(),choices:N.array(N.object({delta:N.object({content:N.string().nullish(),reasoning:N.string().nullish(),tool_calls:N.array(N.object({index:N.number(),id:N.string().nullish(),type:N.literal("function").optional(),function:N.object({name:N.string().nullish(),arguments:N.string().nullish()})})).nullish()}).nullish(),finish_reason:N.string().nullable().optional(),index:N.number()})),x_groq:N.object({usage:N.object({prompt_tokens:N.number().nullish(),completion_tokens:N.number().nullish(),total_tokens:N.number().nullish(),prompt_tokens_details:N.object({cached_tokens:N.number().nullish()}).nullish(),completion_tokens_details:N.object({reasoning_tokens:N.number().nullish()}).nullish()}).nullish()}).nullish()}),jN]),WN=NN(()=>QN(N.object({language:N.string().nullish(),prompt:N.string().nullish(),responseFormat:N.string().nullish(),temperature:N.number().min(0).max(1).nullish(),timestampGranularities:N.array(N.string()).nullish()}))),PN=class{constructor(Q,J){this.modelId=Q,this.config=J,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:Q,mediaType:J,providerOptions:z}){var B,j,$,X,Y;let Z=[],K=await h({provider:"groq",providerOptions:z,schema:WN}),L=new FormData,V=Q instanceof Uint8Array?new Blob([Q]):new Blob([r(Q)]);L.append("model",this.modelId);let W=o(J);if(L.append("file",new File([V],"audio",{type:J}),`audio.${W}`),K){let U={language:(B=K.language)!=null?B:void 0,prompt:(j=K.prompt)!=null?j:void 0,response_format:($=K.responseFormat)!=null?$:void 0,temperature:(X=K.temperature)!=null?X:void 0,timestamp_granularities:(Y=K.timestampGranularities)!=null?Y:void 0};for(let G in U){let E=U[G];if(E!==void 0)if(Array.isArray(E))for(let S of E)L.append(`${G}[]`,String(S));else L.append(G,String(E))}}return{formData:L,warnings:Z}}async doGenerate(Q){var J,z,B,j,$,X,Y;let Z=(B=(z=(J=this.config._internal)==null?void 0:J.currentDate)==null?void 0:z.call(J))!=null?B:new Date,{formData:K,warnings:L}=await this.getArgs(Q),{value:V,responseHeaders:W,rawValue:U}=await XN({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),formData:K,failedResponseHandler:g,successfulResponseHandler:C(AN),abortSignal:Q.abortSignal,fetch:this.config.fetch});return{text:V.text,segments:($=(j=V.segments)==null?void 0:j.map((G)=>({text:G.text,startSecond:G.start,endSecond:G.end})))!=null?$:[],language:(X=V.language)!=null?X:void 0,durationInSeconds:(Y=V.duration)!=null?Y:void 0,warnings:L,response:{timestamp:Z,modelId:this.modelId,headers:W,body:U}}}},AN=N.object({text:N.string(),x_groq:N.object({id:N.string()}),task:N.string().nullish(),language:N.string().nullish(),duration:N.number().nullish(),segments:N.array(N.object({id:N.number(),seek:N.number(),start:N.number(),end:N.number(),text:N.string(),tokens:N.array(N.number()),temperature:N.number(),avg_logprob:N.number(),compression_ratio:N.number(),no_speech_prob:N.number()})).nullish()}),EN=YN({id:"groq.browser_search",inputSchema:N.object({})}),MN={browserSearch:EN},SN="3.0.31";function xN(Q={}){var J;let z=(J=JN(Q.baseURL))!=null?J:"https://api.groq.com/openai/v1",B=()=>t({Authorization:`Bearer ${e({apiKey:Q.apiKey,environmentVariableName:"GROQ_API_KEY",description:"Groq"})}`,...Q.headers},`ai-sdk/groq/${SN}`),j=(Z)=>new LN(Z,{provider:"groq.chat",url:({path:K})=>`${z}${K}`,headers:B,fetch:Q.fetch}),$=(Z)=>{if(new.target)throw Error("The Groq model function cannot be called with the new keyword.");return j(Z)},X=(Z)=>{return new PN(Z,{provider:"groq.transcription",url:({path:K})=>`${z}${K}`,headers:B,fetch:Q.fetch})},Y=function(Z){return $(Z)};return Y.specificationVersion="v3",Y.languageModel=$,Y.chat=j,Y.embeddingModel=(Z)=>{throw new u({modelId:Z,modelType:"embeddingModel"})},Y.textEmbeddingModel=Y.embeddingModel,Y.imageModel=(Z)=>{throw new u({modelId:Z,modelType:"imageModel"})},Y.transcription=X,Y.transcriptionModel=X,Y.tools=MN,Y}var gN=xN();export{gN as groq,xN as createGroq,EN as browserSearch,SN as VERSION};
2
+ import{Re as I,Te as r,Ve as l,Ze as O,_e as t,bf as e,df as o,ef as NN,ff as QN,if as _,jf as h,kf as m,lf as XN,mf as YN,of as ZN,pf as $N,qf as C,sf as JN}from"./chunk-7mppvhv9.js";import{Op as q,Sp as u,Vp as v}from"./chunk-ptqk1j2r.js";import"./chunk-cqtkxwd8.js";import"./chunk-pr7z5dj8.js";import{Jt as N}from"./chunk-j9h1sp4g.js";import"./chunk-p6crzjtf.js";import"./chunk-r9w0thdk.js";function s(Q){var J,z,B,j;if(Q==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 $=(J=Q.prompt_tokens)!=null?J:0,X=(z=Q.completion_tokens)!=null?z:0,Y=(j=(B=Q.completion_tokens_details)==null?void 0:B.reasoning_tokens)!=null?j:void 0,Z=Y!=null?X-Y:X;return{inputTokens:{total:$,noCache:$,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:X,text:Z,reasoning:Y},raw:Q}}function BN(Q){var J;let z=[];for(let{role:B,content:j}of Q)switch(B){case"system":{z.push({role:"system",content:j});break}case"user":{if(j.length===1&&j[0].type==="text"){z.push({role:"user",content:j[0].text});break}z.push({role:"user",content:j.map(($)=>{switch($.type){case"text":return{type:"text",text:$.text};case"file":{if(!$.mediaType.startsWith("image/"))throw new v({functionality:"Non-image file content parts"});let X=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${X};base64,${l($.data)}`}}}}})});break}case"assistant":{let $="",X="",Y=[];for(let Z of j)switch(Z.type){case"reasoning":{X+=Z.text;break}case"text":{$+=Z.text;break}case"tool-call":{Y.push({id:Z.toolCallId,type:"function",function:{name:Z.toolName,arguments:JSON.stringify(Z.input)}});break}}z.push({role:"assistant",content:$,...X.length>0?{reasoning:X}:null,...Y.length>0?{tool_calls:Y}:null});break}case"tool":{for(let $ of j){if($.type==="tool-approval-response")continue;let X=$.output,Y;switch(X.type){case"text":case"error-text":Y=X.value;break;case"execution-denied":Y=(J=X.reason)!=null?J:"Tool execution denied.";break;case"content":case"json":case"error-json":Y=JSON.stringify(X.value);break}z.push({role:"tool",tool_call_id:$.toolCallId,content:Y})}break}default:throw Error(`Unsupported role: ${B}`)}return z}function a({id:Q,model:J,created:z}){return{id:Q!=null?Q:void 0,modelId:J!=null?J:void 0,timestamp:z!=null?new Date(z*1000):void 0}}var GN=N.object({reasoningFormat:N.enum(["parsed","raw","hidden"]).optional(),reasoningEffort:N.enum(["none","default","low","medium","high"]).optional(),parallelToolCalls:N.boolean().optional(),user:N.string().optional(),structuredOutputs:N.boolean().optional(),strictJsonSchema:N.boolean().optional(),serviceTier:N.enum(["on_demand","flex","auto"]).optional()}),jN=N.object({error:N.object({message:N.string(),type:N.string()})}),g=ZN({errorSchema:jN,errorToMessage:(Q)=>Q.error.message}),zN=["openai/gpt-oss-20b","openai/gpt-oss-120b"];function KN(Q){return zN.includes(Q)}function UN(){return zN.join(", ")}function VN({tools:Q,toolChoice:J,modelId:z}){Q=(Q==null?void 0:Q.length)?Q:void 0;let B=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:B};let j=[];for(let X of Q)if(X.type==="provider")if(X.id==="groq.browser_search")if(!KN(z))B.push({type:"unsupported",feature:`provider-defined tool ${X.id}`,details:`Browser search is only supported on the following models: ${UN()}. Current model: ${z}`});else j.push({type:"browser_search"});else B.push({type:"unsupported",feature:`provider-defined tool ${X.id}`});else j.push({type:"function",function:{name:X.name,description:X.description,parameters:X.inputSchema,...X.strict!=null?{strict:X.strict}:{}}});if(J==null)return{tools:j,toolChoice:void 0,toolWarnings:B};let $=J.type;switch($){case"auto":case"none":case"required":return{tools:j,toolChoice:$,toolWarnings:B};case"tool":return{tools:j,toolChoice:{type:"function",function:{name:J.toolName}},toolWarnings:B};default:throw new v({functionality:`tool choice type: ${$}`})}}function n(Q){switch(Q){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 LN=class{constructor(Q,J){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=Q,this.config=J}get provider(){return this.config.provider}async getArgs({prompt:Q,maxOutputTokens:J,temperature:z,topP:B,topK:j,frequencyPenalty:$,presencePenalty:X,stopSequences:Y,responseFormat:Z,seed:K,stream:L,tools:V,toolChoice:W,providerOptions:U}){var G,E,S;let b=[],H=await h({provider:"groq",providerOptions:U,schema:GN}),F=(G=H==null?void 0:H.structuredOutputs)!=null?G:!0,f=(E=H==null?void 0:H.strictJsonSchema)!=null?E:!0;if(j!=null)b.push({type:"unsupported",feature:"topK"});if((Z==null?void 0:Z.type)==="json"&&Z.schema!=null&&!F)b.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:k,toolChoice:D,toolWarnings:R}=VN({tools:V,toolChoice:W,modelId:this.modelId});return{args:{model:this.modelId,user:H==null?void 0:H.user,parallel_tool_calls:H==null?void 0:H.parallelToolCalls,max_tokens:J,temperature:z,top_p:B,frequency_penalty:$,presence_penalty:X,stop:Y,seed:K,response_format:(Z==null?void 0:Z.type)==="json"?F&&Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:f,name:(S=Z.name)!=null?S:"response",description:Z.description}}:{type:"json_object"}:void 0,reasoning_format:H==null?void 0:H.reasoningFormat,reasoning_effort:H==null?void 0:H.reasoningEffort,service_tier:H==null?void 0:H.serviceTier,messages:BN(Q),tools:k,tool_choice:D},warnings:[...b,...R]}}async doGenerate(Q){var J,z;let{args:B,warnings:j}=await this.getArgs({...Q,stream:!1}),$=JSON.stringify(B),{responseHeaders:X,value:Y,rawValue:Z}=await m({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),body:B,failedResponseHandler:g,successfulResponseHandler:C(HN),abortSignal:Q.abortSignal,fetch:this.config.fetch}),K=Y.choices[0],L=[],V=K.message.content;if(V!=null&&V.length>0)L.push({type:"text",text:V});let W=K.message.reasoning;if(W!=null&&W.length>0)L.push({type:"reasoning",text:W});if(K.message.tool_calls!=null)for(let U of K.message.tool_calls)L.push({type:"tool-call",toolCallId:(J=U.id)!=null?J:O(),toolName:U.function.name,input:U.function.arguments});return{content:L,finishReason:{unified:n(K.finish_reason),raw:(z=K.finish_reason)!=null?z:void 0},usage:s(Y.usage),response:{...a(Y),headers:X,body:Z},warnings:j,request:{body:$}}}async doStream(Q){let{args:J,warnings:z}=await this.getArgs({...Q,stream:!0}),B=JSON.stringify({...J,stream:!0}),{responseHeaders:j,value:$}=await m({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),body:{...J,stream:!0},failedResponseHandler:g,successfulResponseHandler:$N(wN),abortSignal:Q.abortSignal,fetch:this.config.fetch}),X=[],Y={unified:"other",raw:void 0},Z=void 0,K=!0,L=!1,V=!1,W;return{stream:$.pipeThrough(new TransformStream({start(U){U.enqueue({type:"stream-start",warnings:z})},transform(U,G){var E,S,b,H,F,f,k,D,R,d,c,p,i;if(Q.includeRawChunks)G.enqueue({type:"raw",rawValue:U.rawValue});if(!U.success){Y={unified:"error",raw:void 0},G.enqueue({type:"error",error:U.error});return}let y=U.value;if("error"in y){Y={unified:"error",raw:void 0},G.enqueue({type:"error",error:y.error});return}if(K)K=!1,G.enqueue({type:"response-metadata",...a(y)});if(((E=y.x_groq)==null?void 0:E.usage)!=null)Z=y.x_groq.usage;let x=y.choices[0];if((x==null?void 0:x.finish_reason)!=null)Y={unified:n(x.finish_reason),raw:x.finish_reason};if((x==null?void 0:x.delta)==null)return;let M=x.delta;if(M.reasoning!=null&&M.reasoning.length>0){if(!V)G.enqueue({type:"reasoning-start",id:"reasoning-0"}),V=!0;G.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:M.reasoning})}if(M.content!=null&&M.content.length>0){if(V)G.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;if(!L)G.enqueue({type:"text-start",id:"txt-0"}),L=!0;G.enqueue({type:"text-delta",id:"txt-0",delta:M.content})}if(M.tool_calls!=null){if(V)G.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;for(let w of M.tool_calls){let T=w.index;if(X[T]==null){if(w.type!=="function")throw new q({data:w,message:"Expected 'function' type."});if(w.id==null)throw new q({data:w,message:"Expected 'id' to be a string."});if(((S=w.function)==null?void 0:S.name)==null)throw new q({data:w,message:"Expected 'function.name' to be a string."});G.enqueue({type:"tool-input-start",id:w.id,toolName:w.function.name}),X[T]={id:w.id,type:"function",function:{name:w.function.name,arguments:(b=w.function.arguments)!=null?b:""},hasFinished:!1};let A=X[T];if(((H=A.function)==null?void 0:H.name)!=null&&((F=A.function)==null?void 0:F.arguments)!=null){if(A.function.arguments.length>0)G.enqueue({type:"tool-input-delta",id:A.id,delta:A.function.arguments});if(_(A.function.arguments))G.enqueue({type:"tool-input-end",id:A.id}),G.enqueue({type:"tool-call",toolCallId:(f=A.id)!=null?f:O(),toolName:A.function.name,input:A.function.arguments}),A.hasFinished=!0}continue}let P=X[T];if(P.hasFinished)continue;if(((k=w.function)==null?void 0:k.arguments)!=null)P.function.arguments+=(R=(D=w.function)==null?void 0:D.arguments)!=null?R:"";if(G.enqueue({type:"tool-input-delta",id:P.id,delta:(d=w.function.arguments)!=null?d:""}),((c=P.function)==null?void 0:c.name)!=null&&((p=P.function)==null?void 0:p.arguments)!=null&&_(P.function.arguments))G.enqueue({type:"tool-input-end",id:P.id}),G.enqueue({type:"tool-call",toolCallId:(i=P.id)!=null?i:O(),toolName:P.function.name,input:P.function.arguments}),P.hasFinished=!0}}},flush(U){if(V)U.enqueue({type:"reasoning-end",id:"reasoning-0"});if(L)U.enqueue({type:"text-end",id:"txt-0"});U.enqueue({type:"finish",finishReason:Y,usage:s(Z),...W!=null?{providerMetadata:W}:{}})}})),request:{body:B},response:{headers:j}}}},HN=N.object({id:N.string().nullish(),created:N.number().nullish(),model:N.string().nullish(),choices:N.array(N.object({message:N.object({content:N.string().nullish(),reasoning:N.string().nullish(),tool_calls:N.array(N.object({id:N.string().nullish(),type:N.literal("function"),function:N.object({name:N.string(),arguments:N.string()})})).nullish()}),index:N.number(),finish_reason:N.string().nullish()})),usage:N.object({prompt_tokens:N.number().nullish(),completion_tokens:N.number().nullish(),total_tokens:N.number().nullish(),prompt_tokens_details:N.object({cached_tokens:N.number().nullish()}).nullish(),completion_tokens_details:N.object({reasoning_tokens:N.number().nullish()}).nullish()}).nullish()}),wN=N.union([N.object({id:N.string().nullish(),created:N.number().nullish(),model:N.string().nullish(),choices:N.array(N.object({delta:N.object({content:N.string().nullish(),reasoning:N.string().nullish(),tool_calls:N.array(N.object({index:N.number(),id:N.string().nullish(),type:N.literal("function").optional(),function:N.object({name:N.string().nullish(),arguments:N.string().nullish()})})).nullish()}).nullish(),finish_reason:N.string().nullable().optional(),index:N.number()})),x_groq:N.object({usage:N.object({prompt_tokens:N.number().nullish(),completion_tokens:N.number().nullish(),total_tokens:N.number().nullish(),prompt_tokens_details:N.object({cached_tokens:N.number().nullish()}).nullish(),completion_tokens_details:N.object({reasoning_tokens:N.number().nullish()}).nullish()}).nullish()}).nullish()}),jN]),WN=NN(()=>QN(N.object({language:N.string().nullish(),prompt:N.string().nullish(),responseFormat:N.string().nullish(),temperature:N.number().min(0).max(1).nullish(),timestampGranularities:N.array(N.string()).nullish()}))),PN=class{constructor(Q,J){this.modelId=Q,this.config=J,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:Q,mediaType:J,providerOptions:z}){var B,j,$,X,Y;let Z=[],K=await h({provider:"groq",providerOptions:z,schema:WN}),L=new FormData,V=Q instanceof Uint8Array?new Blob([Q]):new Blob([r(Q)]);L.append("model",this.modelId);let W=o(J);if(L.append("file",new File([V],"audio",{type:J}),`audio.${W}`),K){let U={language:(B=K.language)!=null?B:void 0,prompt:(j=K.prompt)!=null?j:void 0,response_format:($=K.responseFormat)!=null?$:void 0,temperature:(X=K.temperature)!=null?X:void 0,timestamp_granularities:(Y=K.timestampGranularities)!=null?Y:void 0};for(let G in U){let E=U[G];if(E!==void 0)if(Array.isArray(E))for(let S of E)L.append(`${G}[]`,String(S));else L.append(G,String(E))}}return{formData:L,warnings:Z}}async doGenerate(Q){var J,z,B,j,$,X,Y;let Z=(B=(z=(J=this.config._internal)==null?void 0:J.currentDate)==null?void 0:z.call(J))!=null?B:new Date,{formData:K,warnings:L}=await this.getArgs(Q),{value:V,responseHeaders:W,rawValue:U}=await XN({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),formData:K,failedResponseHandler:g,successfulResponseHandler:C(AN),abortSignal:Q.abortSignal,fetch:this.config.fetch});return{text:V.text,segments:($=(j=V.segments)==null?void 0:j.map((G)=>({text:G.text,startSecond:G.start,endSecond:G.end})))!=null?$:[],language:(X=V.language)!=null?X:void 0,durationInSeconds:(Y=V.duration)!=null?Y:void 0,warnings:L,response:{timestamp:Z,modelId:this.modelId,headers:W,body:U}}}},AN=N.object({text:N.string(),x_groq:N.object({id:N.string()}),task:N.string().nullish(),language:N.string().nullish(),duration:N.number().nullish(),segments:N.array(N.object({id:N.number(),seek:N.number(),start:N.number(),end:N.number(),text:N.string(),tokens:N.array(N.number()),temperature:N.number(),avg_logprob:N.number(),compression_ratio:N.number(),no_speech_prob:N.number()})).nullish()}),EN=YN({id:"groq.browser_search",inputSchema:N.object({})}),MN={browserSearch:EN},SN="3.0.31";function xN(Q={}){var J;let z=(J=JN(Q.baseURL))!=null?J:"https://api.groq.com/openai/v1",B=()=>t({Authorization:`Bearer ${e({apiKey:Q.apiKey,environmentVariableName:"GROQ_API_KEY",description:"Groq"})}`,...Q.headers},`ai-sdk/groq/${SN}`),j=(Z)=>new LN(Z,{provider:"groq.chat",url:({path:K})=>`${z}${K}`,headers:B,fetch:Q.fetch}),$=(Z)=>{if(new.target)throw Error("The Groq model function cannot be called with the new keyword.");return j(Z)},X=(Z)=>{return new PN(Z,{provider:"groq.transcription",url:({path:K})=>`${z}${K}`,headers:B,fetch:Q.fetch})},Y=function(Z){return $(Z)};return Y.specificationVersion="v3",Y.languageModel=$,Y.chat=j,Y.embeddingModel=(Z)=>{throw new u({modelId:Z,modelType:"embeddingModel"})},Y.textEmbeddingModel=Y.embeddingModel,Y.imageModel=(Z)=>{throw new u({modelId:Z,modelType:"imageModel"})},Y.transcription=X,Y.transcriptionModel=X,Y.tools=MN,Y}var gN=xN();export{gN as groq,xN as createGroq,EN as browserSearch,SN as VERSION};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-f83wv08n.js";var e={"ui.sessionReview.title":"Cambios de la sesi\xF3n","ui.sessionReview.title.lastTurn":"Cambios del \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir archivo","ui.sessionReview.selection.line":"l\xEDnea {{line}}","ui.sessionReview.selection.lines":"l\xEDneas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir todo","ui.sessionReview.collapseAll":"Colapsar todo","ui.sessionReview.change.added":"A\xF1adido","ui.sessionReview.change.removed":"Eliminado","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"Cargando...","ui.sessionReview.image.placeholder":"Imagen","ui.sessionReview.largeDiff.title":"Diff demasiado grande para renderizar","ui.sessionReview.largeDiff.meta":"L\xEDmite: {{limit}} l\xEDneas modificadas. Actual: {{current}} l\xEDneas modificadas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar de todos modos","ui.fileMedia.kind.image":"imagen","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Archivo de {{kind}} eliminado","ui.fileMedia.state.loading":"Cargando archivo de {{kind}}","ui.fileMedia.state.error":"Error en el archivo de {{kind}}","ui.fileMedia.state.unavailable":"Archivo de {{kind}} no disponible","ui.fileMedia.binary.title":"Archivo binario","ui.fileMedia.binary.description.path":"No se puede mostrar {{path}} porque es un archivo binario.","ui.fileMedia.binary.description.default":"No se puede mostrar este archivo porque es un archivo binario.","ui.lineComment.label.prefix":"Comentar en ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Comentando en ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"A\xF1adir comentario","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar pasos","ui.sessionTurn.steps.hide":"Ocultar pasos","ui.sessionTurn.summary.response":"Respuesta","ui.sessionTurn.diff.showMore":"Mostrar m\xE1s cambios ({{count}})","ui.sessionTurn.retry.retrying":"reintentando","ui.sessionTurn.retry.inSeconds":"en {{seconds}}s","ui.sessionTurn.retry.attempt":"intento #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - intento #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est\xE1 demasiado saturado","ui.sessionTurn.error.freeUsageExceeded":"L\xEDmite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"A\xF1adir cr\xE9ditos","ui.sessionTurn.status.delegating":"Delegando trabajo","ui.sessionTurn.status.planning":"Planificando siguientes pasos","ui.sessionTurn.status.gatheringContext":"Explorando","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"Buscando en la base de c\xF3digo","ui.sessionTurn.status.searchingWeb":"Buscando en la web","ui.sessionTurn.status.makingEdits":"Realizando ediciones","ui.sessionTurn.status.runningCommands":"Ejecutando comandos","ui.sessionTurn.status.thinking":"Pensando","ui.sessionTurn.status.thinkingWithTopic":"Pensando - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Recopilando pensamientos","ui.sessionTurn.status.consideringNextSteps":"Considerando siguientes pasos","ui.messagePart.questions.dismissed":"Preguntas descartadas","ui.messagePart.compaction":"Sesi\xF3n compactada","ui.messagePart.context.read.one":"{{count}} lectura","ui.messagePart.context.read.other":"{{count}} lecturas","ui.messagePart.context.search.one":"{{count}} b\xFAsqueda","ui.messagePart.context.search.other":"{{count}} b\xFAsquedas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.messagePart.diagnostic.error":"Error","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escribir","ui.messagePart.option.typeOwnAnswer":"Escribe tu propia respuesta","ui.messagePart.review.title":"Revisa tus respuestas","ui.list.loading":"Cargando","ui.list.empty":"Sin resultados","ui.list.clearFilter":"Borrar filtro","ui.list.emptyWithFilter.prefix":"Sin resultados para","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nuevo mensaje","ui.textField.copyToClipboard":"Copiar al portapapeles","ui.textField.copyLink":"Copiar enlace","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Vista previa de imagen","ui.scrollView.ariaLabel":"contenido desplazable","ui.tool.read":"Leer","ui.tool.loaded":"Cargado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"B\xFAsqueda web","ui.tool.codesearch":"B\xFAsqueda de c\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Parche","ui.tool.todos":"Tareas","ui.tool.todos.read":"Leer tareas","ui.tool.questions":"Preguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.common.file.one":"archivo","ui.common.file.other":"archivos","ui.common.question.one":"pregunta","ui.common.question.other":"preguntas","ui.common.add":"A\xF1adir","ui.common.back":"Atr\xE1s","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Descartar","ui.common.close":"Cerrar","ui.common.next":"Siguiente","ui.common.submit":"Enviar","ui.permission.deny":"Denegar","ui.permission.allowAlways":"Permitir siempre","ui.permission.allowOnce":"Permitir una vez","ui.message.expand":"Expandir mensaje","ui.message.collapse":"Colapsar mensaje","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensaje","ui.message.forkMessage":"Bifurcar a nueva sesi\xF3n","ui.message.revertMessage":"Restablecer a este punto","ui.message.copyResponse":"Copiar respuesta","ui.message.copied":"\xA1Copiado!","ui.message.interrupted":"Interrumpido","ui.message.queued":"En cola","ui.message.attachment.alt":"adjunto","ui.patch.action.deleted":"Eliminado","ui.patch.action.created":"Creado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Parcheado","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sin respuesta)","ui.question.review.notAnswered":"(no respondida)","ui.question.multiHint":"Selecciona todas las que correspondan","ui.question.singleHint":"Selecciona una respuesta","ui.question.custom.placeholder":"Escribe tu respuesta...","ui.fileSearch.placeholder":"Buscar","ui.fileSearch.previousMatch":"Anterior","ui.fileSearch.nextMatch":"Siguiente","ui.fileSearch.close":"Cerrar b\xFAsqueda","ui.tool.task":"Tarea","ui.tool.skill":"Habilidad","ui.basicTool.called":"Llamado `{{tool}}`","ui.toolErrorCard.failed":"Fall\xF3","ui.toolErrorCard.copyError":"Copiar error","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
2
+ import"./chunk-r9w0thdk.js";var e={"ui.sessionReview.title":"Cambios de la sesi\xF3n","ui.sessionReview.title.lastTurn":"Cambios del \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir archivo","ui.sessionReview.selection.line":"l\xEDnea {{line}}","ui.sessionReview.selection.lines":"l\xEDneas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir todo","ui.sessionReview.collapseAll":"Colapsar todo","ui.sessionReview.change.added":"A\xF1adido","ui.sessionReview.change.removed":"Eliminado","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"Cargando...","ui.sessionReview.image.placeholder":"Imagen","ui.sessionReview.largeDiff.title":"Diff demasiado grande para renderizar","ui.sessionReview.largeDiff.meta":"L\xEDmite: {{limit}} l\xEDneas modificadas. Actual: {{current}} l\xEDneas modificadas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar de todos modos","ui.fileMedia.kind.image":"imagen","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Archivo de {{kind}} eliminado","ui.fileMedia.state.loading":"Cargando archivo de {{kind}}","ui.fileMedia.state.error":"Error en el archivo de {{kind}}","ui.fileMedia.state.unavailable":"Archivo de {{kind}} no disponible","ui.fileMedia.binary.title":"Archivo binario","ui.fileMedia.binary.description.path":"No se puede mostrar {{path}} porque es un archivo binario.","ui.fileMedia.binary.description.default":"No se puede mostrar este archivo porque es un archivo binario.","ui.lineComment.label.prefix":"Comentar en ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Comentando en ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"A\xF1adir comentario","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar pasos","ui.sessionTurn.steps.hide":"Ocultar pasos","ui.sessionTurn.summary.response":"Respuesta","ui.sessionTurn.diff.showMore":"Mostrar m\xE1s cambios ({{count}})","ui.sessionTurn.retry.retrying":"reintentando","ui.sessionTurn.retry.inSeconds":"en {{seconds}}s","ui.sessionTurn.retry.attempt":"intento #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - intento #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est\xE1 demasiado saturado","ui.sessionTurn.error.freeUsageExceeded":"L\xEDmite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"A\xF1adir cr\xE9ditos","ui.sessionTurn.status.delegating":"Delegando trabajo","ui.sessionTurn.status.planning":"Planificando siguientes pasos","ui.sessionTurn.status.gatheringContext":"Explorando","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"Buscando en la base de c\xF3digo","ui.sessionTurn.status.searchingWeb":"Buscando en la web","ui.sessionTurn.status.makingEdits":"Realizando ediciones","ui.sessionTurn.status.runningCommands":"Ejecutando comandos","ui.sessionTurn.status.thinking":"Pensando","ui.sessionTurn.status.thinkingWithTopic":"Pensando - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Recopilando pensamientos","ui.sessionTurn.status.consideringNextSteps":"Considerando siguientes pasos","ui.messagePart.questions.dismissed":"Preguntas descartadas","ui.messagePart.compaction":"Sesi\xF3n compactada","ui.messagePart.context.read.one":"{{count}} lectura","ui.messagePart.context.read.other":"{{count}} lecturas","ui.messagePart.context.search.one":"{{count}} b\xFAsqueda","ui.messagePart.context.search.other":"{{count}} b\xFAsquedas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.messagePart.diagnostic.error":"Error","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escribir","ui.messagePart.option.typeOwnAnswer":"Escribe tu propia respuesta","ui.messagePart.review.title":"Revisa tus respuestas","ui.list.loading":"Cargando","ui.list.empty":"Sin resultados","ui.list.clearFilter":"Borrar filtro","ui.list.emptyWithFilter.prefix":"Sin resultados para","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nuevo mensaje","ui.textField.copyToClipboard":"Copiar al portapapeles","ui.textField.copyLink":"Copiar enlace","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Vista previa de imagen","ui.scrollView.ariaLabel":"contenido desplazable","ui.tool.read":"Leer","ui.tool.loaded":"Cargado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"B\xFAsqueda web","ui.tool.codesearch":"B\xFAsqueda de c\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Parche","ui.tool.todos":"Tareas","ui.tool.todos.read":"Leer tareas","ui.tool.questions":"Preguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.common.file.one":"archivo","ui.common.file.other":"archivos","ui.common.question.one":"pregunta","ui.common.question.other":"preguntas","ui.common.add":"A\xF1adir","ui.common.back":"Atr\xE1s","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Descartar","ui.common.close":"Cerrar","ui.common.next":"Siguiente","ui.common.submit":"Enviar","ui.permission.deny":"Denegar","ui.permission.allowAlways":"Permitir siempre","ui.permission.allowOnce":"Permitir una vez","ui.message.expand":"Expandir mensaje","ui.message.collapse":"Colapsar mensaje","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensaje","ui.message.forkMessage":"Bifurcar a nueva sesi\xF3n","ui.message.revertMessage":"Restablecer a este punto","ui.message.copyResponse":"Copiar respuesta","ui.message.copied":"\xA1Copiado!","ui.message.interrupted":"Interrumpido","ui.message.queued":"En cola","ui.message.attachment.alt":"adjunto","ui.patch.action.deleted":"Eliminado","ui.patch.action.created":"Creado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Parcheado","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sin respuesta)","ui.question.review.notAnswered":"(no respondida)","ui.question.multiHint":"Selecciona todas las que correspondan","ui.question.singleHint":"Selecciona una respuesta","ui.question.custom.placeholder":"Escribe tu respuesta...","ui.fileSearch.placeholder":"Buscar","ui.fileSearch.previousMatch":"Anterior","ui.fileSearch.nextMatch":"Siguiente","ui.fileSearch.close":"Cerrar b\xFAsqueda","ui.tool.task":"Tarea","ui.tool.skill":"Habilidad","ui.basicTool.called":"Llamado `{{tool}}`","ui.toolErrorCard.failed":"Fall\xF3","ui.toolErrorCard.copyError":"Copiar error","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{wO as t}from"./chunk-r9w0thdk.js";var e=await import("./chunk-m7qxxbns.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{as as x}from"./chunk-ywdtp534.js";import{Js as V,Qs as q,Rs as H,us as K,vs as j}from"./chunk-xmjntwjc.js";import{Dt as I,yt as M}from"./chunk-cbmwhvxw.js";import{qE as v,xH as _}from"./chunk-ks1cs80p.js";import{NO as a}from"./chunk-f83wv08n.js";var U={};a(U,{validateArchiveMetadata:()=>P,validateArchiveEntries:()=>g,replaceDirectoryAtomically:()=>C,extractZip:()=>p,assertArchiveDestinationSafe:()=>T});import m from"path";import c from"fs/promises";function g(o,r){let n=m.resolve(r);for(let e of o){let t=e.trim().replaceAll("\\","/");if(!t)continue;if(t.includes("\x00")||m.posix.isAbsolute(t)||/^[a-z]:\//i.test(t))throw Error(`Unsafe archive entry: ${e}`);if(t.split("/").includes(".."))throw Error(`Unsafe archive entry: ${e}`);let s=m.resolve(n,...t.split("/"));if(s!==n&&!s.startsWith(`${n}${m.sep}`))throw Error(`Unsafe archive entry: ${e}`)}}function P(o){for(let r of o.split(/\r?\n/))if(/^[bclps]/.test(r))throw Error("Archive contains an unsafe special entry")}async function u(o){let r=await c.readdir(o,{withFileTypes:!0});await Promise.all(r.map(async(n)=>{let e=m.join(o,n.name);if(n.isSymbolicLink())throw Error(`Archive contains a symbolic link: ${n.name}`);if(n.isDirectory())await u(e)}))}async function b(o){return c.lstat(o).catch((r)=>{if(r.code==="ENOENT")return;throw r})}async function T(o){let r=m.resolve(o),n=m.parse(r),e=n.root;for(let t of r.slice(n.root.length).split(m.sep).filter(Boolean)){e=m.join(e,t);let s=await b(e);if(!s)return;if(s.isSymbolicLink())throw Error(`Archive destination contains a symbolic link: ${e}`)}}async function C(o,r){let n=m.resolve(r);await T(n);let e=await b(n);if(e&&!e.isDirectory())throw Error("Archive destination must be a directory");let t=m.join(m.dirname(n),`.qitqode-backup-${crypto.randomUUID()}`);if(e)await c.rename(n,t);try{await c.rename(o,n)}catch(s){if(e)await c.rename(t,n);throw s}if(e)await c.rm(t,{recursive:!0,force:!0})}async function p(o,r){let n=m.resolve(o),e=m.resolve(r),t=await x(process.platform==="win32"?["tar","-tf",n]:["unzip","-Z1",n]);g(t.stdout.toString().split(/\r?\n/),e);let s=await x(process.platform==="win32"?["tar","-tvf",n]:["unzip","-Z","-l",n]);P(s.stdout.toString()),await T(m.dirname(e)),await c.mkdir(m.dirname(e),{recursive:!0}),await T(m.dirname(e));let f=await c.mkdtemp(m.join(m.dirname(e),".qitqode-extract-"));try{if(process.platform==="win32"){let w=n.replace(/'/g,"''"),R=f.replace(/'/g,"''"),S=`$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path '${w}' -DestinationPath '${R}' -Force`;await x(["powershell","-NoProfile","-NonInteractive","-Command",S])}else await x(["unzip","-o","-q",n,"-d",f]);await u(f),await C(f,e)}finally{await c.rm(f,{recursive:!0,force:!0})}}var $={};a($,{isValidHex:()=>J,hexToRgb:()=>F,hexToAnsiBold:()=>y});function J(o){if(!o)return!1;return/^#[0-9a-fA-F]{6}$/.test(o)}function F(o){let r=parseInt(o.slice(1,3),16),n=parseInt(o.slice(3,5),16),e=parseInt(o.slice(5,7),16);return{r,g:n,b:e}}function y(o){if(!J(o))return;let{r,g:n,b:e}=F(o);return`\x1B[38;2;${r};${n};${e}m\x1B[1m`}var Q={};a(Q,{awaitDeferred:()=>k});function k(o,r){return _.ensuring(v.await(o),_.sync(r))}import d from"os";import oo from"path";var i;async function A(){if(i)return i;let o=oo.join(I.Path.data,"installation_id"),r=await M.readText(o).catch(()=>{return});if(r&&r.trim())return i=r.trim(),i;return i=crypto.randomUUID(),await M.write(o,i),i}function ro(){if(process.env.USER)return process.env.USER;if(process.env.USERNAME)return process.env.USERNAME;return d.userInfo().username}function no(){return Intl.DateTimeFormat().resolvedOptions().locale}function eo(){return Intl.DateTimeFormat().resolvedOptions().timeZone}async function to(){let o=d.cpus();return{os:{platform:d.platform(),arch:d.arch(),release:d.release(),hostname:d.hostname()},cpu:{model:o[0]?.model??"unknown",count:o.length},memory:{total_bytes:d.totalmem()},user:{username:ro(),homedir:d.homedir()},runtime:{bun_version:Bun.version,node_version:process.versions.node,pid:process.pid,timezone:eo(),locale:no()},paths:{cwd:process.cwd(),data:I.Path.data,config:I.Path.config},qitqode:{version:K,channel:j,installation_id:await A(),run_id:q,process_role:H}}}var W={};a(W,{toString:()=>mo,parse:()=>co,match:()=>so,fromParsedKey:()=>fo});function so(o,r){if(!o)return!1;let n={...o,super:o.super??!1},e={...r,super:r.super??!1};return V(n,e)}function fo(o,r=!1){return{name:o.name===" "?"space":o.name,ctrl:o.ctrl,meta:o.meta,shift:o.shift,super:o.super??!1,leader:r}}function mo(o){if(!o)return"";let r=[];if(o.ctrl)r.push("ctrl");if(o.meta)r.push("alt");if(o.super)r.push("super");if(o.shift)r.push("shift");if(o.name)if(o.name==="delete")r.push("del");else r.push(o.name);let n=r.join("+");if(o.leader)n=n?`<leader> ${n}`:"<leader>";return n}function co(o){if(o==="none")return[];return o.split(",").map((r)=>{let e=r.replace(/<leader>/g,"leader+").toLowerCase().split("+"),t={ctrl:!1,meta:!1,shift:!1,leader:!1,name:""};for(let s of e)switch(s){case"ctrl":t.ctrl=!0;break;case"alt":case"meta":case"option":t.meta=!0;break;case"super":t.super=!0;break;case"shift":t.shift=!0;break;case"leader":t.leader=!0;break;case"esc":t.name="escape";break;default:t.name=s;break}return t})}var B={};a(B,{create:()=>io,NotFound:()=>O});import{AsyncLocalStorage as ao}from"async_hooks";class O extends Error{name;constructor(o){super(`No context found for ${o}`);this.name=o}}function io(o){let r=new ao;return{use(){let n=r.getStore();if(!n)throw new O(o);return n},provide(n,e){return r.run(n,e)}}}var X={};a(X,{truncateMiddle:()=>To,truncate:()=>Ro,todayTimeOrDateTime:()=>xo,titlecase:()=>wo,time:()=>N,pluralize:()=>Mo,number:()=>Io,duration:()=>Eo,datetime:()=>G});function wo(o){return o.replace(/\b\w/g,(r)=>r.toUpperCase())}function N(o){return new Date(o).toLocaleTimeString(void 0,{timeStyle:"short"})}function G(o){let r=new Date(o),n=N(o),e=r.toLocaleDateString();return`${n} \xB7 ${e}`}function xo(o){let r=new Date(o),n=new Date;if(r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate())return N(o);else return G(o)}function Io(o){if(o>=1e6)return(o/1e6).toFixed(1)+"M";else if(o>=1000)return(o/1000).toFixed(1)+"K";return o.toString()}function Eo(o){if(o<1000)return`${o}ms`;if(o<60000)return`${(o/1000).toFixed(1)}s`;if(o<3600000){let e=Math.floor(o/60000),t=Math.floor(o%60000/1000);return`${e}m ${t}s`}if(o<86400000){let e=Math.floor(o/3600000),t=Math.floor(o%3600000/60000);return`${e}h ${t}m`}let r=Math.floor(o%86400000/3600000);return`${Math.floor(o/86400000)}d ${r}h`}function Ro(o,r){if(r<=0)return"";if(o.length<=r)return o;return o.slice(0,r-1)+"\u2026"}function To(o,r=35){if(r<=0)return"";if(o.length<=r)return o;let n="\u2026",e=Math.ceil((r-n.length)/2),t=Math.floor((r-n.length)/2);return o.slice(0,e)+n+(t>0?o.slice(-t):"")}function Mo(o,r,n){return(o===1?r:n).replace("{}",o.toString())}var h={};a(h,{write:()=>Oo,read:()=>_o});var E=new Map;function Y(o){if(!E.has(o))E.set(o,{readers:0,writer:!1,waitingReaders:[],waitingWriters:[]});return E.get(o)}function So(o){let r=E.get(o);if(!r||r.writer||r.readers>0)return;if(r.waitingWriters.length>0){r.waitingWriters.shift()();return}while(r.waitingReaders.length>0)r.waitingReaders.shift()();if(r.readers===0&&!r.writer&&r.waitingReaders.length===0&&r.waitingWriters.length===0)E.delete(o)}function L(o){return new Promise((r)=>{let n=()=>{o.acquire();let e=!1;r({[Symbol.dispose]:()=>{if(e)return;e=!0,o.release(),So(o.key)}})};if(o.available())n();else o.waiting.push(n)})}async function _o(o){let r=Y(o);return L({key:o,available:()=>!r.writer&&r.waitingWriters.length===0,acquire:()=>r.readers++,release:()=>r.readers--,waiting:r.waitingReaders})}async function Oo(o){let r=Y(o);return L({key:o,available:()=>!r.writer&&r.readers===0,acquire:()=>{r.writer=!0},release:()=>{r.writer=!1},waiting:r.waitingWriters})}var z={};a(z,{listen:()=>No,emit:()=>go,client:()=>Po});function No(o){onmessage=async(r)=>{let n=JSON.parse(r.data);if(n.type==="rpc.request")try{let e=await o[n.method](n.input);postMessage(JSON.stringify({type:"rpc.result",result:e,id:n.id}))}catch(e){postMessage(JSON.stringify({type:"rpc.result",error:e instanceof Error?e.message:String(e),id:n.id}))}}}function go(o,r){postMessage(JSON.stringify({type:"rpc.event",event:o,data:r}))}function Po(o){let r=new Map,n=new Map,e=0;return o.onmessage=async(t)=>{let s=JSON.parse(t.data);if(s.type==="rpc.result"){let f=r.get(s.id);if(f)if(r.delete(s.id),"error"in s)f.reject(Error(typeof s.error==="string"?s.error:"RPC call failed"));else f.resolve(s.result)}if(s.type==="rpc.event"){let f=n.get(s.event);if(f)for(let w of f)w(s.data)}},{call(t,s){let f=e++;return new Promise((w,R)=>{r.set(f,{resolve:w,reject:R});try{o.postMessage(JSON.stringify({type:"rpc.request",method:t,input:s,id:f}))}catch(S){r.delete(f),R(S)}})},on(t,s){let f=n.get(t);if(!f)f=new Set,n.set(t,f);return f.add(s),()=>{f.delete(s)}}}}var D={};a(D,{estimate:()=>Z});function Z(o){return Math.max(0,Math.round((o||"").length/4))}export{U as Or,$ as Pr,Q as Qr,A as Rr,to as Sr,W as Tr,B as Ur,X as Vr,h as Wr,Po as Xr,z as Yr,D as Zr};
2
+ import{Lr as x}from"./chunk-ztyy3ga3.js";import{As as H,ds as K,es as j,ss as V,zs as q}from"./chunk-09geev0j.js";import{ft as M,kt as I}from"./chunk-at22twxx.js";import{ZD as v,eH as _}from"./chunk-qnvsqnz5.js";import{uO as a}from"./chunk-r9w0thdk.js";var U={};a(U,{validateArchiveMetadata:()=>P,validateArchiveEntries:()=>g,replaceDirectoryAtomically:()=>C,extractZip:()=>p,assertArchiveDestinationSafe:()=>T});import m from"path";import c from"fs/promises";function g(o,r){let n=m.resolve(r);for(let e of o){let t=e.trim().replaceAll("\\","/");if(!t)continue;if(t.includes("\x00")||m.posix.isAbsolute(t)||/^[a-z]:\//i.test(t))throw Error(`Unsafe archive entry: ${e}`);if(t.split("/").includes(".."))throw Error(`Unsafe archive entry: ${e}`);let s=m.resolve(n,...t.split("/"));if(s!==n&&!s.startsWith(`${n}${m.sep}`))throw Error(`Unsafe archive entry: ${e}`)}}function P(o){for(let r of o.split(/\r?\n/))if(/^[bclps]/.test(r))throw Error("Archive contains an unsafe special entry")}async function u(o){let r=await c.readdir(o,{withFileTypes:!0});await Promise.all(r.map(async(n)=>{let e=m.join(o,n.name);if(n.isSymbolicLink())throw Error(`Archive contains a symbolic link: ${n.name}`);if(n.isDirectory())await u(e)}))}async function b(o){return c.lstat(o).catch((r)=>{if(r.code==="ENOENT")return;throw r})}async function T(o){let r=m.resolve(o),n=m.parse(r),e=n.root;for(let t of r.slice(n.root.length).split(m.sep).filter(Boolean)){e=m.join(e,t);let s=await b(e);if(!s)return;if(s.isSymbolicLink())throw Error(`Archive destination contains a symbolic link: ${e}`)}}async function C(o,r){let n=m.resolve(r);await T(n);let e=await b(n);if(e&&!e.isDirectory())throw Error("Archive destination must be a directory");let t=m.join(m.dirname(n),`.qitqode-backup-${crypto.randomUUID()}`);if(e)await c.rename(n,t);try{await c.rename(o,n)}catch(s){if(e)await c.rename(t,n);throw s}if(e)await c.rm(t,{recursive:!0,force:!0})}async function p(o,r){let n=m.resolve(o),e=m.resolve(r),t=await x(process.platform==="win32"?["tar","-tf",n]:["unzip","-Z1",n]);g(t.stdout.toString().split(/\r?\n/),e);let s=await x(process.platform==="win32"?["tar","-tvf",n]:["unzip","-Z","-l",n]);P(s.stdout.toString()),await T(m.dirname(e)),await c.mkdir(m.dirname(e),{recursive:!0}),await T(m.dirname(e));let f=await c.mkdtemp(m.join(m.dirname(e),".qitqode-extract-"));try{if(process.platform==="win32"){let w=n.replace(/'/g,"''"),R=f.replace(/'/g,"''"),S=`$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive -Path '${w}' -DestinationPath '${R}' -Force`;await x(["powershell","-NoProfile","-NonInteractive","-Command",S])}else await x(["unzip","-o","-q",n,"-d",f]);await u(f),await C(f,e)}finally{await c.rm(f,{recursive:!0,force:!0})}}var $={};a($,{isValidHex:()=>J,hexToRgb:()=>F,hexToAnsiBold:()=>y});function J(o){if(!o)return!1;return/^#[0-9a-fA-F]{6}$/.test(o)}function F(o){let r=parseInt(o.slice(1,3),16),n=parseInt(o.slice(3,5),16),e=parseInt(o.slice(5,7),16);return{r,g:n,b:e}}function y(o){if(!J(o))return;let{r,g:n,b:e}=F(o);return`\x1B[38;2;${r};${n};${e}m\x1B[1m`}var Q={};a(Q,{awaitDeferred:()=>k});function k(o,r){return _.ensuring(v.await(o),_.sync(r))}import d from"os";import oo from"path";var i;async function A(){if(i)return i;let o=oo.join(I.Path.data,"installation_id"),r=await M.readText(o).catch(()=>{return});if(r&&r.trim())return i=r.trim(),i;return i=crypto.randomUUID(),await M.write(o,i),i}function ro(){if(process.env.USER)return process.env.USER;if(process.env.USERNAME)return process.env.USERNAME;return d.userInfo().username}function no(){return Intl.DateTimeFormat().resolvedOptions().locale}function eo(){return Intl.DateTimeFormat().resolvedOptions().timeZone}async function to(){let o=d.cpus();return{os:{platform:d.platform(),arch:d.arch(),release:d.release(),hostname:d.hostname()},cpu:{model:o[0]?.model??"unknown",count:o.length},memory:{total_bytes:d.totalmem()},user:{username:ro(),homedir:d.homedir()},runtime:{bun_version:Bun.version,node_version:process.versions.node,pid:process.pid,timezone:eo(),locale:no()},paths:{cwd:process.cwd(),data:I.Path.data,config:I.Path.config},qitqode:{version:K,channel:j,installation_id:await A(),run_id:q,process_role:H}}}var W={};a(W,{toString:()=>mo,parse:()=>co,match:()=>so,fromParsedKey:()=>fo});function so(o,r){if(!o)return!1;let n={...o,super:o.super??!1},e={...r,super:r.super??!1};return V(n,e)}function fo(o,r=!1){return{name:o.name===" "?"space":o.name,ctrl:o.ctrl,meta:o.meta,shift:o.shift,super:o.super??!1,leader:r}}function mo(o){if(!o)return"";let r=[];if(o.ctrl)r.push("ctrl");if(o.meta)r.push("alt");if(o.super)r.push("super");if(o.shift)r.push("shift");if(o.name)if(o.name==="delete")r.push("del");else r.push(o.name);let n=r.join("+");if(o.leader)n=n?`<leader> ${n}`:"<leader>";return n}function co(o){if(o==="none")return[];return o.split(",").map((r)=>{let e=r.replace(/<leader>/g,"leader+").toLowerCase().split("+"),t={ctrl:!1,meta:!1,shift:!1,leader:!1,name:""};for(let s of e)switch(s){case"ctrl":t.ctrl=!0;break;case"alt":case"meta":case"option":t.meta=!0;break;case"super":t.super=!0;break;case"shift":t.shift=!0;break;case"leader":t.leader=!0;break;case"esc":t.name="escape";break;default:t.name=s;break}return t})}var B={};a(B,{create:()=>io,NotFound:()=>O});import{AsyncLocalStorage as ao}from"async_hooks";class O extends Error{name;constructor(o){super(`No context found for ${o}`);this.name=o}}function io(o){let r=new ao;return{use(){let n=r.getStore();if(!n)throw new O(o);return n},provide(n,e){return r.run(n,e)}}}var X={};a(X,{truncateMiddle:()=>To,truncate:()=>Ro,todayTimeOrDateTime:()=>xo,titlecase:()=>wo,time:()=>N,pluralize:()=>Mo,number:()=>Io,duration:()=>Eo,datetime:()=>G});function wo(o){return o.replace(/\b\w/g,(r)=>r.toUpperCase())}function N(o){return new Date(o).toLocaleTimeString(void 0,{timeStyle:"short"})}function G(o){let r=new Date(o),n=N(o),e=r.toLocaleDateString();return`${n} \xB7 ${e}`}function xo(o){let r=new Date(o),n=new Date;if(r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()&&r.getDate()===n.getDate())return N(o);else return G(o)}function Io(o){if(o>=1e6)return(o/1e6).toFixed(1)+"M";else if(o>=1000)return(o/1000).toFixed(1)+"K";return o.toString()}function Eo(o){if(o<1000)return`${o}ms`;if(o<60000)return`${(o/1000).toFixed(1)}s`;if(o<3600000){let e=Math.floor(o/60000),t=Math.floor(o%60000/1000);return`${e}m ${t}s`}if(o<86400000){let e=Math.floor(o/3600000),t=Math.floor(o%3600000/60000);return`${e}h ${t}m`}let r=Math.floor(o%86400000/3600000);return`${Math.floor(o/86400000)}d ${r}h`}function Ro(o,r){if(r<=0)return"";if(o.length<=r)return o;return o.slice(0,r-1)+"\u2026"}function To(o,r=35){if(r<=0)return"";if(o.length<=r)return o;let n="\u2026",e=Math.ceil((r-n.length)/2),t=Math.floor((r-n.length)/2);return o.slice(0,e)+n+(t>0?o.slice(-t):"")}function Mo(o,r,n){return(o===1?r:n).replace("{}",o.toString())}var h={};a(h,{write:()=>Oo,read:()=>_o});var E=new Map;function Y(o){if(!E.has(o))E.set(o,{readers:0,writer:!1,waitingReaders:[],waitingWriters:[]});return E.get(o)}function So(o){let r=E.get(o);if(!r||r.writer||r.readers>0)return;if(r.waitingWriters.length>0){r.waitingWriters.shift()();return}while(r.waitingReaders.length>0)r.waitingReaders.shift()();if(r.readers===0&&!r.writer&&r.waitingReaders.length===0&&r.waitingWriters.length===0)E.delete(o)}function L(o){return new Promise((r)=>{let n=()=>{o.acquire();let e=!1;r({[Symbol.dispose]:()=>{if(e)return;e=!0,o.release(),So(o.key)}})};if(o.available())n();else o.waiting.push(n)})}async function _o(o){let r=Y(o);return L({key:o,available:()=>!r.writer&&r.waitingWriters.length===0,acquire:()=>r.readers++,release:()=>r.readers--,waiting:r.waitingReaders})}async function Oo(o){let r=Y(o);return L({key:o,available:()=>!r.writer&&r.readers===0,acquire:()=>{r.writer=!0},release:()=>{r.writer=!1},waiting:r.waitingWriters})}var z={};a(z,{listen:()=>No,emit:()=>go,client:()=>Po});function No(o){onmessage=async(r)=>{let n=JSON.parse(r.data);if(n.type==="rpc.request")try{let e=await o[n.method](n.input);postMessage(JSON.stringify({type:"rpc.result",result:e,id:n.id}))}catch(e){postMessage(JSON.stringify({type:"rpc.result",error:e instanceof Error?e.message:String(e),id:n.id}))}}}function go(o,r){postMessage(JSON.stringify({type:"rpc.event",event:o,data:r}))}function Po(o){let r=new Map,n=new Map,e=0;return o.onmessage=async(t)=>{let s=JSON.parse(t.data);if(s.type==="rpc.result"){let f=r.get(s.id);if(f)if(r.delete(s.id),"error"in s)f.reject(Error(typeof s.error==="string"?s.error:"RPC call failed"));else f.resolve(s.result)}if(s.type==="rpc.event"){let f=n.get(s.event);if(f)for(let w of f)w(s.data)}},{call(t,s){let f=e++;return new Promise((w,R)=>{r.set(f,{resolve:w,reject:R});try{o.postMessage(JSON.stringify({type:"rpc.request",method:t,input:s,id:f}))}catch(S){r.delete(f),R(S)}})},on(t,s){let f=n.get(t);if(!f)f=new Set,n.set(t,f);return f.add(s),()=>{f.delete(s)}}}}var D={};a(D,{estimate:()=>Z});function Z(o){return Math.max(0,Math.round((o||"").length/4))}export{U as xr,$ as yr,Q as zr,A as Ar,to as Br,W as Cr,B as Dr,X as Er,h as Fr,Po as Gr,z as Hr,D as Ir};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Hp as t,Jp as R,Kp as b,Lp as xG,Rp as f,Sp as s,Tp as O,Xp as IG,Yo as y,bp as l,dp as p,fp as qG,kp as NG,mp as _,rp as DG}from"./chunk-my3cswnp.js";import{cq as AG,dq as r,iq as PG,kq as T}from"./chunk-4mvg7jt1.js";import{au as Q}from"./chunk-9ea1n338.js";function h(G){return G.replace(/[_-]([a-z])/g,(Y)=>Y[1].toUpperCase())}function MG(G,Y){let Z=h(G);if(Z!==G&&(Y==null?void 0:Y[Z])!=null)return Z;return G}var SG=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),m={errorSchema:SG,errorToMessage:(G)=>G.error.message};function jG(G){var Y,Z,U,z,V,j;if(G==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 B=(Y=G.prompt_tokens)!=null?Y:0,H=(Z=G.completion_tokens)!=null?Z:0,X=(z=(U=G.prompt_tokens_details)==null?void 0:U.cached_tokens)!=null?z:0,L=(j=(V=G.completion_tokens_details)==null?void 0:V.reasoning_tokens)!=null?j:0;return{inputTokens:{total:B,noCache:B-X,cacheRead:X,cacheWrite:void 0},outputTokens:{total:H,text:H-L,reasoning:L},raw:G}}function u(G){var Y,Z;return(Z=(Y=G==null?void 0:G.providerOptions)==null?void 0:Y.openaiCompatible)!=null?Z:{}}function RG(G){switch(G){case"audio/wav":return"wav";case"audio/mp3":case"audio/mpeg":return"mp3";default:return null}}function yG(G){var Y,Z,U;let z=[];for(let{role:V,content:j,...B}of G){let H=u({...B});switch(V){case"system":{z.push({role:"system",content:j,...H});break}case"user":{if(j.length===1&&j[0].type==="text"){z.push({role:"user",content:j[0].text,...u(j[0])});break}z.push({role:"user",content:j.map((X)=>{var L;let $=u(X);switch(X.type){case"text":return{type:"text",text:X.text,...$};case"file":{if(X.mediaType.startsWith("image/")){let J=X.mediaType==="image/*"?"image/jpeg":X.mediaType;return{type:"image_url",image_url:{url:X.data instanceof URL?X.data.toString():`data:${J};base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("audio/")){if(X.data instanceof URL)throw new T({functionality:"audio file parts with URLs"});let J=RG(X.mediaType);if(J===null)throw new T({functionality:`audio media type ${X.mediaType}`});return{type:"input_audio",input_audio:{data:p(X.data),format:J},...$}}if(X.mediaType==="application/pdf"){if(X.data instanceof URL)throw new T({functionality:"PDF file parts with URLs"});return{type:"file",file:{filename:(L=X.filename)!=null?L:"document.pdf",file_data:`data:application/pdf;base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("text/"))return{type:"text",text:X.data instanceof URL?X.data.toString():typeof X.data==="string"?new TextDecoder().decode(l(X.data)):new TextDecoder().decode(X.data),...$};throw new T({functionality:`file part media type ${X.mediaType}`})}}}),...H});break}case"assistant":{let X="",L="",$=[];for(let J of j){let E=u(J);switch(J.type){case"text":{X+=J.text;break}case"reasoning":{L+=J.text;break}case"tool-call":{let A=(Z=(Y=J.providerOptions)==null?void 0:Y.google)==null?void 0:Z.thoughtSignature;$.push({id:J.toolCallId,type:"function",function:{name:J.toolName,arguments:JSON.stringify(J.input)},...E,...A?{extra_content:{google:{thought_signature:String(A)}}}:{}});break}}}z.push({role:"assistant",content:X,...L.length>0?{reasoning_content:L}:{},tool_calls:$.length>0?$:void 0,...H});break}case"tool":{for(let X of j){if(X.type==="tool-approval-response")continue;let L=X.output,$;switch(L.type){case"text":case"error-text":$=L.value;break;case"execution-denied":$=(U=L.reason)!=null?U:"Tool execution denied.";break;case"content":case"json":case"error-json":$=JSON.stringify(L.value);break}let J=u(X);z.push({role:"tool",tool_call_id:X.toolCallId,content:$,...J})}break}default:throw Error(`Unsupported role: ${V}`)}}return z}function LG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function zG(G){switch(G){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 g=Q.object({user:Q.string().optional(),reasoningEffort:Q.string().optional(),textVerbosity:Q.string().optional(),strictJsonSchema:Q.boolean().optional()});function TG({tools:G,toolChoice:Y}){G=(G==null?void 0:G.length)?G:void 0;let Z=[];if(G==null)return{tools:void 0,toolChoice:void 0,toolWarnings:Z};let U=[];for(let V of G)if(V.type==="provider")Z.push({type:"unsupported",feature:`provider-defined tool ${V.id}`});else U.push({type:"function",function:{name:V.name,description:V.description,parameters:V.inputSchema,...V.strict!=null?{strict:V.strict}:{}}});if(Y==null)return{tools:U,toolChoice:void 0,toolWarnings:Z};let z=Y.type;switch(z){case"auto":case"none":case"required":return{tools:U,toolChoice:z,toolWarnings:Z};case"tool":return{tools:U,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:Z};default:throw new T({functionality:`tool choice type: ${z}`})}}var bG=class{constructor(G,Y){this.specificationVersion="v3";var Z,U;this.modelId=G,this.config=Y;let z=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=OG(z.errorSchema),this.failedResponseHandler=f(z),this.supportsStructuredOutputs=(U=Y.supportsStructuredOutputs)!=null?U:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}transformRequestBody(G){var Y,Z,U;return(U=(Z=(Y=this.config).transformRequestBody)==null?void 0:Z.call(Y,G))!=null?U:G}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,providerOptions:B,stopSequences:H,responseFormat:X,seed:L,toolChoice:$,tools:J}){var E,A,P,K,W;let N=[],x=await R({provider:"openai-compatible",providerOptions:B,schema:g});if(x!=null)N.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let D=Object.assign(x!=null?x:{},(E=await R({provider:"openaiCompatible",providerOptions:B,schema:g}))!=null?E:{},(A=await R({provider:this.providerOptionsName,providerOptions:B,schema:g}))!=null?A:{},(P=await R({provider:h(this.providerOptionsName),providerOptions:B,schema:g}))!=null?P:{}),w=(K=D==null?void 0:D.strictJsonSchema)!=null?K:!0;if(z!=null)N.push({type:"unsupported",feature:"topK"});if((X==null?void 0:X.type)==="json"&&X.schema!=null&&!this.supportsStructuredOutputs)N.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:q,toolChoice:I,toolWarnings:k}=TG({tools:J,toolChoice:$});return{metadataKey:MG(this.providerOptionsName,B),args:{model:this.modelId,user:D.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,response_format:(X==null?void 0:X.type)==="json"?this.supportsStructuredOutputs===!0&&X.schema!=null?{type:"json_schema",json_schema:{schema:X.schema,strict:w,name:(W=X.name)!=null?W:"response",description:X.description}}:{type:"json_object"}:void 0,stop:H,seed:L,...Object.fromEntries(Object.entries({...B==null?void 0:B[this.providerOptionsName],...B==null?void 0:B[h(this.providerOptionsName)]}).filter(([d])=>!Object.keys(g.shape).includes(d))),reasoning_effort:D.reasoningEffort,verbosity:D.textVerbosity,messages:yG(G),tools:q,tool_choice:I},warnings:[...N,...k]}}async doGenerate(G){var Y,Z,U,z,V,j,B,H;let{args:X,warnings:L,metadataKey:$}=await this.getArgs({...G}),J=this.transformRequestBody(X),E=JSON.stringify(J),{responseHeaders:A,value:P,rawValue:K}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:J,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(kG),abortSignal:G.abortSignal,fetch:this.config.fetch}),W=P.choices[0],N=[],x=W.message.content;if(x!=null&&x.length>0)N.push({type:"text",text:x});let D=(Y=W.message.reasoning_content)!=null?Y:W.message.reasoning;if(D!=null&&D.length>0)N.push({type:"reasoning",text:D});if(W.message.tool_calls!=null)for(let I of W.message.tool_calls){let k=(U=(Z=I.extra_content)==null?void 0:Z.google)==null?void 0:U.thought_signature;N.push({type:"tool-call",toolCallId:(z=I.id)!=null?z:_(),toolName:I.function.name,input:I.function.arguments,...k?{providerMetadata:{[$]:{thoughtSignature:k}}}:{}})}let w={[$]:{},...await((j=(V=this.config.metadataExtractor)==null?void 0:V.extractMetadata)==null?void 0:j.call(V,{parsedBody:K}))},q=(B=P.usage)==null?void 0:B.completion_tokens_details;if((q==null?void 0:q.accepted_prediction_tokens)!=null)w[$].acceptedPredictionTokens=q==null?void 0:q.accepted_prediction_tokens;if((q==null?void 0:q.rejected_prediction_tokens)!=null)w[$].rejectedPredictionTokens=q==null?void 0:q.rejected_prediction_tokens;return{content:N,finishReason:{unified:zG(W.finish_reason),raw:(H=W.finish_reason)!=null?H:void 0},usage:jG(P.usage),providerMetadata:w,request:{body:E},response:{...LG(P),headers:A,body:K},warnings:L}}async doStream(G){var Y;let{args:Z,warnings:U,metadataKey:z}=await this.getArgs({...G}),V=this.transformRequestBody({...Z,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),j=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:B,value:H}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:V,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),X=[],L={unified:"other",raw:void 0},$=void 0,J=!0,E=z,A=!1,P=!1;return{stream:H.pipeThrough(new TransformStream({start(K){K.enqueue({type:"stream-start",warnings:U})},transform(K,W){var N,x,D,w,q,I,k,n,d,e,o,GG,QG,XG,YG,ZG,$G,JG;if(G.includeRawChunks)W.enqueue({type:"raw",rawValue:K.rawValue});if(!K.success){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.error});return}if(j==null||j.processChunk(K.rawValue),"error"in K.value){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.value.error.message});return}let c=K.value;if(J)J=!1,W.enqueue({type:"response-metadata",...LG(c)});if(c.usage!=null)$=c.usage;let v=c.choices[0];if((v==null?void 0:v.finish_reason)!=null)L={unified:zG(v.finish_reason),raw:(N=v.finish_reason)!=null?N:void 0};if((v==null?void 0:v.delta)==null)return;let C=v.delta,UG=(x=C.reasoning_content)!=null?x:C.reasoning;if(UG){if(!A)W.enqueue({type:"reasoning-start",id:"reasoning-0"}),A=!0;W.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:UG})}if(C.content){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;if(!P)W.enqueue({type:"text-start",id:"txt-0"}),P=!0;W.enqueue({type:"text-delta",id:"txt-0",delta:C.content})}if(C.tool_calls!=null){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;for(let F of C.tool_calls){let i=(D=F.index)!=null?D:X.length;if(X[i]==null){if(F.id==null)throw new r({data:F,message:"Expected 'id' to be a string."});if(((w=F.function)==null?void 0:w.name)==null)throw new r({data:F,message:"Expected 'function.name' to be a string."});W.enqueue({type:"tool-input-start",id:F.id,toolName:F.function.name}),X[i]={id:F.id,type:"function",function:{name:F.function.name,arguments:(q=F.function.arguments)!=null?q:""},hasFinished:!1,thoughtSignature:(n=(k=(I=F.extra_content)==null?void 0:I.google)==null?void 0:k.thought_signature)!=null?n:void 0};let S=X[i];if(((d=S.function)==null?void 0:d.name)!=null&&((e=S.function)==null?void 0:e.arguments)!=null){if(S.function.arguments.length>0)W.enqueue({type:"tool-input-delta",id:S.id,delta:S.function.arguments});if(t(S.function.arguments))W.enqueue({type:"tool-input-end",id:S.id}),W.enqueue({type:"tool-call",toolCallId:(o=S.id)!=null?o:_(),toolName:S.function.name,input:S.function.arguments,...S.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:S.thoughtSignature}}}:{}}),S.hasFinished=!0}continue}let M=X[i];if(M.hasFinished)continue;if(((GG=F.function)==null?void 0:GG.arguments)!=null)M.function.arguments+=(XG=(QG=F.function)==null?void 0:QG.arguments)!=null?XG:"";if(W.enqueue({type:"tool-input-delta",id:M.id,delta:(YG=F.function.arguments)!=null?YG:""}),((ZG=M.function)==null?void 0:ZG.name)!=null&&(($G=M.function)==null?void 0:$G.arguments)!=null&&t(M.function.arguments))W.enqueue({type:"tool-input-end",id:M.id}),W.enqueue({type:"tool-call",toolCallId:(JG=M.id)!=null?JG:_(),toolName:M.function.name,input:M.function.arguments,...M.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:M.thoughtSignature}}}:{}}),M.hasFinished=!0}}},flush(K){var W,N,x,D,w;if(A)K.enqueue({type:"reasoning-end",id:"reasoning-0"});if(P)K.enqueue({type:"text-end",id:"txt-0"});for(let I of X.filter((k)=>!k.hasFinished))K.enqueue({type:"tool-input-end",id:I.id}),K.enqueue({type:"tool-call",toolCallId:(W=I.id)!=null?W:_(),toolName:I.function.name,input:I.function.arguments,...I.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:I.thoughtSignature}}}:{}});let q={[E]:{},...j==null?void 0:j.buildMetadata()};if(((N=$==null?void 0:$.completion_tokens_details)==null?void 0:N.accepted_prediction_tokens)!=null)q[E].acceptedPredictionTokens=(x=$==null?void 0:$.completion_tokens_details)==null?void 0:x.accepted_prediction_tokens;if(((D=$==null?void 0:$.completion_tokens_details)==null?void 0:D.rejected_prediction_tokens)!=null)q[E].rejectedPredictionTokens=(w=$==null?void 0:$.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens;K.enqueue({type:"finish",finishReason:L,usage:jG($),providerMetadata:q})}})),request:{body:V},response:{headers:B}}}},FG=Q.looseObject({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(),kG=Q.looseObject({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(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),function:Q.object({name:Q.string(),arguments:Q.string()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}),finish_reason:Q.string().nullish()})),usage:FG}),fG=Q.looseObject({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(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number().nullish(),id:Q.string().nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:FG}),OG=(G)=>Q.union([fG,G]);function BG(G){var Y,Z;if(G==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 U=(Y=G.prompt_tokens)!=null?Y:0,z=(Z=G.completion_tokens)!=null?Z:0;return{inputTokens:{total:U,noCache:U,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:z,text:z,reasoning:void 0},raw:G}}function vG({prompt:G,user:Y="user",assistant:Z="assistant"}){let U="";if(G[0].role==="system")U+=`${G[0].content}
2
+ import{Ap as f,Bp as s,Cp as O,Gp as IG,Ho as y,Mo as l,Oo as p,Qo as qG,Vo as NG,Xo as _,ap as DG,qp as t,sp as R,tp as b,up as xG}from"./chunk-ph8hn1wt.js";import{Np as AG,Op as r,Tp as PG,Vp as T}from"./chunk-ptqk1j2r.js";import{Jt as Q}from"./chunk-j9h1sp4g.js";function h(G){return G.replace(/[_-]([a-z])/g,(Y)=>Y[1].toUpperCase())}function MG(G,Y){let Z=h(G);if(Z!==G&&(Y==null?void 0:Y[Z])!=null)return Z;return G}var SG=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),m={errorSchema:SG,errorToMessage:(G)=>G.error.message};function jG(G){var Y,Z,U,z,V,j;if(G==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 B=(Y=G.prompt_tokens)!=null?Y:0,H=(Z=G.completion_tokens)!=null?Z:0,X=(z=(U=G.prompt_tokens_details)==null?void 0:U.cached_tokens)!=null?z:0,L=(j=(V=G.completion_tokens_details)==null?void 0:V.reasoning_tokens)!=null?j:0;return{inputTokens:{total:B,noCache:B-X,cacheRead:X,cacheWrite:void 0},outputTokens:{total:H,text:H-L,reasoning:L},raw:G}}function u(G){var Y,Z;return(Z=(Y=G==null?void 0:G.providerOptions)==null?void 0:Y.openaiCompatible)!=null?Z:{}}function RG(G){switch(G){case"audio/wav":return"wav";case"audio/mp3":case"audio/mpeg":return"mp3";default:return null}}function yG(G){var Y,Z,U;let z=[];for(let{role:V,content:j,...B}of G){let H=u({...B});switch(V){case"system":{z.push({role:"system",content:j,...H});break}case"user":{if(j.length===1&&j[0].type==="text"){z.push({role:"user",content:j[0].text,...u(j[0])});break}z.push({role:"user",content:j.map((X)=>{var L;let $=u(X);switch(X.type){case"text":return{type:"text",text:X.text,...$};case"file":{if(X.mediaType.startsWith("image/")){let J=X.mediaType==="image/*"?"image/jpeg":X.mediaType;return{type:"image_url",image_url:{url:X.data instanceof URL?X.data.toString():`data:${J};base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("audio/")){if(X.data instanceof URL)throw new T({functionality:"audio file parts with URLs"});let J=RG(X.mediaType);if(J===null)throw new T({functionality:`audio media type ${X.mediaType}`});return{type:"input_audio",input_audio:{data:p(X.data),format:J},...$}}if(X.mediaType==="application/pdf"){if(X.data instanceof URL)throw new T({functionality:"PDF file parts with URLs"});return{type:"file",file:{filename:(L=X.filename)!=null?L:"document.pdf",file_data:`data:application/pdf;base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("text/"))return{type:"text",text:X.data instanceof URL?X.data.toString():typeof X.data==="string"?new TextDecoder().decode(l(X.data)):new TextDecoder().decode(X.data),...$};throw new T({functionality:`file part media type ${X.mediaType}`})}}}),...H});break}case"assistant":{let X="",L="",$=[];for(let J of j){let E=u(J);switch(J.type){case"text":{X+=J.text;break}case"reasoning":{L+=J.text;break}case"tool-call":{let A=(Z=(Y=J.providerOptions)==null?void 0:Y.google)==null?void 0:Z.thoughtSignature;$.push({id:J.toolCallId,type:"function",function:{name:J.toolName,arguments:JSON.stringify(J.input)},...E,...A?{extra_content:{google:{thought_signature:String(A)}}}:{}});break}}}z.push({role:"assistant",content:X,...L.length>0?{reasoning_content:L}:{},tool_calls:$.length>0?$:void 0,...H});break}case"tool":{for(let X of j){if(X.type==="tool-approval-response")continue;let L=X.output,$;switch(L.type){case"text":case"error-text":$=L.value;break;case"execution-denied":$=(U=L.reason)!=null?U:"Tool execution denied.";break;case"content":case"json":case"error-json":$=JSON.stringify(L.value);break}let J=u(X);z.push({role:"tool",tool_call_id:X.toolCallId,content:$,...J})}break}default:throw Error(`Unsupported role: ${V}`)}}return z}function LG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function zG(G){switch(G){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 g=Q.object({user:Q.string().optional(),reasoningEffort:Q.string().optional(),textVerbosity:Q.string().optional(),strictJsonSchema:Q.boolean().optional()});function TG({tools:G,toolChoice:Y}){G=(G==null?void 0:G.length)?G:void 0;let Z=[];if(G==null)return{tools:void 0,toolChoice:void 0,toolWarnings:Z};let U=[];for(let V of G)if(V.type==="provider")Z.push({type:"unsupported",feature:`provider-defined tool ${V.id}`});else U.push({type:"function",function:{name:V.name,description:V.description,parameters:V.inputSchema,...V.strict!=null?{strict:V.strict}:{}}});if(Y==null)return{tools:U,toolChoice:void 0,toolWarnings:Z};let z=Y.type;switch(z){case"auto":case"none":case"required":return{tools:U,toolChoice:z,toolWarnings:Z};case"tool":return{tools:U,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:Z};default:throw new T({functionality:`tool choice type: ${z}`})}}var bG=class{constructor(G,Y){this.specificationVersion="v3";var Z,U;this.modelId=G,this.config=Y;let z=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=OG(z.errorSchema),this.failedResponseHandler=f(z),this.supportsStructuredOutputs=(U=Y.supportsStructuredOutputs)!=null?U:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}transformRequestBody(G){var Y,Z,U;return(U=(Z=(Y=this.config).transformRequestBody)==null?void 0:Z.call(Y,G))!=null?U:G}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,providerOptions:B,stopSequences:H,responseFormat:X,seed:L,toolChoice:$,tools:J}){var E,A,P,K,W;let N=[],x=await R({provider:"openai-compatible",providerOptions:B,schema:g});if(x!=null)N.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let D=Object.assign(x!=null?x:{},(E=await R({provider:"openaiCompatible",providerOptions:B,schema:g}))!=null?E:{},(A=await R({provider:this.providerOptionsName,providerOptions:B,schema:g}))!=null?A:{},(P=await R({provider:h(this.providerOptionsName),providerOptions:B,schema:g}))!=null?P:{}),w=(K=D==null?void 0:D.strictJsonSchema)!=null?K:!0;if(z!=null)N.push({type:"unsupported",feature:"topK"});if((X==null?void 0:X.type)==="json"&&X.schema!=null&&!this.supportsStructuredOutputs)N.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:q,toolChoice:I,toolWarnings:k}=TG({tools:J,toolChoice:$});return{metadataKey:MG(this.providerOptionsName,B),args:{model:this.modelId,user:D.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,response_format:(X==null?void 0:X.type)==="json"?this.supportsStructuredOutputs===!0&&X.schema!=null?{type:"json_schema",json_schema:{schema:X.schema,strict:w,name:(W=X.name)!=null?W:"response",description:X.description}}:{type:"json_object"}:void 0,stop:H,seed:L,...Object.fromEntries(Object.entries({...B==null?void 0:B[this.providerOptionsName],...B==null?void 0:B[h(this.providerOptionsName)]}).filter(([d])=>!Object.keys(g.shape).includes(d))),reasoning_effort:D.reasoningEffort,verbosity:D.textVerbosity,messages:yG(G),tools:q,tool_choice:I},warnings:[...N,...k]}}async doGenerate(G){var Y,Z,U,z,V,j,B,H;let{args:X,warnings:L,metadataKey:$}=await this.getArgs({...G}),J=this.transformRequestBody(X),E=JSON.stringify(J),{responseHeaders:A,value:P,rawValue:K}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:J,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(kG),abortSignal:G.abortSignal,fetch:this.config.fetch}),W=P.choices[0],N=[],x=W.message.content;if(x!=null&&x.length>0)N.push({type:"text",text:x});let D=(Y=W.message.reasoning_content)!=null?Y:W.message.reasoning;if(D!=null&&D.length>0)N.push({type:"reasoning",text:D});if(W.message.tool_calls!=null)for(let I of W.message.tool_calls){let k=(U=(Z=I.extra_content)==null?void 0:Z.google)==null?void 0:U.thought_signature;N.push({type:"tool-call",toolCallId:(z=I.id)!=null?z:_(),toolName:I.function.name,input:I.function.arguments,...k?{providerMetadata:{[$]:{thoughtSignature:k}}}:{}})}let w={[$]:{},...await((j=(V=this.config.metadataExtractor)==null?void 0:V.extractMetadata)==null?void 0:j.call(V,{parsedBody:K}))},q=(B=P.usage)==null?void 0:B.completion_tokens_details;if((q==null?void 0:q.accepted_prediction_tokens)!=null)w[$].acceptedPredictionTokens=q==null?void 0:q.accepted_prediction_tokens;if((q==null?void 0:q.rejected_prediction_tokens)!=null)w[$].rejectedPredictionTokens=q==null?void 0:q.rejected_prediction_tokens;return{content:N,finishReason:{unified:zG(W.finish_reason),raw:(H=W.finish_reason)!=null?H:void 0},usage:jG(P.usage),providerMetadata:w,request:{body:E},response:{...LG(P),headers:A,body:K},warnings:L}}async doStream(G){var Y;let{args:Z,warnings:U,metadataKey:z}=await this.getArgs({...G}),V=this.transformRequestBody({...Z,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),j=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:B,value:H}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:V,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),X=[],L={unified:"other",raw:void 0},$=void 0,J=!0,E=z,A=!1,P=!1;return{stream:H.pipeThrough(new TransformStream({start(K){K.enqueue({type:"stream-start",warnings:U})},transform(K,W){var N,x,D,w,q,I,k,n,d,e,o,GG,QG,XG,YG,ZG,$G,JG;if(G.includeRawChunks)W.enqueue({type:"raw",rawValue:K.rawValue});if(!K.success){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.error});return}if(j==null||j.processChunk(K.rawValue),"error"in K.value){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.value.error.message});return}let c=K.value;if(J)J=!1,W.enqueue({type:"response-metadata",...LG(c)});if(c.usage!=null)$=c.usage;let v=c.choices[0];if((v==null?void 0:v.finish_reason)!=null)L={unified:zG(v.finish_reason),raw:(N=v.finish_reason)!=null?N:void 0};if((v==null?void 0:v.delta)==null)return;let C=v.delta,UG=(x=C.reasoning_content)!=null?x:C.reasoning;if(UG){if(!A)W.enqueue({type:"reasoning-start",id:"reasoning-0"}),A=!0;W.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:UG})}if(C.content){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;if(!P)W.enqueue({type:"text-start",id:"txt-0"}),P=!0;W.enqueue({type:"text-delta",id:"txt-0",delta:C.content})}if(C.tool_calls!=null){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;for(let F of C.tool_calls){let i=(D=F.index)!=null?D:X.length;if(X[i]==null){if(F.id==null)throw new r({data:F,message:"Expected 'id' to be a string."});if(((w=F.function)==null?void 0:w.name)==null)throw new r({data:F,message:"Expected 'function.name' to be a string."});W.enqueue({type:"tool-input-start",id:F.id,toolName:F.function.name}),X[i]={id:F.id,type:"function",function:{name:F.function.name,arguments:(q=F.function.arguments)!=null?q:""},hasFinished:!1,thoughtSignature:(n=(k=(I=F.extra_content)==null?void 0:I.google)==null?void 0:k.thought_signature)!=null?n:void 0};let S=X[i];if(((d=S.function)==null?void 0:d.name)!=null&&((e=S.function)==null?void 0:e.arguments)!=null){if(S.function.arguments.length>0)W.enqueue({type:"tool-input-delta",id:S.id,delta:S.function.arguments});if(t(S.function.arguments))W.enqueue({type:"tool-input-end",id:S.id}),W.enqueue({type:"tool-call",toolCallId:(o=S.id)!=null?o:_(),toolName:S.function.name,input:S.function.arguments,...S.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:S.thoughtSignature}}}:{}}),S.hasFinished=!0}continue}let M=X[i];if(M.hasFinished)continue;if(((GG=F.function)==null?void 0:GG.arguments)!=null)M.function.arguments+=(XG=(QG=F.function)==null?void 0:QG.arguments)!=null?XG:"";if(W.enqueue({type:"tool-input-delta",id:M.id,delta:(YG=F.function.arguments)!=null?YG:""}),((ZG=M.function)==null?void 0:ZG.name)!=null&&(($G=M.function)==null?void 0:$G.arguments)!=null&&t(M.function.arguments))W.enqueue({type:"tool-input-end",id:M.id}),W.enqueue({type:"tool-call",toolCallId:(JG=M.id)!=null?JG:_(),toolName:M.function.name,input:M.function.arguments,...M.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:M.thoughtSignature}}}:{}}),M.hasFinished=!0}}},flush(K){var W,N,x,D,w;if(A)K.enqueue({type:"reasoning-end",id:"reasoning-0"});if(P)K.enqueue({type:"text-end",id:"txt-0"});for(let I of X.filter((k)=>!k.hasFinished))K.enqueue({type:"tool-input-end",id:I.id}),K.enqueue({type:"tool-call",toolCallId:(W=I.id)!=null?W:_(),toolName:I.function.name,input:I.function.arguments,...I.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:I.thoughtSignature}}}:{}});let q={[E]:{},...j==null?void 0:j.buildMetadata()};if(((N=$==null?void 0:$.completion_tokens_details)==null?void 0:N.accepted_prediction_tokens)!=null)q[E].acceptedPredictionTokens=(x=$==null?void 0:$.completion_tokens_details)==null?void 0:x.accepted_prediction_tokens;if(((D=$==null?void 0:$.completion_tokens_details)==null?void 0:D.rejected_prediction_tokens)!=null)q[E].rejectedPredictionTokens=(w=$==null?void 0:$.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens;K.enqueue({type:"finish",finishReason:L,usage:jG($),providerMetadata:q})}})),request:{body:V},response:{headers:B}}}},FG=Q.looseObject({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(),kG=Q.looseObject({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(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),function:Q.object({name:Q.string(),arguments:Q.string()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}),finish_reason:Q.string().nullish()})),usage:FG}),fG=Q.looseObject({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(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number().nullish(),id:Q.string().nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:FG}),OG=(G)=>Q.union([fG,G]);function BG(G){var Y,Z;if(G==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 U=(Y=G.prompt_tokens)!=null?Y:0,z=(Z=G.completion_tokens)!=null?Z:0;return{inputTokens:{total:U,noCache:U,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:z,text:z,reasoning:void 0},raw:G}}function vG({prompt:G,user:Y="user",assistant:Z="assistant"}){let U="";if(G[0].role==="system")U+=`${G[0].content}
3
3
 
4
4
  `,G=G.slice(1);for(let{role:z,content:V}of G)switch(z){case"system":throw new AG({message:"Unexpected system message in prompt: ${content}",prompt:G});case"user":{let j=V.map((B)=>{switch(B.type){case"text":return B.text}}).filter(Boolean).join("");U+=`${Y}:
5
5
  ${j}
@@ -9,4 +9,4 @@ ${j}
9
9
 
10
10
  `;break}case"tool":throw new T({functionality:"tool messages"});default:throw Error(`Unsupported role: ${z}`)}return U+=`${Z}:
11
11
  `,{prompt:U,stopSequences:[`
12
- ${Y}:`]}}function VG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function WG(G){switch(G){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 EG=Q.object({echo:Q.boolean().optional(),logitBias:Q.record(Q.string(),Q.number()).optional(),suffix:Q.string().optional(),user:Q.string().optional()}),CG=class{constructor(G,Y){this.specificationVersion="v3";var Z;this.modelId=G,this.config=Y;let U=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=uG(U.errorSchema),this.failedResponseHandler=f(U)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,stopSequences:B,responseFormat:H,seed:X,providerOptions:L,tools:$,toolChoice:J}){var E,A;let P=[],K=Object.assign((E=await R({provider:this.providerOptionsName,providerOptions:L,schema:EG}))!=null?E:{},(A=await R({provider:h(this.providerOptionsName),providerOptions:L,schema:EG}))!=null?A:{});if(z!=null)P.push({type:"unsupported",feature:"topK"});if($==null?void 0:$.length)P.push({type:"unsupported",feature:"tools"});if(J!=null)P.push({type:"unsupported",feature:"toolChoice"});if(H!=null&&H.type!=="text")P.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:W,stopSequences:N}=vG({prompt:G}),x=[...N!=null?N:[],...B!=null?B:[]];return{args:{model:this.modelId,echo:K.echo,logit_bias:K.logitBias,suffix:K.suffix,user:K.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,seed:X,...L==null?void 0:L[this.providerOptionsName],...L==null?void 0:L[h(this.providerOptionsName)],prompt:W,stop:x.length>0?x:void 0},warnings:P}}async doGenerate(G){let{args:Y,warnings:Z}=await this.getArgs(G),{responseHeaders:U,value:z,rawValue:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:Y,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(hG),abortSignal:G.abortSignal,fetch:this.config.fetch}),j=z.choices[0],B=[];if(j.text!=null&&j.text.length>0)B.push({type:"text",text:j.text});return{content:B,usage:BG(z.usage),finishReason:{unified:WG(j.finish_reason),raw:j.finish_reason},request:{body:Y},response:{...VG(z),headers:U,body:V},warnings:Z}}async doStream(G){let{args:Y,warnings:Z}=await this.getArgs(G),U={...Y,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:z,value:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:U,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),j={unified:"other",raw:void 0},B=void 0,H=!0;return{stream:V.pipeThrough(new TransformStream({start(X){X.enqueue({type:"stream-start",warnings:Z})},transform(X,L){var $;if(G.includeRawChunks)L.enqueue({type:"raw",rawValue:X.rawValue});if(!X.success){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:X.error});return}let J=X.value;if("error"in J){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:J.error});return}if(H)H=!1,L.enqueue({type:"response-metadata",...VG(J)}),L.enqueue({type:"text-start",id:"0"});if(J.usage!=null)B=J.usage;let E=J.choices[0];if((E==null?void 0:E.finish_reason)!=null)j={unified:WG(E.finish_reason),raw:($=E.finish_reason)!=null?$:void 0};if((E==null?void 0:E.text)!=null)L.enqueue({type:"text-delta",id:"0",delta:E.text})},flush(X){if(!H)X.enqueue({type:"text-end",id:"0"});X.enqueue({type:"finish",finishReason:j,usage:BG(B)})}})),request:{body:U},response:{headers:z}}}},wG=Q.object({prompt_tokens:Q.number(),completion_tokens:Q.number(),total_tokens:Q.number()}),hG=Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string()})),usage:wG.nullish()}),uG=(G)=>Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:wG.nullish()}),G]),a=Q.object({dimensions:Q.number().optional(),user:Q.string().optional()}),gG=class{constructor(G,Y){this.specificationVersion="v3",this.modelId=G,this.config=Y}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var G;return(G=this.config.maxEmbeddingsPerCall)!=null?G:2048}get supportsParallelCalls(){var G;return(G=this.config.supportsParallelCalls)!=null?G:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:G,headers:Y,abortSignal:Z,providerOptions:U}){var z,V,j;let B=[],H=await R({provider:"openai-compatible",providerOptions:U,schema:a});if(H!=null)B.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let X=Object.assign(H!=null?H:{},(z=await R({provider:"openaiCompatible",providerOptions:U,schema:a}))!=null?z:{},(V=await R({provider:this.providerOptionsName,providerOptions:U,schema:a}))!=null?V:{});if(G.length>this.maxEmbeddingsPerCall)throw new PG({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:G});let{responseHeaders:L,value:$,rawValue:J}=await b({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:y(this.config.headers(),Y),body:{model:this.modelId,input:G,encoding_format:"float",dimensions:X.dimensions,user:X.user},failedResponseHandler:f((j=this.config.errorStructure)!=null?j:m),successfulResponseHandler:O(_G),abortSignal:Z,fetch:this.config.fetch});return{warnings:B,embeddings:$.data.map((E)=>E.embedding),usage:$.usage?{tokens:$.usage.prompt_tokens}:void 0,providerMetadata:$.providerMetadata,response:{headers:L,body:J}}}},_G=Q.object({data:Q.array(Q.object({embedding:Q.array(Q.number())})),usage:Q.object({prompt_tokens:Q.number()}).nullish(),providerMetadata:Q.record(Q.string(),Q.record(Q.string(),Q.any())).optional()}),mG=class{constructor(G,Y){this.modelId=G,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=10}get provider(){return this.config.provider}get providerOptionsKey(){return this.config.provider.split(".")[0].trim()}getArgs(G){return{...G[this.providerOptionsKey],...G[h(this.providerOptionsKey)]}}async doGenerate({prompt:G,n:Y,size:Z,aspectRatio:U,seed:z,providerOptions:V,headers:j,abortSignal:B,files:H,mask:X}){var L,$,J,E,A;let P=[];if(U!=null)P.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(z!=null)P.push({type:"unsupported",feature:"seed"});let K=(J=($=(L=this.config._internal)==null?void 0:L.currentDate)==null?void 0:$.call(L))!=null?J:new Date,W=this.getArgs(V);if(H!=null&&H.length>0){let{value:D,responseHeaders:w}=await xG({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:y(this.config.headers(),j),formData:qG({model:this.modelId,prompt:G,image:await Promise.all(H.map((q)=>KG(q))),mask:X!=null?await KG(X):void 0,n:Y,size:Z,...W}),failedResponseHandler:f((E=this.config.errorStructure)!=null?E:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:D.data.map((q)=>q.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:w}}}let{value:N,responseHeaders:x}=await b({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:y(this.config.headers(),j),body:{model:this.modelId,prompt:G,n:Y,size:Z,...W,response_format:"b64_json"},failedResponseHandler:f((A=this.config.errorStructure)!=null?A:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:N.data.map((D)=>D.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:x}}}},HG=Q.object({data:Q.array(Q.object({b64_json:Q.string()}))});async function KG(G){if(G.type==="url")return NG(G.url);let Y=G.data instanceof Uint8Array?G.data:l(G.data);return new Blob([Y],{type:G.mediaType})}var dG="2.0.41";function jQ(G){let Y=IG(G.baseURL),Z=G.name,U={...G.apiKey&&{Authorization:`Bearer ${G.apiKey}`},...G.headers},z=()=>DG(U,`ai-sdk/openai-compatible/${dG}`),V=(J)=>({provider:`${Z}.${J}`,url:({path:E})=>{let A=new URL(`${Y}${E}`);if(G.queryParams)A.search=new URLSearchParams(G.queryParams).toString();return A.toString()},headers:z,fetch:G.fetch}),j=(J)=>B(J),B=(J)=>new bG(J,{...V("chat"),includeUsage:G.includeUsage,supportsStructuredOutputs:G.supportsStructuredOutputs,transformRequestBody:G.transformRequestBody,metadataExtractor:G.metadataExtractor}),H=(J)=>new CG(J,{...V("completion"),includeUsage:G.includeUsage}),X=(J)=>new gG(J,{...V("embedding")}),L=(J)=>new mG(J,V("image")),$=(J)=>j(J);return $.specificationVersion="v3",$.languageModel=j,$.chatModel=B,$.completionModel=H,$.embeddingModel=X,$.textEmbeddingModel=X,$.imageModel=L,$}export{bG as jf,CG as kf,gG as lf,mG as mf,dG as nf,jQ as of};
12
+ ${Y}:`]}}function VG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function WG(G){switch(G){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 EG=Q.object({echo:Q.boolean().optional(),logitBias:Q.record(Q.string(),Q.number()).optional(),suffix:Q.string().optional(),user:Q.string().optional()}),CG=class{constructor(G,Y){this.specificationVersion="v3";var Z;this.modelId=G,this.config=Y;let U=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=uG(U.errorSchema),this.failedResponseHandler=f(U)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,stopSequences:B,responseFormat:H,seed:X,providerOptions:L,tools:$,toolChoice:J}){var E,A;let P=[],K=Object.assign((E=await R({provider:this.providerOptionsName,providerOptions:L,schema:EG}))!=null?E:{},(A=await R({provider:h(this.providerOptionsName),providerOptions:L,schema:EG}))!=null?A:{});if(z!=null)P.push({type:"unsupported",feature:"topK"});if($==null?void 0:$.length)P.push({type:"unsupported",feature:"tools"});if(J!=null)P.push({type:"unsupported",feature:"toolChoice"});if(H!=null&&H.type!=="text")P.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:W,stopSequences:N}=vG({prompt:G}),x=[...N!=null?N:[],...B!=null?B:[]];return{args:{model:this.modelId,echo:K.echo,logit_bias:K.logitBias,suffix:K.suffix,user:K.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,seed:X,...L==null?void 0:L[this.providerOptionsName],...L==null?void 0:L[h(this.providerOptionsName)],prompt:W,stop:x.length>0?x:void 0},warnings:P}}async doGenerate(G){let{args:Y,warnings:Z}=await this.getArgs(G),{responseHeaders:U,value:z,rawValue:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:Y,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(hG),abortSignal:G.abortSignal,fetch:this.config.fetch}),j=z.choices[0],B=[];if(j.text!=null&&j.text.length>0)B.push({type:"text",text:j.text});return{content:B,usage:BG(z.usage),finishReason:{unified:WG(j.finish_reason),raw:j.finish_reason},request:{body:Y},response:{...VG(z),headers:U,body:V},warnings:Z}}async doStream(G){let{args:Y,warnings:Z}=await this.getArgs(G),U={...Y,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:z,value:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:U,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),j={unified:"other",raw:void 0},B=void 0,H=!0;return{stream:V.pipeThrough(new TransformStream({start(X){X.enqueue({type:"stream-start",warnings:Z})},transform(X,L){var $;if(G.includeRawChunks)L.enqueue({type:"raw",rawValue:X.rawValue});if(!X.success){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:X.error});return}let J=X.value;if("error"in J){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:J.error});return}if(H)H=!1,L.enqueue({type:"response-metadata",...VG(J)}),L.enqueue({type:"text-start",id:"0"});if(J.usage!=null)B=J.usage;let E=J.choices[0];if((E==null?void 0:E.finish_reason)!=null)j={unified:WG(E.finish_reason),raw:($=E.finish_reason)!=null?$:void 0};if((E==null?void 0:E.text)!=null)L.enqueue({type:"text-delta",id:"0",delta:E.text})},flush(X){if(!H)X.enqueue({type:"text-end",id:"0"});X.enqueue({type:"finish",finishReason:j,usage:BG(B)})}})),request:{body:U},response:{headers:z}}}},wG=Q.object({prompt_tokens:Q.number(),completion_tokens:Q.number(),total_tokens:Q.number()}),hG=Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string()})),usage:wG.nullish()}),uG=(G)=>Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:wG.nullish()}),G]),a=Q.object({dimensions:Q.number().optional(),user:Q.string().optional()}),gG=class{constructor(G,Y){this.specificationVersion="v3",this.modelId=G,this.config=Y}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var G;return(G=this.config.maxEmbeddingsPerCall)!=null?G:2048}get supportsParallelCalls(){var G;return(G=this.config.supportsParallelCalls)!=null?G:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:G,headers:Y,abortSignal:Z,providerOptions:U}){var z,V,j;let B=[],H=await R({provider:"openai-compatible",providerOptions:U,schema:a});if(H!=null)B.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let X=Object.assign(H!=null?H:{},(z=await R({provider:"openaiCompatible",providerOptions:U,schema:a}))!=null?z:{},(V=await R({provider:this.providerOptionsName,providerOptions:U,schema:a}))!=null?V:{});if(G.length>this.maxEmbeddingsPerCall)throw new PG({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:G});let{responseHeaders:L,value:$,rawValue:J}=await b({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:y(this.config.headers(),Y),body:{model:this.modelId,input:G,encoding_format:"float",dimensions:X.dimensions,user:X.user},failedResponseHandler:f((j=this.config.errorStructure)!=null?j:m),successfulResponseHandler:O(_G),abortSignal:Z,fetch:this.config.fetch});return{warnings:B,embeddings:$.data.map((E)=>E.embedding),usage:$.usage?{tokens:$.usage.prompt_tokens}:void 0,providerMetadata:$.providerMetadata,response:{headers:L,body:J}}}},_G=Q.object({data:Q.array(Q.object({embedding:Q.array(Q.number())})),usage:Q.object({prompt_tokens:Q.number()}).nullish(),providerMetadata:Q.record(Q.string(),Q.record(Q.string(),Q.any())).optional()}),mG=class{constructor(G,Y){this.modelId=G,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=10}get provider(){return this.config.provider}get providerOptionsKey(){return this.config.provider.split(".")[0].trim()}getArgs(G){return{...G[this.providerOptionsKey],...G[h(this.providerOptionsKey)]}}async doGenerate({prompt:G,n:Y,size:Z,aspectRatio:U,seed:z,providerOptions:V,headers:j,abortSignal:B,files:H,mask:X}){var L,$,J,E,A;let P=[];if(U!=null)P.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(z!=null)P.push({type:"unsupported",feature:"seed"});let K=(J=($=(L=this.config._internal)==null?void 0:L.currentDate)==null?void 0:$.call(L))!=null?J:new Date,W=this.getArgs(V);if(H!=null&&H.length>0){let{value:D,responseHeaders:w}=await xG({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:y(this.config.headers(),j),formData:qG({model:this.modelId,prompt:G,image:await Promise.all(H.map((q)=>KG(q))),mask:X!=null?await KG(X):void 0,n:Y,size:Z,...W}),failedResponseHandler:f((E=this.config.errorStructure)!=null?E:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:D.data.map((q)=>q.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:w}}}let{value:N,responseHeaders:x}=await b({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:y(this.config.headers(),j),body:{model:this.modelId,prompt:G,n:Y,size:Z,...W,response_format:"b64_json"},failedResponseHandler:f((A=this.config.errorStructure)!=null?A:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:N.data.map((D)=>D.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:x}}}},HG=Q.object({data:Q.array(Q.object({b64_json:Q.string()}))});async function KG(G){if(G.type==="url")return NG(G.url);let Y=G.data instanceof Uint8Array?G.data:l(G.data);return new Blob([Y],{type:G.mediaType})}var dG="2.0.41";function jQ(G){let Y=IG(G.baseURL),Z=G.name,U={...G.apiKey&&{Authorization:`Bearer ${G.apiKey}`},...G.headers},z=()=>DG(U,`ai-sdk/openai-compatible/${dG}`),V=(J)=>({provider:`${Z}.${J}`,url:({path:E})=>{let A=new URL(`${Y}${E}`);if(G.queryParams)A.search=new URLSearchParams(G.queryParams).toString();return A.toString()},headers:z,fetch:G.fetch}),j=(J)=>B(J),B=(J)=>new bG(J,{...V("chat"),includeUsage:G.includeUsage,supportsStructuredOutputs:G.supportsStructuredOutputs,transformRequestBody:G.transformRequestBody,metadataExtractor:G.metadataExtractor}),H=(J)=>new CG(J,{...V("completion"),includeUsage:G.includeUsage}),X=(J)=>new gG(J,{...V("embedding")}),L=(J)=>new mG(J,V("image")),$=(J)=>j(J);return $.specificationVersion="v3",$.languageModel=j,$.chatModel=B,$.completionModel=H,$.embeddingModel=X,$.textEmbeddingModel=X,$.imageModel=L,$}export{bG as uf,CG as vf,gG as wf,mG as xf,dG as yf,jQ as zf};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-r9w0thdk.js";var t=Object.fromEntries([]);export{t as modules};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Kq as S,Lq as Vq}from"./chunk-bgng3rdj.js";import{$C as wB,FB as N,FC as XB,HF as f,LB as T,ME as YB,PA as KB,PE as h,SD as LB,UF as MB,VE as DB,WD as jB,XD as PB,_C as NB,bD as FB,cG as ZB,nA as Xq,oA as d,pO as $B,qO as WB,rO as zB,sB as HB,tB as VB,uO as t,vB as CB,xG as AB,yB as EB}from"./chunk-ks1cs80p.js";import{KO as y}from"./chunk-qhnpq5gb.js";import{LO as K,MO as Z,PO as G}from"./chunk-f83wv08n.js";var l=Z(($q)=>{Object.defineProperty($q,"__esModule",{value:!0});$q._clearDefaultServiceNameCache=$q.defaultServiceName=void 0;var D;function hB(){if(D===void 0)try{let q=globalThis.process.argv0;D=q?`unknown_service:${q}`:"unknown_service"}catch{D="unknown_service"}return D}$q.defaultServiceName=hB;function IB(){D=void 0}$q._clearDefaultServiceNameCache=IB});var Kq=Z((zq)=>{Object.defineProperty(zq,"__esModule",{value:!0});zq.isPromiseLike=void 0;var SB=(q)=>{return q!==null&&typeof q==="object"&&typeof q.then==="function"};zq.isPromiseLike=SB});var i=Z((Cq)=>{Object.defineProperty(Cq,"__esModule",{value:!0});Cq.defaultResource=Cq.emptyResource=Cq.resourceFromDetectedResource=Cq.resourceFromAttributes=void 0;var A=y(),c=Vq(),C=S(),kB=l(),M=Kq();class U{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(q,B){let J=new U({},B);return J._rawAttributes=Hq(q),J._asyncAttributesPending=q.filter(([Q,Y])=>(0,M.isPromiseLike)(Y)).length>0,J}constructor(q,B){let J=q.attributes??{};this._rawAttributes=Object.entries(J).map(([Q,Y])=>{if((0,M.isPromiseLike)(Y))this._asyncAttributesPending=!0;return[Q,Y]}),this._rawAttributes=Hq(this._rawAttributes),this._schemaUrl=_B(B?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(!this.asyncAttributesPending)return;for(let q=0;q<this._rawAttributes.length;q++){let[B,J]=this._rawAttributes[q];this._rawAttributes[q]=[B,(0,M.isPromiseLike)(J)?await J:J]}this._asyncAttributesPending=!1}get attributes(){if(this.asyncAttributesPending)A.diag.error("Accessing resource attributes before async attributes settled");if(this._memoizedAttributes)return this._memoizedAttributes;let q={};for(let[B,J]of this._rawAttributes){if((0,M.isPromiseLike)(J)){A.diag.debug(`Unsettled resource attribute ${B} skipped`);continue}if(J!=null)q[B]??=J}if(!this._asyncAttributesPending)this._memoizedAttributes=q;return q}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(q){if(q==null)return this;let B=vB(this,q),J=B?{schemaUrl:B}:void 0;return U.FromAttributeList([...q.getRawAttributes(),...this.getRawAttributes()],J)}}function p(q,B){return U.FromAttributeList(Object.entries(q),B)}Cq.resourceFromAttributes=p;function bB(q,B){return new U(q,B)}Cq.resourceFromDetectedResource=bB;function fB(){return p({})}Cq.emptyResource=fB;function gB(){return p({[C.ATTR_SERVICE_NAME]:(0,kB.defaultServiceName)(),[C.ATTR_TELEMETRY_SDK_LANGUAGE]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_LANGUAGE],[C.ATTR_TELEMETRY_SDK_NAME]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_NAME],[C.ATTR_TELEMETRY_SDK_VERSION]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_VERSION]})}Cq.defaultResource=gB;function Hq(q){return q.map(([B,J])=>{if((0,M.isPromiseLike)(J))return[B,J.catch((Q)=>{A.diag.debug("promise rejection for resource attribute: %s - %s",B,Q);return})];return[B,J]})}function _B(q){if(typeof q==="string"||q===void 0)return q;A.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",q);return}function vB(q,B){let J=q?.schemaUrl,Q=B?.schemaUrl,Y=J===void 0||J==="",z=Q===void 0||Q==="";if(Y)return Q;if(z)return J;if(J===Q)return J;A.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',J,Q);return}});var Lq=Z((wq)=>{Object.defineProperty(wq,"__esModule",{value:!0});wq.detectResources=void 0;var Nq=y(),n=i(),uB=(q={})=>{return(q.detectors||[]).map((J)=>{try{let Q=(0,n.resourceFromDetectedResource)(J.detect(q));return Nq.diag.debug(`${J.constructor.name} found resource.`,Q),Q}catch(Q){return Nq.diag.debug(`${J.constructor.name} failed: ${Q.message}`),(0,n.emptyResource)()}}).reduce((J,Q)=>J.merge(Q),(0,n.emptyResource)())};wq.detectResources=uB});var Aq=Z((Dq)=>{Object.defineProperty(Dq,"__esModule",{value:!0});Dq.envDetector=void 0;var lB=y(),cB=S(),jq=Vq();class Pq{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";detect(q){let B={},J=(0,jq.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES"),Q=(0,jq.getStringFromEnv)("OTEL_SERVICE_NAME");if(J)try{let Y=this._parseResourceAttributes(J);Object.assign(B,Y)}catch(Y){lB.diag.debug(`EnvDetector failed: ${Y instanceof Error?Y.message:Y}`)}if(Q)B[cB.ATTR_SERVICE_NAME]=Q;return{attributes:B}}_parseResourceAttributes(q){if(!q)return{};let B={},J=q.split(this._COMMA_SEPARATOR);for(let Q of J){let Y=Q.split(this._LABEL_KEY_VALUE_SPLITTER);if(Y.length!==2)throw Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${Q}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);let[z,w]=Y,F=z.trim(),RB=w.trim();if(F.length===0)throw Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${Q}".`);let P,m;try{P=decodeURIComponent(F),m=decodeURIComponent(RB)}catch(u){throw Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${Q}": ${u instanceof Error?u.message:u}`)}if(P.length>this._MAX_LENGTH)throw Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${P}".`);if(m.length>this._MAX_LENGTH)throw Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${P}".`);B[P]=m}return B}}Dq.envDetector=new Pq});var O=Z((Uq)=>{Object.defineProperty(Uq,"__esModule",{value:!0});Uq.ATTR_WEBENGINE_VERSION=Uq.ATTR_WEBENGINE_NAME=Uq.ATTR_WEBENGINE_DESCRIPTION=Uq.ATTR_SERVICE_NAMESPACE=Uq.ATTR_SERVICE_INSTANCE_ID=Uq.ATTR_PROCESS_RUNTIME_VERSION=Uq.ATTR_PROCESS_RUNTIME_NAME=Uq.ATTR_PROCESS_RUNTIME_DESCRIPTION=Uq.ATTR_PROCESS_PID=Uq.ATTR_PROCESS_OWNER=Uq.ATTR_PROCESS_EXECUTABLE_PATH=Uq.ATTR_PROCESS_EXECUTABLE_NAME=Uq.ATTR_PROCESS_COMMAND_ARGS=Uq.ATTR_PROCESS_COMMAND=Uq.ATTR_OS_VERSION=Uq.ATTR_OS_TYPE=Uq.ATTR_K8S_POD_NAME=Uq.ATTR_K8S_NAMESPACE_NAME=Uq.ATTR_K8S_DEPLOYMENT_NAME=Uq.ATTR_K8S_CLUSTER_NAME=Uq.ATTR_HOST_TYPE=Uq.ATTR_HOST_NAME=Uq.ATTR_HOST_IMAGE_VERSION=Uq.ATTR_HOST_IMAGE_NAME=Uq.ATTR_HOST_IMAGE_ID=Uq.ATTR_HOST_ID=Uq.ATTR_HOST_ARCH=Uq.ATTR_CONTAINER_NAME=Uq.ATTR_CONTAINER_IMAGE_TAGS=Uq.ATTR_CONTAINER_IMAGE_NAME=Uq.ATTR_CONTAINER_ID=Uq.ATTR_CLOUD_REGION=Uq.ATTR_CLOUD_PROVIDER=Uq.ATTR_CLOUD_AVAILABILITY_ZONE=Uq.ATTR_CLOUD_ACCOUNT_ID=void 0;Uq.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";Uq.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";Uq.ATTR_CLOUD_PROVIDER="cloud.provider";Uq.ATTR_CLOUD_REGION="cloud.region";Uq.ATTR_CONTAINER_ID="container.id";Uq.ATTR_CONTAINER_IMAGE_NAME="container.image.name";Uq.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";Uq.ATTR_CONTAINER_NAME="container.name";Uq.ATTR_HOST_ARCH="host.arch";Uq.ATTR_HOST_ID="host.id";Uq.ATTR_HOST_IMAGE_ID="host.image.id";Uq.ATTR_HOST_IMAGE_NAME="host.image.name";Uq.ATTR_HOST_IMAGE_VERSION="host.image.version";Uq.ATTR_HOST_NAME="host.name";Uq.ATTR_HOST_TYPE="host.type";Uq.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";Uq.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";Uq.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";Uq.ATTR_K8S_POD_NAME="k8s.pod.name";Uq.ATTR_OS_TYPE="os.type";Uq.ATTR_OS_VERSION="os.version";Uq.ATTR_PROCESS_COMMAND="process.command";Uq.ATTR_PROCESS_COMMAND_ARGS="process.command_args";Uq.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";Uq.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";Uq.ATTR_PROCESS_OWNER="process.owner";Uq.ATTR_PROCESS_PID="process.pid";Uq.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";Uq.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";Uq.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";Uq.ATTR_SERVICE_INSTANCE_ID="service.instance.id";Uq.ATTR_SERVICE_NAMESPACE="service.namespace";Uq.ATTR_WEBENGINE_DESCRIPTION="webengine.description";Uq.ATTR_WEBENGINE_NAME="webengine.name";Uq.ATTR_WEBENGINE_VERSION="webengine.version"});var hq=Z((Oq)=>{Object.defineProperty(Oq,"__esModule",{value:!0});Oq.getMachineId=void 0;var UJ=G("process"),E;async function yJ(){if(!E)switch(UJ.platform){case"darwin":E=(await import("./chunk-bcx2vkv4.js").then((m)=>K(m.default))).getMachineId;break;case"linux":E=(await import("./chunk-pp9neaaz.js").then((m)=>K(m.default))).getMachineId;break;case"freebsd":E=(await import("./chunk-ve3np791.js").then((m)=>K(m.default))).getMachineId;break;case"win32":E=(await import("./chunk-4v61ysex.js").then((m)=>K(m.default))).getMachineId;break;default:E=(await import("./chunk-7ntw4rrn.js").then((m)=>K(m.default))).getMachineId;break}return E()}Oq.getMachineId=yJ});var a=Z((Iq)=>{Object.defineProperty(Iq,"__esModule",{value:!0});Iq.normalizeType=Iq.normalizeArch=void 0;var OJ=(q)=>{switch(q){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return q}};Iq.normalizeArch=OJ;var RJ=(q)=>{switch(q){case"sunos":return"solaris";case"win32":return"windows";default:return q}};Iq.normalizeType=RJ});var gq=Z((bq)=>{Object.defineProperty(bq,"__esModule",{value:!0});bq.hostDetector=void 0;var r=O(),Sq=G("os"),IJ=hq(),TJ=a();class kq{detect(q){return{attributes:{[r.ATTR_HOST_NAME]:(0,Sq.hostname)(),[r.ATTR_HOST_ARCH]:(0,TJ.normalizeArch)((0,Sq.arch)()),[r.ATTR_HOST_ID]:(0,IJ.getMachineId)()}}}}bq.hostDetector=new kq});var uq=Z((xq)=>{Object.defineProperty(xq,"__esModule",{value:!0});xq.osDetector=void 0;var _q=O(),vq=G("os"),SJ=a();class dq{detect(q){return{attributes:{[_q.ATTR_OS_TYPE]:(0,SJ.normalizeType)((0,vq.platform)()),[_q.ATTR_OS_VERSION]:(0,vq.release)()}}}}xq.osDetector=new dq});var iq=Z((cq)=>{Object.defineProperty(cq,"__esModule",{value:!0});cq.processDetector=void 0;var kJ=y(),H=O(),bJ=G("os");class lq{detect(q){let B={[H.ATTR_PROCESS_PID]:process.pid,[H.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[H.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[H.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[H.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[H.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[H.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};if(process.argv.length>1)B[H.ATTR_PROCESS_COMMAND]=process.argv[1];try{let J=bJ.userInfo();B[H.ATTR_PROCESS_OWNER]=J.username}catch(J){kJ.diag.debug(`error obtaining process owner: ${J}`)}return{attributes:B}}}cq.processDetector=new lq});var sq=Z((aq)=>{Object.defineProperty(aq,"__esModule",{value:!0});aq.serviceInstanceIdDetector=void 0;var fJ=O(),gJ=G("crypto");class nq{detect(q){return{attributes:{[fJ.ATTR_SERVICE_INSTANCE_ID]:(0,gJ.randomUUID)()}}}}aq.serviceInstanceIdDetector=new nq});var oq=Z((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.serviceInstanceIdDetector=L.processDetector=L.osDetector=L.hostDetector=void 0;var _J=gq();Object.defineProperty(L,"hostDetector",{enumerable:!0,get:function(){return _J.hostDetector}});var vJ=uq();Object.defineProperty(L,"osDetector",{enumerable:!0,get:function(){return vJ.osDetector}});var dJ=iq();Object.defineProperty(L,"processDetector",{enumerable:!0,get:function(){return dJ.processDetector}});var xJ=sq();Object.defineProperty(L,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return xJ.serviceInstanceIdDetector}})});var tq=Z((j)=>{Object.defineProperty(j,"__esModule",{value:!0});j.serviceInstanceIdDetector=j.processDetector=j.osDetector=j.hostDetector=void 0;var k=oq();Object.defineProperty(j,"hostDetector",{enumerable:!0,get:function(){return k.hostDetector}});Object.defineProperty(j,"osDetector",{enumerable:!0,get:function(){return k.osDetector}});Object.defineProperty(j,"processDetector",{enumerable:!0,get:function(){return k.processDetector}});Object.defineProperty(j,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return k.serviceInstanceIdDetector}})});var BB=Z((eq)=>{Object.defineProperty(eq,"__esModule",{value:!0});eq.noopDetector=eq.NoopDetector=void 0;class s{detect(){return{attributes:{}}}}eq.NoopDetector=s;eq.noopDetector=new s});var JB=Z((V)=>{Object.defineProperty(V,"__esModule",{value:!0});V.noopDetector=V.serviceInstanceIdDetector=V.processDetector=V.osDetector=V.hostDetector=V.envDetector=void 0;var cJ=Aq();Object.defineProperty(V,"envDetector",{enumerable:!0,get:function(){return cJ.envDetector}});var b=tq();Object.defineProperty(V,"hostDetector",{enumerable:!0,get:function(){return b.hostDetector}});Object.defineProperty(V,"osDetector",{enumerable:!0,get:function(){return b.osDetector}});Object.defineProperty(V,"processDetector",{enumerable:!0,get:function(){return b.processDetector}});Object.defineProperty(V,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return b.serviceInstanceIdDetector}});var pJ=BB();Object.defineProperty(V,"noopDetector",{enumerable:!0,get:function(){return pJ.noopDetector}})});var QB=Z((W)=>{Object.defineProperty(W,"__esModule",{value:!0});W.defaultServiceName=W.emptyResource=W.defaultResource=W.resourceFromAttributes=W.serviceInstanceIdDetector=W.processDetector=W.osDetector=W.hostDetector=W.envDetector=W.detectResources=void 0;var nJ=Lq();Object.defineProperty(W,"detectResources",{enumerable:!0,get:function(){return nJ.detectResources}});var R=JB();Object.defineProperty(W,"envDetector",{enumerable:!0,get:function(){return R.envDetector}});Object.defineProperty(W,"hostDetector",{enumerable:!0,get:function(){return R.hostDetector}});Object.defineProperty(W,"osDetector",{enumerable:!0,get:function(){return R.osDetector}});Object.defineProperty(W,"processDetector",{enumerable:!0,get:function(){return R.processDetector}});Object.defineProperty(W,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return R.serviceInstanceIdDetector}});var o=i();Object.defineProperty(W,"resourceFromAttributes",{enumerable:!0,get:function(){return o.resourceFromAttributes}});Object.defineProperty(W,"defaultResource",{enumerable:!0,get:function(){return o.defaultResource}});Object.defineProperty(W,"emptyResource",{enumerable:!0,get:function(){return o.emptyResource}});var aJ=l();Object.defineProperty(W,"defaultServiceName",{enumerable:!0,get:function(){return aJ.defaultServiceName}})});var g=K(QB(),1),$=K(S(),1);class I extends N()("@effect/opentelemetry/Resource"){}var iQ=(q)=>{let B={...q.attributes??void 0,[$.ATTR_SERVICE_NAME]:q.serviceName,[$.ATTR_TELEMETRY_SDK_NAME]:"@effect/opentelemetry",[$.ATTR_TELEMETRY_SDK_LANGUAGE]:typeof globalThis.document>"u"?$.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:$.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS};if(q.serviceVersion)B[$.ATTR_SERVICE_VERSION]=q.serviceVersion;return B},nQ=(q)=>h(I,f(function*(){let B=yield*zB(t("OTEL_SERVICE_NAME")),J=yield*t("OTEL_RESOURCE_ATTRIBUTES").pipe(WB(""),$B((Q)=>{let Y=Q.split(",");return XB(Y,{},(z,w)=>{let F=w.split("=");if(F.length!==2)return z;return z[F[0].trim()]=F[1].trim(),z})}));if(B._tag==="Some")J[$.ATTR_SERVICE_NAME]=B.value;if(q)Object.assign(J,q);return g.resourceFromAttributes(J)}).pipe(ZB)),aQ=YB(I,g.emptyResource());var X=K(y(),1),x=K(S(),1);var GB=BigInt(1e9),_=(q)=>{return[Number(q/GB),Number(q%GB)]},v=(q)=>{let B={};for(let[J,Q]of Object.entries(q))B[J]=e(Q);return B},e=(q)=>{if(typeof q==="string"||typeof q==="number"||typeof q==="boolean")return q;else if(typeof q==="bigint")return q.toString();return KB(q)};class Yq extends N()("@effect/opentelemetry/Tracer"){}class UB extends N()("@effect/opentelemetry/Tracer/OtelTracerProvider"){}class Bq extends N()("@effect/opentelemetry/Tracer/OtelTraceFlags"){}class Jq extends N()("@effect/opentelemetry/Tracer/OtelTraceState"){}var eJ=MB(AB(Yq),(q)=>NB({span(B){return new Zq(X.context,X.trace,q,B)},context(B,J){let Q=J.currentSpan;if(Q===void 0)return B["~effect/Effect/evaluate"](J);return X.context.with(OB(X.context.active(),Q),()=>B["~effect/Effect/evaluate"](J))}}));var qQ=h(Yq,f(function*(){let q=yield*I;return(yield*UB).getTracer(q.attributes[x.ATTR_SERVICE_NAME],q.attributes[x.ATTR_SERVICE_VERSION])}));var BQ=h(FB,eJ),VX=BQ.pipe(DB(qQ));var qq="~@effect/opentelemetry/Tracer/OtelSpan",JQ={internal:X.SpanKind.INTERNAL,client:X.SpanKind.CLIENT,server:X.SpanKind.SERVER,producer:X.SpanKind.PRODUCER,consumer:X.SpanKind.CONSUMER};class Zq{[qq];_tag="Span";name;kind;annotations;links;span;spanId;traceId;attributes=new Map;sampled;parent;status;constructor(q,B,J,Q){this[qq]=qq,this.name=Q.name,this.annotations=Q.annotations,this.links=Q.links,this.kind=Q.kind;let Y=q.active();this.parent=Q.root!==!0?EB(Q.parent,()=>XQ(B,Y,Q.annotations)):Q.parent,this.span=J.startSpan(Q.name,{startTime:_(Q.startTime),links:Q.links.length>0?Q.links.map((w)=>({context:Qq(w.span),attributes:v(w.attributes)})):void 0,kind:JQ[this.kind]},CB(this.parent)?OB(Y,this.parent.value,Q.annotations):X.trace.deleteSpan(Y));let z=this.span.spanContext();this.spanId=z.spanId,this.traceId=z.traceId,this.status={_tag:"Started",startTime:Q.startTime},this.sampled=QQ(z.traceFlags)}attribute(q,B){this.span.setAttribute(q,e(B)),this.attributes.set(q,B)}addLinks(q){this.links.push(...q),this.span.addLinks(q.map((B)=>({context:Qq(B.span),attributes:v(B.attributes)})))}end(q,B){let J=_(q);if(this.status={_tag:"Ended",endTime:q,exit:B,startTime:this.status.startTime},B._tag==="Success")this.span.setStatus({code:X.SpanStatusCode.OK});else if(LB(B.cause))this.span.setStatus({code:X.SpanStatusCode.OK,message:PB(B.cause)}),this.span.setAttribute("span.label","\u26A0\uFE0E Interrupted"),this.span.setAttribute("status.interrupted",!0);else{let Q=jB(B.cause);if(Q.length>0){for(let Y of Q)this.span.recordException(Y,J);this.span.setStatus({code:X.SpanStatusCode.ERROR,message:Q[0].message})}else this.span.setStatus({code:X.SpanStatusCode.OK})}this.span.end(J)}event(q,B,J){this.span.addEvent(q,J?v(J):void 0,_(B))}}var QQ=(q)=>(q&X.TraceFlags.SAMPLED)===X.TraceFlags.SAMPLED,XQ=(q,B,J)=>{let Q=q.getSpan(B)?.spanContext();if(!Q)return HB();return VB(wB({spanId:Q.spanId,traceId:Q.traceId,sampled:(Q.traceFlags&1)===1,annotations:J}))},Qq=(q,B)=>{let J=YQ(q,B),Q=ZQ(q,B);return{spanId:q.spanId,traceId:q.traceId,isRemote:q._tag==="ExternalSpan",traceFlags:J,traceState:Q}},YQ=(q,B)=>{let J;if(d(B)){if(J=yB(q,B,Bq),Xq(J))J=T(q.annotations,Bq)}return J??X.TraceFlags.SAMPLED},ZQ=(q,B)=>{let J;if(d(B)){if(J=yB(q,B,Jq),Xq(J))J=T(q.annotations,Jq)}return J},yB=(q,B,J)=>{let Q=T(B,J);if(d(Q))return Q;return T(q.annotations,J)},OB=(q,B,J)=>B instanceof Zq?X.trace.setSpan(q,B.span):X.trace.setSpanContext(q,Qq(B,J));
3
- export{QB as Aq,_ as Bq,e as Cq,I as Dq,iQ as Eq,nQ as Fq,aQ as Gq,Yq as Hq,UB as Iq,VX as Jq};
2
+ import{tq as S,uq as Vq}from"./chunk-fhqfqd5v.js";import{$A as HB,BF as MB,CE as DB,DD as jB,ED as PB,HC as NB,IC as wB,KC as FB,LF as ZB,Wz as Xq,Xz as d,YN as $B,ZN as WB,_N as zB,aB as VB,bO as t,cB as CB,eG as AB,fB as EB,mB as N,mC as XB,oF as f,sB as T,tE as YB,wA as KB,wE as h,zD as LB}from"./chunk-qnvsqnz5.js";import{rO as y}from"./chunk-j8fcfhr2.js";import{sO as K,tO as Z,wO as G}from"./chunk-r9w0thdk.js";var l=Z(($q)=>{Object.defineProperty($q,"__esModule",{value:!0});$q._clearDefaultServiceNameCache=$q.defaultServiceName=void 0;var D;function hB(){if(D===void 0)try{let q=globalThis.process.argv0;D=q?`unknown_service:${q}`:"unknown_service"}catch{D="unknown_service"}return D}$q.defaultServiceName=hB;function IB(){D=void 0}$q._clearDefaultServiceNameCache=IB});var Kq=Z((zq)=>{Object.defineProperty(zq,"__esModule",{value:!0});zq.isPromiseLike=void 0;var SB=(q)=>{return q!==null&&typeof q==="object"&&typeof q.then==="function"};zq.isPromiseLike=SB});var i=Z((Cq)=>{Object.defineProperty(Cq,"__esModule",{value:!0});Cq.defaultResource=Cq.emptyResource=Cq.resourceFromDetectedResource=Cq.resourceFromAttributes=void 0;var A=y(),c=Vq(),C=S(),kB=l(),M=Kq();class U{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(q,B){let J=new U({},B);return J._rawAttributes=Hq(q),J._asyncAttributesPending=q.filter(([Q,Y])=>(0,M.isPromiseLike)(Y)).length>0,J}constructor(q,B){let J=q.attributes??{};this._rawAttributes=Object.entries(J).map(([Q,Y])=>{if((0,M.isPromiseLike)(Y))this._asyncAttributesPending=!0;return[Q,Y]}),this._rawAttributes=Hq(this._rawAttributes),this._schemaUrl=_B(B?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(!this.asyncAttributesPending)return;for(let q=0;q<this._rawAttributes.length;q++){let[B,J]=this._rawAttributes[q];this._rawAttributes[q]=[B,(0,M.isPromiseLike)(J)?await J:J]}this._asyncAttributesPending=!1}get attributes(){if(this.asyncAttributesPending)A.diag.error("Accessing resource attributes before async attributes settled");if(this._memoizedAttributes)return this._memoizedAttributes;let q={};for(let[B,J]of this._rawAttributes){if((0,M.isPromiseLike)(J)){A.diag.debug(`Unsettled resource attribute ${B} skipped`);continue}if(J!=null)q[B]??=J}if(!this._asyncAttributesPending)this._memoizedAttributes=q;return q}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(q){if(q==null)return this;let B=vB(this,q),J=B?{schemaUrl:B}:void 0;return U.FromAttributeList([...q.getRawAttributes(),...this.getRawAttributes()],J)}}function p(q,B){return U.FromAttributeList(Object.entries(q),B)}Cq.resourceFromAttributes=p;function bB(q,B){return new U(q,B)}Cq.resourceFromDetectedResource=bB;function fB(){return p({})}Cq.emptyResource=fB;function gB(){return p({[C.ATTR_SERVICE_NAME]:(0,kB.defaultServiceName)(),[C.ATTR_TELEMETRY_SDK_LANGUAGE]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_LANGUAGE],[C.ATTR_TELEMETRY_SDK_NAME]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_NAME],[C.ATTR_TELEMETRY_SDK_VERSION]:c.SDK_INFO[C.ATTR_TELEMETRY_SDK_VERSION]})}Cq.defaultResource=gB;function Hq(q){return q.map(([B,J])=>{if((0,M.isPromiseLike)(J))return[B,J.catch((Q)=>{A.diag.debug("promise rejection for resource attribute: %s - %s",B,Q);return})];return[B,J]})}function _B(q){if(typeof q==="string"||q===void 0)return q;A.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",q);return}function vB(q,B){let J=q?.schemaUrl,Q=B?.schemaUrl,Y=J===void 0||J==="",z=Q===void 0||Q==="";if(Y)return Q;if(z)return J;if(J===Q)return J;A.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',J,Q);return}});var Lq=Z((wq)=>{Object.defineProperty(wq,"__esModule",{value:!0});wq.detectResources=void 0;var Nq=y(),n=i(),uB=(q={})=>{return(q.detectors||[]).map((J)=>{try{let Q=(0,n.resourceFromDetectedResource)(J.detect(q));return Nq.diag.debug(`${J.constructor.name} found resource.`,Q),Q}catch(Q){return Nq.diag.debug(`${J.constructor.name} failed: ${Q.message}`),(0,n.emptyResource)()}}).reduce((J,Q)=>J.merge(Q),(0,n.emptyResource)())};wq.detectResources=uB});var Aq=Z((Dq)=>{Object.defineProperty(Dq,"__esModule",{value:!0});Dq.envDetector=void 0;var lB=y(),cB=S(),jq=Vq();class Pq{_MAX_LENGTH=255;_COMMA_SEPARATOR=",";_LABEL_KEY_VALUE_SPLITTER="=";detect(q){let B={},J=(0,jq.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES"),Q=(0,jq.getStringFromEnv)("OTEL_SERVICE_NAME");if(J)try{let Y=this._parseResourceAttributes(J);Object.assign(B,Y)}catch(Y){lB.diag.debug(`EnvDetector failed: ${Y instanceof Error?Y.message:Y}`)}if(Q)B[cB.ATTR_SERVICE_NAME]=Q;return{attributes:B}}_parseResourceAttributes(q){if(!q)return{};let B={},J=q.split(this._COMMA_SEPARATOR);for(let Q of J){let Y=Q.split(this._LABEL_KEY_VALUE_SPLITTER);if(Y.length!==2)throw Error(`Invalid format for OTEL_RESOURCE_ATTRIBUTES: "${Q}". Expected format: key=value. The ',' and '=' characters must be percent-encoded in keys and values.`);let[z,w]=Y,F=z.trim(),RB=w.trim();if(F.length===0)throw Error(`Invalid OTEL_RESOURCE_ATTRIBUTES: empty attribute key in "${Q}".`);let P,m;try{P=decodeURIComponent(F),m=decodeURIComponent(RB)}catch(u){throw Error(`Failed to percent-decode OTEL_RESOURCE_ATTRIBUTES entry "${Q}": ${u instanceof Error?u.message:u}`)}if(P.length>this._MAX_LENGTH)throw Error(`Attribute key exceeds the maximum length of ${this._MAX_LENGTH} characters: "${P}".`);if(m.length>this._MAX_LENGTH)throw Error(`Attribute value exceeds the maximum length of ${this._MAX_LENGTH} characters for key "${P}".`);B[P]=m}return B}}Dq.envDetector=new Pq});var O=Z((Uq)=>{Object.defineProperty(Uq,"__esModule",{value:!0});Uq.ATTR_WEBENGINE_VERSION=Uq.ATTR_WEBENGINE_NAME=Uq.ATTR_WEBENGINE_DESCRIPTION=Uq.ATTR_SERVICE_NAMESPACE=Uq.ATTR_SERVICE_INSTANCE_ID=Uq.ATTR_PROCESS_RUNTIME_VERSION=Uq.ATTR_PROCESS_RUNTIME_NAME=Uq.ATTR_PROCESS_RUNTIME_DESCRIPTION=Uq.ATTR_PROCESS_PID=Uq.ATTR_PROCESS_OWNER=Uq.ATTR_PROCESS_EXECUTABLE_PATH=Uq.ATTR_PROCESS_EXECUTABLE_NAME=Uq.ATTR_PROCESS_COMMAND_ARGS=Uq.ATTR_PROCESS_COMMAND=Uq.ATTR_OS_VERSION=Uq.ATTR_OS_TYPE=Uq.ATTR_K8S_POD_NAME=Uq.ATTR_K8S_NAMESPACE_NAME=Uq.ATTR_K8S_DEPLOYMENT_NAME=Uq.ATTR_K8S_CLUSTER_NAME=Uq.ATTR_HOST_TYPE=Uq.ATTR_HOST_NAME=Uq.ATTR_HOST_IMAGE_VERSION=Uq.ATTR_HOST_IMAGE_NAME=Uq.ATTR_HOST_IMAGE_ID=Uq.ATTR_HOST_ID=Uq.ATTR_HOST_ARCH=Uq.ATTR_CONTAINER_NAME=Uq.ATTR_CONTAINER_IMAGE_TAGS=Uq.ATTR_CONTAINER_IMAGE_NAME=Uq.ATTR_CONTAINER_ID=Uq.ATTR_CLOUD_REGION=Uq.ATTR_CLOUD_PROVIDER=Uq.ATTR_CLOUD_AVAILABILITY_ZONE=Uq.ATTR_CLOUD_ACCOUNT_ID=void 0;Uq.ATTR_CLOUD_ACCOUNT_ID="cloud.account.id";Uq.ATTR_CLOUD_AVAILABILITY_ZONE="cloud.availability_zone";Uq.ATTR_CLOUD_PROVIDER="cloud.provider";Uq.ATTR_CLOUD_REGION="cloud.region";Uq.ATTR_CONTAINER_ID="container.id";Uq.ATTR_CONTAINER_IMAGE_NAME="container.image.name";Uq.ATTR_CONTAINER_IMAGE_TAGS="container.image.tags";Uq.ATTR_CONTAINER_NAME="container.name";Uq.ATTR_HOST_ARCH="host.arch";Uq.ATTR_HOST_ID="host.id";Uq.ATTR_HOST_IMAGE_ID="host.image.id";Uq.ATTR_HOST_IMAGE_NAME="host.image.name";Uq.ATTR_HOST_IMAGE_VERSION="host.image.version";Uq.ATTR_HOST_NAME="host.name";Uq.ATTR_HOST_TYPE="host.type";Uq.ATTR_K8S_CLUSTER_NAME="k8s.cluster.name";Uq.ATTR_K8S_DEPLOYMENT_NAME="k8s.deployment.name";Uq.ATTR_K8S_NAMESPACE_NAME="k8s.namespace.name";Uq.ATTR_K8S_POD_NAME="k8s.pod.name";Uq.ATTR_OS_TYPE="os.type";Uq.ATTR_OS_VERSION="os.version";Uq.ATTR_PROCESS_COMMAND="process.command";Uq.ATTR_PROCESS_COMMAND_ARGS="process.command_args";Uq.ATTR_PROCESS_EXECUTABLE_NAME="process.executable.name";Uq.ATTR_PROCESS_EXECUTABLE_PATH="process.executable.path";Uq.ATTR_PROCESS_OWNER="process.owner";Uq.ATTR_PROCESS_PID="process.pid";Uq.ATTR_PROCESS_RUNTIME_DESCRIPTION="process.runtime.description";Uq.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name";Uq.ATTR_PROCESS_RUNTIME_VERSION="process.runtime.version";Uq.ATTR_SERVICE_INSTANCE_ID="service.instance.id";Uq.ATTR_SERVICE_NAMESPACE="service.namespace";Uq.ATTR_WEBENGINE_DESCRIPTION="webengine.description";Uq.ATTR_WEBENGINE_NAME="webengine.name";Uq.ATTR_WEBENGINE_VERSION="webengine.version"});var hq=Z((Oq)=>{Object.defineProperty(Oq,"__esModule",{value:!0});Oq.getMachineId=void 0;var UJ=G("process"),E;async function yJ(){if(!E)switch(UJ.platform){case"darwin":E=(await import("./chunk-qp1n7kwe.js").then((m)=>K(m.default))).getMachineId;break;case"linux":E=(await import("./chunk-jww55nk9.js").then((m)=>K(m.default))).getMachineId;break;case"freebsd":E=(await import("./chunk-tg226j37.js").then((m)=>K(m.default))).getMachineId;break;case"win32":E=(await import("./chunk-m5dm7a1t.js").then((m)=>K(m.default))).getMachineId;break;default:E=(await import("./chunk-6ar91jvd.js").then((m)=>K(m.default))).getMachineId;break}return E()}Oq.getMachineId=yJ});var a=Z((Iq)=>{Object.defineProperty(Iq,"__esModule",{value:!0});Iq.normalizeType=Iq.normalizeArch=void 0;var OJ=(q)=>{switch(q){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return q}};Iq.normalizeArch=OJ;var RJ=(q)=>{switch(q){case"sunos":return"solaris";case"win32":return"windows";default:return q}};Iq.normalizeType=RJ});var gq=Z((bq)=>{Object.defineProperty(bq,"__esModule",{value:!0});bq.hostDetector=void 0;var r=O(),Sq=G("os"),IJ=hq(),TJ=a();class kq{detect(q){return{attributes:{[r.ATTR_HOST_NAME]:(0,Sq.hostname)(),[r.ATTR_HOST_ARCH]:(0,TJ.normalizeArch)((0,Sq.arch)()),[r.ATTR_HOST_ID]:(0,IJ.getMachineId)()}}}}bq.hostDetector=new kq});var uq=Z((xq)=>{Object.defineProperty(xq,"__esModule",{value:!0});xq.osDetector=void 0;var _q=O(),vq=G("os"),SJ=a();class dq{detect(q){return{attributes:{[_q.ATTR_OS_TYPE]:(0,SJ.normalizeType)((0,vq.platform)()),[_q.ATTR_OS_VERSION]:(0,vq.release)()}}}}xq.osDetector=new dq});var iq=Z((cq)=>{Object.defineProperty(cq,"__esModule",{value:!0});cq.processDetector=void 0;var kJ=y(),H=O(),bJ=G("os");class lq{detect(q){let B={[H.ATTR_PROCESS_PID]:process.pid,[H.ATTR_PROCESS_EXECUTABLE_NAME]:process.title,[H.ATTR_PROCESS_EXECUTABLE_PATH]:process.execPath,[H.ATTR_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[H.ATTR_PROCESS_RUNTIME_VERSION]:process.versions.node,[H.ATTR_PROCESS_RUNTIME_NAME]:"nodejs",[H.ATTR_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};if(process.argv.length>1)B[H.ATTR_PROCESS_COMMAND]=process.argv[1];try{let J=bJ.userInfo();B[H.ATTR_PROCESS_OWNER]=J.username}catch(J){kJ.diag.debug(`error obtaining process owner: ${J}`)}return{attributes:B}}}cq.processDetector=new lq});var sq=Z((aq)=>{Object.defineProperty(aq,"__esModule",{value:!0});aq.serviceInstanceIdDetector=void 0;var fJ=O(),gJ=G("crypto");class nq{detect(q){return{attributes:{[fJ.ATTR_SERVICE_INSTANCE_ID]:(0,gJ.randomUUID)()}}}}aq.serviceInstanceIdDetector=new nq});var oq=Z((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.serviceInstanceIdDetector=L.processDetector=L.osDetector=L.hostDetector=void 0;var _J=gq();Object.defineProperty(L,"hostDetector",{enumerable:!0,get:function(){return _J.hostDetector}});var vJ=uq();Object.defineProperty(L,"osDetector",{enumerable:!0,get:function(){return vJ.osDetector}});var dJ=iq();Object.defineProperty(L,"processDetector",{enumerable:!0,get:function(){return dJ.processDetector}});var xJ=sq();Object.defineProperty(L,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return xJ.serviceInstanceIdDetector}})});var tq=Z((j)=>{Object.defineProperty(j,"__esModule",{value:!0});j.serviceInstanceIdDetector=j.processDetector=j.osDetector=j.hostDetector=void 0;var k=oq();Object.defineProperty(j,"hostDetector",{enumerable:!0,get:function(){return k.hostDetector}});Object.defineProperty(j,"osDetector",{enumerable:!0,get:function(){return k.osDetector}});Object.defineProperty(j,"processDetector",{enumerable:!0,get:function(){return k.processDetector}});Object.defineProperty(j,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return k.serviceInstanceIdDetector}})});var BB=Z((eq)=>{Object.defineProperty(eq,"__esModule",{value:!0});eq.noopDetector=eq.NoopDetector=void 0;class s{detect(){return{attributes:{}}}}eq.NoopDetector=s;eq.noopDetector=new s});var JB=Z((V)=>{Object.defineProperty(V,"__esModule",{value:!0});V.noopDetector=V.serviceInstanceIdDetector=V.processDetector=V.osDetector=V.hostDetector=V.envDetector=void 0;var cJ=Aq();Object.defineProperty(V,"envDetector",{enumerable:!0,get:function(){return cJ.envDetector}});var b=tq();Object.defineProperty(V,"hostDetector",{enumerable:!0,get:function(){return b.hostDetector}});Object.defineProperty(V,"osDetector",{enumerable:!0,get:function(){return b.osDetector}});Object.defineProperty(V,"processDetector",{enumerable:!0,get:function(){return b.processDetector}});Object.defineProperty(V,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return b.serviceInstanceIdDetector}});var pJ=BB();Object.defineProperty(V,"noopDetector",{enumerable:!0,get:function(){return pJ.noopDetector}})});var QB=Z((W)=>{Object.defineProperty(W,"__esModule",{value:!0});W.defaultServiceName=W.emptyResource=W.defaultResource=W.resourceFromAttributes=W.serviceInstanceIdDetector=W.processDetector=W.osDetector=W.hostDetector=W.envDetector=W.detectResources=void 0;var nJ=Lq();Object.defineProperty(W,"detectResources",{enumerable:!0,get:function(){return nJ.detectResources}});var R=JB();Object.defineProperty(W,"envDetector",{enumerable:!0,get:function(){return R.envDetector}});Object.defineProperty(W,"hostDetector",{enumerable:!0,get:function(){return R.hostDetector}});Object.defineProperty(W,"osDetector",{enumerable:!0,get:function(){return R.osDetector}});Object.defineProperty(W,"processDetector",{enumerable:!0,get:function(){return R.processDetector}});Object.defineProperty(W,"serviceInstanceIdDetector",{enumerable:!0,get:function(){return R.serviceInstanceIdDetector}});var o=i();Object.defineProperty(W,"resourceFromAttributes",{enumerable:!0,get:function(){return o.resourceFromAttributes}});Object.defineProperty(W,"defaultResource",{enumerable:!0,get:function(){return o.defaultResource}});Object.defineProperty(W,"emptyResource",{enumerable:!0,get:function(){return o.emptyResource}});var aJ=l();Object.defineProperty(W,"defaultServiceName",{enumerable:!0,get:function(){return aJ.defaultServiceName}})});var g=K(QB(),1),$=K(S(),1);class I extends N()("@effect/opentelemetry/Resource"){}var iQ=(q)=>{let B={...q.attributes??void 0,[$.ATTR_SERVICE_NAME]:q.serviceName,[$.ATTR_TELEMETRY_SDK_NAME]:"@effect/opentelemetry",[$.ATTR_TELEMETRY_SDK_LANGUAGE]:typeof globalThis.document>"u"?$.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:$.TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS};if(q.serviceVersion)B[$.ATTR_SERVICE_VERSION]=q.serviceVersion;return B},nQ=(q)=>h(I,f(function*(){let B=yield*zB(t("OTEL_SERVICE_NAME")),J=yield*t("OTEL_RESOURCE_ATTRIBUTES").pipe(WB(""),$B((Q)=>{let Y=Q.split(",");return XB(Y,{},(z,w)=>{let F=w.split("=");if(F.length!==2)return z;return z[F[0].trim()]=F[1].trim(),z})}));if(B._tag==="Some")J[$.ATTR_SERVICE_NAME]=B.value;if(q)Object.assign(J,q);return g.resourceFromAttributes(J)}).pipe(ZB)),aQ=YB(I,g.emptyResource());var X=K(y(),1),x=K(S(),1);var GB=BigInt(1e9),_=(q)=>{return[Number(q/GB),Number(q%GB)]},v=(q)=>{let B={};for(let[J,Q]of Object.entries(q))B[J]=e(Q);return B},e=(q)=>{if(typeof q==="string"||typeof q==="number"||typeof q==="boolean")return q;else if(typeof q==="bigint")return q.toString();return KB(q)};class Yq extends N()("@effect/opentelemetry/Tracer"){}class UB extends N()("@effect/opentelemetry/Tracer/OtelTracerProvider"){}class Bq extends N()("@effect/opentelemetry/Tracer/OtelTraceFlags"){}class Jq extends N()("@effect/opentelemetry/Tracer/OtelTraceState"){}var eJ=MB(AB(Yq),(q)=>NB({span(B){return new Zq(X.context,X.trace,q,B)},context(B,J){let Q=J.currentSpan;if(Q===void 0)return B["~effect/Effect/evaluate"](J);return X.context.with(OB(X.context.active(),Q),()=>B["~effect/Effect/evaluate"](J))}}));var qQ=h(Yq,f(function*(){let q=yield*I;return(yield*UB).getTracer(q.attributes[x.ATTR_SERVICE_NAME],q.attributes[x.ATTR_SERVICE_VERSION])}));var BQ=h(FB,eJ),VX=BQ.pipe(DB(qQ));var qq="~@effect/opentelemetry/Tracer/OtelSpan",JQ={internal:X.SpanKind.INTERNAL,client:X.SpanKind.CLIENT,server:X.SpanKind.SERVER,producer:X.SpanKind.PRODUCER,consumer:X.SpanKind.CONSUMER};class Zq{[qq];_tag="Span";name;kind;annotations;links;span;spanId;traceId;attributes=new Map;sampled;parent;status;constructor(q,B,J,Q){this[qq]=qq,this.name=Q.name,this.annotations=Q.annotations,this.links=Q.links,this.kind=Q.kind;let Y=q.active();this.parent=Q.root!==!0?EB(Q.parent,()=>XQ(B,Y,Q.annotations)):Q.parent,this.span=J.startSpan(Q.name,{startTime:_(Q.startTime),links:Q.links.length>0?Q.links.map((w)=>({context:Qq(w.span),attributes:v(w.attributes)})):void 0,kind:JQ[this.kind]},CB(this.parent)?OB(Y,this.parent.value,Q.annotations):X.trace.deleteSpan(Y));let z=this.span.spanContext();this.spanId=z.spanId,this.traceId=z.traceId,this.status={_tag:"Started",startTime:Q.startTime},this.sampled=QQ(z.traceFlags)}attribute(q,B){this.span.setAttribute(q,e(B)),this.attributes.set(q,B)}addLinks(q){this.links.push(...q),this.span.addLinks(q.map((B)=>({context:Qq(B.span),attributes:v(B.attributes)})))}end(q,B){let J=_(q);if(this.status={_tag:"Ended",endTime:q,exit:B,startTime:this.status.startTime},B._tag==="Success")this.span.setStatus({code:X.SpanStatusCode.OK});else if(LB(B.cause))this.span.setStatus({code:X.SpanStatusCode.OK,message:PB(B.cause)}),this.span.setAttribute("span.label","\u26A0\uFE0E Interrupted"),this.span.setAttribute("status.interrupted",!0);else{let Q=jB(B.cause);if(Q.length>0){for(let Y of Q)this.span.recordException(Y,J);this.span.setStatus({code:X.SpanStatusCode.ERROR,message:Q[0].message})}else this.span.setStatus({code:X.SpanStatusCode.OK})}this.span.end(J)}event(q,B,J){this.span.addEvent(q,J?v(J):void 0,_(B))}}var QQ=(q)=>(q&X.TraceFlags.SAMPLED)===X.TraceFlags.SAMPLED,XQ=(q,B,J)=>{let Q=q.getSpan(B)?.spanContext();if(!Q)return HB();return VB(wB({spanId:Q.spanId,traceId:Q.traceId,sampled:(Q.traceFlags&1)===1,annotations:J}))},Qq=(q,B)=>{let J=YQ(q,B),Q=ZQ(q,B);return{spanId:q.spanId,traceId:q.traceId,isRemote:q._tag==="ExternalSpan",traceFlags:J,traceState:Q}},YQ=(q,B)=>{let J;if(d(B)){if(J=yB(q,B,Bq),Xq(J))J=T(q.annotations,Bq)}return J??X.TraceFlags.SAMPLED},ZQ=(q,B)=>{let J;if(d(B)){if(J=yB(q,B,Jq),Xq(J))J=T(q.annotations,Jq)}return J},yB=(q,B,J)=>{let Q=T(B,J);if(d(Q))return Q;return T(q.annotations,J)},OB=(q,B,J)=>B instanceof Zq?X.trace.setSpan(q,B.span):X.trace.setSpanContext(q,Qq(B,J));
3
+ export{QB as jq,_ as kq,e as lq,I as mq,iQ as nq,nQ as oq,aQ as pq,Yq as qq,UB as rq,VX as sq};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{De as F}from"./chunk-vqss3e48.js";import{Pe as z,Se as B,hf as D}from"./chunk-6j339s7a.js";import{hq as x}from"./chunk-4mvg7jt1.js";import"./chunk-cqtkxwd8.js";import"./chunk-wf4x5cjc.js";import{au as q}from"./chunk-9ea1n338.js";import"./chunk-ngvp6zc2.js";import"./chunk-f83wv08n.js";var N="2.0.41",P=q.object({message:q.string(),type:q.string(),param:q.string(),code:q.string()}),Q={errorSchema:P,errorToMessage:(k)=>k.message};function T(k={}){var y;let G=D((y=k.baseURL)!=null?y:"https://api.cerebras.ai/v1"),J=()=>z({Authorization:`Bearer ${B({apiKey:k.apiKey,environmentVariableName:"CEREBRAS_API_KEY",description:"Cerebras API key"})}`,...k.headers},`ai-sdk/cerebras/${N}`),w=(j)=>{return new F(j,{provider:"cerebras.chat",url:({path:K})=>`${G}${K}`,headers:J,fetch:k.fetch,errorStructure:Q,supportsStructuredOutputs:!0})},f=(j)=>w(j);return f.specificationVersion="v3",f.languageModel=w,f.chat=w,f.embeddingModel=(j)=>{throw new x({modelId:j,modelType:"embeddingModel"})},f.textEmbeddingModel=f.embeddingModel,f.imageModel=(j)=>{throw new x({modelId:j,modelType:"imageModel"})},f}var Z=T();export{T as createCerebras,Z as cerebras,N as VERSION};
2
+ import{Oe as F}from"./chunk-t0761rhq.js";import{_e as z,bf as B,sf as D}from"./chunk-7mppvhv9.js";import{Sp as x}from"./chunk-ptqk1j2r.js";import"./chunk-cqtkxwd8.js";import"./chunk-pr7z5dj8.js";import{Jt as q}from"./chunk-j9h1sp4g.js";import"./chunk-p6crzjtf.js";import"./chunk-r9w0thdk.js";var N="2.0.41",P=q.object({message:q.string(),type:q.string(),param:q.string(),code:q.string()}),Q={errorSchema:P,errorToMessage:(k)=>k.message};function T(k={}){var y;let G=D((y=k.baseURL)!=null?y:"https://api.cerebras.ai/v1"),J=()=>z({Authorization:`Bearer ${B({apiKey:k.apiKey,environmentVariableName:"CEREBRAS_API_KEY",description:"Cerebras API key"})}`,...k.headers},`ai-sdk/cerebras/${N}`),w=(j)=>{return new F(j,{provider:"cerebras.chat",url:({path:K})=>`${G}${K}`,headers:J,fetch:k.fetch,errorStructure:Q,supportsStructuredOutputs:!0})},f=(j)=>w(j);return f.specificationVersion="v3",f.languageModel=w,f.chat=w,f.embeddingModel=(j)=>{throw new x({modelId:j,modelType:"embeddingModel"})},f.textEmbeddingModel=f.embeddingModel,f.imageModel=(j)=>{throw new x({modelId:j,modelType:"imageModel"})},f}var Z=T();export{T as createCerebras,Z as cerebras,N as VERSION};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-f83wv08n.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-r9w0thdk.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};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var f={"language.en":"English","language.zh":"\u7B80\u4F53\u4E2D\u6587","language.zht":"\u7E41\u9AD4\u4E2D\u6587","language.ko":"\uD55C\uAD6D\uC5B4","language.de":"Deutsch","language.es":"Espa\xF1ol","language.fr":"Fran\xE7ais","language.da":"Dansk","language.ja":"\u65E5\u672C\u8A9E","language.pl":"Polski","language.ru":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","language.ar":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","language.no":"Norsk","language.br":"Portugu\xEAs (Brasil)","language.pt":"Portugu\xEAs","language.bs":"Bosanski","language.th":"\u0E44\u0E17\u0E22","language.tr":"T\xFCrk\xE7e","tui.prompt.placeholder.normal":"Type your message... (type / for commands)","tui.prompt.placeholder.shell":'Run a command... "{{example}}"',"tui.prompt.ghost":"{{prediction}} (Tab to accept)","tui.home.placeholder.example.todo":"Fix a TODO in the codebase","tui.home.placeholder.example.stack":"What is the tech stack of this project?","tui.home.placeholder.example.tests":"Fix broken tests","tui.home.agreement.prefix":"By using QitQode, you agree to our ","tui.home.agreement.terms":"Terms of Service","tui.home.agreement.separator":" and ","tui.home.agreement.privacy":"Privacy Policy","tui.home.agreement.suffix":"","tui.prompt.hint.attach_file":"attach file","tui.prompt.hint.subagent":"subagent","tui.prompt.hint.commands":"commands","tui.prompt.hint.switch_mode":"mode","tui.prompt.hint.settings":"settings","tui.tips.label":"Tip","tui.tips.plain_terminal":"QitQode looks best in iTerm2 or VS Code's integrated terminal","tui.tips.attach_file":"Hit {highlight}@{/highlight} and start typing to fuzzy-find and attach a file to your prompt","tui.tips.shell_prefix":"Prefix any message with {highlight}!{/highlight} to run it as a shell command \u2014 try {highlight}!git log{/highlight}","tui.tips.tab_agent":"{highlight}Tab{/highlight} and {highlight}Shift+Tab{/highlight} step through your Build, Plan, and Compose agents","tui.tips.theme_mode":"Switch between dark and light themes with {highlight}/dark{/highlight} or {highlight}/light{/highlight}","tui.tips.doc":"Pull up the full documentation anytime with {highlight}/doc{/highlight}","tui.tips.undo":"{highlight}/undo{/highlight} rolls back both the last message and any files it touched","tui.tips.redo":"Changed your mind? {highlight}/redo{/highlight} brings back what you just undid","tui.tips.drag_drop":"Drop images or PDFs straight into the terminal window to add them as context","tui.tips.paste_image":"Got something in your clipboard? {highlight}Ctrl+V{/highlight} pastes images directly into the prompt","tui.tips.editor":"Long prompt? Hit {highlight}Ctrl+X E{/highlight} or {highlight}/editor{/highlight} to write it in your editor of choice","tui.tips.init":"Let {highlight}/init{/highlight} read your project and generate a tailored rules file automatically","tui.tips.models":"Swap between Default, Fast, Economy, and Power with {highlight}/models{/highlight} or {highlight}Ctrl+X M{/highlight}","tui.tips.theme":`Lock your theme mode against your terminal's background \u2014 open the command palette ({highlight}Ctrl+P{/highlight}) and search for "lock"`,"tui.tips.new_session":"Start a clean slate with {highlight}Ctrl+X N{/highlight} or just type {highlight}/new{/highlight}","tui.tips.sessions":"Pick up where you left off \u2014 {highlight}/sessions{/highlight} or {highlight}Ctrl+X L{/highlight} lists all your past conversations","tui.tips.compact":"Running low on context? {highlight}/compact{/highlight} condenses the session into a concise summary","tui.tips.export":"Save any conversation as a Markdown file with {highlight}Ctrl+X X{/highlight} or {highlight}/export{/highlight}","tui.tips.copy_last":"{highlight}Ctrl+X Y{/highlight} copies QitQode's last response straight to your clipboard","tui.tips.command_palette":"Everything in one place \u2014 hit {highlight}Ctrl+P{/highlight} to open the full command palette","tui.tips.leader":"{highlight}Ctrl+X{/highlight} is your shortcut prefix \u2014 pair it with another key to trigger quick actions","tui.tips.f2":"Tap {highlight}F2{/highlight} to jump between your recently used models without opening the picker","tui.tips.sidebar":"Toggle the sidebar on or off with {highlight}Ctrl+X B{/highlight}","tui.tips.history":"Scroll through the conversation with {highlight}PageUp{/highlight} and {highlight}PageDown{/highlight}","tui.tips.jump_first":"Jump straight to the top of any conversation with {highlight}Ctrl+G{/highlight} or {highlight}Home{/highlight}","tui.tips.jump_last":"Skip to the latest message instantly with {highlight}Ctrl+Alt+G{/highlight} or {highlight}End{/highlight}","tui.tips.newline":"Need a line break in your prompt? {highlight}Shift+Enter{/highlight} or {highlight}Ctrl+J{/highlight} does it","tui.tips.clear_input":"Typed something you don't want? {highlight}Ctrl+C{/highlight} wipes the input field clean","tui.tips.escape":"Hit {highlight}Escape{/highlight} to interrupt QitQode and stop it mid-response","tui.tips.plan_agent":"The {highlight}Plan{/highlight} agent thinks through problems and proposes changes without touching any files","tui.tips.subagent":"Mention {highlight}@agent-name{/highlight} in your prompt to hand off to a specialized subagent","tui.tips.cycle_sessions":"Navigate between parent and child sessions with {highlight}Ctrl+X Right{/highlight} and {highlight}Ctrl+X Left{/highlight}","tui.tips.config_files":"{highlight}qitqode.json{/highlight} controls server behavior; {highlight}tui.json{/highlight} controls the terminal interface","tui.tips.global_config":"Your global TUI preferences live at {highlight}~/.config/qitqode/tui.json{/highlight}","tui.tips.schema":"Drop {highlight}$schema{/highlight} into your config file to unlock editor autocomplete","tui.tips.default_model":"Set the {highlight}model{/highlight} key in your config to lock in a preferred tier","tui.tips.keybinds":"Every keybind is overridable \u2014 drop it in the {highlight}keybinds{/highlight} section of {highlight}tui.json{/highlight}","tui.tips.disable_keybind":"Assign {highlight}none{/highlight} to any keybind to remove it entirely","tui.tips.mcp_config":"Wire up local or remote MCP servers through the {highlight}mcp{/highlight} section of your config","tui.tips.mcp_oauth":"Remote MCP servers that require OAuth? QitQode manages the auth flow for you","tui.tips.custom_command":"Save reusable prompts as {highlight}.md{/highlight} files in {highlight}.qitqode/command/{/highlight}","tui.tips.command_args":"Make commands dynamic with {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, and {highlight}$2{/highlight} placeholders","tui.tips.command_backticks":"Inject live shell output into any command using backticks \u2014 e.g. {highlight}`git diff`{/highlight}","tui.tips.custom_agent":"Drop a {highlight}.md{/highlight} file into {highlight}.qitqode/agent/{/highlight} to create a custom AI persona","tui.tips.agent_perms":"Each agent can have its own {highlight}edit{/highlight}, {highlight}bash{/highlight}, and {highlight}webfetch{/highlight} permission set","tui.tips.bash_allow":'Grant specific bash commands automatically \u2014 e.g. {highlight}"git *": "allow"{/highlight}',"tui.tips.bash_deny":'Block dangerous patterns outright \u2014 e.g. {highlight}"rm -rf *": "deny"{/highlight}',"tui.tips.bash_ask":'Require confirmation before certain commands run \u2014 e.g. {highlight}"git push": "ask"{/highlight}',"tui.tips.formatter":"QitQode runs prettier, gofmt, ruff, and other formatters on your files automatically","tui.tips.disable_formatter":'Turn off automatic formatting globally with {highlight}"formatter": false{/highlight} in your config',"tui.tips.custom_formatter":"Map any file extension to a custom formatter command in your config","tui.tips.lsp":"QitQode plugs into your LSP servers for deep, language-aware code understanding","tui.tips.custom_tool":"Give QitQode new capabilities by adding {highlight}.ts{/highlight} tool files to {highlight}.qitqode/tools/{/highlight}","tui.tips.tool_scripts":"Custom tools can shell out to scripts in any language \u2014 Python, Go, Bash, whatever","tui.tips.plugins":"Hook into QitQode's event lifecycle by adding {highlight}.ts{/highlight} files to {highlight}.qitqode/plugin/{/highlight}","tui.tips.plugin_notify":"Write a plugin to fire a desktop notification whenever a session finishes","tui.tips.plugin_protect":"A plugin can intercept file reads and block access to sensitive paths","tui.tips.run":"{highlight}qitqode run{/highlight} lets you drive QitQode from scripts without opening the TUI","tui.tips.continue":"Jump back into your last session from the CLI with {highlight}qitqode --continue{/highlight}","tui.tips.attach_cli":"Pass files into a non-interactive session with {highlight}qitqode run -f yourfile.ts{/highlight}","tui.tips.format_json":"Add {highlight}--format json{/highlight} to get structured output you can pipe into other tools","tui.tips.auth_list":"{highlight}qitqode auth status{/highlight} shows your current Forgewise sign-in status","tui.tips.agent_create":"Walk through building a new agent step by step with {highlight}qitqode agent create{/highlight}","tui.tips.theme_system":`Set {highlight}"theme": "system"{/highlight} to automatically follow your terminal's color scheme`,"tui.tips.theme_files":"Store custom JSON themes in {highlight}.qitqode/themes/{/highlight} to keep them project-local","tui.tips.theme_variants":"A single theme file can define both dark and light variants","tui.tips.theme_ansi":"Custom themes can reference any of the 256 ANSI terminal colors by number","tui.tips.env_var":"Pull in environment variables anywhere in your config with {highlight}{env:VAR_NAME}{/highlight}","tui.tips.file_var":"Embed the contents of any file into a config value using {highlight}{file:path}{/highlight}","tui.tips.instructions":"Point {highlight}instructions{/highlight} in your config to extra rules files to extend the agent's behavior","tui.tips.temperature":"Tune the agent's {highlight}temperature{/highlight} \u2014 lower for precision, higher for open-ended creativity","tui.tips.steps":"Cap how far the agent runs autonomously by setting a {highlight}steps{/highlight} limit in config","tui.tips.disable_tool":'Disable individual tools by setting them to {highlight}false{/highlight} under {highlight}"tools"{/highlight} in config',"tui.tips.disable_mcp_tools":`Silence an entire MCP server's toolset with {highlight}"mcp_*": false{/highlight}`,"tui.tips.tool_override":"Each agent config can override the global tool settings independently","tui.tips.doom_loop":"The {highlight}doom_loop{/highlight} permission guard stops the agent from getting stuck in runaway loops","tui.tips.external_dir":"{highlight}external_directory{/highlight} permission keeps the agent from modifying files outside your project","tui.tips.debug_config":"Something misconfigured? {highlight}qitqode debug config{/highlight} prints the resolved config for inspection","tui.tips.print_logs":"Pipe {highlight}--print-logs{/highlight} output to stderr for a full trace of what QitQode is doing","tui.tips.timeline":"Navigate directly to any message in the session with {highlight}Ctrl+X G{/highlight} or {highlight}/timeline{/highlight}","tui.tips.toggle_code":"Show or hide code blocks in the conversation with {highlight}Ctrl+X H{/highlight}","tui.tips.status":"Check what's running under the hood with {highlight}Ctrl+X S{/highlight} or {highlight}/status{/highlight}","tui.tips.scroll_accel":"Turn on {highlight}scroll_acceleration{/highlight} in {highlight}tui.json{/highlight} for fluid, physics-based scrolling","tui.tips.agents_md":"Share your project's AI rules with the whole team by committing {highlight}AGENTS.md{/highlight} to Git","tui.tips.review":"Ask QitQode to review your staged diff, branch, or open PR with {highlight}/review{/highlight}","tui.tips.help":"Lost? {highlight}/help{/highlight} or {highlight}Ctrl+X H{/highlight} surfaces the full keybind reference","tui.tips.rename":"Give your current session a proper name with {highlight}/rename{/highlight}","tui.tips.suspend.unix":"Need your shell back? {highlight}Ctrl+Z{/highlight} suspends QitQode and drops you back to the terminal","tui.tips.suspend.win":"Hit {highlight}Ctrl+Z{/highlight} to undo your last typed change in the prompt","tui.command.palette.title":"Commands","tui.command.palette.suggested":"Suggested","tui.command.category.session":"Session","tui.command.category.agent":"Agent","tui.command.category.provider":"Provider","tui.command.category.system":"System","tui.command.category.prompt":"Prompt","tui.command.category.internal":"Internal","tui.command.category.external":"External","tui.slash.init.description":"guided AGENTS.md setup","tui.slash.review.description":"review changes [commit|branch|pr], defaults to uncommitted","tui.slash.dream.description":"manually consolidate project memory from memory files and raw trajectory","tui.slash.distill.description":"find repeated workflows in recent work and package them into skills, subagents, or commands","tui.slash.goal.description":"set a stop-condition goal; runs until a judge says it's met. /goal clear to abort","tui.slash.deep-research.description":"deep multi-source, fact-checked research report (runs the deep-research workflow)","tui.command.language.switch.title":"Switch language","tui.command.language.switch.description":"Change the display language","tui.command.language.dialog.title":"Switch language","tui.language.auto":"Auto (system)","tui.language.current":"Current","tui.command.session.list.title":"Switch session","tui.command.session.new.title":"New session","tui.command.workflow.list.title":"Workflows","tui.command.model.list.title":"Switch model","tui.command.model.set_tier.title":"Switch to {{tier}}","tui.toast.model_tier_switched":"Switched to {{tier}}","tui.command.model.cycle_recent.title":"Model cycle","tui.command.model.cycle_recent_reverse.title":"Model cycle reverse","tui.command.model.cycle_favorite.title":"Favorite cycle","tui.command.model.cycle_favorite_reverse.title":"Favorite cycle reverse","tui.command.agent.list.title":"Switch agent","tui.command.mcp.list.title":"Toggle MCPs","tui.command.never_ask.title_on":"Never-ask: ON (auto-decide, permissions excluded) \u2014 click to turn off","tui.command.never_ask.title_off":"Never-ask: OFF \u2014 click to turn on (auto-decide, permissions excluded)","tui.command.never_ask.toast_on":"Never-ask ON \u2014 I won't prompt you; I'll pick the best option myself until you turn it off (/never-ask). Permission requests still need your approval.","tui.command.never_ask.toast_off":"Never-ask OFF \u2014 I'll ask you at decision points again.","tui.command.never_ask.title_on_fullauto":"Never-ask: ON (auto-decide; full-auto is also approving permissions) \u2014 click to turn off","tui.command.never_ask.title_off_fullauto":"Never-ask: OFF \u2014 click to turn on (auto-decide; full-auto is still approving permissions)","tui.command.never_ask.toast_on_fullauto":"Never-ask ON \u2014 I won't prompt you; I'll pick the best option myself until you turn it off (/never-ask). Full-auto is on, so tool permissions are being approved automatically too.","tui.command.agent.cycle.title":"Agent cycle","tui.command.variant.cycle.title":"Variant cycle","tui.command.variant.list.title":"Switch model variant","tui.command.agent.cycle.reverse.title":"Agent cycle reverse","tui.command.provider.login.title":"Login","tui.command.provider.logout.title":"Logout","tui.command.console.org.switch.title":"Switch org","tui.command.qitqode.status.title":"View status","tui.command.worktree.list.title":"Worktrees","tui.command.theme.switch.title":"Switch theme","tui.command.theme.switch_mode.to_light":"Switch to light mode","tui.command.theme.switch_mode.to_dark":"Switch to dark mode","tui.command.theme.mode.unlock":"Unlock theme mode","tui.command.theme.mode.lock":"Lock theme mode","tui.command.help.show.title":"Help","tui.dialog.help.close_hint":"esc/enter/space","tui.dialog.help.accessibility":"Accessibility: toggle animations and sound from the command list. Env vars: NO_COLOR, QITQODE_TUI_ACCESSIBLE, QITQODE_REDUCE_MOTION, QITQODE_TUI_SOUND.","tui.dialog.help.announcements":"Announcements: in accessible mode, choose how chatty screen-reader announcements are (quiet, normal, verbose) from the command list or with QITQODE_TUI_ANNOUNCEMENTS. Errors are always announced.","tui.dialog.help.dialog_keys":"Dialogs: every dialog works with the keyboard alone \u2014 Esc closes, Tab or arrow keys move focus, Enter or Space activates the focused control.","tui.command.app.announcements.cycle":"Announcements: {{level}} (select to change)","tui.announcements.level.quiet":"quiet","tui.announcements.level.normal":"normal","tui.announcements.level.verbose":"verbose","tui.app.terminal_too_small":"Terminal too small ({{width}}x{{height}}). Resize to at least 40x8.","tui.dialog.help.command_list":"Press {{keybind}} to see all available actions and commands in any context.","tui.dialog.help.ok":"ok","tui.dialog.close_hint":"esc","tui.dialog.document.scroll_hint":"\u2191/\u2193 scroll \xB7 PgUp/PgDn page \xB7 esc close","tui.dialog.ok":"ok","tui.dialog.confirm.cancel":"Cancel","tui.dialog.confirm.confirm":"Confirm","tui.dialog.agreement.title":"Terms & Privacy","tui.dialog.agreement.message":"Please review and agree to continue.","tui.dialog.agreement.confirm":"Agree & Continue","tui.command.docs.terms.title":"View Terms of Service","tui.command.docs.privacy.title":"View Privacy Policy","tui.command.consent.revoke.title":"Revoke free-model agreement","tui.consent.revoked":"Free-model agreement revoked \u2014 you'll be asked to agree again","tui.dialog.select.placeholder":"Search","tui.dialog.select.no_results":"No results found","tui.dialog.prompt.placeholder":"Enter text","tui.dialog.prompt.busy":"Working...","tui.dialog.prompt.processing":"processing...","tui.dialog.prompt.submit_key":"enter","tui.dialog.prompt.submit_action":"submit","tui.dialog.export.title":"Export Options","tui.dialog.export.filename":"Filename:","tui.dialog.export.filename_placeholder":"Enter filename","tui.dialog.export.include_thinking":"Include thinking","tui.dialog.export.include_tool_details":"Include tool details","tui.dialog.export.include_assistant_metadata":"Include assistant metadata","tui.dialog.export.open_without_saving":"Open without saving","tui.dialog.export.hint.toggle_prefix":"Press","tui.dialog.export.hint.toggle_action":"to toggle","tui.dialog.export.hint.confirm_action":"to confirm","tui.dialog.export.hint.options_action":"for options","tui.toast.copied_to_clipboard":"Copied to clipboard","tui.toast.instructions_loaded":"Loaded {{files}}","tui.toast.update_available.title":"Update Available","tui.toast.update_available.confirm":"A new release v{{version}} is available. Would you like to update now?","tui.toast.update_available.updating":"Updating to v{{version}}...","tui.toast.update_available.failed":"Update failed","tui.toast.update_available.success":"Successfully updated to QitQode v{{version}}. Please restart the application.","tui.toast.updated.title":"Auto-updated","tui.toast.updated.message":"Patch update applied: v{{version}}. Restart to use the new version. Disable via autoupdate: false in config.","tui.sidebar.instructions":"Instructions","tui.sidebar.cwd":"Working Directory","tui.toast.unknown_error":"An unknown error has occurred","tui.command.docs.open.title":"Open docs","tui.command.app.exit.title":"Exit the app","tui.command.app.debug.title":"Toggle debug panel","tui.command.app.console.title":"Toggle console","tui.command.app.heap_snapshot.title":"Write heap snapshot","tui.command.terminal.suspend.title":"Suspend terminal","tui.command.terminal.title.disable":"Disable terminal title","tui.command.terminal.title.enable":"Enable terminal title","tui.command.app.toggle.animations.disable":"Disable animations","tui.command.app.toggle.animations.enable":"Enable animations","tui.command.app.toggle.diffwrap.disable":"Disable diff wrapping","tui.command.app.toggle.diffwrap.enable":"Enable diff wrapping","tui.command.app.toggle.sound.disable":"Disable sound","tui.command.app.toggle.sound.enable":"Enable sound","tui.command.logout.toast":"Logged out","tui.command.session.share.title":"Share session","tui.command.session.share.copy_link":"Copy share link","tui.command.session.rename.title":"Rename session","tui.command.session.timeline.title":"Jump to message","tui.command.session.fork.title":"Fork session","tui.command.session.compact.title":"Compact session","tui.command.session.unshare.title":"Unshare session","tui.command.session.undo.title":"Undo previous message","tui.command.session.redo.title":"Redo","tui.command.session.sidebar.show":"Show sidebar","tui.command.session.sidebar.hide":"Hide sidebar","tui.command.session.conceal.disable":"Disable code concealment","tui.command.session.conceal.enable":"Enable code concealment","tui.command.session.timestamps.show":"Show timestamps","tui.command.session.timestamps.hide":"Hide timestamps","tui.command.session.thinking.expand":"Expand thinking","tui.command.session.thinking.collapse":"Collapse thinking","tui.command.session.tool_details.show":"Show tool details","tui.command.session.tool_details.hide":"Hide tool details","tui.command.session.scrollbar.toggle":"Toggle session scrollbar","tui.command.session.generic_tool_output.show":"Show generic tool output","tui.command.session.generic_tool_output.hide":"Hide generic tool output","tui.command.session.page_up.title":"Page up","tui.command.session.page_down.title":"Page down","tui.command.session.line_up.title":"Line up","tui.command.session.line_down.title":"Line down","tui.command.session.half_page_up.title":"Half page up","tui.command.session.half_page_down.title":"Half page down","tui.command.session.first.title":"First message","tui.command.session.last.title":"Last message","tui.command.session.last_user.title":"Jump to last user message","tui.command.session.message_next.title":"Next message","tui.command.session.message_previous.title":"Previous message","tui.command.messages.copy.title":"Copy last assistant message","tui.command.session.copy.title":"Copy session transcript","tui.command.session.export.title":"Export session transcript","tui.command.session.child_first.title":"Go to child session","tui.command.session.parent.title":"Go to parent session","tui.command.session.main.title":"Back to the main conversation","tui.command.session.child_next.title":"Next child session","tui.command.session.child_previous.title":"Previous child session","tui.command.prompt.clear.title":"Clear prompt","tui.command.prompt.submit.title":"Submit prompt","tui.command.prompt.paste.title":"Paste","tui.command.session.interrupt.title":"Interrupt session","tui.command.prompt.editor.title":"Open editor","tui.command.prompt.skills.title":"Skills","tui.command.voice.toggle.title":"Toggle voice input","tui.command.voice.toggle.title_on":"Voice input: ON \u2014 click to turn off","tui.command.voice.toggle.title_off":"Voice input: OFF \u2014 click to turn on","tui.command.voice.send.title":"Toggle voice send command","tui.command.voice.send.title_on":"Voice send: ON \u2014 click to turn off","tui.command.voice.send.title_off":"Voice send: OFF \u2014 click to turn on","tui.voice.enabled":"Voice input on (Chinese/English) \u2014 click [Voice] to record","tui.voice.disabled":"Voice input disabled","tui.voice.send.enabled":'Voice send enabled \u2014 after a pause, clearly say "send it" to submit',"tui.voice.send.disabled":"Voice send disabled","tui.voice.control.enabled":"Voice control enabled \u2014 using multimodal model for intelligent editing (slower)","tui.voice.control.disabled":"Voice control disabled \u2014 using fast ASR transcription","tui.command.voice.control.title":"Toggle voice control (multimodal)","tui.command.voice.control.title_on":"Voice control: ON (multimodal) \u2014 click to turn off","tui.command.voice.control.title_off":"Voice control: OFF (fast ASR) \u2014 click to turn on","tui.voice.error.no_auth":"Use /connect to sign in to QitQode, or configure voice.asr_model for another provider","tui.voice.error.no_auth_provider":'Voice provider "{{provider}}" is not authenticated, check its apiKey',"tui.voice.error.provider_not_found":'Provider "{{provider}}" not available \u2014 /connect to authenticate, or declare models in config for custom endpoints',"tui.voice.error.no_url":'Provider "{{provider}}" has no baseURL configured \u2014 set options.baseURL in the provider config',"tui.voice.error.no_device":"No microphone/audio device found \u2014 please check your system audio settings","tui.voice.error.recorder_failed":"Recording failed","tui.voice.error.no_recorder":"No recording tool found, please install sox","tui.voice.error.too_short":"Recording too short","tui.voice.error.network":"Transcription failed, please check your network","tui.voice.error.empty_send":"Nothing to send","tui.voice.error.unknown_agent":'Agent "{{name}}" not found',"tui.command.prompt.stash.title":"Stash prompt","tui.command.prompt.stash.pop.title":"Stash pop","tui.command.prompt.stash.list.title":"Stash list","tui.command.tips.toggle.show":"Show tips","tui.command.tips.toggle.hide":"Hide tips","tui.command.plugins.list.title":"Plugins","tui.command.plugins.install.title":"Install plugin","tui.dialog.login.title":"QitQode Sign In","cli.providers.select":"Select provider","cli.providers.other":"Other provider","tui.dialog.login.forgewise":"Sign in with Forgewise","tui.dialog.login.import_claude":"Import from Claude Code","tui.dialog.login.other":"Other Provider","tui.dialog.login.import_claude.no_key":"Claude Code API Key not found","tui.dialog.login.import_claude.read_failed":"Failed to read ~/.claude/settings.json","tui.dialog.login.import_claude.success":"Imported from Claude Code","tui.question.plan_enter.question":"Would you like to switch to plan mode for structured planning?","tui.question.plan_enter.header":"Plan","tui.question.plan_enter.option.0.label":"Yes","tui.question.plan_enter.option.0.description":"Switch to plan agent for read-only planning","tui.question.plan_enter.option.1.label":"No","tui.question.plan_enter.option.1.description":"Stay in current mode","tui.question.plan_exit.question":"Plan at {{plan}} is complete. Would you like to switch to the build agent and start implementing?","tui.question.plan_exit.header":"Plan","tui.question.plan_exit.option.0.label":"Yes","tui.question.plan_exit.option.0.description":"Switch to build agent and start implementing the plan","tui.question.plan_exit.option.1.label":"No","tui.question.plan_exit.option.1.description":"Stay with plan agent to continue refining the plan","tui.session.badge.auto":"Auto","tui.session.subagent.label":"Subagent","tui.session.subagent.child_label":"Child session","tui.session.subagent.back":"\u2190 Back to main","tui.session.subagent.previous":"Prev","tui.session.subagent.next":"Next","tui.session.subagent.prompt_badge":"Prompt \u2192 main","tui.session.subagent.prompt_hint":"what you type below goes to the main conversation","tui.session.subagent.legend_back":"back","tui.session.subagent.legend_cycle":"cycle","trust.title":"Accessing workspace:","trust.safety_check":"Quick safety check: Is this a project you created or one you trust? (Like your own code, a well-known open source project, or work from your team). If not, take a moment to review what's in this folder first.","trust.capabilities":"QitQode will be able to read, edit, and execute files here.","trust.plugin_warn":"If malicious plugins exist in this directory, they can execute arbitrary code, read, modify, or exfiltrate your files.","trust.option.yes":"Yes, I trust this folder","trust.option.no":"No, exit","trust.dangerous.title_home":"WARNING: You are about to open your HOME DIRECTORY.","trust.dangerous.title_root":"WARNING: You are about to open the FILESYSTEM ROOT.","trust.dangerous.body_home":"The model will have access to ALL your personal files \u2014 SSH keys, credentials, browser profiles, and everything else under your home folder.","trust.dangerous.body_root":"The model will have access to the ENTIRE filesystem \u2014 system files, all user data, credentials, and everything on this machine.","trust.dangerous.advice_home":"Unless you have a very specific reason, DO NOT trust your entire home directory.","trust.dangerous.advice_root":"Unless you have a very specific reason, DO NOT trust the filesystem root.","trust.dangerous.option.yes":"I understand the risks, trust for this session","trust.dangerous.option.no":"Exit (recommended)"};
3
- export{f as Ad};
3
+ export{f as Ld};