@qitqode/qitqode-android-arm64 0.2.11 → 0.2.14

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 (410) hide show
  1. package/bundle/{chunk-p5p4jh9s.js → chunk-00ft63qn.js} +1 -1
  2. package/bundle/chunk-00r3he5x.js +2 -0
  3. package/bundle/{chunk-bh1zbz62.js → chunk-02tmc2st.js} +1 -1
  4. package/bundle/{chunk-k8zbhj2p.js → chunk-05bkxat0.js} +2 -2
  5. package/bundle/{chunk-wspbjh74.js → chunk-06tgmvh6.js} +2 -2
  6. package/bundle/{chunk-s3hbwksw.js → chunk-07b4pkk6.js} +1 -1
  7. package/bundle/{chunk-fzxqn4j0.js → chunk-0ejx0yqx.js} +1 -1
  8. package/bundle/chunk-0ks20gz1.js +2 -0
  9. package/bundle/{chunk-wdy0fsp8.js → chunk-0m4gvjcv.js} +2 -2
  10. package/bundle/{chunk-jf4zyy7r.js → chunk-0mztgsxp.js} +1 -1
  11. package/bundle/{chunk-075gkea2.js → chunk-10kj86va.js} +1 -1
  12. package/bundle/{chunk-y8tx9x5b.js → chunk-10q04xh5.js} +1 -1
  13. package/bundle/{chunk-pdcj2rfz.js → chunk-175720ws.js} +2 -2
  14. package/bundle/{chunk-r1936yb5.js → chunk-19rs84t8.js} +1 -1
  15. package/bundle/{chunk-bwzbcwff.js → chunk-1a08ffyd.js} +1 -1
  16. package/bundle/{chunk-vbcekkw2.js → chunk-1bq15kf0.js} +2 -2
  17. package/bundle/{chunk-rvev3cy6.js → chunk-1e75j4m1.js} +2 -2
  18. package/bundle/{chunk-n4fwztya.js → chunk-1gdt9q05.js} +1 -1
  19. package/bundle/{chunk-wp0xd7at.js → chunk-1mfdmm2t.js} +1 -1
  20. package/bundle/{chunk-eya9c81t.js → chunk-1pft3sar.js} +1 -1
  21. package/bundle/chunk-1r7anzk5.js +2 -0
  22. package/bundle/{chunk-zr1cvkpb.js → chunk-1ypzf18e.js} +1 -1
  23. package/bundle/chunk-26e51217.js +2 -0
  24. package/bundle/{chunk-tyk97q7c.js → chunk-2ascwm7j.js} +1 -1
  25. package/bundle/{chunk-jfe9f2wv.js → chunk-2d61z24r.js} +1 -1
  26. package/bundle/chunk-2g4kxtz0.js +2 -0
  27. package/bundle/chunk-2jzay8a9.js +2 -0
  28. package/bundle/{chunk-fqvsxg00.js → chunk-2k2szpze.js} +1 -1
  29. package/bundle/chunk-2q78bdtj.js +2 -0
  30. package/bundle/{chunk-c53ev0da.js → chunk-2w3n0q9m.js} +2 -2
  31. package/bundle/{chunk-seda5sfd.js → chunk-2w79k0mh.js} +2 -2
  32. package/bundle/chunk-30rghawe.js +2 -0
  33. package/bundle/{chunk-j7d3v0x2.js → chunk-3152y1q9.js} +1 -1
  34. package/bundle/chunk-31a47ptm.js +10 -0
  35. package/bundle/chunk-33mzqyyb.js +3 -0
  36. package/bundle/chunk-34yk99ep.js +2 -0
  37. package/bundle/{chunk-xf1y0sc6.js → chunk-358wdvj7.js} +2 -2
  38. package/bundle/{chunk-zr89enb8.js → chunk-3c73rngn.js} +1 -1
  39. package/bundle/{chunk-h8yf5e2e.js → chunk-3cs1qf8x.js} +1 -1
  40. package/bundle/chunk-3dajnr1w.js +2 -0
  41. package/bundle/chunk-3ege6krg.js +2 -0
  42. package/bundle/chunk-43vpxggb.js +2 -0
  43. package/bundle/{chunk-5qydhr42.js → chunk-47jkx37s.js} +3 -3
  44. package/bundle/{chunk-wqkvsj5y.js → chunk-48rg4yhk.js} +2 -2
  45. package/bundle/chunk-49y7zg15.js +2 -0
  46. package/bundle/{chunk-e5cds19n.js → chunk-4hvenszg.js} +1 -1
  47. package/bundle/{chunk-9d2mtevw.js → chunk-4p9fny77.js} +1 -1
  48. package/bundle/{chunk-sbj816s8.js → chunk-4ppw719f.js} +1 -1
  49. package/bundle/{chunk-ghdegwnr.js → chunk-4r7fbkcm.js} +1 -1
  50. package/bundle/{chunk-r4qpsa4e.js → chunk-4s1n38ds.js} +2 -2
  51. package/bundle/{chunk-ya6r72ng.js → chunk-4v29ayke.js} +1 -1
  52. package/bundle/{chunk-yvtbt12y.js → chunk-4xqwt6dr.js} +2 -2
  53. package/bundle/{chunk-89b6ttzs.js → chunk-4ycg2c6f.js} +2 -2
  54. package/bundle/{chunk-b79bb2g3.js → chunk-5341jv20.js} +1 -1
  55. package/bundle/{chunk-1dnvdeat.js → chunk-583d91xq.js} +2 -2
  56. package/bundle/{chunk-t7s475b2.js → chunk-5cwy8y78.js} +2 -2
  57. package/bundle/{chunk-x28chfpz.js → chunk-5dvy83ms.js} +2 -2
  58. package/bundle/{chunk-fd6qxjtf.js → chunk-5h1s0akp.js} +1 -1
  59. package/bundle/{chunk-ztjrm8m0.js → chunk-5mf4qrye.js} +2 -2
  60. package/bundle/{chunk-hav9pgf3.js → chunk-5q98z8ck.js} +2 -2
  61. package/bundle/chunk-5qhsfjzq.js +3 -0
  62. package/bundle/{chunk-rpc0he6b.js → chunk-5rvvfgfy.js} +2 -2
  63. package/bundle/chunk-5xxn06g0.js +2 -0
  64. package/bundle/{chunk-tqnf1p88.js → chunk-61b81z2h.js} +1 -1
  65. package/bundle/{chunk-y24yxs9g.js → chunk-62gefpwn.js} +2 -2
  66. package/bundle/{chunk-2h8b0csf.js → chunk-674pexjx.js} +2 -2
  67. package/bundle/{chunk-4805mxf7.js → chunk-69htq8kq.js} +1 -1
  68. package/bundle/{chunk-2ts74cgq.js → chunk-69k7cdtv.js} +2 -2
  69. package/bundle/{chunk-vhh80d5j.js → chunk-6cztstry.js} +2 -2
  70. package/bundle/{chunk-78e76m4h.js → chunk-6d4xc6br.js} +1 -1
  71. package/bundle/{chunk-78yvbv9b.js → chunk-6dd2dx69.js} +2 -2
  72. package/bundle/{chunk-eftk07r3.js → chunk-6j53vtzd.js} +1 -1
  73. package/bundle/{chunk-yg0rs4g1.js → chunk-6kch0q2d.js} +2 -2
  74. package/bundle/{chunk-akrcbxfa.js → chunk-6pt6nqwk.js} +1 -1
  75. package/bundle/{chunk-rkmg0gbq.js → chunk-6wmtbebc.js} +1 -1
  76. package/bundle/{chunk-kr975sx0.js → chunk-6y0wgz2j.js} +1 -1
  77. package/bundle/{chunk-datctfgt.js → chunk-6yshpz0z.js} +2 -2
  78. package/bundle/{chunk-3hawwbw6.js → chunk-71jmhvef.js} +2 -2
  79. package/bundle/{chunk-1pd943m9.js → chunk-73a7ts8r.js} +1 -1
  80. package/bundle/{chunk-vf75j9wd.js → chunk-7a4sb6q7.js} +1 -1
  81. package/bundle/chunk-7cp30q0t.js +2 -0
  82. package/bundle/{chunk-611wfdn3.js → chunk-7s9msscb.js} +1 -1
  83. package/bundle/{chunk-r9ng8xx5.js → chunk-7w571q26.js} +1 -1
  84. package/bundle/chunk-7xc73qb1.js +2 -0
  85. package/bundle/{chunk-k5swnh8m.js → chunk-840mmmzz.js} +4 -4
  86. package/bundle/{chunk-jcn8bg31.js → chunk-86reb44c.js} +1 -1
  87. package/bundle/{chunk-48y4n9ne.js → chunk-86sfzgnf.js} +1 -1
  88. package/bundle/{chunk-bw0951fs.js → chunk-8a9sj8gp.js} +1 -1
  89. package/bundle/{chunk-wzfb19t6.js → chunk-8b9z8j3z.js} +1 -1
  90. package/bundle/{chunk-9d8meavf.js → chunk-8gkz5550.js} +1 -1
  91. package/bundle/chunk-8gz8fk6r.js +2 -0
  92. package/bundle/chunk-8ht7cq3h.js +2 -0
  93. package/bundle/{chunk-r6055kk0.js → chunk-8jkqyf9n.js} +2 -2
  94. package/bundle/{chunk-pfd8gzy4.js → chunk-8qpfphdz.js} +1 -1
  95. package/bundle/chunk-8qv0119d.js +2 -0
  96. package/bundle/{chunk-k558fr15.js → chunk-8zpsgfb6.js} +1 -1
  97. package/bundle/{chunk-tpw1ewqn.js → chunk-96sra8g8.js} +1 -1
  98. package/bundle/{chunk-wkepvmgt.js → chunk-99df6wvm.js} +1 -1
  99. package/bundle/{chunk-t3e19wdp.js → chunk-9amnqaeq.js} +1 -1
  100. package/bundle/{chunk-3tf7xfw5.js → chunk-9gxyt2ay.js} +2 -2
  101. package/bundle/{chunk-tz60e15h.js → chunk-9kc2th5c.js} +2 -2
  102. package/bundle/chunk-9m0eawt5.js +2 -0
  103. package/bundle/{chunk-ph46s66y.js → chunk-9mabvb06.js} +1 -1
  104. package/bundle/chunk-9thgxbze.js +2 -0
  105. package/bundle/{chunk-n230jbn9.js → chunk-9ttebtcf.js} +1 -1
  106. package/bundle/{chunk-ncvr75f6.js → chunk-9z7y4x7q.js} +1 -1
  107. package/bundle/{chunk-1p39y33b.js → chunk-9znfb8f2.js} +2 -2
  108. package/bundle/chunk-9zsp3qkh.js +2 -0
  109. package/bundle/{chunk-wpkr3vzf.js → chunk-a1mbach4.js} +1 -1
  110. package/bundle/chunk-a32y70fe.js +2 -0
  111. package/bundle/{chunk-32x2901e.js → chunk-a3g8de96.js} +1 -1
  112. package/bundle/{chunk-9gs4en9v.js → chunk-a8askx4y.js} +1 -1
  113. package/bundle/{chunk-y8bxvp3c.js → chunk-adws0hhk.js} +2 -2
  114. package/bundle/{chunk-22wa8zty.js → chunk-ae1g5y4r.js} +1 -1
  115. package/bundle/{chunk-ajgwyrcf.js → chunk-ahgb3r1c.js} +2 -2
  116. package/bundle/{chunk-6p848y99.js → chunk-art8gejd.js} +1 -1
  117. package/bundle/{chunk-q8qx38kz.js → chunk-avksqxan.js} +1 -1
  118. package/bundle/chunk-avzaqy6a.js +2 -0
  119. package/bundle/chunk-az12tp53.js +2 -0
  120. package/bundle/{chunk-yhr7s8qm.js → chunk-b350g18y.js} +2 -2
  121. package/bundle/chunk-b5dpzcc7.js +2 -0
  122. package/bundle/chunk-bcgtqx3g.js +2 -0
  123. package/bundle/{chunk-y565z8n2.js → chunk-bdcd2mcb.js} +2 -2
  124. package/bundle/chunk-bde5d507.js +2 -0
  125. package/bundle/{chunk-1rsabv4p.js → chunk-bemyyen3.js} +1 -1
  126. package/bundle/{chunk-xmt17jd4.js → chunk-bga4kqd1.js} +2 -2
  127. package/bundle/{chunk-46ewdxgh.js → chunk-bm8azfnt.js} +1 -1
  128. package/bundle/{chunk-92xxg12q.js → chunk-bmdqb48f.js} +1 -1
  129. package/bundle/{chunk-rxh160jr.js → chunk-bq6cvf16.js} +2 -2
  130. package/bundle/{chunk-cydpdkx7.js → chunk-bxnsrggq.js} +1 -1
  131. package/bundle/{chunk-n2ytaxyn.js → chunk-bzh71a92.js} +1 -1
  132. package/bundle/chunk-bzzggc3s.js +2 -0
  133. package/bundle/{chunk-hts68y73.js → chunk-c5cyt23k.js} +2 -2
  134. package/bundle/chunk-c8qx439t.js +2 -0
  135. package/bundle/{chunk-v5j3ypfv.js → chunk-ch7s512a.js} +1 -1
  136. package/bundle/{chunk-a2pd7nt5.js → chunk-chnr7pe5.js} +1 -1
  137. package/bundle/chunk-ckw51fn6.js +2 -0
  138. package/bundle/{chunk-7wshaze9.js → chunk-crqycrs4.js} +2 -2
  139. package/bundle/{chunk-qsgpbt4t.js → chunk-d10qre1b.js} +1 -1
  140. package/bundle/{chunk-8rc7cvex.js → chunk-d385e2qt.js} +1 -1
  141. package/bundle/{chunk-6xx66mr1.js → chunk-d4faz5xa.js} +1 -1
  142. package/bundle/{chunk-09n24ztn.js → chunk-d7h1dp0h.js} +1 -1
  143. package/bundle/chunk-denp0wrq.js +2 -0
  144. package/bundle/chunk-depxzjer.js +2 -0
  145. package/bundle/chunk-dhvqpcf3.js +2 -0
  146. package/bundle/chunk-dkqqswbv.js +2 -0
  147. package/bundle/{chunk-2vsqsxe1.js → chunk-dmb0ez0m.js} +3 -3
  148. package/bundle/chunk-dn0437c1.js +5 -0
  149. package/bundle/{chunk-xfsccqsm.js → chunk-dvp0r93q.js} +1 -1
  150. package/bundle/{chunk-43x9n8rp.js → chunk-e18hshcg.js} +1 -1
  151. package/bundle/chunk-e5t7jsxa.js +2 -0
  152. package/bundle/{chunk-vm8htc6d.js → chunk-e611m0p4.js} +1 -1
  153. package/bundle/{chunk-zj5snrsa.js → chunk-e8s4mp5n.js} +2 -2
  154. package/bundle/chunk-eb811dt2.js +2 -0
  155. package/bundle/{chunk-50knjq36.js → chunk-edvfqxfr.js} +1 -1
  156. package/bundle/{chunk-cg7zeppb.js → chunk-ej0yzstw.js} +2 -2
  157. package/bundle/{chunk-fsagyvkz.js → chunk-ep4drmt9.js} +1 -1
  158. package/bundle/{chunk-bzz2expb.js → chunk-eqsank84.js} +1 -1
  159. package/bundle/{chunk-czfjmrrq.js → chunk-et3tgx7t.js} +1 -1
  160. package/bundle/{chunk-vamwvx0x.js → chunk-f0dp1tf9.js} +1 -1
  161. package/bundle/chunk-fbz2xv2w.js +2 -0
  162. package/bundle/{chunk-88hmeyf5.js → chunk-fd04358e.js} +375 -305
  163. package/bundle/{chunk-c5n49vrd.js → chunk-fdmz0502.js} +2 -2
  164. package/bundle/{chunk-mnxcykeq.js → chunk-ffx0cr44.js} +2 -2
  165. package/bundle/{chunk-t076hwsv.js → chunk-ffyj5nsg.js} +2 -2
  166. package/bundle/{chunk-fqvrxy41.js → chunk-ffz334ab.js} +1 -1
  167. package/bundle/{chunk-dzw0j790.js → chunk-fkq0v5qv.js} +2 -2
  168. package/bundle/{chunk-mp5m0acf.js → chunk-fmcg649e.js} +1 -1
  169. package/bundle/{chunk-84qx54nf.js → chunk-fp2xgnjn.js} +2 -2
  170. package/bundle/{chunk-k4ajben7.js → chunk-fpzkyzny.js} +2 -2
  171. package/bundle/{chunk-bqqxvagz.js → chunk-g738e799.js} +2 -2
  172. package/bundle/{chunk-g83d3a0t.js → chunk-g77kddrs.js} +2 -2
  173. package/bundle/chunk-gbvcb4k1.js +2 -0
  174. package/bundle/{chunk-d39e4fa8.js → chunk-gd0j16gn.js} +1 -1
  175. package/bundle/chunk-gdtnqzbp.js +2 -0
  176. package/bundle/{chunk-j5dnzqjy.js → chunk-gfvq78gy.js} +1 -1
  177. package/bundle/{chunk-hntsg7q4.js → chunk-gkf7x1yj.js} +1 -1
  178. package/bundle/chunk-gkfvhh28.js +2 -0
  179. package/bundle/chunk-gnh8c49b.js +2 -0
  180. package/bundle/chunk-gvf6ek9f.js +2 -0
  181. package/bundle/chunk-gvx5hmhk.js +2 -0
  182. package/bundle/{chunk-s3zmxfz2.js → chunk-h036zy9e.js} +2 -2
  183. package/bundle/{chunk-0tya4pqb.js → chunk-hf39qx6t.js} +2 -2
  184. package/bundle/chunk-hham7r33.js +2 -0
  185. package/bundle/{chunk-wpx2vmf5.js → chunk-hrcqbadm.js} +1 -1
  186. package/bundle/chunk-hsjbe5zy.js +2 -0
  187. package/bundle/{chunk-jh2za7y4.js → chunk-hx13a8es.js} +3 -3
  188. package/bundle/{chunk-42gd2vx4.js → chunk-j15wejz0.js} +1 -1
  189. package/bundle/{chunk-vyf77kq1.js → chunk-j1bv93m4.js} +12 -10
  190. package/bundle/{chunk-y7cqyeve.js → chunk-j2snkw45.js} +2 -2
  191. package/bundle/{chunk-krk24aqm.js → chunk-j3agzs13.js} +2 -2
  192. package/bundle/{chunk-51vn4f06.js → chunk-j45p2v4a.js} +3 -3
  193. package/bundle/{chunk-7jvx29js.js → chunk-j46bxb1b.js} +1 -1
  194. package/bundle/{chunk-e9vh8d52.js → chunk-jvvctqjd.js} +2 -2
  195. package/bundle/chunk-jvx7jtm4.js +3 -0
  196. package/bundle/{chunk-ex47pb9n.js → chunk-jwv6fda1.js} +2 -2
  197. package/bundle/{chunk-5mgmq6yz.js → chunk-k0chq88p.js} +1 -1
  198. package/bundle/chunk-k6gdmqff.js +2 -0
  199. package/bundle/{chunk-8t17w67q.js → chunk-k769v1ds.js} +1 -1
  200. package/bundle/{chunk-zqzh5hp3.js → chunk-kdqhwa65.js} +1 -1
  201. package/bundle/{chunk-k56zj08h.js → chunk-ky3fhz9z.js} +1 -1
  202. package/bundle/chunk-kzkb4648.js +2 -0
  203. package/bundle/chunk-m2540waa.js +2 -0
  204. package/bundle/{chunk-49we3vy1.js → chunk-m6967jtv.js} +2 -2
  205. package/bundle/{chunk-71h3pmnn.js → chunk-m8kjtp60.js} +1 -1
  206. package/bundle/{chunk-q65qzc9w.js → chunk-mbmaeq0a.js} +1 -1
  207. package/bundle/{chunk-sjtq9bbb.js → chunk-meehnnv9.js} +2 -2
  208. package/bundle/{chunk-vnz9n9z0.js → chunk-mjkwd1sz.js} +1 -1
  209. package/bundle/chunk-mscvm1rm.js +2 -0
  210. package/bundle/chunk-mw3hh526.js +2 -0
  211. package/bundle/chunk-n3nsrk5n.js +2 -0
  212. package/bundle/{chunk-n9969djm.js → chunk-n6pn4f3r.js} +1 -1
  213. package/bundle/{chunk-w32xhz0x.js → chunk-n7zd97hy.js} +2 -2
  214. package/bundle/chunk-n9nmc4q4.js +2 -0
  215. package/bundle/{chunk-d1j8frtq.js → chunk-nb4xtk1n.js} +1 -1
  216. package/bundle/{chunk-pkm3w0ks.js → chunk-ngygp66y.js} +1 -1
  217. package/bundle/chunk-nj4as8vy.js +2 -0
  218. package/bundle/chunk-nrzca9yd.js +2 -0
  219. package/bundle/chunk-nxm6gpyv.js +2 -0
  220. package/bundle/{chunk-pcmsxhrb.js → chunk-nyxn7npc.js} +1 -1
  221. package/bundle/{chunk-k232ny9m.js → chunk-nzz7gzg2.js} +1 -1
  222. package/bundle/{chunk-csmdhh7r.js → chunk-p0852vfn.js} +2 -2
  223. package/bundle/{chunk-nwkp2f8e.js → chunk-p4xqfkbh.js} +1 -1
  224. package/bundle/{chunk-4ngvj758.js → chunk-pdcxmr6x.js} +1 -1
  225. package/bundle/{chunk-bxc3z38f.js → chunk-pp10epga.js} +2 -2
  226. package/bundle/{chunk-gz8k40ty.js → chunk-prz2fkn9.js} +1 -1
  227. package/bundle/{chunk-h6kmpgak.js → chunk-psmwrvqs.js} +2 -2
  228. package/bundle/{chunk-4d9s7cgr.js → chunk-pwq2f75j.js} +1 -1
  229. package/bundle/{chunk-hama2v6a.js → chunk-pwrwb7mn.js} +1 -1
  230. package/bundle/{chunk-1yh1f9yj.js → chunk-px69995t.js} +1 -1
  231. package/bundle/{chunk-1tdy73ha.js → chunk-q1dmxn63.js} +2 -2
  232. package/bundle/chunk-qbjqkezn.js +2 -0
  233. package/bundle/chunk-qhtp1xvx.js +2 -0
  234. package/bundle/chunk-qkztgpay.js +2 -0
  235. package/bundle/{chunk-aykvrqrp.js → chunk-qn1fhqyw.js} +2 -2
  236. package/bundle/{chunk-44685nzw.js → chunk-qpggztkq.js} +2 -2
  237. package/bundle/{chunk-sxtfssjv.js → chunk-qpk7jp6t.js} +1 -1
  238. package/bundle/{chunk-nvvja3ch.js → chunk-qqsj69m2.js} +1 -1
  239. package/bundle/{chunk-4c6d1wy1.js → chunk-qrztx1b4.js} +2 -2
  240. package/bundle/{chunk-e7a50j2w.js → chunk-qz20b42s.js} +1 -1
  241. package/bundle/{chunk-jt7g0r2j.js → chunk-rd08wx37.js} +2 -2
  242. package/bundle/{chunk-cm7yp259.js → chunk-rn3je2hv.js} +1 -1
  243. package/bundle/chunk-rnf3dy0y.js +2 -0
  244. package/bundle/{chunk-3amgvg81.js → chunk-rqap90xh.js} +2 -2
  245. package/bundle/chunk-rry4kq85.js +2 -0
  246. package/bundle/{chunk-rx29zmw2.js → chunk-rws2tsdv.js} +1 -1
  247. package/bundle/{chunk-bd66q24j.js → chunk-rx9eh3db.js} +3 -3
  248. package/bundle/{chunk-g7jwp73v.js → chunk-rxt6gktt.js} +1 -1
  249. package/bundle/chunk-ryfj80q6.js +2 -0
  250. package/bundle/{chunk-gfer8ch3.js → chunk-s0gmxpxm.js} +2 -2
  251. package/bundle/{chunk-vrt8wd3r.js → chunk-s9epttpy.js} +1 -1
  252. package/bundle/{chunk-95tec4gm.js → chunk-sb3cgb4v.js} +1 -1
  253. package/bundle/{chunk-7x4g7h04.js → chunk-set1f1wr.js} +1 -1
  254. package/bundle/{chunk-xphzr4wg.js → chunk-sg9enzsp.js} +2 -2
  255. package/bundle/{chunk-9svh74gt.js → chunk-sh03ka27.js} +1 -1
  256. package/bundle/chunk-snx49w8h.js +2 -0
  257. package/bundle/{chunk-zjfdptdj.js → chunk-spcdwmy4.js} +1 -1
  258. package/bundle/{chunk-a4cmpa56.js → chunk-sy76e7nr.js} +1 -1
  259. package/bundle/{chunk-bffm0wv9.js → chunk-szfqmkj6.js} +1 -1
  260. package/bundle/chunk-t21mdqbb.js +2 -0
  261. package/bundle/{chunk-n5dxwryh.js → chunk-tcyzj3rz.js} +1 -1
  262. package/bundle/chunk-tn2yyqeb.js +2 -0
  263. package/bundle/chunk-ttebf3nt.js +2 -0
  264. package/bundle/chunk-twpfh0mx.js +2 -0
  265. package/bundle/{chunk-fnmq42y5.js → chunk-tz1bzrnh.js} +1 -1
  266. package/bundle/chunk-tzf6d5qy.js +2 -0
  267. package/bundle/{chunk-8y03p2md.js → chunk-v1axkp21.js} +2 -2
  268. package/bundle/chunk-v2mq09wx.js +2 -0
  269. package/bundle/chunk-v59a02aj.js +2 -0
  270. package/bundle/{chunk-8rbbt1s8.js → chunk-v5me0cj9.js} +1 -1
  271. package/bundle/{chunk-49brdmgp.js → chunk-v7v0krrj.js} +1 -1
  272. package/bundle/{chunk-96nmxprr.js → chunk-veptx3fk.js} +1 -1
  273. package/bundle/chunk-vnstr4g1.js +2 -0
  274. package/bundle/{chunk-kxdw2vtq.js → chunk-vr13f6b5.js} +2 -2
  275. package/bundle/chunk-vxr4rzt0.js +2 -0
  276. package/bundle/{chunk-m8phqgxp.js → chunk-vzkdzhn0.js} +1 -1
  277. package/bundle/chunk-w0h9rczg.js +2 -0
  278. package/bundle/{chunk-qtdxy2q1.js → chunk-w136zswr.js} +3 -3
  279. package/bundle/chunk-w214dwws.js +2 -0
  280. package/bundle/{chunk-s6vhscvd.js → chunk-w4fr00s7.js} +2 -2
  281. package/bundle/chunk-w8344et5.js +2 -0
  282. package/bundle/{chunk-b274mb6v.js → chunk-w8nj5ph5.js} +1 -1
  283. package/bundle/chunk-weyg78et.js +2 -0
  284. package/bundle/{chunk-8z65v9c9.js → chunk-wf0n1cs9.js} +1 -1
  285. package/bundle/{chunk-cshsqavb.js → chunk-wfpnv00c.js} +2 -2
  286. package/bundle/{chunk-1h9sc0gy.js → chunk-wmj3xndt.js} +1 -1
  287. package/bundle/{chunk-e6ckxkj8.js → chunk-wrzn87w0.js} +1 -1
  288. package/bundle/{chunk-98z5pfvj.js → chunk-ws720v4j.js} +1 -1
  289. package/bundle/{chunk-63t0rhc9.js → chunk-x0de4z05.js} +2 -2
  290. package/bundle/{chunk-d6qs2pbx.js → chunk-x3dzzq0t.js} +1 -1
  291. package/bundle/{chunk-zskjqrmc.js → chunk-x4jnyj09.js} +1 -1
  292. package/bundle/chunk-xchj8gna.js +2 -0
  293. package/bundle/{chunk-s81ck6bw.js → chunk-xdcwx384.js} +1 -1
  294. package/bundle/{chunk-kt982884.js → chunk-xmf59618.js} +1 -1
  295. package/bundle/chunk-y18ptwk2.js +2 -0
  296. package/bundle/{chunk-ep92grvg.js → chunk-y1v7mf1a.js} +9 -9
  297. package/bundle/chunk-y3dpyz2d.js +2 -0
  298. package/bundle/{chunk-ccghr6pm.js → chunk-y5ydtbpd.js} +1 -1
  299. package/bundle/{chunk-tzwm08yc.js → chunk-yg9n2a2d.js} +1 -1
  300. package/bundle/chunk-ykvgmje9.js +35 -0
  301. package/bundle/chunk-yvjecrjy.js +2 -0
  302. package/bundle/chunk-yw2x6by6.js +2 -0
  303. package/bundle/{chunk-8qbhnwej.js → chunk-z0dj15g9.js} +1 -1
  304. package/bundle/chunk-z0r4syk8.js +2 -0
  305. package/bundle/{chunk-k4d8gwxe.js → chunk-z6qyx227.js} +1 -1
  306. package/bundle/chunk-z7c00g63.js +2 -0
  307. package/bundle/{chunk-pnmadk2h.js → chunk-zgwasq3p.js} +1 -1
  308. package/bundle/{chunk-mazakqr7.js → chunk-zh7e6kqs.js} +1 -1
  309. package/bundle/{chunk-4q14whpc.js → chunk-zjyaze0d.js} +1 -1
  310. package/bundle/chunk-znr0saas.js +2 -0
  311. package/bundle/{chunk-43eqr0ds.js → chunk-zpjtse0z.js} +184 -184
  312. package/bundle/chunk-zqqt7v17.js +2 -0
  313. package/bundle/chunk-zwrgh1hc.js +2 -0
  314. package/bundle/{chunk-8gn7r4kb.js → chunk-zx63mepv.js} +1 -1
  315. package/bundle/index.js +3 -3
  316. package/bundle/parser.worker.js +2 -2
  317. package/bundle/worker.js +1 -1
  318. package/package.json +3 -3
  319. package/bundle/chunk-06j0gaen.js +0 -2
  320. package/bundle/chunk-0bn86djg.js +0 -3
  321. package/bundle/chunk-0mm40z8g.js +0 -2
  322. package/bundle/chunk-1mqfhw0f.js +0 -2
  323. package/bundle/chunk-28kte9rt.js +0 -2
  324. package/bundle/chunk-2dhjehxe.js +0 -2
  325. package/bundle/chunk-2nnfxbd2.js +0 -2
  326. package/bundle/chunk-2w5zmgpb.js +0 -2
  327. package/bundle/chunk-34qt3fqj.js +0 -2
  328. package/bundle/chunk-3p0xvt47.js +0 -2
  329. package/bundle/chunk-3pzx5ret.js +0 -2
  330. package/bundle/chunk-3y4rmqmm.js +0 -2
  331. package/bundle/chunk-486874bd.js +0 -2
  332. package/bundle/chunk-4bcbvfsw.js +0 -2
  333. package/bundle/chunk-4t1ysdag.js +0 -2
  334. package/bundle/chunk-5q7a4h2w.js +0 -2
  335. package/bundle/chunk-63vamhf7.js +0 -2
  336. package/bundle/chunk-6hhv3n7c.js +0 -2
  337. package/bundle/chunk-7a9kfb2n.js +0 -2
  338. package/bundle/chunk-7b5vney6.js +0 -2
  339. package/bundle/chunk-7x9m1smk.js +0 -2
  340. package/bundle/chunk-82mnr6sf.js +0 -2
  341. package/bundle/chunk-8bea2r6p.js +0 -2
  342. package/bundle/chunk-8h6mhzhg.js +0 -2
  343. package/bundle/chunk-8n1cmvr7.js +0 -2
  344. package/bundle/chunk-955zj1y6.js +0 -2
  345. package/bundle/chunk-95vp9bvk.js +0 -2
  346. package/bundle/chunk-9wzxnwv7.js +0 -2
  347. package/bundle/chunk-9zve998d.js +0 -2
  348. package/bundle/chunk-a9bkr9x4.js +0 -2
  349. package/bundle/chunk-ac5vzpzt.js +0 -2
  350. package/bundle/chunk-c1exgasy.js +0 -2
  351. package/bundle/chunk-cgxzmkkf.js +0 -2
  352. package/bundle/chunk-cs3cbfm8.js +0 -2
  353. package/bundle/chunk-d29te4c1.js +0 -2
  354. package/bundle/chunk-d6q42p18.js +0 -2
  355. package/bundle/chunk-dfbexagg.js +0 -2
  356. package/bundle/chunk-dfkcp43a.js +0 -2
  357. package/bundle/chunk-dps1p1g1.js +0 -2
  358. package/bundle/chunk-e1fzgez5.js +0 -2
  359. package/bundle/chunk-egcvm4x2.js +0 -3
  360. package/bundle/chunk-ek3b08ed.js +0 -2
  361. package/bundle/chunk-f78yth0b.js +0 -2
  362. package/bundle/chunk-gamnnfna.js +0 -2
  363. package/bundle/chunk-gjxhz1a6.js +0 -2
  364. package/bundle/chunk-gpm39v12.js +0 -2
  365. package/bundle/chunk-gr8emzzx.js +0 -2
  366. package/bundle/chunk-gt6h68pk.js +0 -2
  367. package/bundle/chunk-hj588j4f.js +0 -2
  368. package/bundle/chunk-hqtex91e.js +0 -2
  369. package/bundle/chunk-jmgpr5th.js +0 -2
  370. package/bundle/chunk-jt79yt0t.js +0 -2
  371. package/bundle/chunk-jtz5re73.js +0 -2
  372. package/bundle/chunk-k4bj677f.js +0 -3
  373. package/bundle/chunk-kw5z5awx.js +0 -2
  374. package/bundle/chunk-mp42gb6q.js +0 -2
  375. package/bundle/chunk-mq0733qh.js +0 -2
  376. package/bundle/chunk-mrcsatmn.js +0 -2
  377. package/bundle/chunk-n24yx79r.js +0 -5
  378. package/bundle/chunk-ng2g9kkk.js +0 -2
  379. package/bundle/chunk-ngfhfyjs.js +0 -2
  380. package/bundle/chunk-nwygsfhk.js +0 -35
  381. package/bundle/chunk-p0dnmrqp.js +0 -2
  382. package/bundle/chunk-p6h2ydcp.js +0 -2
  383. package/bundle/chunk-qhakedgs.js +0 -2
  384. package/bundle/chunk-r18zetwf.js +0 -2
  385. package/bundle/chunk-r6rgrz25.js +0 -2
  386. package/bundle/chunk-rk4vp09j.js +0 -2
  387. package/bundle/chunk-s4jp4zce.js +0 -2
  388. package/bundle/chunk-sec9y622.js +0 -2
  389. package/bundle/chunk-sn7q178t.js +0 -2
  390. package/bundle/chunk-st0h54dm.js +0 -2
  391. package/bundle/chunk-sz75fx13.js +0 -2
  392. package/bundle/chunk-tefh2cgk.js +0 -2
  393. package/bundle/chunk-tfez99qv.js +0 -2
  394. package/bundle/chunk-tjk1hymv.js +0 -2
  395. package/bundle/chunk-v1098rqc.js +0 -2
  396. package/bundle/chunk-v30ezr68.js +0 -11
  397. package/bundle/chunk-v5wn741w.js +0 -2
  398. package/bundle/chunk-vp6ttkct.js +0 -2
  399. package/bundle/chunk-vpcsmwsb.js +0 -2
  400. package/bundle/chunk-x23s1s8k.js +0 -2
  401. package/bundle/chunk-xr6js4ek.js +0 -2
  402. package/bundle/chunk-y078gb3n.js +0 -2
  403. package/bundle/chunk-yewjnqee.js +0 -2
  404. package/bundle/chunk-ykk9e9as.js +0 -2
  405. package/bundle/chunk-yqn88gjf.js +0 -2
  406. package/bundle/chunk-yrxg3dex.js +0 -2
  407. package/bundle/chunk-z1xeqrgd.js +0 -2
  408. package/bundle/chunk-z5j46dem.js +0 -2
  409. package/bundle/chunk-zq0hpja9.js +0 -2
  410. package/bundle/chunk-zv89qwjc.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ue as P,Ye as C,af as h,bf as g,cf as u,ef as m,mf as d,nf as S,rf as c,sf as i,tf as M,vf as p}from"./chunk-89b6ttzs.js";import{os as T,ps as v,rs as w}from"./chunk-4ngvj758.js";import"./chunk-cqtkxwd8.js";import"./chunk-wpkr3vzf.js";import{fw as j}from"./chunk-xphzr4wg.js";import"./chunk-hav9pgf3.js";import"./chunk-9svh74gt.js";function y(B){if(B==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{prompt_tokens:Q,completion_tokens:X}=B;return{inputTokens:{total:Q,noCache:Q,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:X,text:X,reasoning:void 0},raw:B}}function R({data:B,mediaType:Q}){return B instanceof URL?B.toString():`data:${Q};base64,${C(B)}`}function n(B){var Q;let X=[];for(let D=0;D<B.length;D++){let{role:K,content:$}=B[D],N=D===B.length-1;switch(K){case"system":{X.push({role:"system",content:$});break}case"user":{X.push({role:"user",content:$.map((G)=>{switch(G.type){case"text":return{type:"text",text:G.text};case"file":if(G.mediaType.startsWith("image/")){let Z=G.mediaType==="image/*"?"image/jpeg":G.mediaType;return{type:"image_url",image_url:R({data:G.data,mediaType:Z})}}else if(G.mediaType==="application/pdf")return{type:"document_url",document_url:R({data:G.data,mediaType:"application/pdf"})};else throw new w({functionality:"Only images and PDF file parts are supported"})}})});break}case"assistant":{let G="",Z=[];for(let Y of $)switch(Y.type){case"text":{G+=Y.text;break}case"tool-call":{Z.push({id:Y.toolCallId,type:"function",function:{name:Y.toolName,arguments:JSON.stringify(Y.input)}});break}case"reasoning":{G+=Y.text;break}default:throw Error(`Unsupported content type in assistant message: ${Y.type}`)}X.push({role:"assistant",content:G,prefix:N?!0:void 0,tool_calls:Z.length>0?Z:void 0});break}case"tool":{for(let G of $){if(G.type==="tool-approval-response")continue;let Z=G.output,Y;switch(Z.type){case"text":case"error-text":Y=Z.value;break;case"execution-denied":Y=(Q=Z.reason)!=null?Q:"Tool execution denied.";break;case"content":case"json":case"error-json":Y=JSON.stringify(Z.value);break}X.push({role:"tool",name:G.toolName,tool_call_id:G.toolCallId,content:Y})}break}default:throw Error(`Unsupported role: ${K}`)}}return X}function k({id:B,model:Q,created:X}){return{id:B!=null?B:void 0,modelId:Q!=null?Q:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function x(B){switch(B){case"stop":return"stop";case"length":case"model_length":return"length";case"tool_calls":return"tool-calls";default:return"other"}}var t=j.object({safePrompt:j.boolean().optional(),documentImageLimit:j.number().optional(),documentPageLimit:j.number().optional(),structuredOutputs:j.boolean().optional(),strictJsonSchema:j.boolean().optional(),parallelToolCalls:j.boolean().optional(),reasoningEffort:j.enum(["high","none"]).optional()}),e=j.object({object:j.literal("error"),message:j.string(),type:j.string(),param:j.string().nullable(),code:j.string().nullable()}),b=c({errorSchema:e,errorToMessage:(B)=>B.message});function o({tools:B,toolChoice:Q}){B=(B==null?void 0:B.length)?B:void 0;let X=[];if(B==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let D=[];for(let $ of B)if($.type==="provider")X.push({type:"unsupported",feature:`provider-defined tool ${$.id}`});else D.push({type:"function",function:{name:$.name,description:$.description,parameters:$.inputSchema,...$.strict!=null?{strict:$.strict}:{}}});if(Q==null)return{tools:D,toolChoice:void 0,toolWarnings:X};let K=Q.type;switch(K){case"auto":case"none":return{tools:D,toolChoice:K,toolWarnings:X};case"required":return{tools:D,toolChoice:"any",toolWarnings:X};case"tool":return{tools:D.filter(($)=>$.function.name===Q.toolName),toolChoice:"any",toolWarnings:X};default:throw new w({functionality:`tool choice type: ${K}`})}}var jj=class{constructor(B,Q){this.specificationVersion="v3",this.supportedUrls={"application/pdf":[/^https:\/\/.*$/]};var X;this.modelId=B,this.config=Q,this.generateId=(X=Q.generateId)!=null?X:h}get provider(){return this.config.provider}async getArgs({prompt:B,maxOutputTokens:Q,temperature:X,topP:D,topK:K,frequencyPenalty:$,presencePenalty:N,stopSequences:G,responseFormat:Z,seed:Y,providerOptions:J,tools:f,toolChoice:L}){var U,O,V,q;let E=[],A=(U=await d({provider:"mistral",providerOptions:J,schema:t}))!=null?U:{};if(K!=null)E.push({type:"unsupported",feature:"topK"});if($!=null)E.push({type:"unsupported",feature:"frequencyPenalty"});if(N!=null)E.push({type:"unsupported",feature:"presencePenalty"});if(G!=null)E.push({type:"unsupported",feature:"stopSequences"});let H=(O=A.structuredOutputs)!=null?O:!0,z=(V=A.strictJsonSchema)!=null?V:!1;if((Z==null?void 0:Z.type)==="json"&&!(Z==null?void 0:Z.schema))B=u({messages:B,schema:Z.schema});let W={model:this.modelId,safe_prompt:A.safePrompt,max_tokens:Q,temperature:X,top_p:D,random_seed:Y,reasoning_effort:A.reasoningEffort,response_format:(Z==null?void 0:Z.type)==="json"?H&&(Z==null?void 0:Z.schema)!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:z,name:(q=Z.name)!=null?q:"response",description:Z.description}}:{type:"json_object"}:void 0,document_image_limit:A.documentImageLimit,document_page_limit:A.documentPageLimit,messages:n(B)},{tools:_,toolChoice:s,toolWarnings:r}=o({tools:f,toolChoice:L});return{args:{...W,tools:_,tool_choice:s,..._!=null&&A.parallelToolCalls!==void 0?{parallel_tool_calls:A.parallelToolCalls}:{}},warnings:[...E,...r]}}async doGenerate(B){var Q;let{args:X,warnings:D}=await this.getArgs(B),{responseHeaders:K,value:$,rawValue:N}=await S({url:`${this.config.baseURL}/chat/completions`,headers:P(this.config.headers(),B.headers),body:X,failedResponseHandler:b,successfulResponseHandler:M(Bj),abortSignal:B.abortSignal,fetch:this.config.fetch}),G=$.choices[0],Z=[];if(G.message.content!=null&&Array.isArray(G.message.content)){for(let Y of G.message.content)if(Y.type==="thinking"){let J=F(Y.thinking);if(J.length>0)Z.push({type:"reasoning",text:J})}else if(Y.type==="text"){if(Y.text.length>0)Z.push({type:"text",text:Y.text})}}else{let Y=I(G.message.content);if(Y!=null&&Y.length>0)Z.push({type:"text",text:Y})}if(G.message.tool_calls!=null)for(let Y of G.message.tool_calls)Z.push({type:"tool-call",toolCallId:Y.id,toolName:Y.function.name,input:Y.function.arguments});return{content:Z,finishReason:{unified:x(G.finish_reason),raw:(Q=G.finish_reason)!=null?Q:void 0},usage:y($.usage),request:{body:X},response:{...k($),headers:K,body:N},warnings:D}}async doStream(B){let{args:Q,warnings:X}=await this.getArgs(B),D={...Q,stream:!0},{responseHeaders:K,value:$}=await S({url:`${this.config.baseURL}/chat/completions`,headers:P(this.config.headers(),B.headers),body:D,failedResponseHandler:b,successfulResponseHandler:i(Gj),abortSignal:B.abortSignal,fetch:this.config.fetch}),N={unified:"other",raw:void 0},G=void 0,Z=!0,Y=!1,J=null,f=this.generateId;return{stream:$.pipeThrough(new TransformStream({start(L){L.enqueue({type:"stream-start",warnings:X})},transform(L,U){if(B.includeRawChunks)U.enqueue({type:"raw",rawValue:L.rawValue});if(!L.success){U.enqueue({type:"error",error:L.error});return}let O=L.value;if(Z)Z=!1,U.enqueue({type:"response-metadata",...k(O)});if(O.usage!=null)G=O.usage;let V=O.choices[0],q=V.delta,E=I(q.content);if(q.content!=null&&Array.isArray(q.content)){for(let A of q.content)if(A.type==="thinking"){let H=F(A.thinking);if(H.length>0){if(J==null){if(Y)U.enqueue({type:"text-end",id:"0"}),Y=!1;J=f(),U.enqueue({type:"reasoning-start",id:J})}U.enqueue({type:"reasoning-delta",id:J,delta:H})}}}if(E!=null&&E.length>0){if(!Y){if(J!=null)U.enqueue({type:"reasoning-end",id:J}),J=null;U.enqueue({type:"text-start",id:"0"}),Y=!0}U.enqueue({type:"text-delta",id:"0",delta:E})}if((q==null?void 0:q.tool_calls)!=null)for(let A of q.tool_calls){let H=A.id,z=A.function.name,W=A.function.arguments;U.enqueue({type:"tool-input-start",id:H,toolName:z}),U.enqueue({type:"tool-input-delta",id:H,delta:W}),U.enqueue({type:"tool-input-end",id:H}),U.enqueue({type:"tool-call",toolCallId:H,toolName:z,input:W})}if(V.finish_reason!=null)N={unified:x(V.finish_reason),raw:V.finish_reason}},flush(L){if(J!=null)L.enqueue({type:"reasoning-end",id:J});if(Y)L.enqueue({type:"text-end",id:"0"});L.enqueue({type:"finish",finishReason:N,usage:y(G)})}})),request:{body:D},response:{headers:K}}}};function F(B){return B.filter((Q)=>Q.type==="text").map((Q)=>Q.text).join("")}function I(B){if(typeof B==="string")return B;if(B==null)return;let Q=[];for(let X of B){let{type:D}=X;switch(D){case"text":Q.push(X.text);break;case"thinking":case"image_url":case"reference":break;default:throw Error(`Unsupported type: ${D}`)}}return Q.length?Q.join(""):void 0}var l=j.union([j.string(),j.array(j.discriminatedUnion("type",[j.object({type:j.literal("text"),text:j.string()}),j.object({type:j.literal("image_url"),image_url:j.union([j.string(),j.object({url:j.string(),detail:j.string().nullable()})])}),j.object({type:j.literal("reference"),reference_ids:j.array(j.union([j.string(),j.number()]))}),j.object({type:j.literal("thinking"),thinking:j.array(j.object({type:j.literal("text"),text:j.string()}))})]))]).nullish(),a=j.object({prompt_tokens:j.number(),completion_tokens:j.number(),total_tokens:j.number()}),Bj=j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({message:j.object({role:j.literal("assistant"),content:l,tool_calls:j.array(j.object({id:j.string(),function:j.object({name:j.string(),arguments:j.string()})})).nullish()}),index:j.number(),finish_reason:j.string().nullish()})),object:j.literal("chat.completion"),usage:a}),Gj=j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({delta:j.object({role:j.enum(["assistant"]).optional(),content:l,tool_calls:j.array(j.object({id:j.string(),function:j.object({name:j.string(),arguments:j.string()})})).nullish()}),finish_reason:j.string().nullish(),index:j.number()})),usage:a.nullish()}),Qj=class{constructor(B,Q){this.specificationVersion="v3",this.maxEmbeddingsPerCall=32,this.supportsParallelCalls=!1,this.modelId=B,this.config=Q}get provider(){return this.config.provider}async doEmbed({values:B,abortSignal:Q,headers:X}){if(B.length>this.maxEmbeddingsPerCall)throw new v({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:B});let{responseHeaders:D,value:K,rawValue:$}=await S({url:`${this.config.baseURL}/embeddings`,headers:P(this.config.headers(),X),body:{model:this.modelId,input:B,encoding_format:"float"},failedResponseHandler:b,successfulResponseHandler:M(Xj),abortSignal:Q,fetch:this.config.fetch});return{warnings:[],embeddings:K.data.map((N)=>N.embedding),usage:K.usage?{tokens:K.usage.prompt_tokens}:void 0,response:{headers:D,body:$}}}},Xj=j.object({data:j.array(j.object({embedding:j.array(j.number())})),usage:j.object({prompt_tokens:j.number()}).nullish()}),Yj="3.0.27";function Zj(B={}){var Q;let X=(Q=p(B.baseURL))!=null?Q:"https://api.mistral.ai/v1",D=()=>g({Authorization:`Bearer ${m({apiKey:B.apiKey,environmentVariableName:"MISTRAL_API_KEY",description:"Mistral"})}`,...B.headers},`ai-sdk/mistral/${Yj}`),K=(G)=>new jj(G,{provider:"mistral.chat",baseURL:X,headers:D,fetch:B.fetch,generateId:B.generateId}),$=(G)=>new Qj(G,{provider:"mistral.embedding",baseURL:X,headers:D,fetch:B.fetch}),N=function(G){if(new.target)throw Error("The Mistral model function cannot be called with the new keyword.");return K(G)};return N.specificationVersion="v3",N.languageModel=K,N.chat=K,N.embedding=$,N.embeddingModel=$,N.textEmbedding=$,N.textEmbeddingModel=$,N.imageModel=(G)=>{throw new T({modelId:G,modelType:"imageModel"})},N}var Pj=Zj();export{Pj as mistral,Zj as createMistral,Yj as VERSION};
2
+ import{We as P,_e as C,cf as h,df as g,ef as u,gf as m,of as d,pf as S,tf as c,uf as i,vf as M,xf as p}from"./chunk-4ycg2c6f.js";import{Uq as T,Vq as v,Xq as w}from"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import{Lu as j}from"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-sh03ka27.js";function y(B){if(B==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{prompt_tokens:Q,completion_tokens:X}=B;return{inputTokens:{total:Q,noCache:Q,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:X,text:X,reasoning:void 0},raw:B}}function R({data:B,mediaType:Q}){return B instanceof URL?B.toString():`data:${Q};base64,${C(B)}`}function n(B){var Q;let X=[];for(let D=0;D<B.length;D++){let{role:K,content:$}=B[D],N=D===B.length-1;switch(K){case"system":{X.push({role:"system",content:$});break}case"user":{X.push({role:"user",content:$.map((G)=>{switch(G.type){case"text":return{type:"text",text:G.text};case"file":if(G.mediaType.startsWith("image/")){let Z=G.mediaType==="image/*"?"image/jpeg":G.mediaType;return{type:"image_url",image_url:R({data:G.data,mediaType:Z})}}else if(G.mediaType==="application/pdf")return{type:"document_url",document_url:R({data:G.data,mediaType:"application/pdf"})};else throw new w({functionality:"Only images and PDF file parts are supported"})}})});break}case"assistant":{let G="",Z=[];for(let Y of $)switch(Y.type){case"text":{G+=Y.text;break}case"tool-call":{Z.push({id:Y.toolCallId,type:"function",function:{name:Y.toolName,arguments:JSON.stringify(Y.input)}});break}case"reasoning":{G+=Y.text;break}default:throw Error(`Unsupported content type in assistant message: ${Y.type}`)}X.push({role:"assistant",content:G,prefix:N?!0:void 0,tool_calls:Z.length>0?Z:void 0});break}case"tool":{for(let G of $){if(G.type==="tool-approval-response")continue;let Z=G.output,Y;switch(Z.type){case"text":case"error-text":Y=Z.value;break;case"execution-denied":Y=(Q=Z.reason)!=null?Q:"Tool execution denied.";break;case"content":case"json":case"error-json":Y=JSON.stringify(Z.value);break}X.push({role:"tool",name:G.toolName,tool_call_id:G.toolCallId,content:Y})}break}default:throw Error(`Unsupported role: ${K}`)}}return X}function k({id:B,model:Q,created:X}){return{id:B!=null?B:void 0,modelId:Q!=null?Q:void 0,timestamp:X!=null?new Date(X*1000):void 0}}function x(B){switch(B){case"stop":return"stop";case"length":case"model_length":return"length";case"tool_calls":return"tool-calls";default:return"other"}}var t=j.object({safePrompt:j.boolean().optional(),documentImageLimit:j.number().optional(),documentPageLimit:j.number().optional(),structuredOutputs:j.boolean().optional(),strictJsonSchema:j.boolean().optional(),parallelToolCalls:j.boolean().optional(),reasoningEffort:j.enum(["high","none"]).optional()}),e=j.object({object:j.literal("error"),message:j.string(),type:j.string(),param:j.string().nullable(),code:j.string().nullable()}),b=c({errorSchema:e,errorToMessage:(B)=>B.message});function o({tools:B,toolChoice:Q}){B=(B==null?void 0:B.length)?B:void 0;let X=[];if(B==null)return{tools:void 0,toolChoice:void 0,toolWarnings:X};let D=[];for(let $ of B)if($.type==="provider")X.push({type:"unsupported",feature:`provider-defined tool ${$.id}`});else D.push({type:"function",function:{name:$.name,description:$.description,parameters:$.inputSchema,...$.strict!=null?{strict:$.strict}:{}}});if(Q==null)return{tools:D,toolChoice:void 0,toolWarnings:X};let K=Q.type;switch(K){case"auto":case"none":return{tools:D,toolChoice:K,toolWarnings:X};case"required":return{tools:D,toolChoice:"any",toolWarnings:X};case"tool":return{tools:D.filter(($)=>$.function.name===Q.toolName),toolChoice:"any",toolWarnings:X};default:throw new w({functionality:`tool choice type: ${K}`})}}var jj=class{constructor(B,Q){this.specificationVersion="v3",this.supportedUrls={"application/pdf":[/^https:\/\/.*$/]};var X;this.modelId=B,this.config=Q,this.generateId=(X=Q.generateId)!=null?X:h}get provider(){return this.config.provider}async getArgs({prompt:B,maxOutputTokens:Q,temperature:X,topP:D,topK:K,frequencyPenalty:$,presencePenalty:N,stopSequences:G,responseFormat:Z,seed:Y,providerOptions:J,tools:f,toolChoice:L}){var U,O,V,q;let E=[],A=(U=await d({provider:"mistral",providerOptions:J,schema:t}))!=null?U:{};if(K!=null)E.push({type:"unsupported",feature:"topK"});if($!=null)E.push({type:"unsupported",feature:"frequencyPenalty"});if(N!=null)E.push({type:"unsupported",feature:"presencePenalty"});if(G!=null)E.push({type:"unsupported",feature:"stopSequences"});let H=(O=A.structuredOutputs)!=null?O:!0,z=(V=A.strictJsonSchema)!=null?V:!1;if((Z==null?void 0:Z.type)==="json"&&!(Z==null?void 0:Z.schema))B=u({messages:B,schema:Z.schema});let W={model:this.modelId,safe_prompt:A.safePrompt,max_tokens:Q,temperature:X,top_p:D,random_seed:Y,reasoning_effort:A.reasoningEffort,response_format:(Z==null?void 0:Z.type)==="json"?H&&(Z==null?void 0:Z.schema)!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:z,name:(q=Z.name)!=null?q:"response",description:Z.description}}:{type:"json_object"}:void 0,document_image_limit:A.documentImageLimit,document_page_limit:A.documentPageLimit,messages:n(B)},{tools:_,toolChoice:s,toolWarnings:r}=o({tools:f,toolChoice:L});return{args:{...W,tools:_,tool_choice:s,..._!=null&&A.parallelToolCalls!==void 0?{parallel_tool_calls:A.parallelToolCalls}:{}},warnings:[...E,...r]}}async doGenerate(B){var Q;let{args:X,warnings:D}=await this.getArgs(B),{responseHeaders:K,value:$,rawValue:N}=await S({url:`${this.config.baseURL}/chat/completions`,headers:P(this.config.headers(),B.headers),body:X,failedResponseHandler:b,successfulResponseHandler:M(Bj),abortSignal:B.abortSignal,fetch:this.config.fetch}),G=$.choices[0],Z=[];if(G.message.content!=null&&Array.isArray(G.message.content)){for(let Y of G.message.content)if(Y.type==="thinking"){let J=F(Y.thinking);if(J.length>0)Z.push({type:"reasoning",text:J})}else if(Y.type==="text"){if(Y.text.length>0)Z.push({type:"text",text:Y.text})}}else{let Y=I(G.message.content);if(Y!=null&&Y.length>0)Z.push({type:"text",text:Y})}if(G.message.tool_calls!=null)for(let Y of G.message.tool_calls)Z.push({type:"tool-call",toolCallId:Y.id,toolName:Y.function.name,input:Y.function.arguments});return{content:Z,finishReason:{unified:x(G.finish_reason),raw:(Q=G.finish_reason)!=null?Q:void 0},usage:y($.usage),request:{body:X},response:{...k($),headers:K,body:N},warnings:D}}async doStream(B){let{args:Q,warnings:X}=await this.getArgs(B),D={...Q,stream:!0},{responseHeaders:K,value:$}=await S({url:`${this.config.baseURL}/chat/completions`,headers:P(this.config.headers(),B.headers),body:D,failedResponseHandler:b,successfulResponseHandler:i(Gj),abortSignal:B.abortSignal,fetch:this.config.fetch}),N={unified:"other",raw:void 0},G=void 0,Z=!0,Y=!1,J=null,f=this.generateId;return{stream:$.pipeThrough(new TransformStream({start(L){L.enqueue({type:"stream-start",warnings:X})},transform(L,U){if(B.includeRawChunks)U.enqueue({type:"raw",rawValue:L.rawValue});if(!L.success){U.enqueue({type:"error",error:L.error});return}let O=L.value;if(Z)Z=!1,U.enqueue({type:"response-metadata",...k(O)});if(O.usage!=null)G=O.usage;let V=O.choices[0],q=V.delta,E=I(q.content);if(q.content!=null&&Array.isArray(q.content)){for(let A of q.content)if(A.type==="thinking"){let H=F(A.thinking);if(H.length>0){if(J==null){if(Y)U.enqueue({type:"text-end",id:"0"}),Y=!1;J=f(),U.enqueue({type:"reasoning-start",id:J})}U.enqueue({type:"reasoning-delta",id:J,delta:H})}}}if(E!=null&&E.length>0){if(!Y){if(J!=null)U.enqueue({type:"reasoning-end",id:J}),J=null;U.enqueue({type:"text-start",id:"0"}),Y=!0}U.enqueue({type:"text-delta",id:"0",delta:E})}if((q==null?void 0:q.tool_calls)!=null)for(let A of q.tool_calls){let H=A.id,z=A.function.name,W=A.function.arguments;U.enqueue({type:"tool-input-start",id:H,toolName:z}),U.enqueue({type:"tool-input-delta",id:H,delta:W}),U.enqueue({type:"tool-input-end",id:H}),U.enqueue({type:"tool-call",toolCallId:H,toolName:z,input:W})}if(V.finish_reason!=null)N={unified:x(V.finish_reason),raw:V.finish_reason}},flush(L){if(J!=null)L.enqueue({type:"reasoning-end",id:J});if(Y)L.enqueue({type:"text-end",id:"0"});L.enqueue({type:"finish",finishReason:N,usage:y(G)})}})),request:{body:D},response:{headers:K}}}};function F(B){return B.filter((Q)=>Q.type==="text").map((Q)=>Q.text).join("")}function I(B){if(typeof B==="string")return B;if(B==null)return;let Q=[];for(let X of B){let{type:D}=X;switch(D){case"text":Q.push(X.text);break;case"thinking":case"image_url":case"reference":break;default:throw Error(`Unsupported type: ${D}`)}}return Q.length?Q.join(""):void 0}var l=j.union([j.string(),j.array(j.discriminatedUnion("type",[j.object({type:j.literal("text"),text:j.string()}),j.object({type:j.literal("image_url"),image_url:j.union([j.string(),j.object({url:j.string(),detail:j.string().nullable()})])}),j.object({type:j.literal("reference"),reference_ids:j.array(j.union([j.string(),j.number()]))}),j.object({type:j.literal("thinking"),thinking:j.array(j.object({type:j.literal("text"),text:j.string()}))})]))]).nullish(),a=j.object({prompt_tokens:j.number(),completion_tokens:j.number(),total_tokens:j.number()}),Bj=j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({message:j.object({role:j.literal("assistant"),content:l,tool_calls:j.array(j.object({id:j.string(),function:j.object({name:j.string(),arguments:j.string()})})).nullish()}),index:j.number(),finish_reason:j.string().nullish()})),object:j.literal("chat.completion"),usage:a}),Gj=j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({delta:j.object({role:j.enum(["assistant"]).optional(),content:l,tool_calls:j.array(j.object({id:j.string(),function:j.object({name:j.string(),arguments:j.string()})})).nullish()}),finish_reason:j.string().nullish(),index:j.number()})),usage:a.nullish()}),Qj=class{constructor(B,Q){this.specificationVersion="v3",this.maxEmbeddingsPerCall=32,this.supportsParallelCalls=!1,this.modelId=B,this.config=Q}get provider(){return this.config.provider}async doEmbed({values:B,abortSignal:Q,headers:X}){if(B.length>this.maxEmbeddingsPerCall)throw new v({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:B});let{responseHeaders:D,value:K,rawValue:$}=await S({url:`${this.config.baseURL}/embeddings`,headers:P(this.config.headers(),X),body:{model:this.modelId,input:B,encoding_format:"float"},failedResponseHandler:b,successfulResponseHandler:M(Xj),abortSignal:Q,fetch:this.config.fetch});return{warnings:[],embeddings:K.data.map((N)=>N.embedding),usage:K.usage?{tokens:K.usage.prompt_tokens}:void 0,response:{headers:D,body:$}}}},Xj=j.object({data:j.array(j.object({embedding:j.array(j.number())})),usage:j.object({prompt_tokens:j.number()}).nullish()}),Yj="3.0.27";function Zj(B={}){var Q;let X=(Q=p(B.baseURL))!=null?Q:"https://api.mistral.ai/v1",D=()=>g({Authorization:`Bearer ${m({apiKey:B.apiKey,environmentVariableName:"MISTRAL_API_KEY",description:"Mistral"})}`,...B.headers},`ai-sdk/mistral/${Yj}`),K=(G)=>new jj(G,{provider:"mistral.chat",baseURL:X,headers:D,fetch:B.fetch,generateId:B.generateId}),$=(G)=>new Qj(G,{provider:"mistral.embedding",baseURL:X,headers:D,fetch:B.fetch}),N=function(G){if(new.target)throw Error("The Mistral model function cannot be called with the new keyword.");return K(G)};return N.specificationVersion="v3",N.languageModel=K,N.chat=K,N.embedding=$,N.embeddingModel=$,N.textEmbedding=$,N.textEmbeddingModel=$,N.imageModel=(G)=>{throw new T({modelId:G,modelType:"imageModel"})},N}var Pj=Zj();export{Pj as mistral,Zj as createMistral,Yj as VERSION};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ad as e,Bd as f,Cd as g,Dd as h,Ed as i,Fd as j,Gd as k,Hd as l,wd as a,xd as b,yd as c,zd as d}from"./chunk-k5swnh8m.js";import"./chunk-9svh74gt.js";export{i as setRendererCapabilities,a as pasteBytes,f as createTestRenderer,h as createTerminalCapabilities,j as createSpy,e as createMockMouse,c as createMockKeys,l as TestRecorder,d as MouseButtons,g as MockTreeSitterClient,k as ManualClock,b as KeyCodes};
2
+ import{Ad as c,Bd as d,Cd as e,Dd as f,Ed as g,Fd as h,Gd as i,Hd as j,Id as k,Jd as l,yd as a,zd as b}from"./chunk-840mmmzz.js";import"./chunk-sh03ka27.js";export{i as setRendererCapabilities,a as pasteBytes,f as createTestRenderer,h as createTerminalCapabilities,j as createSpy,e as createMockMouse,c as createMockKeys,l as TestRecorder,d as MouseButtons,g as MockTreeSitterClient,k as ManualClock,b as KeyCodes};
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{Me as M}from"./chunk-2ts74cgq.js";import{Pe as D}from"./chunk-qtdxy2q1.js";import{Qe as B}from"./chunk-gfer8ch3.js";import{Ef as d,Gf as w}from"./chunk-wqkvsj5y.js";import{QQ as n}from"./chunk-9svh74gt.js";var R=n(D(),1),i=n(d(),1),A=n(M(),1);import N from"fs/promises";var S=n(d(),1);var _="169.254.170.2",p="169.254.170.23",u="[fd00:ec2::23]",g=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===_||e.hostname===p||e.hostname===u)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let a=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new S.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
2
+ import{Oe as M}from"./chunk-69k7cdtv.js";import{Re as D}from"./chunk-w136zswr.js";import{Se as B}from"./chunk-s0gmxpxm.js";import{Gf as d,If as w}from"./chunk-48rg4yhk.js";import{uP as n}from"./chunk-sh03ka27.js";var R=n(D(),1),i=n(d(),1),A=n(M(),1);import N from"fs/promises";var S=n(d(),1);var _="169.254.170.2",p="169.254.170.23",u="[fd00:ec2::23]",g=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===_||e.hostname===p||e.hostname===u)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let a=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new S.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
3
3
  - loopback CIDR 127.0.0.0/8 or [::1/128]
4
4
  - ECS container host 169.254.170.2
5
5
  - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};var f=n(d(),1),I=n(B(),1),P=n(w(),1),K=n(w(),1);function x(e){return new I.HttpRequest({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function E(e,c){let r=await K.sdkStreamMixin(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new f.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:P.parseRfc3339DateTime(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new f.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new f.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:c})}var T=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var j="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",J="http://169.254.170.2",$="AWS_CONTAINER_CREDENTIALS_FULL_URI",G="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",H="AWS_CONTAINER_AUTHORIZATION_TOKEN",k=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c,a=e.awsContainerCredentialsRelativeUri??process.env[j],r=e.awsContainerCredentialsFullUri??process.env[$],t=e.awsContainerAuthorizationToken??process.env[H],s=e.awsContainerAuthorizationTokenFile??process.env[G],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?.warn?console.warn:e.logger.warn.bind(e.logger);if(a&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${J}${a}`;else throw new i.CredentialsProviderError(`No HTTP credential provider host provided.
6
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let y=new URL(c);g(y,e.logger);let C=A.NodeHttpHandler.create({connectionTimeout:e.timeout??1000}),O=e.timeout??1000,b=T(async()=>{let o=x(y);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await N.readFile(s)).toString();try{let h=await C.handle(o,{requestTimeout:O});return E(h.response).then((v)=>R.setCredentialFeature(v,"CREDENTIALS_HTTP","z"))}catch(h){throw new i.CredentialsProviderError(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000);return async()=>{try{return await b()}finally{C.destroy?.()}}};export{k as ne};
6
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let y=new URL(c);g(y,e.logger);let C=A.NodeHttpHandler.create({connectionTimeout:e.timeout??1000}),O=e.timeout??1000,b=T(async()=>{let o=x(y);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await N.readFile(s)).toString();try{let h=await C.handle(o,{requestTimeout:O});return E(h.response).then((v)=>R.setCredentialFeature(v,"CREDENTIALS_HTTP","z"))}catch(h){throw new i.CredentialsProviderError(String(h),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000);return async()=>{try{return await b()}finally{C.destroy?.()}}};export{k as pe};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{h as _}from"./chunk-kr975sx0.js";import{G as W,H as Y,I as G}from"./chunk-ncvr75f6.js";import{de as X}from"./chunk-b274mb6v.js";import{ag as j}from"./chunk-h6kmpgak.js";import{Bg as O}from"./chunk-3tf7xfw5.js";import{yh as v}from"./chunk-88hmeyf5.js";import"./chunk-aykvrqrp.js";import"./chunk-2h8b0csf.js";import"./chunk-4q14whpc.js";import"./chunk-s81ck6bw.js";import"./chunk-jt7g0r2j.js";import"./chunk-84qx54nf.js";import{uj as H}from"./chunk-ep92grvg.js";import"./chunk-xf1y0sc6.js";import"./chunk-n24yx79r.js";import"./chunk-5qydhr42.js";import"./chunk-v30ezr68.js";import"./chunk-ex47pb9n.js";import"./chunk-jh2za7y4.js";import"./chunk-s3zmxfz2.js";import"./chunk-krk24aqm.js";import"./chunk-j7d3v0x2.js";import"./chunk-3hawwbw6.js";import"./chunk-4c6d1wy1.js";import"./chunk-vyf77kq1.js";import{Tq as F,yq as K}from"./chunk-bxc3z38f.js";import"./chunk-7wshaze9.js";import"./chunk-vbcekkw2.js";import"./chunk-4ngvj758.js";import"./chunk-cqtkxwd8.js";import"./chunk-wpkr3vzf.js";import"./chunk-49we3vy1.js";import"./chunk-y7cqyeve.js";import"./chunk-92xxg12q.js";import"./chunk-h8yf5e2e.js";import"./chunk-yvtbt12y.js";import"./chunk-g83d3a0t.js";import"./chunk-1p39y33b.js";import"./chunk-yg0rs4g1.js";import"./chunk-vhh80d5j.js";import"./chunk-wp0xd7at.js";import"./chunk-dzw0j790.js";import"./chunk-rvev3cy6.js";import"./chunk-c53ev0da.js";import"./chunk-78yvbv9b.js";import"./chunk-c5n49vrd.js";import"./chunk-bwzbcwff.js";import"./chunk-r6055kk0.js";import"./chunk-datctfgt.js";import"./chunk-x28chfpz.js";import"./chunk-mnxcykeq.js";import"./chunk-0bn86djg.js";import"./chunk-xphzr4wg.js";import"./chunk-hav9pgf3.js";import"./chunk-cshsqavb.js";import{CJ as z}from"./chunk-tz60e15h.js";import"./chunk-0tya4pqb.js";import"./chunk-63t0rhc9.js";import"./chunk-9svh74gt.js";var Q="forgewise";function R(D){return z.gen(function*(){let M=yield*D.get(Q);if(!M||M.type!=="api")return;return(M.metadata??{}).sub})}var w=()=>z.gen(function*(){if((yield*_())==="revoked")return null;let D=yield*z.promise(()=>K());if(!D)return yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+"Not signed in to Forgewise. Run `qitqode auth login` first."+j.Style.TEXT_NORMAL)),null;let M=yield*H.Service,T=D.method==="sso"?yield*R(M):void 0;return{key:D.key,method:D.method,sub:T}}),b=()=>z.gen(function*(){let D=yield*w();if(!D)return;let M=yield*z.tryPromise({try:()=>O(D),catch:(P)=>P}).pipe(z.map((P)=>({ok:!0,result:P})),z.catch((P)=>z.succeed({ok:!1,error:P})));if(!M.ok){let P=M.error instanceof F?M.error.message:"Could not fetch balance.";yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+P+j.Style.TEXT_NORMAL));return}let T=M.result;if(!T){yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+"Could not fetch balance."+j.Style.TEXT_NORMAL));return}yield*z.sync(()=>j.println(j.Style.TEXT_SUCCESS+"Qredits balance: "+j.Style.TEXT_NORMAL+j.Style.TEXT_HIGHLIGHT_BOLD+G(T.balance)+j.Style.TEXT_NORMAL))}).pipe(z.withSpan("qredits.balance")),q=()=>z.gen(function*(){let D=yield*w();if(!D)return;let M=D.method==="sso"&&D.sub?{userId:D.sub,accessToken:D.key}:{},T=yield*z.tryPromise({try:()=>Y({...M,limit:20}),catch:(J)=>J}).pipe(z.map((J)=>({ok:!0,result:J})),z.catch((J)=>z.succeed({ok:!1,error:J})));if(!T.ok){let J=T.error,$=J instanceof F?J.message+"\nPer-session spend is available with `qitqode usage`.":J instanceof W?J.message:String(J);yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+"Could not fetch history: "+$+j.Style.TEXT_NORMAL));return}let P=T.result;if(P.length===0){yield*z.sync(()=>j.println("No spend history yet."));return}let Z=j.Style.TEXT_DIM,V=j.Style.TEXT_NORMAL,x=j.Style.TEXT_DANGER;yield*z.sync(()=>{j.println(Z+" Date Description Amount"+V),j.println(Z+" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500"+V);for(let J of P){let $=(J.date||"").slice(0,10).padEnd(18),L=(J.description||"").slice(0,32).padEnd(32),N=(J.amount<0?"-":" ")+G(Math.abs(J.amount)),B=J.amount<0?x:V;j.println(` ${Z}${$}${V} ${L} ${B}${N}${V}`)}})}).pipe(z.withSpan("qredits.history")),m=X({command:"qredits <command>",describe:"Check Qredits balance and spend history",builder:(D)=>D.command(X({command:"balance",describe:"Show current Qredits balance",builder:(M)=>M,async handler(){j.empty(),await v.runPromise(b())}})).command(X({command:"history",describe:"Show recent Qredit spend history",builder:(M)=>M,async handler(){j.empty(),await v.runPromise(q())}})).demandCommand(),async handler(){}});export{q as historyEffect,b as balanceEffect,m as QreditsCommand};
2
+ import{h as _}from"./chunk-6y0wgz2j.js";import{G as W,H as Y,I as G}from"./chunk-9z7y4x7q.js";import{fe as X}from"./chunk-w8nj5ph5.js";import{cg as j}from"./chunk-psmwrvqs.js";import{Dg as O}from"./chunk-9gxyt2ay.js";import{Ah as v}from"./chunk-fd04358e.js";import"./chunk-qn1fhqyw.js";import"./chunk-674pexjx.js";import"./chunk-zjyaze0d.js";import"./chunk-xdcwx384.js";import"./chunk-rd08wx37.js";import"./chunk-fp2xgnjn.js";import{wj as H}from"./chunk-y1v7mf1a.js";import"./chunk-358wdvj7.js";import"./chunk-dn0437c1.js";import"./chunk-47jkx37s.js";import"./chunk-31a47ptm.js";import"./chunk-jwv6fda1.js";import"./chunk-hx13a8es.js";import"./chunk-h036zy9e.js";import"./chunk-j3agzs13.js";import"./chunk-3152y1q9.js";import"./chunk-71jmhvef.js";import"./chunk-qrztx1b4.js";import"./chunk-j1bv93m4.js";import{cp as K,xp as F}from"./chunk-pp10epga.js";import"./chunk-crqycrs4.js";import"./chunk-1bq15kf0.js";import"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import"./chunk-m6967jtv.js";import"./chunk-j2snkw45.js";import"./chunk-bmdqb48f.js";import"./chunk-3cs1qf8x.js";import"./chunk-4xqwt6dr.js";import"./chunk-g77kddrs.js";import"./chunk-9znfb8f2.js";import"./chunk-6kch0q2d.js";import"./chunk-6cztstry.js";import"./chunk-1mfdmm2t.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-2w3n0q9m.js";import"./chunk-6dd2dx69.js";import"./chunk-fdmz0502.js";import"./chunk-1a08ffyd.js";import"./chunk-8jkqyf9n.js";import"./chunk-6yshpz0z.js";import"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import{gI as z}from"./chunk-9kc2th5c.js";import"./chunk-hf39qx6t.js";import"./chunk-x0de4z05.js";import"./chunk-sh03ka27.js";var Q="forgewise";function R(D){return z.gen(function*(){let M=yield*D.get(Q);if(!M||M.type!=="api")return;return(M.metadata??{}).sub})}var w=()=>z.gen(function*(){if((yield*_())==="revoked")return null;let D=yield*z.promise(()=>K());if(!D)return yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+"Not signed in to Forgewise. Run `qitqode auth login` first."+j.Style.TEXT_NORMAL)),null;let M=yield*H.Service,T=D.method==="sso"?yield*R(M):void 0;return{key:D.key,method:D.method,sub:T}}),b=()=>z.gen(function*(){let D=yield*w();if(!D)return;let M=yield*z.tryPromise({try:()=>O(D),catch:(P)=>P}).pipe(z.map((P)=>({ok:!0,result:P})),z.catch((P)=>z.succeed({ok:!1,error:P})));if(!M.ok){let P=M.error instanceof F?M.error.message:"Could not fetch balance.";yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+P+j.Style.TEXT_NORMAL));return}let T=M.result;if(!T){yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+"Could not fetch balance."+j.Style.TEXT_NORMAL));return}yield*z.sync(()=>j.println(j.Style.TEXT_SUCCESS+"Qredits balance: "+j.Style.TEXT_NORMAL+j.Style.TEXT_HIGHLIGHT_BOLD+G(T.balance)+j.Style.TEXT_NORMAL))}).pipe(z.withSpan("qredits.balance")),q=()=>z.gen(function*(){let D=yield*w();if(!D)return;let M=D.method==="sso"&&D.sub?{userId:D.sub,accessToken:D.key}:{},T=yield*z.tryPromise({try:()=>Y({...M,limit:20}),catch:(J)=>J}).pipe(z.map((J)=>({ok:!0,result:J})),z.catch((J)=>z.succeed({ok:!1,error:J})));if(!T.ok){let J=T.error,$=J instanceof F?J.message+"\nPer-session spend is available with `qitqode usage`.":J instanceof W?J.message:String(J);yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+"Could not fetch history: "+$+j.Style.TEXT_NORMAL));return}let P=T.result;if(P.length===0){yield*z.sync(()=>j.println("No spend history yet."));return}let Z=j.Style.TEXT_DIM,V=j.Style.TEXT_NORMAL,x=j.Style.TEXT_DANGER;yield*z.sync(()=>{j.println(Z+" Date Description Amount"+V),j.println(Z+" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500"+V);for(let J of P){let $=(J.date||"").slice(0,10).padEnd(18),L=(J.description||"").slice(0,32).padEnd(32),N=(J.amount<0?"-":" ")+G(Math.abs(J.amount)),B=J.amount<0?x:V;j.println(` ${Z}${$}${V} ${L} ${B}${N}${V}`)}})}).pipe(z.withSpan("qredits.history")),m=X({command:"qredits <command>",describe:"Check Qredits balance and spend history",builder:(D)=>D.command(X({command:"balance",describe:"Show current Qredits balance",builder:(M)=>M,async handler(){j.empty(),await v.runPromise(b())}})).command(X({command:"history",describe:"Show recent Qredit spend history",builder:(M)=>M,async handler(){j.empty(),await v.runPromise(q())}})).demandCommand(),async handler(){}});export{q as historyEffect,b as balanceEffect,m as QreditsCommand};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Qe as e}from"./chunk-gfer8ch3.js";import{Ef as K}from"./chunk-wqkvsj5y.js";import{QQ as A}from"./chunk-9svh74gt.js";var J=A(K(),1);var Q=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",X=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var wc=1000,hc=0,Z=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var _=A(K(),1);import q from"http";function S(c){return new Promise((I,x)=>{let T=q.request({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new _.ProviderError("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new _.ProviderError("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new _.ProviderError("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let $=[];N.on("data",(y)=>{$.push(y)}),N.on("end",()=>{I(Buffer.concat($)),T.destroy()})}),T.end()})}var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var v="AWS_CONTAINER_CREDENTIALS_FULL_URI",W="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",t="AWS_CONTAINER_AUTHORIZATION_TOKEN",Kc=(c={})=>{let{timeout:I,maxRetries:x}=Z(c);return()=>m(async()=>{let T=await l({logger:c.logger}),N=JSON.parse(await a(I,T));if(!Q(N))throw new J.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return X(N)},x)},a=async(c,I)=>{if(process.env[t])I.headers={...I.headers,Authorization:process.env[t]};return(await S({...I,timeout:c})).toString()},o="169.254.170.2",s=new Set(["localhost","127.0.0.1"]),g=new Set(["http:","https:"]),l=async({logger:c})=>{if(process.env[W])return{hostname:o,path:process.env[W]};if(process.env[v]){let I;try{I=new URL(process.env[v])}catch{throw new J.CredentialsProviderError(`${process.env[v]} is not a valid container metadata service URL`,{tryNextLink:!1,logger:c})}if(!I.hostname||!s.has(I.hostname))throw new J.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!g.has(I.protocol))throw new J.CredentialsProviderError(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{protocol:I.protocol,hostname:I.hostname,path:I.pathname+I.search,port:I.port?parseInt(I.port,10):void 0}}throw new J.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${W} or ${v} environment variable is set`,{tryNextLink:!1,logger:c})};var G=A(K(),1);var U=A(K(),1);class D extends U.CredentialsProviderError{tryNextLink;name="InstanceMetadataV1FallbackError";constructor(c,I=!0){super(c,I);this.tryNextLink=I,Object.setPrototypeOf(this,D.prototype)}}var b=A(K(),1),V=A(e(),1);var z;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(z||(z={}));var F={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var f;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(f||(f={}));var r="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",d="ec2_metadata_service_endpoint_mode",P={environmentVariableSelector:(c)=>c[r],configFileSelector:(c)=>c[d],default:f.IPv4};var H=async()=>V.parseUrl(await i()||await cc()),i=async()=>b.loadConfig(F)(),cc=async()=>{let c=await b.loadConfig(P)();switch(c){case f.IPv4:return z.IPv4;case f.IPv6:return z.IPv6;default:throw Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(f)}`)}};var L=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.
3
- For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var k=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var p="/latest/meta-data/iam/security-credentials/",Ic="/latest/api/token",B="AWS_EC2_METADATA_V1_DISABLED",R="ec2_metadata_v1_disabled",M="x-aws-ec2-metadata-token",pc=(c={})=>k(Tc(c),{logger:c.logger}),Tc=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=Z(c),$=async(y,j)=>{if(I||j.headers?.[M]==null){let w=!1,h=!1,n=await G.loadConfig({environmentVariableSelector:(Y)=>{let u=Y[B];if(h=!!u&&u!=="false",u===void 0)throw new G.CredentialsProviderError(`${B} not set in env, checking config file next.`,{logger:c.logger});return h},configFileSelector:(Y)=>{let u=Y[R];return w=!!u&&u!=="false",w},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||n){let Y=[];if(c.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(w)Y.push(`config file profile (${R})`);if(h)Y.push(`process environment variable (${B})`);throw new D(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}let C=(await m(async()=>{let w;try{w=await xc(j)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)).trim();return m(async()=>{let w;try{w=await Oc(C,j,c)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)};return async()=>{let y=await H();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(O,{...y,timeout:N});else{let j;try{j=(await Nc({...y,timeout:N})).toString()}catch(E){if(E?.statusCode===400)throw Object.assign(E,{message:"EC2 Metadata token request returned error"});else if(E.message==="TimeoutError"||[403,404,405].includes(E.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(O,{...y,timeout:N})}return $(O,{...y,headers:{[M]:j},timeout:N})}}},Nc=async(c)=>S({...c,path:Ic,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),xc=async(c)=>(await S({...c,path:p})).toString(),Oc=async(c,I,x)=>{let T=JSON.parse((await S({...I,path:p+c})).toString());if(!Q(T))throw new G.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return X(T)};export{wc as oe,hc as pe,Z as qe,S as re,v as se,W as te,t as ue,Kc as ve,z as we,H as xe,pc as ye};
2
+ import{Se as e}from"./chunk-s0gmxpxm.js";import{Gf as K}from"./chunk-48rg4yhk.js";import{uP as A}from"./chunk-sh03ka27.js";var J=A(K(),1);var Q=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",X=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var wc=1000,hc=0,Z=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var _=A(K(),1);import q from"http";function S(c){return new Promise((I,x)=>{let T=q.request({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new _.ProviderError("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new _.ProviderError("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{let{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new _.ProviderError("Error response received from instance metadata service"),{statusCode:O})),T.destroy();let $=[];N.on("data",(y)=>{$.push(y)}),N.on("end",()=>{I(Buffer.concat($)),T.destroy()})}),T.end()})}var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var v="AWS_CONTAINER_CREDENTIALS_FULL_URI",W="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",t="AWS_CONTAINER_AUTHORIZATION_TOKEN",Kc=(c={})=>{let{timeout:I,maxRetries:x}=Z(c);return()=>m(async()=>{let T=await l({logger:c.logger}),N=JSON.parse(await a(I,T));if(!Q(N))throw new J.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:c.logger});return X(N)},x)},a=async(c,I)=>{if(process.env[t])I.headers={...I.headers,Authorization:process.env[t]};return(await S({...I,timeout:c})).toString()},o="169.254.170.2",s=new Set(["localhost","127.0.0.1"]),g=new Set(["http:","https:"]),l=async({logger:c})=>{if(process.env[W])return{hostname:o,path:process.env[W]};if(process.env[v]){let I;try{I=new URL(process.env[v])}catch{throw new J.CredentialsProviderError(`${process.env[v]} is not a valid container metadata service URL`,{tryNextLink:!1,logger:c})}if(!I.hostname||!s.has(I.hostname))throw new J.CredentialsProviderError(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!g.has(I.protocol))throw new J.CredentialsProviderError(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{protocol:I.protocol,hostname:I.hostname,path:I.pathname+I.search,port:I.port?parseInt(I.port,10):void 0}}throw new J.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${W} or ${v} environment variable is set`,{tryNextLink:!1,logger:c})};var G=A(K(),1);var U=A(K(),1);class D extends U.CredentialsProviderError{tryNextLink;name="InstanceMetadataV1FallbackError";constructor(c,I=!0){super(c,I);this.tryNextLink=I,Object.setPrototypeOf(this,D.prototype)}}var b=A(K(),1),V=A(e(),1);var z;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(z||(z={}));var F={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var f;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(f||(f={}));var r="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",d="ec2_metadata_service_endpoint_mode",P={environmentVariableSelector:(c)=>c[r],configFileSelector:(c)=>c[d],default:f.IPv4};var H=async()=>V.parseUrl(await i()||await cc()),i=async()=>b.loadConfig(F)(),cc=async()=>{let c=await b.loadConfig(P)();switch(c){case f.IPv4:return z.IPv4;case f.IPv6:return z.IPv6;default:throw Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(f)}`)}};var L=(c,I)=>{let x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.
3
+ For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var k=(c,I={})=>{let x=I?.logger||console,T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var p="/latest/meta-data/iam/security-credentials/",Ic="/latest/api/token",B="AWS_EC2_METADATA_V1_DISABLED",R="ec2_metadata_v1_disabled",M="x-aws-ec2-metadata-token",pc=(c={})=>k(Tc(c),{logger:c.logger}),Tc=(c={})=>{let I=!1,{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=Z(c),$=async(y,j)=>{if(I||j.headers?.[M]==null){let w=!1,h=!1,n=await G.loadConfig({environmentVariableSelector:(Y)=>{let u=Y[B];if(h=!!u&&u!=="false",u===void 0)throw new G.CredentialsProviderError(`${B} not set in env, checking config file next.`,{logger:c.logger});return h},configFileSelector:(Y)=>{let u=Y[R];return w=!!u&&u!=="false",w},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||n){let Y=[];if(c.ec2MetadataV1Disabled)Y.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(w)Y.push(`config file profile (${R})`);if(h)Y.push(`process environment variable (${B})`);throw new D(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Y.join(", ")}].`)}}let C=(await m(async()=>{let w;try{w=await xc(j)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)).trim();return m(async()=>{let w;try{w=await Oc(C,j,c)}catch(h){if(h.statusCode===401)I=!1;throw h}return w},y)};return async()=>{let y=await H();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(O,{...y,timeout:N});else{let j;try{j=(await Nc({...y,timeout:N})).toString()}catch(E){if(E?.statusCode===400)throw Object.assign(E,{message:"EC2 Metadata token request returned error"});else if(E.message==="TimeoutError"||[403,404,405].includes(E.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(O,{...y,timeout:N})}return $(O,{...y,headers:{[M]:j},timeout:N})}}},Nc=async(c)=>S({...c,path:Ic,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),xc=async(c)=>(await S({...c,path:p})).toString(),Oc=async(c,I,x)=>{let T=JSON.parse((await S({...I,path:p+c})).toString());if(!Q(T))throw new G.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:x.logger});return X(T)};export{wc as qe,hc as re,Z as se,S as te,v as ue,W as ve,t as we,Kc as xe,z as ye,H as ze,pc as Ae};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var o=[{test:(a)=>a.startsWith("en"),locale:"en"},{test:(a)=>a.startsWith("zh")&&/(hant|tw|hk|mo)/.test(a),locale:"zht"},{test:(a)=>a.startsWith("zh"),locale:"zh"},{test:(a)=>a.startsWith("ko"),locale:"ko"},{test:(a)=>a.startsWith("de"),locale:"de"},{test:(a)=>a.startsWith("es"),locale:"es"},{test:(a)=>a.startsWith("fr"),locale:"fr"},{test:(a)=>a.startsWith("da"),locale:"da"},{test:(a)=>a.startsWith("ja"),locale:"ja"},{test:(a)=>a.startsWith("pl"),locale:"pl"},{test:(a)=>a.startsWith("ru"),locale:"ru"},{test:(a)=>a.startsWith("ar"),locale:"ar"},{test:(a)=>/^(no|nb|nn)/.test(a),locale:"no"},{test:(a)=>a.startsWith("pt")&&/br/.test(a),locale:"br"},{test:(a)=>a.startsWith("pt"),locale:"pt"},{test:(a)=>a.startsWith("th"),locale:"th"},{test:(a)=>a.startsWith("bs"),locale:"bs"},{test:(a)=>a.startsWith("tr"),locale:"tr"}],s=new Set(["Asia/Shanghai","Asia/Chongqing","Asia/Harbin","Asia/Urumqi","Asia/Kashgar"]),A=new Set(["Asia/Hong_Kong","Asia/Macau","Asia/Macao","Asia/Taipei"]),m=new Set(["Asia/Tokyo"]),l=new Set(["Europe/Paris","Europe/Monaco","Indian/Reunion","Indian/Mayotte","Pacific/Noumea","Pacific/Tahiti","Pacific/Marquesas","Pacific/Gambier","America/Martinique","America/Guadeloupe","America/St_Barthelemy","America/Cayenne","America/Miquelon"]),u=new Set(["Europe/Moscow","Europe/Kaliningrad","Europe/Samara","Europe/Volgograd","Europe/Saratov","Europe/Astrakhan","Europe/Kirov","Europe/Ulyanovsk","Europe/Simferopol","Europe/Minsk","Asia/Yekaterinburg","Asia/Omsk","Asia/Novosibirsk","Asia/Novokuznetsk","Asia/Krasnoyarsk","Asia/Irkutsk","Asia/Chita","Asia/Yakutsk","Asia/Khandyga","Asia/Vladivostok","Asia/Ust-Nera","Asia/Magadan","Asia/Sakhalin","Asia/Srednekolymsk","Asia/Kamchatka","Asia/Anadyr","Asia/Barnaul","Asia/Tomsk"]),h=new Set(["Europe/Madrid","Atlantic/Canary","Africa/Ceuta","America/Mexico_City","America/Tijuana","America/Hermosillo","America/Mazatlan","America/Chihuahua","America/Monterrey","America/Cancun","America/Merida","America/Matamoros","America/Bahia_Banderas","America/Ojinaga","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Panama","America/Guatemala","America/Tegucigalpa","America/Managua","America/Costa_Rica","America/El_Salvador","America/Bogota","America/Caracas","America/Guayaquil","America/Lima","America/La_Paz","America/Asuncion","America/Montevideo","America/Santiago","America/Punta_Arenas","Pacific/Easter","America/Argentina/Buenos_Aires","America/Argentina/Cordoba","America/Argentina/Salta","America/Argentina/Jujuy","America/Argentina/Tucuman","America/Argentina/Catamarca","America/Argentina/La_Rioja","America/Argentina/San_Juan","America/Argentina/Mendoza","America/Argentina/San_Luis","America/Argentina/Rio_Gallegos","America/Argentina/Ushuaia"]),d=new Set(["America/New_York","America/Detroit","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Indiana/Indianapolis","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Vevay","America/Indiana/Tell_City","America/Indiana/Knox","America/Chicago","America/Menominee","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/North_Dakota/Beulah","America/Denver","America/Boise","America/Phoenix","America/Los_Angeles","America/Anchorage","America/Juneau","America/Sitka","America/Metlakatla","America/Yakutat","America/Nome","America/Adak","Pacific/Honolulu","America/Toronto","America/Vancouver","America/Edmonton","America/Winnipeg","America/Halifax","America/St_Johns","America/Regina","America/Whitehorse","Europe/London","Europe/Belfast","Europe/Dublin","Australia/Sydney","Australia/Melbourne","Australia/Brisbane","Australia/Perth","Australia/Adelaide","Australia/Hobart","Australia/Darwin","Pacific/Auckland"]);function g(){try{let a=Intl.DateTimeFormat().resolvedOptions().timeZone;if(!a)return;if(A.has(a))return"zht";if(s.has(a))return"zh";if(m.has(a))return"ja";if(u.has(a))return"ru";if(l.has(a))return"fr";if(h.has(a))return"es";if(d.has(a))return"en"}catch{}return}function f(){let a=g();if(a)return a;for(let t of["LC_ALL","LC_MESSAGES","LANG","LANGUAGE"]){let e=process.env[t];if(!e)continue;for(let r of e.split(":")){let i=r.replace(/[.@].*$/,"").replace(/_/g,"-").toLowerCase();if(!i||i==="c"||i==="posix")continue;let n=o.find((c)=>c.test(i));if(n)return n.locale}}try{let t=Intl.DateTimeFormat().resolvedOptions().locale.toLowerCase(),e=o.find((r)=>r.test(t));if(e)return e.locale}catch{}return"en"}
3
- export{f as U};
3
+ export{f as W};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Re as u,Se as S,Te as v}from"./chunk-sjtq9bbb.js";import{Ue as q,Ze as U,bf as k,ef as y,hf as $,if as D,mf as N,nf as A,rf as E,tf as H,vf as O}from"./chunk-89b6ttzs.js";import"./chunk-4ngvj758.js";import"./chunk-cqtkxwd8.js";import"./chunk-wpkr3vzf.js";import{fw as j}from"./chunk-xphzr4wg.js";import"./chunk-hav9pgf3.js";import"./chunk-9svh74gt.js";var C=$(()=>D(j.object({error:j.object({message:j.string()})}))),f=$(()=>D(j.object({id:j.string().nullish(),model:j.string().nullish(),results:j.array(j.object({index:j.number(),relevance_score:j.number()})),usage:j.object({prompt_tokens:j.number(),completion_tokens:j.number(),total_tokens:j.number()})}))),M=$(()=>D(j.object({rankFields:j.array(j.string()).optional()}))),h=class{constructor(F,G){this.specificationVersion="v3",this.modelId=F,this.config=G}get provider(){return this.config.provider}async doRerank({documents:F,headers:G,query:K,topN:V,abortSignal:W,providerOptions:Y}){var J,P;let Z=await N({provider:"togetherai",providerOptions:Y,schema:M}),{responseHeaders:X,value:B,rawValue:x}=await A({url:`${this.config.baseURL}/rerank`,headers:q(this.config.headers(),G),body:{model:this.modelId,documents:F.values,query:K,top_n:V,rank_fields:Z==null?void 0:Z.rankFields,return_documents:!1},failedResponseHandler:E({errorSchema:C,errorToMessage:(Q)=>Q.error.message}),successfulResponseHandler:H(f),abortSignal:W,fetch:this.config.fetch});return{ranking:B.results.map((Q)=>({index:Q.index,relevanceScore:Q.relevance_score})),response:{id:(J=B.id)!=null?J:void 0,modelId:(P=B.model)!=null?P:void 0,headers:X,body:x}}}},I=class{constructor(F,G){this.modelId=F,this.config=G,this.specificationVersion="v3",this.maxImagesPerCall=1}get provider(){return this.config.provider}async doGenerate({prompt:F,n:G,size:K,seed:V,providerOptions:W,headers:Y,abortSignal:J,files:P,mask:Z}){var X,B,x;let Q=[];if(Z!=null)throw Error("Together AI does not support mask-based image editing. Use FLUX Kontext models (e.g., black-forest-labs/FLUX.1-kontext-pro) with a reference image and descriptive prompt instead.");if(K!=null)Q.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support the `aspectRatio` option. Use `size` instead."});let _=(x=(B=(X=this.config._internal)==null?void 0:X.currentDate)==null?void 0:B.call(X))!=null?x:new Date,R=await N({provider:"togetherai",providerOptions:W,schema:m}),w;if(P!=null&&P.length>0){if(w=U(P[0]),P.length>1)Q.push({type:"other",message:"Together AI only supports a single input image. Additional images are ignored."})}let T=K==null?void 0:K.split("x"),{value:b,responseHeaders:z}=await A({url:`${this.config.baseURL}/images/generations`,headers:q(this.config.headers(),Y),body:{model:this.modelId,prompt:F,seed:V,...G>1?{n:G}:{},...T&&{width:parseInt(T[0]),height:parseInt(T[1])},...w!=null?{image_url:w}:{},response_format:"base64",...R!=null?R:{}},failedResponseHandler:E({errorSchema:g,errorToMessage:(L)=>L.error.message}),successfulResponseHandler:H(c),abortSignal:J,fetch:this.config.fetch});return{images:b.data.map((L)=>L.b64_json),warnings:Q,response:{timestamp:_,modelId:this.modelId,headers:z}}}},c=j.object({data:j.array(j.object({b64_json:j.string()}))}),g=j.object({error:j.object({message:j.string()})}),m=$(()=>D(j.object({steps:j.number().nullish(),guidance:j.number().nullish(),negative_prompt:j.string().nullish(),disable_safety_checker:j.boolean().nullish()}).passthrough())),p="2.0.41";function l(){if(typeof process>"u")return;if(typeof process.env.TOGETHER_API_KEY==="string")return;let F=process.env.TOGETHER_AI_API_KEY;if(typeof F==="string")console.warn("TOGETHER_AI_API_KEY is deprecated and will be removed in a future release. Please use TOGETHER_API_KEY instead.");return F}function n(F={}){var G;let K=O((G=F.baseURL)!=null?G:"https://api.together.xyz/v1/"),V=()=>{var x;return k({Authorization:`Bearer ${y({apiKey:(x=F.apiKey)!=null?x:l(),environmentVariableName:"TOGETHER_API_KEY",description:"TogetherAI"})}`,...F.headers},`ai-sdk/togetherai/${p}`)},W=(x)=>({provider:`togetherai.${x}`,url:({path:Q})=>`${K}${Q}`,headers:V,fetch:F.fetch}),Y=(x)=>{return new u(x,W("chat"))},J=(x)=>new S(x,W("completion")),P=(x)=>new v(x,W("embedding")),Z=(x)=>new I(x,{...W("image"),baseURL:K!=null?K:"https://api.together.xyz/v1/"}),X=(x)=>new h(x,{...W("reranking"),baseURL:K!=null?K:"https://api.together.xyz/v1/"}),B=(x)=>Y(x);return B.specificationVersion="v3",B.completionModel=J,B.languageModel=Y,B.chatModel=Y,B.embeddingModel=P,B.textEmbeddingModel=P,B.image=Z,B.imageModel=Z,B.reranking=X,B.rerankingModel=X,B}var xj=n();export{xj as togetherai,n as createTogetherAI,p as VERSION};
2
+ import{Te as u,Ue as S,Ve as v}from"./chunk-meehnnv9.js";import{$e as U,We as q,df as k,gf as y,jf as $,kf as D,of as N,pf as A,tf as E,vf as H,xf as O}from"./chunk-4ycg2c6f.js";import"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import{Lu as j}from"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-sh03ka27.js";var C=$(()=>D(j.object({error:j.object({message:j.string()})}))),f=$(()=>D(j.object({id:j.string().nullish(),model:j.string().nullish(),results:j.array(j.object({index:j.number(),relevance_score:j.number()})),usage:j.object({prompt_tokens:j.number(),completion_tokens:j.number(),total_tokens:j.number()})}))),M=$(()=>D(j.object({rankFields:j.array(j.string()).optional()}))),h=class{constructor(F,G){this.specificationVersion="v3",this.modelId=F,this.config=G}get provider(){return this.config.provider}async doRerank({documents:F,headers:G,query:K,topN:V,abortSignal:W,providerOptions:Y}){var J,P;let Z=await N({provider:"togetherai",providerOptions:Y,schema:M}),{responseHeaders:X,value:B,rawValue:x}=await A({url:`${this.config.baseURL}/rerank`,headers:q(this.config.headers(),G),body:{model:this.modelId,documents:F.values,query:K,top_n:V,rank_fields:Z==null?void 0:Z.rankFields,return_documents:!1},failedResponseHandler:E({errorSchema:C,errorToMessage:(Q)=>Q.error.message}),successfulResponseHandler:H(f),abortSignal:W,fetch:this.config.fetch});return{ranking:B.results.map((Q)=>({index:Q.index,relevanceScore:Q.relevance_score})),response:{id:(J=B.id)!=null?J:void 0,modelId:(P=B.model)!=null?P:void 0,headers:X,body:x}}}},I=class{constructor(F,G){this.modelId=F,this.config=G,this.specificationVersion="v3",this.maxImagesPerCall=1}get provider(){return this.config.provider}async doGenerate({prompt:F,n:G,size:K,seed:V,providerOptions:W,headers:Y,abortSignal:J,files:P,mask:Z}){var X,B,x;let Q=[];if(Z!=null)throw Error("Together AI does not support mask-based image editing. Use FLUX Kontext models (e.g., black-forest-labs/FLUX.1-kontext-pro) with a reference image and descriptive prompt instead.");if(K!=null)Q.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support the `aspectRatio` option. Use `size` instead."});let _=(x=(B=(X=this.config._internal)==null?void 0:X.currentDate)==null?void 0:B.call(X))!=null?x:new Date,R=await N({provider:"togetherai",providerOptions:W,schema:m}),w;if(P!=null&&P.length>0){if(w=U(P[0]),P.length>1)Q.push({type:"other",message:"Together AI only supports a single input image. Additional images are ignored."})}let T=K==null?void 0:K.split("x"),{value:b,responseHeaders:z}=await A({url:`${this.config.baseURL}/images/generations`,headers:q(this.config.headers(),Y),body:{model:this.modelId,prompt:F,seed:V,...G>1?{n:G}:{},...T&&{width:parseInt(T[0]),height:parseInt(T[1])},...w!=null?{image_url:w}:{},response_format:"base64",...R!=null?R:{}},failedResponseHandler:E({errorSchema:g,errorToMessage:(L)=>L.error.message}),successfulResponseHandler:H(c),abortSignal:J,fetch:this.config.fetch});return{images:b.data.map((L)=>L.b64_json),warnings:Q,response:{timestamp:_,modelId:this.modelId,headers:z}}}},c=j.object({data:j.array(j.object({b64_json:j.string()}))}),g=j.object({error:j.object({message:j.string()})}),m=$(()=>D(j.object({steps:j.number().nullish(),guidance:j.number().nullish(),negative_prompt:j.string().nullish(),disable_safety_checker:j.boolean().nullish()}).passthrough())),p="2.0.41";function l(){if(typeof process>"u")return;if(typeof process.env.TOGETHER_API_KEY==="string")return;let F=process.env.TOGETHER_AI_API_KEY;if(typeof F==="string")console.warn("TOGETHER_AI_API_KEY is deprecated and will be removed in a future release. Please use TOGETHER_API_KEY instead.");return F}function n(F={}){var G;let K=O((G=F.baseURL)!=null?G:"https://api.together.xyz/v1/"),V=()=>{var x;return k({Authorization:`Bearer ${y({apiKey:(x=F.apiKey)!=null?x:l(),environmentVariableName:"TOGETHER_API_KEY",description:"TogetherAI"})}`,...F.headers},`ai-sdk/togetherai/${p}`)},W=(x)=>({provider:`togetherai.${x}`,url:({path:Q})=>`${K}${Q}`,headers:V,fetch:F.fetch}),Y=(x)=>{return new u(x,W("chat"))},J=(x)=>new S(x,W("completion")),P=(x)=>new v(x,W("embedding")),Z=(x)=>new I(x,{...W("image"),baseURL:K!=null?K:"https://api.together.xyz/v1/"}),X=(x)=>new h(x,{...W("reranking"),baseURL:K!=null?K:"https://api.together.xyz/v1/"}),B=(x)=>Y(x);return B.specificationVersion="v3",B.completionModel=J,B.languageModel=Y,B.chatModel=Y,B.embeddingModel=P,B.textEmbeddingModel=P,B.image=Z,B.imageModel=Z,B.reranking=X,B.rerankingModel=X,B}var xj=n();export{xj as togetherai,n as createTogetherAI,p as VERSION};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{fl as a,gl as b,hl as c,il as d,jl as e,kl as f,ll as g,ml as h,nl as i}from"./chunk-358wdvj7.js";import"./chunk-47jkx37s.js";import"./chunk-h036zy9e.js";import"./chunk-3152y1q9.js";import"./chunk-6cztstry.js";import"./chunk-1mfdmm2t.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-8jkqyf9n.js";import"./chunk-6yshpz0z.js";import"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-sh03ka27.js";export{i as stopRefresh,h as startRefresh,g as refresh,d as readModelCatalogResponse,f as get,c as Provider,b as Model,a as MODEL_CATALOG_MAX_BYTES,e as Data};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{me as a}from"./chunk-x3dzzq0t.js";import"./chunk-w136zswr.js";import"./chunk-s0gmxpxm.js";import"./chunk-48rg4yhk.js";import"./chunk-sh03ka27.js";export{a as fromIni};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{RQ as LC}from"./chunk-9svh74gt.js";var OC=LC((QC,A)=>{var P,h,j,I,b,y,g,k,f,m,u,x,l,D,z,_,d,c,E,v,n,p,i,s,a,o,t,r,w,e,CC,HC;(function(X){var R=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){X(q(R,q(G)))});else if(typeof A==="object"&&typeof QC==="object")X(q(R,q(QC)));else X(q(R));function q(G,S){if(G!==R)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(C,H){return G[C]=S?S(C,H):H}}})(function(X){var R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,H){C.__proto__=H}||function(C,H){for(var L in H)if(Object.prototype.hasOwnProperty.call(H,L))C[L]=H[L]};P=function(C,H){if(typeof H!=="function"&&H!==null)throw TypeError("Class extends value "+String(H)+" is not a constructor or null");R(C,H);function L(){this.constructor=C}C.prototype=H===null?Object.create(H):(L.prototype=H.prototype,new L)},h=Object.assign||function(C){for(var H,L=1,O=arguments.length;L<O;L++){H=arguments[L];for(var Q in H)if(Object.prototype.hasOwnProperty.call(H,Q))C[Q]=H[Q]}return C},j=function(C,H){var L={};for(var O in C)if(Object.prototype.hasOwnProperty.call(C,O)&&H.indexOf(O)<0)L[O]=C[O];if(C!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Q=0,O=Object.getOwnPropertySymbols(C);Q<O.length;Q++)if(H.indexOf(O[Q])<0&&Object.prototype.propertyIsEnumerable.call(C,O[Q]))L[O[Q]]=C[O[Q]]}return L},I=function(C,H,L,O){var Q=arguments.length,T=Q<3?H:O===null?O=Object.getOwnPropertyDescriptor(H,L):O,U;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")T=Reflect.decorate(C,H,L,O);else for(var Y=C.length-1;Y>=0;Y--)if(U=C[Y])T=(Q<3?U(T):Q>3?U(H,L,T):U(H,L))||T;return Q>3&&T&&Object.defineProperty(H,L,T),T},b=function(C,H){return function(L,O){H(L,O,C)}},y=function(C,H,L,O,Q,T){function U(K){if(K!==void 0&&typeof K!=="function")throw TypeError("Function expected");return K}var Y=O.kind,J=Y==="getter"?"get":Y==="setter"?"set":"value",W=!H&&C?O.static?C:C.prototype:null,$=H||(W?Object.getOwnPropertyDescriptor(W,O.name):{}),M,F=!1;for(var Z=L.length-1;Z>=0;Z--){var N={};for(var B in O)N[B]=B==="access"?{}:O[B];for(var B in O.access)N.access[B]=O.access[B];N.addInitializer=function(K){if(F)throw TypeError("Cannot add initializers after decoration has completed");T.push(U(K||null))};var V=(0,L[Z])(Y==="accessor"?{get:$.get,set:$.set}:$[J],N);if(Y==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw TypeError("Object expected");if(M=U(V.get))$.get=M;if(M=U(V.set))$.set=M;if(M=U(V.init))Q.unshift(M)}else if(M=U(V))if(Y==="field")Q.unshift(M);else $[J]=M}if(W)Object.defineProperty(W,O.name,$);F=!0},g=function(C,H,L){var O=arguments.length>2;for(var Q=0;Q<H.length;Q++)L=O?H[Q].call(C,L):H[Q].call(C);return O?L:void 0},k=function(C){return typeof C==="symbol"?C:"".concat(C)},f=function(C,H,L){if(typeof H==="symbol")H=H.description?"[".concat(H.description,"]"):"";return Object.defineProperty(C,"name",{configurable:!0,value:L?"".concat(L," ",H):H})},m=function(C,H){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(C,H)},u=function(C,H,L,O){function Q(T){return T instanceof L?T:new L(function(U){U(T)})}return new(L||(L=Promise))(function(T,U){function Y($){try{W(O.next($))}catch(M){U(M)}}function J($){try{W(O.throw($))}catch(M){U(M)}}function W($){$.done?T($.value):Q($.value).then(Y,J)}W((O=O.apply(C,H||[])).next())})},x=function(C,H){var L={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},O,Q,T,U=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return U.next=Y(0),U.throw=Y(1),U.return=Y(2),typeof Symbol==="function"&&(U[Symbol.iterator]=function(){return this}),U;function Y(W){return function($){return J([W,$])}}function J(W){if(O)throw TypeError("Generator is already executing.");while(U&&(U=0,W[0]&&(L=0)),L)try{if(O=1,Q&&(T=W[0]&2?Q.return:W[0]?Q.throw||((T=Q.return)&&T.call(Q),0):Q.next)&&!(T=T.call(Q,W[1])).done)return T;if(Q=0,T)W=[W[0]&2,T.value];switch(W[0]){case 0:case 1:T=W;break;case 4:return L.label++,{value:W[1],done:!1};case 5:L.label++,Q=W[1],W=[0];continue;case 7:W=L.ops.pop(),L.trys.pop();continue;default:if((T=L.trys,!(T=T.length>0&&T[T.length-1]))&&(W[0]===6||W[0]===2)){L=0;continue}if(W[0]===3&&(!T||W[1]>T[0]&&W[1]<T[3])){L.label=W[1];break}if(W[0]===6&&L.label<T[1]){L.label=T[1],T=W;break}if(T&&L.label<T[2]){L.label=T[2],L.ops.push(W);break}if(T[2])L.ops.pop();L.trys.pop();continue}W=H.call(C,L)}catch($){W=[6,$],Q=0}finally{O=T=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}},l=function(C,H){for(var L in C)if(L!=="default"&&!Object.prototype.hasOwnProperty.call(H,L))w(H,C,L)},w=Object.create?function(C,H,L,O){if(O===void 0)O=L;var Q=Object.getOwnPropertyDescriptor(H,L);if(!Q||("get"in Q?!H.__esModule:Q.writable||Q.configurable))Q={enumerable:!0,get:function(){return H[L]}};Object.defineProperty(C,O,Q)}:function(C,H,L,O){if(O===void 0)O=L;C[O]=H[L]},D=function(C){var H=typeof Symbol==="function"&&Symbol.iterator,L=H&&C[H],O=0;if(L)return L.call(C);if(C&&typeof C.length==="number")return{next:function(){if(C&&O>=C.length)C=void 0;return{value:C&&C[O++],done:!C}}};throw TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(C,H){var L=typeof Symbol==="function"&&C[Symbol.iterator];if(!L)return C;var O=L.call(C),Q,T=[],U;try{while((H===void 0||H-- >0)&&!(Q=O.next()).done)T.push(Q.value)}catch(Y){U={error:Y}}finally{try{if(Q&&!Q.done&&(L=O.return))L.call(O)}finally{if(U)throw U.error}}return T},_=function(){for(var C=[],H=0;H<arguments.length;H++)C=C.concat(z(arguments[H]));return C},d=function(){for(var C=0,H=0,L=arguments.length;H<L;H++)C+=arguments[H].length;for(var O=Array(C),Q=0,H=0;H<L;H++)for(var T=arguments[H],U=0,Y=T.length;U<Y;U++,Q++)O[Q]=T[U];return O},c=function(C,H,L){if(L||arguments.length===2){for(var O=0,Q=H.length,T;O<Q;O++)if(T||!(O in H)){if(!T)T=Array.prototype.slice.call(H,0,O);T[O]=H[O]}}return C.concat(T||Array.prototype.slice.call(H))},E=function(C){return this instanceof E?(this.v=C,this):new E(C)},v=function(C,H,L){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var O=L.apply(C,H||[]),Q,T=[];return Q=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),Y("next"),Y("throw"),Y("return",U),Q[Symbol.asyncIterator]=function(){return this},Q;function U(Z){return function(N){return Promise.resolve(N).then(Z,M)}}function Y(Z,N){if(O[Z]){if(Q[Z]=function(B){return new Promise(function(V,K){T.push([Z,B,V,K])>1||J(Z,B)})},N)Q[Z]=N(Q[Z])}}function J(Z,N){try{W(O[Z](N))}catch(B){F(T[0][3],B)}}function W(Z){Z.value instanceof E?Promise.resolve(Z.value.v).then($,M):F(T[0][2],Z)}function $(Z){J("next",Z)}function M(Z){J("throw",Z)}function F(Z,N){if(Z(N),T.shift(),T.length)J(T[0][0],T[0][1])}},n=function(C){var H,L;return H={},O("next"),O("throw",function(Q){throw Q}),O("return"),H[Symbol.iterator]=function(){return this},H;function O(Q,T){H[Q]=C[Q]?function(U){return(L=!L)?{value:E(C[Q](U)),done:!1}:T?T(U):U}:T}},p=function(C){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var H=C[Symbol.asyncIterator],L;return H?H.call(C):(C=typeof D==="function"?D(C):C[Symbol.iterator](),L={},O("next"),O("throw"),O("return"),L[Symbol.asyncIterator]=function(){return this},L);function O(T){L[T]=C[T]&&function(U){return new Promise(function(Y,J){U=C[T](U),Q(Y,J,U.done,U.value)})}}function Q(T,U,Y,J){Promise.resolve(J).then(function(W){T({value:W,done:Y})},U)}},i=function(C,H){if(Object.defineProperty)Object.defineProperty(C,"raw",{value:H});else C.raw=H;return C};var q=Object.create?function(C,H){Object.defineProperty(C,"default",{enumerable:!0,value:H})}:function(C,H){C.default=H},G=function(C){return G=Object.getOwnPropertyNames||function(H){var L=[];for(var O in H)if(Object.prototype.hasOwnProperty.call(H,O))L[L.length]=O;return L},G(C)};s=function(C){if(C&&C.__esModule)return C;var H={};if(C!=null){for(var L=G(C),O=0;O<L.length;O++)if(L[O]!=="default")w(H,C,L[O])}return q(H,C),H},a=function(C){return C&&C.__esModule?C:{default:C}},o=function(C,H,L,O){if(L==="a"&&!O)throw TypeError("Private accessor was defined without a getter");if(typeof H==="function"?C!==H||!O:!H.has(C))throw TypeError("Cannot read private member from an object whose class did not declare it");return L==="m"?O:L==="a"?O.call(C):O?O.value:H.get(C)},t=function(C,H,L,O,Q){if(O==="m")throw TypeError("Private method is not writable");if(O==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof H==="function"?C!==H||!Q:!H.has(C))throw TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?Q.call(C,L):Q?Q.value=L:H.set(C,L),L},r=function(C,H){if(H===null||typeof H!=="object"&&typeof H!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof C==="function"?H===C:C.has(H)},e=function(C,H,L){if(H!==null&&H!==void 0){if(typeof H!=="object"&&typeof H!=="function")throw TypeError("Object expected.");var O,Q;if(L){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");O=H[Symbol.asyncDispose]}if(O===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(O=H[Symbol.dispose],L)Q=O}if(typeof O!=="function")throw TypeError("Object not disposable.");if(Q)O=function(){try{Q.call(this)}catch(T){return Promise.reject(T)}};C.stack.push({value:H,dispose:O,async:L})}else if(L)C.stack.push({async:!0});return H};var S=typeof SuppressedError==="function"?SuppressedError:function(C,H,L){var O=Error(L);return O.name="SuppressedError",O.error=C,O.suppressed=H,O};CC=function(C){function H(T){C.error=C.hasError?new S(T,C.error,"An error was suppressed during disposal."):T,C.hasError=!0}var L,O=0;function Q(){while(L=C.stack.pop())try{if(!L.async&&O===1)return O=0,C.stack.push(L),Promise.resolve().then(Q);if(L.dispose){var T=L.dispose.call(L.value);if(L.async)return O|=2,Promise.resolve(T).then(Q,function(U){return H(U),Q()})}else O|=1}catch(U){H(U)}if(O===1)return C.hasError?Promise.reject(C.error):Promise.resolve();if(C.hasError)throw C.error}return Q()},HC=function(C,H){if(typeof C==="string"&&/^\.\.?\//.test(C))return C.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(L,O,Q,T,U){return O?H?".jsx":".js":Q&&(!T||!U)?L:Q+T+"."+U.toLowerCase()+"js"});return C},X("__extends",P),X("__assign",h),X("__rest",j),X("__decorate",I),X("__param",b),X("__esDecorate",y),X("__runInitializers",g),X("__propKey",k),X("__setFunctionName",f),X("__metadata",m),X("__awaiter",u),X("__generator",x),X("__exportStar",l),X("__createBinding",w),X("__values",D),X("__read",z),X("__spread",_),X("__spreadArrays",d),X("__spreadArray",c),X("__await",E),X("__asyncGenerator",v),X("__asyncDelegator",n),X("__asyncValues",p),X("__makeTemplateObject",i),X("__importStar",s),X("__importDefault",a),X("__classPrivateFieldGet",o),X("__classPrivateFieldSet",t),X("__classPrivateFieldIn",r),X("__addDisposableResource",e),X("__disposeResources",CC),X("__rewriteRelativeImportExtension",HC)})});
3
- export{OC as zf};
2
+ import{vP as LC}from"./chunk-sh03ka27.js";var OC=LC((QC,A)=>{var P,h,j,I,b,y,g,k,f,m,u,x,l,D,z,_,d,c,E,v,n,p,i,s,a,o,t,r,w,e,CC,HC;(function(X){var R=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(G){X(q(R,q(G)))});else if(typeof A==="object"&&typeof QC==="object")X(q(R,q(QC)));else X(q(R));function q(G,S){if(G!==R)if(typeof Object.create==="function")Object.defineProperty(G,"__esModule",{value:!0});else G.__esModule=!0;return function(C,H){return G[C]=S?S(C,H):H}}})(function(X){var R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,H){C.__proto__=H}||function(C,H){for(var L in H)if(Object.prototype.hasOwnProperty.call(H,L))C[L]=H[L]};P=function(C,H){if(typeof H!=="function"&&H!==null)throw TypeError("Class extends value "+String(H)+" is not a constructor or null");R(C,H);function L(){this.constructor=C}C.prototype=H===null?Object.create(H):(L.prototype=H.prototype,new L)},h=Object.assign||function(C){for(var H,L=1,O=arguments.length;L<O;L++){H=arguments[L];for(var Q in H)if(Object.prototype.hasOwnProperty.call(H,Q))C[Q]=H[Q]}return C},j=function(C,H){var L={};for(var O in C)if(Object.prototype.hasOwnProperty.call(C,O)&&H.indexOf(O)<0)L[O]=C[O];if(C!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var Q=0,O=Object.getOwnPropertySymbols(C);Q<O.length;Q++)if(H.indexOf(O[Q])<0&&Object.prototype.propertyIsEnumerable.call(C,O[Q]))L[O[Q]]=C[O[Q]]}return L},I=function(C,H,L,O){var Q=arguments.length,T=Q<3?H:O===null?O=Object.getOwnPropertyDescriptor(H,L):O,U;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")T=Reflect.decorate(C,H,L,O);else for(var Y=C.length-1;Y>=0;Y--)if(U=C[Y])T=(Q<3?U(T):Q>3?U(H,L,T):U(H,L))||T;return Q>3&&T&&Object.defineProperty(H,L,T),T},b=function(C,H){return function(L,O){H(L,O,C)}},y=function(C,H,L,O,Q,T){function U(K){if(K!==void 0&&typeof K!=="function")throw TypeError("Function expected");return K}var Y=O.kind,J=Y==="getter"?"get":Y==="setter"?"set":"value",W=!H&&C?O.static?C:C.prototype:null,$=H||(W?Object.getOwnPropertyDescriptor(W,O.name):{}),M,F=!1;for(var Z=L.length-1;Z>=0;Z--){var N={};for(var B in O)N[B]=B==="access"?{}:O[B];for(var B in O.access)N.access[B]=O.access[B];N.addInitializer=function(K){if(F)throw TypeError("Cannot add initializers after decoration has completed");T.push(U(K||null))};var V=(0,L[Z])(Y==="accessor"?{get:$.get,set:$.set}:$[J],N);if(Y==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw TypeError("Object expected");if(M=U(V.get))$.get=M;if(M=U(V.set))$.set=M;if(M=U(V.init))Q.unshift(M)}else if(M=U(V))if(Y==="field")Q.unshift(M);else $[J]=M}if(W)Object.defineProperty(W,O.name,$);F=!0},g=function(C,H,L){var O=arguments.length>2;for(var Q=0;Q<H.length;Q++)L=O?H[Q].call(C,L):H[Q].call(C);return O?L:void 0},k=function(C){return typeof C==="symbol"?C:"".concat(C)},f=function(C,H,L){if(typeof H==="symbol")H=H.description?"[".concat(H.description,"]"):"";return Object.defineProperty(C,"name",{configurable:!0,value:L?"".concat(L," ",H):H})},m=function(C,H){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(C,H)},u=function(C,H,L,O){function Q(T){return T instanceof L?T:new L(function(U){U(T)})}return new(L||(L=Promise))(function(T,U){function Y($){try{W(O.next($))}catch(M){U(M)}}function J($){try{W(O.throw($))}catch(M){U(M)}}function W($){$.done?T($.value):Q($.value).then(Y,J)}W((O=O.apply(C,H||[])).next())})},x=function(C,H){var L={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},O,Q,T,U=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return U.next=Y(0),U.throw=Y(1),U.return=Y(2),typeof Symbol==="function"&&(U[Symbol.iterator]=function(){return this}),U;function Y(W){return function($){return J([W,$])}}function J(W){if(O)throw TypeError("Generator is already executing.");while(U&&(U=0,W[0]&&(L=0)),L)try{if(O=1,Q&&(T=W[0]&2?Q.return:W[0]?Q.throw||((T=Q.return)&&T.call(Q),0):Q.next)&&!(T=T.call(Q,W[1])).done)return T;if(Q=0,T)W=[W[0]&2,T.value];switch(W[0]){case 0:case 1:T=W;break;case 4:return L.label++,{value:W[1],done:!1};case 5:L.label++,Q=W[1],W=[0];continue;case 7:W=L.ops.pop(),L.trys.pop();continue;default:if((T=L.trys,!(T=T.length>0&&T[T.length-1]))&&(W[0]===6||W[0]===2)){L=0;continue}if(W[0]===3&&(!T||W[1]>T[0]&&W[1]<T[3])){L.label=W[1];break}if(W[0]===6&&L.label<T[1]){L.label=T[1],T=W;break}if(T&&L.label<T[2]){L.label=T[2],L.ops.push(W);break}if(T[2])L.ops.pop();L.trys.pop();continue}W=H.call(C,L)}catch($){W=[6,$],Q=0}finally{O=T=0}if(W[0]&5)throw W[1];return{value:W[0]?W[1]:void 0,done:!0}}},l=function(C,H){for(var L in C)if(L!=="default"&&!Object.prototype.hasOwnProperty.call(H,L))w(H,C,L)},w=Object.create?function(C,H,L,O){if(O===void 0)O=L;var Q=Object.getOwnPropertyDescriptor(H,L);if(!Q||("get"in Q?!H.__esModule:Q.writable||Q.configurable))Q={enumerable:!0,get:function(){return H[L]}};Object.defineProperty(C,O,Q)}:function(C,H,L,O){if(O===void 0)O=L;C[O]=H[L]},D=function(C){var H=typeof Symbol==="function"&&Symbol.iterator,L=H&&C[H],O=0;if(L)return L.call(C);if(C&&typeof C.length==="number")return{next:function(){if(C&&O>=C.length)C=void 0;return{value:C&&C[O++],done:!C}}};throw TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")},z=function(C,H){var L=typeof Symbol==="function"&&C[Symbol.iterator];if(!L)return C;var O=L.call(C),Q,T=[],U;try{while((H===void 0||H-- >0)&&!(Q=O.next()).done)T.push(Q.value)}catch(Y){U={error:Y}}finally{try{if(Q&&!Q.done&&(L=O.return))L.call(O)}finally{if(U)throw U.error}}return T},_=function(){for(var C=[],H=0;H<arguments.length;H++)C=C.concat(z(arguments[H]));return C},d=function(){for(var C=0,H=0,L=arguments.length;H<L;H++)C+=arguments[H].length;for(var O=Array(C),Q=0,H=0;H<L;H++)for(var T=arguments[H],U=0,Y=T.length;U<Y;U++,Q++)O[Q]=T[U];return O},c=function(C,H,L){if(L||arguments.length===2){for(var O=0,Q=H.length,T;O<Q;O++)if(T||!(O in H)){if(!T)T=Array.prototype.slice.call(H,0,O);T[O]=H[O]}}return C.concat(T||Array.prototype.slice.call(H))},E=function(C){return this instanceof E?(this.v=C,this):new E(C)},v=function(C,H,L){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var O=L.apply(C,H||[]),Q,T=[];return Q=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),Y("next"),Y("throw"),Y("return",U),Q[Symbol.asyncIterator]=function(){return this},Q;function U(Z){return function(N){return Promise.resolve(N).then(Z,M)}}function Y(Z,N){if(O[Z]){if(Q[Z]=function(B){return new Promise(function(V,K){T.push([Z,B,V,K])>1||J(Z,B)})},N)Q[Z]=N(Q[Z])}}function J(Z,N){try{W(O[Z](N))}catch(B){F(T[0][3],B)}}function W(Z){Z.value instanceof E?Promise.resolve(Z.value.v).then($,M):F(T[0][2],Z)}function $(Z){J("next",Z)}function M(Z){J("throw",Z)}function F(Z,N){if(Z(N),T.shift(),T.length)J(T[0][0],T[0][1])}},n=function(C){var H,L;return H={},O("next"),O("throw",function(Q){throw Q}),O("return"),H[Symbol.iterator]=function(){return this},H;function O(Q,T){H[Q]=C[Q]?function(U){return(L=!L)?{value:E(C[Q](U)),done:!1}:T?T(U):U}:T}},p=function(C){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var H=C[Symbol.asyncIterator],L;return H?H.call(C):(C=typeof D==="function"?D(C):C[Symbol.iterator](),L={},O("next"),O("throw"),O("return"),L[Symbol.asyncIterator]=function(){return this},L);function O(T){L[T]=C[T]&&function(U){return new Promise(function(Y,J){U=C[T](U),Q(Y,J,U.done,U.value)})}}function Q(T,U,Y,J){Promise.resolve(J).then(function(W){T({value:W,done:Y})},U)}},i=function(C,H){if(Object.defineProperty)Object.defineProperty(C,"raw",{value:H});else C.raw=H;return C};var q=Object.create?function(C,H){Object.defineProperty(C,"default",{enumerable:!0,value:H})}:function(C,H){C.default=H},G=function(C){return G=Object.getOwnPropertyNames||function(H){var L=[];for(var O in H)if(Object.prototype.hasOwnProperty.call(H,O))L[L.length]=O;return L},G(C)};s=function(C){if(C&&C.__esModule)return C;var H={};if(C!=null){for(var L=G(C),O=0;O<L.length;O++)if(L[O]!=="default")w(H,C,L[O])}return q(H,C),H},a=function(C){return C&&C.__esModule?C:{default:C}},o=function(C,H,L,O){if(L==="a"&&!O)throw TypeError("Private accessor was defined without a getter");if(typeof H==="function"?C!==H||!O:!H.has(C))throw TypeError("Cannot read private member from an object whose class did not declare it");return L==="m"?O:L==="a"?O.call(C):O?O.value:H.get(C)},t=function(C,H,L,O,Q){if(O==="m")throw TypeError("Private method is not writable");if(O==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof H==="function"?C!==H||!Q:!H.has(C))throw TypeError("Cannot write private member to an object whose class did not declare it");return O==="a"?Q.call(C,L):Q?Q.value=L:H.set(C,L),L},r=function(C,H){if(H===null||typeof H!=="object"&&typeof H!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof C==="function"?H===C:C.has(H)},e=function(C,H,L){if(H!==null&&H!==void 0){if(typeof H!=="object"&&typeof H!=="function")throw TypeError("Object expected.");var O,Q;if(L){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");O=H[Symbol.asyncDispose]}if(O===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if(O=H[Symbol.dispose],L)Q=O}if(typeof O!=="function")throw TypeError("Object not disposable.");if(Q)O=function(){try{Q.call(this)}catch(T){return Promise.reject(T)}};C.stack.push({value:H,dispose:O,async:L})}else if(L)C.stack.push({async:!0});return H};var S=typeof SuppressedError==="function"?SuppressedError:function(C,H,L){var O=Error(L);return O.name="SuppressedError",O.error=C,O.suppressed=H,O};CC=function(C){function H(T){C.error=C.hasError?new S(T,C.error,"An error was suppressed during disposal."):T,C.hasError=!0}var L,O=0;function Q(){while(L=C.stack.pop())try{if(!L.async&&O===1)return O=0,C.stack.push(L),Promise.resolve().then(Q);if(L.dispose){var T=L.dispose.call(L.value);if(L.async)return O|=2,Promise.resolve(T).then(Q,function(U){return H(U),Q()})}else O|=1}catch(U){H(U)}if(O===1)return C.hasError?Promise.reject(C.error):Promise.resolve();if(C.hasError)throw C.error}return Q()},HC=function(C,H){if(typeof C==="string"&&/^\.\.?\//.test(C))return C.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(L,O,Q,T,U){return O?H?".jsx":".js":Q&&(!T||!U)?L:Q+T+"."+U.toLowerCase()+"js"});return C},X("__extends",P),X("__assign",h),X("__rest",j),X("__decorate",I),X("__param",b),X("__esDecorate",y),X("__runInitializers",g),X("__propKey",k),X("__setFunctionName",f),X("__metadata",m),X("__awaiter",u),X("__generator",x),X("__exportStar",l),X("__createBinding",w),X("__values",D),X("__read",z),X("__spread",_),X("__spreadArrays",d),X("__spreadArray",c),X("__await",E),X("__asyncGenerator",v),X("__asyncDelegator",n),X("__asyncValues",p),X("__makeTemplateObject",i),X("__importStar",s),X("__importDefault",a),X("__classPrivateFieldGet",o),X("__classPrivateFieldSet",t),X("__classPrivateFieldIn",r),X("__addDisposableResource",e),X("__disposeResources",CC),X("__rewriteRelativeImportExtension",HC)})});
3
+ export{OC as Bf};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Qf as a}from"./chunk-5mf4qrye.js";import"./chunk-v1axkp21.js";import"./chunk-sh03ka27.js";export default a();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-sh03ka27.js";var F="./tree-sitter-markdown-411r6y9b.wasm";export{F as default};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{RQ as q,UQ as b}from"./chunk-9svh74gt.js";var z=q((f)=>{Object.defineProperty(f,"__esModule",{value:!0});f.execAsync=void 0;var v=b("child_process"),w=b("util");f.execAsync=w.promisify(v.exec)});
3
- export{z as OQ};
2
+ import{vP as q,yP as b}from"./chunk-sh03ka27.js";var z=q((f)=>{Object.defineProperty(f,"__esModule",{value:!0});f.execAsync=void 0;var v=b("child_process"),w=b("util");f.execAsync=w.promisify(v.exec)});
3
+ export{z as sP};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{yP as t}from"./chunk-sh03ka27.js";var e=await import("./chunk-m2540waa.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-cqtkxwd8.js";import{ws as H}from"./chunk-wpkr3vzf.js";import{Lv as gG,fw as Q}from"./chunk-xphzr4wg.js";import{VA as mG}from"./chunk-hav9pgf3.js";import"./chunk-9svh74gt.js";var{defineProperty:uJ,defineProperties:cJ,getOwnPropertyDescriptors:dJ,getOwnPropertySymbols:VB}=Object,uG=Object.prototype.hasOwnProperty,cG=Object.prototype.propertyIsEnumerable,dG=(B)=>{throw TypeError(B)},GG=(B,G,J)=>(G in B)?uJ(B,G,{enumerable:!0,configurable:!0,writable:!0,value:J}):B[G]=J,W=(B,G)=>{for(var J in G||(G={}))if(uG.call(G,J))GG(B,J,G[J]);if(VB){for(var J of VB(G))if(cG.call(G,J))GG(B,J,G[J])}return B},T=(B,G)=>cJ(B,dJ(G)),LB=(B,G)=>{var J={};for(var N in B)if(uG.call(B,N)&&G.indexOf(N)<0)J[N]=B[N];if(B!=null&&VB){for(var N of VB(B))if(G.indexOf(N)<0&&cG.call(B,N))J[N]=B[N]}return J},pJ=(B,G,J)=>G.has(B)||dG("Cannot "+J),JG=(B,G,J)=>(pJ(B,G,"read from private field"),J?J.call(B):G.get(B)),iJ=(B,G,J)=>G.has(B)?dG("Cannot add the same private member more than once"):G instanceof WeakSet?G.add(B):G.set(B,J),pG="vercel.ai.error",rJ=Symbol.for(pG),NG,QG,I=class B extends(QG=Error,NG=rJ,QG){constructor({name:G,message:J,cause:N}){super(J);this[NG]=!0,this.name=G,this.cause=N}static isInstance(G){return B.hasMarker(G,pG)}static hasMarker(G,J){let N=Symbol.for(J);return G!=null&&typeof G==="object"&&N in G&&typeof G[N]==="boolean"&&G[N]===!0}},iG="AI_APICallError",rG=`vercel.ai.error.${iG}`,sJ=Symbol.for(rG),XG,YG,o=class extends(YG=I,XG=sJ,YG){constructor({message:B,url:G,requestBodyValues:J,statusCode:N,responseHeaders:X,responseBody:Y,cause:Z,isRetryable:$=N!=null&&(N===408||N===409||N===429||N>=500),data:z}){super({name:iG,message:B,cause:Z});this[XG]=!0,this.url=G,this.requestBodyValues=J,this.statusCode=N,this.responseHeaders=X,this.responseBody=Y,this.isRetryable=$,this.data=z}static isInstance(B){return I.hasMarker(B,rG)}},sG="AI_EmptyResponseBodyError",nG=`vercel.ai.error.${sG}`,nJ=Symbol.for(nG),ZG,$G,aJ=class extends($G=I,ZG=nJ,$G){constructor({message:B="Empty response body"}={}){super({name:sG,message:B});this[ZG]=!0}static isInstance(B){return I.hasMarker(B,nG)}};function aG(B){if(B==null)return"unknown error";if(typeof B==="string")return B;if(B instanceof Error)return B.message;return JSON.stringify(B)}var lG="AI_InvalidArgumentError",tG=`vercel.ai.error.${lG}`,lJ=Symbol.for(tG),WG,zG,oG=class extends(zG=I,WG=lJ,zG){constructor({message:B,cause:G,argument:J}){super({name:lG,message:B,cause:G});this[WG]=!0,this.argument=J}static isInstance(B){return I.hasMarker(B,tG)}},eG="AI_InvalidPromptError",BJ=`vercel.ai.error.${eG}`,tJ=Symbol.for(BJ),jG,KG,oJ=class extends(KG=I,jG=tJ,KG){constructor({prompt:B,message:G,cause:J}){super({name:eG,message:`Invalid prompt: ${G}`,cause:J});this[jG]=!0,this.prompt=B}static isInstance(B){return I.hasMarker(B,BJ)}},GJ="AI_InvalidResponseDataError",JJ=`vercel.ai.error.${GJ}`,eJ=Symbol.for(JJ),LG,FG,KB=class extends(FG=I,LG=eJ,FG){constructor({data:B,message:G=`Invalid response data: ${JSON.stringify(B)}.`}){super({name:GJ,message:G});this[LG]=!0,this.data=B}static isInstance(B){return I.hasMarker(B,JJ)}},NJ="AI_JSONParseError",QJ=`vercel.ai.error.${NJ}`,BN=Symbol.for(QJ),qG,wG,bB=class extends(wG=I,qG=BN,wG){constructor({text:B,cause:G}){super({name:NJ,message:`JSON parsing failed: Text: ${B}.
2
+ import"./chunk-cqtkxwd8.js";import{ar as H}from"./chunk-a1mbach4.js";import{Lu as Q,pu as gG}from"./chunk-sg9enzsp.js";import{zz as mG}from"./chunk-5q98z8ck.js";import"./chunk-sh03ka27.js";var{defineProperty:uJ,defineProperties:cJ,getOwnPropertyDescriptors:dJ,getOwnPropertySymbols:VB}=Object,uG=Object.prototype.hasOwnProperty,cG=Object.prototype.propertyIsEnumerable,dG=(B)=>{throw TypeError(B)},GG=(B,G,J)=>(G in B)?uJ(B,G,{enumerable:!0,configurable:!0,writable:!0,value:J}):B[G]=J,W=(B,G)=>{for(var J in G||(G={}))if(uG.call(G,J))GG(B,J,G[J]);if(VB){for(var J of VB(G))if(cG.call(G,J))GG(B,J,G[J])}return B},T=(B,G)=>cJ(B,dJ(G)),LB=(B,G)=>{var J={};for(var N in B)if(uG.call(B,N)&&G.indexOf(N)<0)J[N]=B[N];if(B!=null&&VB){for(var N of VB(B))if(G.indexOf(N)<0&&cG.call(B,N))J[N]=B[N]}return J},pJ=(B,G,J)=>G.has(B)||dG("Cannot "+J),JG=(B,G,J)=>(pJ(B,G,"read from private field"),J?J.call(B):G.get(B)),iJ=(B,G,J)=>G.has(B)?dG("Cannot add the same private member more than once"):G instanceof WeakSet?G.add(B):G.set(B,J),pG="vercel.ai.error",rJ=Symbol.for(pG),NG,QG,I=class B extends(QG=Error,NG=rJ,QG){constructor({name:G,message:J,cause:N}){super(J);this[NG]=!0,this.name=G,this.cause=N}static isInstance(G){return B.hasMarker(G,pG)}static hasMarker(G,J){let N=Symbol.for(J);return G!=null&&typeof G==="object"&&N in G&&typeof G[N]==="boolean"&&G[N]===!0}},iG="AI_APICallError",rG=`vercel.ai.error.${iG}`,sJ=Symbol.for(rG),XG,YG,o=class extends(YG=I,XG=sJ,YG){constructor({message:B,url:G,requestBodyValues:J,statusCode:N,responseHeaders:X,responseBody:Y,cause:Z,isRetryable:$=N!=null&&(N===408||N===409||N===429||N>=500),data:z}){super({name:iG,message:B,cause:Z});this[XG]=!0,this.url=G,this.requestBodyValues=J,this.statusCode=N,this.responseHeaders=X,this.responseBody=Y,this.isRetryable=$,this.data=z}static isInstance(B){return I.hasMarker(B,rG)}},sG="AI_EmptyResponseBodyError",nG=`vercel.ai.error.${sG}`,nJ=Symbol.for(nG),ZG,$G,aJ=class extends($G=I,ZG=nJ,$G){constructor({message:B="Empty response body"}={}){super({name:sG,message:B});this[ZG]=!0}static isInstance(B){return I.hasMarker(B,nG)}};function aG(B){if(B==null)return"unknown error";if(typeof B==="string")return B;if(B instanceof Error)return B.message;return JSON.stringify(B)}var lG="AI_InvalidArgumentError",tG=`vercel.ai.error.${lG}`,lJ=Symbol.for(tG),WG,zG,oG=class extends(zG=I,WG=lJ,zG){constructor({message:B,cause:G,argument:J}){super({name:lG,message:B,cause:G});this[WG]=!0,this.argument=J}static isInstance(B){return I.hasMarker(B,tG)}},eG="AI_InvalidPromptError",BJ=`vercel.ai.error.${eG}`,tJ=Symbol.for(BJ),jG,KG,oJ=class extends(KG=I,jG=tJ,KG){constructor({prompt:B,message:G,cause:J}){super({name:eG,message:`Invalid prompt: ${G}`,cause:J});this[jG]=!0,this.prompt=B}static isInstance(B){return I.hasMarker(B,BJ)}},GJ="AI_InvalidResponseDataError",JJ=`vercel.ai.error.${GJ}`,eJ=Symbol.for(JJ),LG,FG,KB=class extends(FG=I,LG=eJ,FG){constructor({data:B,message:G=`Invalid response data: ${JSON.stringify(B)}.`}){super({name:GJ,message:G});this[LG]=!0,this.data=B}static isInstance(B){return I.hasMarker(B,JJ)}},NJ="AI_JSONParseError",QJ=`vercel.ai.error.${NJ}`,BN=Symbol.for(QJ),qG,wG,bB=class extends(wG=I,qG=BN,wG){constructor({text:B,cause:G}){super({name:NJ,message:`JSON parsing failed: Text: ${B}.
3
3
  Error message: ${aG(G)}`,cause:G});this[qG]=!0,this.text=B}static isInstance(B){return I.hasMarker(B,QJ)}},XJ="AI_LoadAPIKeyError",YJ=`vercel.ai.error.${XJ}`,GN=Symbol.for(YJ),EG,PG,OB=class extends(PG=I,EG=GN,PG){constructor({message:B}){super({name:XJ,message:B});this[EG]=!0}static isInstance(B){return I.hasMarker(B,YJ)}},ZJ="AI_LoadSettingError",$J=`vercel.ai.error.${ZJ}`,JN=Symbol.for($J),OG,HG,XX=class extends(HG=I,OG=JN,HG){constructor({message:B}){super({name:ZJ,message:B});this[OG]=!0}static isInstance(B){return I.hasMarker(B,$J)}},WJ="AI_NoContentGeneratedError",zJ=`vercel.ai.error.${WJ}`,NN=Symbol.for(zJ),SG,yG,rB=class extends(yG=I,SG=NN,yG){constructor({message:B="No content generated."}={}){super({name:WJ,message:B});this[SG]=!0}static isInstance(B){return I.hasMarker(B,zJ)}},jJ="AI_NoSuchModelError",KJ=`vercel.ai.error.${jJ}`,QN=Symbol.for(KJ),AG,VG,YX=class extends(VG=I,AG=QN,VG){constructor({errorName:B=jJ,modelId:G,modelType:J,message:N=`No such ${J}: ${G}`}){super({name:B,message:N});this[AG]=!0,this.modelId=G,this.modelType=J}static isInstance(B){return I.hasMarker(B,KJ)}},LJ="AI_TooManyEmbeddingValuesForCallError",FJ=`vercel.ai.error.${LJ}`,XN=Symbol.for(FJ),bG,MG,ZX=class extends(MG=I,bG=XN,MG){constructor(B){super({name:LJ,message:`Too many values for a single embedding call. The ${B.provider} model "${B.modelId}" can only embed up to ${B.maxEmbeddingsPerCall} values per call, but ${B.values.length} values were provided.`});this[bG]=!0,this.provider=B.provider,this.modelId=B.modelId,this.maxEmbeddingsPerCall=B.maxEmbeddingsPerCall,this.values=B.values}static isInstance(B){return I.hasMarker(B,FJ)}},qJ="AI_TypeValidationError",wJ=`vercel.ai.error.${qJ}`,YN=Symbol.for(wJ),TG,UG,FB=class B extends(UG=I,TG=YN,UG){constructor({value:G,cause:J}){super({name:qJ,message:`Type validation failed: Value: ${JSON.stringify(G)}.
4
4
  Error message: ${aG(J)}`,cause:J});this[TG]=!0,this.value=G}static isInstance(G){return I.hasMarker(G,wJ)}static wrap({value:G,cause:J}){return B.isInstance(J)&&J.value===G?J:new B({value:G,cause:J})}},EJ="AI_UnsupportedFunctionalityError",PJ=`vercel.ai.error.${EJ}`,ZN=Symbol.for(PJ),xG,kG,BB=class extends(kG=I,xG=ZN,kG){constructor({functionality:B,message:G=`'${B}' functionality not supported.`}){super({name:EJ,message:G});this[xG]=!0,this.functionality=B}static isInstance(B){return I.hasMarker(B,PJ)}},DG=class extends Error{constructor(B,G){super(B),this.name="ParseError",this.type=G.type,this.field=G.field,this.value=G.value,this.line=G.line}};function CB(B){}function $N(B){if(typeof B=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:G=CB,onError:J=CB,onRetry:N=CB,onComment:X}=B,Y="",Z=!0,$,z="",j="";function E(K){let V=Z?K.replace(/^\xEF\xBB\xBF/,""):K,[F,x]=WN(`${Y}${V}`);for(let C of F)P(C);Y=x,Z=!1}function P(K){if(K===""){L();return}if(K.startsWith(":")){X&&X(K.slice(K.startsWith(": ")?2:1));return}let V=K.indexOf(":");if(V!==-1){let F=K.slice(0,V),x=K[V+1]===" "?2:1,C=K.slice(V+x);q(F,C,K);return}q(K,"",K)}function q(K,V,F){switch(K){case"event":j=V;break;case"data":z=`${z}${V}
5
5
  `;break;case"id":$=V.includes("\x00")?void 0:V;break;case"retry":/^\d+$/.test(V)?N(parseInt(V,10)):J(new DG(`Invalid \`retry\` value: "${V}"`,{type:"invalid-retry",value:V,line:F}));break;default:J(new DG(`Unknown field "${K.length>20?`${K.slice(0,20)}\u2026`:K}"`,{type:"unknown-field",field:K,value:V,line:F}));break}}function L(){z.length>0&&G({id:$,event:j||void 0,data:z.endsWith(`
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Bu as X}from"./chunk-r6055kk0.js";function D(j){return j.parserConfiguration({"populate--":!0}).scriptName("qitqode").wrap(100).help("help","show help").alias("help","h").version("version","show version number",X).alias("version","v").option("print-logs",{describe:"print logs to stderr",type:"boolean"}).option("log-level",{describe:"log level",type:"string",choices:["DEBUG","INFO","WARN","ERROR"]}).option("pure",{describe:"run without external plugins",type:"boolean"})}var H={port:{type:"number",describe:"port to listen on",default:0},hostname:{type:"string",describe:"hostname to listen on",default:"127.0.0.1"},mdns:{type:"boolean",describe:"enable mDNS service discovery (defaults hostname to 0.0.0.0)",default:!1},"mdns-domain":{type:"string",describe:"custom domain name for mDNS service (default: qitqode.local)",default:"qitqode.local"},cors:{type:"string",array:!0,describe:"additional domains to allow for CORS",default:[]},"no-auth":{type:"boolean",describe:"allow starting without authentication on non-loopback addresses (DANGEROUS)",default:!1}};function u(j){return j.options(H)}function F(j,z=process.argv){return z.some((B)=>B===j||B.startsWith(`${j}=`))}function P(j,z=process.argv){return F("--port",z)||F("--hostname",z)||F("--mdns",z)||!!j.mdns||j.port!==0||j.hostname!=="127.0.0.1"}function _(j,z,B=process.argv){let J=F("--port",B),Z=F("--hostname",B),$=F("--mdns",B),q=F("--mdns-domain",B),K=$?j.mdns:z?.server?.mdns??j.mdns,M=q?j["mdns-domain"]:z?.server?.mdnsDomain??j["mdns-domain"],N=J?j.port:z?.server?.port??j.port,U=Z?j.hostname:K&&!z?.server?.hostname?"0.0.0.0":z?.server?.hostname??j.hostname,V=z?.server?.cors??[],Y=Array.isArray(j.cors)?j.cors:j.cors?[j.cors]:[],b=[...V,...Y],A=j["no-auth"];return{hostname:U,port:N,mdns:K,mdnsDomain:M,cors:b,noAuth:A}}var k={model:{type:"string",alias:["m"],describe:"model to use in the format of provider/model"},continue:{alias:["c"],describe:"continue the last session",type:"boolean"},session:{alias:["s"],type:"string",describe:"session id to continue"},fork:{type:"boolean",describe:"fork the session when continuing (use with --continue or --session)"},prompt:{type:"string",describe:"prompt to use"},agent:{type:"string",describe:"agent to use"},dark:{type:"boolean",describe:"start in dark theme (overrides saved theme preference for this launch)"},light:{type:"boolean",describe:"start in light theme (overrides saved theme preference for this launch)"},monochrome:{type:"boolean",describe:"start in monochrome accessible rendering \u2014 no color, plain terminal, screen-reader friendly"},headless:{type:"boolean",describe:"headless permissionless mode for AI subagent use \u2014 auto-approves all tool permissions, implies --never-ask"},fullauto:{type:"boolean",describe:"full-auto mode for the interactive TUI \u2014 never asks: starts in build mode, auto-decides questions and auto-approves every tool permission that is not explicitly denied by your config (dangerous!)"},"api-key":{type:"string",describe:"Qortex API key for non-interactive authentication in headless mode (can also be set via $QLEX_API_KEY)"},sso:{type:"boolean",describe:"sign in via SSO device-code flow before starting a headless session \u2014 prints a URL and code, waits for browser approval (requires --headless)"},free:{type:"boolean",describe:"start in Free tier (no cost) \u2014 shorthand for the Free model tier"},adaptive:{type:"boolean",describe:"start in Adaptive tier \u2014 shorthand for the Adaptive model tier"},fast:{type:"boolean",describe:"start in Fast tier \u2014 shorthand for the Fast model tier"},economical:{type:"boolean",describe:"start in Economical tier \u2014 shorthand for the Economical model tier"},maxInt:{type:"boolean",describe:"start in Max intelligence tier \u2014 shorthand for the Max intelligence model tier"},orchestrated:{type:"boolean",describe:"start in Orchestrated tier \u2014 shorthand for the Orchestrated model tier"}},L=36,W="\x1B[38;5;214m",I="\x1B[0;2m",Q="\x1B[0m";function G(j,z){let B=Math.round(j/100*L),J=`${"\u25A0".repeat(B)}${"\uFF65".repeat(L-B)}`;return`\r${W}${J} ${j.toString().padStart(3)}%${Q} ${I}${z}${Q}`}
3
- export{D as Tf,H as Uf,u as Vf,P as Wf,_ as Xf,k as Yf,G as Zf};
2
+ import{ft as X}from"./chunk-8jkqyf9n.js";function D(j){return j.parserConfiguration({"populate--":!0}).scriptName("qitqode").wrap(100).help("help","show help").alias("help","h").version("version","show version number",X).alias("version","v").option("print-logs",{describe:"print logs to stderr",type:"boolean"}).option("log-level",{describe:"log level",type:"string",choices:["DEBUG","INFO","WARN","ERROR"]}).option("pure",{describe:"run without external plugins",type:"boolean"})}var H={port:{type:"number",describe:"port to listen on",default:0},hostname:{type:"string",describe:"hostname to listen on",default:"127.0.0.1"},mdns:{type:"boolean",describe:"enable mDNS service discovery (defaults hostname to 0.0.0.0)",default:!1},"mdns-domain":{type:"string",describe:"custom domain name for mDNS service (default: qitqode.local)",default:"qitqode.local"},cors:{type:"string",array:!0,describe:"additional domains to allow for CORS",default:[]},"no-auth":{type:"boolean",describe:"allow starting without authentication on non-loopback addresses (DANGEROUS)",default:!1}};function u(j){return j.options(H)}function F(j,z=process.argv){return z.some((B)=>B===j||B.startsWith(`${j}=`))}function P(j,z=process.argv){return F("--port",z)||F("--hostname",z)||F("--mdns",z)||!!j.mdns||j.port!==0||j.hostname!=="127.0.0.1"}function _(j,z,B=process.argv){let J=F("--port",B),Z=F("--hostname",B),$=F("--mdns",B),q=F("--mdns-domain",B),K=$?j.mdns:z?.server?.mdns??j.mdns,M=q?j["mdns-domain"]:z?.server?.mdnsDomain??j["mdns-domain"],N=J?j.port:z?.server?.port??j.port,U=Z?j.hostname:K&&!z?.server?.hostname?"0.0.0.0":z?.server?.hostname??j.hostname,V=z?.server?.cors??[],Y=Array.isArray(j.cors)?j.cors:j.cors?[j.cors]:[],b=[...V,...Y],A=j["no-auth"];return{hostname:U,port:N,mdns:K,mdnsDomain:M,cors:b,noAuth:A}}var k={model:{type:"string",alias:["m"],describe:"model to use in the format of provider/model"},continue:{alias:["c"],describe:"continue the last session",type:"boolean"},session:{alias:["s"],type:"string",describe:"session id to continue"},fork:{type:"boolean",describe:"fork the session when continuing (use with --continue or --session)"},prompt:{type:"string",describe:"prompt to use"},agent:{type:"string",describe:"agent to use"},dark:{type:"boolean",describe:"start in dark theme (overrides saved theme preference for this launch)"},light:{type:"boolean",describe:"start in light theme (overrides saved theme preference for this launch)"},monochrome:{type:"boolean",describe:"start in monochrome accessible rendering \u2014 no color, plain terminal, screen-reader friendly"},headless:{type:"boolean",describe:"headless permissionless mode for AI subagent use \u2014 auto-approves all tool permissions, implies --never-ask"},fullauto:{type:"boolean",describe:"full-auto mode for the interactive TUI \u2014 never asks: starts in build mode, auto-decides questions and auto-approves every tool permission that is not explicitly denied by your config (dangerous!)"},"api-key":{type:"string",describe:"Qortex API key for non-interactive authentication in headless mode (can also be set via $QLEX_API_KEY)"},sso:{type:"boolean",describe:"sign in via SSO device-code flow before starting a headless session \u2014 prints a URL and code, waits for browser approval (requires --headless)"},free:{type:"boolean",describe:"start in Free tier (no cost) \u2014 shorthand for the Free model tier"},adaptive:{type:"boolean",describe:"start in Adaptive tier \u2014 shorthand for the Adaptive model tier"},fast:{type:"boolean",describe:"start in Fast tier \u2014 shorthand for the Fast model tier"},economical:{type:"boolean",describe:"start in Economical tier \u2014 shorthand for the Economical model tier"},maxInt:{type:"boolean",describe:"start in Max intelligence tier \u2014 shorthand for the Max intelligence model tier"},orchestrated:{type:"boolean",describe:"start in Orchestrated tier \u2014 shorthand for the Orchestrated model tier"}},L=36,W="\x1B[38;5;214m",I="\x1B[0;2m",Q="\x1B[0m";function G(j,z){let B=Math.round(j/100*L),J=`${"\u25A0".repeat(B)}${"\uFF65".repeat(L-B)}`;return`\r${W}${J} ${j.toString().padStart(3)}%${Q} ${I}${z}${Q}`}
3
+ export{D as Vf,H as Wf,u as Xf,P as Yf,_ as Zf,k as _f,G as $f};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Qd as H,Rd as I}from"./chunk-k8zbhj2p.js";import{de as G}from"./chunk-b274mb6v.js";import{Vf as B}from"./chunk-xmt17jd4.js";import{hg as E}from"./chunk-bqqxvagz.js";import"./chunk-1dnvdeat.js";import"./chunk-zj5snrsa.js";import"./chunk-3tf7xfw5.js";import"./chunk-egcvm4x2.js";import"./chunk-nfg7nt13.js";import"./chunk-r4qpsa4e.js";import"./chunk-seda5sfd.js";import"./chunk-88hmeyf5.js";import"./chunk-aykvrqrp.js";import"./chunk-2h8b0csf.js";import"./chunk-4q14whpc.js";import"./chunk-s81ck6bw.js";import"./chunk-jt7g0r2j.js";import"./chunk-84qx54nf.js";import"./chunk-ep92grvg.js";import"./chunk-xf1y0sc6.js";import"./chunk-n24yx79r.js";import"./chunk-5qydhr42.js";import"./chunk-v30ezr68.js";import"./chunk-ex47pb9n.js";import"./chunk-jh2za7y4.js";import"./chunk-s3zmxfz2.js";import"./chunk-krk24aqm.js";import"./chunk-j7d3v0x2.js";import"./chunk-3hawwbw6.js";import"./chunk-4c6d1wy1.js";import"./chunk-vyf77kq1.js";import{yq as D}from"./chunk-bxc3z38f.js";import"./chunk-7wshaze9.js";import"./chunk-vbcekkw2.js";import"./chunk-4ngvj758.js";import"./chunk-cqtkxwd8.js";import"./chunk-wpkr3vzf.js";import"./chunk-49we3vy1.js";import"./chunk-y7cqyeve.js";import"./chunk-92xxg12q.js";import"./chunk-h8yf5e2e.js";import"./chunk-yvtbt12y.js";import"./chunk-g83d3a0t.js";import"./chunk-1p39y33b.js";import"./chunk-yg0rs4g1.js";import"./chunk-vhh80d5j.js";import"./chunk-wp0xd7at.js";import"./chunk-dzw0j790.js";import"./chunk-rvev3cy6.js";import"./chunk-c53ev0da.js";import"./chunk-78yvbv9b.js";import"./chunk-c5n49vrd.js";import"./chunk-bwzbcwff.js";import"./chunk-r6055kk0.js";import"./chunk-datctfgt.js";import{jv as f}from"./chunk-x28chfpz.js";import"./chunk-mnxcykeq.js";import"./chunk-0bn86djg.js";import"./chunk-xphzr4wg.js";import"./chunk-hav9pgf3.js";import"./chunk-cshsqavb.js";import"./chunk-tz60e15h.js";import"./chunk-0tya4pqb.js";import"./chunk-63t0rhc9.js";import"./chunk-9svh74gt.js";var T=G({command:"serve",builder:(b)=>B(b).option("auto-password",{type:"boolean",default:!1,describe:"generate a random ephemeral QITQODE_SERVER_PASSWORD for this run and print it"}),describe:"starts a headless qitqode server",handler:async(b)=>{let A=await H(b);if(b["auto-password"]&&!f.QITQODE_SERVER_PASSWORD){let z=crypto.randomUUID();process.env.QITQODE_SERVER_PASSWORD=z,console.log('Generated ephemeral server password (basic auth, username "qitqode"):'),console.log(` ${z}`)}if(I(A,f.QITQODE_SERVER_PASSWORD))console.error("ERROR: Binding to non-loopback address without QITQODE_SERVER_PASSWORD is not allowed."),console.error("Set QITQODE_SERVER_PASSWORD, pass --auto-password, or pass --no-auth to override (DANGEROUS)."),process.exit(1);if(!f.QITQODE_SERVER_PASSWORD)console.error(""),console.error("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.error("\u2551 WARNING: server is running WITHOUT authentication. \u2551"),console.error("\u2551 \u2551"),console.error("\u2551 Any process or browser page that can reach this address can read \u2551"),console.error("\u2551 project files, run shell commands, and open terminals as you. \u2551"),console.error("\u2551 \u2551"),console.error("\u2551 Set QITQODE_SERVER_PASSWORD, or restart with --auto-password to \u2551"),console.error("\u2551 generate an ephemeral password for this run. \u2551"),console.error("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.error("");if(process.env.QITQODE_KEY)console.log("Using QITQODE_KEY for authentication.");else if(!await D())console.error("Warning: no QitQode credential found. AI features will not work until you sign in (`qitqode auth login`) or set QITQODE_KEY.");let j=await E.listen(A);console.log(`qitqode server listening on http://${j.hostname}:${j.port}`),await new Promise(()=>{}),await j.stop()}});export{T as ServeCommand};
2
+ import{Sd as H,Td as I}from"./chunk-05bkxat0.js";import{fe as G}from"./chunk-w8nj5ph5.js";import{Xf as B}from"./chunk-bga4kqd1.js";import{jg as E}from"./chunk-g738e799.js";import"./chunk-583d91xq.js";import"./chunk-e8s4mp5n.js";import"./chunk-9gxyt2ay.js";import"./chunk-5qhsfjzq.js";import"./chunk-nfg7nt13.js";import"./chunk-4s1n38ds.js";import"./chunk-2w79k0mh.js";import"./chunk-fd04358e.js";import"./chunk-qn1fhqyw.js";import"./chunk-674pexjx.js";import"./chunk-zjyaze0d.js";import"./chunk-xdcwx384.js";import"./chunk-rd08wx37.js";import"./chunk-fp2xgnjn.js";import"./chunk-y1v7mf1a.js";import"./chunk-358wdvj7.js";import"./chunk-dn0437c1.js";import"./chunk-47jkx37s.js";import"./chunk-31a47ptm.js";import"./chunk-jwv6fda1.js";import"./chunk-hx13a8es.js";import"./chunk-h036zy9e.js";import"./chunk-j3agzs13.js";import"./chunk-3152y1q9.js";import"./chunk-71jmhvef.js";import"./chunk-qrztx1b4.js";import"./chunk-j1bv93m4.js";import{cp as D}from"./chunk-pp10epga.js";import"./chunk-crqycrs4.js";import"./chunk-1bq15kf0.js";import"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import"./chunk-m6967jtv.js";import"./chunk-j2snkw45.js";import"./chunk-bmdqb48f.js";import"./chunk-3cs1qf8x.js";import"./chunk-4xqwt6dr.js";import"./chunk-g77kddrs.js";import"./chunk-9znfb8f2.js";import"./chunk-6kch0q2d.js";import"./chunk-6cztstry.js";import"./chunk-1mfdmm2t.js";import"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-2w3n0q9m.js";import"./chunk-6dd2dx69.js";import"./chunk-fdmz0502.js";import"./chunk-1a08ffyd.js";import"./chunk-8jkqyf9n.js";import"./chunk-6yshpz0z.js";import{Pt as f}from"./chunk-5dvy83ms.js";import"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import"./chunk-9kc2th5c.js";import"./chunk-hf39qx6t.js";import"./chunk-x0de4z05.js";import"./chunk-sh03ka27.js";var T=G({command:"serve",builder:(b)=>B(b).option("auto-password",{type:"boolean",default:!1,describe:"generate a random ephemeral QITQODE_SERVER_PASSWORD for this run and print it"}),describe:"starts a headless qitqode server",handler:async(b)=>{let A=await H(b);if(b["auto-password"]&&!f.QITQODE_SERVER_PASSWORD){let z=crypto.randomUUID();process.env.QITQODE_SERVER_PASSWORD=z,console.log('Generated ephemeral server password (basic auth, username "qitqode"):'),console.log(` ${z}`)}if(I(A,f.QITQODE_SERVER_PASSWORD))console.error("ERROR: Binding to non-loopback address without QITQODE_SERVER_PASSWORD is not allowed."),console.error("Set QITQODE_SERVER_PASSWORD, pass --auto-password, or pass --no-auth to override (DANGEROUS)."),process.exit(1);if(!f.QITQODE_SERVER_PASSWORD)console.error(""),console.error("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.error("\u2551 WARNING: server is running WITHOUT authentication. \u2551"),console.error("\u2551 \u2551"),console.error("\u2551 Any process or browser page that can reach this address can read \u2551"),console.error("\u2551 project files, run shell commands, and open terminals as you. \u2551"),console.error("\u2551 \u2551"),console.error("\u2551 Set QITQODE_SERVER_PASSWORD, or restart with --auto-password to \u2551"),console.error("\u2551 generate an ephemeral password for this run. \u2551"),console.error("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.error("");if(process.env.QITQODE_KEY)console.log("Using QITQODE_KEY for authentication.");else if(!await D())console.error("Warning: no QitQode credential found. AI features will not work until you sign in (`qitqode auth login`) or set QITQODE_KEY.");let j=await E.listen(A);console.log(`qitqode server listening on http://${j.hostname}:${j.port}`),await new Promise(()=>{}),await j.stop()}});export{T as ServeCommand};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import P from"fs";import B from"fs";var x;function K(){try{return B.statSync("/.dockerenv"),!0}catch{return!1}}function M(){try{return B.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function y(){if(x===void 0)x=K()||M();return x}var z,Q=()=>{try{return P.statSync("/run/.containerenv"),!0}catch{return!1}};function q(){if(z===void 0)z=Q()||y();return z}import J from"process";import V from"os";import A from"fs";var H=()=>{if(J.platform!=="linux")return!1;if(V.release().toLowerCase().includes("microsoft")){if(q())return!1;return!0}try{if(A.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!q()}catch{}if(A.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||A.existsSync("/run/WSL"))return!q();return!1},L=J.env.__IS_WSL_TEST__?H:H();
3
- export{q as Ds,L as Es};
3
+ export{q as hr,L as ir};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{jv as n}from"./chunk-x28chfpz.js";function s(e){let r=e?.password??n.QITQODE_SERVER_PASSWORD;if(!r)return;let t=e?.username??n.QITQODE_SERVER_USERNAME??"qitqode";return`Basic ${Buffer.from(`${t}:${r}`).toString("base64")}`}function o(e){let r=s(e);if(!r)return;return{Authorization:r}}
3
- export{o as ba};
2
+ import{Pt as n}from"./chunk-5dvy83ms.js";function s(e){let r=e?.password??n.QITQODE_SERVER_PASSWORD;if(!r)return;let t=e?.username??n.QITQODE_SERVER_USERNAME??"qitqode";return`Basic ${Buffer.from(`${t}:${r}`).toString("base64")}`}function o(e){let r=s(e);if(!r)return;return{Authorization:r}}
3
+ export{o as da};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-9svh74gt.js";var{create:Zr,defineProperty:xt,getOwnPropertyDescriptor:Xr,getOwnPropertyNames:Yr,getPrototypeOf:es}=Object,ts=Object.prototype.hasOwnProperty,A=(e,s)=>()=>(s||e((s={exports:{}}).exports,s),s.exports),Xt=(e,s)=>{for(var n in s)xt(e,n,{get:s[n],enumerable:!0})},rs=(e,s,n,o)=>{if(s&&typeof s=="object"||typeof s=="function")for(let c of Yr(s))!ts.call(e,c)&&c!==n&&xt(e,c,{get:()=>s[c],enumerable:!(o=Xr(s,c))||o.enumerable});return e},xe=(e,s,n)=>(n=e!=null?Zr(es(e)):{},rs(s||!e||!e.__esModule?xt(n,"default",{value:e,enumerable:!0}):n,e)),ss=A((e,s)=>{var n=String,o=function(){return{isColorSupported:!1,reset:n,bold:n,dim:n,italic:n,underline:n,inverse:n,hidden:n,strikethrough:n,black:n,red:n,green:n,yellow:n,blue:n,magenta:n,cyan:n,white:n,gray:n,bgBlack:n,bgRed:n,bgGreen:n,bgYellow:n,bgBlue:n,bgMagenta:n,bgCyan:n,bgWhite:n,blackBright:n,redBright:n,greenBright:n,yellowBright:n,blueBright:n,magentaBright:n,cyanBright:n,whiteBright:n,bgBlackBright:n,bgRedBright:n,bgGreenBright:n,bgYellowBright:n,bgBlueBright:n,bgMagentaBright:n,bgCyanBright:n,bgWhiteBright:n}};s.exports=o(),s.exports.createColors=o}),Yt=A(()=>{}),kt=A((e,s)=>{var n=ss(),o=Yt(),c=class i extends Error{constructor(h,p,m,u,r,t){super(h),this.name="CssSyntaxError",this.reason=h,r&&(this.file=r),u&&(this.source=u),t&&(this.plugin=t),typeof p<"u"&&typeof m<"u"&&(typeof p=="number"?(this.line=p,this.column=m):(this.line=p.line,this.column=p.column,this.endLine=m.line,this.endColumn=m.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(h){if(!this.source)return"";let p=this.source;h==null&&(h=n.isColorSupported);let m=(l)=>l,u=(l)=>l,r=(l)=>l;if(h){let{bold:l,gray:w,red:y}=n.createColors(!0);u=(v)=>l(y(v)),m=(v)=>w(v),o&&(r=(v)=>o(v))}let t=p.split(/\r?\n/),f=Math.max(this.line-3,0),a=Math.min(this.line+2,t.length),d=String(a).length;return t.slice(f,a).map((l,w)=>{let y=f+1+w,v=" "+(" "+y).slice(-d)+" | ";if(y===this.line){if(l.length>160){let x=20,b=Math.max(0,this.column-x),T=Math.max(this.column+x,this.endColumn+x),O=l.slice(b,T),k=m(v.replace(/\d/g," "))+l.slice(0,Math.min(this.column-1,x-1)).replace(/[^\t]/g," ");return u(">")+m(v)+r(O)+`
2
+ import"./chunk-sh03ka27.js";var{create:Zr,defineProperty:xt,getOwnPropertyDescriptor:Xr,getOwnPropertyNames:Yr,getPrototypeOf:es}=Object,ts=Object.prototype.hasOwnProperty,A=(e,s)=>()=>(s||e((s={exports:{}}).exports,s),s.exports),Xt=(e,s)=>{for(var n in s)xt(e,n,{get:s[n],enumerable:!0})},rs=(e,s,n,o)=>{if(s&&typeof s=="object"||typeof s=="function")for(let c of Yr(s))!ts.call(e,c)&&c!==n&&xt(e,c,{get:()=>s[c],enumerable:!(o=Xr(s,c))||o.enumerable});return e},xe=(e,s,n)=>(n=e!=null?Zr(es(e)):{},rs(s||!e||!e.__esModule?xt(n,"default",{value:e,enumerable:!0}):n,e)),ss=A((e,s)=>{var n=String,o=function(){return{isColorSupported:!1,reset:n,bold:n,dim:n,italic:n,underline:n,inverse:n,hidden:n,strikethrough:n,black:n,red:n,green:n,yellow:n,blue:n,magenta:n,cyan:n,white:n,gray:n,bgBlack:n,bgRed:n,bgGreen:n,bgYellow:n,bgBlue:n,bgMagenta:n,bgCyan:n,bgWhite:n,blackBright:n,redBright:n,greenBright:n,yellowBright:n,blueBright:n,magentaBright:n,cyanBright:n,whiteBright:n,bgBlackBright:n,bgRedBright:n,bgGreenBright:n,bgYellowBright:n,bgBlueBright:n,bgMagentaBright:n,bgCyanBright:n,bgWhiteBright:n}};s.exports=o(),s.exports.createColors=o}),Yt=A(()=>{}),kt=A((e,s)=>{var n=ss(),o=Yt(),c=class i extends Error{constructor(h,p,m,u,r,t){super(h),this.name="CssSyntaxError",this.reason=h,r&&(this.file=r),u&&(this.source=u),t&&(this.plugin=t),typeof p<"u"&&typeof m<"u"&&(typeof p=="number"?(this.line=p,this.column=m):(this.line=p.line,this.column=p.column,this.endLine=m.line,this.endColumn=m.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(h){if(!this.source)return"";let p=this.source;h==null&&(h=n.isColorSupported);let m=(l)=>l,u=(l)=>l,r=(l)=>l;if(h){let{bold:l,gray:w,red:y}=n.createColors(!0);u=(v)=>l(y(v)),m=(v)=>w(v),o&&(r=(v)=>o(v))}let t=p.split(/\r?\n/),f=Math.max(this.line-3,0),a=Math.min(this.line+2,t.length),d=String(a).length;return t.slice(f,a).map((l,w)=>{let y=f+1+w,v=" "+(" "+y).slice(-d)+" | ";if(y===this.line){if(l.length>160){let x=20,b=Math.max(0,this.column-x),T=Math.max(this.column+x,this.endColumn+x),O=l.slice(b,T),k=m(v.replace(/\d/g," "))+l.slice(0,Math.min(this.column-1,x-1)).replace(/[^\t]/g," ");return u(">")+m(v)+r(O)+`
3
3
  `+k+u("^")}let g=m(v.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+m(v)+r(l)+`
4
4
  `+g+u("^")}return" "+m(v)+r(l)}).join(`
5
5
  `)}toString(){let h=this.showSourceCode();return h&&(h=`
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ss as M}from"./chunk-g83d3a0t.js";import{PQ as B}from"./chunk-63t0rhc9.js";import{QQ as b,RQ as X,UQ as V}from"./chunk-9svh74gt.js";var a=X((l)=>{Object.defineProperty(l,"__esModule",{value:!0});l.OTLPExporterBase=void 0;class p{_delegate;constructor(Z){this._delegate=Z}export(Z,$){this._delegate.export(Z,$)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}l.OTLPExporterBase=p});var R=X((t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.OTLPExporterError=void 0;class n extends Error{code;name="OTLPExporterError";data;constructor(Z,$,Y){super(Z);this.data=Y,this.code=$}}t.OTLPExporterError=n});var H=X((r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.getSharedConfigurationDefaults=r.mergeOtlpSharedConfigurationWithDefaults=r.wrapStaticHeadersInFunction=r.validateTimeoutMillis=void 0;function o(Z){if(Number.isFinite(Z)&&Z>0)return Z;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${Z}')`)}r.validateTimeoutMillis=o;function I0(Z){if(Z==null)return;return async()=>Z}r.wrapStaticHeadersInFunction=I0;function P0(Z,$,Y){return{timeoutMillis:o(Z.timeoutMillis??$.timeoutMillis??Y.timeoutMillis),concurrencyLimit:Z.concurrencyLimit??$.concurrencyLimit??Y.concurrencyLimit,compression:Z.compression??$.compression??Y.compression}}r.mergeOtlpSharedConfigurationWithDefaults=P0;function S0(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}r.getSharedConfigurationDefaults=S0});var $Z=X((ZZ)=>{Object.defineProperty(ZZ,"__esModule",{value:!0});ZZ.CompressionAlgorithm=void 0;var T0;(function(Z){Z.NONE="none",Z.GZIP="gzip"})(T0=ZZ.CompressionAlgorithm||(ZZ.CompressionAlgorithm={}))});var _=X((GZ)=>{Object.defineProperty(GZ,"__esModule",{value:!0});GZ.createBoundedQueueExportPromiseHandler=void 0;class YZ{_concurrencyLimit;_sendingPromises=[];constructor(Z){this._concurrencyLimit=Z}pushPromise(Z){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(Z);let $=()=>{let Y=this._sendingPromises.indexOf(Z);this._sendingPromises.splice(Y,1)};Z.then($,$)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function k0(Z){return new YZ(Z.concurrencyLimit)}GZ.createBoundedQueueExportPromiseHandler=k0});var XZ=X((WZ)=>{Object.defineProperty(WZ,"__esModule",{value:!0});WZ.createLoggingPartialSuccessResponseHandler=void 0;var E0=B();function y0(Z){return Object.prototype.hasOwnProperty.call(Z,"partialSuccess")}function x0(){return{handleResponse(Z){if(Z==null||!y0(Z)||Z.partialSuccess==null||Object.keys(Z.partialSuccess).length===0)return;E0.diag.warn("Received Partial Success response:",JSON.stringify(Z.partialSuccess))}}}WZ.createLoggingPartialSuccessResponseHandler=x0});var v=X((zZ)=>{Object.defineProperty(zZ,"__esModule",{value:!0});zZ.createOtlpExportDelegate=void 0;var q=M(),KZ=R(),h0=XZ(),C0=B();class wZ{_diagLogger;_transport;_serializer;_responseHandler;_promiseQueue;_timeout;constructor(Z,$,Y,G,Q){this._transport=Z,this._serializer=$,this._responseHandler=Y,this._promiseQueue=G,this._timeout=Q,this._diagLogger=C0.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(Z,$){if(this._diagLogger.debug("items to be sent",Z),this._promiseQueue.hasReachedLimit()){$({code:q.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let Y=this._serializer.serializeRequest(Z);if(Y==null){$({code:q.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(Y,this._timeout).then((G)=>{if(G.status==="success"){if(G.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(G.data))}catch(Q){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",Q,G.data)}$({code:q.ExportResultCode.SUCCESS});return}else if(G.status==="failure"&&G.error){$({code:q.ExportResultCode.FAILED,error:G.error});return}else if(G.status==="retryable")$({code:q.ExportResultCode.FAILED,error:G.error??new KZ.OTLPExporterError("Export failed with retryable status")});else $({code:q.ExportResultCode.FAILED,error:new KZ.OTLPExporterError("Export failed with unknown error")})},(G)=>$({code:q.ExportResultCode.FAILED,error:G})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function _0(Z,$){return new wZ(Z.transport,Z.serializer,(0,h0.createLoggingPartialSuccessResponseHandler)(),Z.promiseHandler,$.timeout)}zZ.createOtlpExportDelegate=_0});var NZ=X((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.createOtlpNetworkExportDelegate=void 0;var v0=_(),m0=v();function f0(Z,$,Y){return(0,m0.createOtlpExportDelegate)({transport:Y,serializer:$,promiseHandler:(0,v0.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}FZ.createOtlpNetworkExportDelegate=f0});var jZ=X((N)=>{Object.defineProperty(N,"__esModule",{value:!0});N.createOtlpNetworkExportDelegate=N.CompressionAlgorithm=N.getSharedConfigurationDefaults=N.mergeOtlpSharedConfigurationWithDefaults=N.OTLPExporterError=N.OTLPExporterBase=void 0;var g0=a();Object.defineProperty(N,"OTLPExporterBase",{enumerable:!0,get:function(){return g0.OTLPExporterBase}});var d0=R();Object.defineProperty(N,"OTLPExporterError",{enumerable:!0,get:function(){return d0.OTLPExporterError}});var VZ=H();Object.defineProperty(N,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return VZ.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(N,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return VZ.getSharedConfigurationDefaults}});var c0=$Z();Object.defineProperty(N,"CompressionAlgorithm",{enumerable:!0,get:function(){return c0.CompressionAlgorithm}});var u0=NZ();Object.defineProperty(N,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return u0.createOtlpNetworkExportDelegate}})});var MZ=X((SZ)=>{Object.defineProperty(SZ,"__esModule",{value:!0});SZ.validateAndNormalizeHeaders=void 0;var Y3=B();function G3(Z){let $={};return Object.entries(Z??{}).forEach(([Y,G])=>{if(typeof G<"u")$[Y]=String(G);else Y3.diag.warn(`Header "${Y}" has invalid value (${G}) and will be ignored`)}),$}SZ.validateAndNormalizeHeaders=G3});var EZ=X((TZ)=>{Object.defineProperty(TZ,"__esModule",{value:!0});TZ.getHttpConfigurationDefaults=TZ.mergeOtlpHttpConfigurationWithDefaults=void 0;var bZ=H(),Q3=MZ();function W3(Z,$,Y){return async()=>{let G={...await Y()},Q={};if($!=null)Object.assign(Q,await $());if(Z!=null)Object.assign(Q,(0,Q3.validateAndNormalizeHeaders)(await Z()));return Object.assign(Q,G)}}function J3(Z){if(Z==null)return;try{let $=globalThis.location?.href;return new URL(Z,$).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${Z}'`)}}function X3(Z,$,Y){return{...(0,bZ.mergeOtlpSharedConfigurationWithDefaults)(Z,$,Y),headers:W3(Z.headers,$.headers,Y.headers),url:J3(Z.url)??$.url??Y.url}}TZ.mergeOtlpHttpConfigurationWithDefaults=X3;function K3(Z,$){return{...(0,bZ.getSharedConfigurationDefaults)(),headers:async()=>Z,url:"http://localhost:4318/"+$}}TZ.getHttpConfigurationDefaults=K3});var k=X((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.getNodeHttpConfigurationDefaults=hZ.mergeOtlpNodeHttpConfigurationWithDefaults=hZ.httpAgentFactoryFromOptions=void 0;var yZ=EZ();function xZ(Z){return async($)=>{let Y=$==="http:",G=Y?import("http"):import("https"),{Agent:Q}=await G;if(Y){let{ca:W,cert:U,key:z,...K}=Z;return new Q(K)}return new Q(Z)}}hZ.httpAgentFactoryFromOptions=xZ;function z3(Z,$,Y){return{...(0,yZ.mergeOtlpHttpConfigurationWithDefaults)(Z,$,Y),agentFactory:Z.agentFactory??$.agentFactory??Y.agentFactory,userAgent:Z.userAgent}}hZ.mergeOtlpNodeHttpConfigurationWithDefaults=z3;function D3(Z,$){return{...(0,yZ.getHttpConfigurationDefaults)(Z,$),agentFactory:xZ({keepAlive:!0})}}hZ.getNodeHttpConfigurationDefaults=D3});var mZ=X((_Z)=>{Object.defineProperty(_Z,"__esModule",{value:!0});_Z.parseRetryAfterToMills=_Z.isExportHTTPErrorRetryable=void 0;function N3(Z){return Z===429||Z===502||Z===503||Z===504}_Z.isExportHTTPErrorRetryable=N3;function V3(Z){if(Z==null)return;let $=Number.parseInt(Z,10);if(Number.isInteger($))return $>0?$*1000:-1;let Y=new Date(Z).getTime()-Date.now();if(Y>=0)return Y;return 0}_Z.parseRetryAfterToMills=V3});var dZ=X((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.VERSION=void 0;fZ.VERSION="0.220.0"});var iZ=X((pZ)=>{Object.defineProperty(pZ,"__esModule",{value:!0});pZ.compressAndSend=pZ.sendWithHttp=pZ.MAX_RESPONSE_BODY_SIZE=void 0;var q3=V("zlib"),U3=V("stream"),E=mZ(),O3=R(),L3=dZ(),cZ=`OTel-OTLP-Exporter-JavaScript/${L3.VERSION}`;pZ.MAX_RESPONSE_BODY_SIZE=4194304;function H3(Z,$,Y,G,Q,W,U,z){return new Promise((K)=>{let I=new URL($);if(Q)Y["User-Agent"]=`${Q} ${cZ}`;else Y["User-Agent"]=cZ;let j=Z(I,{method:"POST",headers:Y,agent:W},(J)=>{let F=[],S=0;J.on("data",(D)=>{if(S+=D.length,S>pZ.MAX_RESPONSE_BODY_SIZE){let A0=Error(`OTLP export response body exceeded size limit of ${pZ.MAX_RESPONSE_BODY_SIZE} bytes`);K({status:"failure",error:A0}),J.destroy();return}F.push(D)}),J.on("end",()=>{if(J.statusCode&&J.statusCode<=299)K({status:"success",data:Buffer.concat(F)});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else{let D=new O3.OTLPExporterError(J.statusMessage,J.statusCode,Buffer.concat(F).toString());K({status:"failure",error:D})}}),J.on("error",(D)=>{if(J.statusCode&&J.statusCode<=299)K({status:"success"});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",error:D,retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else K({status:"failure",error:D})})});j.setTimeout(z,()=>{j.destroy(),K({status:"retryable",error:Error("Request timed out")})}),j.on("error",(J)=>{if(I3(J))K({status:"retryable",error:J});else K({status:"failure",error:J})}),uZ(j,G,U,(J)=>{K({status:"failure",error:J})})})}pZ.sendWithHttp=H3;function uZ(Z,$,Y,G){let Q=A3(Y);if($==="gzip")Z.setHeader("Content-Encoding","gzip"),Q=Q.on("error",G).pipe(q3.createGzip()).on("error",G);Q.pipe(Z).on("error",G)}pZ.compressAndSend=uZ;function A3(Z){let $=new U3.Readable;return $.push(Z),$.push(null),$}function I3(Z){let $=new Set(["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","EAI_AGAIN","ENOTFOUND","ENETUNREACH","EHOSTUNREACH"]);if("code"in Z&&typeof Z.code==="string")return $.has(Z.code);return!1}});var sZ=X((nZ)=>{Object.defineProperty(nZ,"__esModule",{value:!0});nZ.createHttpExporterTransport=void 0;var S3=iZ();class aZ{_utils=null;_parameters;constructor(Z){this._parameters=Z}async send(Z,$){let{agent:Y,request:G}=await this._loadUtils(),Q=await this._parameters.headers();return(0,S3.sendWithHttp)(G,this._parameters.url,Q,this._parameters.compression,this._parameters.userAgent,Y,Z,$)}shutdown(){}async _loadUtils(){let Z=this._utils;if(Z===null){let $=new URL(this._parameters.url).protocol,[Y,G]=await Promise.all([this._parameters.agentFactory($),R3($)]);Z=this._utils={agent:Y,request:G}}return Z}}async function R3(Z){let $=Z==="http:"?import("http"):import("https"),{request:Y}=await $;return Y}function M3(Z){return new aZ(Z)}nZ.createHttpExporterTransport=M3});var $0=X((eZ)=>{Object.defineProperty(eZ,"__esModule",{value:!0});eZ.createRetryingTransport=void 0;var A=B(),g=5,b3=1000,T3=5000,k3=1.5,oZ=0.2;function E3(){return Math.random()*(2*oZ)-oZ}class rZ{_transport;constructor(Z){this._transport=Z}retry(Z,$,Y){return new Promise((G,Q)=>{setTimeout(()=>{this._transport.send(Z,$).then(G,Q)},Y)})}async send(Z,$){let Y=g,G=b3,Q=Date.now()+$,W=await this._transport.send(Z,$);while(W.status==="retryable"&&Y>0){Y--;let U=Math.max(Math.min(G*(1+E3()),T3),0);G=G*k3;let z=W.retryInMillis??U,K=Q-Date.now();if(z>K)return A.diag.info(`Export retry time ${Math.round(z)}ms exceeds remaining timeout ${Math.round(K)}ms, not retrying further.`),W;A.diag.verbose(`Scheduling export retry in ${Math.round(z)}ms`),W=await this.retry(Z,K,z)}if(W.status==="success")A.diag.verbose(`Export succeeded after ${g-Y} retry attempts.`);else if(W.status==="retryable")A.diag.info(`Export failed after maximum retry attempts (${g}).`);else A.diag.info(`Export failed with non-retryable error: ${W.error}`);return W}shutdown(){return this._transport.shutdown()}}function y3(Z){return new rZ(Z.transport)}eZ.createRetryingTransport=y3});var Q0=X((Y0)=>{Object.defineProperty(Y0,"__esModule",{value:!0});Y0.createOtlpHttpExportDelegate=void 0;var x3=v(),h3=sZ(),C3=_(),_3=$0();function v3(Z,$){return(0,x3.createOtlpExportDelegate)({transport:(0,_3.createRetryingTransport)({transport:(0,h3.createHttpExporterTransport)(Z)}),serializer:$,promiseHandler:(0,C3.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}Y0.createOtlpHttpExportDelegate=v3});var d=X((w0)=>{Object.defineProperty(w0,"__esModule",{value:!0});w0.getSharedConfigurationFromEnvironment=void 0;var X0=M(),K0=B();function W0(Z){let $=(0,X0.getNumberFromEnv)(Z);if($!=null){if(Number.isFinite($)&&$>0)return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected number greater than 0 (actual: ${$})`)}return}function m3(Z){let $=W0(`OTEL_EXPORTER_OTLP_${Z}_TIMEOUT`),Y=W0("OTEL_EXPORTER_OTLP_TIMEOUT");return $??Y}function J0(Z){let $=(0,X0.getStringFromEnv)(Z)?.trim();if($==null||$==="none"||$==="gzip")return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected 'none' or 'gzip' (actual: '${$}')`);return}function f3(Z){let $=J0(`OTEL_EXPORTER_OTLP_${Z}_COMPRESSION`),Y=J0("OTEL_EXPORTER_OTLP_COMPRESSION");return $??Y}function g3(Z){return{timeoutMillis:m3(Z),compression:f3(Z)}}w0.getSharedConfigurationFromEnvironment=g3});var B0=X((D0)=>{Object.defineProperty(D0,"__esModule",{value:!0});D0.getNodeHttpConfigurationFromEnvironment=void 0;var d3=V("fs"),c3=V("path"),w=M(),y=B(),u3=d(),p3=H(),l3=k();function i3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_HEADERS`),Y=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),G=(0,w.parseKeyPairsIntoRecord)($),Q=(0,w.parseKeyPairsIntoRecord)(Y);if(Object.keys(G).length===0&&Object.keys(Q).length===0)return;return Object.assign({},(0,w.parseKeyPairsIntoRecord)(Y),(0,w.parseKeyPairsIntoRecord)($))}function a3(Z){try{return new URL(Z).toString()}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}}function n3(Z,$){try{new URL(Z)}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}if(!Z.endsWith("/"))Z=Z+"/";Z+=$;try{new URL(Z)}catch{y.diag.warn(`Configuration: Provided URL appended with '${$}' is not a valid URL, using 'undefined' instead of '${Z}'`);return}return Z}function t3(Z){let $=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if($===void 0)return;return n3($,Z)}function s3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_ENDPOINT`);if($===void 0)return;return a3($)}function c(Z,$,Y){let G=(0,w.getStringFromEnv)(Z),Q=(0,w.getStringFromEnv)($),W=G??Q;if(W!=null)try{return d3.readFileSync(c3.resolve(process.cwd(),W))}catch{y.diag.warn(Y);return}else return}function o3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function r3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function e3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function Z4(Z,$){return{...(0,u3.getSharedConfigurationFromEnvironment)(Z),url:s3(Z)??t3($),headers:(0,p3.wrapStaticHeadersInFunction)(i3(Z)),agentFactory:(0,l3.httpAgentFactoryFromOptions)({keepAlive:!0,ca:e3(Z),cert:o3(Z),key:r3(Z)})}}D0.getNodeHttpConfigurationFromEnvironment=Z4});var j0=X((N0)=>{Object.defineProperty(N0,"__esModule",{value:!0});N0.convertLegacyHeaders=void 0;var $4=H();function Y4(Z){if(typeof Z.headers==="function")return Z.headers;return(0,$4.wrapStaticHeadersInFunction)(Z.headers)}N0.convertLegacyHeaders=Y4});var L0=X((U0)=>{Object.defineProperty(U0,"__esModule",{value:!0});U0.convertLegacyHttpOptions=void 0;var G4=B(),q0=k(),Q4=u(),W4=B0(),J4=j0();function X4(Z){if(typeof Z.httpAgentOptions==="function")return Z.httpAgentOptions;let $=Z.httpAgentOptions;if(Z.keepAlive!=null)$={keepAlive:Z.keepAlive,...$};if($!=null)return(0,Q4.httpAgentFactoryFromOptions)($);else return}function K4(Z,$,Y,G){if(Z.metadata)G4.diag.warn("Metadata cannot be set when using http");return(0,q0.mergeOtlpNodeHttpConfigurationWithDefaults)({url:Z.url,headers:(0,J4.convertLegacyHeaders)(Z),concurrencyLimit:Z.concurrencyLimit,timeoutMillis:Z.timeoutMillis,compression:Z.compression,agentFactory:X4(Z),userAgent:Z.userAgent},(0,W4.getNodeHttpConfigurationFromEnvironment)($,Y),(0,q0.getNodeHttpConfigurationDefaults)(G,Y))}U0.convertLegacyHttpOptions=K4});var u=X((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.convertLegacyHttpOptions=L.getSharedConfigurationFromEnvironment=L.createOtlpHttpExportDelegate=L.httpAgentFactoryFromOptions=void 0;var w4=k();Object.defineProperty(L,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return w4.httpAgentFactoryFromOptions}});var z4=Q0();Object.defineProperty(L,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return z4.createOtlpHttpExportDelegate}});var D4=d();Object.defineProperty(L,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return D4.getSharedConfigurationFromEnvironment}});var F4=L0();Object.defineProperty(L,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return F4.convertLegacyHttpOptions}})});var H0=b(jZ(),1);function qZ(Z,$){let Y={attributes:O(Z.attributes,$),droppedAttributesCount:0},G=Z.schemaUrl;if(G&&G!=="")Y.schemaUrl=G;return Y}function UZ(Z,$){let Y={name:Z.name,version:Z.version};if(Z.attributes&&Object.keys(Z.attributes).length>0)Y.attributes=O(Z.attributes,$),Y.droppedAttributesCount=Z.droppedAttributesCount??0;return Y}function O(Z,$){return Object.keys(Z).map((Y)=>l0(Y,Z[Y],$))}function l0(Z,$,Y){return{key:Z,value:m($,Y)}}function m(Z,$){let Y=typeof Z;if(Y==="string")return{stringValue:Z};if(Y==="number"){if(!Number.isInteger(Z))return{doubleValue:Z};return{intValue:Z}}if(Y==="boolean")return{boolValue:Z};if(Z instanceof Uint8Array)return{bytesValue:$.encodeUint8Array(Z)};if(Array.isArray(Z)){let G=Array(Z.length);for(let Q=0;Q<Z.length;Q++)G[Q]=m(Z[Q],$);return{arrayValue:{values:G}}}if(Y==="object"&&Z!=null){let G=Object.keys(Z),Q=Array(G.length);for(let W=0;W<G.length;W++)Q[W]={key:G[W],value:m(Z[G[W]],$)};return{kvlistValue:{values:Q}}}return{}}var i0=256,a0=512;function OZ(Z,$){let Y=Z&255|i0;if($)Y|=a0;return Y}function n0(Z,$){let Y=Z.spanContext(),G=Z.status,Q=Z.parentSpanContext?.spanId?$.encodeSpanContext(Z.parentSpanContext?.spanId):void 0;return{traceId:$.encodeSpanContext(Y.traceId),spanId:$.encodeSpanContext(Y.spanId),parentSpanId:Q,traceState:Y.traceState?.serialize(),name:Z.name,kind:Z.kind==null?0:Z.kind+1,startTimeUnixNano:$.encodeHrTime(Z.startTime),endTimeUnixNano:$.encodeHrTime(Z.endTime),attributes:O(Z.attributes,$),droppedAttributesCount:Z.droppedAttributesCount,events:Z.events.map((W)=>s0(W,$)),droppedEventsCount:Z.droppedEventsCount,status:{code:G.code,message:G.message},links:Z.links.map((W)=>t0(W,$)),droppedLinksCount:Z.droppedLinksCount,flags:OZ(Y.traceFlags,Z.parentSpanContext?.isRemote)}}function t0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],spanId:$.encodeSpanContext(Z.context.spanId),traceId:$.encodeSpanContext(Z.context.traceId),traceState:Z.context.traceState?.serialize(),droppedAttributesCount:Z.droppedAttributesCount||0,flags:OZ(Z.context.traceFlags,Z.context.isRemote)}}function s0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],name:Z.name,timeUnixNano:$.encodeHrTime(Z.time),droppedAttributesCount:Z.droppedAttributesCount||0}}function LZ(Z,$){return{resourceSpans:r0(Z,$)}}function o0(Z){let $=new Map;for(let Y of Z){let G=$.get(Y.resource);if(!G)G=new Map,$.set(Y.resource,G);let Q=`${Y.instrumentationScope.name}@${Y.instrumentationScope.version||""}:${Y.instrumentationScope.schemaUrl||""}`,W=G.get(Q);if(!W)W=[],G.set(Q,W);W.push(Y)}return $}function r0(Z,$){let Y=o0(Z),G=[],Q=Y.entries(),W=Q.next();while(!W.done){let[U,z]=W.value,K=[],I=z.values(),P=I.next();while(!P.done){let F=P.value;if(F.length>0){let S=F.map((D)=>n0(D,$));K.push({scope:UZ(F[0].instrumentationScope,$),spans:S,schemaUrl:F[0].instrumentationScope.schemaUrl})}P=I.next()}let j=qZ(U,$),J={resource:j,scopeSpans:K,schemaUrl:j.schemaUrl};G.push(J),W=Q.next()}return G}var AZ=b(M(),1);function e0(Z){let $=BigInt(1e9);return BigInt(Math.trunc(Z[0]))*$+BigInt(Math.trunc(Z[1]))}function Z3(Z){return e0(Z).toString()}var $3=typeof BigInt<"u"?Z3:AZ.hrTimeToNanoseconds;function HZ(Z){return Z}var IZ={encodeHrTime:$3,encodeSpanContext:HZ,encodeOptionalSpanContext:HZ,encodeUint8Array:(Z)=>{if(typeof Buffer<"u")return Buffer.from(Z).toString("base64");let $=Array(Z.length);for(let Y=0;Y<Z.length;Y++)$[Y]=String.fromCharCode(Z[Y]);return btoa($.join(""))}};var PZ=b(B(),1),T={serializeRequest:(Z)=>{let $=LZ(Z,IZ);return new TextEncoder().encode(JSON.stringify($))},deserializeResponse:(Z)=>{if(Z.length===0)return{};let $=new TextDecoder;try{return JSON.parse($.decode(Z))}catch(Y){return PZ.diag.warn(`Failed to parse trace export response: ${Y.message}. Returning empty response`),{}}}};var x=b(u(),1);class h extends H0.OTLPExporterBase{constructor(Z={}){super(x.createOtlpHttpExportDelegate(x.convertLegacyHttpOptions(Z,"TRACES","v1/traces",{"Content-Type":"application/json"}),T))}}export{h as OTLPTraceExporter};
2
+ import{wr as M}from"./chunk-g77kddrs.js";import{tP as B}from"./chunk-x0de4z05.js";import{uP as b,vP as X,yP as V}from"./chunk-sh03ka27.js";var a=X((l)=>{Object.defineProperty(l,"__esModule",{value:!0});l.OTLPExporterBase=void 0;class p{_delegate;constructor(Z){this._delegate=Z}export(Z,$){this._delegate.export(Z,$)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}l.OTLPExporterBase=p});var R=X((t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.OTLPExporterError=void 0;class n extends Error{code;name="OTLPExporterError";data;constructor(Z,$,Y){super(Z);this.data=Y,this.code=$}}t.OTLPExporterError=n});var H=X((r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.getSharedConfigurationDefaults=r.mergeOtlpSharedConfigurationWithDefaults=r.wrapStaticHeadersInFunction=r.validateTimeoutMillis=void 0;function o(Z){if(Number.isFinite(Z)&&Z>0)return Z;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${Z}')`)}r.validateTimeoutMillis=o;function I0(Z){if(Z==null)return;return async()=>Z}r.wrapStaticHeadersInFunction=I0;function P0(Z,$,Y){return{timeoutMillis:o(Z.timeoutMillis??$.timeoutMillis??Y.timeoutMillis),concurrencyLimit:Z.concurrencyLimit??$.concurrencyLimit??Y.concurrencyLimit,compression:Z.compression??$.compression??Y.compression}}r.mergeOtlpSharedConfigurationWithDefaults=P0;function S0(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}r.getSharedConfigurationDefaults=S0});var $Z=X((ZZ)=>{Object.defineProperty(ZZ,"__esModule",{value:!0});ZZ.CompressionAlgorithm=void 0;var T0;(function(Z){Z.NONE="none",Z.GZIP="gzip"})(T0=ZZ.CompressionAlgorithm||(ZZ.CompressionAlgorithm={}))});var _=X((GZ)=>{Object.defineProperty(GZ,"__esModule",{value:!0});GZ.createBoundedQueueExportPromiseHandler=void 0;class YZ{_concurrencyLimit;_sendingPromises=[];constructor(Z){this._concurrencyLimit=Z}pushPromise(Z){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(Z);let $=()=>{let Y=this._sendingPromises.indexOf(Z);this._sendingPromises.splice(Y,1)};Z.then($,$)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function k0(Z){return new YZ(Z.concurrencyLimit)}GZ.createBoundedQueueExportPromiseHandler=k0});var XZ=X((WZ)=>{Object.defineProperty(WZ,"__esModule",{value:!0});WZ.createLoggingPartialSuccessResponseHandler=void 0;var E0=B();function y0(Z){return Object.prototype.hasOwnProperty.call(Z,"partialSuccess")}function x0(){return{handleResponse(Z){if(Z==null||!y0(Z)||Z.partialSuccess==null||Object.keys(Z.partialSuccess).length===0)return;E0.diag.warn("Received Partial Success response:",JSON.stringify(Z.partialSuccess))}}}WZ.createLoggingPartialSuccessResponseHandler=x0});var v=X((zZ)=>{Object.defineProperty(zZ,"__esModule",{value:!0});zZ.createOtlpExportDelegate=void 0;var q=M(),KZ=R(),h0=XZ(),C0=B();class wZ{_diagLogger;_transport;_serializer;_responseHandler;_promiseQueue;_timeout;constructor(Z,$,Y,G,Q){this._transport=Z,this._serializer=$,this._responseHandler=Y,this._promiseQueue=G,this._timeout=Q,this._diagLogger=C0.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(Z,$){if(this._diagLogger.debug("items to be sent",Z),this._promiseQueue.hasReachedLimit()){$({code:q.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let Y=this._serializer.serializeRequest(Z);if(Y==null){$({code:q.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(Y,this._timeout).then((G)=>{if(G.status==="success"){if(G.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(G.data))}catch(Q){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",Q,G.data)}$({code:q.ExportResultCode.SUCCESS});return}else if(G.status==="failure"&&G.error){$({code:q.ExportResultCode.FAILED,error:G.error});return}else if(G.status==="retryable")$({code:q.ExportResultCode.FAILED,error:G.error??new KZ.OTLPExporterError("Export failed with retryable status")});else $({code:q.ExportResultCode.FAILED,error:new KZ.OTLPExporterError("Export failed with unknown error")})},(G)=>$({code:q.ExportResultCode.FAILED,error:G})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function _0(Z,$){return new wZ(Z.transport,Z.serializer,(0,h0.createLoggingPartialSuccessResponseHandler)(),Z.promiseHandler,$.timeout)}zZ.createOtlpExportDelegate=_0});var NZ=X((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.createOtlpNetworkExportDelegate=void 0;var v0=_(),m0=v();function f0(Z,$,Y){return(0,m0.createOtlpExportDelegate)({transport:Y,serializer:$,promiseHandler:(0,v0.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}FZ.createOtlpNetworkExportDelegate=f0});var jZ=X((N)=>{Object.defineProperty(N,"__esModule",{value:!0});N.createOtlpNetworkExportDelegate=N.CompressionAlgorithm=N.getSharedConfigurationDefaults=N.mergeOtlpSharedConfigurationWithDefaults=N.OTLPExporterError=N.OTLPExporterBase=void 0;var g0=a();Object.defineProperty(N,"OTLPExporterBase",{enumerable:!0,get:function(){return g0.OTLPExporterBase}});var d0=R();Object.defineProperty(N,"OTLPExporterError",{enumerable:!0,get:function(){return d0.OTLPExporterError}});var VZ=H();Object.defineProperty(N,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return VZ.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(N,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return VZ.getSharedConfigurationDefaults}});var c0=$Z();Object.defineProperty(N,"CompressionAlgorithm",{enumerable:!0,get:function(){return c0.CompressionAlgorithm}});var u0=NZ();Object.defineProperty(N,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return u0.createOtlpNetworkExportDelegate}})});var MZ=X((SZ)=>{Object.defineProperty(SZ,"__esModule",{value:!0});SZ.validateAndNormalizeHeaders=void 0;var Y3=B();function G3(Z){let $={};return Object.entries(Z??{}).forEach(([Y,G])=>{if(typeof G<"u")$[Y]=String(G);else Y3.diag.warn(`Header "${Y}" has invalid value (${G}) and will be ignored`)}),$}SZ.validateAndNormalizeHeaders=G3});var EZ=X((TZ)=>{Object.defineProperty(TZ,"__esModule",{value:!0});TZ.getHttpConfigurationDefaults=TZ.mergeOtlpHttpConfigurationWithDefaults=void 0;var bZ=H(),Q3=MZ();function W3(Z,$,Y){return async()=>{let G={...await Y()},Q={};if($!=null)Object.assign(Q,await $());if(Z!=null)Object.assign(Q,(0,Q3.validateAndNormalizeHeaders)(await Z()));return Object.assign(Q,G)}}function J3(Z){if(Z==null)return;try{let $=globalThis.location?.href;return new URL(Z,$).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${Z}'`)}}function X3(Z,$,Y){return{...(0,bZ.mergeOtlpSharedConfigurationWithDefaults)(Z,$,Y),headers:W3(Z.headers,$.headers,Y.headers),url:J3(Z.url)??$.url??Y.url}}TZ.mergeOtlpHttpConfigurationWithDefaults=X3;function K3(Z,$){return{...(0,bZ.getSharedConfigurationDefaults)(),headers:async()=>Z,url:"http://localhost:4318/"+$}}TZ.getHttpConfigurationDefaults=K3});var k=X((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.getNodeHttpConfigurationDefaults=hZ.mergeOtlpNodeHttpConfigurationWithDefaults=hZ.httpAgentFactoryFromOptions=void 0;var yZ=EZ();function xZ(Z){return async($)=>{let Y=$==="http:",G=Y?import("http"):import("https"),{Agent:Q}=await G;if(Y){let{ca:W,cert:U,key:z,...K}=Z;return new Q(K)}return new Q(Z)}}hZ.httpAgentFactoryFromOptions=xZ;function z3(Z,$,Y){return{...(0,yZ.mergeOtlpHttpConfigurationWithDefaults)(Z,$,Y),agentFactory:Z.agentFactory??$.agentFactory??Y.agentFactory,userAgent:Z.userAgent}}hZ.mergeOtlpNodeHttpConfigurationWithDefaults=z3;function D3(Z,$){return{...(0,yZ.getHttpConfigurationDefaults)(Z,$),agentFactory:xZ({keepAlive:!0})}}hZ.getNodeHttpConfigurationDefaults=D3});var mZ=X((_Z)=>{Object.defineProperty(_Z,"__esModule",{value:!0});_Z.parseRetryAfterToMills=_Z.isExportHTTPErrorRetryable=void 0;function N3(Z){return Z===429||Z===502||Z===503||Z===504}_Z.isExportHTTPErrorRetryable=N3;function V3(Z){if(Z==null)return;let $=Number.parseInt(Z,10);if(Number.isInteger($))return $>0?$*1000:-1;let Y=new Date(Z).getTime()-Date.now();if(Y>=0)return Y;return 0}_Z.parseRetryAfterToMills=V3});var dZ=X((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.VERSION=void 0;fZ.VERSION="0.220.0"});var iZ=X((pZ)=>{Object.defineProperty(pZ,"__esModule",{value:!0});pZ.compressAndSend=pZ.sendWithHttp=pZ.MAX_RESPONSE_BODY_SIZE=void 0;var q3=V("zlib"),U3=V("stream"),E=mZ(),O3=R(),L3=dZ(),cZ=`OTel-OTLP-Exporter-JavaScript/${L3.VERSION}`;pZ.MAX_RESPONSE_BODY_SIZE=4194304;function H3(Z,$,Y,G,Q,W,U,z){return new Promise((K)=>{let I=new URL($);if(Q)Y["User-Agent"]=`${Q} ${cZ}`;else Y["User-Agent"]=cZ;let j=Z(I,{method:"POST",headers:Y,agent:W},(J)=>{let F=[],S=0;J.on("data",(D)=>{if(S+=D.length,S>pZ.MAX_RESPONSE_BODY_SIZE){let A0=Error(`OTLP export response body exceeded size limit of ${pZ.MAX_RESPONSE_BODY_SIZE} bytes`);K({status:"failure",error:A0}),J.destroy();return}F.push(D)}),J.on("end",()=>{if(J.statusCode&&J.statusCode<=299)K({status:"success",data:Buffer.concat(F)});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else{let D=new O3.OTLPExporterError(J.statusMessage,J.statusCode,Buffer.concat(F).toString());K({status:"failure",error:D})}}),J.on("error",(D)=>{if(J.statusCode&&J.statusCode<=299)K({status:"success"});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",error:D,retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else K({status:"failure",error:D})})});j.setTimeout(z,()=>{j.destroy(),K({status:"retryable",error:Error("Request timed out")})}),j.on("error",(J)=>{if(I3(J))K({status:"retryable",error:J});else K({status:"failure",error:J})}),uZ(j,G,U,(J)=>{K({status:"failure",error:J})})})}pZ.sendWithHttp=H3;function uZ(Z,$,Y,G){let Q=A3(Y);if($==="gzip")Z.setHeader("Content-Encoding","gzip"),Q=Q.on("error",G).pipe(q3.createGzip()).on("error",G);Q.pipe(Z).on("error",G)}pZ.compressAndSend=uZ;function A3(Z){let $=new U3.Readable;return $.push(Z),$.push(null),$}function I3(Z){let $=new Set(["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","EAI_AGAIN","ENOTFOUND","ENETUNREACH","EHOSTUNREACH"]);if("code"in Z&&typeof Z.code==="string")return $.has(Z.code);return!1}});var sZ=X((nZ)=>{Object.defineProperty(nZ,"__esModule",{value:!0});nZ.createHttpExporterTransport=void 0;var S3=iZ();class aZ{_utils=null;_parameters;constructor(Z){this._parameters=Z}async send(Z,$){let{agent:Y,request:G}=await this._loadUtils(),Q=await this._parameters.headers();return(0,S3.sendWithHttp)(G,this._parameters.url,Q,this._parameters.compression,this._parameters.userAgent,Y,Z,$)}shutdown(){}async _loadUtils(){let Z=this._utils;if(Z===null){let $=new URL(this._parameters.url).protocol,[Y,G]=await Promise.all([this._parameters.agentFactory($),R3($)]);Z=this._utils={agent:Y,request:G}}return Z}}async function R3(Z){let $=Z==="http:"?import("http"):import("https"),{request:Y}=await $;return Y}function M3(Z){return new aZ(Z)}nZ.createHttpExporterTransport=M3});var $0=X((eZ)=>{Object.defineProperty(eZ,"__esModule",{value:!0});eZ.createRetryingTransport=void 0;var A=B(),g=5,b3=1000,T3=5000,k3=1.5,oZ=0.2;function E3(){return Math.random()*(2*oZ)-oZ}class rZ{_transport;constructor(Z){this._transport=Z}retry(Z,$,Y){return new Promise((G,Q)=>{setTimeout(()=>{this._transport.send(Z,$).then(G,Q)},Y)})}async send(Z,$){let Y=g,G=b3,Q=Date.now()+$,W=await this._transport.send(Z,$);while(W.status==="retryable"&&Y>0){Y--;let U=Math.max(Math.min(G*(1+E3()),T3),0);G=G*k3;let z=W.retryInMillis??U,K=Q-Date.now();if(z>K)return A.diag.info(`Export retry time ${Math.round(z)}ms exceeds remaining timeout ${Math.round(K)}ms, not retrying further.`),W;A.diag.verbose(`Scheduling export retry in ${Math.round(z)}ms`),W=await this.retry(Z,K,z)}if(W.status==="success")A.diag.verbose(`Export succeeded after ${g-Y} retry attempts.`);else if(W.status==="retryable")A.diag.info(`Export failed after maximum retry attempts (${g}).`);else A.diag.info(`Export failed with non-retryable error: ${W.error}`);return W}shutdown(){return this._transport.shutdown()}}function y3(Z){return new rZ(Z.transport)}eZ.createRetryingTransport=y3});var Q0=X((Y0)=>{Object.defineProperty(Y0,"__esModule",{value:!0});Y0.createOtlpHttpExportDelegate=void 0;var x3=v(),h3=sZ(),C3=_(),_3=$0();function v3(Z,$){return(0,x3.createOtlpExportDelegate)({transport:(0,_3.createRetryingTransport)({transport:(0,h3.createHttpExporterTransport)(Z)}),serializer:$,promiseHandler:(0,C3.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}Y0.createOtlpHttpExportDelegate=v3});var d=X((w0)=>{Object.defineProperty(w0,"__esModule",{value:!0});w0.getSharedConfigurationFromEnvironment=void 0;var X0=M(),K0=B();function W0(Z){let $=(0,X0.getNumberFromEnv)(Z);if($!=null){if(Number.isFinite($)&&$>0)return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected number greater than 0 (actual: ${$})`)}return}function m3(Z){let $=W0(`OTEL_EXPORTER_OTLP_${Z}_TIMEOUT`),Y=W0("OTEL_EXPORTER_OTLP_TIMEOUT");return $??Y}function J0(Z){let $=(0,X0.getStringFromEnv)(Z)?.trim();if($==null||$==="none"||$==="gzip")return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected 'none' or 'gzip' (actual: '${$}')`);return}function f3(Z){let $=J0(`OTEL_EXPORTER_OTLP_${Z}_COMPRESSION`),Y=J0("OTEL_EXPORTER_OTLP_COMPRESSION");return $??Y}function g3(Z){return{timeoutMillis:m3(Z),compression:f3(Z)}}w0.getSharedConfigurationFromEnvironment=g3});var B0=X((D0)=>{Object.defineProperty(D0,"__esModule",{value:!0});D0.getNodeHttpConfigurationFromEnvironment=void 0;var d3=V("fs"),c3=V("path"),w=M(),y=B(),u3=d(),p3=H(),l3=k();function i3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_HEADERS`),Y=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),G=(0,w.parseKeyPairsIntoRecord)($),Q=(0,w.parseKeyPairsIntoRecord)(Y);if(Object.keys(G).length===0&&Object.keys(Q).length===0)return;return Object.assign({},(0,w.parseKeyPairsIntoRecord)(Y),(0,w.parseKeyPairsIntoRecord)($))}function a3(Z){try{return new URL(Z).toString()}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}}function n3(Z,$){try{new URL(Z)}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}if(!Z.endsWith("/"))Z=Z+"/";Z+=$;try{new URL(Z)}catch{y.diag.warn(`Configuration: Provided URL appended with '${$}' is not a valid URL, using 'undefined' instead of '${Z}'`);return}return Z}function t3(Z){let $=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if($===void 0)return;return n3($,Z)}function s3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_ENDPOINT`);if($===void 0)return;return a3($)}function c(Z,$,Y){let G=(0,w.getStringFromEnv)(Z),Q=(0,w.getStringFromEnv)($),W=G??Q;if(W!=null)try{return d3.readFileSync(c3.resolve(process.cwd(),W))}catch{y.diag.warn(Y);return}else return}function o3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function r3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function e3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function Z4(Z,$){return{...(0,u3.getSharedConfigurationFromEnvironment)(Z),url:s3(Z)??t3($),headers:(0,p3.wrapStaticHeadersInFunction)(i3(Z)),agentFactory:(0,l3.httpAgentFactoryFromOptions)({keepAlive:!0,ca:e3(Z),cert:o3(Z),key:r3(Z)})}}D0.getNodeHttpConfigurationFromEnvironment=Z4});var j0=X((N0)=>{Object.defineProperty(N0,"__esModule",{value:!0});N0.convertLegacyHeaders=void 0;var $4=H();function Y4(Z){if(typeof Z.headers==="function")return Z.headers;return(0,$4.wrapStaticHeadersInFunction)(Z.headers)}N0.convertLegacyHeaders=Y4});var L0=X((U0)=>{Object.defineProperty(U0,"__esModule",{value:!0});U0.convertLegacyHttpOptions=void 0;var G4=B(),q0=k(),Q4=u(),W4=B0(),J4=j0();function X4(Z){if(typeof Z.httpAgentOptions==="function")return Z.httpAgentOptions;let $=Z.httpAgentOptions;if(Z.keepAlive!=null)$={keepAlive:Z.keepAlive,...$};if($!=null)return(0,Q4.httpAgentFactoryFromOptions)($);else return}function K4(Z,$,Y,G){if(Z.metadata)G4.diag.warn("Metadata cannot be set when using http");return(0,q0.mergeOtlpNodeHttpConfigurationWithDefaults)({url:Z.url,headers:(0,J4.convertLegacyHeaders)(Z),concurrencyLimit:Z.concurrencyLimit,timeoutMillis:Z.timeoutMillis,compression:Z.compression,agentFactory:X4(Z),userAgent:Z.userAgent},(0,W4.getNodeHttpConfigurationFromEnvironment)($,Y),(0,q0.getNodeHttpConfigurationDefaults)(G,Y))}U0.convertLegacyHttpOptions=K4});var u=X((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.convertLegacyHttpOptions=L.getSharedConfigurationFromEnvironment=L.createOtlpHttpExportDelegate=L.httpAgentFactoryFromOptions=void 0;var w4=k();Object.defineProperty(L,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return w4.httpAgentFactoryFromOptions}});var z4=Q0();Object.defineProperty(L,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return z4.createOtlpHttpExportDelegate}});var D4=d();Object.defineProperty(L,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return D4.getSharedConfigurationFromEnvironment}});var F4=L0();Object.defineProperty(L,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return F4.convertLegacyHttpOptions}})});var H0=b(jZ(),1);function qZ(Z,$){let Y={attributes:O(Z.attributes,$),droppedAttributesCount:0},G=Z.schemaUrl;if(G&&G!=="")Y.schemaUrl=G;return Y}function UZ(Z,$){let Y={name:Z.name,version:Z.version};if(Z.attributes&&Object.keys(Z.attributes).length>0)Y.attributes=O(Z.attributes,$),Y.droppedAttributesCount=Z.droppedAttributesCount??0;return Y}function O(Z,$){return Object.keys(Z).map((Y)=>l0(Y,Z[Y],$))}function l0(Z,$,Y){return{key:Z,value:m($,Y)}}function m(Z,$){let Y=typeof Z;if(Y==="string")return{stringValue:Z};if(Y==="number"){if(!Number.isInteger(Z))return{doubleValue:Z};return{intValue:Z}}if(Y==="boolean")return{boolValue:Z};if(Z instanceof Uint8Array)return{bytesValue:$.encodeUint8Array(Z)};if(Array.isArray(Z)){let G=Array(Z.length);for(let Q=0;Q<Z.length;Q++)G[Q]=m(Z[Q],$);return{arrayValue:{values:G}}}if(Y==="object"&&Z!=null){let G=Object.keys(Z),Q=Array(G.length);for(let W=0;W<G.length;W++)Q[W]={key:G[W],value:m(Z[G[W]],$)};return{kvlistValue:{values:Q}}}return{}}var i0=256,a0=512;function OZ(Z,$){let Y=Z&255|i0;if($)Y|=a0;return Y}function n0(Z,$){let Y=Z.spanContext(),G=Z.status,Q=Z.parentSpanContext?.spanId?$.encodeSpanContext(Z.parentSpanContext?.spanId):void 0;return{traceId:$.encodeSpanContext(Y.traceId),spanId:$.encodeSpanContext(Y.spanId),parentSpanId:Q,traceState:Y.traceState?.serialize(),name:Z.name,kind:Z.kind==null?0:Z.kind+1,startTimeUnixNano:$.encodeHrTime(Z.startTime),endTimeUnixNano:$.encodeHrTime(Z.endTime),attributes:O(Z.attributes,$),droppedAttributesCount:Z.droppedAttributesCount,events:Z.events.map((W)=>s0(W,$)),droppedEventsCount:Z.droppedEventsCount,status:{code:G.code,message:G.message},links:Z.links.map((W)=>t0(W,$)),droppedLinksCount:Z.droppedLinksCount,flags:OZ(Y.traceFlags,Z.parentSpanContext?.isRemote)}}function t0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],spanId:$.encodeSpanContext(Z.context.spanId),traceId:$.encodeSpanContext(Z.context.traceId),traceState:Z.context.traceState?.serialize(),droppedAttributesCount:Z.droppedAttributesCount||0,flags:OZ(Z.context.traceFlags,Z.context.isRemote)}}function s0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],name:Z.name,timeUnixNano:$.encodeHrTime(Z.time),droppedAttributesCount:Z.droppedAttributesCount||0}}function LZ(Z,$){return{resourceSpans:r0(Z,$)}}function o0(Z){let $=new Map;for(let Y of Z){let G=$.get(Y.resource);if(!G)G=new Map,$.set(Y.resource,G);let Q=`${Y.instrumentationScope.name}@${Y.instrumentationScope.version||""}:${Y.instrumentationScope.schemaUrl||""}`,W=G.get(Q);if(!W)W=[],G.set(Q,W);W.push(Y)}return $}function r0(Z,$){let Y=o0(Z),G=[],Q=Y.entries(),W=Q.next();while(!W.done){let[U,z]=W.value,K=[],I=z.values(),P=I.next();while(!P.done){let F=P.value;if(F.length>0){let S=F.map((D)=>n0(D,$));K.push({scope:UZ(F[0].instrumentationScope,$),spans:S,schemaUrl:F[0].instrumentationScope.schemaUrl})}P=I.next()}let j=qZ(U,$),J={resource:j,scopeSpans:K,schemaUrl:j.schemaUrl};G.push(J),W=Q.next()}return G}var AZ=b(M(),1);function e0(Z){let $=BigInt(1e9);return BigInt(Math.trunc(Z[0]))*$+BigInt(Math.trunc(Z[1]))}function Z3(Z){return e0(Z).toString()}var $3=typeof BigInt<"u"?Z3:AZ.hrTimeToNanoseconds;function HZ(Z){return Z}var IZ={encodeHrTime:$3,encodeSpanContext:HZ,encodeOptionalSpanContext:HZ,encodeUint8Array:(Z)=>{if(typeof Buffer<"u")return Buffer.from(Z).toString("base64");let $=Array(Z.length);for(let Y=0;Y<Z.length;Y++)$[Y]=String.fromCharCode(Z[Y]);return btoa($.join(""))}};var PZ=b(B(),1),T={serializeRequest:(Z)=>{let $=LZ(Z,IZ);return new TextEncoder().encode(JSON.stringify($))},deserializeResponse:(Z)=>{if(Z.length===0)return{};let $=new TextDecoder;try{return JSON.parse($.decode(Z))}catch(Y){return PZ.diag.warn(`Failed to parse trace export response: ${Y.message}. Returning empty response`),{}}}};var x=b(u(),1);class h extends H0.OTLPExporterBase{constructor(Z={}){super(x.createOtlpHttpExportDelegate(x.convertLegacyHttpOptions(Z,"TRACES","v1/traces",{"Content-Type":"application/json"}),T))}}export{h as OTLPTraceExporter};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-sh03ka27.js";var A="./tree-sitter-zig-e78zbjpm.wasm";export{A as default};