@qitqode/qitqode-android-arm64 0.1.30 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/bundle/{chunk-37n34pzd.js → chunk-01my2y0c.js} +1 -1
  2. package/bundle/{chunk-ejjea8hh.js → chunk-02jtpxe0.js} +1 -1
  3. package/bundle/{chunk-6qy1ghrx.js → chunk-05mce0j3.js} +1 -1
  4. package/bundle/chunk-096pd6c4.js +2 -0
  5. package/bundle/{chunk-g1dwbvkg.js → chunk-0bbs01f0.js} +1 -1
  6. package/bundle/chunk-0c2p3a6v.js +2 -0
  7. package/bundle/chunk-0c5rxty9.js +2 -0
  8. package/bundle/{chunk-j6emx6jn.js → chunk-0dt0bxz6.js} +2 -2
  9. package/bundle/chunk-0e86gt9r.js +2 -0
  10. package/bundle/{chunk-mskwkcgj.js → chunk-0mx2psfc.js} +1 -1
  11. package/bundle/chunk-0p27fvfr.js +2 -0
  12. package/bundle/chunk-0qs1vx97.js +2 -0
  13. package/bundle/{chunk-f45tp3e3.js → chunk-0v0vqbn5.js} +1 -1
  14. package/bundle/{chunk-be216spx.js → chunk-10bjs581.js} +2 -2
  15. package/bundle/{chunk-bss414qz.js → chunk-12vef2pr.js} +1 -1
  16. package/bundle/{chunk-jm1ptn8n.js → chunk-15hw2z9t.js} +1 -1
  17. package/bundle/chunk-15j5cn4t.js +2 -0
  18. package/bundle/{chunk-srh4xvsj.js → chunk-1gx18dm5.js} +1 -1
  19. package/bundle/chunk-1r95p0tp.js +2 -0
  20. package/bundle/chunk-1rhhhm88.js +2 -0
  21. package/bundle/{chunk-b0syck9r.js → chunk-1sgahe1s.js} +1 -1
  22. package/bundle/{chunk-26nfphsg.js → chunk-1vb79bw1.js} +1 -1
  23. package/bundle/chunk-1wbjh23g.js +2 -0
  24. package/bundle/chunk-20702epe.js +2 -0
  25. package/bundle/{chunk-371r2111.js → chunk-24jg9d61.js} +1 -1
  26. package/bundle/chunk-257me4z3.js +800 -0
  27. package/bundle/{chunk-1sgby720.js → chunk-2hc5z7b5.js} +1 -1
  28. package/bundle/{chunk-yq3m8190.js → chunk-2maqde7w.js} +2 -2
  29. package/bundle/{chunk-mrw279k3.js → chunk-2phz0bn9.js} +1 -1
  30. package/bundle/{chunk-b8tw709r.js → chunk-2vn41ecx.js} +1 -1
  31. package/bundle/chunk-2wajs9xv.js +2 -0
  32. package/bundle/{chunk-w87a3mzm.js → chunk-2zq4k837.js} +1 -1
  33. package/bundle/{chunk-1bhvt33f.js → chunk-31qrzrwy.js} +1 -1
  34. package/bundle/{chunk-d5bxan80.js → chunk-326p5b10.js} +2 -2
  35. package/bundle/{chunk-0df4kede.js → chunk-33e9y2aw.js} +1 -1
  36. package/bundle/{chunk-zcm2jdr5.js → chunk-35xk4g91.js} +1 -1
  37. package/bundle/{chunk-5fz8tph5.js → chunk-3632wgg1.js} +1 -1
  38. package/bundle/{chunk-1ngtxja9.js → chunk-3bxg5bta.js} +1 -1
  39. package/bundle/{chunk-mgk9sh16.js → chunk-3c6p8tm3.js} +1 -1
  40. package/bundle/{chunk-fqw4y7x0.js → chunk-3nx7112w.js} +2 -2
  41. package/bundle/{chunk-n26yf3he.js → chunk-3wetyrjs.js} +1 -1
  42. package/bundle/{chunk-2jmxt3fb.js → chunk-40efytmk.js} +1 -1
  43. package/bundle/chunk-42p59wm4.js +2 -0
  44. package/bundle/chunk-4512pvca.js +2 -0
  45. package/bundle/chunk-456bmaww.js +2 -0
  46. package/bundle/{chunk-c5e6sk9c.js → chunk-48ge2ryx.js} +1 -1
  47. package/bundle/chunk-48pajrnt.js +2 -0
  48. package/bundle/{chunk-12bssxd4.js → chunk-4cnwn1rh.js} +2 -2
  49. package/bundle/chunk-4fy9c54h.js +2 -0
  50. package/bundle/{chunk-4tbwha3m.js → chunk-4jtxtkj7.js} +2 -2
  51. package/bundle/chunk-4sc82a27.js +2 -0
  52. package/bundle/chunk-52bam8g7.js +2 -0
  53. package/bundle/{chunk-6fp8a9ek.js → chunk-53bqcctj.js} +1 -1
  54. package/bundle/{chunk-hwbyqezq.js → chunk-56z7x7h4.js} +2 -2
  55. package/bundle/chunk-59y8q9m5.js +2 -0
  56. package/bundle/chunk-59yqvk48.js +3 -0
  57. package/bundle/{chunk-a1pw9r6f.js → chunk-5hw6xa49.js} +2 -2
  58. package/bundle/{chunk-8qkhddq3.js → chunk-5jx0yadh.js} +2 -2
  59. package/bundle/chunk-5pb551dx.js +2 -0
  60. package/bundle/{chunk-qrey2gwb.js → chunk-5q4harvc.js} +2 -2
  61. package/bundle/chunk-5tray1fw.js +3 -0
  62. package/bundle/{chunk-my6sz5d6.js → chunk-60v5jvgt.js} +1 -1
  63. package/bundle/chunk-634pnryq.js +2 -0
  64. package/bundle/chunk-64ezpbwt.js +2 -0
  65. package/bundle/{chunk-5fgx6fa4.js → chunk-69nzndk7.js} +1 -1
  66. package/bundle/{chunk-k8ss3135.js → chunk-6aqyhfag.js} +218 -218
  67. package/bundle/{chunk-chmrvbbj.js → chunk-6d5rrre9.js} +1 -1
  68. package/bundle/{chunk-g3dhsmbt.js → chunk-6hpgb8h4.js} +3 -3
  69. package/bundle/{chunk-drs1gv2b.js → chunk-6kp07m7p.js} +1 -1
  70. package/bundle/{chunk-wy46mbwt.js → chunk-6phh70sp.js} +1 -1
  71. package/bundle/{chunk-v2zp22r3.js → chunk-70ck4v3t.js} +1 -1
  72. package/bundle/{chunk-2tnarng3.js → chunk-71sjjjr8.js} +1 -1
  73. package/bundle/{chunk-ds69qc8b.js → chunk-71xz70r9.js} +1 -1
  74. package/bundle/{chunk-2dzk5txw.js → chunk-73e409hd.js} +1 -1
  75. package/bundle/chunk-764fksh3.js +2 -0
  76. package/bundle/{chunk-g7rjtehn.js → chunk-78ymd20x.js} +1 -1
  77. package/bundle/{chunk-szr0f7k2.js → chunk-7avcnwv8.js} +1 -1
  78. package/bundle/{chunk-z8v2tsz2.js → chunk-7hm0c2yg.js} +1 -1
  79. package/bundle/chunk-7mke41x0.js +2 -0
  80. package/bundle/chunk-7ry9cvby.js +2 -0
  81. package/bundle/chunk-7tr9ejyk.js +7 -0
  82. package/bundle/chunk-7wczs9mx.js +2 -0
  83. package/bundle/{chunk-aztre27e.js → chunk-7xm75w1e.js} +1 -1
  84. package/bundle/{chunk-s3yna2wm.js → chunk-7z5jh4ra.js} +1 -1
  85. package/bundle/chunk-7z777y9k.js +2 -0
  86. package/bundle/{chunk-vj62pc0h.js → chunk-81qwdg5s.js} +1 -1
  87. package/bundle/chunk-85wcc1tp.js +3 -0
  88. package/bundle/chunk-89w3yhf8.js +2 -0
  89. package/bundle/chunk-8dwq41q1.js +28 -0
  90. package/bundle/{chunk-6hv59ere.js → chunk-8hytwgwf.js} +1 -1
  91. package/bundle/{chunk-wz0zcddf.js → chunk-8n20thvd.js} +2 -2
  92. package/bundle/{chunk-s07j8hfy.js → chunk-8qswepp2.js} +1 -1
  93. package/bundle/{chunk-bpbptx89.js → chunk-8r6ht39z.js} +1 -1
  94. package/bundle/chunk-8v96pmqn.js +2 -0
  95. package/bundle/chunk-8y2scz6z.js +2 -0
  96. package/bundle/chunk-8zx7vnx6.js +2 -0
  97. package/bundle/{chunk-qhc90p4a.js → chunk-93p131d5.js} +1 -1
  98. package/bundle/chunk-94a76f8w.js +2 -0
  99. package/bundle/{chunk-ppfjf7qx.js → chunk-9emq67vc.js} +1 -1
  100. package/bundle/{chunk-bvkq0a5q.js → chunk-9f1z9xce.js} +1 -1
  101. package/bundle/{chunk-dcvatax2.js → chunk-9gazyynx.js} +2 -2
  102. package/bundle/chunk-9ng7jjp7.js +2 -0
  103. package/bundle/chunk-9tpgnjy8.js +2 -0
  104. package/bundle/{chunk-mk6cddvd.js → chunk-a1wdeapb.js} +1 -1
  105. package/bundle/{chunk-qjn86fc0.js → chunk-a7amey9s.js} +1 -1
  106. package/bundle/chunk-a7ym9f0v.js +2 -0
  107. package/bundle/chunk-a8f2xvy3.js +2 -0
  108. package/bundle/chunk-a99cvwta.js +2 -0
  109. package/bundle/{chunk-42f7p0hq.js → chunk-ad72gb5f.js} +2 -2
  110. package/bundle/{chunk-89v6dgpp.js → chunk-ag8kz1e7.js} +2 -2
  111. package/bundle/{chunk-zv6pjtz1.js → chunk-avf8v3hb.js} +1 -1
  112. package/bundle/chunk-avys5mnz.js +2 -0
  113. package/bundle/chunk-axvjd10y.js +2 -0
  114. package/bundle/{chunk-m612agnk.js → chunk-ay8emwym.js} +1 -1
  115. package/bundle/chunk-b4pphqab.js +2 -0
  116. package/bundle/chunk-b6087ak4.js +2 -0
  117. package/bundle/{chunk-msegx0t7.js → chunk-b8gjz6bk.js} +1 -1
  118. package/bundle/{chunk-gf0pdgjs.js → chunk-bh53dz71.js} +1 -1
  119. package/bundle/chunk-bn0h9dny.js +10 -0
  120. package/bundle/chunk-brkqxbjy.js +2 -0
  121. package/bundle/{chunk-09kba1hg.js → chunk-c11d28qn.js} +2 -2
  122. package/bundle/chunk-c26qxt5g.js +2 -0
  123. package/bundle/chunk-c6zscb38.js +2 -0
  124. package/bundle/{chunk-ddnpx1yx.js → chunk-caj1b9y7.js} +5 -5
  125. package/bundle/{chunk-pekm54ce.js → chunk-cfgvm15x.js} +1 -1
  126. package/bundle/{chunk-v4xcysh0.js → chunk-chpr8ekb.js} +1 -1
  127. package/bundle/chunk-cjww2jmv.js +3 -0
  128. package/bundle/{chunk-m67tcnk4.js → chunk-ck2gfaba.js} +1 -1
  129. package/bundle/{chunk-9j1qqdr2.js → chunk-cphrgyp6.js} +1 -1
  130. package/bundle/{chunk-eb9mytjq.js → chunk-ctaze2hn.js} +1 -1
  131. package/bundle/{chunk-5qam3c8r.js → chunk-cxnfy6qk.js} +1 -1
  132. package/bundle/{chunk-cafzcmrg.js → chunk-d07p6fpk.js} +2 -2
  133. package/bundle/chunk-d0damw6y.js +2 -0
  134. package/bundle/{chunk-b8bytvka.js → chunk-d3ermm6d.js} +2 -2
  135. package/bundle/{chunk-4qqkqrn9.js → chunk-d6ry9418.js} +2 -2
  136. package/bundle/{chunk-sn4nez18.js → chunk-d9hbhkbq.js} +2 -2
  137. package/bundle/{chunk-ztc3gm8y.js → chunk-dactgryw.js} +1 -1
  138. package/bundle/chunk-dafmkrhn.js +2 -0
  139. package/bundle/{chunk-dfnv7vkn.js → chunk-db405hjg.js} +1 -1
  140. package/bundle/chunk-dgprdym0.js +2 -0
  141. package/bundle/{chunk-7yrhe3xq.js → chunk-dnwefyhv.js} +1 -1
  142. package/bundle/chunk-dryzt12j.js +2 -0
  143. package/bundle/chunk-dsamees2.js +2 -0
  144. package/bundle/{chunk-xpc2zgj7.js → chunk-dxpj0cxh.js} +2 -2
  145. package/bundle/{chunk-yjtdgcq5.js → chunk-dynv30gm.js} +1 -1
  146. package/bundle/chunk-dyqpxx3b.js +2 -0
  147. package/bundle/{chunk-2rs39vj2.js → chunk-e01wnqvc.js} +1 -1
  148. package/bundle/{chunk-2vepzgek.js → chunk-e10py6yr.js} +1 -1
  149. package/bundle/chunk-e5mv5wnt.js +2 -0
  150. package/bundle/{chunk-qv2s39dv.js → chunk-e7ny0b3x.js} +1 -1
  151. package/bundle/{chunk-n8h6x2en.js → chunk-ejrhvy38.js} +1 -1
  152. package/bundle/{chunk-dq9kpj4a.js → chunk-enpzvmtc.js} +1 -1
  153. package/bundle/chunk-ew9pdrp9.js +3 -0
  154. package/bundle/{chunk-gj3hzx3d.js → chunk-ezfy0b6q.js} +2 -2
  155. package/bundle/{chunk-2km50rd3.js → chunk-fgg9txzb.js} +1 -1
  156. package/bundle/{chunk-b9za12y1.js → chunk-fn9h4ync.js} +1 -1
  157. package/bundle/{chunk-ngchsw2g.js → chunk-fvzwbjh8.js} +1 -1
  158. package/bundle/{chunk-nzehfpxp.js → chunk-g10d6x57.js} +1 -1
  159. package/bundle/{chunk-zyhdxggp.js → chunk-g5rabwre.js} +2 -2
  160. package/bundle/{chunk-kfsb2stm.js → chunk-g7ccdh7r.js} +1 -1
  161. package/bundle/{chunk-phxrg7aw.js → chunk-gagtmjmp.js} +2 -2
  162. package/bundle/{chunk-yp0a8q29.js → chunk-gb00fh4z.js} +3 -3
  163. package/bundle/{chunk-hw1dmx28.js → chunk-gbpvs0fx.js} +1 -1
  164. package/bundle/{chunk-j8efst22.js → chunk-gj0wt0cy.js} +1 -1
  165. package/bundle/{chunk-2q96x1t5.js → chunk-gsar6xda.js} +1 -1
  166. package/bundle/{chunk-xs3xtz6x.js → chunk-gt31468k.js} +1 -1
  167. package/bundle/{chunk-ecn8gbtz.js → chunk-gwp17r03.js} +1 -1
  168. package/bundle/chunk-gwzw92jt.js +2 -0
  169. package/bundle/chunk-gz8sz7z1.js +9 -0
  170. package/bundle/{chunk-2bn4b42t.js → chunk-h2afsbm1.js} +1 -1
  171. package/bundle/{chunk-tj78jsp9.js → chunk-h4j5xzc8.js} +1 -1
  172. package/bundle/chunk-h6f3kbz2.js +2 -0
  173. package/bundle/{chunk-b3dqcbsc.js → chunk-hbbsbyyq.js} +1 -1
  174. package/bundle/{chunk-2gerf08b.js → chunk-hnvn2c25.js} +2 -2
  175. package/bundle/{chunk-vn7nkrqb.js → chunk-hnzegjgv.js} +1 -1
  176. package/bundle/chunk-hp7tssgv.js +2 -0
  177. package/bundle/chunk-ht0hbdmx.js +2 -0
  178. package/bundle/{chunk-j9pcnkkq.js → chunk-ht5w06x7.js} +2 -2
  179. package/bundle/{chunk-a1p2f16h.js → chunk-htz93dsd.js} +2 -2
  180. package/bundle/{chunk-q6ztpfcs.js → chunk-jbx3s7nw.js} +2 -2
  181. package/bundle/{chunk-hxz2rdjq.js → chunk-jdynx7m6.js} +1 -1
  182. package/bundle/{chunk-h9pvnp5c.js → chunk-jef04wyf.js} +1 -1
  183. package/bundle/{chunk-ct48575c.js → chunk-jh0bw59r.js} +1 -1
  184. package/bundle/{chunk-knpt9n8f.js → chunk-jrqb0jwy.js} +1 -1
  185. package/bundle/{chunk-1dwcga8g.js → chunk-js1n8tgv.js} +1 -1
  186. package/bundle/chunk-k1txw65h.js +2 -0
  187. package/bundle/chunk-k5atbdbm.js +2 -0
  188. package/bundle/chunk-k75jqg60.js +3 -0
  189. package/bundle/{chunk-yn6sbycg.js → chunk-k7aenxan.js} +2 -2
  190. package/bundle/{chunk-1rp1cvmc.js → chunk-kf167jw7.js} +1 -1
  191. package/bundle/{chunk-wsy0m70r.js → chunk-kfxv5rfg.js} +1 -1
  192. package/bundle/{chunk-btz9jvec.js → chunk-kj20f048.js} +1 -1
  193. package/bundle/{chunk-j5kb0y1m.js → chunk-kq6b222y.js} +1 -1
  194. package/bundle/{chunk-1t9jne14.js → chunk-ktzq4ha1.js} +1 -1
  195. package/bundle/{chunk-5v4py9p2.js → chunk-m2q317gh.js} +1 -1
  196. package/bundle/chunk-mahgmbt9.js +2 -0
  197. package/bundle/{chunk-1qshjfzm.js → chunk-mk1bfzg5.js} +1 -1
  198. package/bundle/{chunk-2y90ad1v.js → chunk-mqd1jsg2.js} +1 -1
  199. package/bundle/{chunk-t12xrrfr.js → chunk-mzs2pjyc.js} +2 -2
  200. package/bundle/{chunk-m02zt1a3.js → chunk-n9xns8by.js} +2 -2
  201. package/bundle/chunk-ngm6pqyt.js +2 -0
  202. package/bundle/chunk-ngtavamt.js +2 -0
  203. package/bundle/chunk-nkhc32s3.js +2 -0
  204. package/bundle/{chunk-wpajh5s5.js → chunk-nkkch4h7.js} +1 -1
  205. package/bundle/chunk-npse2xrd.js +2 -0
  206. package/bundle/{chunk-k7gq9bra.js → chunk-nv3eyyaj.js} +1 -1
  207. package/bundle/{chunk-ab6cabxh.js → chunk-p18axz0m.js} +1 -1
  208. package/bundle/{chunk-jje0srjq.js → chunk-p62gb4wj.js} +1 -1
  209. package/bundle/chunk-p6e4vqy7.js +2 -0
  210. package/bundle/{chunk-m1h5a4vg.js → chunk-p9qfbr02.js} +1 -1
  211. package/bundle/{chunk-ggqst87g.js → chunk-pe29yy6s.js} +1 -1
  212. package/bundle/{chunk-yy526n9c.js → chunk-pje60pj2.js} +1 -1
  213. package/bundle/{chunk-3n1324bt.js → chunk-pp2eqkse.js} +1 -1
  214. package/bundle/{chunk-x067eetw.js → chunk-pp6vhqrr.js} +1 -1
  215. package/bundle/chunk-pqkjhn8h.js +2 -0
  216. package/bundle/{chunk-ezja6njs.js → chunk-pv67gwce.js} +1 -1
  217. package/bundle/{chunk-b3rpzkcb.js → chunk-q7vasbxn.js} +1 -1
  218. package/bundle/chunk-qadw6j20.js +2 -0
  219. package/bundle/{chunk-89q1y7tc.js → chunk-qc8rsn4v.js} +1 -1
  220. package/bundle/chunk-qd8w2gkd.js +2 -0
  221. package/bundle/chunk-qggcszs2.js +2 -0
  222. package/bundle/{chunk-q1v2pytx.js → chunk-qrsveve6.js} +1 -1
  223. package/bundle/chunk-r7sqdfad.js +2 -0
  224. package/bundle/chunk-r8m7rtfc.js +2 -0
  225. package/bundle/{chunk-7ppd2phw.js → chunk-rbk8seme.js} +1 -1
  226. package/bundle/chunk-rf12t4n5.js +2 -0
  227. package/bundle/{chunk-04tw0r4s.js → chunk-rg0mrprz.js} +1 -1
  228. package/bundle/{chunk-cdhmc0t0.js → chunk-rjd8gbs5.js} +1 -1
  229. package/bundle/chunk-rkyf0cp8.js +2 -0
  230. package/bundle/chunk-rpgne7xh.js +2 -0
  231. package/bundle/chunk-rvgj1vky.js +2 -0
  232. package/bundle/{chunk-c01z3cvg.js → chunk-rvkrgkeq.js} +1 -1
  233. package/bundle/chunk-rza530gm.js +5 -0
  234. package/bundle/{chunk-2ahqhh4z.js → chunk-rzhdkkpz.js} +1 -1
  235. package/bundle/chunk-s3mnrhbx.js +5 -0
  236. package/bundle/chunk-s6ktx2sx.js +2 -0
  237. package/bundle/{chunk-kqn9h2gk.js → chunk-skqbaadf.js} +1 -1
  238. package/bundle/chunk-ss2jvqrg.js +2 -0
  239. package/bundle/{chunk-ydp0q1hk.js → chunk-ss2ms1r3.js} +1 -1
  240. package/bundle/{chunk-1fbeendk.js → chunk-t56r99hp.js} +1 -1
  241. package/bundle/{chunk-xc5044tm.js → chunk-t8m74g39.js} +1 -1
  242. package/bundle/{chunk-s6bar2f9.js → chunk-t9mz17gb.js} +2 -2
  243. package/bundle/{chunk-cvdxgsq1.js → chunk-tq0239xp.js} +1 -1
  244. package/bundle/{chunk-whxjkz9a.js → chunk-tqj69nh6.js} +2 -2
  245. package/bundle/{chunk-hj5y7fvk.js → chunk-tt30dybd.js} +1 -1
  246. package/bundle/{chunk-5a5t01ka.js → chunk-tvdmnee6.js} +1 -1
  247. package/bundle/chunk-tvwwq4b3.js +2 -0
  248. package/bundle/{chunk-dhjp0zx2.js → chunk-v1xjc3s8.js} +1 -1
  249. package/bundle/chunk-v2n26eg4.js +2 -0
  250. package/bundle/chunk-vcw00k0n.js +3 -0
  251. package/bundle/{chunk-7jbz3dgt.js → chunk-vhe0tth1.js} +1 -1
  252. package/bundle/{chunk-yfkvjphe.js → chunk-vvxmwyrw.js} +1 -1
  253. package/bundle/{chunk-p68rwmhc.js → chunk-vxyy2dp3.js} +2 -2
  254. package/bundle/{chunk-y2v09y71.js → chunk-vywnd5sf.js} +1 -1
  255. package/bundle/{chunk-0jgsp4c2.js → chunk-w18xs2h5.js} +1 -1
  256. package/bundle/{chunk-fjgyrsbw.js → chunk-w7vh8cxt.js} +1 -1
  257. package/bundle/chunk-w8saweey.js +2 -0
  258. package/bundle/chunk-we9cv8we.js +8 -0
  259. package/bundle/chunk-wezarrvy.js +2 -0
  260. package/bundle/{chunk-d6r4xwtg.js → chunk-wfb608qf.js} +3 -3
  261. package/bundle/{chunk-3g1yz39h.js → chunk-whe7h2mj.js} +1 -1
  262. package/bundle/chunk-wmqsdt2c.js +3 -0
  263. package/bundle/chunk-wqj0xasg.js +2 -0
  264. package/bundle/chunk-wr42tphe.js +2 -0
  265. package/bundle/chunk-x24y7qyd.js +2 -0
  266. package/bundle/{chunk-07g7cybt.js → chunk-x25zkrz7.js} +1 -1
  267. package/bundle/{chunk-tr8sf0dk.js → chunk-x3y2xzhn.js} +1 -1
  268. package/bundle/{chunk-27yxgy03.js → chunk-x4sp99g6.js} +1 -1
  269. package/bundle/{chunk-3nwve06r.js → chunk-x562b0xk.js} +1 -1
  270. package/bundle/{chunk-61c62e5s.js → chunk-x7k5yeey.js} +1 -1
  271. package/bundle/{chunk-fkgv2hqd.js → chunk-x9rbv6p6.js} +1 -1
  272. package/bundle/{chunk-wnqwb6fd.js → chunk-xcmgkc57.js} +1 -1
  273. package/bundle/chunk-xj765svc.js +3 -0
  274. package/bundle/{chunk-gm85xefs.js → chunk-xm7wascx.js} +1 -1
  275. package/bundle/{chunk-whcg14sc.js → chunk-xrs18kzn.js} +1 -1
  276. package/bundle/{chunk-6nbzdb0r.js → chunk-xthkjax9.js} +1 -1
  277. package/bundle/{chunk-scnz207s.js → chunk-xvwvd4kq.js} +2 -2
  278. package/bundle/{chunk-zb0me4kk.js → chunk-xzrb857v.js} +1 -1
  279. package/bundle/chunk-y2d0w09y.js +2 -0
  280. package/bundle/{chunk-3nyqh1d6.js → chunk-y3b4k38p.js} +1 -1
  281. package/bundle/{chunk-svvgv1s0.js → chunk-y6123zvq.js} +1 -1
  282. package/bundle/chunk-y7sy3w6z.js +2 -0
  283. package/bundle/{chunk-vg2fmyje.js → chunk-y9q0hb7b.js} +2 -2
  284. package/bundle/chunk-yb79f79m.js +2 -0
  285. package/bundle/{chunk-fnbpap62.js → chunk-yek0sk2q.js} +1 -1
  286. package/bundle/{chunk-wfs4pcwa.js → chunk-ygs5pzk7.js} +4 -4
  287. package/bundle/{chunk-3bmzjznz.js → chunk-yhbcbjfk.js} +1 -1
  288. package/bundle/{chunk-sermjas1.js → chunk-yjf3kyej.js} +1 -1
  289. package/bundle/chunk-yjnyzpmt.js +2 -0
  290. package/bundle/{chunk-0a0vat1h.js → chunk-yp5bypsp.js} +2 -2
  291. package/bundle/{chunk-h0rpmne5.js → chunk-yp8wyzzm.js} +1 -1
  292. package/bundle/chunk-yqbcnsa1.js +2 -0
  293. package/bundle/{chunk-4xh1qm90.js → chunk-yv0xrnn9.js} +1 -1
  294. package/bundle/chunk-z3mra3nm.js +2 -0
  295. package/bundle/chunk-za7mwbye.js +2 -0
  296. package/bundle/chunk-zaks8cae.js +11 -0
  297. package/bundle/{chunk-0fmbz83g.js → chunk-zcsgqk9f.js} +1 -1
  298. package/bundle/chunk-zqqx96jx.js +3 -0
  299. package/bundle/{chunk-snm5q21k.js → chunk-zs8kqdsf.js} +2 -2
  300. package/bundle/{chunk-y062spw2.js → chunk-zscer8rc.js} +1 -1
  301. package/bundle/{chunk-qjjch1zt.js → chunk-zw815d68.js} +2 -2
  302. package/bundle/chunk-zy9w1vkc.js +2 -0
  303. package/bundle/index.js +3 -3
  304. package/bundle/parser.worker.js +2 -2
  305. package/bundle/worker.js +1 -1
  306. package/package.json +1 -1
  307. package/bundle/chunk-07ws99b1.js +0 -2
  308. package/bundle/chunk-09c4ngag.js +0 -2
  309. package/bundle/chunk-0ch32p4c.js +0 -3
  310. package/bundle/chunk-0jgst767.js +0 -2
  311. package/bundle/chunk-0psrr9vp.js +0 -2
  312. package/bundle/chunk-1j73cnvz.js +0 -2
  313. package/bundle/chunk-1yddn03z.js +0 -2
  314. package/bundle/chunk-27dgtm8r.js +0 -2
  315. package/bundle/chunk-2ec6ps8r.js +0 -5
  316. package/bundle/chunk-38g8yzw0.js +0 -2
  317. package/bundle/chunk-3bkd0ar3.js +0 -2
  318. package/bundle/chunk-3f4zht9e.js +0 -2
  319. package/bundle/chunk-3pxnp6jb.js +0 -2
  320. package/bundle/chunk-3szwfy7w.js +0 -3
  321. package/bundle/chunk-426dt7be.js +0 -2
  322. package/bundle/chunk-4amgp4yd.js +0 -3
  323. package/bundle/chunk-4p5e5tsz.js +0 -28
  324. package/bundle/chunk-4pjm21a5.js +0 -2
  325. package/bundle/chunk-4sz3jbc5.js +0 -2
  326. package/bundle/chunk-58x5seqn.js +0 -2
  327. package/bundle/chunk-5xe6x2rt.js +0 -2
  328. package/bundle/chunk-618tmyx9.js +0 -2
  329. package/bundle/chunk-6d9wsjxm.js +0 -2
  330. package/bundle/chunk-730a2d1k.js +0 -2
  331. package/bundle/chunk-76wrw0cs.js +0 -2
  332. package/bundle/chunk-7bd0x9vf.js +0 -2
  333. package/bundle/chunk-7czkntef.js +0 -2
  334. package/bundle/chunk-7ex57nyh.js +0 -2
  335. package/bundle/chunk-7gpczxbh.js +0 -2
  336. package/bundle/chunk-7j0bgeh2.js +0 -2
  337. package/bundle/chunk-7py443fe.js +0 -2
  338. package/bundle/chunk-90q5sae0.js +0 -2
  339. package/bundle/chunk-9amwe0ed.js +0 -2
  340. package/bundle/chunk-9grvepmd.js +0 -2
  341. package/bundle/chunk-9hrh15p2.js +0 -2
  342. package/bundle/chunk-a0v55ywn.js +0 -8
  343. package/bundle/chunk-a2qz9m10.js +0 -2
  344. package/bundle/chunk-av6ezvxm.js +0 -2
  345. package/bundle/chunk-beksar7w.js +0 -2
  346. package/bundle/chunk-bg66rqrx.js +0 -2
  347. package/bundle/chunk-bn15mzd7.js +0 -2
  348. package/bundle/chunk-bt6yw07v.js +0 -2
  349. package/bundle/chunk-cy9s1ma5.js +0 -2
  350. package/bundle/chunk-d0nkvp57.js +0 -2
  351. package/bundle/chunk-dvk2wwjj.js +0 -2
  352. package/bundle/chunk-dxe29jj6.js +0 -2
  353. package/bundle/chunk-e0jy9qxd.js +0 -2
  354. package/bundle/chunk-eercqt72.js +0 -2
  355. package/bundle/chunk-efxd6b2k.js +0 -2
  356. package/bundle/chunk-eneawsj8.js +0 -2
  357. package/bundle/chunk-f72pppr7.js +0 -2
  358. package/bundle/chunk-feyphhxd.js +0 -2
  359. package/bundle/chunk-fnnch1e9.js +0 -2
  360. package/bundle/chunk-ft93f33g.js +0 -3
  361. package/bundle/chunk-gk34kh8p.js +0 -2
  362. package/bundle/chunk-gn50xqbd.js +0 -2
  363. package/bundle/chunk-h6rv626m.js +0 -2
  364. package/bundle/chunk-h7s2w1e2.js +0 -2
  365. package/bundle/chunk-hmv2cdnz.js +0 -2
  366. package/bundle/chunk-ht81ensf.js +0 -2
  367. package/bundle/chunk-hxpgs78j.js +0 -5
  368. package/bundle/chunk-j59ktwny.js +0 -2
  369. package/bundle/chunk-jmz2mq3t.js +0 -2
  370. package/bundle/chunk-jvqbvgjy.js +0 -11
  371. package/bundle/chunk-k309zez0.js +0 -3
  372. package/bundle/chunk-k3fn3yed.js +0 -2
  373. package/bundle/chunk-kpw6nghv.js +0 -2
  374. package/bundle/chunk-m5ghbt5y.js +0 -2
  375. package/bundle/chunk-mj4bepvj.js +0 -2
  376. package/bundle/chunk-mn41f9qv.js +0 -2
  377. package/bundle/chunk-mqjf9sbm.js +0 -2
  378. package/bundle/chunk-n5gwrrbb.js +0 -2
  379. package/bundle/chunk-nfjhem1c.js +0 -2
  380. package/bundle/chunk-ngytjdg2.js +0 -3
  381. package/bundle/chunk-nj4d554m.js +0 -11
  382. package/bundle/chunk-nrc3bj9p.js +0 -2
  383. package/bundle/chunk-nt4e3em9.js +0 -3
  384. package/bundle/chunk-nxyyn2ra.js +0 -2
  385. package/bundle/chunk-p5tceb4k.js +0 -2
  386. package/bundle/chunk-pvpy9kq1.js +0 -800
  387. package/bundle/chunk-qjgm3e2p.js +0 -2
  388. package/bundle/chunk-qt80mhdn.js +0 -2
  389. package/bundle/chunk-qtw5nrr4.js +0 -2
  390. package/bundle/chunk-rc9ex3vt.js +0 -2
  391. package/bundle/chunk-s9672vvv.js +0 -2
  392. package/bundle/chunk-sbyey0qb.js +0 -2
  393. package/bundle/chunk-shpq6es1.js +0 -3
  394. package/bundle/chunk-sj5v361q.js +0 -2
  395. package/bundle/chunk-ta3k9syc.js +0 -2
  396. package/bundle/chunk-tk5afan4.js +0 -2
  397. package/bundle/chunk-tpndnprb.js +0 -2
  398. package/bundle/chunk-v965rsr8.js +0 -3
  399. package/bundle/chunk-vcmrrt8b.js +0 -3
  400. package/bundle/chunk-vcrn3v70.js +0 -2
  401. package/bundle/chunk-vwxfgea7.js +0 -2
  402. package/bundle/chunk-w0kgcz1t.js +0 -2
  403. package/bundle/chunk-wgpsmxqx.js +0 -7
  404. package/bundle/chunk-wksczmes.js +0 -2
  405. package/bundle/chunk-wsxta33r.js +0 -2
  406. package/bundle/chunk-xck0sq3k.js +0 -2
  407. package/bundle/chunk-xjyhtm8r.js +0 -2
  408. package/bundle/chunk-xm08fc2q.js +0 -3
  409. package/bundle/chunk-ygc5qegv.js +0 -2
  410. package/bundle/chunk-yjqmzm51.js +0 -2
  411. package/bundle/chunk-yzc53n88.js +0 -2
  412. package/bundle/chunk-yzjc15vp.js +0 -9
  413. package/bundle/chunk-z7y9pdj7.js +0 -2
  414. package/bundle/chunk-z8g819cz.js +0 -2
  415. package/bundle/chunk-z8r65yw3.js +0 -2
  416. package/bundle/chunk-zt1nbwmm.js +0 -2
  417. package/bundle/chunk-zz36xg2n.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-aztre27e.js";var pr=Object.defineProperty,hr=(e)=>{throw TypeError(e)},cn=(e,t,r)=>(t in e)?pr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dr=(e,t)=>{for(var r in t)pr(e,r,{get:t[r],enumerable:!0})},kt=(e,t,r)=>cn(e,typeof t!="symbol"?t+"":t,r),mr=(e,t,r)=>t.has(e)||hr("Cannot "+r),F=(e,t,r)=>(mr(e,t,"read from private field"),r?r.call(e):t.get(e)),gr=(e,t,r)=>t.has(e)?hr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),pn=(e,t,r,n)=>(mr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),fr={};dr(fr,{languages:()=>ns,options:()=>is,parsers:()=>tn,printers:()=>mu});var hn=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},L=hn,vr="string",Cr="array",yr="cursor",rt="indent",nt="align",Sr="trim",at="group",it="fill",st="if-break",ut="indent-if-break",br="line-suffix",_r="line-suffix-boundary",Z="line",wr="label",ot="break-parent",Ar=new Set([yr,rt,nt,Sr,at,it,st,ut,br,_r,Z,wr,ot]),dn=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},de=dn;function mn(e){if(typeof e=="string")return vr;if(Array.isArray(e))return Cr;if(!e)return;let{type:t}=e;if(Ar.has(t))return t}var kr=mn,gn=(e)=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function fn(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
2
+ import"./chunk-7xm75w1e.js";var pr=Object.defineProperty,hr=(e)=>{throw TypeError(e)},cn=(e,t,r)=>(t in e)?pr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dr=(e,t)=>{for(var r in t)pr(e,r,{get:t[r],enumerable:!0})},kt=(e,t,r)=>cn(e,typeof t!="symbol"?t+"":t,r),mr=(e,t,r)=>t.has(e)||hr("Cannot "+r),F=(e,t,r)=>(mr(e,t,"read from private field"),r?r.call(e):t.get(e)),gr=(e,t,r)=>t.has(e)?hr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),pn=(e,t,r,n)=>(mr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),fr={};dr(fr,{languages:()=>ns,options:()=>is,parsers:()=>tn,printers:()=>mu});var hn=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},L=hn,vr="string",Cr="array",yr="cursor",rt="indent",nt="align",Sr="trim",at="group",it="fill",st="if-break",ut="indent-if-break",br="line-suffix",_r="line-suffix-boundary",Z="line",wr="label",ot="break-parent",Ar=new Set([yr,rt,nt,Sr,at,it,st,ut,br,_r,Z,wr,ot]),dn=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},de=dn;function mn(e){if(typeof e=="string")return vr;if(Array.isArray(e))return Cr;if(!e)return;let{type:t}=e;if(Ar.has(t))return t}var kr=mn,gn=(e)=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function fn(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
3
3
  Expected it to be 'string' or 'object'.`;if(kr(e))throw Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=gn([...Ar].map((a)=>`'${a}'`));return`Unexpected doc.type '${e.type}'.
4
4
  Expected it to be ${n}.`}var vn=class extends Error{name="InvalidDocError";constructor(e){super(fn(e)),this.doc=e}},Cn=vn;function Er(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let s=a(i);return r.set(i,s),s}function a(i){switch(kr(i)){case Cr:return t(i.map(n));case it:return t({...i,parts:i.parts.map(n)});case st:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case at:{let{expandedStates:s,contents:u}=i;return s?(s=s.map(n),u=s[0]):u=n(u),t({...i,contents:u,expandedStates:s})}case nt:case rt:case ut:case wr:case br:return t({...i,contents:n(i.contents)});case vr:case yr:case Sr:case _r:case Z:case ot:return t(i);default:throw new Cn(i)}}}function P(e,t=kn){return Er(e,(r)=>typeof r=="string"?ee(t,r.split(`
5
5
  `)):r)}var lt=()=>{},$=lt,xr=lt,yn=lt;function H(e){return $(e),{type:rt,contents:e}}function Dr(e,t){return $(t),{type:nt,contents:t,n:e}}function k(e,t={}){return $(e),xr(t.expandedStates,!0),{type:at,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Sn(e){return Dr(Number.NEGATIVE_INFINITY,e)}function bn(e){return Dr({type:"root"},e)}function Tr(e){return yn(e),{type:it,parts:e}}function xe(e,t="",r={}){return $(e),t!==""&&$(t),{type:st,breakContents:e,flatContents:t,groupId:r.groupId}}function _n(e,t){return $(e),{type:ut,contents:e,groupId:t.groupId,negate:t.negate}}var me={type:ot},wn={type:Z,hard:!0},An={type:Z,hard:!0,literal:!0},_={type:Z},D={type:Z,soft:!0},y=[wn,me],kn=[An,me];function ee(e,t){$(e),xr(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var Se="'",Et='"';function En(e,t){let r=t===!0||t===Se?Se:Et,n=r===Se?Et:Se,a=0,i=0;for(let s of e)s===r?a++:s===n&&i++;return a>i?n:r}var xn=En;function Dn(e){if(typeof e!="string")throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var N,Tn=class{constructor(e){gr(this,N),pn(this,N,new Set(e))}getLeadingWhitespaceCount(e){let t=F(this,N),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=F(this,N),r=0;for(let n=e.length-1;n>=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return F(this,N).has(e.charAt(0))}hasTrailingWhitespace(e){return F(this,N).has(de(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${Dn([...F(this,N)].join(""))}]+`,n=new RegExp(t?`(${r})`:r,"u");return e.split(n)}hasWhitespaceCharacter(e){let t=F(this,N);return Array.prototype.some.call(e,(r)=>t.has(r))}hasNonWhitespaceCharacter(e){let t=F(this,N);return Array.prototype.some.call(e,(r)=>!t.has(r))}isWhitespaceOnly(e){let t=F(this,N);return Array.prototype.every.call(e,(r)=>t.has(r))}};N=new WeakMap;var Bn=Tn,Ln=["\t",`
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-aztre27e.js";var D=Object.defineProperty,x=(J,Q,W)=>(Q in J)?D(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:W}):J[Q]=W,B=(J,Q,W)=>x(J,typeof Q!=="symbol"?Q+"":Q,W),I="CF_TEMP_TOKEN",L=[{name:"openai",regex:/^https:\/\/api\.openai\.com\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.openai\.com\//,"")},{name:"deepseek",regex:/^https:\/\/api\.deepseek\.com\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.deepseek\.com\//,"")},{name:"anthropic",regex:/^https:\/\/api\.anthropic\.com\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.anthropic\.com\//,""),headerKey:"x-api-key"},{name:"google-ai-studio",regex:/^https:\/\/generativelanguage\.googleapis\.com\//,headerKey:"x-goog-api-key",transformEndpoint:(J)=>J.replace(/^https:\/\/generativelanguage\.googleapis\.com\//,"")},{name:"google-vertex-ai",regex:/aiplatform\.googleapis\.com/,transformEndpoint:(J)=>J.replace(/https:\/\/(.*)[-]?aiplatform\.googleapis\.com\//,"")},{name:"grok",regex:/^https:\/\/api\.x\.ai\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.x\.ai\//,"")},{name:"mistral",regex:/^https:\/\/api\.mistral\.ai\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.mistral\.ai\//,"")},{name:"perplexity-ai",regex:/^https:\/\/api\.perplexity\.ai\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.perplexity\.ai\//,"")},{name:"replicate",regex:/^https:\/\/api\.replicate\.com\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.replicate\.com\//,"")},{name:"groq",regex:/^https:\/\/api\.groq\.com\/openai\/v1\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.groq\.com\/openai\/v1\//,"")},{name:"google-vertex-ai",regex:/^https:\/\/(?:[a-z0-9]+-)*aiplatform\.googleapis\.com\//,transformEndpoint:(J)=>J.replace(/^https:\/\/(?:[a-z0-9]+-)*aiplatform\.googleapis\.com\//,""),headerKey:"authorization"},{name:"azure-openai",regex:/^https:\/\/(?<resource>[^.]+)\.openai\.azure\.com\/openai\/deployments\/(?<deployment>[^/]+)\/(?<rest>.*)$/,transformEndpoint:(J)=>{let Q=J.match(/^https:\/\/(?<resource>[^.]+)\.openai\.azure\.com\/openai\/deployments\/(?<deployment>[^/]+)\/(?<rest>.*)$/);if(!Q||!Q.groups)return J;let{resource:W,deployment:X,rest:Z}=Q.groups;if(!W||!X||!Z)throw Error("Failed to parse Azure OpenAI endpoint URL.");return`${W}/${X}/${Z}`},headerKey:"api-key"},{name:"openrouter",regex:/^https:\/\/openrouter\.ai\/api\//,transformEndpoint:(J)=>J.replace(/^https:\/\/openrouter\.ai\/api\//,"")},{name:"compat",regex:/^https:\/\/gateway\.ai\.cloudflare\.com\/v1\/compat\//,transformEndpoint:(J)=>J.replace(/^https:\/\/gateway\.ai\.cloudflare\.com\/v1\/compat\//,"")}],z=class extends Error{},P=class extends Error{},T=class extends Error{};async function U(J){return await new Response(J).json()}var H=class{constructor(J,Q){B(this,"specificationVersion","v3"),B(this,"defaultObjectGenerationMode","json"),B(this,"supportedUrls",{}),B(this,"models"),B(this,"config"),this.models=J,this.config=Q}get modelId(){if(!this.models[0])throw Error("models cannot be empty array");return this.models[0].modelId}get provider(){if(!this.models[0])throw Error("models cannot be empty array");return this.models[0].provider}async processModelRequest(J,Q){let W=[];for(let S of this.models){if(!S.config||!Object.keys(S.config).includes("fetch"))throw Error(`Sorry, but provider "${S.provider}" is currently not supported, please open a issue in the github repo!`);S.config.fetch=(V,$)=>{throw W.push({modelProvider:S.provider,request:$,url:V}),new z("Stopping provider execution...")};try{await S[Q](J)}catch(V){if(!(V instanceof z))throw V}}let X=await Promise.all(W.map(async(S)=>{let V=null;for(let R of L)if(R.regex.test(S.url))V=R;if(!V)throw Error(`Sorry, but provider "${S.modelProvider}" is currently not supported, please open a issue in the github repo!`);if(!S.request.body)throw Error("Ai Gateway provider received an unexpected empty body");let $=V.headerKey??"authorization";if(("get"in S.request.headers?S.request.headers.get($):S.request.headers[$])?.indexOf(I)!==-1)if("delete"in S.request.headers)S.request.headers.delete($);else delete S.request.headers[$];return{endpoint:V.transformEndpoint(S.url),headers:S.request.headers,provider:V.name,query:await U(S.request.body)}})),Z=N(this.config.options??{}),Y;if("binding"in this.config){let S=X.map((V)=>({...V,headers:{...V.headers??{},...Object.fromEntries(Z.entries())}}));Y=await this.config.binding.run(S,{signal:J.abortSignal})}else Z.set("Content-Type","application/json"),Z.set("cf-aig-authorization",`Bearer ${this.config.apiKey}`),Y=await fetch(`https://gateway.ai.cloudflare.com/v1/${this.config.accountId}/${this.config.gateway}`,{body:JSON.stringify(X),headers:Z,method:"POST",signal:J.abortSignal});if(Y.status===400){let V=await Y.clone().json();if(V.success===!1&&V.error&&V.error.length>0&&V.error[0]?.code===2001)throw new P("This AI gateway does not exist")}else if(Y.status===401){let V=await Y.clone().json();if(V.success===!1&&V.error&&V.error.length>0&&V.error[0]?.code===2009)throw new T("Your AI Gateway has authentication active, but you didn't provide a valid apiKey")}let K=Number.parseInt(Y.headers.get("cf-aig-step")??"0",10);if(!this.models[K])throw Error("Unexpected AI Gateway Error");return this.models[K].config={...this.models[K].config,fetch:(S,V)=>Y},this.models[K][Q](J)}async doStream(J){return this.processModelRequest(J,"doStream")}async doGenerate(J){return this.processModelRequest(J,"doGenerate")}};function f(J){let Q=(X)=>{return new H(Array.isArray(X)?X:[X],J)},W=(X)=>Q(X);return W.chat=Q,W}function N(J){let Q=new Headers;if(J.skipCache===!0)Q.set("cf-skip-cache","true");if(J.cacheTtl)Q.set("cf-cache-ttl",J.cacheTtl.toString());if(J.metadata)Q.set("cf-aig-metadata",JSON.stringify(J.metadata));if(J.cacheKey)Q.set("cf-aig-cache-key",J.cacheKey);if(J.collectLog!==void 0)Q.set("cf-aig-collect-log",J.collectLog===!0?"true":"false");if(J.eventId!==void 0)Q.set("cf-aig-event-id",J.eventId);if(J.requestTimeoutMs!==void 0)Q.set("cf-aig-request-timeout",J.requestTimeoutMs.toString());if(J.retries!==void 0){if(J.retries.maxAttempts!==void 0)Q.set("cf-aig-max-attempts",J.retries.maxAttempts.toString());if(J.retries.retryDelayMs!==void 0)Q.set("cf-aig-retry-delay",J.retries.retryDelayMs.toString());if(J.retries.backoff!==void 0)Q.set("cf-aig-backoff",J.retries.backoff)}return Q}export{N as parseAiGatewayOptions,f as createAiGateway,T as AiGatewayUnauthorizedError,z as AiGatewayInternalFetchError,P as AiGatewayDoesNotExist,H as AiGatewayChatLanguageModel};
2
+ import"./chunk-7xm75w1e.js";var D=Object.defineProperty,x=(J,Q,W)=>(Q in J)?D(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:W}):J[Q]=W,B=(J,Q,W)=>x(J,typeof Q!=="symbol"?Q+"":Q,W),I="CF_TEMP_TOKEN",L=[{name:"openai",regex:/^https:\/\/api\.openai\.com\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.openai\.com\//,"")},{name:"deepseek",regex:/^https:\/\/api\.deepseek\.com\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.deepseek\.com\//,"")},{name:"anthropic",regex:/^https:\/\/api\.anthropic\.com\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.anthropic\.com\//,""),headerKey:"x-api-key"},{name:"google-ai-studio",regex:/^https:\/\/generativelanguage\.googleapis\.com\//,headerKey:"x-goog-api-key",transformEndpoint:(J)=>J.replace(/^https:\/\/generativelanguage\.googleapis\.com\//,"")},{name:"google-vertex-ai",regex:/aiplatform\.googleapis\.com/,transformEndpoint:(J)=>J.replace(/https:\/\/(.*)[-]?aiplatform\.googleapis\.com\//,"")},{name:"grok",regex:/^https:\/\/api\.x\.ai\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.x\.ai\//,"")},{name:"mistral",regex:/^https:\/\/api\.mistral\.ai\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.mistral\.ai\//,"")},{name:"perplexity-ai",regex:/^https:\/\/api\.perplexity\.ai\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.perplexity\.ai\//,"")},{name:"replicate",regex:/^https:\/\/api\.replicate\.com\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.replicate\.com\//,"")},{name:"groq",regex:/^https:\/\/api\.groq\.com\/openai\/v1\//,transformEndpoint:(J)=>J.replace(/^https:\/\/api\.groq\.com\/openai\/v1\//,"")},{name:"google-vertex-ai",regex:/^https:\/\/(?:[a-z0-9]+-)*aiplatform\.googleapis\.com\//,transformEndpoint:(J)=>J.replace(/^https:\/\/(?:[a-z0-9]+-)*aiplatform\.googleapis\.com\//,""),headerKey:"authorization"},{name:"azure-openai",regex:/^https:\/\/(?<resource>[^.]+)\.openai\.azure\.com\/openai\/deployments\/(?<deployment>[^/]+)\/(?<rest>.*)$/,transformEndpoint:(J)=>{let Q=J.match(/^https:\/\/(?<resource>[^.]+)\.openai\.azure\.com\/openai\/deployments\/(?<deployment>[^/]+)\/(?<rest>.*)$/);if(!Q||!Q.groups)return J;let{resource:W,deployment:X,rest:Z}=Q.groups;if(!W||!X||!Z)throw Error("Failed to parse Azure OpenAI endpoint URL.");return`${W}/${X}/${Z}`},headerKey:"api-key"},{name:"openrouter",regex:/^https:\/\/openrouter\.ai\/api\//,transformEndpoint:(J)=>J.replace(/^https:\/\/openrouter\.ai\/api\//,"")},{name:"compat",regex:/^https:\/\/gateway\.ai\.cloudflare\.com\/v1\/compat\//,transformEndpoint:(J)=>J.replace(/^https:\/\/gateway\.ai\.cloudflare\.com\/v1\/compat\//,"")}],z=class extends Error{},P=class extends Error{},T=class extends Error{};async function U(J){return await new Response(J).json()}var H=class{constructor(J,Q){B(this,"specificationVersion","v3"),B(this,"defaultObjectGenerationMode","json"),B(this,"supportedUrls",{}),B(this,"models"),B(this,"config"),this.models=J,this.config=Q}get modelId(){if(!this.models[0])throw Error("models cannot be empty array");return this.models[0].modelId}get provider(){if(!this.models[0])throw Error("models cannot be empty array");return this.models[0].provider}async processModelRequest(J,Q){let W=[];for(let S of this.models){if(!S.config||!Object.keys(S.config).includes("fetch"))throw Error(`Sorry, but provider "${S.provider}" is currently not supported, please open a issue in the github repo!`);S.config.fetch=(V,$)=>{throw W.push({modelProvider:S.provider,request:$,url:V}),new z("Stopping provider execution...")};try{await S[Q](J)}catch(V){if(!(V instanceof z))throw V}}let X=await Promise.all(W.map(async(S)=>{let V=null;for(let R of L)if(R.regex.test(S.url))V=R;if(!V)throw Error(`Sorry, but provider "${S.modelProvider}" is currently not supported, please open a issue in the github repo!`);if(!S.request.body)throw Error("Ai Gateway provider received an unexpected empty body");let $=V.headerKey??"authorization";if(("get"in S.request.headers?S.request.headers.get($):S.request.headers[$])?.indexOf(I)!==-1)if("delete"in S.request.headers)S.request.headers.delete($);else delete S.request.headers[$];return{endpoint:V.transformEndpoint(S.url),headers:S.request.headers,provider:V.name,query:await U(S.request.body)}})),Z=N(this.config.options??{}),Y;if("binding"in this.config){let S=X.map((V)=>({...V,headers:{...V.headers??{},...Object.fromEntries(Z.entries())}}));Y=await this.config.binding.run(S,{signal:J.abortSignal})}else Z.set("Content-Type","application/json"),Z.set("cf-aig-authorization",`Bearer ${this.config.apiKey}`),Y=await fetch(`https://gateway.ai.cloudflare.com/v1/${this.config.accountId}/${this.config.gateway}`,{body:JSON.stringify(X),headers:Z,method:"POST",signal:J.abortSignal});if(Y.status===400){let V=await Y.clone().json();if(V.success===!1&&V.error&&V.error.length>0&&V.error[0]?.code===2001)throw new P("This AI gateway does not exist")}else if(Y.status===401){let V=await Y.clone().json();if(V.success===!1&&V.error&&V.error.length>0&&V.error[0]?.code===2009)throw new T("Your AI Gateway has authentication active, but you didn't provide a valid apiKey")}let K=Number.parseInt(Y.headers.get("cf-aig-step")??"0",10);if(!this.models[K])throw Error("Unexpected AI Gateway Error");return this.models[K].config={...this.models[K].config,fetch:(S,V)=>Y},this.models[K][Q](J)}async doStream(J){return this.processModelRequest(J,"doStream")}async doGenerate(J){return this.processModelRequest(J,"doGenerate")}};function f(J){let Q=(X)=>{return new H(Array.isArray(X)?X:[X],J)},W=(X)=>Q(X);return W.chat=Q,W}function N(J){let Q=new Headers;if(J.skipCache===!0)Q.set("cf-skip-cache","true");if(J.cacheTtl)Q.set("cf-cache-ttl",J.cacheTtl.toString());if(J.metadata)Q.set("cf-aig-metadata",JSON.stringify(J.metadata));if(J.cacheKey)Q.set("cf-aig-cache-key",J.cacheKey);if(J.collectLog!==void 0)Q.set("cf-aig-collect-log",J.collectLog===!0?"true":"false");if(J.eventId!==void 0)Q.set("cf-aig-event-id",J.eventId);if(J.requestTimeoutMs!==void 0)Q.set("cf-aig-request-timeout",J.requestTimeoutMs.toString());if(J.retries!==void 0){if(J.retries.maxAttempts!==void 0)Q.set("cf-aig-max-attempts",J.retries.maxAttempts.toString());if(J.retries.retryDelayMs!==void 0)Q.set("cf-aig-retry-delay",J.retries.retryDelayMs.toString());if(J.retries.backoff!==void 0)Q.set("cf-aig-backoff",J.retries.backoff)}return Q}export{N as parseAiGatewayOptions,f as createAiGateway,T as AiGatewayUnauthorizedError,z as AiGatewayInternalFetchError,P as AiGatewayDoesNotExist,H as AiGatewayChatLanguageModel};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{ot as i}from"./chunk-be216spx.js";import{ou as o}from"./chunk-3szwfy7w.js";import{$P as c}from"./chunk-aztre27e.js";var e=c(i(),1);import p from"path";function l(n,t){let r=t?.PATH??t?.Path??process.env.PATH??process.env.Path??"",h=r?r+p.delimiter+o.Path.bin:o.Path.bin,s=e.default.sync(n,{nothrow:!0,path:h,pathExt:t?.PATHEXT??t?.PathExt??process.env.PATHEXT??process.env.PathExt});return typeof s==="string"?s:null}
3
- export{l as bq};
2
+ import{Qr as i}from"./chunk-10bjs581.js";import{Qs as o}from"./chunk-xj765svc.js";import{BO as c}from"./chunk-7xm75w1e.js";var e=c(i(),1);import p from"path";function l(n,t){let r=t?.PATH??t?.Path??process.env.PATH??process.env.Path??"",h=r?r+p.delimiter+o.Path.bin:o.Path.bin,s=e.default.sync(n,{nothrow:!0,path:h,pathExt:t?.PATHEXT??t?.PathExt??process.env.PATHEXT??process.env.PathExt});return typeof s==="string"?s:null}
3
+ export{l as Do};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{FO as t}from"./chunk-7xm75w1e.js";var e=await import("./chunk-dafmkrhn.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-7xm75w1e.js";var h="./tree-sitter-typescript-zxjzwt75.wasm";export{h as default};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-aztre27e.js";var Jm=Object.defineProperty,Om=(e)=>{throw TypeError(e)},dh=(e,_,o)=>(_ in e)?Jm(e,_,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[_]=o,Lm=(e,_)=>{for(var o in _)Jm(e,o,{get:_[o],enumerable:!0})},zo=(e,_,o)=>dh(e,typeof _!="symbol"?_+"":_,o),mh=(e,_,o)=>_.has(e)||Om("Cannot "+o),fh=(e,_,o)=>_.has(e)?Om("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(e):_.set(e,o),ye=(e,_,o)=>(mh(e,_,"access private method"),o),Rm={};Lm(Rm,{parsers:()=>qm});var qm={};Lm(qm,{typescript:()=>T4});var hh=()=>()=>{},Fp=hh,yh=(e,_,o,c)=>{if(!(e&&_==null))return _.replaceAll?_.replaceAll(o,c):o.global?_.replace(o,c):_.split(o).join(c)},Na=yh,gh="5.8",At=[],bh=new Map;function Ho(e){return e!==void 0?e.length:0}function O_(e,_){if(e!==void 0)for(let o=0;o<e.length;o++){let c=_(e[o],o);if(c)return c}}function vh(e,_){if(e!==void 0)for(let o=0;o<e.length;o++){let c=_(e[o],o);if(c!==void 0)return c}}function xd(e,_,o){let c=[];q.assertEqual(e.length,_.length);for(let h=0;h<e.length;h++)c.push(o(e[h],_[h],h));return c}function jp(e,_){if(e!==void 0){for(let o=0;o<e.length;o++)if(!_(e[o],o))return!1}return!0}function Um(e,_,o){if(e!==void 0)for(let c=o??0;c<e.length;c++){let h=e[c];if(_(h,c))return h}}function Gu(e,_,o){if(e===void 0)return-1;for(let c=o??0;c<e.length;c++)if(_(e[c],c))return c;return-1}function xh(e,_,o=Op){if(e!==void 0){for(let c=0;c<e.length;c++)if(o(e[c],_))return!0}return!1}function Xn(e,_){if(e!==void 0){let o=e.length,c=0;for(;c<o&&_(e[c]);)c++;if(c<o){let h=e.slice(0,c);for(c++;c<o;){let v=e[c];_(v)&&h.push(v),c++}return h}}return e}function cp(e,_){let o;if(e!==void 0){o=[];for(let c=0;c<e.length;c++)o.push(_(e[c],c))}return o}function Bm(e){let _=[];for(let o=0;o<e.length;o++){let c=e[o];c&&($n(c)?D_(_,c):_.push(c))}return _}function zm(e,_){let o;if(e!==void 0)for(let c=0;c<e.length;c++){let h=_(e[c],c);h&&($n(h)?o=D_(o,h):o=C_(o,h))}return o??At}function wh(e,_){let o;if(e!==void 0)for(let c=0;c<e.length;c++){let h=e[c],v=_(h,c);(o||h!==v||$n(v))&&(o||(o=e.slice(0,c)),$n(v)?D_(o,v):o.push(v))}return o??e}function Th(e,_){let o=[];if(e!==void 0)for(let c=0;c<e.length;c++){let h=_(e[c],c);h!==void 0&&o.push(h)}return o}function Zt(e,_){if(e!==void 0)if(_!==void 0){for(let o=0;o<e.length;o++)if(_(e[o]))return!0}else return e.length>0;return!1}function Mp(e,_){return _===void 0||_.length===0?e:e===void 0||e.length===0?_:[...e,..._]}function Sh(e,_,o=Op){if(e===void 0||_===void 0)return e===_;if(e.length!==_.length)return!1;for(let c=0;c<e.length;c++)if(!o(e[c],_[c],c))return!1;return!0}function C_(e,_){return _===void 0?e:e===void 0?[_]:(e.push(_),e)}function up(e,_){return _<0?e.length+_:_}function D_(e,_,o,c){if(_===void 0||_.length===0)return e;if(e===void 0)return _.slice(o,c);o=o===void 0?0:up(_,o),c=c===void 0?_.length:up(_,c);for(let h=o;h<c&&h<_.length;h++)_[h]!==void 0&&e.push(_[h]);return e}function kh(e,_,o){return xh(e,_,o)?!1:(e.push(_),!0)}function Ch(e,_,o){return e!==void 0?(kh(e,_,o),e):[_]}function Ah(e,_){return e.length===0?At:e.slice().sort(_)}var S4=Array.prototype.at?(e,_)=>e==null?void 0:e.at(_):(e,_)=>{if(e!==void 0&&(_=up(e,_),_<e.length))return e[_]};function Jp(e){return e===void 0||e.length===0?void 0:e[0]}function ja(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function Dh(e){return q.assert(e.length!==0),e[e.length-1]}function Eh(e){return e!==void 0&&e.length===1?e[0]:void 0}function Ph(e,_,o,c,h){return Nh(e,o(_),o,c,h)}function Nh(e,_,o,c,h){if(!Zt(e))return-1;let v=h??0,A=e.length-1;for(;v<=A;){let E=v+(A-v>>1),s=o(e[E],E);switch(c(s,_)){case-1:v=E+1;break;case 0:return E;case 1:A=E-1;break}}return~v}function Ih(e,_,o,c,h){if(e&&e.length>0){let v=e.length;if(v>0){let A=c===void 0||c<0?0:c,E=h===void 0||A+h>v-1?v-1:A+h,s;for(arguments.length<=2?(s=e[A],A++):s=o;A<=E;)s=_(s,e[A],A),A++;return s}}return o}var Km=Object.prototype.hasOwnProperty;function Dn(e,_){return Km.call(e,_)}function Fh(e){let _=[];for(let o in e)Km.call(e,o)&&_.push(o);return _}function jh(){let e=new Map;return e.add=Mh,e.remove=Jh,e}function Mh(e,_){let o=this.get(e);return o!==void 0?o.push(_):this.set(e,o=[_]),o}function Jh(e,_){let o=this.get(e);o!==void 0&&(Vh(o,_),o.length||this.delete(e))}function $n(e){return Array.isArray(e)}function $u(e){return $n(e)?e:[e]}function Oh(e,_){return e!==void 0&&_(e)?e:void 0}function Cn(e,_){return e!==void 0&&_(e)?e:q.fail(`Invalid cast. The supplied value ${e} did not pass the test '${q.getFunctionName(_)}'.`)}function qa(e){}function Lh(){return!0}function gt(e){return e}function wd(e){let _;return()=>(e&&(_=e(),e=void 0),_)}function H_(e){let _=new Map;return(o)=>{let c=`${typeof o}:${o}`,h=_.get(c);return h===void 0&&!_.has(c)&&(h=e(o),_.set(c,h)),h}}function Op(e,_){return e===_}function Lp(e,_){return e===_||e!==void 0&&_!==void 0&&e.toUpperCase()===_.toUpperCase()}function Rh(e,_){return Op(e,_)}function qh(e,_){return e===_?0:e===void 0?-1:_===void 0?1:e<_?-1:1}function Vm(e,_){return qh(e,_)}function Uh(e,_,o){for(let c=0;c<e.length;c++)_=Math.max(_,o(e[c]));return _}function Qo(e,_,o){let c=Math.max(2,Math.floor(e.length*0.34)),h=Math.floor(e.length*0.4)+1,v;for(let A of _){let E=o(A);if(E!==void 0&&Math.abs(E.length-e.length)<=c){if(E===e||E.length<3&&E.toLowerCase()!==e.toLowerCase())continue;let s=Bh(e,E,h-0.1);if(s===void 0)continue;q.assert(s<h),h=s,v=A}}return v}function Bh(e,_,o){let c=Array(_.length+1),h=Array(_.length+1),v=o+0.01;for(let E=0;E<=_.length;E++)c[E]=E;for(let E=1;E<=e.length;E++){let s=e.charCodeAt(E-1),V=Math.ceil(E>o?E-o:1),d=Math.floor(_.length>o+E?o+E:_.length);h[0]=E;let T=E;for(let S=1;S<V;S++)h[S]=v;for(let S=V;S<=d;S++){let F=e[E-1].toLowerCase()===_[S-1].toLowerCase()?c[S-1]+0.1:c[S-1]+2,te=s===_.charCodeAt(S-1)?c[S-1]:Math.min(c[S]+1,h[S-1]+1,F);h[S]=te,T=Math.min(T,te)}for(let S=d+1;S<=_.length;S++)h[S]=v;if(T>o)return;let b=c;c=h,h=b}let A=c[_.length];return A>o?void 0:A}function zh(e,_,o){let c=e.length-_.length;return c>=0&&(o?Lp(e.slice(c),_):e.indexOf(_,c)===c)}function Kh(e,_){e[_]=e[e.length-1],e.pop()}function Vh(e,_){return Wh(e,(o)=>o===_)}function Wh(e,_){for(let o=0;o<e.length;o++)if(_(e[o]))return Kh(e,o),!0;return!1}function _c(e,_,o){return o?Lp(e.slice(0,_.length),_):e.lastIndexOf(_,0)===0}function pp(e){return e===void 0?void 0:[e]}var q;((e)=>{let _=0;e.currentLogLevel=2,e.isDebugging=!1;function o(J){return e.currentLogLevel<=J}e.shouldLog=o;function c(J,oe){e.loggingHost&&o(J)&&e.loggingHost.log(J,oe)}function h(J){c(3,J)}e.log=h,((J)=>{function oe(Ye){c(1,Ye)}J.error=oe;function pe(Ye){c(2,Ye)}J.warn=pe;function ke(Ye){c(3,Ye)}J.log=ke;function Qe(Ye){c(4,Ye)}J.trace=Qe})(h=e.log||(e.log={}));let v={};function A(){return _}e.getAssertionLevel=A;function E(J){let oe=_;if(_=J,J>oe)for(let pe of Fh(v)){let ke=v[pe];ke!==void 0&&e[pe]!==ke.assertion&&J>=ke.level&&(e[pe]=ke,v[pe]=void 0)}}e.setAssertionLevel=E;function s(J){return _>=J}e.shouldAssert=s;function V(J,oe){return s(J)?!0:(v[oe]={level:J,assertion:e[oe]},e[oe]=qa,!1)}function d(J,oe){debugger;let pe=Error(J?`Debug Failure. ${J}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(pe,oe||d),pe}e.fail=d;function T(J,oe,pe){return d(`${oe||"Unexpected node."}\r
2
+ import"./chunk-7xm75w1e.js";var Jm=Object.defineProperty,Om=(e)=>{throw TypeError(e)},dh=(e,_,o)=>(_ in e)?Jm(e,_,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[_]=o,Lm=(e,_)=>{for(var o in _)Jm(e,o,{get:_[o],enumerable:!0})},zo=(e,_,o)=>dh(e,typeof _!="symbol"?_+"":_,o),mh=(e,_,o)=>_.has(e)||Om("Cannot "+o),fh=(e,_,o)=>_.has(e)?Om("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(e):_.set(e,o),ye=(e,_,o)=>(mh(e,_,"access private method"),o),Rm={};Lm(Rm,{parsers:()=>qm});var qm={};Lm(qm,{typescript:()=>T4});var hh=()=>()=>{},Fp=hh,yh=(e,_,o,c)=>{if(!(e&&_==null))return _.replaceAll?_.replaceAll(o,c):o.global?_.replace(o,c):_.split(o).join(c)},Na=yh,gh="5.8",At=[],bh=new Map;function Ho(e){return e!==void 0?e.length:0}function O_(e,_){if(e!==void 0)for(let o=0;o<e.length;o++){let c=_(e[o],o);if(c)return c}}function vh(e,_){if(e!==void 0)for(let o=0;o<e.length;o++){let c=_(e[o],o);if(c!==void 0)return c}}function xd(e,_,o){let c=[];q.assertEqual(e.length,_.length);for(let h=0;h<e.length;h++)c.push(o(e[h],_[h],h));return c}function jp(e,_){if(e!==void 0){for(let o=0;o<e.length;o++)if(!_(e[o],o))return!1}return!0}function Um(e,_,o){if(e!==void 0)for(let c=o??0;c<e.length;c++){let h=e[c];if(_(h,c))return h}}function Gu(e,_,o){if(e===void 0)return-1;for(let c=o??0;c<e.length;c++)if(_(e[c],c))return c;return-1}function xh(e,_,o=Op){if(e!==void 0){for(let c=0;c<e.length;c++)if(o(e[c],_))return!0}return!1}function Xn(e,_){if(e!==void 0){let o=e.length,c=0;for(;c<o&&_(e[c]);)c++;if(c<o){let h=e.slice(0,c);for(c++;c<o;){let v=e[c];_(v)&&h.push(v),c++}return h}}return e}function cp(e,_){let o;if(e!==void 0){o=[];for(let c=0;c<e.length;c++)o.push(_(e[c],c))}return o}function Bm(e){let _=[];for(let o=0;o<e.length;o++){let c=e[o];c&&($n(c)?D_(_,c):_.push(c))}return _}function zm(e,_){let o;if(e!==void 0)for(let c=0;c<e.length;c++){let h=_(e[c],c);h&&($n(h)?o=D_(o,h):o=C_(o,h))}return o??At}function wh(e,_){let o;if(e!==void 0)for(let c=0;c<e.length;c++){let h=e[c],v=_(h,c);(o||h!==v||$n(v))&&(o||(o=e.slice(0,c)),$n(v)?D_(o,v):o.push(v))}return o??e}function Th(e,_){let o=[];if(e!==void 0)for(let c=0;c<e.length;c++){let h=_(e[c],c);h!==void 0&&o.push(h)}return o}function Zt(e,_){if(e!==void 0)if(_!==void 0){for(let o=0;o<e.length;o++)if(_(e[o]))return!0}else return e.length>0;return!1}function Mp(e,_){return _===void 0||_.length===0?e:e===void 0||e.length===0?_:[...e,..._]}function Sh(e,_,o=Op){if(e===void 0||_===void 0)return e===_;if(e.length!==_.length)return!1;for(let c=0;c<e.length;c++)if(!o(e[c],_[c],c))return!1;return!0}function C_(e,_){return _===void 0?e:e===void 0?[_]:(e.push(_),e)}function up(e,_){return _<0?e.length+_:_}function D_(e,_,o,c){if(_===void 0||_.length===0)return e;if(e===void 0)return _.slice(o,c);o=o===void 0?0:up(_,o),c=c===void 0?_.length:up(_,c);for(let h=o;h<c&&h<_.length;h++)_[h]!==void 0&&e.push(_[h]);return e}function kh(e,_,o){return xh(e,_,o)?!1:(e.push(_),!0)}function Ch(e,_,o){return e!==void 0?(kh(e,_,o),e):[_]}function Ah(e,_){return e.length===0?At:e.slice().sort(_)}var S4=Array.prototype.at?(e,_)=>e==null?void 0:e.at(_):(e,_)=>{if(e!==void 0&&(_=up(e,_),_<e.length))return e[_]};function Jp(e){return e===void 0||e.length===0?void 0:e[0]}function ja(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function Dh(e){return q.assert(e.length!==0),e[e.length-1]}function Eh(e){return e!==void 0&&e.length===1?e[0]:void 0}function Ph(e,_,o,c,h){return Nh(e,o(_),o,c,h)}function Nh(e,_,o,c,h){if(!Zt(e))return-1;let v=h??0,A=e.length-1;for(;v<=A;){let E=v+(A-v>>1),s=o(e[E],E);switch(c(s,_)){case-1:v=E+1;break;case 0:return E;case 1:A=E-1;break}}return~v}function Ih(e,_,o,c,h){if(e&&e.length>0){let v=e.length;if(v>0){let A=c===void 0||c<0?0:c,E=h===void 0||A+h>v-1?v-1:A+h,s;for(arguments.length<=2?(s=e[A],A++):s=o;A<=E;)s=_(s,e[A],A),A++;return s}}return o}var Km=Object.prototype.hasOwnProperty;function Dn(e,_){return Km.call(e,_)}function Fh(e){let _=[];for(let o in e)Km.call(e,o)&&_.push(o);return _}function jh(){let e=new Map;return e.add=Mh,e.remove=Jh,e}function Mh(e,_){let o=this.get(e);return o!==void 0?o.push(_):this.set(e,o=[_]),o}function Jh(e,_){let o=this.get(e);o!==void 0&&(Vh(o,_),o.length||this.delete(e))}function $n(e){return Array.isArray(e)}function $u(e){return $n(e)?e:[e]}function Oh(e,_){return e!==void 0&&_(e)?e:void 0}function Cn(e,_){return e!==void 0&&_(e)?e:q.fail(`Invalid cast. The supplied value ${e} did not pass the test '${q.getFunctionName(_)}'.`)}function qa(e){}function Lh(){return!0}function gt(e){return e}function wd(e){let _;return()=>(e&&(_=e(),e=void 0),_)}function H_(e){let _=new Map;return(o)=>{let c=`${typeof o}:${o}`,h=_.get(c);return h===void 0&&!_.has(c)&&(h=e(o),_.set(c,h)),h}}function Op(e,_){return e===_}function Lp(e,_){return e===_||e!==void 0&&_!==void 0&&e.toUpperCase()===_.toUpperCase()}function Rh(e,_){return Op(e,_)}function qh(e,_){return e===_?0:e===void 0?-1:_===void 0?1:e<_?-1:1}function Vm(e,_){return qh(e,_)}function Uh(e,_,o){for(let c=0;c<e.length;c++)_=Math.max(_,o(e[c]));return _}function Qo(e,_,o){let c=Math.max(2,Math.floor(e.length*0.34)),h=Math.floor(e.length*0.4)+1,v;for(let A of _){let E=o(A);if(E!==void 0&&Math.abs(E.length-e.length)<=c){if(E===e||E.length<3&&E.toLowerCase()!==e.toLowerCase())continue;let s=Bh(e,E,h-0.1);if(s===void 0)continue;q.assert(s<h),h=s,v=A}}return v}function Bh(e,_,o){let c=Array(_.length+1),h=Array(_.length+1),v=o+0.01;for(let E=0;E<=_.length;E++)c[E]=E;for(let E=1;E<=e.length;E++){let s=e.charCodeAt(E-1),V=Math.ceil(E>o?E-o:1),d=Math.floor(_.length>o+E?o+E:_.length);h[0]=E;let T=E;for(let S=1;S<V;S++)h[S]=v;for(let S=V;S<=d;S++){let F=e[E-1].toLowerCase()===_[S-1].toLowerCase()?c[S-1]+0.1:c[S-1]+2,te=s===_.charCodeAt(S-1)?c[S-1]:Math.min(c[S]+1,h[S-1]+1,F);h[S]=te,T=Math.min(T,te)}for(let S=d+1;S<=_.length;S++)h[S]=v;if(T>o)return;let b=c;c=h,h=b}let A=c[_.length];return A>o?void 0:A}function zh(e,_,o){let c=e.length-_.length;return c>=0&&(o?Lp(e.slice(c),_):e.indexOf(_,c)===c)}function Kh(e,_){e[_]=e[e.length-1],e.pop()}function Vh(e,_){return Wh(e,(o)=>o===_)}function Wh(e,_){for(let o=0;o<e.length;o++)if(_(e[o]))return Kh(e,o),!0;return!1}function _c(e,_,o){return o?Lp(e.slice(0,_.length),_):e.lastIndexOf(_,0)===0}function pp(e){return e===void 0?void 0:[e]}var q;((e)=>{let _=0;e.currentLogLevel=2,e.isDebugging=!1;function o(J){return e.currentLogLevel<=J}e.shouldLog=o;function c(J,oe){e.loggingHost&&o(J)&&e.loggingHost.log(J,oe)}function h(J){c(3,J)}e.log=h,((J)=>{function oe(Ye){c(1,Ye)}J.error=oe;function pe(Ye){c(2,Ye)}J.warn=pe;function ke(Ye){c(3,Ye)}J.log=ke;function Qe(Ye){c(4,Ye)}J.trace=Qe})(h=e.log||(e.log={}));let v={};function A(){return _}e.getAssertionLevel=A;function E(J){let oe=_;if(_=J,J>oe)for(let pe of Fh(v)){let ke=v[pe];ke!==void 0&&e[pe]!==ke.assertion&&J>=ke.level&&(e[pe]=ke,v[pe]=void 0)}}e.setAssertionLevel=E;function s(J){return _>=J}e.shouldAssert=s;function V(J,oe){return s(J)?!0:(v[oe]={level:J,assertion:e[oe]},e[oe]=qa,!1)}function d(J,oe){debugger;let pe=Error(J?`Debug Failure. ${J}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(pe,oe||d),pe}e.fail=d;function T(J,oe,pe){return d(`${oe||"Unexpected node."}\r
3
3
  Node ${jt(J.kind)} was unexpected.`,pe||T)}e.failBadSyntaxKind=T;function b(J,oe,pe,ke){J||(oe=oe?`False expression: ${oe}`:"False expression.",pe&&(oe+=`\r
4
4
  Verbose Debug Information: `+(typeof pe=="string"?pe:pe())),d(oe,ke||b))}e.assert=b;function S(J,oe,pe,ke,Qe){if(J!==oe){let Ye=pe?ke?`${pe} ${ke}`:pe:"";d(`Expected ${J} === ${oe}. ${Ye}`,Qe||S)}}e.assertEqual=S;function F(J,oe,pe,ke){J>=oe&&d(`Expected ${J} < ${oe}. ${pe||""}`,ke||F)}e.assertLessThan=F;function te(J,oe,pe){J>oe&&d(`Expected ${J} <= ${oe}`,pe||te)}e.assertLessThanOrEqual=te;function ve(J,oe,pe){J<oe&&d(`Expected ${J} >= ${oe}`,pe||ve)}e.assertGreaterThanOrEqual=ve;function fe(J,oe,pe){J==null&&d(oe,pe||fe)}e.assertIsDefined=fe;function me(J,oe,pe){return fe(J,oe,pe||me),J}e.checkDefined=me;function j(J,oe,pe){for(let ke of J)fe(ke,oe,pe||j)}e.assertEachIsDefined=j;function ne(J,oe,pe){return j(J,oe,pe||ne),J}e.checkEachDefined=ne;function je(J,oe="Illegal value:",pe){let ke=typeof J=="object"&&Dn(J,"kind")&&Dn(J,"pos")?"SyntaxKind: "+jt(J.kind):JSON.stringify(J);return d(`${oe} ${ke}`,pe||je)}e.assertNever=je;function K(J,oe,pe,ke){V(1,"assertEachNode")&&b(oe===void 0||jp(J,oe),pe||"Unexpected node.",()=>`Node array did not pass test '${y_(oe)}'.`,ke||K)}e.assertEachNode=K;function se(J,oe,pe,ke){V(1,"assertNode")&&b(J!==void 0&&(oe===void 0||oe(J)),pe||"Unexpected node.",()=>`Node ${jt(J==null?void 0:J.kind)} did not pass test '${y_(oe)}'.`,ke||se)}e.assertNode=se;function G(J,oe,pe,ke){V(1,"assertNotNode")&&b(J===void 0||oe===void 0||!oe(J),pe||"Unexpected node.",()=>`Node ${jt(J.kind)} should not have passed test '${y_(oe)}'.`,ke||G)}e.assertNotNode=G;function mt(J,oe,pe,ke){V(1,"assertOptionalNode")&&b(oe===void 0||J===void 0||oe(J),pe||"Unexpected node.",()=>`Node ${jt(J==null?void 0:J.kind)} did not pass test '${y_(oe)}'.`,ke||mt)}e.assertOptionalNode=mt;function en(J,oe,pe,ke){V(1,"assertOptionalToken")&&b(oe===void 0||J===void 0||J.kind===oe,pe||"Unexpected node.",()=>`Node ${jt(J==null?void 0:J.kind)} was not a '${jt(oe)}' token.`,ke||en)}e.assertOptionalToken=en;function h_(J,oe,pe){V(1,"assertMissingNode")&&b(J===void 0,oe||"Unexpected node.",()=>`Node ${jt(J.kind)} was unexpected'.`,pe||h_)}e.assertMissingNode=h_;function tn(J){}e.type=tn;function y_(J){if(typeof J!="function")return"";if(Dn(J,"name"))return J.name;{let oe=Function.prototype.toString.call(J),pe=/^function\s+([\w$]+)\s*\(/.exec(oe);return pe?pe[1]:""}}e.getFunctionName=y_;function P_(J){return`{ name: ${si(J.escapedName)}; flags: ${st(J.flags)}; declarations: ${cp(J.declarations,(oe)=>jt(oe.kind))} }`}e.formatSymbol=P_;function We(J=0,oe,pe){let ke=Pn(oe);if(J===0)return ke.length>0&&ke[0][0]===0?ke[0][1]:"0";if(pe){let Qe=[],Ye=J;for(let[at,Et]of ke){if(at>J)break;at!==0&&at&J&&(Qe.push(Et),Ye&=~at)}if(Ye===0)return Qe.join("|")}else for(let[Qe,Ye]of ke)if(Qe===J)return Ye;return J.toString()}e.formatEnum=We;let _n=new Map;function Pn(J){let oe=_n.get(J);if(oe)return oe;let pe=[];for(let Qe in J){let Ye=J[Qe];typeof Ye=="number"&&pe.push([Ye,Qe])}let ke=Ah(pe,(Qe,Ye)=>Vm(Qe[0],Ye[0]));return _n.set(J,ke),ke}function jt(J){return We(J,Fe,!1)}e.formatSyntaxKind=jt;function L_(J){return We(J,ef,!1)}e.formatSnippetKind=L_;function N_(J){return We(J,Wn,!1)}e.formatScriptKind=N_;function Mt(J){return We(J,Y_,!0)}e.formatNodeFlags=Mt;function bt(J){return We(J,$m,!0)}e.formatNodeCheckFlags=bt;function He(J){return We(J,Wm,!0)}e.formatModifierFlags=He;function R_(J){return We(J,Zm,!0)}e.formatTransformFlags=R_;function Xt(J){return We(J,tf,!0)}e.formatEmitFlags=Xt;function st(J){return We(J,Gm,!0)}e.formatSymbolFlags=st;function rt(J){return We(J,o_,!0)}e.formatTypeFlags=rt;function Rt(J){return We(J,Qm,!0)}e.formatSignatureFlags=Rt;function Jt(J){return We(J,Hm,!0)}e.formatObjectFlags=Jt;function lt(J){return We(J,dp,!0)}e.formatFlowFlags=lt;function nn(J){return We(J,Xm,!0)}e.formatRelationComparisonResult=nn;function ft(J){return We(J,CheckMode,!0)}e.formatCheckMode=ft;function g_(J){return We(J,SignatureCheckMode,!0)}e.formatSignatureCheckMode=g_;function yt(J){return We(J,TypeFacts,!0)}e.formatTypeFacts=yt;let i_=!1,_t;function qt(J){"__debugFlowFlags"in J||Object.defineProperties(J,{__tsDebuggerDisplay:{value(){let oe=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",pe=this.flags&-2048;return`${oe}${pe?` (${lt(pe)})`:""}`}},__debugFlowFlags:{get(){return We(this.flags,dp,!0)}},__debugToString:{value(){return hn(this)}}})}function t_(J){return i_&&(typeof Object.setPrototypeOf=="function"?(_t||(_t=Object.create(Object.prototype),qt(_t)),Object.setPrototypeOf(J,_t)):qt(J)),J}e.attachFlowNodeDebugInfo=t_;let rn;function dn(J){"__tsDebuggerDisplay"in J||Object.defineProperties(J,{__tsDebuggerDisplay:{value(oe){return oe=String(oe).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${oe}`}}})}function mn(J){i_&&(typeof Object.setPrototypeOf=="function"?(rn||(rn=Object.create(Array.prototype),dn(rn)),Object.setPrototypeOf(J,rn)):dn(J))}e.attachNodeArrayDebugInfo=mn;function q_(){if(i_)return;let J=new WeakMap,oe=new WeakMap;Object.defineProperties(Ct.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){let ke=this.flags&33554432?"TransientSymbol":"Symbol",Qe=this.flags&-33554433;return`${ke} '${hp(this)}'${Qe?` (${st(Qe)})`:""}`}},__debugFlags:{get(){return st(this.flags)}}}),Object.defineProperties(Ct.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){let ke=this.flags&67359327?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:""}`:this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&2048?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:this.flags&8192?"UniqueESSymbolType":this.flags&32?"EnumType":this.flags&1048576?"UnionType":this.flags&2097152?"IntersectionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",Qe=this.flags&524288?this.objectFlags&-1344:0;return`${ke}${this.symbol?` '${hp(this.symbol)}'`:""}${Qe?` (${Jt(Qe)})`:""}`}},__debugFlags:{get(){return rt(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?Jt(this.objectFlags):""}},__debugTypeToString:{value(){let ke=J.get(this);return ke===void 0&&(ke=this.checker.typeToString(this),J.set(this,ke)),ke}}}),Object.defineProperties(Ct.getSignatureConstructor().prototype,{__debugFlags:{get(){return Rt(this.flags)}},__debugSignatureToString:{value(){var ke;return(ke=this.checker)==null?void 0:ke.signatureToString(this)}}});let pe=[Ct.getNodeConstructor(),Ct.getIdentifierConstructor(),Ct.getTokenConstructor(),Ct.getSourceFileConstructor()];for(let ke of pe)Dn(ke.prototype,"__debugKind")||Object.defineProperties(ke.prototype,{__tsDebuggerDisplay:{value(){return`${Fa(this)?"GeneratedIdentifier":tt(this)?`Identifier '${E_(this)}'`:Xr(this)?`PrivateIdentifier '${E_(this)}'`:Ra(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:Ba(this)?`NumericLiteral ${this.text}`:og(this)?`BigIntLiteral ${this.text}n`:Qf(this)?"TypeParameterDeclaration":sc(this)?"ParameterDeclaration":Yf(this)?"ConstructorDeclaration":Tp(this)?"GetAccessorDeclaration":cc(this)?"SetAccessorDeclaration":mg(this)?"CallSignatureDeclaration":fg(this)?"ConstructSignatureDeclaration":Zf(this)?"IndexSignatureDeclaration":hg(this)?"TypePredicateNode":e1(this)?"TypeReferenceNode":t1(this)?"FunctionTypeNode":_1(this)?"ConstructorTypeNode":yg(this)?"TypeQueryNode":gg(this)?"TypeLiteralNode":bg(this)?"ArrayTypeNode":vg(this)?"TupleTypeNode":wg(this)?"OptionalTypeNode":Tg(this)?"RestTypeNode":Sg(this)?"UnionTypeNode":kg(this)?"IntersectionTypeNode":Cg(this)?"ConditionalTypeNode":Ag(this)?"InferTypeNode":Dg(this)?"ParenthesizedTypeNode":Eg(this)?"ThisTypeNode":Pg(this)?"TypeOperatorNode":Ng(this)?"IndexedAccessTypeNode":Ig(this)?"MappedTypeNode":Fg(this)?"LiteralTypeNode":xg(this)?"NamedTupleMember":jg(this)?"ImportTypeNode":jt(this.kind)}${this.flags?` (${Mt(this.flags)})`:""}`}},__debugKind:{get(){return jt(this.kind)}},__debugNodeFlags:{get(){return Mt(this.flags)}},__debugModifierFlags:{get(){return He(h2(this))}},__debugTransformFlags:{get(){return R_(this.transformFlags)}},__debugIsParseTreeNode:{get(){return ac(this)}},__debugEmitFlags:{get(){return Xt(La(this))}},__debugGetText:{value(Qe){if(Aa(this))return"";let Ye=oe.get(this);if(Ye===void 0){let at=N0(this),Et=at&&fr(at);Ye=Et?Od(Et,at,Qe):"",oe.set(this,Ye)}return Ye}}});i_=!0}e.enableDebugInfo=q_;function U_(J){let oe=J&7,pe=oe===0?"in out":oe===3?"[bivariant]":oe===2?"in":oe===1?"out":oe===4?"[independent]":"";return J&8?pe+=" (unmeasurable)":J&16&&(pe+=" (unreliable)"),pe}e.formatVariance=U_;class fn{__debugToString(){var J;switch(this.kind){case 3:return((J=this.debugInfo)==null?void 0:J.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return xd(this.sources,this.targets||cp(this.sources,()=>"any"),(oe,pe)=>`${oe.__debugTypeToString()} -> ${typeof pe=="string"?pe:pe.__debugTypeToString()}`).join(", ");case 2:return xd(this.sources,this.targets,(oe,pe)=>`${oe.__debugTypeToString()} -> ${pe().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(`
5
5
  `).join(`
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-aztre27e.js";var{create:tr,defineProperty:Pe,getOwnPropertyDescriptor:rr,getOwnPropertyNames:nr,getPrototypeOf:ir}=Object,or=Object.prototype.hasOwnProperty,vt=(u)=>{throw TypeError(u)},N=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),xt=(u,e)=>{for(var t in e)Pe(u,t,{get:e[t],enumerable:!0})},ar=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of nr(e))!or.call(u,r)&&r!==t&&Pe(u,r,{get:()=>e[r],enumerable:!(n=rr(e,r))||n.enumerable});return u},Uu=(u,e,t)=>(t=u!=null?tr(ir(u)):{},ar(e||!u||!u.__esModule?Pe(t,"default",{value:u,enumerable:!0}):t,u)),Bt=(u,e,t)=>e.has(u)||vt("Cannot "+t),ku=(u,e,t)=>(Bt(u,e,"read from private field"),t?t.call(u):e.get(u)),sr=(u,e,t)=>e.has(u)?vt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(u):e.set(u,t),Dr=(u,e,t,n)=>(Bt(u,e,"write to private field"),n?n.call(u,t):e.set(u,t),t),je=N((u,e)=>{e.exports=t;function t(n){return String(n).replace(/\s+/g," ")}}),lr=N((u,e)=>{e.exports=p;var t=9,n=10,r=32,i=33,a=58,o=91,s=92,l=93,D=94,c=96,f=4,h=1024;function p(d){var C=this.Parser,g=this.Compiler;E(C)&&v(C,d),A(g)&&F(g)}function E(d){return!!(d&&d.prototype&&d.prototype.blockTokenizers)}function A(d){return!!(d&&d.prototype&&d.prototype.visitors)}function v(d,C){for(var g=C||{},y=d.prototype,w=y.blockTokenizers,T=y.inlineTokenizers,b=y.blockMethods,k=y.inlineMethods,L=w.definition,I=T.reference,x=[],S=-1,M=b.length,z;++S<M;)z=b[S],!(z==="newline"||z==="indentedCode"||z==="paragraph"||z==="footnoteDefinition")&&x.push([z]);x.push(["footnoteDefinition"]),g.inlineNotes&&(B(k,"reference","inlineNote"),T.inlineNote=J),B(b,"definition","footnoteDefinition"),B(k,"reference","footnoteCall"),w.definition=O,w.footnoteDefinition=V,T.footnoteCall=q,T.reference=j,y.interruptFootnoteDefinition=x,j.locator=I.locator,q.locator=$,J.locator=U;function V(R,P,G){for(var W=this,Y=W.interruptFootnoteDefinition,K=W.offset,eu=P.length+1,H=0,Q=[],lu,Du,uu,_,X,pu,yu,hu,Fu,nu,du,tu,Z;H<eu&&(_=P.charCodeAt(H),!(_!==t&&_!==r));)H++;if(P.charCodeAt(H++)===o&&P.charCodeAt(H++)===D){for(Du=H;H<eu;){if(_=P.charCodeAt(H),_!==_||_===n||_===t||_===r)return;if(_===l){uu=H,H++;break}H++}if(!(uu===void 0||Du===uu||P.charCodeAt(H++)!==a)){if(G)return!0;for(lu=P.slice(Du,uu),X=R.now(),Fu=0,nu=0,du=H,tu=[];H<eu;){if(_=P.charCodeAt(H),_!==_||_===n)Z={start:Fu,contentStart:du||H,contentEnd:H,end:H},tu.push(Z),_===n&&(Fu=H+1,nu=0,du=void 0,Z.end=Fu);else if(nu!==void 0)if(_===r||_===t)nu+=_===r?1:f-nu%f,nu>f&&(nu=void 0,du=H);else{if(nu<f&&Z&&(Z.contentStart===Z.contentEnd||m(Y,w,W,[R,P.slice(H,h),!0])))break;nu=void 0,du=H}H++}for(H=-1,eu=tu.length;eu>0&&(Z=tu[eu-1],Z.contentStart===Z.contentEnd);)eu--;for(pu=R(P.slice(0,Z.contentEnd));++H<eu;)Z=tu[H],K[X.line+H]=(K[X.line+H]||0)+(Z.contentStart-Z.start),Q.push(P.slice(Z.contentStart,Z.end));return yu=W.enterBlock(),hu=W.tokenizeBlock(Q.join(""),X),yu(),pu({type:"footnoteDefinition",identifier:lu.toLowerCase(),label:lu,children:hu})}}}function q(R,P,G){var W=P.length+1,Y=0,K,eu,H,Q;if(P.charCodeAt(Y++)===o&&P.charCodeAt(Y++)===D){for(eu=Y;Y<W;){if(Q=P.charCodeAt(Y),Q!==Q||Q===n||Q===t||Q===r)return;if(Q===l){H=Y,Y++;break}Y++}if(!(H===void 0||eu===H))return G?!0:(K=P.slice(eu,H),R(P.slice(0,Y))({type:"footnoteReference",identifier:K.toLowerCase(),label:K}))}}function J(R,P,G){var W=this,Y=P.length+1,K=0,eu=0,H,Q,lu,Du,uu,_,X;if(P.charCodeAt(K++)===D&&P.charCodeAt(K++)===o){for(lu=K;K<Y;){if(Q=P.charCodeAt(K),Q!==Q)return;if(_===void 0)if(Q===s)K+=2;else if(Q===o)eu++,K++;else if(Q===l)if(eu===0){Du=K,K++;break}else eu--,K++;else if(Q===c){for(uu=K,_=1;P.charCodeAt(uu+_)===c;)_++;K+=_}else K++;else if(Q===c){for(uu=K,X=1;P.charCodeAt(uu+X)===c;)X++;K+=X,_===X&&(_=void 0),X=void 0}else K++}if(Du!==void 0)return G?!0:(H=R.now(),H.column+=2,H.offset+=2,R(P.slice(0,K))({type:"footnote",children:W.tokenizeInline(P.slice(lu,Du),H)}))}}function j(R,P,G){var W=0;if(P.charCodeAt(W)===i&&W++,P.charCodeAt(W)===o&&P.charCodeAt(W+1)!==D)return I.call(this,R,P,G)}function O(R,P,G){for(var W=0,Y=P.charCodeAt(W);Y===r||Y===t;)Y=P.charCodeAt(++W);if(Y===o&&P.charCodeAt(W+1)!==D)return L.call(this,R,P,G)}function $(R,P){return R.indexOf("[",P)}function U(R,P){return R.indexOf("^[",P)}}function F(d){var C=d.prototype.visitors,g=" ";C.footnote=y,C.footnoteReference=w,C.footnoteDefinition=T;function y(b){return"^["+this.all(b).join("")+"]"}function w(b){return"[^"+(b.label||b.identifier)+"]"}function T(b){for(var k=this.all(b).join(`
2
+ import"./chunk-7xm75w1e.js";var{create:tr,defineProperty:Pe,getOwnPropertyDescriptor:rr,getOwnPropertyNames:nr,getPrototypeOf:ir}=Object,or=Object.prototype.hasOwnProperty,vt=(u)=>{throw TypeError(u)},N=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),xt=(u,e)=>{for(var t in e)Pe(u,t,{get:e[t],enumerable:!0})},ar=(u,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of nr(e))!or.call(u,r)&&r!==t&&Pe(u,r,{get:()=>e[r],enumerable:!(n=rr(e,r))||n.enumerable});return u},Uu=(u,e,t)=>(t=u!=null?tr(ir(u)):{},ar(e||!u||!u.__esModule?Pe(t,"default",{value:u,enumerable:!0}):t,u)),Bt=(u,e,t)=>e.has(u)||vt("Cannot "+t),ku=(u,e,t)=>(Bt(u,e,"read from private field"),t?t.call(u):e.get(u)),sr=(u,e,t)=>e.has(u)?vt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(u):e.set(u,t),Dr=(u,e,t,n)=>(Bt(u,e,"write to private field"),n?n.call(u,t):e.set(u,t),t),je=N((u,e)=>{e.exports=t;function t(n){return String(n).replace(/\s+/g," ")}}),lr=N((u,e)=>{e.exports=p;var t=9,n=10,r=32,i=33,a=58,o=91,s=92,l=93,D=94,c=96,f=4,h=1024;function p(d){var C=this.Parser,g=this.Compiler;E(C)&&v(C,d),A(g)&&F(g)}function E(d){return!!(d&&d.prototype&&d.prototype.blockTokenizers)}function A(d){return!!(d&&d.prototype&&d.prototype.visitors)}function v(d,C){for(var g=C||{},y=d.prototype,w=y.blockTokenizers,T=y.inlineTokenizers,b=y.blockMethods,k=y.inlineMethods,L=w.definition,I=T.reference,x=[],S=-1,M=b.length,z;++S<M;)z=b[S],!(z==="newline"||z==="indentedCode"||z==="paragraph"||z==="footnoteDefinition")&&x.push([z]);x.push(["footnoteDefinition"]),g.inlineNotes&&(B(k,"reference","inlineNote"),T.inlineNote=J),B(b,"definition","footnoteDefinition"),B(k,"reference","footnoteCall"),w.definition=O,w.footnoteDefinition=V,T.footnoteCall=q,T.reference=j,y.interruptFootnoteDefinition=x,j.locator=I.locator,q.locator=$,J.locator=U;function V(R,P,G){for(var W=this,Y=W.interruptFootnoteDefinition,K=W.offset,eu=P.length+1,H=0,Q=[],lu,Du,uu,_,X,pu,yu,hu,Fu,nu,du,tu,Z;H<eu&&(_=P.charCodeAt(H),!(_!==t&&_!==r));)H++;if(P.charCodeAt(H++)===o&&P.charCodeAt(H++)===D){for(Du=H;H<eu;){if(_=P.charCodeAt(H),_!==_||_===n||_===t||_===r)return;if(_===l){uu=H,H++;break}H++}if(!(uu===void 0||Du===uu||P.charCodeAt(H++)!==a)){if(G)return!0;for(lu=P.slice(Du,uu),X=R.now(),Fu=0,nu=0,du=H,tu=[];H<eu;){if(_=P.charCodeAt(H),_!==_||_===n)Z={start:Fu,contentStart:du||H,contentEnd:H,end:H},tu.push(Z),_===n&&(Fu=H+1,nu=0,du=void 0,Z.end=Fu);else if(nu!==void 0)if(_===r||_===t)nu+=_===r?1:f-nu%f,nu>f&&(nu=void 0,du=H);else{if(nu<f&&Z&&(Z.contentStart===Z.contentEnd||m(Y,w,W,[R,P.slice(H,h),!0])))break;nu=void 0,du=H}H++}for(H=-1,eu=tu.length;eu>0&&(Z=tu[eu-1],Z.contentStart===Z.contentEnd);)eu--;for(pu=R(P.slice(0,Z.contentEnd));++H<eu;)Z=tu[H],K[X.line+H]=(K[X.line+H]||0)+(Z.contentStart-Z.start),Q.push(P.slice(Z.contentStart,Z.end));return yu=W.enterBlock(),hu=W.tokenizeBlock(Q.join(""),X),yu(),pu({type:"footnoteDefinition",identifier:lu.toLowerCase(),label:lu,children:hu})}}}function q(R,P,G){var W=P.length+1,Y=0,K,eu,H,Q;if(P.charCodeAt(Y++)===o&&P.charCodeAt(Y++)===D){for(eu=Y;Y<W;){if(Q=P.charCodeAt(Y),Q!==Q||Q===n||Q===t||Q===r)return;if(Q===l){H=Y,Y++;break}Y++}if(!(H===void 0||eu===H))return G?!0:(K=P.slice(eu,H),R(P.slice(0,Y))({type:"footnoteReference",identifier:K.toLowerCase(),label:K}))}}function J(R,P,G){var W=this,Y=P.length+1,K=0,eu=0,H,Q,lu,Du,uu,_,X;if(P.charCodeAt(K++)===D&&P.charCodeAt(K++)===o){for(lu=K;K<Y;){if(Q=P.charCodeAt(K),Q!==Q)return;if(_===void 0)if(Q===s)K+=2;else if(Q===o)eu++,K++;else if(Q===l)if(eu===0){Du=K,K++;break}else eu--,K++;else if(Q===c){for(uu=K,_=1;P.charCodeAt(uu+_)===c;)_++;K+=_}else K++;else if(Q===c){for(uu=K,X=1;P.charCodeAt(uu+X)===c;)X++;K+=X,_===X&&(_=void 0),X=void 0}else K++}if(Du!==void 0)return G?!0:(H=R.now(),H.column+=2,H.offset+=2,R(P.slice(0,K))({type:"footnote",children:W.tokenizeInline(P.slice(lu,Du),H)}))}}function j(R,P,G){var W=0;if(P.charCodeAt(W)===i&&W++,P.charCodeAt(W)===o&&P.charCodeAt(W+1)!==D)return I.call(this,R,P,G)}function O(R,P,G){for(var W=0,Y=P.charCodeAt(W);Y===r||Y===t;)Y=P.charCodeAt(++W);if(Y===o&&P.charCodeAt(W+1)!==D)return L.call(this,R,P,G)}function $(R,P){return R.indexOf("[",P)}function U(R,P){return R.indexOf("^[",P)}}function F(d){var C=d.prototype.visitors,g=" ";C.footnote=y,C.footnoteReference=w,C.footnoteDefinition=T;function y(b){return"^["+this.all(b).join("")+"]"}function w(b){return"[^"+(b.label||b.identifier)+"]"}function T(b){for(var k=this.all(b).join(`
3
3
 
4
4
  `).split(`
5
5
  `),L=0,I=k.length,x;++L<I;)x=k[L],x!==""&&(k[L]=g+x);return"[^"+(b.label||b.identifier)+"]: "+k.join(`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$d as a}from"./chunk-js1n8tgv.js";import"./chunk-70ck4v3t.js";import"./chunk-ht5w06x7.js";import"./chunk-enpzvmtc.js";import"./chunk-tq0239xp.js";import"./chunk-7xm75w1e.js";export{a as fromHttp};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-7xm75w1e.js";var a="./highlights-x6tmsnaa.scm";export{a as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ig as t}from"./chunk-xvwvd4kq.js";import{FO as o}from"./chunk-7xm75w1e.js";async function e(){try{let{toJSONSchema:r}=await import("./chunk-yjf3kyej.js");return r}catch{throw new t("sury")}}export{e as default};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{As as cJ,Ds as pJ,Es as iJ,Fs as nJ,Gs as aJ,Hs as rJ,Js as AQ,qs as mJ,rs as vJ,ss as dJ,ts as lJ,ws as d,xs as l,zs as uJ}from"./chunk-4qqkqrn9.js";import{Yt as FQ,pu as x,tt as CQ,ut as DQ,yu as GJ}from"./chunk-3szwfy7w.js";import{AH as VJ,BI as E,DH as hJ,DM as o,EG as DJ,FG as FJ,GG as AJ,GI as yJ,HI as bJ,IP as g,JF as BQ,JP as eJ,KF as wQ,MD as $Q,MH as jJ,MP as HQ,NC as wJ,NF as $J,NP as WQ,OF as UJ,OP as R,PI as I,QC as HJ,SG as t,SH as NJ,TC as WJ,TF as zJ,TG as OJ,UD as f,VG as y,_D as IJ,bE as PJ,bI as kJ,bK as gJ,cG as ZJ,eE as T,fI as LJ,gH as TJ,hC as tJ,hE as KJ,iI as SJ,mG as z,mI as xJ,mM as j,nF as qQ,nH as EJ,qI as fJ,rH as MJ,sG as b,uF as _J,uG as CJ,uH as oJ,wD as GQ,yH as RJ}from"./chunk-snm5q21k.js";import{$P as zQ,bQ as u,dQ as S}from"./chunk-aztre27e.js";var IX={};u(IX,{resource:()=>BJ,layer:()=>EQ,enabled:()=>OQ,Observability:()=>WX});var p={};u(p,{make:()=>IQ,layer:()=>ZX});var VQ=AJ.pipe(FJ,DJ((J)=>{if(lJ(J)&&J.reason._tag==="StatusCodeError"&&J.reason.response.status===429){let Q=HJ(J.reason.response.headers["retry-after"]).pipe(WJ(CJ),wJ(()=>5));return t(T(Q))}return t(T(1))})),sJ=E(function*(J){let Q=yield*jJ(),X=f(Q,b),Y=f(Q,UJ),$=fJ(Q),G=KJ(IJ(J.exportInterval),PJ),B=void 0,C=nJ(f(Q,pJ)).pipe(iJ(NJ(rJ,!1)),aJ({schedule:VQ,times:3})),V=vJ({"user-agent":`effect-opentelemetry-${J.label}/0.0.0`});if(J.headers)V=dJ(mJ(J.headers),V);let r=uJ(J.url,{headers:V}),O=[],s=OJ(()=>{if(B!==void 0&&X.currentTimeMillisUnsafe()<B)return y;else if(B!==void 0)B=void 0;let h=O;if(J.maxBatchSize!=="disabled"){if(O.length===0)return y;O=[]}return C.execute(cJ(r,J.body(h))).pipe(EJ,SJ(!1))}).pipe(MJ((h)=>{if(B!==void 0)return y;return B=X.currentTimeMillisUnsafe()+60000,O=[],yJ("Disabling exporter for 60 seconds",h)}),bJ({package:"@effect/opentelemetry",module:J.label}));return yield*zJ(Y,s.pipe(RJ,kJ,VJ(J.shutdownTimeout))),yield*hJ(G).pipe(TJ(s),LJ,xJ(Y)),{push(h){if(B!==void 0)return;if(O.push(h),J.maxBatchSize!=="disabled"&&O.length>=J.maxBatchSize)gJ($(s),Y)}}});var jQ=(J)=>{let Q=J.attributes?e(Object.entries(J.attributes)):[];if(Q.push({key:"service.name",value:{stringValue:J.serviceName}}),J.serviceVersion)Q.push({key:"service.version",value:{stringValue:J.serviceVersion}});return{attributes:Q,droppedAttributesCount:0}},JQ=E(function*(J){let Q={...yield*g(o(eJ(j,j)),"OTEL_RESOURCE_ATTRIBUTES"),...J?.attributes},X=J?.serviceName??Q["service.name"]??(yield*g(j,"OTEL_SERVICE_NAME"));delete Q["service.name"];let Y=J?.serviceVersion??Q["service.version"]??(yield*g(o(j),"OTEL_SERVICE_VERSION"));return delete Q["service.version"],jQ({serviceName:X,serviceVersion:Y,attributes:Q})},oJ),QQ=(J)=>{let Q=J.attributes.find((X)=>X.key==="service.name");if(!Q||!Q.value.stringValue)throw Error("Resource does not contain a service name");return Q.value.stringValue},e=(J)=>{let Q=[];for(let[X,Y]of J)Q.push({key:X,value:m(Y)});return Q},m=(J)=>{if(Array.isArray(J))return{arrayValue:{values:J.map(m)}};switch(typeof J){case"string":return{stringValue:J};case"bigint":return{intValue:Number(J)};case"number":return Number.isInteger(J)?{intValue:J}:{doubleValue:J};case"boolean":return{boolValue:J};default:return{stringValue:tJ(J)}}};var c={};u(c,{layerProtobuf:()=>YX,layerJson:()=>XX,OtlpSerialization:()=>M});var N={Varint:0,Fixed64:1,LengthDelimited:2,Fixed32:5},k=(J,Q)=>J<<3|Q,D=(J)=>{let Q=[],X=typeof J==="bigint"?J:BigInt(J);while(X>0x7fn)Q.push(Number(X&0x7fn)|128),X>>=7n;return Q.push(Number(X)),new Uint8Array(Q)};var kQ=(J)=>{let Q=new Uint8Array(8);return new DataView(Q.buffer).setBigUint64(0,J,!0),Q},LQ=(J)=>{let Q=new Uint8Array(4);return new DataView(Q.buffer).setUint32(0,J,!0),Q},SQ=(J)=>{let Q=new Uint8Array(8);return new DataView(Q.buffer).setFloat64(0,J,!0),Q},xQ=(J)=>new TextEncoder().encode(J),fQ=(J)=>{let Q=new Uint8Array(J.length/2);for(let X=0;X<J.length;X+=2)Q[X/2]=parseInt(J.slice(X,X+2),16);return Q},Z=(...J)=>{let Q=J.reduce(($,G)=>$+G.length,0),X=new Uint8Array(Q),Y=0;for(let $ of J)X.set($,Y),Y+=$.length;return X},q=(J,Q)=>Z(D(k(J,N.Varint)),D(Q));var JJ=(J,Q)=>q(J,Q?1:0),W=(J,Q)=>Z(D(k(J,N.Fixed64)),kQ(Q)),v=(J,Q)=>Z(D(k(J,N.Fixed32)),LQ(Q)),F=(J,Q)=>Z(D(k(J,N.Fixed64)),SQ(Q)),L=(J,Q)=>Z(D(k(J,N.LengthDelimited)),D(Q.length),Q),K=(J,Q)=>L(J,xQ(Q)),U=(J,Q)=>L(J,fQ(Q)),w=(J,Q)=>L(J,Q),_=(J,Q,X)=>Z(...Q.map((Y)=>w(J,X(Y))));var H=(J,Q)=>Q!==void 0&&Q!==""?K(J,Q):new Uint8Array(0);var QJ=(J)=>{if(J.stringValue!==void 0&&J.stringValue!==null)return K(1,J.stringValue);if(J.boolValue!==void 0&&J.boolValue!==null)return JJ(2,J.boolValue);if(J.intValue!==void 0&&J.intValue!==null)return q(3,BigInt(J.intValue));if(J.doubleValue!==void 0&&J.doubleValue!==null)return F(4,J.doubleValue);if(J.arrayValue!==void 0)return w(5,bQ(J.arrayValue));if(J.kvlistValue!==void 0)return w(6,gQ(J.kvlistValue));if(J.bytesValue!==void 0)return L(7,J.bytesValue);return new Uint8Array(0)},bQ=(J)=>_(1,J.values,QJ),gQ=(J)=>_(1,J.values,P),P=(J)=>Z(K(1,J.key),w(2,QJ(J.value))),XJ=(J)=>Z(K(1,J.name),H(2,J.version),J.attributes?_(3,J.attributes,P):new Uint8Array(0),J.droppedAttributesCount?q(4,J.droppedAttributesCount):new Uint8Array(0)),YJ=(J)=>Z(_(1,J.attributes,P),J.droppedAttributesCount>0?q(2,J.droppedAttributesCount):new Uint8Array(0));var mQ=(J)=>Z(H(2,J.message),q(3,J.code)),vQ=(J)=>Z(W(1,BigInt(J.timeUnixNano)),K(2,J.name),_(3,J.attributes,P),J.droppedAttributesCount>0?q(4,J.droppedAttributesCount):new Uint8Array(0)),dQ=(J)=>Z(U(1,J.traceId),U(2,J.spanId),H(3,J.traceState),_(4,J.attributes,P),J.droppedAttributesCount>0?q(5,J.droppedAttributesCount):new Uint8Array(0),J.flags!==void 0?v(6,J.flags):new Uint8Array(0)),lQ=(J)=>Z(U(1,J.traceId),U(2,J.spanId),H(3,J.traceState),J.parentSpanId!==void 0?U(4,J.parentSpanId):new Uint8Array(0),K(5,J.name),q(6,J.kind),W(7,BigInt(J.startTimeUnixNano)),W(8,BigInt(J.endTimeUnixNano)),_(9,J.attributes,P),J.droppedAttributesCount>0?q(10,J.droppedAttributesCount):new Uint8Array(0),_(11,J.events,vQ),J.droppedEventsCount>0?q(12,J.droppedEventsCount):new Uint8Array(0),_(13,J.links,dQ),J.droppedLinksCount>0?q(14,J.droppedLinksCount):new Uint8Array(0),w(15,mQ(J.status)),J.flags!==void 0?v(16,J.flags):new Uint8Array(0)),uQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.spans,lQ),H(3,J.schemaUrl)),cQ=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeSpans,uQ),H(3,J.schemaUrl)),XQ=(J)=>_(1,J.resourceSpans,cQ);var YQ=(J)=>Z(W(2,BigInt(J.startTimeUnixNano)),W(3,BigInt(J.timeUnixNano)),J.asDouble!==void 0?F(4,J.asDouble):new Uint8Array(0),J.asInt!==void 0?W(6,BigInt(J.asInt)):new Uint8Array(0),_(7,J.attributes,P),J.flags!==void 0?q(8,J.flags):new Uint8Array(0)),pQ=(J)=>{let Q=Z(...J.bucketCounts.map((Y)=>W(6,BigInt(Y)))),X=Z(...J.explicitBounds.map((Y)=>F(7,Y)));return Z(W(2,BigInt(J.startTimeUnixNano)),W(3,BigInt(J.timeUnixNano)),W(4,BigInt(J.count)),J.sum!==void 0?F(5,J.sum):new Uint8Array(0),Q,X,_(9,J.attributes,P),J.flags!==void 0?q(10,J.flags):new Uint8Array(0),J.min!==void 0?F(11,J.min):new Uint8Array(0),J.max!==void 0?F(12,J.max):new Uint8Array(0))},iQ=(J)=>_(1,J.dataPoints,YQ),nQ=(J)=>Z(_(1,J.dataPoints,YQ),q(2,J.aggregationTemporality),JJ(3,J.isMonotonic)),aQ=(J)=>Z(_(1,J.dataPoints,pQ),q(2,J.aggregationTemporality)),rQ=(J)=>Z(K(1,J.name),H(2,J.description),H(3,J.unit),J.gauge!==void 0?w(5,iQ(J.gauge)):new Uint8Array(0),J.sum!==void 0?w(7,nQ(J.sum)):new Uint8Array(0),J.histogram!==void 0?w(9,aQ(J.histogram)):new Uint8Array(0)),sQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.metrics,rQ),H(3,J.schemaUrl)),tQ=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeMetrics,sQ),H(3,J.schemaUrl)),ZQ=(J)=>_(1,J.resourceMetrics,tQ);var oQ=(J)=>Z(W(1,BigInt(J.timeUnixNano)),J.severityNumber!==void 0?q(2,J.severityNumber):new Uint8Array(0),H(3,J.severityText),J.body!==void 0?w(5,QJ(J.body)):new Uint8Array(0),_(6,J.attributes,P),J.droppedAttributesCount!==void 0&&J.droppedAttributesCount>0?q(7,J.droppedAttributesCount):new Uint8Array(0),J.flags!==void 0?v(8,J.flags):new Uint8Array(0),J.traceId!==void 0&&J.traceId!==""?U(9,J.traceId):new Uint8Array(0),J.spanId!==void 0&&J.spanId!==""?U(10,J.spanId):new Uint8Array(0),J.observedTimeUnixNano!==void 0?W(11,BigInt(J.observedTimeUnixNano)):new Uint8Array(0)),eQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.logRecords,oQ),H(3,J.schemaUrl)),JX=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeLogs,eQ),H(3,J.schemaUrl)),_Q=(J)=>_(1,J.resourceLogs,JX);class M extends $Q()("effect/observability/OtlpSerialization"){}var XX=ZJ(M,{traces:(J)=>l(J),metrics:(J)=>l(J),logs:(J)=>l(J)}),YX=ZJ(M,{traces:(J)=>d(XQ(J),"application/x-protobuf"),metrics:(J)=>d(ZQ(J),"application/x-protobuf"),logs:(J)=>d(_Q(J),"application/x-protobuf")});var IQ=E(function*(J){let Q=yield*M,X=yield*JQ(J.resource),Y={name:QQ(X)},$=yield*sJ({label:"OtlpLogger",url:J.url,headers:J.headers,maxBatchSize:J.maxBatchSize??1000,exportInterval:J.exportInterval??T(1),body:(B)=>Q.logs({resourceLogs:[{resource:X,scopeLogs:[{scope:Y,logRecords:B}]}]}),shutdownTimeout:J.shutdownTimeout??T(3)}),G={excludeLogSpans:J.excludeLogSpans??!1,clock:yield*b};return HQ((B)=>{$.push(_X(B,G))})}),ZX=(J)=>WQ([IQ(J)],{mergeWithExisting:J.mergeWithExisting??!0}),_X=(J,Q)=>{let Y=Q.clock.currentTimeNanosUnsafe().toString(),$=J.date.getTime(),G=e(Object.entries(J.fiber.getRef(BQ)));if(G.push({key:"fiberId",value:{intValue:J.fiber.id}}),!Q.excludeLogSpans)for(let[V,r]of J.fiber.getRef(wQ))G.push({key:`logSpan.${V}`,value:{stringValue:`${$-r}ms`}});if(J.cause.reasons.length>0)G.push({key:"log.error",value:{stringValue:qQ(J.cause)}});let B=GQ(J.message),C={severityNumber:$X(J.logLevel),severityText:J.logLevel,timeUnixNano:Y,observedTimeUnixNano:Y,attributes:G,body:m(B.length===1?B[0]:B),droppedAttributesCount:0};if(J.fiber.currentSpan)C.traceId=J.fiber.currentSpan.traceId,C.spanId=J.fiber.currentSpan.spanId;return C},$X=(J)=>{switch(J){case"Trace":return A.SEVERITY_NUMBER_TRACE;case"Debug":return A.SEVERITY_NUMBER_DEBUG;case"Info":return A.SEVERITY_NUMBER_INFO;case"Warn":return A.SEVERITY_NUMBER_WARN;case"Error":return A.SEVERITY_NUMBER_ERROR;case"Fatal":return A.SEVERITY_NUMBER_FATAL;default:return A.SEVERITY_NUMBER_UNSPECIFIED}},A={SEVERITY_NUMBER_UNSPECIFIED:0,SEVERITY_NUMBER_TRACE:1,SEVERITY_NUMBER_TRACE2:2,SEVERITY_NUMBER_TRACE3:3,SEVERITY_NUMBER_TRACE4:4,SEVERITY_NUMBER_DEBUG:5,SEVERITY_NUMBER_DEBUG2:6,SEVERITY_NUMBER_DEBUG3:7,SEVERITY_NUMBER_DEBUG4:8,SEVERITY_NUMBER_INFO:9,SEVERITY_NUMBER_INFO2:10,SEVERITY_NUMBER_INFO3:11,SEVERITY_NUMBER_INFO4:12,SEVERITY_NUMBER_WARN:13,SEVERITY_NUMBER_WARN2:14,SEVERITY_NUMBER_WARN3:15,SEVERITY_NUMBER_WARN4:16,SEVERITY_NUMBER_ERROR:17,SEVERITY_NUMBER_ERROR2:18,SEVERITY_NUMBER_ERROR3:19,SEVERITY_NUMBER_ERROR4:20,SEVERITY_NUMBER_FATAL:21,SEVERITY_NUMBER_FATAL2:22,SEVERITY_NUMBER_FATAL3:23,SEVERITY_NUMBER_FATAL4:24};var UQ={};u(UQ,{logger:()=>n,layer:()=>qJ,create:()=>KQ});var GX=(J)=>J==="sessionID"?"session.id":J,PQ=(J)=>Object.fromEntries(Object.entries(J??{}).filter((Q)=>Q[1]!==void 0&&Q[1]!==null).map(([Q,X])=>[GX(Q),X])),qX=(J)=>{if(Array.isArray(J))return J.map((Q)=>String(Q)).join(" ");return J===void 0?"":String(J)},i=(J,Q,X,Y)=>{let $=PQ({...Q,...Y}),G=J(X);return Object.keys($).length?I.annotateLogs(G,$):G},n=R.make((J)=>{let Q=PQ(J.fiber.getRef($J.CurrentLogAnnotations)),X=J.date.getTime();for(let[B,C]of J.fiber.getRef($J.CurrentLogSpans))Q[`logSpan.${B}`]=`${X-C}ms`;if(J.cause.reasons.length>0)Q.cause=_J.pretty(J.cause);let Y=typeof Q.service==="string"?Q.service:void 0;if(Y)delete Q.service;let $=Y?GJ.create({service:Y}):GJ.Default,G=qX(J.message);switch(J.logLevel){case"Trace":case"Debug":return $.debug(G,Q);case"Warn":return $.warn(G,Q);case"Error":case"Fatal":return $.error(G,Q);default:return $.info(G,Q)}}),qJ=R.layer([n],{mergeWithExisting:!1}),KQ=(J={})=>({debug:(Q,X)=>i((Y)=>I.logDebug(Y),J,Q,X),info:(Q,X)=>i((Y)=>I.logInfo(Y),J,Q,X),warn:(Q,X)=>i((Y)=>I.logWarning(Y),J,Q,X),error:(Q,X)=>i((Y)=>I.logError(Y),J,Q,X),with:(Q)=>KQ({...J,...Q})});var a=x.OTEL_EXPORTER_OTLP_ENDPOINT,OQ=!!a,BX=crypto.randomUUID(),TQ=x.OTEL_EXPORTER_OTLP_HEADERS?x.OTEL_EXPORTER_OTLP_HEADERS.split(",").reduce((J,Q)=>{let[X,...Y]=Q.split("=");return J[X]=Y.join("="),J},{}):void 0;function BJ(){let J=FQ("main"),Q=(()=>{let X=process.env.OTEL_RESOURCE_ATTRIBUTES;if(!X)return{};try{return Object.fromEntries(X.split(",").map((Y)=>{let $=Y.indexOf("=");if($<1)throw Error("Invalid OTEL_RESOURCE_ATTRIBUTES entry");return[decodeURIComponent(Y.slice(0,$)),decodeURIComponent(Y.slice($+1))]}))}catch{return{}}})();return{serviceName:"qitqode",serviceVersion:CQ,attributes:{...Q,"deployment.environment.name":DQ,"qitqode.client":x.QITQODE_CLIENT,"qitqode.process_role":J.processRole,"qitqode.run_id":J.runID,"service.instance.id":BX}}}function wX(){return R.layer([n,p.make({url:`${a}/v1/logs`,resource:BJ(),headers:TQ})],{mergeWithExisting:!1}).pipe(z.provide(c.layerJson),z.provide(AQ.layer))}var HX=async()=>{let J=await import("./chunk-pekm54ce.js"),Q=await import("./chunk-89q1y7tc.js"),X=await import("./chunk-g7rjtehn.js"),{AsyncLocalStorageContextManager:Y}=await import("./chunk-srh4xvsj.js").then((m)=>zQ(m.default,1)),{context:$}=await import("./chunk-730a2d1k.js").then((m)=>zQ(m.default,1)),G=new Y;return G.enable(),$.setGlobalContextManager(G),J.layer(()=>({resource:BJ(),spanProcessor:new X.BatchSpanProcessor(new Q.OTLPTraceExporter({url:`${a}/v1/traces`,headers:TQ}))}))},EQ=!a?qJ:z.unwrap(I.gen(function*(){let J=yield*I.promise(HX);return z.mergeAll(J,wX())})),WX={enabled:OQ,layer:EQ};var aX=z.makeMemoMapUnsafe();
3
- export{qJ as ks,UQ as ls,EQ as ms,WX as ns,IX as os,aX as ps};
2
+ import{$q as uJ,Sq as mJ,Tq as vJ,Uq as dJ,Vq as lJ,Yq as d,Zq as l,ar as cJ,dr as pJ,er as iJ,fr as nJ,gr as aJ,hr as rJ,jr as AQ}from"./chunk-d6ry9418.js";import{Rs as x,Vr as CQ,Wr as DQ,_s as GJ,ys as FQ}from"./chunk-xj765svc.js";import{AC as IJ,DC as PJ,DG as kJ,DI as gJ,EE as ZJ,GC as T,HG as LJ,IF as TJ,JA as tJ,JC as KJ,KG as SJ,OE as z,OG as xJ,OK as j,PD as qQ,PF as EJ,SG as fJ,TF as MJ,UE as b,WD as _J,WE as CJ,WF as oJ,YB as GQ,_F as RJ,aG as VJ,bH as E,dG as hJ,dL as o,eF as DJ,fF as FJ,gF as AJ,gH as yJ,hH as bJ,iO as g,jE as BQ,jO as eJ,kE as wQ,mC as $Q,mG as jJ,mO as HQ,nB as wJ,nE as $J,nO as WQ,oE as UJ,oO as R,pH as I,qB as HJ,sF as t,sG as NJ,tB as WJ,tE as zJ,tF as OJ,uC as f,vF as y}from"./chunk-zs8kqdsf.js";import{BO as zQ,DO as u,FO as S}from"./chunk-7xm75w1e.js";var IX={};u(IX,{resource:()=>BJ,layer:()=>EQ,enabled:()=>OQ,Observability:()=>WX});var p={};u(p,{make:()=>IQ,layer:()=>ZX});var VQ=AJ.pipe(FJ,DJ((J)=>{if(lJ(J)&&J.reason._tag==="StatusCodeError"&&J.reason.response.status===429){let Q=HJ(J.reason.response.headers["retry-after"]).pipe(WJ(CJ),wJ(()=>5));return t(T(Q))}return t(T(1))})),sJ=E(function*(J){let Q=yield*jJ(),X=f(Q,b),Y=f(Q,UJ),$=fJ(Q),G=KJ(IJ(J.exportInterval),PJ),B=void 0,C=nJ(f(Q,pJ)).pipe(iJ(NJ(rJ,!1)),aJ({schedule:VQ,times:3})),V=vJ({"user-agent":`effect-opentelemetry-${J.label}/0.0.0`});if(J.headers)V=dJ(mJ(J.headers),V);let r=uJ(J.url,{headers:V}),O=[],s=OJ(()=>{if(B!==void 0&&X.currentTimeMillisUnsafe()<B)return y;else if(B!==void 0)B=void 0;let h=O;if(J.maxBatchSize!=="disabled"){if(O.length===0)return y;O=[]}return C.execute(cJ(r,J.body(h))).pipe(EJ,SJ(!1))}).pipe(MJ((h)=>{if(B!==void 0)return y;return B=X.currentTimeMillisUnsafe()+60000,O=[],yJ("Disabling exporter for 60 seconds",h)}),bJ({package:"@effect/opentelemetry",module:J.label}));return yield*zJ(Y,s.pipe(RJ,kJ,VJ(J.shutdownTimeout))),yield*hJ(G).pipe(TJ(s),LJ,xJ(Y)),{push(h){if(B!==void 0)return;if(O.push(h),J.maxBatchSize!=="disabled"&&O.length>=J.maxBatchSize)gJ($(s),Y)}}});var jQ=(J)=>{let Q=J.attributes?e(Object.entries(J.attributes)):[];if(Q.push({key:"service.name",value:{stringValue:J.serviceName}}),J.serviceVersion)Q.push({key:"service.version",value:{stringValue:J.serviceVersion}});return{attributes:Q,droppedAttributesCount:0}},JQ=E(function*(J){let Q={...yield*g(o(eJ(j,j)),"OTEL_RESOURCE_ATTRIBUTES"),...J?.attributes},X=J?.serviceName??Q["service.name"]??(yield*g(j,"OTEL_SERVICE_NAME"));delete Q["service.name"];let Y=J?.serviceVersion??Q["service.version"]??(yield*g(o(j),"OTEL_SERVICE_VERSION"));return delete Q["service.version"],jQ({serviceName:X,serviceVersion:Y,attributes:Q})},oJ),QQ=(J)=>{let Q=J.attributes.find((X)=>X.key==="service.name");if(!Q||!Q.value.stringValue)throw Error("Resource does not contain a service name");return Q.value.stringValue},e=(J)=>{let Q=[];for(let[X,Y]of J)Q.push({key:X,value:m(Y)});return Q},m=(J)=>{if(Array.isArray(J))return{arrayValue:{values:J.map(m)}};switch(typeof J){case"string":return{stringValue:J};case"bigint":return{intValue:Number(J)};case"number":return Number.isInteger(J)?{intValue:J}:{doubleValue:J};case"boolean":return{boolValue:J};default:return{stringValue:tJ(J)}}};var c={};u(c,{layerProtobuf:()=>YX,layerJson:()=>XX,OtlpSerialization:()=>M});var N={Varint:0,Fixed64:1,LengthDelimited:2,Fixed32:5},k=(J,Q)=>J<<3|Q,D=(J)=>{let Q=[],X=typeof J==="bigint"?J:BigInt(J);while(X>0x7fn)Q.push(Number(X&0x7fn)|128),X>>=7n;return Q.push(Number(X)),new Uint8Array(Q)};var kQ=(J)=>{let Q=new Uint8Array(8);return new DataView(Q.buffer).setBigUint64(0,J,!0),Q},LQ=(J)=>{let Q=new Uint8Array(4);return new DataView(Q.buffer).setUint32(0,J,!0),Q},SQ=(J)=>{let Q=new Uint8Array(8);return new DataView(Q.buffer).setFloat64(0,J,!0),Q},xQ=(J)=>new TextEncoder().encode(J),fQ=(J)=>{let Q=new Uint8Array(J.length/2);for(let X=0;X<J.length;X+=2)Q[X/2]=parseInt(J.slice(X,X+2),16);return Q},Z=(...J)=>{let Q=J.reduce(($,G)=>$+G.length,0),X=new Uint8Array(Q),Y=0;for(let $ of J)X.set($,Y),Y+=$.length;return X},q=(J,Q)=>Z(D(k(J,N.Varint)),D(Q));var JJ=(J,Q)=>q(J,Q?1:0),W=(J,Q)=>Z(D(k(J,N.Fixed64)),kQ(Q)),v=(J,Q)=>Z(D(k(J,N.Fixed32)),LQ(Q)),F=(J,Q)=>Z(D(k(J,N.Fixed64)),SQ(Q)),L=(J,Q)=>Z(D(k(J,N.LengthDelimited)),D(Q.length),Q),K=(J,Q)=>L(J,xQ(Q)),U=(J,Q)=>L(J,fQ(Q)),w=(J,Q)=>L(J,Q),_=(J,Q,X)=>Z(...Q.map((Y)=>w(J,X(Y))));var H=(J,Q)=>Q!==void 0&&Q!==""?K(J,Q):new Uint8Array(0);var QJ=(J)=>{if(J.stringValue!==void 0&&J.stringValue!==null)return K(1,J.stringValue);if(J.boolValue!==void 0&&J.boolValue!==null)return JJ(2,J.boolValue);if(J.intValue!==void 0&&J.intValue!==null)return q(3,BigInt(J.intValue));if(J.doubleValue!==void 0&&J.doubleValue!==null)return F(4,J.doubleValue);if(J.arrayValue!==void 0)return w(5,bQ(J.arrayValue));if(J.kvlistValue!==void 0)return w(6,gQ(J.kvlistValue));if(J.bytesValue!==void 0)return L(7,J.bytesValue);return new Uint8Array(0)},bQ=(J)=>_(1,J.values,QJ),gQ=(J)=>_(1,J.values,P),P=(J)=>Z(K(1,J.key),w(2,QJ(J.value))),XJ=(J)=>Z(K(1,J.name),H(2,J.version),J.attributes?_(3,J.attributes,P):new Uint8Array(0),J.droppedAttributesCount?q(4,J.droppedAttributesCount):new Uint8Array(0)),YJ=(J)=>Z(_(1,J.attributes,P),J.droppedAttributesCount>0?q(2,J.droppedAttributesCount):new Uint8Array(0));var mQ=(J)=>Z(H(2,J.message),q(3,J.code)),vQ=(J)=>Z(W(1,BigInt(J.timeUnixNano)),K(2,J.name),_(3,J.attributes,P),J.droppedAttributesCount>0?q(4,J.droppedAttributesCount):new Uint8Array(0)),dQ=(J)=>Z(U(1,J.traceId),U(2,J.spanId),H(3,J.traceState),_(4,J.attributes,P),J.droppedAttributesCount>0?q(5,J.droppedAttributesCount):new Uint8Array(0),J.flags!==void 0?v(6,J.flags):new Uint8Array(0)),lQ=(J)=>Z(U(1,J.traceId),U(2,J.spanId),H(3,J.traceState),J.parentSpanId!==void 0?U(4,J.parentSpanId):new Uint8Array(0),K(5,J.name),q(6,J.kind),W(7,BigInt(J.startTimeUnixNano)),W(8,BigInt(J.endTimeUnixNano)),_(9,J.attributes,P),J.droppedAttributesCount>0?q(10,J.droppedAttributesCount):new Uint8Array(0),_(11,J.events,vQ),J.droppedEventsCount>0?q(12,J.droppedEventsCount):new Uint8Array(0),_(13,J.links,dQ),J.droppedLinksCount>0?q(14,J.droppedLinksCount):new Uint8Array(0),w(15,mQ(J.status)),J.flags!==void 0?v(16,J.flags):new Uint8Array(0)),uQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.spans,lQ),H(3,J.schemaUrl)),cQ=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeSpans,uQ),H(3,J.schemaUrl)),XQ=(J)=>_(1,J.resourceSpans,cQ);var YQ=(J)=>Z(W(2,BigInt(J.startTimeUnixNano)),W(3,BigInt(J.timeUnixNano)),J.asDouble!==void 0?F(4,J.asDouble):new Uint8Array(0),J.asInt!==void 0?W(6,BigInt(J.asInt)):new Uint8Array(0),_(7,J.attributes,P),J.flags!==void 0?q(8,J.flags):new Uint8Array(0)),pQ=(J)=>{let Q=Z(...J.bucketCounts.map((Y)=>W(6,BigInt(Y)))),X=Z(...J.explicitBounds.map((Y)=>F(7,Y)));return Z(W(2,BigInt(J.startTimeUnixNano)),W(3,BigInt(J.timeUnixNano)),W(4,BigInt(J.count)),J.sum!==void 0?F(5,J.sum):new Uint8Array(0),Q,X,_(9,J.attributes,P),J.flags!==void 0?q(10,J.flags):new Uint8Array(0),J.min!==void 0?F(11,J.min):new Uint8Array(0),J.max!==void 0?F(12,J.max):new Uint8Array(0))},iQ=(J)=>_(1,J.dataPoints,YQ),nQ=(J)=>Z(_(1,J.dataPoints,YQ),q(2,J.aggregationTemporality),JJ(3,J.isMonotonic)),aQ=(J)=>Z(_(1,J.dataPoints,pQ),q(2,J.aggregationTemporality)),rQ=(J)=>Z(K(1,J.name),H(2,J.description),H(3,J.unit),J.gauge!==void 0?w(5,iQ(J.gauge)):new Uint8Array(0),J.sum!==void 0?w(7,nQ(J.sum)):new Uint8Array(0),J.histogram!==void 0?w(9,aQ(J.histogram)):new Uint8Array(0)),sQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.metrics,rQ),H(3,J.schemaUrl)),tQ=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeMetrics,sQ),H(3,J.schemaUrl)),ZQ=(J)=>_(1,J.resourceMetrics,tQ);var oQ=(J)=>Z(W(1,BigInt(J.timeUnixNano)),J.severityNumber!==void 0?q(2,J.severityNumber):new Uint8Array(0),H(3,J.severityText),J.body!==void 0?w(5,QJ(J.body)):new Uint8Array(0),_(6,J.attributes,P),J.droppedAttributesCount!==void 0&&J.droppedAttributesCount>0?q(7,J.droppedAttributesCount):new Uint8Array(0),J.flags!==void 0?v(8,J.flags):new Uint8Array(0),J.traceId!==void 0&&J.traceId!==""?U(9,J.traceId):new Uint8Array(0),J.spanId!==void 0&&J.spanId!==""?U(10,J.spanId):new Uint8Array(0),J.observedTimeUnixNano!==void 0?W(11,BigInt(J.observedTimeUnixNano)):new Uint8Array(0)),eQ=(J)=>Z(w(1,XJ(J.scope)),_(2,J.logRecords,oQ),H(3,J.schemaUrl)),JX=(J)=>Z(w(1,YJ(J.resource)),_(2,J.scopeLogs,eQ),H(3,J.schemaUrl)),_Q=(J)=>_(1,J.resourceLogs,JX);class M extends $Q()("effect/observability/OtlpSerialization"){}var XX=ZJ(M,{traces:(J)=>l(J),metrics:(J)=>l(J),logs:(J)=>l(J)}),YX=ZJ(M,{traces:(J)=>d(XQ(J),"application/x-protobuf"),metrics:(J)=>d(ZQ(J),"application/x-protobuf"),logs:(J)=>d(_Q(J),"application/x-protobuf")});var IQ=E(function*(J){let Q=yield*M,X=yield*JQ(J.resource),Y={name:QQ(X)},$=yield*sJ({label:"OtlpLogger",url:J.url,headers:J.headers,maxBatchSize:J.maxBatchSize??1000,exportInterval:J.exportInterval??T(1),body:(B)=>Q.logs({resourceLogs:[{resource:X,scopeLogs:[{scope:Y,logRecords:B}]}]}),shutdownTimeout:J.shutdownTimeout??T(3)}),G={excludeLogSpans:J.excludeLogSpans??!1,clock:yield*b};return HQ((B)=>{$.push(_X(B,G))})}),ZX=(J)=>WQ([IQ(J)],{mergeWithExisting:J.mergeWithExisting??!0}),_X=(J,Q)=>{let Y=Q.clock.currentTimeNanosUnsafe().toString(),$=J.date.getTime(),G=e(Object.entries(J.fiber.getRef(BQ)));if(G.push({key:"fiberId",value:{intValue:J.fiber.id}}),!Q.excludeLogSpans)for(let[V,r]of J.fiber.getRef(wQ))G.push({key:`logSpan.${V}`,value:{stringValue:`${$-r}ms`}});if(J.cause.reasons.length>0)G.push({key:"log.error",value:{stringValue:qQ(J.cause)}});let B=GQ(J.message),C={severityNumber:$X(J.logLevel),severityText:J.logLevel,timeUnixNano:Y,observedTimeUnixNano:Y,attributes:G,body:m(B.length===1?B[0]:B),droppedAttributesCount:0};if(J.fiber.currentSpan)C.traceId=J.fiber.currentSpan.traceId,C.spanId=J.fiber.currentSpan.spanId;return C},$X=(J)=>{switch(J){case"Trace":return A.SEVERITY_NUMBER_TRACE;case"Debug":return A.SEVERITY_NUMBER_DEBUG;case"Info":return A.SEVERITY_NUMBER_INFO;case"Warn":return A.SEVERITY_NUMBER_WARN;case"Error":return A.SEVERITY_NUMBER_ERROR;case"Fatal":return A.SEVERITY_NUMBER_FATAL;default:return A.SEVERITY_NUMBER_UNSPECIFIED}},A={SEVERITY_NUMBER_UNSPECIFIED:0,SEVERITY_NUMBER_TRACE:1,SEVERITY_NUMBER_TRACE2:2,SEVERITY_NUMBER_TRACE3:3,SEVERITY_NUMBER_TRACE4:4,SEVERITY_NUMBER_DEBUG:5,SEVERITY_NUMBER_DEBUG2:6,SEVERITY_NUMBER_DEBUG3:7,SEVERITY_NUMBER_DEBUG4:8,SEVERITY_NUMBER_INFO:9,SEVERITY_NUMBER_INFO2:10,SEVERITY_NUMBER_INFO3:11,SEVERITY_NUMBER_INFO4:12,SEVERITY_NUMBER_WARN:13,SEVERITY_NUMBER_WARN2:14,SEVERITY_NUMBER_WARN3:15,SEVERITY_NUMBER_WARN4:16,SEVERITY_NUMBER_ERROR:17,SEVERITY_NUMBER_ERROR2:18,SEVERITY_NUMBER_ERROR3:19,SEVERITY_NUMBER_ERROR4:20,SEVERITY_NUMBER_FATAL:21,SEVERITY_NUMBER_FATAL2:22,SEVERITY_NUMBER_FATAL3:23,SEVERITY_NUMBER_FATAL4:24};var UQ={};u(UQ,{logger:()=>n,layer:()=>qJ,create:()=>KQ});var GX=(J)=>J==="sessionID"?"session.id":J,PQ=(J)=>Object.fromEntries(Object.entries(J??{}).filter((Q)=>Q[1]!==void 0&&Q[1]!==null).map(([Q,X])=>[GX(Q),X])),qX=(J)=>{if(Array.isArray(J))return J.map((Q)=>String(Q)).join(" ");return J===void 0?"":String(J)},i=(J,Q,X,Y)=>{let $=PQ({...Q,...Y}),G=J(X);return Object.keys($).length?I.annotateLogs(G,$):G},n=R.make((J)=>{let Q=PQ(J.fiber.getRef($J.CurrentLogAnnotations)),X=J.date.getTime();for(let[B,C]of J.fiber.getRef($J.CurrentLogSpans))Q[`logSpan.${B}`]=`${X-C}ms`;if(J.cause.reasons.length>0)Q.cause=_J.pretty(J.cause);let Y=typeof Q.service==="string"?Q.service:void 0;if(Y)delete Q.service;let $=Y?GJ.create({service:Y}):GJ.Default,G=qX(J.message);switch(J.logLevel){case"Trace":case"Debug":return $.debug(G,Q);case"Warn":return $.warn(G,Q);case"Error":case"Fatal":return $.error(G,Q);default:return $.info(G,Q)}}),qJ=R.layer([n],{mergeWithExisting:!1}),KQ=(J={})=>({debug:(Q,X)=>i((Y)=>I.logDebug(Y),J,Q,X),info:(Q,X)=>i((Y)=>I.logInfo(Y),J,Q,X),warn:(Q,X)=>i((Y)=>I.logWarning(Y),J,Q,X),error:(Q,X)=>i((Y)=>I.logError(Y),J,Q,X),with:(Q)=>KQ({...J,...Q})});var a=x.OTEL_EXPORTER_OTLP_ENDPOINT,OQ=!!a,BX=crypto.randomUUID(),TQ=x.OTEL_EXPORTER_OTLP_HEADERS?x.OTEL_EXPORTER_OTLP_HEADERS.split(",").reduce((J,Q)=>{let[X,...Y]=Q.split("=");return J[X]=Y.join("="),J},{}):void 0;function BJ(){let J=FQ("main"),Q=(()=>{let X=process.env.OTEL_RESOURCE_ATTRIBUTES;if(!X)return{};try{return Object.fromEntries(X.split(",").map((Y)=>{let $=Y.indexOf("=");if($<1)throw Error("Invalid OTEL_RESOURCE_ATTRIBUTES entry");return[decodeURIComponent(Y.slice(0,$)),decodeURIComponent(Y.slice($+1))]}))}catch{return{}}})();return{serviceName:"qitqode",serviceVersion:CQ,attributes:{...Q,"deployment.environment.name":DQ,"qitqode.client":x.QITQODE_CLIENT,"qitqode.process_role":J.processRole,"qitqode.run_id":J.runID,"service.instance.id":BX}}}function wX(){return R.layer([n,p.make({url:`${a}/v1/logs`,resource:BJ(),headers:TQ})],{mergeWithExisting:!1}).pipe(z.provide(c.layerJson),z.provide(AQ.layer))}var HX=async()=>{let J=await import("./chunk-cfgvm15x.js"),Q=await import("./chunk-qc8rsn4v.js"),X=await import("./chunk-78ymd20x.js"),{AsyncLocalStorageContextManager:Y}=await import("./chunk-1gx18dm5.js").then((m)=>zQ(m.default,1)),{context:$}=await import("./chunk-1wbjh23g.js").then((m)=>zQ(m.default,1)),G=new Y;return G.enable(),$.setGlobalContextManager(G),J.layer(()=>({resource:BJ(),spanProcessor:new X.BatchSpanProcessor(new Q.OTLPTraceExporter({url:`${a}/v1/traces`,headers:TQ}))}))},EQ=!a?qJ:z.unwrap(I.gen(function*(){let J=yield*I.promise(HX);return z.mergeAll(J,wX())})),WX={enabled:OQ,layer:EQ};var aX=z.makeMemoMapUnsafe();
3
+ export{qJ as Mq,UQ as Nq,EQ as Oq,WX as Pq,IX as Qq,aX as Rq};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{aQ as I,dQ as Z}from"./chunk-aztre27e.js";var x=I((r0,u)=>{u.exports=v;v.sync=K0;var N=Z("fs");function T0(q,L){var $=L.pathExt!==void 0?L.pathExt:process.env.PATHEXT;if(!$)return!0;if($=$.split(";"),$.indexOf("")!==-1)return!0;for(var G=0;G<$.length;G++){var H=$[G].toLowerCase();if(H&&q.substr(-H.length).toLowerCase()===H)return!0}return!1}function R(q,L,$){if(!q.isSymbolicLink()&&!q.isFile())return!1;return T0(L,$)}function v(q,L,$){N.stat(q,function(G,H){$(G,G?!1:R(H,q,L))})}function K0(q,L){return R(N.statSync(q),q,L)}});var g=I((o0,E)=>{E.exports=b;b.sync=f0;var C=Z("fs");function b(q,L,$){C.stat(q,function(G,H){$(G,G?!1:w(H,L))})}function f0(q,L){return w(C.statSync(q),L)}function w(q,L){return q.isFile()&&A0(q,L)}function A0(q,L){var{mode:$,uid:G,gid:H}=q,X=L.uid!==void 0?L.uid:process.getuid&&process.getuid(),k=L.gid!==void 0?L.gid:process.getgid&&process.getgid(),J=parseInt("100",8),Y=parseInt("010",8),B=parseInt("001",8),V=J|Y,Q=$&B||$&Y&&H===k||$&J&&G===X||$&V&&X===0;return Q}});var h=I((s0,c)=>{var p0=Z("fs"),K;if(process.platform==="win32"||global.TESTING_WINDOWS)K=x();else K=g();c.exports=A;A.sync=D0;function A(q,L,$){if(typeof L==="function")$=L,L={};if(!$){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(G,H){A(q,L||{},function(X,k){if(X)H(X);else G(k)})})}K(q,L||{},function(G,H){if(G){if(G.code==="EACCES"||L&&L.ignoreErrors)G=null,H=!1}$(G,H)})}function D0(q,L){try{return K.sync(q,L||{})}catch($){if(L&&L.ignoreErrors||$.code==="EACCES")return!1;else throw $}}});var r=I((a0,d)=>{var _=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",l=Z("path"),F0=_?";":":",m=h(),n=(q)=>Object.assign(Error(`not found: ${q}`),{code:"ENOENT"}),i=(q,L)=>{let $=L.colon||F0,G=q.match(/\//)||_&&q.match(/\\/)?[""]:[..._?[process.cwd()]:[],...(L.path||process.env.PATH||"").split($)],H=_?L.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",X=_?H.split($):[""];if(_){if(q.indexOf(".")!==-1&&X[0]!=="")X.unshift("")}return{pathEnv:G,pathExt:X,pathExtExe:H}},t=(q,L,$)=>{if(typeof L==="function")$=L,L={};if(!L)L={};let{pathEnv:G,pathExt:H,pathExtExe:X}=i(q,L),k=[],J=(B)=>new Promise((V,Q)=>{if(B===G.length)return L.all&&k.length?V(k):Q(n(q));let U=G[B],T=/^".*"$/.test(U)?U.slice(1,-1):U,z=l.join(T,q),f=!T&&/^\.[\\\/]/.test(q)?q.slice(0,2)+z:z;V(Y(f,B,0))}),Y=(B,V,Q)=>new Promise((U,T)=>{if(Q===H.length)return U(J(V+1));let z=H[Q];m(B+z,{pathExt:X},(f,M0)=>{if(!f&&M0)if(L.all)k.push(B+z);else return U(B+z);return U(Y(B,V,Q+1))})});return $?J(0).then((B)=>$(null,B),$):J(0)},O0=(q,L)=>{L=L||{};let{pathEnv:$,pathExt:G,pathExtExe:H}=i(q,L),X=[];for(let k=0;k<$.length;k++){let J=$[k],Y=/^".*"$/.test(J)?J.slice(1,-1):J,B=l.join(Y,q),V=!Y&&/^\.[\\\/]/.test(q)?q.slice(0,2)+B:B;for(let Q=0;Q<G.length;Q++){let U=V+G[Q];try{if(m.sync(U,{pathExt:H}))if(L.all)X.push(U);else return U}catch(T){}}}if(L.all&&X.length)return X;if(L.nothrow)return null;throw n(q)};d.exports=t;t.sync=O0});var p=I((e0,D)=>{var o=(q={})=>{let L=q.env||process.env;if((q.platform||process.platform)!=="win32")return"PATH";return Object.keys(L).reverse().find((G)=>G.toUpperCase()==="PATH")||"Path"};D.exports=o;D.exports.default=o});var q0=I((qq,e)=>{var s=Z("path"),P0=r(),S0=p();function a(q,L){let $=q.options.env||process.env,G=process.cwd(),H=q.options.cwd!=null,X=H&&process.chdir!==void 0&&!process.chdir.disabled;if(X)try{process.chdir(q.options.cwd)}catch(J){}let k;try{k=P0.sync(q.command,{path:$[S0({env:$})],pathExt:L?s.delimiter:void 0})}catch(J){}finally{if(X)process.chdir(G)}if(k)k=s.resolve(H?q.options.cwd:"",k);return k}function j0(q){return a(q)||a(q,!0)}e.exports=j0});var L0=I((N0,O)=>{var F=/([()\][%!^"`<>&|;, *?])/g;function W0(q){return q=q.replace(F,"^$1"),q}function y0(q,L){if(q=`${q}`,q=q.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),q=q.replace(/(?=(\\+?)?)\1$/,"$1$1"),q=`"${q}"`,q=q.replace(F,"^$1"),L)q=q.replace(F,"^$1");return q}N0.command=W0;N0.argument=y0});var G0=I((Lq,$0)=>{$0.exports=/^#!(.*)/});var X0=I(($q,H0)=>{var u0=G0();H0.exports=(q="")=>{let L=q.match(u0);if(!L)return null;let[$,G]=L[0].replace(/#! ?/,"").split(" "),H=$.split("/").pop();if(H==="env")return G;return G?`${H} ${G}`:H}});var B0=I((Gq,k0)=>{var P=Z("fs"),x0=X0();function C0(q){let $=Buffer.alloc(150),G;try{G=P.openSync(q,"r"),P.readSync(G,$,0,150,0),P.closeSync(G)}catch(H){}return x0($.toString())}k0.exports=C0});var U0=I((Hq,Q0)=>{var b0=Z("path"),I0=q0(),J0=L0(),w0=B0(),E0=process.platform==="win32",g0=/\.(?:com|exe)$/i,c0=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function h0(q){q.file=I0(q);let L=q.file&&w0(q.file);if(L)return q.args.unshift(q.file),q.command=L,I0(q);return q.file}function l0(q){if(!E0)return q;let L=h0(q),$=!g0.test(L);if(q.options.forceShell||$){let G=c0.test(L);q.command=b0.normalize(q.command),q.command=J0.command(q.command),q.args=q.args.map((X)=>J0.argument(X,G));let H=[q.command].concat(q.args).join(" ");q.args=["/d","/s","/c",`"${H}"`],q.command=process.env.comspec||"cmd.exe",q.options.windowsVerbatimArguments=!0}return q}function m0(q,L,$){if(L&&!Array.isArray(L))$=L,L=null;L=L?L.slice(0):[],$=Object.assign({},$);let G={command:q,args:L,options:$,file:void 0,original:{command:q,args:L}};return $.shell?G:l0(G)}Q0.exports=m0});var Z0=I((Xq,Y0)=>{var S=process.platform==="win32";function j(q,L){return Object.assign(Error(`${L} ${q.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${L} ${q.command}`,path:q.command,spawnargs:q.args})}function n0(q,L){if(!S)return;let $=q.emit;q.emit=function(G,H){if(G==="exit"){let X=V0(H,L);if(X)return $.call(q,"error",X)}return $.apply(q,arguments)}}function V0(q,L){if(S&&q===1&&!L.file)return j(L.original,"spawn");return null}function i0(q,L){if(S&&q===1&&!L.file)return j(L.original,"spawnSync");return null}Y0.exports={hookChildProcess:n0,verifyENOENT:V0,verifyENOENTSync:i0,notFoundError:j}});var d0=I((kq,M)=>{var z0=Z("child_process"),W=U0(),y=Z0();function _0(q,L,$){let G=W(q,L,$),H=z0.spawn(G.command,G.args,G.options);return y.hookChildProcess(H,G),H}function t0(q,L,$){let G=W(q,L,$),H=z0.spawnSync(G.command,G.args,G.options);return H.error=H.error||y.verifyENOENTSync(H.status,G),H}M.exports=_0;M.exports.spawn=_0;M.exports.sync=t0;M.exports._parse=W;M.exports._enoent=y});
3
- export{d0 as Tu};
2
+ import{CO as I,FO as Z}from"./chunk-7xm75w1e.js";var x=I((r0,u)=>{u.exports=v;v.sync=K0;var N=Z("fs");function T0(q,L){var $=L.pathExt!==void 0?L.pathExt:process.env.PATHEXT;if(!$)return!0;if($=$.split(";"),$.indexOf("")!==-1)return!0;for(var G=0;G<$.length;G++){var H=$[G].toLowerCase();if(H&&q.substr(-H.length).toLowerCase()===H)return!0}return!1}function R(q,L,$){if(!q.isSymbolicLink()&&!q.isFile())return!1;return T0(L,$)}function v(q,L,$){N.stat(q,function(G,H){$(G,G?!1:R(H,q,L))})}function K0(q,L){return R(N.statSync(q),q,L)}});var g=I((o0,E)=>{E.exports=b;b.sync=f0;var C=Z("fs");function b(q,L,$){C.stat(q,function(G,H){$(G,G?!1:w(H,L))})}function f0(q,L){return w(C.statSync(q),L)}function w(q,L){return q.isFile()&&A0(q,L)}function A0(q,L){var{mode:$,uid:G,gid:H}=q,X=L.uid!==void 0?L.uid:process.getuid&&process.getuid(),k=L.gid!==void 0?L.gid:process.getgid&&process.getgid(),J=parseInt("100",8),Y=parseInt("010",8),B=parseInt("001",8),V=J|Y,Q=$&B||$&Y&&H===k||$&J&&G===X||$&V&&X===0;return Q}});var h=I((s0,c)=>{var p0=Z("fs"),K;if(process.platform==="win32"||global.TESTING_WINDOWS)K=x();else K=g();c.exports=A;A.sync=D0;function A(q,L,$){if(typeof L==="function")$=L,L={};if(!$){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(G,H){A(q,L||{},function(X,k){if(X)H(X);else G(k)})})}K(q,L||{},function(G,H){if(G){if(G.code==="EACCES"||L&&L.ignoreErrors)G=null,H=!1}$(G,H)})}function D0(q,L){try{return K.sync(q,L||{})}catch($){if(L&&L.ignoreErrors||$.code==="EACCES")return!1;else throw $}}});var r=I((a0,d)=>{var _=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",l=Z("path"),F0=_?";":":",m=h(),n=(q)=>Object.assign(Error(`not found: ${q}`),{code:"ENOENT"}),i=(q,L)=>{let $=L.colon||F0,G=q.match(/\//)||_&&q.match(/\\/)?[""]:[..._?[process.cwd()]:[],...(L.path||process.env.PATH||"").split($)],H=_?L.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",X=_?H.split($):[""];if(_){if(q.indexOf(".")!==-1&&X[0]!=="")X.unshift("")}return{pathEnv:G,pathExt:X,pathExtExe:H}},t=(q,L,$)=>{if(typeof L==="function")$=L,L={};if(!L)L={};let{pathEnv:G,pathExt:H,pathExtExe:X}=i(q,L),k=[],J=(B)=>new Promise((V,Q)=>{if(B===G.length)return L.all&&k.length?V(k):Q(n(q));let U=G[B],T=/^".*"$/.test(U)?U.slice(1,-1):U,z=l.join(T,q),f=!T&&/^\.[\\\/]/.test(q)?q.slice(0,2)+z:z;V(Y(f,B,0))}),Y=(B,V,Q)=>new Promise((U,T)=>{if(Q===H.length)return U(J(V+1));let z=H[Q];m(B+z,{pathExt:X},(f,M0)=>{if(!f&&M0)if(L.all)k.push(B+z);else return U(B+z);return U(Y(B,V,Q+1))})});return $?J(0).then((B)=>$(null,B),$):J(0)},O0=(q,L)=>{L=L||{};let{pathEnv:$,pathExt:G,pathExtExe:H}=i(q,L),X=[];for(let k=0;k<$.length;k++){let J=$[k],Y=/^".*"$/.test(J)?J.slice(1,-1):J,B=l.join(Y,q),V=!Y&&/^\.[\\\/]/.test(q)?q.slice(0,2)+B:B;for(let Q=0;Q<G.length;Q++){let U=V+G[Q];try{if(m.sync(U,{pathExt:H}))if(L.all)X.push(U);else return U}catch(T){}}}if(L.all&&X.length)return X;if(L.nothrow)return null;throw n(q)};d.exports=t;t.sync=O0});var p=I((e0,D)=>{var o=(q={})=>{let L=q.env||process.env;if((q.platform||process.platform)!=="win32")return"PATH";return Object.keys(L).reverse().find((G)=>G.toUpperCase()==="PATH")||"Path"};D.exports=o;D.exports.default=o});var q0=I((qq,e)=>{var s=Z("path"),P0=r(),S0=p();function a(q,L){let $=q.options.env||process.env,G=process.cwd(),H=q.options.cwd!=null,X=H&&process.chdir!==void 0&&!process.chdir.disabled;if(X)try{process.chdir(q.options.cwd)}catch(J){}let k;try{k=P0.sync(q.command,{path:$[S0({env:$})],pathExt:L?s.delimiter:void 0})}catch(J){}finally{if(X)process.chdir(G)}if(k)k=s.resolve(H?q.options.cwd:"",k);return k}function j0(q){return a(q)||a(q,!0)}e.exports=j0});var L0=I((N0,O)=>{var F=/([()\][%!^"`<>&|;, *?])/g;function W0(q){return q=q.replace(F,"^$1"),q}function y0(q,L){if(q=`${q}`,q=q.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),q=q.replace(/(?=(\\+?)?)\1$/,"$1$1"),q=`"${q}"`,q=q.replace(F,"^$1"),L)q=q.replace(F,"^$1");return q}N0.command=W0;N0.argument=y0});var G0=I((Lq,$0)=>{$0.exports=/^#!(.*)/});var X0=I(($q,H0)=>{var u0=G0();H0.exports=(q="")=>{let L=q.match(u0);if(!L)return null;let[$,G]=L[0].replace(/#! ?/,"").split(" "),H=$.split("/").pop();if(H==="env")return G;return G?`${H} ${G}`:H}});var B0=I((Gq,k0)=>{var P=Z("fs"),x0=X0();function C0(q){let $=Buffer.alloc(150),G;try{G=P.openSync(q,"r"),P.readSync(G,$,0,150,0),P.closeSync(G)}catch(H){}return x0($.toString())}k0.exports=C0});var U0=I((Hq,Q0)=>{var b0=Z("path"),I0=q0(),J0=L0(),w0=B0(),E0=process.platform==="win32",g0=/\.(?:com|exe)$/i,c0=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function h0(q){q.file=I0(q);let L=q.file&&w0(q.file);if(L)return q.args.unshift(q.file),q.command=L,I0(q);return q.file}function l0(q){if(!E0)return q;let L=h0(q),$=!g0.test(L);if(q.options.forceShell||$){let G=c0.test(L);q.command=b0.normalize(q.command),q.command=J0.command(q.command),q.args=q.args.map((X)=>J0.argument(X,G));let H=[q.command].concat(q.args).join(" ");q.args=["/d","/s","/c",`"${H}"`],q.command=process.env.comspec||"cmd.exe",q.options.windowsVerbatimArguments=!0}return q}function m0(q,L,$){if(L&&!Array.isArray(L))$=L,L=null;L=L?L.slice(0):[],$=Object.assign({},$);let G={command:q,args:L,options:$,file:void 0,original:{command:q,args:L}};return $.shell?G:l0(G)}Q0.exports=m0});var Z0=I((Xq,Y0)=>{var S=process.platform==="win32";function j(q,L){return Object.assign(Error(`${L} ${q.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${L} ${q.command}`,path:q.command,spawnargs:q.args})}function n0(q,L){if(!S)return;let $=q.emit;q.emit=function(G,H){if(G==="exit"){let X=V0(H,L);if(X)return $.call(q,"error",X)}return $.apply(q,arguments)}}function V0(q,L){if(S&&q===1&&!L.file)return j(L.original,"spawn");return null}function i0(q,L){if(S&&q===1&&!L.file)return j(L.original,"spawnSync");return null}Y0.exports={hookChildProcess:n0,verifyENOENT:V0,verifyENOENTSync:i0,notFoundError:j}});var d0=I((kq,M)=>{var z0=Z("child_process"),W=U0(),y=Z0();function _0(q,L,$){let G=W(q,L,$),H=z0.spawn(G.command,G.args,G.options);return y.hookChildProcess(H,G),H}function t0(q,L,$){let G=W(q,L,$),H=z0.spawnSync(G.command,G.args,G.options);return H.error=H.error||y.verifyENOENTSync(H.status,G),H}M.exports=_0;M.exports.spawn=_0;M.exports.sync=t0;M.exports._parse=W;M.exports._enoent=y});
3
+ export{d0 as tt};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Fd as y,Hd as T,Id as t,Jd as O,Kd as l,Md as v,Nd as Q,Od as X,Pd as J}from"./chunk-jje0srjq.js";import"./chunk-27yxgy03.js";import{Rd as w}from"./chunk-yajd975f.js";import{Vf as f}from"./chunk-7ppd2phw.js";import{Ng as Y,Og as mt,Pg as pt,Qg as st,Rg as et,Sg as ft,Tg as E,hh as q}from"./chunk-ddnpx1yx.js";import{Eh as Mt}from"./chunk-wfs4pcwa.js";import"./chunk-p68rwmhc.js";import"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-j8efst22.js";import"./chunk-a1pw9r6f.js";import"./chunk-d5bxan80.js";import{Dl as F,Xj as nt,bk as L}from"./chunk-pvpy9kq1.js";import"./chunk-wpajh5s5.js";import{lm as $}from"./chunk-2ec6ps8r.js";import"./chunk-gj3hzx3d.js";import"./chunk-nj4d554m.js";import"./chunk-2gerf08b.js";import{hp as P,ip as h}from"./chunk-fqw4y7x0.js";import"./chunk-a1p2f16h.js";import"./chunk-nt4e3em9.js";import"./chunk-a0v55ywn.js";import"./chunk-v965rsr8.js";import"./chunk-1sgby720.js";import"./chunk-dcvatax2.js";import"./chunk-4tbwha3m.js";import"./chunk-m612agnk.js";import"./chunk-yq3m8190.js";import"./chunk-btz9jvec.js";import"./chunk-cqtkxwd8.js";import"./chunk-fkgv2hqd.js";import"./chunk-zyhdxggp.js";import"./chunk-q6ztpfcs.js";import"./chunk-jm1ptn8n.js";import"./chunk-c5e6sk9c.js";import"./chunk-m02zt1a3.js";import"./chunk-vg2fmyje.js";import"./chunk-sn4nez18.js";import"./chunk-42f7p0hq.js";import"./chunk-4qqkqrn9.js";import"./chunk-j6emx6jn.js";import"./chunk-be216spx.js";import"./chunk-12bssxd4.js";import"./chunk-z8r65yw3.js";import{ou as A,tt as g}from"./chunk-3szwfy7w.js";import{Su as D}from"./chunk-whxjkz9a.js";import"./chunk-89v6dgpp.js";import"./chunk-k309zez0.js";import"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-phxrg7aw.js";import{PI as a}from"./chunk-snm5q21k.js";import"./chunk-xpc2zgj7.js";import"./chunk-qjjch1zt.js";import{$P as ut}from"./chunk-aztre27e.js";import W from"path";function G(o){switch(o){case"authenticated":return"\u2713";case"expired":return"\u26A0";case"not_authenticated":return"\u2717"}}function H(o){switch(o){case"authenticated":return"authenticated";case"expired":return"expired";case"not_authenticated":return"not authenticated"}}function N(o){return typeof o==="object"&&o!==null&&"type"in o}function k(o){return N(o)&&o.type==="remote"}function B(o){return Object.entries(o.mcp??{}).filter((e)=>N(e[1]))}function U(o,e){let r=o.mcp_origins?.[e];if(!r)return"qitqode";let i=A.Path.home,m=r.source===i?"~":r.source.startsWith(i+W.sep)?"~"+r.source.slice(i.length):r.source;return`${r.type}:${m}`}function C(o){return B(o).filter((e)=>k(e[1])&&e[1].oauth!==!1)}async function I(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*e.status(),m=yield*a.all(Object.fromEntries(B(r).map(([p])=>[p,e.hasStoredTokens(p)])),{concurrency:"unbounded"});return{config:r,statuses:i,stored:m}}))}async function S(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*a.all(Object.fromEntries(C(r).map(([m])=>[m,e.getAuthStatus(m)])),{concurrency:"unbounded"});return{config:r,auth:i}}))}async function V(o,e=!1){let r=[W.join(o,"qitqode.json"),W.join(o,"qitqode.jsonc")];if(!e)r.push(W.join(o,".qitqode","qitqode.json"),W.join(o,".qitqode","qitqode.jsonc"));for(let i of r)if(await D.exists(i))return i;return r[0]}async function R(o,e,r){let i="{}";if(await D.exists(r))i=await D.readText(r);let m=P(i,["mcp",o],e,{formattingOptions:{tabSize:2,insertSpaces:!0}});return await D.write(r,h(i,m)),r}var tt=ut(Mt(),1);function yt(o){let e=tt.parse(o);if(!e.every((r)=>typeof r==="string"))throw Error("Shell operators are not supported; enter only the command and its arguments");if(e.length===0)throw Error("Command is required");return e}var ot=w({command:"add",describe:"add an MCP server",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("Add MCP server");let o=$.project,[e,r]=await Promise.all([V($.worktree),V(A.Path.config,!0)]),i=r;if(o.vcs==="git"){let c=await X({message:"Location",options:[{label:"Current project",value:e,hint:e},{label:"Global",value:r,hint:r}]});if(y(c))throw new f.CancelledError;i=c}let m=await J({message:"Enter MCP server name",validate:(c)=>c&&c.length>0?void 0:"Required"});if(y(m))throw new f.CancelledError;let p=await X({message:"Select MCP server type",options:[{label:"Local",value:"local",hint:"Run a local command"},{label:"Remote",value:"remote",hint:"Connect to a remote URL"}]});if(y(p))throw new f.CancelledError;if(p==="local"){let c=await J({message:"Enter command to run",placeholder:"e.g., qode x @modelcontextprotocol/server-filesystem",validate:(s)=>s&&s.length>0?void 0:"Required"});if(y(c))throw new f.CancelledError;let u;try{u=yt(c)}catch(s){t.error(s instanceof Error?s.message:"Invalid command"),l("MCP server was not added");return}await R(m,{type:"local",command:u},i),t.success(`MCP server "${m}" added to ${i}`),l("MCP server added successfully");return}if(p==="remote"){let c=await J({message:"Enter MCP server URL",placeholder:"e.g., https://example.com/mcp",validate:(s)=>{if(!s)return"Required";if(s.length===0)return"Required";return URL.canParse(s)?void 0:"Invalid URL"}});if(y(c))throw new f.CancelledError;let u=await T({message:"Does this server require OAuth authentication?",initialValue:!1});if(y(u))throw new f.CancelledError;let n;if(u){let s=await T({message:"Do you have a pre-registered client ID?",initialValue:!1});if(y(s))throw new f.CancelledError;if(s){let d=await J({message:"Enter client ID",validate:(j)=>j&&j.length>0?void 0:"Required"});if(y(d))throw new f.CancelledError;let M=await T({message:"Do you have a client secret?",initialValue:!1});if(y(M))throw new f.CancelledError;let _;if(M){let j=await v({message:"Enter client secret"});if(y(j))throw new f.CancelledError;_=j}n={type:"remote",url:c,oauth:{clientId:d,..._&&{clientSecret:_}}}}else n={type:"remote",url:c,oauth:{}}}else n={type:"remote",url:c,oauth:!1};await R(m,n,i),t.success(`MCP server "${m}" added to ${i}`)}l("MCP server added successfully")}})}});var it=w({command:"list",aliases:["ls"],describe:"list MCP servers and their status",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("MCP Servers");let{config:o,statuses:e,stored:r}=await I(),i=B(o);if(i.length===0){t.warn("No MCP servers configured"),l("Add servers with: qode mcp add");return}for(let[m,p]of i){let c=e[m],u=k(p)&&p.oauth!==!1,n=r[m],s,d,M="";if(!c)s="\u25CB",d="not initialized";else if(c.status==="connected"){if(s="\u2713",d="connected",u&&n)M=" (OAuth)"}else if(c.status==="disabled")s="\u25CB",d="disabled";else if(c.status==="pending")s="\u25CB",d="pending approval";else if(c.status==="needs_auth")s="\u26A0",d="needs authentication";else if(c.status==="needs_client_registration")s="\u2717",d="needs client registration",M=`
2
+ import{Fd as y,Hd as T,Id as t,Jd as O,Kd as l,Md as v,Nd as Q,Od as X,Pd as J}from"./chunk-p62gb4wj.js";import"./chunk-x4sp99g6.js";import{Rd as w}from"./chunk-yajd975f.js";import{Vf as f}from"./chunk-rbk8seme.js";import{Mg as Y,Ng as mt,Og as pt,Pg as st,Qg as et,Rg as ft,Sg as E,gh as q}from"./chunk-caj1b9y7.js";import{Dh as Mt}from"./chunk-ygs5pzk7.js";import"./chunk-vxyy2dp3.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-5hw6xa49.js";import"./chunk-326p5b10.js";import{Dl as F,Wj as nt,bk as L}from"./chunk-257me4z3.js";import"./chunk-nkkch4h7.js";import{lm as $}from"./chunk-s3mnrhbx.js";import"./chunk-ezfy0b6q.js";import"./chunk-bn0h9dny.js";import"./chunk-hnvn2c25.js";import{Kn as P,Ln as h}from"./chunk-3nx7112w.js";import"./chunk-htz93dsd.js";import"./chunk-vcw00k0n.js";import"./chunk-we9cv8we.js";import"./chunk-2hc5z7b5.js";import"./chunk-9gazyynx.js";import"./chunk-4jtxtkj7.js";import"./chunk-ay8emwym.js";import"./chunk-2maqde7w.js";import"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import"./chunk-g5rabwre.js";import"./chunk-jbx3s7nw.js";import"./chunk-15hw2z9t.js";import"./chunk-48ge2ryx.js";import"./chunk-n9xns8by.js";import"./chunk-y9q0hb7b.js";import"./chunk-d9hbhkbq.js";import"./chunk-ad72gb5f.js";import"./chunk-d6ry9418.js";import"./chunk-0dt0bxz6.js";import"./chunk-10bjs581.js";import"./chunk-4cnwn1rh.js";import"./chunk-764fksh3.js";import{Qs as A,Vr as g}from"./chunk-xj765svc.js";import{st as D}from"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-5tray1fw.js";import"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-gagtmjmp.js";import{pH as a}from"./chunk-zs8kqdsf.js";import"./chunk-dxpj0cxh.js";import"./chunk-zw815d68.js";import{BO as ut}from"./chunk-7xm75w1e.js";import W from"path";function G(o){switch(o){case"authenticated":return"\u2713";case"expired":return"\u26A0";case"not_authenticated":return"\u2717"}}function H(o){switch(o){case"authenticated":return"authenticated";case"expired":return"expired";case"not_authenticated":return"not authenticated"}}function N(o){return typeof o==="object"&&o!==null&&"type"in o}function k(o){return N(o)&&o.type==="remote"}function B(o){return Object.entries(o.mcp??{}).filter((e)=>N(e[1]))}function U(o,e){let r=o.mcp_origins?.[e];if(!r)return"qitqode";let i=A.Path.home,m=r.source===i?"~":r.source.startsWith(i+W.sep)?"~"+r.source.slice(i.length):r.source;return`${r.type}:${m}`}function C(o){return B(o).filter((e)=>k(e[1])&&e[1].oauth!==!1)}async function I(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*e.status(),m=yield*a.all(Object.fromEntries(B(r).map(([p])=>[p,e.hasStoredTokens(p)])),{concurrency:"unbounded"});return{config:r,statuses:i,stored:m}}))}async function S(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*a.all(Object.fromEntries(C(r).map(([m])=>[m,e.getAuthStatus(m)])),{concurrency:"unbounded"});return{config:r,auth:i}}))}async function V(o,e=!1){let r=[W.join(o,"qitqode.json"),W.join(o,"qitqode.jsonc")];if(!e)r.push(W.join(o,".qitqode","qitqode.json"),W.join(o,".qitqode","qitqode.jsonc"));for(let i of r)if(await D.exists(i))return i;return r[0]}async function R(o,e,r){let i="{}";if(await D.exists(r))i=await D.readText(r);let m=P(i,["mcp",o],e,{formattingOptions:{tabSize:2,insertSpaces:!0}});return await D.write(r,h(i,m)),r}var tt=ut(Mt(),1);function yt(o){let e=tt.parse(o);if(!e.every((r)=>typeof r==="string"))throw Error("Shell operators are not supported; enter only the command and its arguments");if(e.length===0)throw Error("Command is required");return e}var ot=w({command:"add",describe:"add an MCP server",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("Add MCP server");let o=$.project,[e,r]=await Promise.all([V($.worktree),V(A.Path.config,!0)]),i=r;if(o.vcs==="git"){let c=await X({message:"Location",options:[{label:"Current project",value:e,hint:e},{label:"Global",value:r,hint:r}]});if(y(c))throw new f.CancelledError;i=c}let m=await J({message:"Enter MCP server name",validate:(c)=>c&&c.length>0?void 0:"Required"});if(y(m))throw new f.CancelledError;let p=await X({message:"Select MCP server type",options:[{label:"Local",value:"local",hint:"Run a local command"},{label:"Remote",value:"remote",hint:"Connect to a remote URL"}]});if(y(p))throw new f.CancelledError;if(p==="local"){let c=await J({message:"Enter command to run",placeholder:"e.g., qode x @modelcontextprotocol/server-filesystem",validate:(s)=>s&&s.length>0?void 0:"Required"});if(y(c))throw new f.CancelledError;let u;try{u=yt(c)}catch(s){t.error(s instanceof Error?s.message:"Invalid command"),l("MCP server was not added");return}await R(m,{type:"local",command:u},i),t.success(`MCP server "${m}" added to ${i}`),l("MCP server added successfully");return}if(p==="remote"){let c=await J({message:"Enter MCP server URL",placeholder:"e.g., https://example.com/mcp",validate:(s)=>{if(!s)return"Required";if(s.length===0)return"Required";return URL.canParse(s)?void 0:"Invalid URL"}});if(y(c))throw new f.CancelledError;let u=await T({message:"Does this server require OAuth authentication?",initialValue:!1});if(y(u))throw new f.CancelledError;let n;if(u){let s=await T({message:"Do you have a pre-registered client ID?",initialValue:!1});if(y(s))throw new f.CancelledError;if(s){let d=await J({message:"Enter client ID",validate:(j)=>j&&j.length>0?void 0:"Required"});if(y(d))throw new f.CancelledError;let M=await T({message:"Do you have a client secret?",initialValue:!1});if(y(M))throw new f.CancelledError;let _;if(M){let j=await v({message:"Enter client secret"});if(y(j))throw new f.CancelledError;_=j}n={type:"remote",url:c,oauth:{clientId:d,..._&&{clientSecret:_}}}}else n={type:"remote",url:c,oauth:{}}}else n={type:"remote",url:c,oauth:!1};await R(m,n,i),t.success(`MCP server "${m}" added to ${i}`)}l("MCP server added successfully")}})}});var it=w({command:"list",aliases:["ls"],describe:"list MCP servers and their status",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("MCP Servers");let{config:o,statuses:e,stored:r}=await I(),i=B(o);if(i.length===0){t.warn("No MCP servers configured"),l("Add servers with: qode mcp add");return}for(let[m,p]of i){let c=e[m],u=k(p)&&p.oauth!==!1,n=r[m],s,d,M="";if(!c)s="\u25CB",d="not initialized";else if(c.status==="connected"){if(s="\u2713",d="connected",u&&n)M=" (OAuth)"}else if(c.status==="disabled")s="\u25CB",d="disabled";else if(c.status==="pending")s="\u25CB",d="pending approval";else if(c.status==="needs_auth")s="\u26A0",d="needs authentication";else if(c.status==="needs_client_registration")s="\u2717",d="needs client registration",M=`
3
3
  `+c.error;else s="\u2717",d="failed",M=`
4
4
  `+c.error;let _=p.type==="remote"?L.redactString(p.url):L.redactCommand(p.command).join(" ");t.info(`${s} ${m} ${f.Style.TEXT_DIM}${d} ${U(o,m)}${M}
5
5
  ${f.Style.TEXT_DIM}${_}`)}l(`${i.length} server(s)`)}})}});var dt=w({command:"auth [name]",describe:"authenticate with an OAuth-enabled MCP server",builder:(o)=>o.positional("name",{describe:"name of the MCP server",type:"string"}).command(ct),async handler(o){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("MCP OAuth Authentication");let{config:e,auth:r}=await S(),i=e.mcp??{},m=C(e);if(m.length===0){t.warn("No OAuth-capable MCP servers configured"),t.info("Remote MCP servers support OAuth by default. Add a remote server in qitqode.json:"),t.info(`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{lq as a}from"./chunk-g5rabwre.js";import"./chunk-7xm75w1e.js";export default a();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-7xm75w1e.js";var L="./libopentui-430t0qv0.dylib";export{L as default};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  class M extends Error{name="BackendCallError";status;fn;constructor(j,x,I){super(`backend function call failed (${j}): ${x}${I?` ${I}`:""}`);this.status=j,this.fn=x}}class N extends Error{name="BackendAuthError";status;constructor(j,x){super(`backend authentication rejected (${j})${x?`: ${x}`:""}`);this.status=j}}function Q(j){if(!j)return!1;try{let x=JSON.parse(j);if(x&&x.code==="ERR_GATEWAY_REQUIRED")return!0}catch{}return j.includes("ERR_GATEWAY_REQUIRED")}function S(j){let x=j.fetch??fetch,I=j.baseUrl.replace(/\/+$/,"");async function z(D,P={}){let L=new Headers(j.headers);L.set("content-type","application/json");let H=await x(`${I}/${D}`,{method:"POST",headers:L,body:JSON.stringify(P)});if(!H.ok){let K=await H.text().catch(()=>"");if((H.status===401||H.status===403)&&!Q(K))throw new N(H.status,K||void 0);throw new M(H.status,D,K||void 0)}let J=await H.json();if(!J.success)throw Error(`backend function call returned failure: ${D} \u2014 ${J.error??"unknown error"}`);return J.data}return{promptNames:()=>z("promptNames"),prompt:(D)=>z("prompt",{name:D}),tiers:()=>z("tiers"),workflowSummaries:()=>z("workflowSummaries"),workflowSpec:(D)=>z("workflowSpec",{name:D}),workflowSpecs:()=>z("workflowSpecs"),bashArity:()=>z("bashArity"),toolManifest:()=>z("toolManifest"),toolDescription:(D)=>z("toolDescription",{id:D})}}
3
- export{M as lq,N as mq,Q as nq,S as oq};
3
+ export{M as No,N as Oo,Q as Po,S as Qo};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{se as a}from"./chunk-tvdmnee6.js";import"./chunk-ht5w06x7.js";import"./chunk-enpzvmtc.js";import"./chunk-tq0239xp.js";import"./chunk-7xm75w1e.js";export{a as fromProcess};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{if as a}from"./chunk-8n20thvd.js";import"./chunk-7xm75w1e.js";export default a();
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Dq as wQ,Fq as QQ,Kq as JV,Mq as FQ,Oq as KV,Pq as SV,Rq as PV,Sq as D,Vq as F,Wq as t,Yq as BV,_q as qQ,ar as VQ,br as WQ,cr as xQ,fr as EV,gr as a,ir as UV,jr as BQ,kr as $Q,lr as AV,or as xV,pq as l,qq as zV,uq as UQ,wq as JQ,yq as GV}from"./chunk-yq3m8190.js";import{Br as jV,Dr as YQ,rr as ZV,vr as $V,wr as AQ}from"./chunk-btz9jvec.js";import"./chunk-cqtkxwd8.js";import"./chunk-fkgv2hqd.js";import{qv as Q}from"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-aztre27e.js";var HQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),zQ=UV({errorSchema:HQ,errorToMessage:(V)=>V.error.message});function LV(V){let Y=V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),J=V.startsWith("gpt-4")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-nano")&&!V.startsWith("gpt-5-chat")&&!V.startsWith("gpt-5.4-nano")||V.startsWith("o3")||V.startsWith("o4-mini"),G=V.startsWith("o1")||V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),j=V.startsWith("gpt-5.1")||V.startsWith("gpt-5.2")||V.startsWith("gpt-5.3")||V.startsWith("gpt-5.4");return{supportsFlexProcessing:Y,supportsPriorityProcessing:J,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:j}}function cQ(V){var Y,J,G,j,E,P;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Y=V.prompt_tokens)!=null?Y:0,A=(J=V.completion_tokens)!=null?J:0,O=(j=(G=V.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?j:0,K=(P=(E=V.completion_tokens_details)==null?void 0:E.reasoning_tokens)!=null?P:0;return{inputTokens:{total:$,noCache:$-O,cacheRead:O,cacheWrite:void 0},outputTokens:{total:A,text:A-K,reasoning:K},raw:V}}function HV(V){return JSON.stringify(V===void 0?{}:V)}function MV({prompt:V,systemMessageMode:Y="system"}){var J;let G=[],j=[];for(let{role:E,content:P}of V)switch(E){case"system":{switch(Y){case"system":{G.push({role:"system",content:P});break}case"developer":{G.push({role:"developer",content:P});break}case"remove":{j.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(P.length===1&&P[0].type==="text"){G.push({role:"user",content:P[0].text});break}G.push({role:"user",content:P.map(($,A)=>{var O,K,Z;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let q=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${q};base64,${JQ($.data)}`,detail:(K=(O=$.providerOptions)==null?void 0:O.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new YQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:JQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:JQ($.data),format:"mp3"}};default:throw new YQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new YQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(Z=$.filename)!=null?Z:`part-${A}.pdf`,file_data:`data:application/pdf;base64,${JQ($.data)}`}}}else throw new YQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",A=[];for(let O of P)switch(O.type){case"text":{$+=O.text;break}case"tool-call":{A.push({id:O.toolCallId,type:"function",function:{name:O.toolName,arguments:HV(O.input)}});break}}G.push({role:"assistant",content:$,tool_calls:A.length>0?A:void 0});break}case"tool":{for(let $ of P){if($.type==="tool-approval-response")continue;let A=$.output,O;switch(A.type){case"text":case"error-text":O=A.value;break;case"execution-denied":O=(J=A.reason)!=null?J:"Tool execution denied.";break;case"content":case"json":case"error-json":O=JSON.stringify(A.value);break}G.push({role:"tool",tool_call_id:$.toolCallId,content:O})}break}default:throw Error(`Unsupported role: ${E}`)}return{messages:G,warnings:j}}function LQ({id:V,model:Y,created:J}){return{id:V!=null?V:void 0,modelId:Y!=null?Y:void 0,timestamp:J?new Date(J*1000):void 0}}function vQ(V){switch(V){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var bV=D(()=>F(Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}))),yV=D(()=>F(Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}),HQ]))),RV=D(()=>F(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function kV({tools:V,toolChoice:Y}){V=(V==null?void 0:V.length)?V:void 0;let J=[];if(V==null)return{tools:void 0,toolChoice:void 0,toolWarnings:J};let G=[];for(let E of V)switch(E.type){case"function":G.push({type:"function",function:{name:E.name,description:E.description,parameters:E.inputSchema,...E.strict!=null?{strict:E.strict}:{}}});break;default:J.push({type:"unsupported",feature:`tool type: ${E.type}`});break}if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:J};let j=Y.type;switch(j){case"auto":case"none":case"required":return{tools:G,toolChoice:j,toolWarnings:J};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:J};default:throw new YQ({functionality:`tool choice type: ${j}`})}}var gV=class{constructor(V,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=V,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:V,maxOutputTokens:Y,temperature:J,topP:G,topK:j,frequencyPenalty:E,presencePenalty:P,stopSequences:$,responseFormat:A,seed:O,tools:K,toolChoice:Z,providerOptions:q}){var x,f,y,w,M;let g=[],b=(x=await VQ({provider:"openai",providerOptions:q,schema:RV}))!=null?x:{},n=LV(this.modelId),i=(f=b.forceReasoning)!=null?f:n.isReasoningModel;if(j!=null)g.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=MV({prompt:V,systemMessageMode:(y=b.systemMessageMode)!=null?y:i?"developer":n.systemMessageMode});g.push(...m);let s=(w=b.strictJsonSchema)!=null?w:!0,X={model:this.modelId,logit_bias:b.logitBias,logprobs:b.logprobs===!0||typeof b.logprobs==="number"?!0:void 0,top_logprobs:typeof b.logprobs==="number"?b.logprobs:typeof b.logprobs==="boolean"?b.logprobs?0:void 0:void 0,user:b.user,parallel_tool_calls:b.parallelToolCalls,max_tokens:Y,temperature:J,top_p:G,frequency_penalty:E,presence_penalty:P,response_format:(A==null?void 0:A.type)==="json"?A.schema!=null?{type:"json_schema",json_schema:{schema:A.schema,strict:s,name:(M=A.name)!=null?M:"response",description:A.description}}:{type:"json_object"}:void 0,stop:$,seed:O,verbosity:b.textVerbosity,max_completion_tokens:b.maxCompletionTokens,store:b.store,metadata:b.metadata,prediction:b.prediction,reasoning_effort:b.reasoningEffort,service_tier:b.serviceTier,prompt_cache_key:b.promptCacheKey,prompt_cache_retention:b.promptCacheRetention,safety_identifier:b.safetyIdentifier,messages:p};if(i){if(b.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(X.top_p!=null)X.top_p=void 0,g.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(X.logprobs!=null)X.logprobs=void 0,g.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(X.frequency_penalty!=null)X.frequency_penalty=void 0,g.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(X.presence_penalty!=null)X.presence_penalty=void 0,g.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(X.logit_bias!=null)X.logit_bias=void 0,g.push({type:"other",message:"logitBias is not supported for reasoning models"});if(X.top_logprobs!=null)X.top_logprobs=void 0,g.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(X.max_tokens!=null){if(X.max_completion_tokens==null)X.max_completion_tokens=X.max_tokens;X.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(b.serviceTier==="flex"&&!n.supportsFlexProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),X.service_tier=void 0;if(b.serviceTier==="priority"&&!n.supportsPriorityProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),X.service_tier=void 0;let{tools:u,toolChoice:I,toolWarnings:H}=kV({tools:K,toolChoice:Z});return{args:{...X,tools:u,tool_choice:I},warnings:[...g,...H]}}async doGenerate(V){var Y,J,G,j,E,P,$;let{args:A,warnings:O}=await this.getArgs(V),{responseHeaders:K,value:Z,rawValue:q}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:A,failedResponseHandler:zQ,successfulResponseHandler:$Q(bV),abortSignal:V.abortSignal,fetch:this.config.fetch}),x=Z.choices[0],f=[],y=x.message.content;if(y!=null&&y.length>0)f.push({type:"text",text:y});for(let b of(Y=x.message.tool_calls)!=null?Y:[])f.push({type:"tool-call",toolCallId:(J=b.id)!=null?J:QQ(),toolName:b.function.name,input:b.function.arguments});for(let b of(G=x.message.annotations)!=null?G:[])f.push({type:"source",sourceType:"url",id:QQ(),url:b.url_citation.url,title:b.url_citation.title});let w=(j=Z.usage)==null?void 0:j.completion_tokens_details,M=(E=Z.usage)==null?void 0:E.prompt_tokens_details,g={openai:{}};if((w==null?void 0:w.accepted_prediction_tokens)!=null)g.openai.acceptedPredictionTokens=w==null?void 0:w.accepted_prediction_tokens;if((w==null?void 0:w.rejected_prediction_tokens)!=null)g.openai.rejectedPredictionTokens=w==null?void 0:w.rejected_prediction_tokens;if(((P=x.logprobs)==null?void 0:P.content)!=null)g.openai.logprobs=x.logprobs.content;return{content:f,finishReason:{unified:vQ(x.finish_reason),raw:($=x.finish_reason)!=null?$:void 0},usage:cQ(Z.usage),request:{body:A},response:{...LQ(Z),headers:K,body:q},warnings:O,providerMetadata:g}}async doStream(V){let{args:Y,warnings:J}=await this.getArgs(V),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:j,value:E}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:G,failedResponseHandler:zQ,successfulResponseHandler:BQ(yV),abortSignal:V.abortSignal,fetch:this.config.fetch}),P=[],$={unified:"other",raw:void 0},A=void 0,O=!1,K=!1,Z={openai:{}};return{stream:E.pipeThrough(new TransformStream({start(q){q.enqueue({type:"stream-start",warnings:J})},transform(q,x){var f,y,w,M,g,b,n,i,p,m,s,X,u,I,H,d,e;if(V.includeRawChunks)x.enqueue({type:"raw",rawValue:q.rawValue});if(!q.success){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:q.error});return}let C=q.value;if("error"in C){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:C.error});return}if(!O){let z=LQ(C);if(Object.values(z).some(Boolean))O=!0,x.enqueue({type:"response-metadata",...LQ(C)})}if(C.usage!=null){if(A=C.usage,((f=C.usage.completion_tokens_details)==null?void 0:f.accepted_prediction_tokens)!=null)Z.openai.acceptedPredictionTokens=(y=C.usage.completion_tokens_details)==null?void 0:y.accepted_prediction_tokens;if(((w=C.usage.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens)!=null)Z.openai.rejectedPredictionTokens=(M=C.usage.completion_tokens_details)==null?void 0:M.rejected_prediction_tokens}let k=C.choices[0];if((k==null?void 0:k.finish_reason)!=null)$={unified:vQ(k.finish_reason),raw:k.finish_reason};if(((g=k==null?void 0:k.logprobs)==null?void 0:g.content)!=null)Z.openai.logprobs=k.logprobs.content;if((k==null?void 0:k.delta)==null)return;let L=k.delta;if(L.content!=null){if(!K)x.enqueue({type:"text-start",id:"0"}),K=!0;x.enqueue({type:"text-delta",id:"0",delta:L.content})}if(L.tool_calls!=null)for(let z of L.tool_calls){let T=z.index;if(P[T]==null){if(z.type!=null&&z.type!=="function")throw new AQ({data:z,message:"Expected 'function' type."});if(z.id==null)throw new AQ({data:z,message:"Expected 'id' to be a string."});if(((b=z.function)==null?void 0:b.name)==null)throw new AQ({data:z,message:"Expected 'function.name' to be a string."});x.enqueue({type:"tool-input-start",id:z.id,toolName:z.function.name}),P[T]={id:z.id,type:"function",function:{name:z.function.name,arguments:(n=z.function.arguments)!=null?n:""},hasFinished:!1};let B=P[T];if(((i=B.function)==null?void 0:i.name)!=null&&((p=B.function)==null?void 0:p.arguments)!=null){if(B.function.arguments.length>0)x.enqueue({type:"tool-input-delta",id:B.id,delta:B.function.arguments});if(qQ(B.function.arguments))x.enqueue({type:"tool-input-end",id:B.id}),x.enqueue({type:"tool-call",toolCallId:(m=B.id)!=null?m:QQ(),toolName:B.function.name,input:B.function.arguments}),B.hasFinished=!0}continue}let N=P[T];if(N.hasFinished)continue;if(((s=z.function)==null?void 0:s.arguments)!=null)N.function.arguments+=(u=(X=z.function)==null?void 0:X.arguments)!=null?u:"";if(x.enqueue({type:"tool-input-delta",id:N.id,delta:(I=z.function.arguments)!=null?I:""}),((H=N.function)==null?void 0:H.name)!=null&&((d=N.function)==null?void 0:d.arguments)!=null&&qQ(N.function.arguments))x.enqueue({type:"tool-input-end",id:N.id}),x.enqueue({type:"tool-call",toolCallId:(e=N.id)!=null?e:QQ(),toolName:N.function.name,input:N.function.arguments}),N.hasFinished=!0}if(L.annotations!=null)for(let z of L.annotations)x.enqueue({type:"source",sourceType:"url",id:QQ(),url:z.url_citation.url,title:z.url_citation.title})},flush(q){if(K)q.enqueue({type:"text-end",id:"0"});q.enqueue({type:"finish",finishReason:$,usage:cQ(A),...Z!=null?{providerMetadata:Z}:{}})}})),request:{body:G},response:{headers:j}}}};function nQ(V){var Y,J,G,j;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let E=(Y=V.prompt_tokens)!=null?Y:0,P=(J=V.completion_tokens)!=null?J:0;return{inputTokens:{total:(G=V.prompt_tokens)!=null?G:void 0,noCache:E,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(j=V.completion_tokens)!=null?j:void 0,text:P,reasoning:void 0},raw:V}}function CV({prompt:V,user:Y="user",assistant:J="assistant"}){let G="";if(V[0].role==="system")G+=`${V[0].content}
2
+ import{Ap as qQ,Cp as VQ,Dp as WQ,Ep as xQ,Hp as EV,Ip as a,Kp as UV,Lp as BQ,Mp as $Q,Np as AV,Qp as xV,Ro as l,So as zV,Wo as UQ,Yo as JQ,_o as GV,dp as wQ,fp as QQ,kp as JV,mp as FQ,op as KV,pp as SV,rp as PV,sp as D,vp as F,wp as t,yp as BV}from"./chunk-2maqde7w.js";import{Tp as ZV,Xp as $V,Yp as AQ,bq as jV,dq as YQ}from"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import{St as Q}from"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-7xm75w1e.js";var HQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),zQ=UV({errorSchema:HQ,errorToMessage:(V)=>V.error.message});function LV(V){let Y=V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),J=V.startsWith("gpt-4")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-nano")&&!V.startsWith("gpt-5-chat")&&!V.startsWith("gpt-5.4-nano")||V.startsWith("o3")||V.startsWith("o4-mini"),G=V.startsWith("o1")||V.startsWith("o3")||V.startsWith("o4-mini")||V.startsWith("gpt-5")&&!V.startsWith("gpt-5-chat"),j=V.startsWith("gpt-5.1")||V.startsWith("gpt-5.2")||V.startsWith("gpt-5.3")||V.startsWith("gpt-5.4");return{supportsFlexProcessing:Y,supportsPriorityProcessing:J,isReasoningModel:G,systemMessageMode:G?"developer":"system",supportsNonReasoningParameters:j}}function cQ(V){var Y,J,G,j,E,P;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Y=V.prompt_tokens)!=null?Y:0,A=(J=V.completion_tokens)!=null?J:0,O=(j=(G=V.prompt_tokens_details)==null?void 0:G.cached_tokens)!=null?j:0,K=(P=(E=V.completion_tokens_details)==null?void 0:E.reasoning_tokens)!=null?P:0;return{inputTokens:{total:$,noCache:$-O,cacheRead:O,cacheWrite:void 0},outputTokens:{total:A,text:A-K,reasoning:K},raw:V}}function HV(V){return JSON.stringify(V===void 0?{}:V)}function MV({prompt:V,systemMessageMode:Y="system"}){var J;let G=[],j=[];for(let{role:E,content:P}of V)switch(E){case"system":{switch(Y){case"system":{G.push({role:"system",content:P});break}case"developer":{G.push({role:"developer",content:P});break}case"remove":{j.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Y}`)}break}case"user":{if(P.length===1&&P[0].type==="text"){G.push({role:"user",content:P[0].text});break}G.push({role:"user",content:P.map(($,A)=>{var O,K,Z;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let q=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${q};base64,${JQ($.data)}`,detail:(K=(O=$.providerOptions)==null?void 0:O.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new YQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:JQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:JQ($.data),format:"mp3"}};default:throw new YQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new YQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(Z=$.filename)!=null?Z:`part-${A}.pdf`,file_data:`data:application/pdf;base64,${JQ($.data)}`}}}else throw new YQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",A=[];for(let O of P)switch(O.type){case"text":{$+=O.text;break}case"tool-call":{A.push({id:O.toolCallId,type:"function",function:{name:O.toolName,arguments:HV(O.input)}});break}}G.push({role:"assistant",content:$,tool_calls:A.length>0?A:void 0});break}case"tool":{for(let $ of P){if($.type==="tool-approval-response")continue;let A=$.output,O;switch(A.type){case"text":case"error-text":O=A.value;break;case"execution-denied":O=(J=A.reason)!=null?J:"Tool execution denied.";break;case"content":case"json":case"error-json":O=JSON.stringify(A.value);break}G.push({role:"tool",tool_call_id:$.toolCallId,content:O})}break}default:throw Error(`Unsupported role: ${E}`)}return{messages:G,warnings:j}}function LQ({id:V,model:Y,created:J}){return{id:V!=null?V:void 0,modelId:Y!=null?Y:void 0,timestamp:J?new Date(J*1000):void 0}}function vQ(V){switch(V){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var bV=D(()=>F(Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}))),yV=D(()=>F(Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}),HQ]))),RV=D(()=>F(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function kV({tools:V,toolChoice:Y}){V=(V==null?void 0:V.length)?V:void 0;let J=[];if(V==null)return{tools:void 0,toolChoice:void 0,toolWarnings:J};let G=[];for(let E of V)switch(E.type){case"function":G.push({type:"function",function:{name:E.name,description:E.description,parameters:E.inputSchema,...E.strict!=null?{strict:E.strict}:{}}});break;default:J.push({type:"unsupported",feature:`tool type: ${E.type}`});break}if(Y==null)return{tools:G,toolChoice:void 0,toolWarnings:J};let j=Y.type;switch(j){case"auto":case"none":case"required":return{tools:G,toolChoice:j,toolWarnings:J};case"tool":return{tools:G,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:J};default:throw new YQ({functionality:`tool choice type: ${j}`})}}var gV=class{constructor(V,Y){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=V,this.config=Y}get provider(){return this.config.provider}async getArgs({prompt:V,maxOutputTokens:Y,temperature:J,topP:G,topK:j,frequencyPenalty:E,presencePenalty:P,stopSequences:$,responseFormat:A,seed:O,tools:K,toolChoice:Z,providerOptions:q}){var x,f,y,w,M;let g=[],b=(x=await VQ({provider:"openai",providerOptions:q,schema:RV}))!=null?x:{},n=LV(this.modelId),i=(f=b.forceReasoning)!=null?f:n.isReasoningModel;if(j!=null)g.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=MV({prompt:V,systemMessageMode:(y=b.systemMessageMode)!=null?y:i?"developer":n.systemMessageMode});g.push(...m);let s=(w=b.strictJsonSchema)!=null?w:!0,X={model:this.modelId,logit_bias:b.logitBias,logprobs:b.logprobs===!0||typeof b.logprobs==="number"?!0:void 0,top_logprobs:typeof b.logprobs==="number"?b.logprobs:typeof b.logprobs==="boolean"?b.logprobs?0:void 0:void 0,user:b.user,parallel_tool_calls:b.parallelToolCalls,max_tokens:Y,temperature:J,top_p:G,frequency_penalty:E,presence_penalty:P,response_format:(A==null?void 0:A.type)==="json"?A.schema!=null?{type:"json_schema",json_schema:{schema:A.schema,strict:s,name:(M=A.name)!=null?M:"response",description:A.description}}:{type:"json_object"}:void 0,stop:$,seed:O,verbosity:b.textVerbosity,max_completion_tokens:b.maxCompletionTokens,store:b.store,metadata:b.metadata,prediction:b.prediction,reasoning_effort:b.reasoningEffort,service_tier:b.serviceTier,prompt_cache_key:b.promptCacheKey,prompt_cache_retention:b.promptCacheRetention,safety_identifier:b.safetyIdentifier,messages:p};if(i){if(b.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(X.top_p!=null)X.top_p=void 0,g.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(X.logprobs!=null)X.logprobs=void 0,g.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(X.frequency_penalty!=null)X.frequency_penalty=void 0,g.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(X.presence_penalty!=null)X.presence_penalty=void 0,g.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(X.logit_bias!=null)X.logit_bias=void 0,g.push({type:"other",message:"logitBias is not supported for reasoning models"});if(X.top_logprobs!=null)X.top_logprobs=void 0,g.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(X.max_tokens!=null){if(X.max_completion_tokens==null)X.max_completion_tokens=X.max_tokens;X.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(X.temperature!=null)X.temperature=void 0,g.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(b.serviceTier==="flex"&&!n.supportsFlexProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),X.service_tier=void 0;if(b.serviceTier==="priority"&&!n.supportsPriorityProcessing)g.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),X.service_tier=void 0;let{tools:u,toolChoice:I,toolWarnings:H}=kV({tools:K,toolChoice:Z});return{args:{...X,tools:u,tool_choice:I},warnings:[...g,...H]}}async doGenerate(V){var Y,J,G,j,E,P,$;let{args:A,warnings:O}=await this.getArgs(V),{responseHeaders:K,value:Z,rawValue:q}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:A,failedResponseHandler:zQ,successfulResponseHandler:$Q(bV),abortSignal:V.abortSignal,fetch:this.config.fetch}),x=Z.choices[0],f=[],y=x.message.content;if(y!=null&&y.length>0)f.push({type:"text",text:y});for(let b of(Y=x.message.tool_calls)!=null?Y:[])f.push({type:"tool-call",toolCallId:(J=b.id)!=null?J:QQ(),toolName:b.function.name,input:b.function.arguments});for(let b of(G=x.message.annotations)!=null?G:[])f.push({type:"source",sourceType:"url",id:QQ(),url:b.url_citation.url,title:b.url_citation.title});let w=(j=Z.usage)==null?void 0:j.completion_tokens_details,M=(E=Z.usage)==null?void 0:E.prompt_tokens_details,g={openai:{}};if((w==null?void 0:w.accepted_prediction_tokens)!=null)g.openai.acceptedPredictionTokens=w==null?void 0:w.accepted_prediction_tokens;if((w==null?void 0:w.rejected_prediction_tokens)!=null)g.openai.rejectedPredictionTokens=w==null?void 0:w.rejected_prediction_tokens;if(((P=x.logprobs)==null?void 0:P.content)!=null)g.openai.logprobs=x.logprobs.content;return{content:f,finishReason:{unified:vQ(x.finish_reason),raw:($=x.finish_reason)!=null?$:void 0},usage:cQ(Z.usage),request:{body:A},response:{...LQ(Z),headers:K,body:q},warnings:O,providerMetadata:g}}async doStream(V){let{args:Y,warnings:J}=await this.getArgs(V),G={...Y,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:j,value:E}=await WQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),V.headers),body:G,failedResponseHandler:zQ,successfulResponseHandler:BQ(yV),abortSignal:V.abortSignal,fetch:this.config.fetch}),P=[],$={unified:"other",raw:void 0},A=void 0,O=!1,K=!1,Z={openai:{}};return{stream:E.pipeThrough(new TransformStream({start(q){q.enqueue({type:"stream-start",warnings:J})},transform(q,x){var f,y,w,M,g,b,n,i,p,m,s,X,u,I,H,d,e;if(V.includeRawChunks)x.enqueue({type:"raw",rawValue:q.rawValue});if(!q.success){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:q.error});return}let C=q.value;if("error"in C){$={unified:"error",raw:void 0},x.enqueue({type:"error",error:C.error});return}if(!O){let z=LQ(C);if(Object.values(z).some(Boolean))O=!0,x.enqueue({type:"response-metadata",...LQ(C)})}if(C.usage!=null){if(A=C.usage,((f=C.usage.completion_tokens_details)==null?void 0:f.accepted_prediction_tokens)!=null)Z.openai.acceptedPredictionTokens=(y=C.usage.completion_tokens_details)==null?void 0:y.accepted_prediction_tokens;if(((w=C.usage.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens)!=null)Z.openai.rejectedPredictionTokens=(M=C.usage.completion_tokens_details)==null?void 0:M.rejected_prediction_tokens}let k=C.choices[0];if((k==null?void 0:k.finish_reason)!=null)$={unified:vQ(k.finish_reason),raw:k.finish_reason};if(((g=k==null?void 0:k.logprobs)==null?void 0:g.content)!=null)Z.openai.logprobs=k.logprobs.content;if((k==null?void 0:k.delta)==null)return;let L=k.delta;if(L.content!=null){if(!K)x.enqueue({type:"text-start",id:"0"}),K=!0;x.enqueue({type:"text-delta",id:"0",delta:L.content})}if(L.tool_calls!=null)for(let z of L.tool_calls){let T=z.index;if(P[T]==null){if(z.type!=null&&z.type!=="function")throw new AQ({data:z,message:"Expected 'function' type."});if(z.id==null)throw new AQ({data:z,message:"Expected 'id' to be a string."});if(((b=z.function)==null?void 0:b.name)==null)throw new AQ({data:z,message:"Expected 'function.name' to be a string."});x.enqueue({type:"tool-input-start",id:z.id,toolName:z.function.name}),P[T]={id:z.id,type:"function",function:{name:z.function.name,arguments:(n=z.function.arguments)!=null?n:""},hasFinished:!1};let B=P[T];if(((i=B.function)==null?void 0:i.name)!=null&&((p=B.function)==null?void 0:p.arguments)!=null){if(B.function.arguments.length>0)x.enqueue({type:"tool-input-delta",id:B.id,delta:B.function.arguments});if(qQ(B.function.arguments))x.enqueue({type:"tool-input-end",id:B.id}),x.enqueue({type:"tool-call",toolCallId:(m=B.id)!=null?m:QQ(),toolName:B.function.name,input:B.function.arguments}),B.hasFinished=!0}continue}let N=P[T];if(N.hasFinished)continue;if(((s=z.function)==null?void 0:s.arguments)!=null)N.function.arguments+=(u=(X=z.function)==null?void 0:X.arguments)!=null?u:"";if(x.enqueue({type:"tool-input-delta",id:N.id,delta:(I=z.function.arguments)!=null?I:""}),((H=N.function)==null?void 0:H.name)!=null&&((d=N.function)==null?void 0:d.arguments)!=null&&qQ(N.function.arguments))x.enqueue({type:"tool-input-end",id:N.id}),x.enqueue({type:"tool-call",toolCallId:(e=N.id)!=null?e:QQ(),toolName:N.function.name,input:N.function.arguments}),N.hasFinished=!0}if(L.annotations!=null)for(let z of L.annotations)x.enqueue({type:"source",sourceType:"url",id:QQ(),url:z.url_citation.url,title:z.url_citation.title})},flush(q){if(K)q.enqueue({type:"text-end",id:"0"});q.enqueue({type:"finish",finishReason:$,usage:cQ(A),...Z!=null?{providerMetadata:Z}:{}})}})),request:{body:G},response:{headers:j}}}};function nQ(V){var Y,J,G,j;if(V==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let E=(Y=V.prompt_tokens)!=null?Y:0,P=(J=V.completion_tokens)!=null?J:0;return{inputTokens:{total:(G=V.prompt_tokens)!=null?G:void 0,noCache:E,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(j=V.completion_tokens)!=null?j:void 0,text:P,reasoning:void 0},raw:V}}function CV({prompt:V,user:Y="user",assistant:J="assistant"}){let G="";if(V[0].role==="system")G+=`${V[0].content}
3
3
 
4
4
  `,V=V.slice(1);for(let{role:j,content:E}of V)switch(j){case"system":throw new $V({message:"Unexpected system message in prompt: ${content}",prompt:V});case"user":{let P=E.map(($)=>{switch($.type){case"text":return $.text}}).filter(Boolean).join("");G+=`${Y}:
5
5
  ${P}
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{rf as u}from"./chunk-qhc90p4a.js";import{aQ as Q,dQ as Kq}from"./chunk-aztre27e.js";var D=Q((iq,j)=>{var{defineProperty:X,getOwnPropertyDescriptor:r,getOwnPropertyNames:o}=Object,a=Object.prototype.hasOwnProperty,t=(q,z)=>X(q,"name",{value:z,configurable:!0}),qq=(q,z)=>{for(var G in z)X(q,G,{get:z[G],enumerable:!0})},zq=(q,z,G,K)=>{if(z&&typeof z==="object"||typeof z==="function"){for(let I of o(z))if(!a.call(q,I)&&I!==G)X(q,I,{get:()=>z[I],enumerable:!(K=r(z,I))||K.enumerable})}return q},Gq=(q)=>zq(X({},"__esModule",{value:!0}),q),J={};qq(J,{isArrayBuffer:()=>Iq});j.exports=Gq(J);var Iq=t((q)=>typeof ArrayBuffer==="function"&&q instanceof ArrayBuffer||Object.prototype.toString.call(q)==="[object ArrayBuffer]","isArrayBuffer")});var O=Q((dq,R)=>{var{defineProperty:Y,getOwnPropertyDescriptor:Qq,getOwnPropertyNames:Vq}=Object,Wq=Object.prototype.hasOwnProperty,E=(q,z)=>Y(q,"name",{value:z,configurable:!0}),Xq=(q,z)=>{for(var G in z)Y(q,G,{get:z[G],enumerable:!0})},Yq=(q,z,G,K)=>{if(z&&typeof z==="object"||typeof z==="function"){for(let I of Vq(z))if(!Wq.call(q,I)&&I!==G)Y(q,I,{get:()=>z[I],enumerable:!(K=Qq(z,I))||K.enumerable})}return q},Zq=(q)=>Yq(Y({},"__esModule",{value:!0}),q),L={};Xq(L,{fromArrayBuffer:()=>Nq,fromString:()=>Fq});R.exports=Zq(L);var $q=D(),$=Kq("buffer"),Nq=E((q,z=0,G=q.byteLength-z)=>{if(!(0,$q.isArrayBuffer)(q))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof q} (${q})`);return $.Buffer.from(q,z,G)},"fromArrayBuffer"),Fq=E((q,z)=>{if(typeof q!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof q} (${q})`);return z?$.Buffer.from(q,z):$.Buffer.from(q)},"fromString")});var A=Q((mq,h)=>{var{defineProperty:Z,getOwnPropertyDescriptor:Hq,getOwnPropertyNames:Bq}=Object,Jq=Object.prototype.hasOwnProperty,N=(q,z)=>Z(q,"name",{value:z,configurable:!0}),jq=(q,z)=>{for(var G in z)Z(q,G,{get:z[G],enumerable:!0})},Dq=(q,z,G,K)=>{if(z&&typeof z==="object"||typeof z==="function"){for(let I of Bq(z))if(!Jq.call(q,I)&&I!==G)Z(q,I,{get:()=>z[I],enumerable:!(K=Hq(z,I))||K.enumerable})}return q},Eq=(q)=>Dq(Z({},"__esModule",{value:!0}),q),v={};jq(v,{fromUtf8:()=>S,toUint8Array:()=>Lq,toUtf8:()=>Rq});h.exports=Eq(v);var M=O(),S=N((q)=>{let z=(0,M.fromString)(q,"utf8");return new Uint8Array(z.buffer,z.byteOffset,z.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Lq=N((q)=>{if(typeof q==="string")return S(q);if(ArrayBuffer.isView(q))return new Uint8Array(q.buffer,q.byteOffset,q.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(q)},"toUint8Array"),Rq=N((q)=>{if(typeof q==="string")return q;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,M.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("utf8")},"toUtf8")});var w=Q((C)=>{Object.defineProperty(C,"__esModule",{value:!0});C.convertToBuffer=void 0;var Oq=A(),vq=typeof Buffer<"u"&&Buffer.from?function(q){return Buffer.from(q,"utf8")}:Oq.fromUtf8;function Mq(q){if(q instanceof Uint8Array)return q;if(typeof q==="string")return vq(q);if(ArrayBuffer.isView(q))return new Uint8Array(q.buffer,q.byteOffset,q.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(q)}C.convertToBuffer=Mq});var U=Q((P)=>{Object.defineProperty(P,"__esModule",{value:!0});P.isEmptyData=void 0;function Sq(q){if(typeof q==="string")return q.length===0;return q.byteLength===0}P.isEmptyData=Sq});var y=Q((b)=>{Object.defineProperty(b,"__esModule",{value:!0});b.numToUint8=void 0;function hq(q){return new Uint8Array([(q&4278190080)>>24,(q&16711680)>>16,(q&65280)>>8,q&255])}b.numToUint8=hq});var l=Q((x)=>{Object.defineProperty(x,"__esModule",{value:!0});x.uint32ArrayFrom=void 0;function Aq(q){if(!Uint32Array.from){var z=new Uint32Array(q.length),G=0;while(G<q.length)z[G]=q[G],G+=1;return z}return Uint32Array.from(q)}x.uint32ArrayFrom=Aq});var F=Q((V)=>{Object.defineProperty(V,"__esModule",{value:!0});V.uint32ArrayFrom=V.numToUint8=V.isEmptyData=V.convertToBuffer=void 0;var Cq=w();Object.defineProperty(V,"convertToBuffer",{enumerable:!0,get:function(){return Cq.convertToBuffer}});var Tq=U();Object.defineProperty(V,"isEmptyData",{enumerable:!0,get:function(){return Tq.isEmptyData}});var wq=y();Object.defineProperty(V,"numToUint8",{enumerable:!0,get:function(){return wq.numToUint8}});var Pq=l();Object.defineProperty(V,"uint32ArrayFrom",{enumerable:!0,get:function(){return Pq.uint32ArrayFrom}})});var m=Q((i)=>{Object.defineProperty(i,"__esModule",{value:!0});i.AwsCrc32=void 0;var s=u(),H=F(),f=n(),Uq=function(){function q(){this.crc32=new f.Crc32}return q.prototype.update=function(z){if((0,H.isEmptyData)(z))return;this.crc32.update((0,H.convertToBuffer)(z))},q.prototype.digest=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(z){return[2,(0,H.numToUint8)(this.crc32.digest())]})})},q.prototype.reset=function(){this.crc32=new f.Crc32},q}();i.AwsCrc32=Uq});var n=Q((B)=>{Object.defineProperty(B,"__esModule",{value:!0});B.AwsCrc32=B.Crc32=B.crc32=void 0;var bq=u(),gq=F();function yq(q){return new p().update(q).digest()}B.crc32=yq;var p=function(){function q(){this.checksum=4294967295}return q.prototype.update=function(z){var G,K;try{for(var I=bq.__values(z),W=I.next();!W.done;W=I.next()){var _=W.value;this.checksum=this.checksum>>>8^cq[(this.checksum^_)&255]}}catch(e){G={error:e}}finally{try{if(W&&!W.done&&(K=I.return))K.call(I)}finally{if(G)throw G.error}}return this},q.prototype.digest=function(){return(this.checksum^4294967295)>>>0},q}();B.Crc32=p;var xq=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],cq=(0,gq.uint32ArrayFrom)(xq),lq=m();Object.defineProperty(B,"AwsCrc32",{enumerable:!0,get:function(){return lq.AwsCrc32}})});
2
+ import{rf as u}from"./chunk-93p131d5.js";import{CO as Q,FO as Kq}from"./chunk-7xm75w1e.js";var D=Q((iq,j)=>{var{defineProperty:X,getOwnPropertyDescriptor:r,getOwnPropertyNames:o}=Object,a=Object.prototype.hasOwnProperty,t=(q,z)=>X(q,"name",{value:z,configurable:!0}),qq=(q,z)=>{for(var G in z)X(q,G,{get:z[G],enumerable:!0})},zq=(q,z,G,K)=>{if(z&&typeof z==="object"||typeof z==="function"){for(let I of o(z))if(!a.call(q,I)&&I!==G)X(q,I,{get:()=>z[I],enumerable:!(K=r(z,I))||K.enumerable})}return q},Gq=(q)=>zq(X({},"__esModule",{value:!0}),q),J={};qq(J,{isArrayBuffer:()=>Iq});j.exports=Gq(J);var Iq=t((q)=>typeof ArrayBuffer==="function"&&q instanceof ArrayBuffer||Object.prototype.toString.call(q)==="[object ArrayBuffer]","isArrayBuffer")});var O=Q((dq,R)=>{var{defineProperty:Y,getOwnPropertyDescriptor:Qq,getOwnPropertyNames:Vq}=Object,Wq=Object.prototype.hasOwnProperty,E=(q,z)=>Y(q,"name",{value:z,configurable:!0}),Xq=(q,z)=>{for(var G in z)Y(q,G,{get:z[G],enumerable:!0})},Yq=(q,z,G,K)=>{if(z&&typeof z==="object"||typeof z==="function"){for(let I of Vq(z))if(!Wq.call(q,I)&&I!==G)Y(q,I,{get:()=>z[I],enumerable:!(K=Qq(z,I))||K.enumerable})}return q},Zq=(q)=>Yq(Y({},"__esModule",{value:!0}),q),L={};Xq(L,{fromArrayBuffer:()=>Nq,fromString:()=>Fq});R.exports=Zq(L);var $q=D(),$=Kq("buffer"),Nq=E((q,z=0,G=q.byteLength-z)=>{if(!(0,$q.isArrayBuffer)(q))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof q} (${q})`);return $.Buffer.from(q,z,G)},"fromArrayBuffer"),Fq=E((q,z)=>{if(typeof q!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof q} (${q})`);return z?$.Buffer.from(q,z):$.Buffer.from(q)},"fromString")});var A=Q((mq,h)=>{var{defineProperty:Z,getOwnPropertyDescriptor:Hq,getOwnPropertyNames:Bq}=Object,Jq=Object.prototype.hasOwnProperty,N=(q,z)=>Z(q,"name",{value:z,configurable:!0}),jq=(q,z)=>{for(var G in z)Z(q,G,{get:z[G],enumerable:!0})},Dq=(q,z,G,K)=>{if(z&&typeof z==="object"||typeof z==="function"){for(let I of Bq(z))if(!Jq.call(q,I)&&I!==G)Z(q,I,{get:()=>z[I],enumerable:!(K=Hq(z,I))||K.enumerable})}return q},Eq=(q)=>Dq(Z({},"__esModule",{value:!0}),q),v={};jq(v,{fromUtf8:()=>S,toUint8Array:()=>Lq,toUtf8:()=>Rq});h.exports=Eq(v);var M=O(),S=N((q)=>{let z=(0,M.fromString)(q,"utf8");return new Uint8Array(z.buffer,z.byteOffset,z.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Lq=N((q)=>{if(typeof q==="string")return S(q);if(ArrayBuffer.isView(q))return new Uint8Array(q.buffer,q.byteOffset,q.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(q)},"toUint8Array"),Rq=N((q)=>{if(typeof q==="string")return q;if(typeof q!=="object"||typeof q.byteOffset!=="number"||typeof q.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,M.fromArrayBuffer)(q.buffer,q.byteOffset,q.byteLength).toString("utf8")},"toUtf8")});var w=Q((C)=>{Object.defineProperty(C,"__esModule",{value:!0});C.convertToBuffer=void 0;var Oq=A(),vq=typeof Buffer<"u"&&Buffer.from?function(q){return Buffer.from(q,"utf8")}:Oq.fromUtf8;function Mq(q){if(q instanceof Uint8Array)return q;if(typeof q==="string")return vq(q);if(ArrayBuffer.isView(q))return new Uint8Array(q.buffer,q.byteOffset,q.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(q)}C.convertToBuffer=Mq});var U=Q((P)=>{Object.defineProperty(P,"__esModule",{value:!0});P.isEmptyData=void 0;function Sq(q){if(typeof q==="string")return q.length===0;return q.byteLength===0}P.isEmptyData=Sq});var y=Q((b)=>{Object.defineProperty(b,"__esModule",{value:!0});b.numToUint8=void 0;function hq(q){return new Uint8Array([(q&4278190080)>>24,(q&16711680)>>16,(q&65280)>>8,q&255])}b.numToUint8=hq});var l=Q((x)=>{Object.defineProperty(x,"__esModule",{value:!0});x.uint32ArrayFrom=void 0;function Aq(q){if(!Uint32Array.from){var z=new Uint32Array(q.length),G=0;while(G<q.length)z[G]=q[G],G+=1;return z}return Uint32Array.from(q)}x.uint32ArrayFrom=Aq});var F=Q((V)=>{Object.defineProperty(V,"__esModule",{value:!0});V.uint32ArrayFrom=V.numToUint8=V.isEmptyData=V.convertToBuffer=void 0;var Cq=w();Object.defineProperty(V,"convertToBuffer",{enumerable:!0,get:function(){return Cq.convertToBuffer}});var Tq=U();Object.defineProperty(V,"isEmptyData",{enumerable:!0,get:function(){return Tq.isEmptyData}});var wq=y();Object.defineProperty(V,"numToUint8",{enumerable:!0,get:function(){return wq.numToUint8}});var Pq=l();Object.defineProperty(V,"uint32ArrayFrom",{enumerable:!0,get:function(){return Pq.uint32ArrayFrom}})});var m=Q((i)=>{Object.defineProperty(i,"__esModule",{value:!0});i.AwsCrc32=void 0;var s=u(),H=F(),f=n(),Uq=function(){function q(){this.crc32=new f.Crc32}return q.prototype.update=function(z){if((0,H.isEmptyData)(z))return;this.crc32.update((0,H.convertToBuffer)(z))},q.prototype.digest=function(){return s.__awaiter(this,void 0,void 0,function(){return s.__generator(this,function(z){return[2,(0,H.numToUint8)(this.crc32.digest())]})})},q.prototype.reset=function(){this.crc32=new f.Crc32},q}();i.AwsCrc32=Uq});var n=Q((B)=>{Object.defineProperty(B,"__esModule",{value:!0});B.AwsCrc32=B.Crc32=B.crc32=void 0;var bq=u(),gq=F();function yq(q){return new p().update(q).digest()}B.crc32=yq;var p=function(){function q(){this.checksum=4294967295}return q.prototype.update=function(z){var G,K;try{for(var I=bq.__values(z),W=I.next();!W.done;W=I.next()){var _=W.value;this.checksum=this.checksum>>>8^cq[(this.checksum^_)&255]}}catch(e){G={error:e}}finally{try{if(W&&!W.done&&(K=I.return))K.call(I)}finally{if(G)throw G.error}}return this},q.prototype.digest=function(){return(this.checksum^4294967295)>>>0},q}();B.Crc32=p;var xq=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],cq=(0,gq.uint32ArrayFrom)(xq),lq=m();Object.defineProperty(B,"AwsCrc32",{enumerable:!0,get:function(){return lq.AwsCrc32}})});
3
3
  export{n as qf};