@qitqode/qitqode-android-arm64 0.2.13 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/bundle/{chunk-9c0f79mt.js → chunk-00ft63qn.js} +1 -1
  2. package/bundle/chunk-00r3he5x.js +2 -0
  3. package/bundle/{chunk-vr7525pa.js → chunk-02tmc2st.js} +1 -1
  4. package/bundle/{chunk-81mwbcy3.js → chunk-05bkxat0.js} +2 -2
  5. package/bundle/{chunk-ewde5bss.js → chunk-06tgmvh6.js} +2 -2
  6. package/bundle/{chunk-etvwxwn3.js → chunk-07b4pkk6.js} +1 -1
  7. package/bundle/{chunk-wqm1vawg.js → chunk-0ejx0yqx.js} +1 -1
  8. package/bundle/chunk-0ks20gz1.js +2 -0
  9. package/bundle/{chunk-2md5fz4f.js → chunk-0m4gvjcv.js} +2 -2
  10. package/bundle/{chunk-jf4zyy7r.js → chunk-0mztgsxp.js} +1 -1
  11. package/bundle/{chunk-7bvh48s2.js → chunk-10kj86va.js} +1 -1
  12. package/bundle/{chunk-b46t2315.js → chunk-10q04xh5.js} +1 -1
  13. package/bundle/{chunk-dwjv3m5s.js → chunk-175720ws.js} +2 -2
  14. package/bundle/{chunk-xgphhnpk.js → chunk-19rs84t8.js} +1 -1
  15. package/bundle/{chunk-ajykvcas.js → chunk-1a08ffyd.js} +1 -1
  16. package/bundle/{chunk-hsmtjb4d.js → chunk-1bq15kf0.js} +2 -2
  17. package/bundle/{chunk-1sejtx9a.js → chunk-1e75j4m1.js} +2 -2
  18. package/bundle/{chunk-c1srcpfk.js → chunk-1gdt9q05.js} +1 -1
  19. package/bundle/{chunk-3be70hxy.js → chunk-1mfdmm2t.js} +1 -1
  20. package/bundle/{chunk-dmgdwvn1.js → chunk-1pft3sar.js} +1 -1
  21. package/bundle/chunk-1r7anzk5.js +2 -0
  22. package/bundle/{chunk-rr94dpe9.js → chunk-1ypzf18e.js} +1 -1
  23. package/bundle/chunk-26e51217.js +2 -0
  24. package/bundle/{chunk-bd4krah7.js → chunk-2ascwm7j.js} +1 -1
  25. package/bundle/{chunk-q7wc3frq.js → chunk-2d61z24r.js} +1 -1
  26. package/bundle/chunk-2g4kxtz0.js +2 -0
  27. package/bundle/chunk-2jzay8a9.js +2 -0
  28. package/bundle/{chunk-5828bcp8.js → chunk-2k2szpze.js} +1 -1
  29. package/bundle/chunk-2q78bdtj.js +2 -0
  30. package/bundle/{chunk-jrh028na.js → chunk-2w3n0q9m.js} +2 -2
  31. package/bundle/{chunk-sv27ep93.js → chunk-2w79k0mh.js} +2 -2
  32. package/bundle/chunk-30rghawe.js +2 -0
  33. package/bundle/{chunk-jt94rhev.js → chunk-3152y1q9.js} +1 -1
  34. package/bundle/{chunk-1851skhm.js → chunk-31a47ptm.js} +1 -1
  35. package/bundle/chunk-33mzqyyb.js +3 -0
  36. package/bundle/chunk-34yk99ep.js +2 -0
  37. package/bundle/{chunk-2p1qaqv3.js → chunk-358wdvj7.js} +2 -2
  38. package/bundle/{chunk-fqzfytjk.js → chunk-3c73rngn.js} +1 -1
  39. package/bundle/{chunk-wspm2k19.js → chunk-3cs1qf8x.js} +1 -1
  40. package/bundle/chunk-3dajnr1w.js +2 -0
  41. package/bundle/chunk-3ege6krg.js +2 -0
  42. package/bundle/chunk-43vpxggb.js +2 -0
  43. package/bundle/{chunk-aq75kv5f.js → chunk-47jkx37s.js} +3 -3
  44. package/bundle/{chunk-hcd0k14e.js → chunk-48rg4yhk.js} +2 -2
  45. package/bundle/chunk-49y7zg15.js +2 -0
  46. package/bundle/{chunk-qa38xchd.js → chunk-4hvenszg.js} +1 -1
  47. package/bundle/{chunk-msbe5rb7.js → chunk-4p9fny77.js} +1 -1
  48. package/bundle/{chunk-g6ffx794.js → chunk-4ppw719f.js} +1 -1
  49. package/bundle/{chunk-g0x6q2ks.js → chunk-4r7fbkcm.js} +1 -1
  50. package/bundle/{chunk-5fbzvy6q.js → chunk-4s1n38ds.js} +2 -2
  51. package/bundle/{chunk-z6qb4gt5.js → chunk-4v29ayke.js} +1 -1
  52. package/bundle/{chunk-gvc1mqrs.js → chunk-4xqwt6dr.js} +2 -2
  53. package/bundle/{chunk-1bhcg889.js → chunk-4ycg2c6f.js} +2 -2
  54. package/bundle/{chunk-pzn7cade.js → chunk-5341jv20.js} +1 -1
  55. package/bundle/{chunk-eefzbdbk.js → chunk-583d91xq.js} +2 -2
  56. package/bundle/{chunk-z6f54x4k.js → chunk-5cwy8y78.js} +2 -2
  57. package/bundle/{chunk-6g3bzap8.js → chunk-5dvy83ms.js} +2 -2
  58. package/bundle/{chunk-ff031crt.js → chunk-5h1s0akp.js} +1 -1
  59. package/bundle/{chunk-tn0sfsks.js → chunk-5mf4qrye.js} +2 -2
  60. package/bundle/{chunk-0mdmqtfr.js → chunk-5q98z8ck.js} +2 -2
  61. package/bundle/chunk-5qhsfjzq.js +3 -0
  62. package/bundle/{chunk-y9kjt2jj.js → chunk-5rvvfgfy.js} +2 -2
  63. package/bundle/chunk-5xxn06g0.js +2 -0
  64. package/bundle/{chunk-2d0vympj.js → chunk-61b81z2h.js} +1 -1
  65. package/bundle/{chunk-4enhsmq1.js → chunk-62gefpwn.js} +2 -2
  66. package/bundle/{chunk-2h8b0csf.js → chunk-674pexjx.js} +2 -2
  67. package/bundle/{chunk-4ar8hey8.js → chunk-69htq8kq.js} +1 -1
  68. package/bundle/{chunk-h1p3xcfp.js → chunk-69k7cdtv.js} +2 -2
  69. package/bundle/{chunk-53n3tfwn.js → chunk-6cztstry.js} +2 -2
  70. package/bundle/{chunk-ba2hn77m.js → chunk-6d4xc6br.js} +1 -1
  71. package/bundle/{chunk-vqxyk6as.js → chunk-6dd2dx69.js} +2 -2
  72. package/bundle/{chunk-eftk07r3.js → chunk-6j53vtzd.js} +1 -1
  73. package/bundle/{chunk-yzxcjr6y.js → chunk-6kch0q2d.js} +2 -2
  74. package/bundle/{chunk-sn15skh8.js → chunk-6pt6nqwk.js} +1 -1
  75. package/bundle/{chunk-r9hsd9pw.js → chunk-6wmtbebc.js} +1 -1
  76. package/bundle/{chunk-3fx3eghq.js → chunk-6y0wgz2j.js} +1 -1
  77. package/bundle/{chunk-vvmvryh1.js → chunk-6yshpz0z.js} +2 -2
  78. package/bundle/{chunk-2ts2s8b4.js → chunk-71jmhvef.js} +2 -2
  79. package/bundle/{chunk-9xbc558j.js → chunk-73a7ts8r.js} +1 -1
  80. package/bundle/{chunk-5rtsnnjk.js → chunk-7a4sb6q7.js} +1 -1
  81. package/bundle/chunk-7cp30q0t.js +2 -0
  82. package/bundle/{chunk-d4ys15w3.js → chunk-7s9msscb.js} +1 -1
  83. package/bundle/{chunk-v30fmrz0.js → chunk-7w571q26.js} +1 -1
  84. package/bundle/chunk-7xc73qb1.js +2 -0
  85. package/bundle/{chunk-m18pxkdg.js → chunk-840mmmzz.js} +4 -4
  86. package/bundle/{chunk-jcn8bg31.js → chunk-86reb44c.js} +1 -1
  87. package/bundle/{chunk-hnbtfpb7.js → chunk-86sfzgnf.js} +1 -1
  88. package/bundle/{chunk-v9yxkbz7.js → chunk-8a9sj8gp.js} +1 -1
  89. package/bundle/{chunk-404ew3d3.js → chunk-8b9z8j3z.js} +1 -1
  90. package/bundle/{chunk-0cjp9088.js → chunk-8gkz5550.js} +1 -1
  91. package/bundle/chunk-8gz8fk6r.js +2 -0
  92. package/bundle/chunk-8ht7cq3h.js +2 -0
  93. package/bundle/{chunk-dpm5x19e.js → chunk-8jkqyf9n.js} +2 -2
  94. package/bundle/{chunk-3rcfy8te.js → chunk-8qpfphdz.js} +1 -1
  95. package/bundle/chunk-8qv0119d.js +2 -0
  96. package/bundle/{chunk-t1hw67x4.js → chunk-8zpsgfb6.js} +1 -1
  97. package/bundle/{chunk-c99npyz9.js → chunk-96sra8g8.js} +1 -1
  98. package/bundle/{chunk-nn2hbew8.js → chunk-99df6wvm.js} +1 -1
  99. package/bundle/{chunk-5wjwzbk8.js → chunk-9amnqaeq.js} +1 -1
  100. package/bundle/{chunk-z1psybn1.js → chunk-9gxyt2ay.js} +2 -2
  101. package/bundle/{chunk-hk8m8vax.js → chunk-9kc2th5c.js} +2 -2
  102. package/bundle/chunk-9m0eawt5.js +2 -0
  103. package/bundle/{chunk-fj87htwn.js → chunk-9mabvb06.js} +1 -1
  104. package/bundle/chunk-9thgxbze.js +2 -0
  105. package/bundle/{chunk-xn6mwsc9.js → chunk-9ttebtcf.js} +1 -1
  106. package/bundle/{chunk-gdawpkxs.js → chunk-9z7y4x7q.js} +1 -1
  107. package/bundle/{chunk-xgdst5n5.js → chunk-9znfb8f2.js} +2 -2
  108. package/bundle/chunk-9zsp3qkh.js +2 -0
  109. package/bundle/{chunk-mfg4stzn.js → chunk-a1mbach4.js} +1 -1
  110. package/bundle/chunk-a32y70fe.js +2 -0
  111. package/bundle/{chunk-hgcnzsd5.js → chunk-a3g8de96.js} +1 -1
  112. package/bundle/{chunk-bydaqb08.js → chunk-a8askx4y.js} +1 -1
  113. package/bundle/{chunk-gcpwm7b5.js → chunk-adws0hhk.js} +2 -2
  114. package/bundle/{chunk-1rw4srd1.js → chunk-ae1g5y4r.js} +1 -1
  115. package/bundle/{chunk-y5m9c5ek.js → chunk-ahgb3r1c.js} +2 -2
  116. package/bundle/{chunk-6p848y99.js → chunk-art8gejd.js} +1 -1
  117. package/bundle/{chunk-eh73j82b.js → chunk-avksqxan.js} +1 -1
  118. package/bundle/chunk-avzaqy6a.js +2 -0
  119. package/bundle/chunk-az12tp53.js +2 -0
  120. package/bundle/{chunk-gjmxrz0v.js → chunk-b350g18y.js} +2 -2
  121. package/bundle/chunk-b5dpzcc7.js +2 -0
  122. package/bundle/chunk-bcgtqx3g.js +2 -0
  123. package/bundle/{chunk-0w77vhg4.js → chunk-bdcd2mcb.js} +2 -2
  124. package/bundle/chunk-bde5d507.js +2 -0
  125. package/bundle/{chunk-139qfnsq.js → chunk-bemyyen3.js} +1 -1
  126. package/bundle/{chunk-84712kbe.js → chunk-bga4kqd1.js} +2 -2
  127. package/bundle/{chunk-4s9d2zte.js → chunk-bm8azfnt.js} +1 -1
  128. package/bundle/{chunk-1bbx1da7.js → chunk-bmdqb48f.js} +1 -1
  129. package/bundle/{chunk-bpv378bm.js → chunk-bq6cvf16.js} +2 -2
  130. package/bundle/{chunk-t66gerft.js → chunk-bxnsrggq.js} +1 -1
  131. package/bundle/{chunk-2b80n6nx.js → chunk-bzh71a92.js} +1 -1
  132. package/bundle/chunk-bzzggc3s.js +2 -0
  133. package/bundle/{chunk-78rfz0ex.js → chunk-c5cyt23k.js} +2 -2
  134. package/bundle/chunk-c8qx439t.js +2 -0
  135. package/bundle/{chunk-t1e52h0k.js → chunk-ch7s512a.js} +1 -1
  136. package/bundle/{chunk-jmrqp50k.js → chunk-chnr7pe5.js} +1 -1
  137. package/bundle/chunk-ckw51fn6.js +2 -0
  138. package/bundle/{chunk-1rafe6f5.js → chunk-crqycrs4.js} +2 -2
  139. package/bundle/{chunk-z2cnd2cp.js → chunk-d10qre1b.js} +1 -1
  140. package/bundle/{chunk-v6djkm35.js → chunk-d385e2qt.js} +1 -1
  141. package/bundle/{chunk-paqy0c2v.js → chunk-d4faz5xa.js} +1 -1
  142. package/bundle/{chunk-8xbd0ra5.js → chunk-d7h1dp0h.js} +1 -1
  143. package/bundle/chunk-denp0wrq.js +2 -0
  144. package/bundle/chunk-depxzjer.js +2 -0
  145. package/bundle/chunk-dhvqpcf3.js +2 -0
  146. package/bundle/chunk-dkqqswbv.js +2 -0
  147. package/bundle/{chunk-e4658j15.js → chunk-dmb0ez0m.js} +3 -3
  148. package/bundle/{chunk-47pxz6cb.js → chunk-dn0437c1.js} +2 -2
  149. package/bundle/{chunk-es6vbsjg.js → chunk-dvp0r93q.js} +1 -1
  150. package/bundle/{chunk-374js0y6.js → chunk-e18hshcg.js} +1 -1
  151. package/bundle/chunk-e5t7jsxa.js +2 -0
  152. package/bundle/{chunk-wac35a6p.js → chunk-e611m0p4.js} +1 -1
  153. package/bundle/{chunk-4krmja97.js → chunk-e8s4mp5n.js} +2 -2
  154. package/bundle/chunk-eb811dt2.js +2 -0
  155. package/bundle/{chunk-95ga21eq.js → chunk-edvfqxfr.js} +1 -1
  156. package/bundle/{chunk-yhe5qz48.js → chunk-ej0yzstw.js} +2 -2
  157. package/bundle/{chunk-7p8f8xav.js → chunk-ep4drmt9.js} +1 -1
  158. package/bundle/{chunk-xaewye8w.js → chunk-eqsank84.js} +1 -1
  159. package/bundle/{chunk-s7ypkpg2.js → chunk-et3tgx7t.js} +1 -1
  160. package/bundle/{chunk-trg0zg0q.js → chunk-f0dp1tf9.js} +1 -1
  161. package/bundle/chunk-fbz2xv2w.js +2 -0
  162. package/bundle/{chunk-cv3xdp8q.js → chunk-fd04358e.js} +375 -305
  163. package/bundle/{chunk-mbma071k.js → chunk-fdmz0502.js} +2 -2
  164. package/bundle/{chunk-mrh5q4s6.js → chunk-ffx0cr44.js} +2 -2
  165. package/bundle/{chunk-e6s8ep9m.js → chunk-ffyj5nsg.js} +2 -2
  166. package/bundle/{chunk-2bfq0mtx.js → chunk-ffz334ab.js} +1 -1
  167. package/bundle/{chunk-9a9qcvtz.js → chunk-fkq0v5qv.js} +2 -2
  168. package/bundle/{chunk-mp5m0acf.js → chunk-fmcg649e.js} +1 -1
  169. package/bundle/{chunk-g3y5kvg6.js → chunk-fp2xgnjn.js} +2 -2
  170. package/bundle/{chunk-rqdfmbns.js → chunk-fpzkyzny.js} +2 -2
  171. package/bundle/{chunk-yg5azmxb.js → chunk-g738e799.js} +2 -2
  172. package/bundle/{chunk-1exjy880.js → chunk-g77kddrs.js} +2 -2
  173. package/bundle/chunk-gbvcb4k1.js +2 -0
  174. package/bundle/{chunk-mgff8bcx.js → chunk-gd0j16gn.js} +1 -1
  175. package/bundle/chunk-gdtnqzbp.js +2 -0
  176. package/bundle/{chunk-hrfdrz36.js → chunk-gfvq78gy.js} +1 -1
  177. package/bundle/{chunk-h2vtypa5.js → chunk-gkf7x1yj.js} +1 -1
  178. package/bundle/chunk-gkfvhh28.js +2 -0
  179. package/bundle/chunk-gnh8c49b.js +2 -0
  180. package/bundle/chunk-gvf6ek9f.js +2 -0
  181. package/bundle/chunk-gvx5hmhk.js +2 -0
  182. package/bundle/{chunk-1f9qcrn6.js → chunk-h036zy9e.js} +2 -2
  183. package/bundle/{chunk-zhddj91f.js → chunk-hf39qx6t.js} +2 -2
  184. package/bundle/chunk-hham7r33.js +2 -0
  185. package/bundle/{chunk-map852em.js → chunk-hrcqbadm.js} +1 -1
  186. package/bundle/chunk-hsjbe5zy.js +2 -0
  187. package/bundle/{chunk-fbd971t7.js → chunk-hx13a8es.js} +3 -3
  188. package/bundle/{chunk-04x4b2yy.js → chunk-j15wejz0.js} +1 -1
  189. package/bundle/{chunk-08mgb5tt.js → chunk-j1bv93m4.js} +12 -10
  190. package/bundle/{chunk-5es19n1m.js → chunk-j2snkw45.js} +2 -2
  191. package/bundle/{chunk-z66xdxkg.js → chunk-j3agzs13.js} +2 -2
  192. package/bundle/{chunk-4wzv2v36.js → chunk-j45p2v4a.js} +3 -3
  193. package/bundle/{chunk-094m66q5.js → chunk-j46bxb1b.js} +1 -1
  194. package/bundle/{chunk-5e0vejcb.js → chunk-jvvctqjd.js} +2 -2
  195. package/bundle/chunk-jvx7jtm4.js +3 -0
  196. package/bundle/{chunk-0ware2sh.js → chunk-jwv6fda1.js} +2 -2
  197. package/bundle/{chunk-1gt6ppza.js → chunk-k0chq88p.js} +1 -1
  198. package/bundle/chunk-k6gdmqff.js +2 -0
  199. package/bundle/{chunk-8t17w67q.js → chunk-k769v1ds.js} +1 -1
  200. package/bundle/{chunk-ycth54ja.js → chunk-kdqhwa65.js} +1 -1
  201. package/bundle/{chunk-8hrt4d0v.js → chunk-ky3fhz9z.js} +1 -1
  202. package/bundle/chunk-kzkb4648.js +2 -0
  203. package/bundle/chunk-m2540waa.js +2 -0
  204. package/bundle/{chunk-hp9q7vvq.js → chunk-m6967jtv.js} +2 -2
  205. package/bundle/{chunk-7h0regqs.js → chunk-m8kjtp60.js} +1 -1
  206. package/bundle/{chunk-q65qzc9w.js → chunk-mbmaeq0a.js} +1 -1
  207. package/bundle/{chunk-anm5g0m4.js → chunk-meehnnv9.js} +2 -2
  208. package/bundle/{chunk-k3x6z5q1.js → chunk-mjkwd1sz.js} +1 -1
  209. package/bundle/chunk-mscvm1rm.js +2 -0
  210. package/bundle/chunk-mw3hh526.js +2 -0
  211. package/bundle/chunk-n3nsrk5n.js +2 -0
  212. package/bundle/{chunk-rf9pjbg3.js → chunk-n6pn4f3r.js} +1 -1
  213. package/bundle/{chunk-wrkt670m.js → chunk-n7zd97hy.js} +2 -2
  214. package/bundle/chunk-n9nmc4q4.js +2 -0
  215. package/bundle/{chunk-p3tcw42f.js → chunk-nb4xtk1n.js} +1 -1
  216. package/bundle/{chunk-hd6sd912.js → chunk-ngygp66y.js} +1 -1
  217. package/bundle/chunk-nj4as8vy.js +2 -0
  218. package/bundle/chunk-nrzca9yd.js +2 -0
  219. package/bundle/chunk-nxm6gpyv.js +2 -0
  220. package/bundle/{chunk-5gv6r7v8.js → chunk-nyxn7npc.js} +1 -1
  221. package/bundle/{chunk-mhn0a828.js → chunk-nzz7gzg2.js} +1 -1
  222. package/bundle/{chunk-y9mxwwz7.js → chunk-p0852vfn.js} +2 -2
  223. package/bundle/{chunk-xrb46v1e.js → chunk-p4xqfkbh.js} +1 -1
  224. package/bundle/{chunk-7nh8vjx4.js → chunk-pdcxmr6x.js} +1 -1
  225. package/bundle/{chunk-6wt8g6mc.js → chunk-pp10epga.js} +2 -2
  226. package/bundle/{chunk-w264gs2c.js → chunk-prz2fkn9.js} +1 -1
  227. package/bundle/{chunk-d2049chz.js → chunk-psmwrvqs.js} +2 -2
  228. package/bundle/{chunk-4d9s7cgr.js → chunk-pwq2f75j.js} +1 -1
  229. package/bundle/{chunk-5psekq9f.js → chunk-pwrwb7mn.js} +1 -1
  230. package/bundle/{chunk-1wy8wmah.js → chunk-px69995t.js} +1 -1
  231. package/bundle/{chunk-pfen4ekj.js → chunk-q1dmxn63.js} +2 -2
  232. package/bundle/chunk-qbjqkezn.js +2 -0
  233. package/bundle/chunk-qhtp1xvx.js +2 -0
  234. package/bundle/chunk-qkztgpay.js +2 -0
  235. package/bundle/{chunk-x0wy15q9.js → chunk-qn1fhqyw.js} +2 -2
  236. package/bundle/{chunk-rwt0rwvn.js → chunk-qpggztkq.js} +2 -2
  237. package/bundle/{chunk-n73ckwr7.js → chunk-qpk7jp6t.js} +1 -1
  238. package/bundle/{chunk-71naz1qp.js → chunk-qqsj69m2.js} +1 -1
  239. package/bundle/{chunk-7k1q26yn.js → chunk-qrztx1b4.js} +2 -2
  240. package/bundle/{chunk-xpz5mnwz.js → chunk-qz20b42s.js} +1 -1
  241. package/bundle/{chunk-dzy3ezht.js → chunk-rd08wx37.js} +2 -2
  242. package/bundle/{chunk-mqtj38j9.js → chunk-rn3je2hv.js} +1 -1
  243. package/bundle/chunk-rnf3dy0y.js +2 -0
  244. package/bundle/{chunk-72qx43fq.js → chunk-rqap90xh.js} +2 -2
  245. package/bundle/chunk-rry4kq85.js +2 -0
  246. package/bundle/{chunk-5a4zt1b7.js → chunk-rws2tsdv.js} +1 -1
  247. package/bundle/{chunk-r65zw08x.js → chunk-rx9eh3db.js} +3 -3
  248. package/bundle/{chunk-tzw56029.js → chunk-rxt6gktt.js} +1 -1
  249. package/bundle/chunk-ryfj80q6.js +2 -0
  250. package/bundle/{chunk-ec1bwa7f.js → chunk-s0gmxpxm.js} +2 -2
  251. package/bundle/{chunk-8psfgg8y.js → chunk-s9epttpy.js} +1 -1
  252. package/bundle/{chunk-gtmtvjwc.js → chunk-sb3cgb4v.js} +1 -1
  253. package/bundle/{chunk-p863r97y.js → chunk-set1f1wr.js} +1 -1
  254. package/bundle/{chunk-zgj7jx8k.js → chunk-sg9enzsp.js} +2 -2
  255. package/bundle/{chunk-0xf12tf3.js → chunk-sh03ka27.js} +1 -1
  256. package/bundle/chunk-snx49w8h.js +2 -0
  257. package/bundle/{chunk-610mqqqa.js → chunk-spcdwmy4.js} +1 -1
  258. package/bundle/{chunk-ydz7387e.js → chunk-sy76e7nr.js} +1 -1
  259. package/bundle/{chunk-csbndz33.js → chunk-szfqmkj6.js} +1 -1
  260. package/bundle/chunk-t21mdqbb.js +2 -0
  261. package/bundle/{chunk-t7gp6mjm.js → chunk-tcyzj3rz.js} +1 -1
  262. package/bundle/chunk-tn2yyqeb.js +2 -0
  263. package/bundle/chunk-ttebf3nt.js +2 -0
  264. package/bundle/chunk-twpfh0mx.js +2 -0
  265. package/bundle/{chunk-a4242cn4.js → chunk-tz1bzrnh.js} +1 -1
  266. package/bundle/chunk-tzf6d5qy.js +2 -0
  267. package/bundle/{chunk-hzzvmr41.js → chunk-v1axkp21.js} +2 -2
  268. package/bundle/chunk-v2mq09wx.js +2 -0
  269. package/bundle/chunk-v59a02aj.js +2 -0
  270. package/bundle/{chunk-8rbbt1s8.js → chunk-v5me0cj9.js} +1 -1
  271. package/bundle/{chunk-gw2fz5ry.js → chunk-v7v0krrj.js} +1 -1
  272. package/bundle/{chunk-9r6wk75s.js → chunk-veptx3fk.js} +1 -1
  273. package/bundle/chunk-vnstr4g1.js +2 -0
  274. package/bundle/{chunk-vvcyvdnk.js → chunk-vr13f6b5.js} +2 -2
  275. package/bundle/chunk-vxr4rzt0.js +2 -0
  276. package/bundle/{chunk-fmvmp278.js → chunk-vzkdzhn0.js} +1 -1
  277. package/bundle/chunk-w0h9rczg.js +2 -0
  278. package/bundle/{chunk-6jb4mnvq.js → chunk-w136zswr.js} +3 -3
  279. package/bundle/chunk-w214dwws.js +2 -0
  280. package/bundle/{chunk-mchf2bcc.js → chunk-w4fr00s7.js} +2 -2
  281. package/bundle/chunk-w8344et5.js +2 -0
  282. package/bundle/{chunk-b274mb6v.js → chunk-w8nj5ph5.js} +1 -1
  283. package/bundle/chunk-weyg78et.js +2 -0
  284. package/bundle/{chunk-6kpk6pr3.js → chunk-wf0n1cs9.js} +1 -1
  285. package/bundle/{chunk-00krzh3y.js → chunk-wfpnv00c.js} +2 -2
  286. package/bundle/{chunk-9h2fms7x.js → chunk-wmj3xndt.js} +1 -1
  287. package/bundle/{chunk-wwtyrgga.js → chunk-wrzn87w0.js} +1 -1
  288. package/bundle/{chunk-npryn3en.js → chunk-ws720v4j.js} +1 -1
  289. package/bundle/{chunk-t4kma6mq.js → chunk-x0de4z05.js} +2 -2
  290. package/bundle/{chunk-qqftaqza.js → chunk-x3dzzq0t.js} +1 -1
  291. package/bundle/{chunk-45dtsre6.js → chunk-x4jnyj09.js} +1 -1
  292. package/bundle/chunk-xchj8gna.js +2 -0
  293. package/bundle/{chunk-s81ck6bw.js → chunk-xdcwx384.js} +1 -1
  294. package/bundle/{chunk-yqvqzg7b.js → chunk-xmf59618.js} +1 -1
  295. package/bundle/chunk-y18ptwk2.js +2 -0
  296. package/bundle/{chunk-z4gczap3.js → chunk-y1v7mf1a.js} +9 -9
  297. package/bundle/chunk-y3dpyz2d.js +2 -0
  298. package/bundle/{chunk-h9tcpbr7.js → chunk-y5ydtbpd.js} +1 -1
  299. package/bundle/{chunk-vzj91hg8.js → chunk-yg9n2a2d.js} +1 -1
  300. package/bundle/chunk-ykvgmje9.js +35 -0
  301. package/bundle/chunk-yvjecrjy.js +2 -0
  302. package/bundle/chunk-yw2x6by6.js +2 -0
  303. package/bundle/{chunk-962hspr0.js → chunk-z0dj15g9.js} +1 -1
  304. package/bundle/chunk-z0r4syk8.js +2 -0
  305. package/bundle/{chunk-1q5h95hc.js → chunk-z6qyx227.js} +1 -1
  306. package/bundle/chunk-z7c00g63.js +2 -0
  307. package/bundle/{chunk-tks3qzsw.js → chunk-zgwasq3p.js} +1 -1
  308. package/bundle/{chunk-6dmk2eyt.js → chunk-zh7e6kqs.js} +1 -1
  309. package/bundle/{chunk-4q14whpc.js → chunk-zjyaze0d.js} +1 -1
  310. package/bundle/chunk-znr0saas.js +2 -0
  311. package/bundle/{chunk-e0w082wt.js → chunk-zpjtse0z.js} +184 -184
  312. package/bundle/chunk-zqqt7v17.js +2 -0
  313. package/bundle/chunk-zwrgh1hc.js +2 -0
  314. package/bundle/{chunk-821zkh5v.js → chunk-zx63mepv.js} +1 -1
  315. package/bundle/index.js +3 -3
  316. package/bundle/parser.worker.js +2 -2
  317. package/bundle/worker.js +1 -1
  318. package/package.json +1 -1
  319. package/bundle/chunk-0nves64y.js +0 -2
  320. package/bundle/chunk-0v7knkt5.js +0 -2
  321. package/bundle/chunk-1h5jdsgx.js +0 -2
  322. package/bundle/chunk-1r5e1jsb.js +0 -2
  323. package/bundle/chunk-1wyy3c48.js +0 -2
  324. package/bundle/chunk-1z299xq6.js +0 -2
  325. package/bundle/chunk-21aqt31s.js +0 -2
  326. package/bundle/chunk-22aq9ymg.js +0 -2
  327. package/bundle/chunk-26a17c9z.js +0 -2
  328. package/bundle/chunk-2a154mr0.js +0 -2
  329. package/bundle/chunk-2nbce486.js +0 -2
  330. package/bundle/chunk-2npxatq9.js +0 -2
  331. package/bundle/chunk-3gryj9r9.js +0 -2
  332. package/bundle/chunk-3jnanbjr.js +0 -2
  333. package/bundle/chunk-3meh1cbc.js +0 -2
  334. package/bundle/chunk-3t71xfr6.js +0 -2
  335. package/bundle/chunk-4045jzv5.js +0 -2
  336. package/bundle/chunk-4b2vv484.js +0 -2
  337. package/bundle/chunk-4ene1ymj.js +0 -2
  338. package/bundle/chunk-58r5etg8.js +0 -2
  339. package/bundle/chunk-5c2zw4h0.js +0 -2
  340. package/bundle/chunk-608f83n0.js +0 -2
  341. package/bundle/chunk-671r50ry.js +0 -2
  342. package/bundle/chunk-6bfnhr3d.js +0 -2
  343. package/bundle/chunk-6cv6d8rw.js +0 -2
  344. package/bundle/chunk-6qm6f88j.js +0 -2
  345. package/bundle/chunk-78bfwwmc.js +0 -2
  346. package/bundle/chunk-7wwtgxxf.js +0 -2
  347. package/bundle/chunk-98sb49dz.js +0 -2
  348. package/bundle/chunk-9kbtpq9m.js +0 -2
  349. package/bundle/chunk-9szp9b4m.js +0 -2
  350. package/bundle/chunk-9xqszq0c.js +0 -2
  351. package/bundle/chunk-a32kjs9e.js +0 -2
  352. package/bundle/chunk-apym02ct.js +0 -2
  353. package/bundle/chunk-armv2rv5.js +0 -2
  354. package/bundle/chunk-as215v64.js +0 -2
  355. package/bundle/chunk-bnmpgpyf.js +0 -2
  356. package/bundle/chunk-bq3zt1x1.js +0 -2
  357. package/bundle/chunk-bx8fgjam.js +0 -2
  358. package/bundle/chunk-ckcnb59t.js +0 -2
  359. package/bundle/chunk-d79xaj6s.js +0 -3
  360. package/bundle/chunk-dah2d37s.js +0 -2
  361. package/bundle/chunk-dhgjv1n2.js +0 -2
  362. package/bundle/chunk-dk9k8ff5.js +0 -2
  363. package/bundle/chunk-dymysn4h.js +0 -2
  364. package/bundle/chunk-ev4gw5k6.js +0 -2
  365. package/bundle/chunk-ew2dxm43.js +0 -2
  366. package/bundle/chunk-ffp4wg27.js +0 -2
  367. package/bundle/chunk-hjy90gt2.js +0 -2
  368. package/bundle/chunk-hmden934.js +0 -2
  369. package/bundle/chunk-hsm8fbb1.js +0 -2
  370. package/bundle/chunk-hz1xfedb.js +0 -2
  371. package/bundle/chunk-ja9y478k.js +0 -2
  372. package/bundle/chunk-jam7xyjf.js +0 -2
  373. package/bundle/chunk-k51qphrk.js +0 -2
  374. package/bundle/chunk-kee7xpe3.js +0 -2
  375. package/bundle/chunk-p13eeqe4.js +0 -2
  376. package/bundle/chunk-p45f2nyb.js +0 -2
  377. package/bundle/chunk-qvwx32p9.js +0 -35
  378. package/bundle/chunk-qw9whsy2.js +0 -2
  379. package/bundle/chunk-r77kpzdv.js +0 -2
  380. package/bundle/chunk-rc95tp19.js +0 -2
  381. package/bundle/chunk-rmh2fhqy.js +0 -2
  382. package/bundle/chunk-rrn86a8w.js +0 -2
  383. package/bundle/chunk-s8v0h63x.js +0 -2
  384. package/bundle/chunk-sh4mngre.js +0 -2
  385. package/bundle/chunk-shqqngm8.js +0 -2
  386. package/bundle/chunk-sjfcwykr.js +0 -2
  387. package/bundle/chunk-sv01v0n0.js +0 -2
  388. package/bundle/chunk-tn8hsd2c.js +0 -2
  389. package/bundle/chunk-tqsx7w8z.js +0 -2
  390. package/bundle/chunk-tyt1negg.js +0 -2
  391. package/bundle/chunk-v580zwpf.js +0 -3
  392. package/bundle/chunk-vdv6cyh0.js +0 -2
  393. package/bundle/chunk-vsk8yfxp.js +0 -2
  394. package/bundle/chunk-vvgmkjym.js +0 -2
  395. package/bundle/chunk-vzf04vad.js +0 -2
  396. package/bundle/chunk-w0zyex7f.js +0 -2
  397. package/bundle/chunk-w623r5kb.js +0 -3
  398. package/bundle/chunk-wkxt9v7s.js +0 -2
  399. package/bundle/chunk-wwf6zacw.js +0 -2
  400. package/bundle/chunk-x9c8eddk.js +0 -2
  401. package/bundle/chunk-xjed8t2h.js +0 -2
  402. package/bundle/chunk-xxhta1tm.js +0 -2
  403. package/bundle/chunk-yhj6858v.js +0 -2
  404. package/bundle/chunk-yq3byrpv.js +0 -2
  405. package/bundle/chunk-ys8ajwys.js +0 -2
  406. package/bundle/chunk-yzt7p956.js +0 -2
  407. package/bundle/chunk-z56cb3fs.js +0 -2
  408. package/bundle/chunk-zhypknyg.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{He as Qb}from"./chunk-e6s8ep9m.js";import{Le as Xb}from"./chunk-2md5fz4f.js";import{Me as Wb}from"./chunk-h1p3xcfp.js";import{Ne as Jb,Oe as Kb,Pe as Lb}from"./chunk-6jb4mnvq.js";import{Qe as Db}from"./chunk-ec1bwa7f.js";import{Cf as bb,Df as jb,Ef as kb,Ff as wb,Gf as Bb}from"./chunk-hcd0k14e.js";import"./chunk-0xf12tf3.js";var K=Lb(),V=Kb(),D=jb(),J=kb(),H=wb(),M=Db(),G=Jb(),P=bb(),E=Qb(),Z=Bb(),m=Wb(),Yb=Xb(),Zb=async(b,j,k)=>{return{operation:D.getSmithyContext(j).operation,region:await D.normalizeProvider(b.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Hb(b){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:b.region},propertiesExtractor:(j,k)=>({signingProperties:{config:j,context:k}})}}function Gb(b){return{schemeId:"smithy.api#noAuth"}}var zb=(b)=>{let j=[];switch(b.operation){case"GetRoleCredentials":{j.push(Gb());break}default:j.push(Hb(b))}return j},Fb=(b)=>{let j=E.resolveAwsSdkSigV4Config(b);return Object.assign(j,{authSchemePreference:D.normalizeProvider(b.authSchemePreference??[])})},Ib=(b)=>{return Object.assign(b,{useDualstackEndpoint:b.useDualstackEndpoint??!1,useFipsEndpoint:b.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},Nb={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Ub="3.997.14",Vb={version:Ub},z="ref",W=-1,N=!0,S="isSet",a="PartitionResult",U="booleanEquals",A="getAttr",h={[z]:"Endpoint"},v={[z]:a},Y={},p=[{[z]:"Region"}],u={conditions:[[S,[h]],[S,p],["aws.partition",p,a],[U,[{[z]:"UseFIPS"},N]],[U,[{[z]:"UseDualStack"},N]],[U,[{fn:A,argv:[v,"supportsDualStack"]},N]],[U,[{fn:A,argv:[v,"supportsFIPS"]},N]],["stringEquals",[{fn:A,argv:[v,"name"]},"aws-us-gov"]]],results:[[W],[W,"Invalid Configuration: FIPS and custom endpoint are not supported"],[W,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[h,Y],["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Y],[W,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://portal.sso.{Region}.amazonaws.com",Y],["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",Y],[W,"FIPS is enabled but this partition does not support FIPS"],["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",Y],[W,"DualStack is enabled but this partition does not support DualStack"],["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",Y],[W,"Invalid Configuration: Missing Region"]]},Mb=2,B=1e8,qb=new Int32Array([-1,1,-1,0,13,3,1,4,B+12,2,5,B+12,3,8,6,4,7,B+11,5,B+9,B+10,4,11,9,6,10,B+8,7,B+6,B+7,5,12,B+5,6,B+4,B+5,3,B+1,14,4,B+2,B+3]),Tb=H.BinaryDecisionDiagram.from(qb,Mb,u.conditions,u.results),yb=new H.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ob=(b,j={})=>{return yb.get(b,()=>H.decideEndpoint(Tb,{endpointParams:b,logger:j.logger}))};H.customEndpointFunctions.aws=K.awsEndpointFunctions;class X extends D.ServiceException{constructor(b){super(b);Object.setPrototypeOf(this,X.prototype)}}class l extends X{name="InvalidRequestException";$fault="client";constructor(b){super({name:"InvalidRequestException",$fault:"client",...b});Object.setPrototypeOf(this,l.prototype)}}class x extends X{name="ResourceNotFoundException";$fault="client";constructor(b){super({name:"ResourceNotFoundException",$fault:"client",...b});Object.setPrototypeOf(this,x.prototype)}}class C extends X{name="TooManyRequestsException";$fault="client";constructor(b){super({name:"TooManyRequestsException",$fault:"client",...b});Object.setPrototypeOf(this,C.prototype)}}class $ extends X{name="UnauthorizedException";$fault="client";constructor(b){super({name:"UnauthorizedException",$fault:"client",...b});Object.setPrototypeOf(this,$.prototype)}}var Rb="AccessTokenType",Ab="GetRoleCredentials",vb="GetRoleCredentialsRequest",Pb="GetRoleCredentialsResponse",Eb="InvalidRequestException",lb="RoleCredentials",xb="ResourceNotFoundException",Cb="SecretAccessKeyType",$b="SessionTokenType",_b="TooManyRequestsException",db="UnauthorizedException",mb="accountId",Sb="accessKeyId",hb="accessToken",pb="account_id",q="client",T="error",ub="expiration",sb="http",y="httpError",ab="httpHeader",s="httpQuery",O="message",rb="roleCredentials",gb="roleName",fb="role_name",r="smithy.ts.sdk.synthetic.com.amazonaws.sso",cb="secretAccessKey",tb="sessionToken",eb="x-amz-sso_bearer_token",L="com.amazonaws.sso",g=P.TypeRegistry.for(r),ib=[-3,r,"SSOServiceException",0,[],[]];g.registerError(ib,X);var F=P.TypeRegistry.for(L),nb=[-3,L,Eb,{[T]:q,[y]:400},[O],[0]];F.registerError(nb,l);var ob=[-3,L,xb,{[T]:q,[y]:404},[O],[0]];F.registerError(ob,x);var bj=[-3,L,_b,{[T]:q,[y]:429},[O],[0]];F.registerError(bj,C);var jj=[-3,L,db,{[T]:q,[y]:401},[O],[0]];F.registerError(jj,$);var kj=[g,F],wj=[0,L,Rb,8,0],Bj=[0,L,Cb,8,0],Dj=[0,L,$b,8,0],Jj=[3,L,vb,0,[gb,mb,hb],[[0,{[s]:fb}],[0,{[s]:pb}],[()=>wj,{[ab]:eb}]],3],Kj=[3,L,Pb,0,[rb],[[()=>Lj,0]]],Lj=[3,L,lb,0,[Sb,cb,tb,ub],[0,[()=>Bj,0],[()=>Dj,0],1]],Qj=[9,L,Ab,{[sb]:["GET","/federation/credentials",200]},()=>Jj,()=>Kj],Wj=(b)=>{return{apiVersion:"2019-06-10",base64Decoder:b?.base64Decoder??Z.fromBase64,base64Encoder:b?.base64Encoder??Z.toBase64,disableHostPrefix:b?.disableHostPrefix??!1,endpointProvider:b?.endpointProvider??Ob,extensions:b?.extensions??[],httpAuthSchemeProvider:b?.httpAuthSchemeProvider??zb,httpAuthSchemes:b?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(j)=>j.getIdentityProvider("aws.auth#sigv4"),signer:new E.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(j)=>j.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new V.NoAuthSigner}],logger:b?.logger??new D.NoOpLogger,protocol:b?.protocol??Yb.AwsRestJsonProtocol,protocolSettings:b?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:kj,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:b?.serviceId??"SSO",urlParser:b?.urlParser??M.parseUrl,utf8Decoder:b?.utf8Decoder??Z.fromUtf8,utf8Encoder:b?.utf8Encoder??Z.toUtf8}},Xj=(b)=>{D.emitWarningIfUnsupportedVersion(process.version);let j=J.resolveDefaultsModeConfig(b),k=()=>j().then(D.loadConfigsForDefaultMode),Q=Wj(b);K.emitWarningIfUnsupportedVersion(process.version);let w={profile:b?.profile,logger:Q.logger};return{...Q,...b,runtime:"node",defaultsMode:j,authSchemePreference:b?.authSchemePreference??J.loadConfig(E.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,w),bodyLengthChecker:b?.bodyLengthChecker??Z.calculateBodyLength,defaultUserAgentProvider:b?.defaultUserAgentProvider??K.createDefaultUserAgentProvider({serviceId:Q.serviceId,clientVersion:Vb.version}),maxAttempts:b?.maxAttempts??J.loadConfig(G.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,b),region:b?.region??J.loadConfig(J.NODE_REGION_CONFIG_OPTIONS,{...J.NODE_REGION_CONFIG_FILE_OPTIONS,...w}),requestHandler:m.NodeHttpHandler.create(b?.requestHandler??k),retryMode:b?.retryMode??J.loadConfig({...G.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await k()).retryMode||G.DEFAULT_RETRY_MODE},b),sha256:b?.sha256??Z.Hash.bind(null,"sha256"),streamCollector:b?.streamCollector??m.streamCollector,useDualstackEndpoint:b?.useDualstackEndpoint??J.loadConfig(J.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,w),useFipsEndpoint:b?.useFipsEndpoint??J.loadConfig(J.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,w),userAgentAppId:b?.userAgentAppId??J.loadConfig(K.NODE_APP_ID_CONFIG_OPTIONS,w)}},Yj=(b)=>{let{httpAuthSchemes:j,httpAuthSchemeProvider:k,credentials:Q}=b;return{setHttpAuthScheme(w){let I=j.findIndex((R)=>R.schemeId===w.schemeId);if(I===-1)j.push(w);else j.splice(I,1,w)},httpAuthSchemes(){return j},setHttpAuthSchemeProvider(w){k=w},httpAuthSchemeProvider(){return k},setCredentials(w){Q=w},credentials(){return Q}}},Zj=(b)=>{return{httpAuthSchemes:b.httpAuthSchemes(),httpAuthSchemeProvider:b.httpAuthSchemeProvider(),credentials:b.credentials()}},Hj=(b,j)=>{let k=Object.assign(K.getAwsRegionExtensionConfiguration(b),D.getDefaultExtensionConfiguration(b),M.getHttpHandlerExtensionConfiguration(b),Yj(b));return j.forEach((Q)=>Q.configure(k)),Object.assign(b,K.resolveAwsRegionExtensionConfiguration(k),D.resolveDefaultRuntimeConfig(k),M.resolveHttpHandlerRuntimeConfig(k),Zj(k))};class _ extends D.Client{config;constructor(...[b]){let j=Xj(b||{});super(j);this.initConfig=j;let k=Ib(j),Q=K.resolveUserAgentConfig(k),w=G.resolveRetryConfig(Q),I=J.resolveRegionConfig(w),R=K.resolveHostHeaderConfig(I),e=H.resolveEndpointConfig(R),i=Fb(e),n=Hj(i,b?.extensions||[]);this.config=n,this.middlewareStack.use(P.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(K.getUserAgentPlugin(this.config)),this.middlewareStack.use(G.getRetryPlugin(this.config)),this.middlewareStack.use(M.getContentLengthPlugin(this.config)),this.middlewareStack.use(K.getHostHeaderPlugin(this.config)),this.middlewareStack.use(K.getLoggerPlugin(this.config)),this.middlewareStack.use(K.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(V.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Zb,identityProviderConfigProvider:async(o)=>new V.DefaultIdentityProviderConfig({"aws.auth#sigv4":o.credentials})})),this.middlewareStack.use(V.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class d extends D.Command.classBuilder().ep(Nb).m(function(b,j,k,Q){return[H.getEndpointPlugin(k,b.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(Qj).build(){}var Gj={GetRoleCredentialsCommand:d};class f extends _{}D.createAggregatedClient(Gj,f);var{Command:zj,Client:Fj}=D;var c=d;var t=_;export{t as SSOClient,c as GetRoleCredentialsCommand};
2
+ import{Je as Qb}from"./chunk-ffyj5nsg.js";import{Ne as Xb}from"./chunk-0m4gvjcv.js";import{Oe as Wb}from"./chunk-69k7cdtv.js";import{Pe as Jb,Qe as Kb,Re as Lb}from"./chunk-w136zswr.js";import{Se as Db}from"./chunk-s0gmxpxm.js";import{Ef as bb,Ff as jb,Gf as kb,Hf as wb,If as Bb}from"./chunk-48rg4yhk.js";import"./chunk-sh03ka27.js";var K=Lb(),V=Kb(),D=jb(),J=kb(),H=wb(),M=Db(),G=Jb(),P=bb(),E=Qb(),Z=Bb(),m=Wb(),Yb=Xb(),Zb=async(b,j,k)=>{return{operation:D.getSmithyContext(j).operation,region:await D.normalizeProvider(b.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Hb(b){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:b.region},propertiesExtractor:(j,k)=>({signingProperties:{config:j,context:k}})}}function Gb(b){return{schemeId:"smithy.api#noAuth"}}var zb=(b)=>{let j=[];switch(b.operation){case"GetRoleCredentials":{j.push(Gb());break}default:j.push(Hb(b))}return j},Fb=(b)=>{let j=E.resolveAwsSdkSigV4Config(b);return Object.assign(j,{authSchemePreference:D.normalizeProvider(b.authSchemePreference??[])})},Ib=(b)=>{return Object.assign(b,{useDualstackEndpoint:b.useDualstackEndpoint??!1,useFipsEndpoint:b.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},Nb={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Ub="3.997.14",Vb={version:Ub},z="ref",W=-1,N=!0,S="isSet",a="PartitionResult",U="booleanEquals",A="getAttr",h={[z]:"Endpoint"},v={[z]:a},Y={},p=[{[z]:"Region"}],u={conditions:[[S,[h]],[S,p],["aws.partition",p,a],[U,[{[z]:"UseFIPS"},N]],[U,[{[z]:"UseDualStack"},N]],[U,[{fn:A,argv:[v,"supportsDualStack"]},N]],[U,[{fn:A,argv:[v,"supportsFIPS"]},N]],["stringEquals",[{fn:A,argv:[v,"name"]},"aws-us-gov"]]],results:[[W],[W,"Invalid Configuration: FIPS and custom endpoint are not supported"],[W,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[h,Y],["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Y],[W,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://portal.sso.{Region}.amazonaws.com",Y],["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",Y],[W,"FIPS is enabled but this partition does not support FIPS"],["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",Y],[W,"DualStack is enabled but this partition does not support DualStack"],["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",Y],[W,"Invalid Configuration: Missing Region"]]},Mb=2,B=1e8,qb=new Int32Array([-1,1,-1,0,13,3,1,4,B+12,2,5,B+12,3,8,6,4,7,B+11,5,B+9,B+10,4,11,9,6,10,B+8,7,B+6,B+7,5,12,B+5,6,B+4,B+5,3,B+1,14,4,B+2,B+3]),Tb=H.BinaryDecisionDiagram.from(qb,Mb,u.conditions,u.results),yb=new H.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ob=(b,j={})=>{return yb.get(b,()=>H.decideEndpoint(Tb,{endpointParams:b,logger:j.logger}))};H.customEndpointFunctions.aws=K.awsEndpointFunctions;class X extends D.ServiceException{constructor(b){super(b);Object.setPrototypeOf(this,X.prototype)}}class l extends X{name="InvalidRequestException";$fault="client";constructor(b){super({name:"InvalidRequestException",$fault:"client",...b});Object.setPrototypeOf(this,l.prototype)}}class x extends X{name="ResourceNotFoundException";$fault="client";constructor(b){super({name:"ResourceNotFoundException",$fault:"client",...b});Object.setPrototypeOf(this,x.prototype)}}class C extends X{name="TooManyRequestsException";$fault="client";constructor(b){super({name:"TooManyRequestsException",$fault:"client",...b});Object.setPrototypeOf(this,C.prototype)}}class $ extends X{name="UnauthorizedException";$fault="client";constructor(b){super({name:"UnauthorizedException",$fault:"client",...b});Object.setPrototypeOf(this,$.prototype)}}var Rb="AccessTokenType",Ab="GetRoleCredentials",vb="GetRoleCredentialsRequest",Pb="GetRoleCredentialsResponse",Eb="InvalidRequestException",lb="RoleCredentials",xb="ResourceNotFoundException",Cb="SecretAccessKeyType",$b="SessionTokenType",_b="TooManyRequestsException",db="UnauthorizedException",mb="accountId",Sb="accessKeyId",hb="accessToken",pb="account_id",q="client",T="error",ub="expiration",sb="http",y="httpError",ab="httpHeader",s="httpQuery",O="message",rb="roleCredentials",gb="roleName",fb="role_name",r="smithy.ts.sdk.synthetic.com.amazonaws.sso",cb="secretAccessKey",tb="sessionToken",eb="x-amz-sso_bearer_token",L="com.amazonaws.sso",g=P.TypeRegistry.for(r),ib=[-3,r,"SSOServiceException",0,[],[]];g.registerError(ib,X);var F=P.TypeRegistry.for(L),nb=[-3,L,Eb,{[T]:q,[y]:400},[O],[0]];F.registerError(nb,l);var ob=[-3,L,xb,{[T]:q,[y]:404},[O],[0]];F.registerError(ob,x);var bj=[-3,L,_b,{[T]:q,[y]:429},[O],[0]];F.registerError(bj,C);var jj=[-3,L,db,{[T]:q,[y]:401},[O],[0]];F.registerError(jj,$);var kj=[g,F],wj=[0,L,Rb,8,0],Bj=[0,L,Cb,8,0],Dj=[0,L,$b,8,0],Jj=[3,L,vb,0,[gb,mb,hb],[[0,{[s]:fb}],[0,{[s]:pb}],[()=>wj,{[ab]:eb}]],3],Kj=[3,L,Pb,0,[rb],[[()=>Lj,0]]],Lj=[3,L,lb,0,[Sb,cb,tb,ub],[0,[()=>Bj,0],[()=>Dj,0],1]],Qj=[9,L,Ab,{[sb]:["GET","/federation/credentials",200]},()=>Jj,()=>Kj],Wj=(b)=>{return{apiVersion:"2019-06-10",base64Decoder:b?.base64Decoder??Z.fromBase64,base64Encoder:b?.base64Encoder??Z.toBase64,disableHostPrefix:b?.disableHostPrefix??!1,endpointProvider:b?.endpointProvider??Ob,extensions:b?.extensions??[],httpAuthSchemeProvider:b?.httpAuthSchemeProvider??zb,httpAuthSchemes:b?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(j)=>j.getIdentityProvider("aws.auth#sigv4"),signer:new E.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(j)=>j.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new V.NoAuthSigner}],logger:b?.logger??new D.NoOpLogger,protocol:b?.protocol??Yb.AwsRestJsonProtocol,protocolSettings:b?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:kj,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:b?.serviceId??"SSO",urlParser:b?.urlParser??M.parseUrl,utf8Decoder:b?.utf8Decoder??Z.fromUtf8,utf8Encoder:b?.utf8Encoder??Z.toUtf8}},Xj=(b)=>{D.emitWarningIfUnsupportedVersion(process.version);let j=J.resolveDefaultsModeConfig(b),k=()=>j().then(D.loadConfigsForDefaultMode),Q=Wj(b);K.emitWarningIfUnsupportedVersion(process.version);let w={profile:b?.profile,logger:Q.logger};return{...Q,...b,runtime:"node",defaultsMode:j,authSchemePreference:b?.authSchemePreference??J.loadConfig(E.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,w),bodyLengthChecker:b?.bodyLengthChecker??Z.calculateBodyLength,defaultUserAgentProvider:b?.defaultUserAgentProvider??K.createDefaultUserAgentProvider({serviceId:Q.serviceId,clientVersion:Vb.version}),maxAttempts:b?.maxAttempts??J.loadConfig(G.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,b),region:b?.region??J.loadConfig(J.NODE_REGION_CONFIG_OPTIONS,{...J.NODE_REGION_CONFIG_FILE_OPTIONS,...w}),requestHandler:m.NodeHttpHandler.create(b?.requestHandler??k),retryMode:b?.retryMode??J.loadConfig({...G.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await k()).retryMode||G.DEFAULT_RETRY_MODE},b),sha256:b?.sha256??Z.Hash.bind(null,"sha256"),streamCollector:b?.streamCollector??m.streamCollector,useDualstackEndpoint:b?.useDualstackEndpoint??J.loadConfig(J.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,w),useFipsEndpoint:b?.useFipsEndpoint??J.loadConfig(J.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,w),userAgentAppId:b?.userAgentAppId??J.loadConfig(K.NODE_APP_ID_CONFIG_OPTIONS,w)}},Yj=(b)=>{let{httpAuthSchemes:j,httpAuthSchemeProvider:k,credentials:Q}=b;return{setHttpAuthScheme(w){let I=j.findIndex((R)=>R.schemeId===w.schemeId);if(I===-1)j.push(w);else j.splice(I,1,w)},httpAuthSchemes(){return j},setHttpAuthSchemeProvider(w){k=w},httpAuthSchemeProvider(){return k},setCredentials(w){Q=w},credentials(){return Q}}},Zj=(b)=>{return{httpAuthSchemes:b.httpAuthSchemes(),httpAuthSchemeProvider:b.httpAuthSchemeProvider(),credentials:b.credentials()}},Hj=(b,j)=>{let k=Object.assign(K.getAwsRegionExtensionConfiguration(b),D.getDefaultExtensionConfiguration(b),M.getHttpHandlerExtensionConfiguration(b),Yj(b));return j.forEach((Q)=>Q.configure(k)),Object.assign(b,K.resolveAwsRegionExtensionConfiguration(k),D.resolveDefaultRuntimeConfig(k),M.resolveHttpHandlerRuntimeConfig(k),Zj(k))};class _ extends D.Client{config;constructor(...[b]){let j=Xj(b||{});super(j);this.initConfig=j;let k=Ib(j),Q=K.resolveUserAgentConfig(k),w=G.resolveRetryConfig(Q),I=J.resolveRegionConfig(w),R=K.resolveHostHeaderConfig(I),e=H.resolveEndpointConfig(R),i=Fb(e),n=Hj(i,b?.extensions||[]);this.config=n,this.middlewareStack.use(P.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(K.getUserAgentPlugin(this.config)),this.middlewareStack.use(G.getRetryPlugin(this.config)),this.middlewareStack.use(M.getContentLengthPlugin(this.config)),this.middlewareStack.use(K.getHostHeaderPlugin(this.config)),this.middlewareStack.use(K.getLoggerPlugin(this.config)),this.middlewareStack.use(K.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(V.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Zb,identityProviderConfigProvider:async(o)=>new V.DefaultIdentityProviderConfig({"aws.auth#sigv4":o.credentials})})),this.middlewareStack.use(V.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class d extends D.Command.classBuilder().ep(Nb).m(function(b,j,k,Q){return[H.getEndpointPlugin(k,b.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(Qj).build(){}var Gj={GetRoleCredentialsCommand:d};class f extends _{}D.createAggregatedClient(Gj,f);var{Command:zj,Client:Fj}=D;var c=d;var t=_;export{t as SSOClient,c as GetRoleCredentialsCommand};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{X as R9}from"./chunk-mchf2bcc.js";import{Sd as E9}from"./chunk-rqdfmbns.js";import{$d as H9,Td as P6,Wd as p$,Xd as S9,Yd as U9,ae as q6}from"./chunk-y9mxwwz7.js";import"./chunk-yhe5qz48.js";import{de as T0}from"./chunk-b274mb6v.js";import{ag as O}from"./chunk-d2049chz.js";import{Yg as j9,uh as I9,yh as E$}from"./chunk-cv3xdp8q.js";import"./chunk-x0wy15q9.js";import"./chunk-2h8b0csf.js";import"./chunk-4q14whpc.js";import"./chunk-s81ck6bw.js";import"./chunk-dzy3ezht.js";import"./chunk-g3y5kvg6.js";import{$k as b9,Kj as O6,Lj as M0,Qk as w9,Sk as D9,tj as T9}from"./chunk-z4gczap3.js";import{ml as N9}from"./chunk-2p1qaqv3.js";import{Bl as A0,Kl as T$}from"./chunk-47pxz6cb.js";import"./chunk-aq75kv5f.js";import"./chunk-1851skhm.js";import"./chunk-0ware2sh.js";import"./chunk-fbd971t7.js";import"./chunk-1f9qcrn6.js";import"./chunk-z66xdxkg.js";import"./chunk-jt94rhev.js";import"./chunk-2ts2s8b4.js";import"./chunk-7k1q26yn.js";import"./chunk-08mgb5tt.js";import"./chunk-6wt8g6mc.js";import"./chunk-1rafe6f5.js";import"./chunk-hsmtjb4d.js";import"./chunk-7nh8vjx4.js";import"./chunk-cqtkxwd8.js";import"./chunk-mfg4stzn.js";import"./chunk-hp9q7vvq.js";import"./chunk-5es19n1m.js";import"./chunk-1bbx1da7.js";import"./chunk-wspm2k19.js";import"./chunk-gvc1mqrs.js";import"./chunk-1exjy880.js";import"./chunk-xgdst5n5.js";import"./chunk-yzxcjr6y.js";import"./chunk-53n3tfwn.js";import"./chunk-3be70hxy.js";import{Ms as C6}from"./chunk-9a9qcvtz.js";import"./chunk-1sejtx9a.js";import"./chunk-jrh028na.js";import"./chunk-vqxyk6as.js";import"./chunk-mbma071k.js";import"./chunk-ajykvcas.js";import{gt as F9,jt as R6,kt as M9,pt as A9}from"./chunk-dpm5x19e.js";import"./chunk-vvmvryh1.js";import"./chunk-6g3bzap8.js";import{eu as L9}from"./chunk-mrh5q4s6.js";import"./chunk-w623r5kb.js";import"./chunk-zgj7jx8k.js";import"./chunk-0mdmqtfr.js";import"./chunk-00krzh3y.js";import{dI as V9}from"./chunk-hk8m8vax.js";import"./chunk-zhddj91f.js";import"./chunk-t4kma6mq.js";import{rP as q0,sP as D,vP as E}from"./chunk-0xf12tf3.js";var JZ=D((zZ)=>{/*!
2
+ import{Z as R9}from"./chunk-w4fr00s7.js";import{Ud as E9}from"./chunk-fpzkyzny.js";import{Vd as P6,Yd as p$,Zd as S9,_d as U9,be as H9,ce as q6}from"./chunk-p0852vfn.js";import"./chunk-ej0yzstw.js";import{fe as T0}from"./chunk-w8nj5ph5.js";import{cg as O}from"./chunk-psmwrvqs.js";import{Ah as E$,_g as j9,wh as I9}from"./chunk-fd04358e.js";import"./chunk-qn1fhqyw.js";import"./chunk-674pexjx.js";import"./chunk-zjyaze0d.js";import"./chunk-xdcwx384.js";import"./chunk-rd08wx37.js";import"./chunk-fp2xgnjn.js";import{Mj as O6,Nj as M0,Sk as w9,Uk as D9,bl as b9,vj as T9}from"./chunk-y1v7mf1a.js";import{ol as N9}from"./chunk-358wdvj7.js";import{Dl as A0,Ml as T$}from"./chunk-dn0437c1.js";import"./chunk-47jkx37s.js";import"./chunk-31a47ptm.js";import"./chunk-jwv6fda1.js";import"./chunk-hx13a8es.js";import"./chunk-h036zy9e.js";import"./chunk-j3agzs13.js";import"./chunk-3152y1q9.js";import"./chunk-71jmhvef.js";import"./chunk-qrztx1b4.js";import"./chunk-j1bv93m4.js";import"./chunk-pp10epga.js";import"./chunk-crqycrs4.js";import"./chunk-1bq15kf0.js";import"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import"./chunk-m6967jtv.js";import"./chunk-j2snkw45.js";import"./chunk-bmdqb48f.js";import"./chunk-3cs1qf8x.js";import"./chunk-4xqwt6dr.js";import"./chunk-g77kddrs.js";import"./chunk-9znfb8f2.js";import"./chunk-6kch0q2d.js";import"./chunk-6cztstry.js";import"./chunk-1mfdmm2t.js";import{Ps as C6}from"./chunk-fkq0v5qv.js";import"./chunk-1e75j4m1.js";import"./chunk-2w3n0q9m.js";import"./chunk-6dd2dx69.js";import"./chunk-fdmz0502.js";import"./chunk-1a08ffyd.js";import{jt as F9,mt as R6,nt as M9,st as A9}from"./chunk-8jkqyf9n.js";import"./chunk-6yshpz0z.js";import"./chunk-5dvy83ms.js";import{hu as L9}from"./chunk-ffx0cr44.js";import"./chunk-33mzqyyb.js";import"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-wfpnv00c.js";import{gI as V9}from"./chunk-9kc2th5c.js";import"./chunk-hf39qx6t.js";import"./chunk-x0de4z05.js";import{uP as q0,vP as D,yP as E}from"./chunk-sh03ka27.js";var JZ=D((zZ)=>{/*!
3
3
  * content-type
4
4
  * Copyright(c) 2015 Douglas Christopher Wilson
5
5
  * MIT Licensed
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ue as I,We as r,Ye as l,af as O,bf as t,ef as e,gf as o,hf as NN,if as QN,lf as _,mf as h,nf as m,of as XN,pf as YN,rf as ZN,sf as $N,tf as C,vf as JN}from"./chunk-1bhcg889.js";import{Nq as q,Rq as u,Uq as v}from"./chunk-7nh8vjx4.js";import"./chunk-cqtkxwd8.js";import"./chunk-mfg4stzn.js";import{Iu as N}from"./chunk-zgj7jx8k.js";import"./chunk-0mdmqtfr.js";import"./chunk-0xf12tf3.js";function s(Q){var J,z,B,j;if(Q==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(J=Q.prompt_tokens)!=null?J:0,X=(z=Q.completion_tokens)!=null?z:0,Y=(j=(B=Q.completion_tokens_details)==null?void 0:B.reasoning_tokens)!=null?j:void 0,Z=Y!=null?X-Y:X;return{inputTokens:{total:$,noCache:$,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:X,text:Z,reasoning:Y},raw:Q}}function BN(Q){var J;let z=[];for(let{role:B,content:j}of Q)switch(B){case"system":{z.push({role:"system",content:j});break}case"user":{if(j.length===1&&j[0].type==="text"){z.push({role:"user",content:j[0].text});break}z.push({role:"user",content:j.map(($)=>{switch($.type){case"text":return{type:"text",text:$.text};case"file":{if(!$.mediaType.startsWith("image/"))throw new v({functionality:"Non-image file content parts"});let X=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${X};base64,${l($.data)}`}}}}})});break}case"assistant":{let $="",X="",Y=[];for(let Z of j)switch(Z.type){case"reasoning":{X+=Z.text;break}case"text":{$+=Z.text;break}case"tool-call":{Y.push({id:Z.toolCallId,type:"function",function:{name:Z.toolName,arguments:JSON.stringify(Z.input)}});break}}z.push({role:"assistant",content:$,...X.length>0?{reasoning:X}:null,...Y.length>0?{tool_calls:Y}:null});break}case"tool":{for(let $ of j){if($.type==="tool-approval-response")continue;let X=$.output,Y;switch(X.type){case"text":case"error-text":Y=X.value;break;case"execution-denied":Y=(J=X.reason)!=null?J:"Tool execution denied.";break;case"content":case"json":case"error-json":Y=JSON.stringify(X.value);break}z.push({role:"tool",tool_call_id:$.toolCallId,content:Y})}break}default:throw Error(`Unsupported role: ${B}`)}return z}function a({id:Q,model:J,created:z}){return{id:Q!=null?Q:void 0,modelId:J!=null?J:void 0,timestamp:z!=null?new Date(z*1000):void 0}}var GN=N.object({reasoningFormat:N.enum(["parsed","raw","hidden"]).optional(),reasoningEffort:N.enum(["none","default","low","medium","high"]).optional(),parallelToolCalls:N.boolean().optional(),user:N.string().optional(),structuredOutputs:N.boolean().optional(),strictJsonSchema:N.boolean().optional(),serviceTier:N.enum(["on_demand","flex","auto"]).optional()}),jN=N.object({error:N.object({message:N.string(),type:N.string()})}),g=ZN({errorSchema:jN,errorToMessage:(Q)=>Q.error.message}),zN=["openai/gpt-oss-20b","openai/gpt-oss-120b"];function KN(Q){return zN.includes(Q)}function UN(){return zN.join(", ")}function VN({tools:Q,toolChoice:J,modelId:z}){Q=(Q==null?void 0:Q.length)?Q:void 0;let B=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:B};let j=[];for(let X of Q)if(X.type==="provider")if(X.id==="groq.browser_search")if(!KN(z))B.push({type:"unsupported",feature:`provider-defined tool ${X.id}`,details:`Browser search is only supported on the following models: ${UN()}. Current model: ${z}`});else j.push({type:"browser_search"});else B.push({type:"unsupported",feature:`provider-defined tool ${X.id}`});else j.push({type:"function",function:{name:X.name,description:X.description,parameters:X.inputSchema,...X.strict!=null?{strict:X.strict}:{}}});if(J==null)return{tools:j,toolChoice:void 0,toolWarnings:B};let $=J.type;switch($){case"auto":case"none":case"required":return{tools:j,toolChoice:$,toolWarnings:B};case"tool":return{tools:j,toolChoice:{type:"function",function:{name:J.toolName}},toolWarnings:B};default:throw new v({functionality:`tool choice type: ${$}`})}}function n(Q){switch(Q){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var LN=class{constructor(Q,J){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=Q,this.config=J}get provider(){return this.config.provider}async getArgs({prompt:Q,maxOutputTokens:J,temperature:z,topP:B,topK:j,frequencyPenalty:$,presencePenalty:X,stopSequences:Y,responseFormat:Z,seed:K,stream:L,tools:V,toolChoice:W,providerOptions:U}){var G,E,S;let b=[],H=await h({provider:"groq",providerOptions:U,schema:GN}),F=(G=H==null?void 0:H.structuredOutputs)!=null?G:!0,f=(E=H==null?void 0:H.strictJsonSchema)!=null?E:!0;if(j!=null)b.push({type:"unsupported",feature:"topK"});if((Z==null?void 0:Z.type)==="json"&&Z.schema!=null&&!F)b.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:k,toolChoice:D,toolWarnings:R}=VN({tools:V,toolChoice:W,modelId:this.modelId});return{args:{model:this.modelId,user:H==null?void 0:H.user,parallel_tool_calls:H==null?void 0:H.parallelToolCalls,max_tokens:J,temperature:z,top_p:B,frequency_penalty:$,presence_penalty:X,stop:Y,seed:K,response_format:(Z==null?void 0:Z.type)==="json"?F&&Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:f,name:(S=Z.name)!=null?S:"response",description:Z.description}}:{type:"json_object"}:void 0,reasoning_format:H==null?void 0:H.reasoningFormat,reasoning_effort:H==null?void 0:H.reasoningEffort,service_tier:H==null?void 0:H.serviceTier,messages:BN(Q),tools:k,tool_choice:D},warnings:[...b,...R]}}async doGenerate(Q){var J,z;let{args:B,warnings:j}=await this.getArgs({...Q,stream:!1}),$=JSON.stringify(B),{responseHeaders:X,value:Y,rawValue:Z}=await m({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),body:B,failedResponseHandler:g,successfulResponseHandler:C(HN),abortSignal:Q.abortSignal,fetch:this.config.fetch}),K=Y.choices[0],L=[],V=K.message.content;if(V!=null&&V.length>0)L.push({type:"text",text:V});let W=K.message.reasoning;if(W!=null&&W.length>0)L.push({type:"reasoning",text:W});if(K.message.tool_calls!=null)for(let U of K.message.tool_calls)L.push({type:"tool-call",toolCallId:(J=U.id)!=null?J:O(),toolName:U.function.name,input:U.function.arguments});return{content:L,finishReason:{unified:n(K.finish_reason),raw:(z=K.finish_reason)!=null?z:void 0},usage:s(Y.usage),response:{...a(Y),headers:X,body:Z},warnings:j,request:{body:$}}}async doStream(Q){let{args:J,warnings:z}=await this.getArgs({...Q,stream:!0}),B=JSON.stringify({...J,stream:!0}),{responseHeaders:j,value:$}=await m({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),body:{...J,stream:!0},failedResponseHandler:g,successfulResponseHandler:$N(wN),abortSignal:Q.abortSignal,fetch:this.config.fetch}),X=[],Y={unified:"other",raw:void 0},Z=void 0,K=!0,L=!1,V=!1,W;return{stream:$.pipeThrough(new TransformStream({start(U){U.enqueue({type:"stream-start",warnings:z})},transform(U,G){var E,S,b,H,F,f,k,D,R,d,c,p,i;if(Q.includeRawChunks)G.enqueue({type:"raw",rawValue:U.rawValue});if(!U.success){Y={unified:"error",raw:void 0},G.enqueue({type:"error",error:U.error});return}let y=U.value;if("error"in y){Y={unified:"error",raw:void 0},G.enqueue({type:"error",error:y.error});return}if(K)K=!1,G.enqueue({type:"response-metadata",...a(y)});if(((E=y.x_groq)==null?void 0:E.usage)!=null)Z=y.x_groq.usage;let x=y.choices[0];if((x==null?void 0:x.finish_reason)!=null)Y={unified:n(x.finish_reason),raw:x.finish_reason};if((x==null?void 0:x.delta)==null)return;let M=x.delta;if(M.reasoning!=null&&M.reasoning.length>0){if(!V)G.enqueue({type:"reasoning-start",id:"reasoning-0"}),V=!0;G.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:M.reasoning})}if(M.content!=null&&M.content.length>0){if(V)G.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;if(!L)G.enqueue({type:"text-start",id:"txt-0"}),L=!0;G.enqueue({type:"text-delta",id:"txt-0",delta:M.content})}if(M.tool_calls!=null){if(V)G.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;for(let w of M.tool_calls){let T=w.index;if(X[T]==null){if(w.type!=="function")throw new q({data:w,message:"Expected 'function' type."});if(w.id==null)throw new q({data:w,message:"Expected 'id' to be a string."});if(((S=w.function)==null?void 0:S.name)==null)throw new q({data:w,message:"Expected 'function.name' to be a string."});G.enqueue({type:"tool-input-start",id:w.id,toolName:w.function.name}),X[T]={id:w.id,type:"function",function:{name:w.function.name,arguments:(b=w.function.arguments)!=null?b:""},hasFinished:!1};let A=X[T];if(((H=A.function)==null?void 0:H.name)!=null&&((F=A.function)==null?void 0:F.arguments)!=null){if(A.function.arguments.length>0)G.enqueue({type:"tool-input-delta",id:A.id,delta:A.function.arguments});if(_(A.function.arguments))G.enqueue({type:"tool-input-end",id:A.id}),G.enqueue({type:"tool-call",toolCallId:(f=A.id)!=null?f:O(),toolName:A.function.name,input:A.function.arguments}),A.hasFinished=!0}continue}let P=X[T];if(P.hasFinished)continue;if(((k=w.function)==null?void 0:k.arguments)!=null)P.function.arguments+=(R=(D=w.function)==null?void 0:D.arguments)!=null?R:"";if(G.enqueue({type:"tool-input-delta",id:P.id,delta:(d=w.function.arguments)!=null?d:""}),((c=P.function)==null?void 0:c.name)!=null&&((p=P.function)==null?void 0:p.arguments)!=null&&_(P.function.arguments))G.enqueue({type:"tool-input-end",id:P.id}),G.enqueue({type:"tool-call",toolCallId:(i=P.id)!=null?i:O(),toolName:P.function.name,input:P.function.arguments}),P.hasFinished=!0}}},flush(U){if(V)U.enqueue({type:"reasoning-end",id:"reasoning-0"});if(L)U.enqueue({type:"text-end",id:"txt-0"});U.enqueue({type:"finish",finishReason:Y,usage:s(Z),...W!=null?{providerMetadata:W}:{}})}})),request:{body:B},response:{headers:j}}}},HN=N.object({id:N.string().nullish(),created:N.number().nullish(),model:N.string().nullish(),choices:N.array(N.object({message:N.object({content:N.string().nullish(),reasoning:N.string().nullish(),tool_calls:N.array(N.object({id:N.string().nullish(),type:N.literal("function"),function:N.object({name:N.string(),arguments:N.string()})})).nullish()}),index:N.number(),finish_reason:N.string().nullish()})),usage:N.object({prompt_tokens:N.number().nullish(),completion_tokens:N.number().nullish(),total_tokens:N.number().nullish(),prompt_tokens_details:N.object({cached_tokens:N.number().nullish()}).nullish(),completion_tokens_details:N.object({reasoning_tokens:N.number().nullish()}).nullish()}).nullish()}),wN=N.union([N.object({id:N.string().nullish(),created:N.number().nullish(),model:N.string().nullish(),choices:N.array(N.object({delta:N.object({content:N.string().nullish(),reasoning:N.string().nullish(),tool_calls:N.array(N.object({index:N.number(),id:N.string().nullish(),type:N.literal("function").optional(),function:N.object({name:N.string().nullish(),arguments:N.string().nullish()})})).nullish()}).nullish(),finish_reason:N.string().nullable().optional(),index:N.number()})),x_groq:N.object({usage:N.object({prompt_tokens:N.number().nullish(),completion_tokens:N.number().nullish(),total_tokens:N.number().nullish(),prompt_tokens_details:N.object({cached_tokens:N.number().nullish()}).nullish(),completion_tokens_details:N.object({reasoning_tokens:N.number().nullish()}).nullish()}).nullish()}).nullish()}),jN]),WN=NN(()=>QN(N.object({language:N.string().nullish(),prompt:N.string().nullish(),responseFormat:N.string().nullish(),temperature:N.number().min(0).max(1).nullish(),timestampGranularities:N.array(N.string()).nullish()}))),PN=class{constructor(Q,J){this.modelId=Q,this.config=J,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:Q,mediaType:J,providerOptions:z}){var B,j,$,X,Y;let Z=[],K=await h({provider:"groq",providerOptions:z,schema:WN}),L=new FormData,V=Q instanceof Uint8Array?new Blob([Q]):new Blob([r(Q)]);L.append("model",this.modelId);let W=o(J);if(L.append("file",new File([V],"audio",{type:J}),`audio.${W}`),K){let U={language:(B=K.language)!=null?B:void 0,prompt:(j=K.prompt)!=null?j:void 0,response_format:($=K.responseFormat)!=null?$:void 0,temperature:(X=K.temperature)!=null?X:void 0,timestamp_granularities:(Y=K.timestampGranularities)!=null?Y:void 0};for(let G in U){let E=U[G];if(E!==void 0)if(Array.isArray(E))for(let S of E)L.append(`${G}[]`,String(S));else L.append(G,String(E))}}return{formData:L,warnings:Z}}async doGenerate(Q){var J,z,B,j,$,X,Y;let Z=(B=(z=(J=this.config._internal)==null?void 0:J.currentDate)==null?void 0:z.call(J))!=null?B:new Date,{formData:K,warnings:L}=await this.getArgs(Q),{value:V,responseHeaders:W,rawValue:U}=await XN({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),formData:K,failedResponseHandler:g,successfulResponseHandler:C(AN),abortSignal:Q.abortSignal,fetch:this.config.fetch});return{text:V.text,segments:($=(j=V.segments)==null?void 0:j.map((G)=>({text:G.text,startSecond:G.start,endSecond:G.end})))!=null?$:[],language:(X=V.language)!=null?X:void 0,durationInSeconds:(Y=V.duration)!=null?Y:void 0,warnings:L,response:{timestamp:Z,modelId:this.modelId,headers:W,body:U}}}},AN=N.object({text:N.string(),x_groq:N.object({id:N.string()}),task:N.string().nullish(),language:N.string().nullish(),duration:N.number().nullish(),segments:N.array(N.object({id:N.number(),seek:N.number(),start:N.number(),end:N.number(),text:N.string(),tokens:N.array(N.number()),temperature:N.number(),avg_logprob:N.number(),compression_ratio:N.number(),no_speech_prob:N.number()})).nullish()}),EN=YN({id:"groq.browser_search",inputSchema:N.object({})}),MN={browserSearch:EN},SN="3.0.31";function xN(Q={}){var J;let z=(J=JN(Q.baseURL))!=null?J:"https://api.groq.com/openai/v1",B=()=>t({Authorization:`Bearer ${e({apiKey:Q.apiKey,environmentVariableName:"GROQ_API_KEY",description:"Groq"})}`,...Q.headers},`ai-sdk/groq/${SN}`),j=(Z)=>new LN(Z,{provider:"groq.chat",url:({path:K})=>`${z}${K}`,headers:B,fetch:Q.fetch}),$=(Z)=>{if(new.target)throw Error("The Groq model function cannot be called with the new keyword.");return j(Z)},X=(Z)=>{return new PN(Z,{provider:"groq.transcription",url:({path:K})=>`${z}${K}`,headers:B,fetch:Q.fetch})},Y=function(Z){return $(Z)};return Y.specificationVersion="v3",Y.languageModel=$,Y.chat=j,Y.embeddingModel=(Z)=>{throw new u({modelId:Z,modelType:"embeddingModel"})},Y.textEmbeddingModel=Y.embeddingModel,Y.imageModel=(Z)=>{throw new u({modelId:Z,modelType:"imageModel"})},Y.transcription=X,Y.transcriptionModel=X,Y.tools=MN,Y}var gN=xN();export{gN as groq,xN as createGroq,EN as browserSearch,SN as VERSION};
2
+ import{We as I,Ye as r,_e as l,cf as O,df as t,gf as e,if as o,jf as NN,kf as QN,nf as _,of as h,pf as m,qf as XN,rf as YN,tf as ZN,uf as $N,vf as C,xf as JN}from"./chunk-4ycg2c6f.js";import{Qq as q,Uq as u,Xq as v}from"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import{Lu as N}from"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import"./chunk-sh03ka27.js";function s(Q){var J,z,B,j;if(Q==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(J=Q.prompt_tokens)!=null?J:0,X=(z=Q.completion_tokens)!=null?z:0,Y=(j=(B=Q.completion_tokens_details)==null?void 0:B.reasoning_tokens)!=null?j:void 0,Z=Y!=null?X-Y:X;return{inputTokens:{total:$,noCache:$,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:X,text:Z,reasoning:Y},raw:Q}}function BN(Q){var J;let z=[];for(let{role:B,content:j}of Q)switch(B){case"system":{z.push({role:"system",content:j});break}case"user":{if(j.length===1&&j[0].type==="text"){z.push({role:"user",content:j[0].text});break}z.push({role:"user",content:j.map(($)=>{switch($.type){case"text":return{type:"text",text:$.text};case"file":{if(!$.mediaType.startsWith("image/"))throw new v({functionality:"Non-image file content parts"});let X=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${X};base64,${l($.data)}`}}}}})});break}case"assistant":{let $="",X="",Y=[];for(let Z of j)switch(Z.type){case"reasoning":{X+=Z.text;break}case"text":{$+=Z.text;break}case"tool-call":{Y.push({id:Z.toolCallId,type:"function",function:{name:Z.toolName,arguments:JSON.stringify(Z.input)}});break}}z.push({role:"assistant",content:$,...X.length>0?{reasoning:X}:null,...Y.length>0?{tool_calls:Y}:null});break}case"tool":{for(let $ of j){if($.type==="tool-approval-response")continue;let X=$.output,Y;switch(X.type){case"text":case"error-text":Y=X.value;break;case"execution-denied":Y=(J=X.reason)!=null?J:"Tool execution denied.";break;case"content":case"json":case"error-json":Y=JSON.stringify(X.value);break}z.push({role:"tool",tool_call_id:$.toolCallId,content:Y})}break}default:throw Error(`Unsupported role: ${B}`)}return z}function a({id:Q,model:J,created:z}){return{id:Q!=null?Q:void 0,modelId:J!=null?J:void 0,timestamp:z!=null?new Date(z*1000):void 0}}var GN=N.object({reasoningFormat:N.enum(["parsed","raw","hidden"]).optional(),reasoningEffort:N.enum(["none","default","low","medium","high"]).optional(),parallelToolCalls:N.boolean().optional(),user:N.string().optional(),structuredOutputs:N.boolean().optional(),strictJsonSchema:N.boolean().optional(),serviceTier:N.enum(["on_demand","flex","auto"]).optional()}),jN=N.object({error:N.object({message:N.string(),type:N.string()})}),g=ZN({errorSchema:jN,errorToMessage:(Q)=>Q.error.message}),zN=["openai/gpt-oss-20b","openai/gpt-oss-120b"];function KN(Q){return zN.includes(Q)}function UN(){return zN.join(", ")}function VN({tools:Q,toolChoice:J,modelId:z}){Q=(Q==null?void 0:Q.length)?Q:void 0;let B=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:B};let j=[];for(let X of Q)if(X.type==="provider")if(X.id==="groq.browser_search")if(!KN(z))B.push({type:"unsupported",feature:`provider-defined tool ${X.id}`,details:`Browser search is only supported on the following models: ${UN()}. Current model: ${z}`});else j.push({type:"browser_search"});else B.push({type:"unsupported",feature:`provider-defined tool ${X.id}`});else j.push({type:"function",function:{name:X.name,description:X.description,parameters:X.inputSchema,...X.strict!=null?{strict:X.strict}:{}}});if(J==null)return{tools:j,toolChoice:void 0,toolWarnings:B};let $=J.type;switch($){case"auto":case"none":case"required":return{tools:j,toolChoice:$,toolWarnings:B};case"tool":return{tools:j,toolChoice:{type:"function",function:{name:J.toolName}},toolWarnings:B};default:throw new v({functionality:`tool choice type: ${$}`})}}function n(Q){switch(Q){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var LN=class{constructor(Q,J){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=Q,this.config=J}get provider(){return this.config.provider}async getArgs({prompt:Q,maxOutputTokens:J,temperature:z,topP:B,topK:j,frequencyPenalty:$,presencePenalty:X,stopSequences:Y,responseFormat:Z,seed:K,stream:L,tools:V,toolChoice:W,providerOptions:U}){var G,E,S;let b=[],H=await h({provider:"groq",providerOptions:U,schema:GN}),F=(G=H==null?void 0:H.structuredOutputs)!=null?G:!0,f=(E=H==null?void 0:H.strictJsonSchema)!=null?E:!0;if(j!=null)b.push({type:"unsupported",feature:"topK"});if((Z==null?void 0:Z.type)==="json"&&Z.schema!=null&&!F)b.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:k,toolChoice:D,toolWarnings:R}=VN({tools:V,toolChoice:W,modelId:this.modelId});return{args:{model:this.modelId,user:H==null?void 0:H.user,parallel_tool_calls:H==null?void 0:H.parallelToolCalls,max_tokens:J,temperature:z,top_p:B,frequency_penalty:$,presence_penalty:X,stop:Y,seed:K,response_format:(Z==null?void 0:Z.type)==="json"?F&&Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,strict:f,name:(S=Z.name)!=null?S:"response",description:Z.description}}:{type:"json_object"}:void 0,reasoning_format:H==null?void 0:H.reasoningFormat,reasoning_effort:H==null?void 0:H.reasoningEffort,service_tier:H==null?void 0:H.serviceTier,messages:BN(Q),tools:k,tool_choice:D},warnings:[...b,...R]}}async doGenerate(Q){var J,z;let{args:B,warnings:j}=await this.getArgs({...Q,stream:!1}),$=JSON.stringify(B),{responseHeaders:X,value:Y,rawValue:Z}=await m({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),body:B,failedResponseHandler:g,successfulResponseHandler:C(HN),abortSignal:Q.abortSignal,fetch:this.config.fetch}),K=Y.choices[0],L=[],V=K.message.content;if(V!=null&&V.length>0)L.push({type:"text",text:V});let W=K.message.reasoning;if(W!=null&&W.length>0)L.push({type:"reasoning",text:W});if(K.message.tool_calls!=null)for(let U of K.message.tool_calls)L.push({type:"tool-call",toolCallId:(J=U.id)!=null?J:O(),toolName:U.function.name,input:U.function.arguments});return{content:L,finishReason:{unified:n(K.finish_reason),raw:(z=K.finish_reason)!=null?z:void 0},usage:s(Y.usage),response:{...a(Y),headers:X,body:Z},warnings:j,request:{body:$}}}async doStream(Q){let{args:J,warnings:z}=await this.getArgs({...Q,stream:!0}),B=JSON.stringify({...J,stream:!0}),{responseHeaders:j,value:$}=await m({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),body:{...J,stream:!0},failedResponseHandler:g,successfulResponseHandler:$N(wN),abortSignal:Q.abortSignal,fetch:this.config.fetch}),X=[],Y={unified:"other",raw:void 0},Z=void 0,K=!0,L=!1,V=!1,W;return{stream:$.pipeThrough(new TransformStream({start(U){U.enqueue({type:"stream-start",warnings:z})},transform(U,G){var E,S,b,H,F,f,k,D,R,d,c,p,i;if(Q.includeRawChunks)G.enqueue({type:"raw",rawValue:U.rawValue});if(!U.success){Y={unified:"error",raw:void 0},G.enqueue({type:"error",error:U.error});return}let y=U.value;if("error"in y){Y={unified:"error",raw:void 0},G.enqueue({type:"error",error:y.error});return}if(K)K=!1,G.enqueue({type:"response-metadata",...a(y)});if(((E=y.x_groq)==null?void 0:E.usage)!=null)Z=y.x_groq.usage;let x=y.choices[0];if((x==null?void 0:x.finish_reason)!=null)Y={unified:n(x.finish_reason),raw:x.finish_reason};if((x==null?void 0:x.delta)==null)return;let M=x.delta;if(M.reasoning!=null&&M.reasoning.length>0){if(!V)G.enqueue({type:"reasoning-start",id:"reasoning-0"}),V=!0;G.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:M.reasoning})}if(M.content!=null&&M.content.length>0){if(V)G.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;if(!L)G.enqueue({type:"text-start",id:"txt-0"}),L=!0;G.enqueue({type:"text-delta",id:"txt-0",delta:M.content})}if(M.tool_calls!=null){if(V)G.enqueue({type:"reasoning-end",id:"reasoning-0"}),V=!1;for(let w of M.tool_calls){let T=w.index;if(X[T]==null){if(w.type!=="function")throw new q({data:w,message:"Expected 'function' type."});if(w.id==null)throw new q({data:w,message:"Expected 'id' to be a string."});if(((S=w.function)==null?void 0:S.name)==null)throw new q({data:w,message:"Expected 'function.name' to be a string."});G.enqueue({type:"tool-input-start",id:w.id,toolName:w.function.name}),X[T]={id:w.id,type:"function",function:{name:w.function.name,arguments:(b=w.function.arguments)!=null?b:""},hasFinished:!1};let A=X[T];if(((H=A.function)==null?void 0:H.name)!=null&&((F=A.function)==null?void 0:F.arguments)!=null){if(A.function.arguments.length>0)G.enqueue({type:"tool-input-delta",id:A.id,delta:A.function.arguments});if(_(A.function.arguments))G.enqueue({type:"tool-input-end",id:A.id}),G.enqueue({type:"tool-call",toolCallId:(f=A.id)!=null?f:O(),toolName:A.function.name,input:A.function.arguments}),A.hasFinished=!0}continue}let P=X[T];if(P.hasFinished)continue;if(((k=w.function)==null?void 0:k.arguments)!=null)P.function.arguments+=(R=(D=w.function)==null?void 0:D.arguments)!=null?R:"";if(G.enqueue({type:"tool-input-delta",id:P.id,delta:(d=w.function.arguments)!=null?d:""}),((c=P.function)==null?void 0:c.name)!=null&&((p=P.function)==null?void 0:p.arguments)!=null&&_(P.function.arguments))G.enqueue({type:"tool-input-end",id:P.id}),G.enqueue({type:"tool-call",toolCallId:(i=P.id)!=null?i:O(),toolName:P.function.name,input:P.function.arguments}),P.hasFinished=!0}}},flush(U){if(V)U.enqueue({type:"reasoning-end",id:"reasoning-0"});if(L)U.enqueue({type:"text-end",id:"txt-0"});U.enqueue({type:"finish",finishReason:Y,usage:s(Z),...W!=null?{providerMetadata:W}:{}})}})),request:{body:B},response:{headers:j}}}},HN=N.object({id:N.string().nullish(),created:N.number().nullish(),model:N.string().nullish(),choices:N.array(N.object({message:N.object({content:N.string().nullish(),reasoning:N.string().nullish(),tool_calls:N.array(N.object({id:N.string().nullish(),type:N.literal("function"),function:N.object({name:N.string(),arguments:N.string()})})).nullish()}),index:N.number(),finish_reason:N.string().nullish()})),usage:N.object({prompt_tokens:N.number().nullish(),completion_tokens:N.number().nullish(),total_tokens:N.number().nullish(),prompt_tokens_details:N.object({cached_tokens:N.number().nullish()}).nullish(),completion_tokens_details:N.object({reasoning_tokens:N.number().nullish()}).nullish()}).nullish()}),wN=N.union([N.object({id:N.string().nullish(),created:N.number().nullish(),model:N.string().nullish(),choices:N.array(N.object({delta:N.object({content:N.string().nullish(),reasoning:N.string().nullish(),tool_calls:N.array(N.object({index:N.number(),id:N.string().nullish(),type:N.literal("function").optional(),function:N.object({name:N.string().nullish(),arguments:N.string().nullish()})})).nullish()}).nullish(),finish_reason:N.string().nullable().optional(),index:N.number()})),x_groq:N.object({usage:N.object({prompt_tokens:N.number().nullish(),completion_tokens:N.number().nullish(),total_tokens:N.number().nullish(),prompt_tokens_details:N.object({cached_tokens:N.number().nullish()}).nullish(),completion_tokens_details:N.object({reasoning_tokens:N.number().nullish()}).nullish()}).nullish()}).nullish()}),jN]),WN=NN(()=>QN(N.object({language:N.string().nullish(),prompt:N.string().nullish(),responseFormat:N.string().nullish(),temperature:N.number().min(0).max(1).nullish(),timestampGranularities:N.array(N.string()).nullish()}))),PN=class{constructor(Q,J){this.modelId=Q,this.config=J,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:Q,mediaType:J,providerOptions:z}){var B,j,$,X,Y;let Z=[],K=await h({provider:"groq",providerOptions:z,schema:WN}),L=new FormData,V=Q instanceof Uint8Array?new Blob([Q]):new Blob([r(Q)]);L.append("model",this.modelId);let W=o(J);if(L.append("file",new File([V],"audio",{type:J}),`audio.${W}`),K){let U={language:(B=K.language)!=null?B:void 0,prompt:(j=K.prompt)!=null?j:void 0,response_format:($=K.responseFormat)!=null?$:void 0,temperature:(X=K.temperature)!=null?X:void 0,timestamp_granularities:(Y=K.timestampGranularities)!=null?Y:void 0};for(let G in U){let E=U[G];if(E!==void 0)if(Array.isArray(E))for(let S of E)L.append(`${G}[]`,String(S));else L.append(G,String(E))}}return{formData:L,warnings:Z}}async doGenerate(Q){var J,z,B,j,$,X,Y;let Z=(B=(z=(J=this.config._internal)==null?void 0:J.currentDate)==null?void 0:z.call(J))!=null?B:new Date,{formData:K,warnings:L}=await this.getArgs(Q),{value:V,responseHeaders:W,rawValue:U}=await XN({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:I(this.config.headers(),Q.headers),formData:K,failedResponseHandler:g,successfulResponseHandler:C(AN),abortSignal:Q.abortSignal,fetch:this.config.fetch});return{text:V.text,segments:($=(j=V.segments)==null?void 0:j.map((G)=>({text:G.text,startSecond:G.start,endSecond:G.end})))!=null?$:[],language:(X=V.language)!=null?X:void 0,durationInSeconds:(Y=V.duration)!=null?Y:void 0,warnings:L,response:{timestamp:Z,modelId:this.modelId,headers:W,body:U}}}},AN=N.object({text:N.string(),x_groq:N.object({id:N.string()}),task:N.string().nullish(),language:N.string().nullish(),duration:N.number().nullish(),segments:N.array(N.object({id:N.number(),seek:N.number(),start:N.number(),end:N.number(),text:N.string(),tokens:N.array(N.number()),temperature:N.number(),avg_logprob:N.number(),compression_ratio:N.number(),no_speech_prob:N.number()})).nullish()}),EN=YN({id:"groq.browser_search",inputSchema:N.object({})}),MN={browserSearch:EN},SN="3.0.31";function xN(Q={}){var J;let z=(J=JN(Q.baseURL))!=null?J:"https://api.groq.com/openai/v1",B=()=>t({Authorization:`Bearer ${e({apiKey:Q.apiKey,environmentVariableName:"GROQ_API_KEY",description:"Groq"})}`,...Q.headers},`ai-sdk/groq/${SN}`),j=(Z)=>new LN(Z,{provider:"groq.chat",url:({path:K})=>`${z}${K}`,headers:B,fetch:Q.fetch}),$=(Z)=>{if(new.target)throw Error("The Groq model function cannot be called with the new keyword.");return j(Z)},X=(Z)=>{return new PN(Z,{provider:"groq.transcription",url:({path:K})=>`${z}${K}`,headers:B,fetch:Q.fetch})},Y=function(Z){return $(Z)};return Y.specificationVersion="v3",Y.languageModel=$,Y.chat=j,Y.embeddingModel=(Z)=>{throw new u({modelId:Z,modelType:"embeddingModel"})},Y.textEmbeddingModel=Y.embeddingModel,Y.imageModel=(Z)=>{throw new u({modelId:Z,modelType:"imageModel"})},Y.transcription=X,Y.transcriptionModel=X,Y.tools=MN,Y}var gN=xN();export{gN as groq,xN as createGroq,EN as browserSearch,SN as VERSION};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ae as k,qe as a,re as b,se as c,te as d,ue as e,ve as f,we as g,xe as h,ye as i,ze as j}from"./chunk-ahgb3r1c.js";import"./chunk-s0gmxpxm.js";import"./chunk-48rg4yhk.js";import"./chunk-sh03ka27.js";export{c as providerConfigFromInit,d as httpRequest,j as getInstanceMetadataEndpoint,k as fromInstanceMetadata,h as fromContainerMetadata,i as Endpoint,f as ENV_CMDS_RELATIVE_URI,e as ENV_CMDS_FULL_URI,g as ENV_CMDS_AUTH_TOKEN,a as DEFAULT_TIMEOUT,b as DEFAULT_MAX_RETRIES};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{jr as a,kr as b}from"./chunk-3cs1qf8x.js";import"./chunk-sh03ka27.js";export{a as generateSecret,b as generateCodeChallengeFromVerifier};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{tP as fr}from"./chunk-0xf12tf3.js";var gr="0.2.13",xr="latest",yr="fbde29986feba3027538feff4b27cf1fff10c75b",hr=!1;var u={done:!1,hasNext:!1};function l(r,...a){let o=r,t=a.map((i)=>("lazy"in i)?v(i):void 0),s=0;for(;s<a.length;){if(t[s]===void 0||!S(o)){let n=a[s];o=n(o),s+=1;continue}let i=[];for(let n=s;n<a.length;n++){let f=t[n];if(f===void 0||(i.push(f),f.isSingle))break}let e=[];for(let n of o)if(j(n,e,i))break;let{isSingle:p}=i.at(-1);o=p?e[0]:e,s+=i.length}return o}function j(r,a,o){if(o.length===0)return a.push(r),!1;let t=r,s=u,i=!1;for(let[e,p]of o.entries()){let{index:n,items:f}=p;if(f.push(t),s=p(t,n,f),p.index+=1,s.hasNext){if(s.hasMany??!1){for(let g of s.next)if(j(g,a,o.slice(e+1)))return!0;return i}t=s.next}if(!s.hasNext)break;s.done&&(i=!0)}return s.hasNext&&a.push(t),i}function v(r){let{lazy:a,lazyArgs:o}=r,t=a(...o);return Object.assign(t,{isSingle:a.single??!1,index:0,items:[]})}function S(r){return typeof r=="string"||typeof r=="object"&&r!==null&&Symbol.iterator in r}function x(r,a){let o=a.length-r.length;if(o===1){let[t,...s]=a;return l(t,{lazy:r,lazyArgs:s})}if(o===0){let t={lazy:r,lazyArgs:a};return Object.assign((s)=>l(s,t),t)}throw Error("Wrong number of arguments")}function B(...r){return x(_,r)}function _(){let r=new Set;return(a)=>r.has(a)?u:(r.add(a),{done:!1,hasNext:!0,next:a})}function N(r,a,o){let t=(s)=>r(s,...a);return o===void 0?t:Object.assign(t,{lazy:o,lazyArgs:a})}function m(r,a,o){let t=r.length-a.length;if(t===0)return r(...a);if(t===1)return N(r,a,o);throw Error("Wrong number of arguments")}function C(...r){return m(Object.values,r)}var D={asc:(r,a)=>r>a,desc:(r,a)=>r<a};function y(r,a){let[o,...t]=a;if(!P(o)){let i=b(...t);return r(o,i)}let s=b(o,...t);return(i)=>r(i,s)}function b(r,a,...o){let t=typeof r=="function"?r:r[0],s=typeof r=="function"?"asc":r[1],{[s]:i}=D,e=a===void 0?void 0:b(a,...o);return(p,n)=>{let f=t(p),g=t(n);return i(f,g)?1:i(g,f)?-1:e?.(p,n)??0}}function P(r){if(Q(r))return!0;if(typeof r!="object"||!Array.isArray(r))return!1;let[a,o,...t]=r;return Q(a)&&typeof o=="string"&&o in D&&t.length===0}var Q=(r)=>typeof r=="function"&&r.length===1;function h(...r){return y(z,r)}var z=(r,a)=>[...r].sort(a);function I(r){if(typeof r!="object"||r===null)return!1;let a=Object.getPrototypeOf(r);return a===null||a===Object.prototype}function A(...r){return m(T,r)}function T(r,a){let o={...r,...a};for(let t in a){if(!(t in r))continue;let{[t]:s}=r;if(!I(s))continue;let{[t]:i}=a;I(i)&&(o[t]=T(s,i))}return o}function L(...r){return m(R,r,W)}var R=(r,a)=>r.map(a),W=(r)=>(a,o,t)=>({done:!1,hasNext:!0,next:r(a,o,t)});function k(...r){return x(M,r)}function M(r){let a=r,o=new Set;return(t,s,i)=>{let e=a(t,s,i);return o.has(e)?u:(o.add(e),{done:!1,hasNext:!0,next:t})}}function w(...r){return m(U,r)}function U(r,a){let o={};for(let[t,s]of Object.entries(r))a(s,t,r)&&(o[t]=s);return o}function c(...r){return m(V,r)}var V=(r,a)=>r.length>=a;function F(...r){return m(q,r)}function q(r,a){if(!c(a,1))return{...r};if(!c(a,2)){let{[a[0]]:t,...s}=r;return s}let o={...r};for(let t of a)delete o[t];return o}function H(...r){return m(K,r)}function K(r,a){let o={};for(let[t,s]of Object.entries(r)){let i=a(s,t,r);o[t]=i}return o}function G(...r){return m(J,r)}var J=(r,a)=>{let o=Object.create(null);for(let t=0;t<r.length;t++){let s=r[t],i=a(s,t,r);if(i!==void 0){let e=o[i];e===void 0?o[i]=[s]:e.push(s)}}return Object.setPrototypeOf(o,Object.prototype),o};function X(...r){return m(d,r)}function d(r,a){if(r===a||Object.is(r,a))return!0;if(typeof r!="object"||typeof a!="object"||r===null||a===null||Object.getPrototypeOf(r)!==Object.getPrototypeOf(a))return!1;if(Array.isArray(r))return Y(r,a);if(r instanceof Map)return Z(r,a);if(r instanceof Set)return $(r,a);if(r instanceof Date)return r.getTime()===a.getTime();if(r instanceof RegExp)return r.toString()===a.toString();if(Object.keys(r).length!==Object.keys(a).length)return!1;for(let[o,t]of Object.entries(r))if(!(o in a)||!d(t,a[o]))return!1;return!0}function Y(r,a){if(r.length!==a.length)return!1;for(let[o,t]of r.entries())if(!d(t,a[o]))return!1;return!0}function Z(r,a){if(r.size!==a.size)return!1;for(let[o,t]of r.entries())if(!a.has(o)||!d(t,a.get(o)))return!1;return!0}function $(r,a){if(r.size!==a.size)return!1;let o=[...a];for(let t of r){let s=!1;for(let[i,e]of o.entries())if(d(t,e)){s=!0,o.splice(i,1);break}if(!s)return!1}return!0}function rr(...r){return y(ar,r)}function ar(r,a){if(!c(r,2))return r[0];let[o]=r,[,...t]=r;for(let s of t)a(s,o)<0&&(o=s);return o}function or(...r){return m(tr,r,sr)}var tr=(r,a)=>r.flatMap(a),sr=(r)=>(a,o,t)=>{let s=r(a,o,t);return Array.isArray(s)?{done:!1,hasNext:!0,hasMany:!0,next:s}:{done:!1,hasNext:!0,next:s}};function ir(...r){return m(Object.entries,r)}function mr(...r){return m(er,r,nr)}var er=(r,a)=>r.filter(a),nr=(r)=>(a,o,t)=>r(a,o,t)?{done:!1,hasNext:!0,next:a}:u;var lr={};fr(lr,{match:()=>O,allStructured:()=>ur,all:()=>pr});function O(r,a){if(r)r=r.replaceAll("\\","/");if(a)a=a.replaceAll("\\","/");let o=a.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");if(o.endsWith(" .*"))o=o.slice(0,-3)+"( .*)?";let t=process.platform==="win32"?"si":"s";return new RegExp("^"+o+"$",t).test(r)}function pr(r,a){let o=l(a,Object.entries,h([([s])=>s.length,"asc"],[([s])=>s,"asc"])),t=void 0;for(let[s,i]of o)if(O(r,s)){t=i;continue}return t}function ur(r,a){let o=l(a,Object.entries,h([([s])=>s.length,"asc"],[([s])=>s,"asc"])),t=void 0;for(let[s,i]of o){let e=s.split(/\s+/);if(!O(r.head,e[0]))continue;if(e.length===1||E(r.tail,e.slice(1))){t=i;continue}}return t}function E(r,a){if(a.length===0)return!0;let[o,...t]=a;if(o==="*")return E(r,t);for(let s=0;s<r.length;s++)if(O(r[s],o)&&E(r.slice(s+1),t))return!0;return!1}var Jm="QITQODE_RUN_ID",Xm="QITQODE_PROCESS_ROLE";function cr(){return process.env.QITQODE_RUN_ID??=crypto.randomUUID()}function dr(r){return process.env.QITQODE_PROCESS_ROLE??=r}function Ym(r){return{runID:cr(),processRole:dr(r)}}function Zm(r){let a=Object.fromEntries(Object.entries(process.env).filter((o)=>o[1]!==void 0));return r?Object.assign(a,r):a}
3
- export{gr as ct,xr as dt,yr as et,hr as ft,l as gt,B as ht,k as it,C as jt,h as kt,w as lt,A as mt,F as nt,H as ot,L as pt,G as qt,X as rt,rr as st,or as tt,ir as ut,mr as vt,O as wt,lr as xt,Jm as yt,Xm as zt,cr as At,Ym as Bt,Zm as Ct};
2
+ import{wP as fr}from"./chunk-sh03ka27.js";var gr="0.2.14",xr="latest",yr="5548bbf8645467ab00354c90acabbfeca7064b21",hr=!1;var u={done:!1,hasNext:!1};function l(r,...a){let o=r,t=a.map((i)=>("lazy"in i)?v(i):void 0),s=0;for(;s<a.length;){if(t[s]===void 0||!S(o)){let n=a[s];o=n(o),s+=1;continue}let i=[];for(let n=s;n<a.length;n++){let f=t[n];if(f===void 0||(i.push(f),f.isSingle))break}let e=[];for(let n of o)if(j(n,e,i))break;let{isSingle:p}=i.at(-1);o=p?e[0]:e,s+=i.length}return o}function j(r,a,o){if(o.length===0)return a.push(r),!1;let t=r,s=u,i=!1;for(let[e,p]of o.entries()){let{index:n,items:f}=p;if(f.push(t),s=p(t,n,f),p.index+=1,s.hasNext){if(s.hasMany??!1){for(let g of s.next)if(j(g,a,o.slice(e+1)))return!0;return i}t=s.next}if(!s.hasNext)break;s.done&&(i=!0)}return s.hasNext&&a.push(t),i}function v(r){let{lazy:a,lazyArgs:o}=r,t=a(...o);return Object.assign(t,{isSingle:a.single??!1,index:0,items:[]})}function S(r){return typeof r=="string"||typeof r=="object"&&r!==null&&Symbol.iterator in r}function x(r,a){let o=a.length-r.length;if(o===1){let[t,...s]=a;return l(t,{lazy:r,lazyArgs:s})}if(o===0){let t={lazy:r,lazyArgs:a};return Object.assign((s)=>l(s,t),t)}throw Error("Wrong number of arguments")}function B(...r){return x(_,r)}function _(){let r=new Set;return(a)=>r.has(a)?u:(r.add(a),{done:!1,hasNext:!0,next:a})}function N(r,a,o){let t=(s)=>r(s,...a);return o===void 0?t:Object.assign(t,{lazy:o,lazyArgs:a})}function m(r,a,o){let t=r.length-a.length;if(t===0)return r(...a);if(t===1)return N(r,a,o);throw Error("Wrong number of arguments")}function C(...r){return m(Object.values,r)}var D={asc:(r,a)=>r>a,desc:(r,a)=>r<a};function y(r,a){let[o,...t]=a;if(!P(o)){let i=b(...t);return r(o,i)}let s=b(o,...t);return(i)=>r(i,s)}function b(r,a,...o){let t=typeof r=="function"?r:r[0],s=typeof r=="function"?"asc":r[1],{[s]:i}=D,e=a===void 0?void 0:b(a,...o);return(p,n)=>{let f=t(p),g=t(n);return i(f,g)?1:i(g,f)?-1:e?.(p,n)??0}}function P(r){if(Q(r))return!0;if(typeof r!="object"||!Array.isArray(r))return!1;let[a,o,...t]=r;return Q(a)&&typeof o=="string"&&o in D&&t.length===0}var Q=(r)=>typeof r=="function"&&r.length===1;function h(...r){return y(z,r)}var z=(r,a)=>[...r].sort(a);function I(r){if(typeof r!="object"||r===null)return!1;let a=Object.getPrototypeOf(r);return a===null||a===Object.prototype}function A(...r){return m(T,r)}function T(r,a){let o={...r,...a};for(let t in a){if(!(t in r))continue;let{[t]:s}=r;if(!I(s))continue;let{[t]:i}=a;I(i)&&(o[t]=T(s,i))}return o}function L(...r){return m(R,r,W)}var R=(r,a)=>r.map(a),W=(r)=>(a,o,t)=>({done:!1,hasNext:!0,next:r(a,o,t)});function k(...r){return x(M,r)}function M(r){let a=r,o=new Set;return(t,s,i)=>{let e=a(t,s,i);return o.has(e)?u:(o.add(e),{done:!1,hasNext:!0,next:t})}}function w(...r){return m(U,r)}function U(r,a){let o={};for(let[t,s]of Object.entries(r))a(s,t,r)&&(o[t]=s);return o}function c(...r){return m(V,r)}var V=(r,a)=>r.length>=a;function F(...r){return m(q,r)}function q(r,a){if(!c(a,1))return{...r};if(!c(a,2)){let{[a[0]]:t,...s}=r;return s}let o={...r};for(let t of a)delete o[t];return o}function H(...r){return m(K,r)}function K(r,a){let o={};for(let[t,s]of Object.entries(r)){let i=a(s,t,r);o[t]=i}return o}function G(...r){return m(J,r)}var J=(r,a)=>{let o=Object.create(null);for(let t=0;t<r.length;t++){let s=r[t],i=a(s,t,r);if(i!==void 0){let e=o[i];e===void 0?o[i]=[s]:e.push(s)}}return Object.setPrototypeOf(o,Object.prototype),o};function X(...r){return m(d,r)}function d(r,a){if(r===a||Object.is(r,a))return!0;if(typeof r!="object"||typeof a!="object"||r===null||a===null||Object.getPrototypeOf(r)!==Object.getPrototypeOf(a))return!1;if(Array.isArray(r))return Y(r,a);if(r instanceof Map)return Z(r,a);if(r instanceof Set)return $(r,a);if(r instanceof Date)return r.getTime()===a.getTime();if(r instanceof RegExp)return r.toString()===a.toString();if(Object.keys(r).length!==Object.keys(a).length)return!1;for(let[o,t]of Object.entries(r))if(!(o in a)||!d(t,a[o]))return!1;return!0}function Y(r,a){if(r.length!==a.length)return!1;for(let[o,t]of r.entries())if(!d(t,a[o]))return!1;return!0}function Z(r,a){if(r.size!==a.size)return!1;for(let[o,t]of r.entries())if(!a.has(o)||!d(t,a.get(o)))return!1;return!0}function $(r,a){if(r.size!==a.size)return!1;let o=[...a];for(let t of r){let s=!1;for(let[i,e]of o.entries())if(d(t,e)){s=!0,o.splice(i,1);break}if(!s)return!1}return!0}function rr(...r){return y(ar,r)}function ar(r,a){if(!c(r,2))return r[0];let[o]=r,[,...t]=r;for(let s of t)a(s,o)<0&&(o=s);return o}function or(...r){return m(tr,r,sr)}var tr=(r,a)=>r.flatMap(a),sr=(r)=>(a,o,t)=>{let s=r(a,o,t);return Array.isArray(s)?{done:!1,hasNext:!0,hasMany:!0,next:s}:{done:!1,hasNext:!0,next:s}};function ir(...r){return m(Object.entries,r)}function mr(...r){return m(er,r,nr)}var er=(r,a)=>r.filter(a),nr=(r)=>(a,o,t)=>r(a,o,t)?{done:!1,hasNext:!0,next:a}:u;var lr={};fr(lr,{match:()=>O,allStructured:()=>ur,all:()=>pr});function O(r,a){if(r)r=r.replaceAll("\\","/");if(a)a=a.replaceAll("\\","/");let o=a.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");if(o.endsWith(" .*"))o=o.slice(0,-3)+"( .*)?";let t=process.platform==="win32"?"si":"s";return new RegExp("^"+o+"$",t).test(r)}function pr(r,a){let o=l(a,Object.entries,h([([s])=>s.length,"asc"],[([s])=>s,"asc"])),t=void 0;for(let[s,i]of o)if(O(r,s)){t=i;continue}return t}function ur(r,a){let o=l(a,Object.entries,h([([s])=>s.length,"asc"],[([s])=>s,"asc"])),t=void 0;for(let[s,i]of o){let e=s.split(/\s+/);if(!O(r.head,e[0]))continue;if(e.length===1||E(r.tail,e.slice(1))){t=i;continue}}return t}function E(r,a){if(a.length===0)return!0;let[o,...t]=a;if(o==="*")return E(r,t);for(let s=0;s<r.length;s++)if(O(r[s],o)&&E(r.slice(s+1),t))return!0;return!1}var Jm="QITQODE_RUN_ID",Xm="QITQODE_PROCESS_ROLE";function cr(){return process.env.QITQODE_RUN_ID??=crypto.randomUUID()}function dr(r){return process.env.QITQODE_PROCESS_ROLE??=r}function Ym(r){return{runID:cr(),processRole:dr(r)}}function Zm(r){let a=Object.fromEntries(Object.entries(process.env).filter((o)=>o[1]!==void 0));return r?Object.assign(a,r):a}
3
+ export{gr as ft,xr as gt,yr as ht,hr as it,l as jt,B as kt,k as lt,C as mt,h as nt,w as ot,A as pt,F as qt,H as rt,L as st,G as tt,X as ut,rr as vt,or as wt,ir as xt,mr as yt,O as zt,lr as At,Jm as Bt,Xm as Ct,cr as Dt,Ym as Et,Zm as Ft};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-0xf12tf3.js";var e={"ui.sessionReview.title":"Altera\xE7\xF5es da sess\xE3o","ui.sessionReview.title.lastTurn":"Altera\xE7\xF5es do \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir ficheiro","ui.sessionReview.selection.line":"linha {{line}}","ui.sessionReview.selection.lines":"linhas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir tudo","ui.sessionReview.collapseAll":"Recolher tudo","ui.sessionReview.change.added":"Adicionado","ui.sessionReview.change.removed":"Removido","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"A carregar...","ui.sessionReview.image.placeholder":"Imagem","ui.sessionReview.largeDiff.title":"Diff demasiado grande para renderizar","ui.sessionReview.largeDiff.meta":"Limite: {{limit}} linhas alteradas. Atual: {{current}} linhas alteradas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar mesmo assim","ui.fileMedia.kind.image":"imagem","ui.fileMedia.kind.audio":"\xE1udio","ui.fileMedia.state.removed":"Ficheiro de {{kind}} removido.","ui.fileMedia.state.loading":"A carregar {{kind}}...","ui.fileMedia.state.error":"Imposs\xEDvel carregar {{kind}}.","ui.fileMedia.state.unavailable":"Pr\xE9-visualiza\xE7\xE3o de {{kind}} indispon\xEDvel.","ui.fileMedia.binary.title":"Ficheiro bin\xE1rio","ui.fileMedia.binary.description.path":"{{path}} \xE9 bin\xE1rio.","ui.fileMedia.binary.description.default":"Conte\xFAdo bin\xE1rio","ui.lineComment.label.prefix":"Comentar em ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"A comentar em ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Adicionar coment\xE1rio","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar passos","ui.sessionTurn.steps.hide":"Ocultar passos","ui.sessionTurn.summary.response":"Resposta","ui.sessionTurn.diff.showMore":"Mostrar mais altera\xE7\xF5es ({{count}})","ui.sessionTurn.diffs.changed":"Alterado","ui.sessionTurn.diffs.showAll":"Mostrar tudo","ui.sessionTurn.diffs.showLess":"Mostrar menos","ui.sessionTurn.diffs.more":"+{{count}} ficheiros","ui.sessionTurn.retry.retrying":"a tentar novamente","ui.sessionTurn.retry.inSeconds":"em {{seconds}}s","ui.sessionTurn.retry.attempt":"tentativa #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentativa #{{attempt}}","ui.sessionTurn.retry.geminiHot":"o gemini est\xE1 sobrecarregado neste momento","ui.sessionTurn.error.freeUsageExceeded":"Limite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"Adicionar cr\xE9ditos","ui.sessionTurn.status.delegating":"A delegar trabalho","ui.sessionTurn.status.planning":"A planear os pr\xF3ximos passos","ui.sessionTurn.status.gatheringContext":"A explorar","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"A pesquisar no c\xF3digo","ui.sessionTurn.status.searchingWeb":"A pesquisar na web","ui.sessionTurn.status.makingEdits":"A fazer edi\xE7\xF5es","ui.sessionTurn.status.runningCommands":"A executar comandos","ui.sessionTurn.status.thinking":"A pensar","ui.sessionTurn.status.thinkingWithTopic":"A pensar - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"A recolher pensamentos","ui.sessionTurn.status.consideringNextSteps":"A considerar os pr\xF3ximos passos","ui.messagePart.diagnostic.error":"Erro","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escrever","ui.messagePart.option.typeOwnAnswer":"Escreva a sua pr\xF3pria resposta","ui.messagePart.review.title":"Reveja as suas respostas","ui.messagePart.questions.dismissed":"Perguntas ignoradas","ui.messagePart.compaction":"Sess\xE3o compactada","ui.messagePart.context.read.one":"{{count}} leitura","ui.messagePart.context.read.other":"{{count}} leituras","ui.messagePart.context.search.one":"{{count}} pesquisa","ui.messagePart.context.search.other":"{{count}} pesquisas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.list.loading":"A carregar","ui.list.empty":"Sem resultados","ui.list.clearFilter":"Limpar filtro","ui.list.emptyWithFilter.prefix":"Sem resultados para","ui.list.emptyWithFilter.suffix":"","ui.fileSearch.placeholder":"Localizar","ui.fileSearch.previousMatch":"Correspond\xEAncia anterior","ui.fileSearch.nextMatch":"Pr\xF3xima correspond\xEAncia","ui.fileSearch.close":"Fechar pesquisa","ui.messageNav.newMessage":"Nova mensagem","ui.textField.copyToClipboard":"Copiar para a \xE1rea de transfer\xEAncia","ui.textField.copyLink":"Copiar liga\xE7\xE3o","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Pr\xE9-visualiza\xE7\xE3o de imagem","ui.scrollView.ariaLabel":"conte\xFAdo desloc\xE1vel","ui.tool.read":"Ler","ui.tool.loaded":"Carregado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.task":"Tarefa","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Pesquisa Web","ui.tool.codesearch":"Pesquisa de C\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Tarefas","ui.tool.todos.read":"Ler tarefas","ui.tool.questions":"Perguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.tool.skill":"Skill","ui.basicTool.called":"Chamado `{{tool}}`","ui.toolErrorCard.failed":"Falhou","ui.toolErrorCard.copyError":"Copiar erro","ui.common.file.one":"ficheiro","ui.common.file.other":"ficheiros","ui.common.question.one":"pergunta","ui.common.question.other":"perguntas","ui.common.add":"Adicionar","ui.common.back":"Voltar","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Ignorar","ui.common.close":"Fechar","ui.common.next":"Seguinte","ui.common.submit":"Enviar","ui.permission.deny":"Negar","ui.permission.allowAlways":"Permitir sempre","ui.permission.allowOnce":"Permitir uma vez","ui.message.expand":"Expandir mensagem","ui.message.collapse":"Recolher mensagem","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensagem","ui.message.forkMessage":"Bifurcar para nova sess\xE3o","ui.message.revertMessage":"Reverter mensagem","ui.message.copyResponse":"Copiar resposta","ui.message.copied":"Copiado","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s","ui.message.interrupted":"Interrompido","ui.message.queued":"Em fila","ui.message.attachment.alt":"anexo","ui.patch.action.deleted":"Eliminado","ui.patch.action.created":"Criado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Corrigido","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sem resposta)","ui.question.review.notAnswered":"(n\xE3o respondida)","ui.question.multiHint":"Selecione todas as que se aplicam","ui.question.singleHint":"Selecione uma resposta","ui.question.custom.placeholder":"Escreva a sua resposta..."};export{e as dict};
2
+ import"./chunk-sh03ka27.js";var e={"ui.sessionReview.title":"Altera\xE7\xF5es da sess\xE3o","ui.sessionReview.title.lastTurn":"Altera\xE7\xF5es do \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir ficheiro","ui.sessionReview.selection.line":"linha {{line}}","ui.sessionReview.selection.lines":"linhas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir tudo","ui.sessionReview.collapseAll":"Recolher tudo","ui.sessionReview.change.added":"Adicionado","ui.sessionReview.change.removed":"Removido","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"A carregar...","ui.sessionReview.image.placeholder":"Imagem","ui.sessionReview.largeDiff.title":"Diff demasiado grande para renderizar","ui.sessionReview.largeDiff.meta":"Limite: {{limit}} linhas alteradas. Atual: {{current}} linhas alteradas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar mesmo assim","ui.fileMedia.kind.image":"imagem","ui.fileMedia.kind.audio":"\xE1udio","ui.fileMedia.state.removed":"Ficheiro de {{kind}} removido.","ui.fileMedia.state.loading":"A carregar {{kind}}...","ui.fileMedia.state.error":"Imposs\xEDvel carregar {{kind}}.","ui.fileMedia.state.unavailable":"Pr\xE9-visualiza\xE7\xE3o de {{kind}} indispon\xEDvel.","ui.fileMedia.binary.title":"Ficheiro bin\xE1rio","ui.fileMedia.binary.description.path":"{{path}} \xE9 bin\xE1rio.","ui.fileMedia.binary.description.default":"Conte\xFAdo bin\xE1rio","ui.lineComment.label.prefix":"Comentar em ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"A comentar em ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Adicionar coment\xE1rio","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar passos","ui.sessionTurn.steps.hide":"Ocultar passos","ui.sessionTurn.summary.response":"Resposta","ui.sessionTurn.diff.showMore":"Mostrar mais altera\xE7\xF5es ({{count}})","ui.sessionTurn.diffs.changed":"Alterado","ui.sessionTurn.diffs.showAll":"Mostrar tudo","ui.sessionTurn.diffs.showLess":"Mostrar menos","ui.sessionTurn.diffs.more":"+{{count}} ficheiros","ui.sessionTurn.retry.retrying":"a tentar novamente","ui.sessionTurn.retry.inSeconds":"em {{seconds}}s","ui.sessionTurn.retry.attempt":"tentativa #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentativa #{{attempt}}","ui.sessionTurn.retry.geminiHot":"o gemini est\xE1 sobrecarregado neste momento","ui.sessionTurn.error.freeUsageExceeded":"Limite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"Adicionar cr\xE9ditos","ui.sessionTurn.status.delegating":"A delegar trabalho","ui.sessionTurn.status.planning":"A planear os pr\xF3ximos passos","ui.sessionTurn.status.gatheringContext":"A explorar","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"A pesquisar no c\xF3digo","ui.sessionTurn.status.searchingWeb":"A pesquisar na web","ui.sessionTurn.status.makingEdits":"A fazer edi\xE7\xF5es","ui.sessionTurn.status.runningCommands":"A executar comandos","ui.sessionTurn.status.thinking":"A pensar","ui.sessionTurn.status.thinkingWithTopic":"A pensar - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"A recolher pensamentos","ui.sessionTurn.status.consideringNextSteps":"A considerar os pr\xF3ximos passos","ui.messagePart.diagnostic.error":"Erro","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escrever","ui.messagePart.option.typeOwnAnswer":"Escreva a sua pr\xF3pria resposta","ui.messagePart.review.title":"Reveja as suas respostas","ui.messagePart.questions.dismissed":"Perguntas ignoradas","ui.messagePart.compaction":"Sess\xE3o compactada","ui.messagePart.context.read.one":"{{count}} leitura","ui.messagePart.context.read.other":"{{count}} leituras","ui.messagePart.context.search.one":"{{count}} pesquisa","ui.messagePart.context.search.other":"{{count}} pesquisas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.list.loading":"A carregar","ui.list.empty":"Sem resultados","ui.list.clearFilter":"Limpar filtro","ui.list.emptyWithFilter.prefix":"Sem resultados para","ui.list.emptyWithFilter.suffix":"","ui.fileSearch.placeholder":"Localizar","ui.fileSearch.previousMatch":"Correspond\xEAncia anterior","ui.fileSearch.nextMatch":"Pr\xF3xima correspond\xEAncia","ui.fileSearch.close":"Fechar pesquisa","ui.messageNav.newMessage":"Nova mensagem","ui.textField.copyToClipboard":"Copiar para a \xE1rea de transfer\xEAncia","ui.textField.copyLink":"Copiar liga\xE7\xE3o","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Pr\xE9-visualiza\xE7\xE3o de imagem","ui.scrollView.ariaLabel":"conte\xFAdo desloc\xE1vel","ui.tool.read":"Ler","ui.tool.loaded":"Carregado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.task":"Tarefa","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Pesquisa Web","ui.tool.codesearch":"Pesquisa de C\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Tarefas","ui.tool.todos.read":"Ler tarefas","ui.tool.questions":"Perguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.tool.skill":"Skill","ui.basicTool.called":"Chamado `{{tool}}`","ui.toolErrorCard.failed":"Falhou","ui.toolErrorCard.copyError":"Copiar erro","ui.common.file.one":"ficheiro","ui.common.file.other":"ficheiros","ui.common.question.one":"pergunta","ui.common.question.other":"perguntas","ui.common.add":"Adicionar","ui.common.back":"Voltar","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Ignorar","ui.common.close":"Fechar","ui.common.next":"Seguinte","ui.common.submit":"Enviar","ui.permission.deny":"Negar","ui.permission.allowAlways":"Permitir sempre","ui.permission.allowOnce":"Permitir uma vez","ui.message.expand":"Expandir mensagem","ui.message.collapse":"Recolher mensagem","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensagem","ui.message.forkMessage":"Bifurcar para nova sess\xE3o","ui.message.revertMessage":"Reverter mensagem","ui.message.copyResponse":"Copiar resposta","ui.message.copied":"Copiado","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s","ui.message.interrupted":"Interrompido","ui.message.queued":"Em fila","ui.message.attachment.alt":"anexo","ui.patch.action.deleted":"Eliminado","ui.patch.action.created":"Criado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Corrigido","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sem resposta)","ui.question.review.notAnswered":"(n\xE3o respondida)","ui.question.multiHint":"Selecione todas as que se aplicam","ui.question.singleHint":"Selecione uma resposta","ui.question.custom.placeholder":"Escreva a sua resposta..."};export{e as dict};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Jg as r}from"./chunk-4s1n38ds.js";import{yP as o}from"./chunk-sh03ka27.js";var c=new r("zod v4");async function m(){return async(n,e)=>{let t;if("_zod"in n)try{t=(await import("./chunk-s9epttpy.js")).toJSONSchema}catch{throw c}else try{t=(await import("./chunk-nyxn7npc.js")).zodToJsonSchema}catch{throw new r("zod-to-json-schema")}return t(n,e)}}export{m as default};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{xf as Lh}from"./chunk-dwjv3m5s.js";import{yf as Mt}from"./chunk-pfen4ekj.js";import"./chunk-gjmxrz0v.js";import{Gf as eh}from"./chunk-hcd0k14e.js";import{Hf as hh,Jf as gt}from"./chunk-vvcyvdnk.js";import{$p as wt,Bq as _,Eq as th,Fq as Ct,Gp as Y,Kp as vt,Mp as lt,Np as bt,Wp as _t,Zp as Lt,_p as ft,eq as jt,fq as o,hq as St,jq as dt,kq as et,mq as pt,oq as ot,rq as v,sq as r,yq as E,zq as k}from"./chunk-hsmtjb4d.js";import{Jq as rt,Sq as kt,Uq as I}from"./chunk-7nh8vjx4.js";import"./chunk-cqtkxwd8.js";import"./chunk-mfg4stzn.js";import{Iu as h}from"./chunk-zgj7jx8k.js";import"./chunk-0mdmqtfr.js";import{rP as ut}from"./chunk-0xf12tf3.js";var Ft=ut(Mt(),1);var J=ut(eh(),1);class ht{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776000||t<-9223372036854776000)throw Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let s=new Uint8Array(8);for(let a=7,y=Math.abs(Math.round(t));a>-1&&y>0;a--,y/=256)s[a]=y;if(t<0)Qt(s);return new ht(s)}valueOf(){let t=this.bytes.slice(0),s=t[0]&128;if(s)Qt(t);return parseInt(J.toHex(t),16)*(s?-1:1)}toString(){return String(this.valueOf())}}function Qt(t){for(let s=0;s<8;s++)t[s]^=255;for(let s=7;s>-1;s--)if(t[s]++,t[s]!==0)break}class Ut{toUtf8;fromUtf8;constructor(t,s){this.toUtf8=t,this.fromUtf8=s}format(t){let s=[];for(let w of Object.keys(t)){let f=this.fromUtf8(w);s.push(Uint8Array.from([f.byteLength]),f,this.formatHeaderValue(t[w]))}let a=new Uint8Array(s.reduce((w,f)=>w+f.byteLength,0)),y=0;for(let w of s)a.set(w,y),y+=w.byteLength;return a}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":let s=new DataView(new ArrayBuffer(3));return s.setUint8(0,3),s.setInt16(1,t.value,!1),new Uint8Array(s.buffer);case"integer":let a=new DataView(new ArrayBuffer(5));return a.setUint8(0,4),a.setInt32(1,t.value,!1),new Uint8Array(a.buffer);case"long":let y=new Uint8Array(9);return y[0]=5,y.set(t.value.bytes,1),y;case"binary":let w=new DataView(new ArrayBuffer(3+t.value.byteLength));w.setUint8(0,6),w.setUint16(1,t.value.byteLength,!1);let f=new Uint8Array(w.buffer);return f.set(t.value,3),f;case"string":let S=this.fromUtf8(t.value),g=new DataView(new ArrayBuffer(3+S.byteLength));g.setUint8(0,7),g.setUint16(1,S.byteLength,!1);let c=new Uint8Array(g.buffer);return c.set(S,3),c;case"timestamp":let T=new Uint8Array(9);return T[0]=8,T.set(ht.fromNumber(t.value.valueOf()).bytes,1),T;case"uuid":if(!Gh.test(t.value))throw Error(`Invalid UUID received: ${t.value}`);let N=new Uint8Array(17);return N[0]=9,N.set(J.fromHex(t.value.replace(/\-/g,"")),1),N}}parse(t){let s={},a=0;while(a<t.byteLength){let y=t.getUint8(a++),w=this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+a,y));switch(a+=y,t.getUint8(a++)){case 0:s[w]={type:Zt,value:!0};break;case 1:s[w]={type:Zt,value:!1};break;case 2:s[w]={type:gh,value:t.getInt8(a++)};break;case 3:s[w]={type:Ah,value:t.getInt16(a,!1)},a+=2;break;case 4:s[w]={type:mh,value:t.getInt32(a,!1)},a+=4;break;case 5:s[w]={type:Uh,value:new ht(new Uint8Array(t.buffer,t.byteOffset+a,8))},a+=8;break;case 6:let f=t.getUint16(a,!1);a+=2,s[w]={type:zh,value:new Uint8Array(t.buffer,t.byteOffset+a,f)},a+=f;break;case 7:let S=t.getUint16(a,!1);a+=2,s[w]={type:Nh,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+a,S))},a+=S;break;case 8:s[w]={type:Th,value:new Date(new ht(new Uint8Array(t.buffer,t.byteOffset+a,8)).valueOf())},a+=8;break;case 9:let g=new Uint8Array(t.buffer,t.byteOffset+a,16);a+=16,s[w]={type:$h,value:`${J.toHex(g.subarray(0,4))}-${J.toHex(g.subarray(4,6))}-${J.toHex(g.subarray(6,8))}-${J.toHex(g.subarray(8,10))}-${J.toHex(g.subarray(10))}`};break;default:throw Error("Unrecognized header type tag")}}return s}}var xt;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(xt||(xt={}));var Zt="boolean",gh="byte",Ah="short",mh="integer",Uh="long",zh="binary",Nh="string",Th="timestamp",$h="uuid",Gh=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var Dt=ut(Mt(),1),Vt=4,l=Vt*2,p=4,Xh=l+p*2;function qt({byteLength:t,byteOffset:s,buffer:a}){if(t<Xh)throw Error("Provided message too short to accommodate event stream message overhead");let y=new DataView(a,s,t),w=y.getUint32(0,!1);if(t!==w)throw Error("Reported message length does not match received message length");let f=y.getUint32(Vt,!1),S=y.getUint32(l,!1),g=y.getUint32(t-p,!1),c=new Dt.Crc32().update(new Uint8Array(a,s,l));if(S!==c.digest())throw Error(`The prelude checksum specified in the message (${S}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(a,s+l,t-(l+p))),g!==c.digest())throw Error(`The message checksum (${c.digest()}) did not match the expected value of ${g}`);return{headers:new DataView(a,s+l+p,f),body:new Uint8Array(a,s+l+p+f,w-f-(l+p+p))}}class zt{headerMarshaller;messageBuffer;isEndOfStream;constructor(t,s){this.headerMarshaller=new Ut(t,s),this.messageBuffer=[],this.isEndOfStream=!1}feed(t){this.messageBuffer.push(this.decode(t))}endOfStream(){this.isEndOfStream=!0}getMessage(){let t=this.messageBuffer.pop(),s=this.isEndOfStream;return{getMessage(){return t},isEndOfStream(){return s}}}getAvailableMessages(){let t=this.messageBuffer;this.messageBuffer=[];let s=this.isEndOfStream;return{getMessages(){return t},isEndOfStream(){return s}}}encode({headers:t,body:s}){let a=this.headerMarshaller.format(t),y=a.byteLength+s.byteLength+16,w=new Uint8Array(y),f=new DataView(w.buffer,w.byteOffset,w.byteLength),S=new Ft.Crc32;return f.setUint32(0,y,!1),f.setUint32(4,a.byteLength,!1),f.setUint32(8,S.update(w.subarray(0,8)).digest(),!1),w.set(a,12),w.set(s,a.byteLength+12),f.setUint32(y-4,S.update(w.subarray(8,y-4)).digest(),!1),w}decode(t){let{headers:s,body:a}=qt(t);return{headers:this.headerMarshaller.parse(s),body:a}}formatHeaders(t){return this.headerMarshaller.format(t)}}var At=ut(Lh(),1);var Tt=new TextEncoder,bh={appstream2:"appstream",cloudhsmv2:"cloudhsm",email:"ses",marketplace:"aws-marketplace",mobile:"AWSMobileHubService",pinpoint:"mobiletargeting",queue:"sqs","git-codecommit":"codecommit","mturk-requester-sandbox":"mturk-requester","personalize-runtime":"personalize"},jh=new Set(["authorization","content-type","content-length","user-agent","presigned-expires","expect","x-amzn-trace-id","range","connection"]);class $t{constructor({method:t,url:s,headers:a,body:y,accessKeyId:w,secretAccessKey:f,sessionToken:S,service:g,region:c,cache:T,datetime:N,signQuery:j,appendSessionToken:e,allHeaders:A,singleEncode:m}){if(s==null)throw TypeError("url is a required option");if(w==null)throw TypeError("accessKeyId is a required option");if(f==null)throw TypeError("secretAccessKey is a required option");this.method=t||(y?"POST":"GET"),this.url=new URL(s),this.headers=new Headers(a||{}),this.body=y,this.accessKeyId=w,this.secretAccessKey=f,this.sessionToken=S;let $,i;if(!g||!c)[$,i]=Ch(this.url,this.headers);if(this.service=g||$||"",this.region=c||i||"us-east-1",this.cache=T||new Map,this.datetime=N||new Date().toISOString().replace(/[:-]|\.\d{3}/g,""),this.signQuery=j,this.appendSessionToken=e||this.service==="iotdevicegateway",this.headers.delete("Host"),this.service==="s3"&&!this.signQuery&&!this.headers.has("X-Amz-Content-Sha256"))this.headers.set("X-Amz-Content-Sha256","UNSIGNED-PAYLOAD");let H=this.signQuery?this.url.searchParams:this.headers;if(H.set("X-Amz-Date",this.datetime),this.sessionToken&&!this.appendSessionToken)H.set("X-Amz-Security-Token",this.sessionToken);if(this.signableHeaders=["host",...this.headers.keys()].filter((u)=>A||!jh.has(u)).sort(),this.signedHeaders=this.signableHeaders.join(";"),this.canonicalHeaders=this.signableHeaders.map((u)=>u+":"+(u==="host"?this.url.host:(this.headers.get(u)||"").replace(/\s+/g," "))).join(`
2
+ import{zf as Lh}from"./chunk-175720ws.js";import{Af as Mt}from"./chunk-q1dmxn63.js";import"./chunk-b350g18y.js";import{If as eh}from"./chunk-48rg4yhk.js";import{Jf as hh,Lf as gt}from"./chunk-vr13f6b5.js";import{Bq as E,Cq as k,Eq as _,Hq as th,Iq as Ct,Jp as Y,Np as vt,Pp as lt,Qp as bt,Zp as _t,aq as Lt,bq as ft,cq as wt,hq as jt,iq as o,kq as St,mq as dt,nq as et,pq as pt,rq as ot,uq as v,vq as r}from"./chunk-1bq15kf0.js";import{Mq as rt,Vq as kt,Xq as I}from"./chunk-pdcxmr6x.js";import"./chunk-cqtkxwd8.js";import"./chunk-a1mbach4.js";import{Lu as h}from"./chunk-sg9enzsp.js";import"./chunk-5q98z8ck.js";import{uP as ut}from"./chunk-sh03ka27.js";var Ft=ut(Mt(),1);var J=ut(eh(),1);class ht{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776000||t<-9223372036854776000)throw Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let s=new Uint8Array(8);for(let a=7,y=Math.abs(Math.round(t));a>-1&&y>0;a--,y/=256)s[a]=y;if(t<0)Qt(s);return new ht(s)}valueOf(){let t=this.bytes.slice(0),s=t[0]&128;if(s)Qt(t);return parseInt(J.toHex(t),16)*(s?-1:1)}toString(){return String(this.valueOf())}}function Qt(t){for(let s=0;s<8;s++)t[s]^=255;for(let s=7;s>-1;s--)if(t[s]++,t[s]!==0)break}class Ut{toUtf8;fromUtf8;constructor(t,s){this.toUtf8=t,this.fromUtf8=s}format(t){let s=[];for(let w of Object.keys(t)){let f=this.fromUtf8(w);s.push(Uint8Array.from([f.byteLength]),f,this.formatHeaderValue(t[w]))}let a=new Uint8Array(s.reduce((w,f)=>w+f.byteLength,0)),y=0;for(let w of s)a.set(w,y),y+=w.byteLength;return a}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":let s=new DataView(new ArrayBuffer(3));return s.setUint8(0,3),s.setInt16(1,t.value,!1),new Uint8Array(s.buffer);case"integer":let a=new DataView(new ArrayBuffer(5));return a.setUint8(0,4),a.setInt32(1,t.value,!1),new Uint8Array(a.buffer);case"long":let y=new Uint8Array(9);return y[0]=5,y.set(t.value.bytes,1),y;case"binary":let w=new DataView(new ArrayBuffer(3+t.value.byteLength));w.setUint8(0,6),w.setUint16(1,t.value.byteLength,!1);let f=new Uint8Array(w.buffer);return f.set(t.value,3),f;case"string":let S=this.fromUtf8(t.value),g=new DataView(new ArrayBuffer(3+S.byteLength));g.setUint8(0,7),g.setUint16(1,S.byteLength,!1);let c=new Uint8Array(g.buffer);return c.set(S,3),c;case"timestamp":let T=new Uint8Array(9);return T[0]=8,T.set(ht.fromNumber(t.value.valueOf()).bytes,1),T;case"uuid":if(!Gh.test(t.value))throw Error(`Invalid UUID received: ${t.value}`);let N=new Uint8Array(17);return N[0]=9,N.set(J.fromHex(t.value.replace(/\-/g,"")),1),N}}parse(t){let s={},a=0;while(a<t.byteLength){let y=t.getUint8(a++),w=this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+a,y));switch(a+=y,t.getUint8(a++)){case 0:s[w]={type:Zt,value:!0};break;case 1:s[w]={type:Zt,value:!1};break;case 2:s[w]={type:gh,value:t.getInt8(a++)};break;case 3:s[w]={type:Ah,value:t.getInt16(a,!1)},a+=2;break;case 4:s[w]={type:mh,value:t.getInt32(a,!1)},a+=4;break;case 5:s[w]={type:Uh,value:new ht(new Uint8Array(t.buffer,t.byteOffset+a,8))},a+=8;break;case 6:let f=t.getUint16(a,!1);a+=2,s[w]={type:zh,value:new Uint8Array(t.buffer,t.byteOffset+a,f)},a+=f;break;case 7:let S=t.getUint16(a,!1);a+=2,s[w]={type:Nh,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+a,S))},a+=S;break;case 8:s[w]={type:Th,value:new Date(new ht(new Uint8Array(t.buffer,t.byteOffset+a,8)).valueOf())},a+=8;break;case 9:let g=new Uint8Array(t.buffer,t.byteOffset+a,16);a+=16,s[w]={type:$h,value:`${J.toHex(g.subarray(0,4))}-${J.toHex(g.subarray(4,6))}-${J.toHex(g.subarray(6,8))}-${J.toHex(g.subarray(8,10))}-${J.toHex(g.subarray(10))}`};break;default:throw Error("Unrecognized header type tag")}}return s}}var xt;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(xt||(xt={}));var Zt="boolean",gh="byte",Ah="short",mh="integer",Uh="long",zh="binary",Nh="string",Th="timestamp",$h="uuid",Gh=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var Dt=ut(Mt(),1),Vt=4,l=Vt*2,p=4,Xh=l+p*2;function qt({byteLength:t,byteOffset:s,buffer:a}){if(t<Xh)throw Error("Provided message too short to accommodate event stream message overhead");let y=new DataView(a,s,t),w=y.getUint32(0,!1);if(t!==w)throw Error("Reported message length does not match received message length");let f=y.getUint32(Vt,!1),S=y.getUint32(l,!1),g=y.getUint32(t-p,!1),c=new Dt.Crc32().update(new Uint8Array(a,s,l));if(S!==c.digest())throw Error(`The prelude checksum specified in the message (${S}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(a,s+l,t-(l+p))),g!==c.digest())throw Error(`The message checksum (${c.digest()}) did not match the expected value of ${g}`);return{headers:new DataView(a,s+l+p,f),body:new Uint8Array(a,s+l+p+f,w-f-(l+p+p))}}class zt{headerMarshaller;messageBuffer;isEndOfStream;constructor(t,s){this.headerMarshaller=new Ut(t,s),this.messageBuffer=[],this.isEndOfStream=!1}feed(t){this.messageBuffer.push(this.decode(t))}endOfStream(){this.isEndOfStream=!0}getMessage(){let t=this.messageBuffer.pop(),s=this.isEndOfStream;return{getMessage(){return t},isEndOfStream(){return s}}}getAvailableMessages(){let t=this.messageBuffer;this.messageBuffer=[];let s=this.isEndOfStream;return{getMessages(){return t},isEndOfStream(){return s}}}encode({headers:t,body:s}){let a=this.headerMarshaller.format(t),y=a.byteLength+s.byteLength+16,w=new Uint8Array(y),f=new DataView(w.buffer,w.byteOffset,w.byteLength),S=new Ft.Crc32;return f.setUint32(0,y,!1),f.setUint32(4,a.byteLength,!1),f.setUint32(8,S.update(w.subarray(0,8)).digest(),!1),w.set(a,12),w.set(s,a.byteLength+12),f.setUint32(y-4,S.update(w.subarray(8,y-4)).digest(),!1),w}decode(t){let{headers:s,body:a}=qt(t);return{headers:this.headerMarshaller.parse(s),body:a}}formatHeaders(t){return this.headerMarshaller.format(t)}}var At=ut(Lh(),1);var Tt=new TextEncoder,bh={appstream2:"appstream",cloudhsmv2:"cloudhsm",email:"ses",marketplace:"aws-marketplace",mobile:"AWSMobileHubService",pinpoint:"mobiletargeting",queue:"sqs","git-codecommit":"codecommit","mturk-requester-sandbox":"mturk-requester","personalize-runtime":"personalize"},jh=new Set(["authorization","content-type","content-length","user-agent","presigned-expires","expect","x-amzn-trace-id","range","connection"]);class $t{constructor({method:t,url:s,headers:a,body:y,accessKeyId:w,secretAccessKey:f,sessionToken:S,service:g,region:c,cache:T,datetime:N,signQuery:j,appendSessionToken:e,allHeaders:A,singleEncode:m}){if(s==null)throw TypeError("url is a required option");if(w==null)throw TypeError("accessKeyId is a required option");if(f==null)throw TypeError("secretAccessKey is a required option");this.method=t||(y?"POST":"GET"),this.url=new URL(s),this.headers=new Headers(a||{}),this.body=y,this.accessKeyId=w,this.secretAccessKey=f,this.sessionToken=S;let $,i;if(!g||!c)[$,i]=Ch(this.url,this.headers);if(this.service=g||$||"",this.region=c||i||"us-east-1",this.cache=T||new Map,this.datetime=N||new Date().toISOString().replace(/[:-]|\.\d{3}/g,""),this.signQuery=j,this.appendSessionToken=e||this.service==="iotdevicegateway",this.headers.delete("Host"),this.service==="s3"&&!this.signQuery&&!this.headers.has("X-Amz-Content-Sha256"))this.headers.set("X-Amz-Content-Sha256","UNSIGNED-PAYLOAD");let H=this.signQuery?this.url.searchParams:this.headers;if(H.set("X-Amz-Date",this.datetime),this.sessionToken&&!this.appendSessionToken)H.set("X-Amz-Security-Token",this.sessionToken);if(this.signableHeaders=["host",...this.headers.keys()].filter((u)=>A||!jh.has(u)).sort(),this.signedHeaders=this.signableHeaders.join(";"),this.canonicalHeaders=this.signableHeaders.map((u)=>u+":"+(u==="host"?this.url.host:(this.headers.get(u)||"").replace(/\s+/g," "))).join(`
3
3
  `),this.credentialString=[this.datetime.slice(0,8),this.region,this.service,"aws4_request"].join("/"),this.signQuery){if(this.service==="s3"&&!H.has("X-Amz-Expires"))H.set("X-Amz-Expires","86400");H.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),H.set("X-Amz-Credential",this.accessKeyId+"/"+this.credentialString),H.set("X-Amz-SignedHeaders",this.signedHeaders)}if(this.service==="s3")try{this.encodedPath=decodeURIComponent(this.url.pathname.replace(/\+/g," "))}catch(u){this.encodedPath=this.url.pathname}else this.encodedPath=this.url.pathname.replace(/\/+/g,"/");if(!m)this.encodedPath=encodeURIComponent(this.encodedPath).replace(/%2F/g,"/");this.encodedPath=Yt(this.encodedPath);let C=new Set;this.encodedSearch=[...this.url.searchParams].filter(([u])=>{if(!u)return!1;if(this.service==="s3"){if(C.has(u))return!1;C.add(u)}return!0}).map((u)=>u.map((X)=>Yt(encodeURIComponent(X)))).sort(([u,X],[L,W])=>u<L?-1:u>L?1:X<W?-1:X>W?1:0).map((u)=>u.join("=")).join("&")}async sign(){if(this.signQuery){if(this.url.searchParams.set("X-Amz-Signature",await this.signature()),this.sessionToken&&this.appendSessionToken)this.url.searchParams.set("X-Amz-Security-Token",this.sessionToken)}else this.headers.set("Authorization",await this.authHeader());return{method:this.method,url:this.url,headers:this.headers,body:this.body}}async authHeader(){return["AWS4-HMAC-SHA256 Credential="+this.accessKeyId+"/"+this.credentialString,"SignedHeaders="+this.signedHeaders,"Signature="+await this.signature()].join(", ")}async signature(){let t=this.datetime.slice(0,8),s=[this.secretAccessKey,t,this.region,this.service].join(),a=this.cache.get(s);if(!a){let y=await at("AWS4"+this.secretAccessKey,t),w=await at(y,this.region),f=await at(w,this.service);a=await at(f,"aws4_request"),this.cache.set(s,a)}return Nt(await at(a,await this.stringToSign()))}async stringToSign(){return["AWS4-HMAC-SHA256",this.datetime,this.credentialString,Nt(await Pt(await this.canonicalString()))].join(`
4
4
  `)}async canonicalString(){return[this.method.toUpperCase(),this.encodedPath,this.encodedSearch,this.canonicalHeaders+`
5
5
  `,this.signedHeaders,await this.hexBodyHash()].join(`
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{sr as e,tr as V}from"./chunk-1exjy880.js";import{qP as N}from"./chunk-t4kma6mq.js";import{rP as z}from"./chunk-0xf12tf3.js";var gJ=z(V(),1);var t=z(N(),1),D=z(V(),1);var RJ=z(N(),1);var A=z(N(),1),p=z(V(),1),M=z(e(),1);var c;function VJ(){if(c===void 0)try{let J=globalThis.process.argv0;c=J?`unknown_service:${J}`:"unknown_service"}catch{c="unknown_service"}return c}var x=(J)=>{return J!==null&&typeof J==="object"&&typeof J.then==="function"};class i{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(J,$){let W=new i({},$);return W._rawAttributes=jJ(J),W._asyncAttributesPending=J.filter(([Z,Q])=>x(Q)).length>0,W}constructor(J,$){let W=J.attributes??{};this._rawAttributes=Object.entries(W).map(([Z,Q])=>{if(x(Q))this._asyncAttributesPending=!0;return[Z,Q]}),this._rawAttributes=jJ(this._rawAttributes),this._schemaUrl=iJ($?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(!this.asyncAttributesPending)return;for(let J=0;J<this._rawAttributes.length;J++){let[$,W]=this._rawAttributes[J];this._rawAttributes[J]=[$,x(W)?await W:W]}this._asyncAttributesPending=!1}get attributes(){if(this.asyncAttributesPending)A.diag.error("Accessing resource attributes before async attributes settled");if(this._memoizedAttributes)return this._memoizedAttributes;let J={};for(let[$,W]of this._rawAttributes){if(x(W)){A.diag.debug(`Unsettled resource attribute ${$} skipped`);continue}if(W!=null)J[$]??=W}if(!this._asyncAttributesPending)this._memoizedAttributes=J;return J}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(J){if(J==null)return this;let $=oJ(this,J),W=$?{schemaUrl:$}:void 0;return i.FromAttributeList([...J.getRawAttributes(),...this.getRawAttributes()],W)}}function DJ(J,$){return i.FromAttributeList(Object.entries(J),$)}function JJ(){return DJ({[M.ATTR_SERVICE_NAME]:VJ(),[M.ATTR_TELEMETRY_SDK_LANGUAGE]:p.SDK_INFO[M.ATTR_TELEMETRY_SDK_LANGUAGE],[M.ATTR_TELEMETRY_SDK_NAME]:p.SDK_INFO[M.ATTR_TELEMETRY_SDK_NAME],[M.ATTR_TELEMETRY_SDK_VERSION]:p.SDK_INFO[M.ATTR_TELEMETRY_SDK_VERSION]})}function jJ(J){return J.map(([$,W])=>{if(x(W))return[$,W.catch((Z)=>{A.diag.debug("promise rejection for resource attribute: %s - %s",$,Z);return})];return[$,W]})}function iJ(J){if(typeof J==="string"||J===void 0)return J;A.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",J);return}function oJ(J,$){let W=J?.schemaUrl,Z=$?.schemaUrl,Q=W===void 0||W==="",q=Z===void 0||Z==="";if(Q)return Z;if(q)return W;if(W===Z)return W;A.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',W,Z);return}var H=z(N(),1),E=z(V(),1);var G=z(N(),1),Y=z(V(),1),h=z(e(),1);var MJ="exception";var C=Symbol.for("nodejs.util.inspect.custom");function R(J){let $={};for(let[W,Z]of J.getRawAttributes()){if(typeof Z?.then==="function")continue;if(Z!=null)$[W]??=Z}return $}function b(J,$,W,Z,Q){if(typeof W==="number"&&W<0){let X=`[${J}]`;return Z?.stylize?Z.stylize(X,"special"):X}if(typeof Q!=="function"||!Z)return $;let q={...Z,depth:Z.depth==null?Z.depth:Z.depth-1};return`${J} ${Q($,q)}`}class $J{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;_attributesCount=0;name;status={code:G.SpanStatusCode.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(J){let $=Date.now();if(this._spanContext=J.spanContext,this._performanceStartTime=Y.otperformance.now(),this._performanceOffset=$-(this._performanceStartTime+Y.otperformance.timeOrigin),this._startTimeProvided=J.startTime!=null,this._spanLimits=J.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=J.spanProcessor,this.name=J.name,this.parentSpanContext=J.parentSpanContext,this.kind=J.kind,J.links)for(let W of J.links)this.addLink(W);if(this.startTime=this._getTime(J.startTime??$),this.resource=J.resource,this.instrumentationScope=J.scope,this._recordEndMetrics=J.recordEndMetrics,J.attributes!=null)this.setAttributes(J.attributes);this._spanProcessor.onStart(this,J.context)}spanContext(){return this._spanContext}setAttribute(J,$){if($==null||this._isSpanEnded())return this;if(J.length===0)return G.diag.warn(`Invalid attribute key: ${J}`),this;if(!Y.isAttributeValue($))return G.diag.warn(`Invalid attribute value set for key: ${J}`),this;let{attributeCountLimit:W}=this._spanLimits,Z=!Object.prototype.hasOwnProperty.call(this.attributes,J);if(W!==void 0&&this._attributesCount>=W&&Z)return this._droppedAttributesCount++,this;if(this.attributes[J]=this._truncateToSize($),Z)this._attributesCount++;return this}setAttributes(J){for(let $ in J)if(Object.prototype.hasOwnProperty.call(J,$))this.setAttribute($,J[$]);return this}addEvent(J,$,W){if(this._isSpanEnded())return this;let{eventCountLimit:Z}=this._spanLimits;if(Z===0)return G.diag.warn("No events allowed."),this._droppedEventsCount++,this;if(Z!==void 0&&this.events.length>=Z){if(this._droppedEventsCount===0)G.diag.debug("Dropping extra events.");this.events.shift(),this._droppedEventsCount++}if(Y.isTimeInput($)){if(!Y.isTimeInput(W))W=$;$=void 0}let Q=Y.sanitizeAttributes($),{attributePerEventCountLimit:q}=this._spanLimits,X={},w=0,K=0;for(let U in Q){if(!Object.prototype.hasOwnProperty.call(Q,U))continue;let m=Q[U];if(q!==void 0&&K>=q){w++;continue}X[U]=this._truncateToSize(m),K++}return this.events.push({name:J,attributes:X,time:this._getTime(W),droppedAttributesCount:w}),this}addLink(J){if(this._isSpanEnded())return this;let{linkCountLimit:$}=this._spanLimits;if($===0)return this._droppedLinksCount++,this;if($!==void 0&&this.links.length>=$){if(this._droppedLinksCount===0)G.diag.debug("Dropping extra links.");this.links.shift(),this._droppedLinksCount++}let{attributePerLinkCountLimit:W}=this._spanLimits,Z=Y.sanitizeAttributes(J.attributes),Q={},q=0,X=0;for(let K in Z){if(!Object.prototype.hasOwnProperty.call(Z,K))continue;let U=Z[K];if(W!==void 0&&X>=W){q++;continue}Q[K]=this._truncateToSize(U),X++}let w={context:J.context};if(X>0)w.attributes=Q;if(q>0)w.droppedAttributesCount=q;return this.links.push(w),this}addLinks(J){for(let $ of J)this.addLink($);return this}setStatus(J){if(this._isSpanEnded())return this;if(J.code===G.SpanStatusCode.UNSET)return this;if(this.status.code===G.SpanStatusCode.OK)return this;let $={code:J.code};if(J.code===G.SpanStatusCode.ERROR){if(typeof J.message==="string")$.message=J.message;else if(J.message!=null)G.diag.warn(`Dropping invalid status.message of type '${typeof J.message}', expected 'string'`)}return this.status=$,this}updateName(J){if(this._isSpanEnded())return this;return this.name=J,this}end(J){if(this._isSpanEnded()){G.diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}if(this.endTime=this._getTime(J),this._duration=Y.hrTimeDuration(this.startTime,this.endTime),this._duration[0]<0)G.diag.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0];if(this._droppedEventsCount>0)G.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`);if(this._droppedLinksCount>0)G.diag.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`);if(this._spanProcessor.onEnding)this._spanProcessor.onEnding(this);this._recordEndMetrics?.(),this._ended=!0,this._spanProcessor.onEnd(this)}_getTime(J){if(typeof J==="number"&&J<=Y.otperformance.now())return Y.hrTime(J+this._performanceOffset);if(typeof J==="number")return Y.millisToHrTime(J);if(J instanceof Date)return Y.millisToHrTime(J.getTime());if(Y.isTimeInputHrTime(J))return J;if(this._startTimeProvided)return Y.millisToHrTime(Date.now());let $=Y.otperformance.now()-this._performanceStartTime;return Y.addHrTimes(this.startTime,Y.millisToHrTime($))}isRecording(){return this._ended===!1}recordException(J,$){let W={};if(typeof J==="string")W[h.ATTR_EXCEPTION_MESSAGE]=J;else if(J){if(J.code)W[h.ATTR_EXCEPTION_TYPE]=J.code.toString();else if(J.name)W[h.ATTR_EXCEPTION_TYPE]=J.name;if(J.message)W[h.ATTR_EXCEPTION_MESSAGE]=J.message;if(J.stack)W[h.ATTR_EXCEPTION_STACKTRACE]=J.stack}if(W[h.ATTR_EXCEPTION_TYPE]||W[h.ATTR_EXCEPTION_MESSAGE])this.addEvent(MJ,W,$);else G.diag.warn(`Failed to record an exception ${J}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let J=Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);G.diag.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,J)}return this._ended}_truncateToLimitUtil(J,$){if(J.length<=$)return J;return J.substring(0,$)}_truncateToSize(J){let $=this._attributeValueLengthLimit;if($<=0)return G.diag.warn(`Attribute value limit must be positive, got ${$}`),J;if(typeof J==="string")return this._truncateToLimitUtil(J,$);if(Array.isArray(J))return J.map((W)=>typeof W==="string"?this._truncateToLimitUtil(W,$):W);return J}[C](J,$,W){let Z={name:this.name,kind:this.kind,spanContext:this._spanContext,parentSpanContext:this.parentSpanContext,status:this.status,startTime:this.startTime,endTime:this.endTime,duration:this._duration,ended:this._ended,attributes:this.attributes,events:this.events,links:this.links,droppedAttributesCount:this._droppedAttributesCount,droppedEventsCount:this._droppedEventsCount,droppedLinksCount:this._droppedLinksCount,instrumentationScope:this.instrumentationScope,resource:{attributes:R(this.resource)}};return b("SpanImpl",Z,J,$,W)}}var B;(function(J){J[J.NOT_RECORD=0]="NOT_RECORD",J[J.RECORD=1]="RECORD",J[J.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(B||(B={}));var OJ="otel.component.name",UJ="otel.component.type",hJ="otel.span.parent.origin",WJ="otel.span.sampling_result",PJ="otel.sdk.processor.span.processed",fJ="otel.sdk.processor.span.queue.capacity",NJ="otel.sdk.processor.span.queue.size",kJ="otel.sdk.span.live",IJ="otel.sdk.span.started",LJ="batching_span_processor",_J="simple_span_processor";class ZJ{startedSpans;liveSpans;constructor(J){this.startedSpans=J.createCounter(IJ,{unit:"{span}",description:"The number of created spans."}),this.liveSpans=J.createUpDownCounter(kJ,{unit:"{span}",description:"The number of currently live spans."})}startSpan(J,$){let W=rJ($);if(this.startedSpans.add(1,{[hJ]:nJ(J),[WJ]:W}),$===B.NOT_RECORD)return()=>{};let Z={[WJ]:W};return this.liveSpans.add(1,Z),()=>{this.liveSpans.add(-1,Z)}}}function nJ(J){if(!J)return"none";if(J.isRemote)return"remote";return"local"}function rJ(J){switch(J){case B.RECORD_AND_SAMPLED:return"RECORD_AND_SAMPLE";case B.RECORD:return"RECORD_ONLY";case B.NOT_RECORD:return"DROP"}}var FJ="2.9.0";class QJ{_sampler;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;_tracerMetrics;constructor(J,$){this.instrumentationScope=J,this._sampler=$.sampler,this._spanLimits=$.spanLimits,this._resource=$.resource,this._idGenerator=$.idGenerator,this._spanProcessor=$.spanProcessor;let W=$.meterProvider.getMeter("@opentelemetry/sdk-trace",FJ);this._tracerMetrics=new ZJ(W)}startSpan(J,$={},W=H.context.active()){if($.root)W=H.trace.deleteSpan(W);let Z=H.trace.getSpan(W);if(E.isTracingSuppressed(W))return H.diag.debug("Instrumentation suppressed, returning Noop Span"),H.trace.wrapSpanContext(H.INVALID_SPAN_CONTEXT);let Q=Z?.spanContext(),q=this._idGenerator.generateSpanId(),X,w,K;if(!Q||!H.trace.isSpanContextValid(Q))w=this._idGenerator.generateTraceId();else w=Q.traceId,K=Q.traceState,X=Q;let U=$.kind??H.SpanKind.INTERNAL,m=($.links??[]).map((l)=>{return{context:l.context,attributes:E.sanitizeAttributes(l.attributes)}}),KJ=E.sanitizeAttributes($.attributes),g=this._sampler.shouldSample(W,w,J,U,KJ,m),lJ=this._tracerMetrics.startSpan(Q,g.decision);K=g.traceState??K;let cJ=g.decision===H.SamplingDecision.RECORD_AND_SAMPLED?H.TraceFlags.SAMPLED:H.TraceFlags.NONE,BJ={traceId:w,spanId:q,traceFlags:cJ,traceState:K};if(g.decision===H.SamplingDecision.NOT_RECORD)return H.diag.debug("Recording is off, propagating context in a non-recording span"),H.trace.wrapSpanContext(BJ);let pJ=E.sanitizeAttributes(Object.assign(KJ,g.attributes));return new $J({resource:this._resource,scope:this.instrumentationScope,context:W,spanContext:BJ,name:J,kind:U,links:m,parentSpanContext:X,attributes:pJ,startTime:$.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:lJ})}startActiveSpan(J,$,W,Z){let Q,q,X;if(arguments.length<2)return;else if(arguments.length===2)X=$;else if(arguments.length===3)Q=$,X=W;else Q=$,q=W,X=Z;let w=q??H.context.active(),K=this.startSpan(J,Q,w),U=H.trace.setSpan(w,K);return H.context.with(U,X,void 0,K)}[C](J,$,W){let Z={instrumentationScope:this.instrumentationScope,resource:{attributes:R(this._resource)},spanLimits:this._spanLimits};return b("Tracer",Z,J,$,W)}}var yJ=z(V(),1);class qJ{_spanProcessors;constructor(J){this._spanProcessors=J}forceFlush(){let J=[];for(let $ of this._spanProcessors)J.push($.forceFlush());return new Promise(($)=>{Promise.all(J).then(()=>{$()}).catch((W)=>{yJ.globalErrorHandler(W||Error("MultiSpanProcessor: forceFlush failed")),$()})})}onStart(J,$){for(let W of this._spanProcessors)W.onStart(J,$)}onEnding(J){for(let $ of this._spanProcessors)if($.onEnding)$.onEnding(J)}onEnd(J){for(let $ of this._spanProcessors)$.onEnd(J)}shutdown(){let J=[];for(let $ of this._spanProcessors)J.push($.shutdown());return new Promise(($,W)=>{Promise.all(J).then(()=>{$()},W)})}}var _=z(N(),1),xJ=z(V(),1);class k{shouldSample(){return{decision:B.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}class j{shouldSample(){return{decision:B.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}class P{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(J){if(this._root=J.root,!this._root)xJ.globalErrorHandler(Error("ParentBasedSampler must have a root sampler configured")),this._root=new j;this._remoteParentSampled=J.remoteParentSampled??new j,this._remoteParentNotSampled=J.remoteParentNotSampled??new k,this._localParentSampled=J.localParentSampled??new j,this._localParentNotSampled=J.localParentNotSampled??new k}shouldSample(J,$,W,Z,Q,q){let X=_.trace.getSpanContext(J);if(!X||!_.isSpanContextValid(X))return this._root.shouldSample(J,$,W,Z,Q,q);if(X.isRemote){if(X.traceFlags&_.TraceFlags.SAMPLED)return this._remoteParentSampled.shouldSample(J,$,W,Z,Q,q);return this._remoteParentNotSampled.shouldSample(J,$,W,Z,Q,q)}if(X.traceFlags&_.TraceFlags.SAMPLED)return this._localParentSampled.shouldSample(J,$,W,Z,Q,q);return this._localParentNotSampled.shouldSample(J,$,W,Z,Q,q)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}var O=z(N(),1),I=z(V(),1);var XJ=z(e(),1);var AJ=new Map;class d{processedSpans;queueSize;queueSizeCallback;standardAttrs;droppedAttrs;constructor(J,$,W){let Z=AJ.get(J)??0;if(AJ.set(J,Z+1),this.standardAttrs={[UJ]:J,[OJ]:`${J}/${Z}`},this.droppedAttrs={...this.standardAttrs,[XJ.ATTR_ERROR_TYPE]:"queue_full"},this.processedSpans=$.createCounter(PJ,{unit:"{span}",description:"The number of spans for which the processing has finished, either successful or failed."}),W){let{capacity:Q,getQueueSize:q}=W;$.createUpDownCounter(fJ,{unit:"{span}",description:"The maximum number of spans the queue of a given instance of an SDK span processor can hold."}).add(Q,this.standardAttrs),this.queueSize=$.createObservableUpDownCounter(NJ,{unit:"{span}",description:"The number of spans in the queue of a given instance of an SDK span processor."}),this.queueSizeCallback=(w)=>w.observe(q(),this.standardAttrs),this.queueSize.addCallback(this.queueSizeCallback)}}dropSpans(J){this.processedSpans.add(J,this.droppedAttrs)}finishSpans(J,$){if(!$){this.processedSpans.add(J,this.standardAttrs);return}let W={...this.standardAttrs,[XJ.ATTR_ERROR_TYPE]:$.name};this.processedSpans.add(J,W)}shutdown(){if(this.queueSize&&this.queueSizeCallback)this.queueSize.removeCallback(this.queueSizeCallback)}}class YJ{_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_exporter;_metrics;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(J){if(this._exporter=J.exporter,this._maxExportBatchSize=J.maxExportBatchSize??512,this._maxQueueSize=J.maxQueueSize??2048,this._scheduledDelayMillis=J.scheduledDelayMillis??5000,this._exportTimeoutMillis=J.exportTimeoutMillis??30000,this._shutdownOnce=new I.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize)O.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize;let $=J.selfObsMeterProvider?J.selfObsMeterProvider.getMeter("@opentelemetry/sdk-trace"):O.createNoopMeter();this._metrics=new d(LJ,$,{capacity:this._maxQueueSize,getQueueSize:()=>this._finishedSpans.length})}forceFlush(){if(this._shutdownOnce.isCalled)return this._shutdownOnce.promise;return this._flushAll()}onStart(J,$){}onEnd(J){if(this._shutdownOnce.isCalled)return;if((J.spanContext().traceFlags&O.TraceFlags.SAMPLED)===0)return;this._addToBuffer(J)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>{return this.onShutdown()}).then(()=>{return this._flushAll()}).then(()=>{return this._metrics.shutdown(),this._exporter.shutdown()})}_addToBuffer(J){if(this._finishedSpans.length>=this._maxQueueSize){if(this._droppedSpansCount===0)O.diag.debug("maxQueueSize reached, dropping spans");this._droppedSpansCount++,this._metrics.dropSpans(1);return}if(this._droppedSpansCount>0)O.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0;this._finishedSpans.push(J),this._maybeStartTimer()}_flushAll(){return new Promise((J,$)=>{let W=[],Z=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let Q=0,q=Z;Q<q;Q++)W.push(this._flushOneBatch());Promise.all(W).then(()=>{J()}).catch($)})}_flushOneBatch(){if(this._clearTimer(),this._finishedSpans.length===0)return Promise.resolve();return new Promise((J,$)=>{let W=setTimeout(()=>{$(Error("Timeout"))},this._exportTimeoutMillis);O.context.with(I.suppressTracing(O.context.active()),()=>{let Z;if(this._finishedSpans.length<=this._maxExportBatchSize)Z=this._finishedSpans,this._finishedSpans=[];else Z=this._finishedSpans.splice(0,this._maxExportBatchSize);let Q=()=>this._exporter.export(Z,(X)=>{if(clearTimeout(W),this._metrics.finishSpans(Z.length,X.error),X.code===I.ExportResultCode.SUCCESS)J();else $(X.error??Error("BatchSpanProcessor: span export failed"))}),q=null;for(let X=0,w=Z.length;X<w;X++){let K=Z[X];if(K.resource.asyncAttributesPending&&K.resource.waitForAsyncAttributes)q??=[],q.push(K.resource.waitForAsyncAttributes())}if(q===null)Q();else Promise.all(q).then(Q,(X)=>{I.globalErrorHandler(X),$(X)})})})}_maybeStartTimer(){if(this._isExporting)return;let J=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{if(this._isExporting=!1,this._finishedSpans.length>0)this._clearTimer(),this._maybeStartTimer()}).catch(($)=>{this._isExporting=!1,I.globalErrorHandler($)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return J();if(this._timer!==void 0)return;if(this._timer=setTimeout(()=>J(),this._scheduledDelayMillis),typeof this._timer!=="number")this._timer.unref()}_clearTimer(){if(this._timer!==void 0)clearTimeout(this._timer),this._timer=void 0}}class v extends YJ{onShutdown(){}}class F{generateTraceId=CJ(16);generateSpanId=CJ(8)}var o=Buffer.allocUnsafe(16);function CJ(J){return function(){for(let W=0;W<J/4;W++)o.writeUInt32BE(Math.random()*4294967296>>>0,W*4);for(let W=0;W<J;W++)if(o[W]>0)break;else if(W===J-1)o[J-1]=1;return o.toString("hex",0,J)}}var y;(function(J){J[J.resolved=0]="resolved",J[J.timeout=1]="timeout",J[J.error=2]="error",J[J.unresolved=3]="unresolved"})(y||(y={}));class n{_resource;_activeSpanProcessor;_forceFlushTimeoutMillis;_tracerOptions;_tracers=new Map;constructor(J={}){this._forceFlushTimeoutMillis=J.forceFlushTimeoutMillis??30000,this._resource=J.resource??JJ();let $=J.spanProcessors??[];this._activeSpanProcessor=new qJ($),this._tracerOptions={resource:this._resource,sampler:J.sampler??new P({root:new j}),spanLimits:{attributeCountLimit:J.spanLimits?.attributeCountLimit??128,attributeValueLengthLimit:J.spanLimits?.attributeValueLengthLimit??1/0,eventCountLimit:J.spanLimits?.eventCountLimit??128,linkCountLimit:J.spanLimits?.linkCountLimit??128,attributePerEventCountLimit:J.spanLimits?.attributePerEventCountLimit??128,attributePerLinkCountLimit:J.spanLimits?.attributePerLinkCountLimit??128},idGenerator:J.idGenerator||new F,spanProcessor:this._activeSpanProcessor,meterProvider:J.meterProvider??{getMeter(){return RJ.createNoopMeter()}}}}getTracer(J,$,W){let Z=`${J}@${$||""}:${W?.schemaUrl||""}`;if(!this._tracers.has(Z))this._tracers.set(Z,new QJ({name:J,version:$,schemaUrl:W?.schemaUrl},this._tracerOptions));return this._tracers.get(Z)}forceFlush(){let J=this._forceFlushTimeoutMillis,$=this._activeSpanProcessor._spanProcessors.map((W)=>{return new Promise((Z)=>{let Q,q=setTimeout(()=>{Z(Error(`Span processor did not completed within timeout period of ${J} ms`)),Q=y.timeout},J);W.forceFlush().then(()=>{if(clearTimeout(q),Q!==y.timeout)Q=y.resolved,Z(Q)}).catch((X)=>{clearTimeout(q),Q=y.error,Z(X)})})});return new Promise((W,Z)=>{Promise.all($).then((Q)=>{let q=Q.filter((X)=>X!==y.resolved);if(q.length>0)Z(q);else W()}).catch((Q)=>Z([Q]))})}shutdown(){return this._activeSpanProcessor.shutdown()}[C](J,$,W){let Z=this._activeSpanProcessor._spanProcessors,Q={resource:{attributes:R(this._resource)},tracers:Array.from(this._tracers.keys()),spanProcessors:Z.map((q)=>q.constructor?.name??"SpanProcessor")};return b("TracerProvider",Q,J,$,W)}}var S=z(V(),1);class zJ{export(J,$){return this._sendSpans(J,$)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(J){return{resource:{attributes:J.resource.attributes},instrumentationScope:J.instrumentationScope,traceId:J.spanContext().traceId,parentSpanContext:J.parentSpanContext,traceState:J.spanContext().traceState?.serialize(),name:J.name,id:J.spanContext().spanId,kind:J.kind,timestamp:S.hrTimeToMicroseconds(J.startTime),duration:S.hrTimeToMicroseconds(J.duration),attributes:J.attributes,status:J.status,events:J.events,links:J.links}}_sendSpans(J,$){for(let W of J)console.dir(this._exportInfo(W),{depth:3});if($)return $({code:S.ExportResultCode.SUCCESS})}}var HJ=z(V(),1);class GJ{_finishedSpans=[];_stopped=!1;export(J,$){if(this._stopped)return $({code:HJ.ExportResultCode.FAILED,error:Error("Exporter has been stopped")});this._finishedSpans.push(...J),setTimeout(()=>$({code:HJ.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}var r=z(N(),1),L=z(V(),1);class a{_exporter;_metrics;_shutdownOnce;_pendingExports;constructor(J){this._exporter=J.exporter,this._shutdownOnce=new L.BindOnceFuture(this._shutdown,this),this._pendingExports=new Set;let $=J.selfObsMeterProvider?J.selfObsMeterProvider.getMeter("@opentelemetry/sdk-trace"):r.createNoopMeter();this._metrics=new d(_J,$)}async forceFlush(){if(await Promise.all(Array.from(this._pendingExports)),this._exporter.forceFlush)await this._exporter.forceFlush()}onStart(J,$){}onEnd(J){if(this._shutdownOnce.isCalled)return;if((J.spanContext().traceFlags&r.TraceFlags.SAMPLED)===0)return;let $=this._doExport(J).catch((W)=>L.globalErrorHandler(W));this._pendingExports.add($),$.finally(()=>this._pendingExports.delete($))}async _doExport(J){if(J.resource.asyncAttributesPending)await J.resource.waitForAsyncAttributes?.();let $=await L.internal._export(this._exporter,[J]);if(this._metrics.finishSpans(1,$.error),$.code!==L.ExportResultCode.SUCCESS)throw $.error??Error(`SimpleSpanProcessor: span export failed (status ${$})`)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._metrics.shutdown(),this._exporter.shutdown()}}class wJ{onStart(J,$){}onEnd(J){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}var bJ=z(N(),1);class T{_ratio;_upperBound;constructor(J=0){this._ratio=this._normalize(J),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(J,$){return{decision:bJ.isValidTraceId($)&&this._accumulate($)<this._upperBound?B.RECORD_AND_SAMPLED:B.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(J){if(typeof J!=="number"||isNaN(J))return 0;return J>=1?1:J<=0?0:J}_accumulate(J){let $=0;for(let W=0;W<32;W+=8){let Z=0;for(let Q=0;Q<8;Q++){let q=J.charCodeAt(W+Q),X=q<58?q-48:q<71?q-55:q-87;Z=Z<<4|X}$=($^Z)>>>0}return $}}var f;(function(J){J.AlwaysOff="always_off",J.AlwaysOn="always_on",J.ParentBasedAlwaysOff="parentbased_always_off",J.ParentBasedAlwaysOn="parentbased_always_on",J.ParentBasedTraceIdRatio="parentbased_traceidratio",J.TraceIdRatio="traceidratio"})(f||(f={}));var s=1;function vJ(){return{sampler:aJ(),forceFlushTimeoutMillis:30000,generalLimits:{attributeValueLengthLimit:D.getNumberFromEnv("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:D.getNumberFromEnv("OTEL_ATTRIBUTE_COUNT_LIMIT")??128},spanLimits:{attributeValueLengthLimit:D.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:D.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??128,linkCountLimit:D.getNumberFromEnv("OTEL_SPAN_LINK_COUNT_LIMIT")??128,eventCountLimit:D.getNumberFromEnv("OTEL_SPAN_EVENT_COUNT_LIMIT")??128,attributePerEventCountLimit:D.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT")??128,attributePerLinkCountLimit:D.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT")??128}}}function aJ(){let J=D.getStringFromEnv("OTEL_TRACES_SAMPLER")??f.ParentBasedAlwaysOn;switch(J){case f.AlwaysOn:return new j;case f.AlwaysOff:return new k;case f.ParentBasedAlwaysOn:return new P({root:new j});case f.ParentBasedAlwaysOff:return new P({root:new k});case f.TraceIdRatio:return new T(EJ());case f.ParentBasedTraceIdRatio:return new P({root:new T(EJ())});default:return t.diag.error(`OTEL_TRACES_SAMPLER value "${J}" invalid, defaulting to "${f.ParentBasedAlwaysOn}".`),new P({root:new j})}}function EJ(){let J=D.getNumberFromEnv("OTEL_TRACES_SAMPLER_ARG");if(J==null)return t.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${s}.`),s;if(J<0||J>1)return t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${J} was given, but it is out of range ([0..1]), defaulting to ${s}.`),s;return J}var u=z(V(),1),sJ=128,tJ=1/0;function TJ(J){let $=Object.assign({},J.spanLimits);return $.attributeCountLimit=J.spanLimits?.attributeCountLimit??J.generalLimits?.attributeCountLimit??u.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??u.getNumberFromEnv("OTEL_ATTRIBUTE_COUNT_LIMIT")??sJ,$.attributeValueLengthLimit=J.spanLimits?.attributeValueLengthLimit??J.generalLimits?.attributeValueLengthLimit??u.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??u.getNumberFromEnv("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??tJ,Object.assign({},J,{spanLimits:$})}class dJ extends n{constructor(J={}){let $=gJ.merge({},vJ(),TJ(J));delete $.generalLimits;super($)}}var SJ=z(V(),1);class uJ extends v{constructor(J,$){if(!$)$={};let W=[["maxExportBatchSize","OTEL_BSP_MAX_EXPORT_BATCH_SIZE"],["maxQueueSize","OTEL_BSP_MAX_QUEUE_SIZE"],["scheduledDelayMillis","OTEL_BSP_SCHEDULE_DELAY"],["exportTimeoutMillis","OTEL_BSP_EXPORT_TIMEOUT"]];for(let[Z,Q]of W)if($[Z]===void 0){let q=SJ.getNumberFromEnv(Q);if(q!==void 0)$[Z]=q}super({exporter:J,...$})}}class mJ extends a{constructor(J){super({exporter:J})}}export{T as TraceIdRatioBasedSampler,mJ as SimpleSpanProcessor,B as SamplingDecision,F as RandomIdGenerator,P as ParentBasedSampler,wJ as NoopSpanProcessor,GJ as InMemorySpanExporter,zJ as ConsoleSpanExporter,uJ as BatchSpanProcessor,dJ as BasicTracerProvider,j as AlwaysOnSampler,k as AlwaysOffSampler};
2
+ import{vr as e,wr as V}from"./chunk-g77kddrs.js";import{tP as N}from"./chunk-x0de4z05.js";import{uP as z}from"./chunk-sh03ka27.js";var gJ=z(V(),1);var t=z(N(),1),D=z(V(),1);var RJ=z(N(),1);var A=z(N(),1),p=z(V(),1),M=z(e(),1);var c;function VJ(){if(c===void 0)try{let J=globalThis.process.argv0;c=J?`unknown_service:${J}`:"unknown_service"}catch{c="unknown_service"}return c}var x=(J)=>{return J!==null&&typeof J==="object"&&typeof J.then==="function"};class i{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(J,$){let W=new i({},$);return W._rawAttributes=jJ(J),W._asyncAttributesPending=J.filter(([Z,Q])=>x(Q)).length>0,W}constructor(J,$){let W=J.attributes??{};this._rawAttributes=Object.entries(W).map(([Z,Q])=>{if(x(Q))this._asyncAttributesPending=!0;return[Z,Q]}),this._rawAttributes=jJ(this._rawAttributes),this._schemaUrl=iJ($?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(!this.asyncAttributesPending)return;for(let J=0;J<this._rawAttributes.length;J++){let[$,W]=this._rawAttributes[J];this._rawAttributes[J]=[$,x(W)?await W:W]}this._asyncAttributesPending=!1}get attributes(){if(this.asyncAttributesPending)A.diag.error("Accessing resource attributes before async attributes settled");if(this._memoizedAttributes)return this._memoizedAttributes;let J={};for(let[$,W]of this._rawAttributes){if(x(W)){A.diag.debug(`Unsettled resource attribute ${$} skipped`);continue}if(W!=null)J[$]??=W}if(!this._asyncAttributesPending)this._memoizedAttributes=J;return J}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(J){if(J==null)return this;let $=oJ(this,J),W=$?{schemaUrl:$}:void 0;return i.FromAttributeList([...J.getRawAttributes(),...this.getRawAttributes()],W)}}function DJ(J,$){return i.FromAttributeList(Object.entries(J),$)}function JJ(){return DJ({[M.ATTR_SERVICE_NAME]:VJ(),[M.ATTR_TELEMETRY_SDK_LANGUAGE]:p.SDK_INFO[M.ATTR_TELEMETRY_SDK_LANGUAGE],[M.ATTR_TELEMETRY_SDK_NAME]:p.SDK_INFO[M.ATTR_TELEMETRY_SDK_NAME],[M.ATTR_TELEMETRY_SDK_VERSION]:p.SDK_INFO[M.ATTR_TELEMETRY_SDK_VERSION]})}function jJ(J){return J.map(([$,W])=>{if(x(W))return[$,W.catch((Z)=>{A.diag.debug("promise rejection for resource attribute: %s - %s",$,Z);return})];return[$,W]})}function iJ(J){if(typeof J==="string"||J===void 0)return J;A.diag.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",J);return}function oJ(J,$){let W=J?.schemaUrl,Z=$?.schemaUrl,Q=W===void 0||W==="",q=Z===void 0||Z==="";if(Q)return Z;if(q)return W;if(W===Z)return W;A.diag.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',W,Z);return}var H=z(N(),1),E=z(V(),1);var G=z(N(),1),Y=z(V(),1),h=z(e(),1);var MJ="exception";var C=Symbol.for("nodejs.util.inspect.custom");function R(J){let $={};for(let[W,Z]of J.getRawAttributes()){if(typeof Z?.then==="function")continue;if(Z!=null)$[W]??=Z}return $}function b(J,$,W,Z,Q){if(typeof W==="number"&&W<0){let X=`[${J}]`;return Z?.stylize?Z.stylize(X,"special"):X}if(typeof Q!=="function"||!Z)return $;let q={...Z,depth:Z.depth==null?Z.depth:Z.depth-1};return`${J} ${Q($,q)}`}class $J{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;_attributesCount=0;name;status={code:G.SpanStatusCode.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(J){let $=Date.now();if(this._spanContext=J.spanContext,this._performanceStartTime=Y.otperformance.now(),this._performanceOffset=$-(this._performanceStartTime+Y.otperformance.timeOrigin),this._startTimeProvided=J.startTime!=null,this._spanLimits=J.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=J.spanProcessor,this.name=J.name,this.parentSpanContext=J.parentSpanContext,this.kind=J.kind,J.links)for(let W of J.links)this.addLink(W);if(this.startTime=this._getTime(J.startTime??$),this.resource=J.resource,this.instrumentationScope=J.scope,this._recordEndMetrics=J.recordEndMetrics,J.attributes!=null)this.setAttributes(J.attributes);this._spanProcessor.onStart(this,J.context)}spanContext(){return this._spanContext}setAttribute(J,$){if($==null||this._isSpanEnded())return this;if(J.length===0)return G.diag.warn(`Invalid attribute key: ${J}`),this;if(!Y.isAttributeValue($))return G.diag.warn(`Invalid attribute value set for key: ${J}`),this;let{attributeCountLimit:W}=this._spanLimits,Z=!Object.prototype.hasOwnProperty.call(this.attributes,J);if(W!==void 0&&this._attributesCount>=W&&Z)return this._droppedAttributesCount++,this;if(this.attributes[J]=this._truncateToSize($),Z)this._attributesCount++;return this}setAttributes(J){for(let $ in J)if(Object.prototype.hasOwnProperty.call(J,$))this.setAttribute($,J[$]);return this}addEvent(J,$,W){if(this._isSpanEnded())return this;let{eventCountLimit:Z}=this._spanLimits;if(Z===0)return G.diag.warn("No events allowed."),this._droppedEventsCount++,this;if(Z!==void 0&&this.events.length>=Z){if(this._droppedEventsCount===0)G.diag.debug("Dropping extra events.");this.events.shift(),this._droppedEventsCount++}if(Y.isTimeInput($)){if(!Y.isTimeInput(W))W=$;$=void 0}let Q=Y.sanitizeAttributes($),{attributePerEventCountLimit:q}=this._spanLimits,X={},w=0,K=0;for(let U in Q){if(!Object.prototype.hasOwnProperty.call(Q,U))continue;let m=Q[U];if(q!==void 0&&K>=q){w++;continue}X[U]=this._truncateToSize(m),K++}return this.events.push({name:J,attributes:X,time:this._getTime(W),droppedAttributesCount:w}),this}addLink(J){if(this._isSpanEnded())return this;let{linkCountLimit:$}=this._spanLimits;if($===0)return this._droppedLinksCount++,this;if($!==void 0&&this.links.length>=$){if(this._droppedLinksCount===0)G.diag.debug("Dropping extra links.");this.links.shift(),this._droppedLinksCount++}let{attributePerLinkCountLimit:W}=this._spanLimits,Z=Y.sanitizeAttributes(J.attributes),Q={},q=0,X=0;for(let K in Z){if(!Object.prototype.hasOwnProperty.call(Z,K))continue;let U=Z[K];if(W!==void 0&&X>=W){q++;continue}Q[K]=this._truncateToSize(U),X++}let w={context:J.context};if(X>0)w.attributes=Q;if(q>0)w.droppedAttributesCount=q;return this.links.push(w),this}addLinks(J){for(let $ of J)this.addLink($);return this}setStatus(J){if(this._isSpanEnded())return this;if(J.code===G.SpanStatusCode.UNSET)return this;if(this.status.code===G.SpanStatusCode.OK)return this;let $={code:J.code};if(J.code===G.SpanStatusCode.ERROR){if(typeof J.message==="string")$.message=J.message;else if(J.message!=null)G.diag.warn(`Dropping invalid status.message of type '${typeof J.message}', expected 'string'`)}return this.status=$,this}updateName(J){if(this._isSpanEnded())return this;return this.name=J,this}end(J){if(this._isSpanEnded()){G.diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}if(this.endTime=this._getTime(J),this._duration=Y.hrTimeDuration(this.startTime,this.endTime),this._duration[0]<0)G.diag.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0];if(this._droppedEventsCount>0)G.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`);if(this._droppedLinksCount>0)G.diag.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`);if(this._spanProcessor.onEnding)this._spanProcessor.onEnding(this);this._recordEndMetrics?.(),this._ended=!0,this._spanProcessor.onEnd(this)}_getTime(J){if(typeof J==="number"&&J<=Y.otperformance.now())return Y.hrTime(J+this._performanceOffset);if(typeof J==="number")return Y.millisToHrTime(J);if(J instanceof Date)return Y.millisToHrTime(J.getTime());if(Y.isTimeInputHrTime(J))return J;if(this._startTimeProvided)return Y.millisToHrTime(Date.now());let $=Y.otperformance.now()-this._performanceStartTime;return Y.addHrTimes(this.startTime,Y.millisToHrTime($))}isRecording(){return this._ended===!1}recordException(J,$){let W={};if(typeof J==="string")W[h.ATTR_EXCEPTION_MESSAGE]=J;else if(J){if(J.code)W[h.ATTR_EXCEPTION_TYPE]=J.code.toString();else if(J.name)W[h.ATTR_EXCEPTION_TYPE]=J.name;if(J.message)W[h.ATTR_EXCEPTION_MESSAGE]=J.message;if(J.stack)W[h.ATTR_EXCEPTION_STACKTRACE]=J.stack}if(W[h.ATTR_EXCEPTION_TYPE]||W[h.ATTR_EXCEPTION_MESSAGE])this.addEvent(MJ,W,$);else G.diag.warn(`Failed to record an exception ${J}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let J=Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);G.diag.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,J)}return this._ended}_truncateToLimitUtil(J,$){if(J.length<=$)return J;return J.substring(0,$)}_truncateToSize(J){let $=this._attributeValueLengthLimit;if($<=0)return G.diag.warn(`Attribute value limit must be positive, got ${$}`),J;if(typeof J==="string")return this._truncateToLimitUtil(J,$);if(Array.isArray(J))return J.map((W)=>typeof W==="string"?this._truncateToLimitUtil(W,$):W);return J}[C](J,$,W){let Z={name:this.name,kind:this.kind,spanContext:this._spanContext,parentSpanContext:this.parentSpanContext,status:this.status,startTime:this.startTime,endTime:this.endTime,duration:this._duration,ended:this._ended,attributes:this.attributes,events:this.events,links:this.links,droppedAttributesCount:this._droppedAttributesCount,droppedEventsCount:this._droppedEventsCount,droppedLinksCount:this._droppedLinksCount,instrumentationScope:this.instrumentationScope,resource:{attributes:R(this.resource)}};return b("SpanImpl",Z,J,$,W)}}var B;(function(J){J[J.NOT_RECORD=0]="NOT_RECORD",J[J.RECORD=1]="RECORD",J[J.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(B||(B={}));var OJ="otel.component.name",UJ="otel.component.type",hJ="otel.span.parent.origin",WJ="otel.span.sampling_result",PJ="otel.sdk.processor.span.processed",fJ="otel.sdk.processor.span.queue.capacity",NJ="otel.sdk.processor.span.queue.size",kJ="otel.sdk.span.live",IJ="otel.sdk.span.started",LJ="batching_span_processor",_J="simple_span_processor";class ZJ{startedSpans;liveSpans;constructor(J){this.startedSpans=J.createCounter(IJ,{unit:"{span}",description:"The number of created spans."}),this.liveSpans=J.createUpDownCounter(kJ,{unit:"{span}",description:"The number of currently live spans."})}startSpan(J,$){let W=rJ($);if(this.startedSpans.add(1,{[hJ]:nJ(J),[WJ]:W}),$===B.NOT_RECORD)return()=>{};let Z={[WJ]:W};return this.liveSpans.add(1,Z),()=>{this.liveSpans.add(-1,Z)}}}function nJ(J){if(!J)return"none";if(J.isRemote)return"remote";return"local"}function rJ(J){switch(J){case B.RECORD_AND_SAMPLED:return"RECORD_AND_SAMPLE";case B.RECORD:return"RECORD_ONLY";case B.NOT_RECORD:return"DROP"}}var FJ="2.9.0";class QJ{_sampler;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;_tracerMetrics;constructor(J,$){this.instrumentationScope=J,this._sampler=$.sampler,this._spanLimits=$.spanLimits,this._resource=$.resource,this._idGenerator=$.idGenerator,this._spanProcessor=$.spanProcessor;let W=$.meterProvider.getMeter("@opentelemetry/sdk-trace",FJ);this._tracerMetrics=new ZJ(W)}startSpan(J,$={},W=H.context.active()){if($.root)W=H.trace.deleteSpan(W);let Z=H.trace.getSpan(W);if(E.isTracingSuppressed(W))return H.diag.debug("Instrumentation suppressed, returning Noop Span"),H.trace.wrapSpanContext(H.INVALID_SPAN_CONTEXT);let Q=Z?.spanContext(),q=this._idGenerator.generateSpanId(),X,w,K;if(!Q||!H.trace.isSpanContextValid(Q))w=this._idGenerator.generateTraceId();else w=Q.traceId,K=Q.traceState,X=Q;let U=$.kind??H.SpanKind.INTERNAL,m=($.links??[]).map((l)=>{return{context:l.context,attributes:E.sanitizeAttributes(l.attributes)}}),KJ=E.sanitizeAttributes($.attributes),g=this._sampler.shouldSample(W,w,J,U,KJ,m),lJ=this._tracerMetrics.startSpan(Q,g.decision);K=g.traceState??K;let cJ=g.decision===H.SamplingDecision.RECORD_AND_SAMPLED?H.TraceFlags.SAMPLED:H.TraceFlags.NONE,BJ={traceId:w,spanId:q,traceFlags:cJ,traceState:K};if(g.decision===H.SamplingDecision.NOT_RECORD)return H.diag.debug("Recording is off, propagating context in a non-recording span"),H.trace.wrapSpanContext(BJ);let pJ=E.sanitizeAttributes(Object.assign(KJ,g.attributes));return new $J({resource:this._resource,scope:this.instrumentationScope,context:W,spanContext:BJ,name:J,kind:U,links:m,parentSpanContext:X,attributes:pJ,startTime:$.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:lJ})}startActiveSpan(J,$,W,Z){let Q,q,X;if(arguments.length<2)return;else if(arguments.length===2)X=$;else if(arguments.length===3)Q=$,X=W;else Q=$,q=W,X=Z;let w=q??H.context.active(),K=this.startSpan(J,Q,w),U=H.trace.setSpan(w,K);return H.context.with(U,X,void 0,K)}[C](J,$,W){let Z={instrumentationScope:this.instrumentationScope,resource:{attributes:R(this._resource)},spanLimits:this._spanLimits};return b("Tracer",Z,J,$,W)}}var yJ=z(V(),1);class qJ{_spanProcessors;constructor(J){this._spanProcessors=J}forceFlush(){let J=[];for(let $ of this._spanProcessors)J.push($.forceFlush());return new Promise(($)=>{Promise.all(J).then(()=>{$()}).catch((W)=>{yJ.globalErrorHandler(W||Error("MultiSpanProcessor: forceFlush failed")),$()})})}onStart(J,$){for(let W of this._spanProcessors)W.onStart(J,$)}onEnding(J){for(let $ of this._spanProcessors)if($.onEnding)$.onEnding(J)}onEnd(J){for(let $ of this._spanProcessors)$.onEnd(J)}shutdown(){let J=[];for(let $ of this._spanProcessors)J.push($.shutdown());return new Promise(($,W)=>{Promise.all(J).then(()=>{$()},W)})}}var _=z(N(),1),xJ=z(V(),1);class k{shouldSample(){return{decision:B.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}class j{shouldSample(){return{decision:B.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}class P{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(J){if(this._root=J.root,!this._root)xJ.globalErrorHandler(Error("ParentBasedSampler must have a root sampler configured")),this._root=new j;this._remoteParentSampled=J.remoteParentSampled??new j,this._remoteParentNotSampled=J.remoteParentNotSampled??new k,this._localParentSampled=J.localParentSampled??new j,this._localParentNotSampled=J.localParentNotSampled??new k}shouldSample(J,$,W,Z,Q,q){let X=_.trace.getSpanContext(J);if(!X||!_.isSpanContextValid(X))return this._root.shouldSample(J,$,W,Z,Q,q);if(X.isRemote){if(X.traceFlags&_.TraceFlags.SAMPLED)return this._remoteParentSampled.shouldSample(J,$,W,Z,Q,q);return this._remoteParentNotSampled.shouldSample(J,$,W,Z,Q,q)}if(X.traceFlags&_.TraceFlags.SAMPLED)return this._localParentSampled.shouldSample(J,$,W,Z,Q,q);return this._localParentNotSampled.shouldSample(J,$,W,Z,Q,q)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}var O=z(N(),1),I=z(V(),1);var XJ=z(e(),1);var AJ=new Map;class d{processedSpans;queueSize;queueSizeCallback;standardAttrs;droppedAttrs;constructor(J,$,W){let Z=AJ.get(J)??0;if(AJ.set(J,Z+1),this.standardAttrs={[UJ]:J,[OJ]:`${J}/${Z}`},this.droppedAttrs={...this.standardAttrs,[XJ.ATTR_ERROR_TYPE]:"queue_full"},this.processedSpans=$.createCounter(PJ,{unit:"{span}",description:"The number of spans for which the processing has finished, either successful or failed."}),W){let{capacity:Q,getQueueSize:q}=W;$.createUpDownCounter(fJ,{unit:"{span}",description:"The maximum number of spans the queue of a given instance of an SDK span processor can hold."}).add(Q,this.standardAttrs),this.queueSize=$.createObservableUpDownCounter(NJ,{unit:"{span}",description:"The number of spans in the queue of a given instance of an SDK span processor."}),this.queueSizeCallback=(w)=>w.observe(q(),this.standardAttrs),this.queueSize.addCallback(this.queueSizeCallback)}}dropSpans(J){this.processedSpans.add(J,this.droppedAttrs)}finishSpans(J,$){if(!$){this.processedSpans.add(J,this.standardAttrs);return}let W={...this.standardAttrs,[XJ.ATTR_ERROR_TYPE]:$.name};this.processedSpans.add(J,W)}shutdown(){if(this.queueSize&&this.queueSizeCallback)this.queueSize.removeCallback(this.queueSizeCallback)}}class YJ{_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_exporter;_metrics;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(J){if(this._exporter=J.exporter,this._maxExportBatchSize=J.maxExportBatchSize??512,this._maxQueueSize=J.maxQueueSize??2048,this._scheduledDelayMillis=J.scheduledDelayMillis??5000,this._exportTimeoutMillis=J.exportTimeoutMillis??30000,this._shutdownOnce=new I.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize)O.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize;let $=J.selfObsMeterProvider?J.selfObsMeterProvider.getMeter("@opentelemetry/sdk-trace"):O.createNoopMeter();this._metrics=new d(LJ,$,{capacity:this._maxQueueSize,getQueueSize:()=>this._finishedSpans.length})}forceFlush(){if(this._shutdownOnce.isCalled)return this._shutdownOnce.promise;return this._flushAll()}onStart(J,$){}onEnd(J){if(this._shutdownOnce.isCalled)return;if((J.spanContext().traceFlags&O.TraceFlags.SAMPLED)===0)return;this._addToBuffer(J)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>{return this.onShutdown()}).then(()=>{return this._flushAll()}).then(()=>{return this._metrics.shutdown(),this._exporter.shutdown()})}_addToBuffer(J){if(this._finishedSpans.length>=this._maxQueueSize){if(this._droppedSpansCount===0)O.diag.debug("maxQueueSize reached, dropping spans");this._droppedSpansCount++,this._metrics.dropSpans(1);return}if(this._droppedSpansCount>0)O.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0;this._finishedSpans.push(J),this._maybeStartTimer()}_flushAll(){return new Promise((J,$)=>{let W=[],Z=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let Q=0,q=Z;Q<q;Q++)W.push(this._flushOneBatch());Promise.all(W).then(()=>{J()}).catch($)})}_flushOneBatch(){if(this._clearTimer(),this._finishedSpans.length===0)return Promise.resolve();return new Promise((J,$)=>{let W=setTimeout(()=>{$(Error("Timeout"))},this._exportTimeoutMillis);O.context.with(I.suppressTracing(O.context.active()),()=>{let Z;if(this._finishedSpans.length<=this._maxExportBatchSize)Z=this._finishedSpans,this._finishedSpans=[];else Z=this._finishedSpans.splice(0,this._maxExportBatchSize);let Q=()=>this._exporter.export(Z,(X)=>{if(clearTimeout(W),this._metrics.finishSpans(Z.length,X.error),X.code===I.ExportResultCode.SUCCESS)J();else $(X.error??Error("BatchSpanProcessor: span export failed"))}),q=null;for(let X=0,w=Z.length;X<w;X++){let K=Z[X];if(K.resource.asyncAttributesPending&&K.resource.waitForAsyncAttributes)q??=[],q.push(K.resource.waitForAsyncAttributes())}if(q===null)Q();else Promise.all(q).then(Q,(X)=>{I.globalErrorHandler(X),$(X)})})})}_maybeStartTimer(){if(this._isExporting)return;let J=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{if(this._isExporting=!1,this._finishedSpans.length>0)this._clearTimer(),this._maybeStartTimer()}).catch(($)=>{this._isExporting=!1,I.globalErrorHandler($)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return J();if(this._timer!==void 0)return;if(this._timer=setTimeout(()=>J(),this._scheduledDelayMillis),typeof this._timer!=="number")this._timer.unref()}_clearTimer(){if(this._timer!==void 0)clearTimeout(this._timer),this._timer=void 0}}class v extends YJ{onShutdown(){}}class F{generateTraceId=CJ(16);generateSpanId=CJ(8)}var o=Buffer.allocUnsafe(16);function CJ(J){return function(){for(let W=0;W<J/4;W++)o.writeUInt32BE(Math.random()*4294967296>>>0,W*4);for(let W=0;W<J;W++)if(o[W]>0)break;else if(W===J-1)o[J-1]=1;return o.toString("hex",0,J)}}var y;(function(J){J[J.resolved=0]="resolved",J[J.timeout=1]="timeout",J[J.error=2]="error",J[J.unresolved=3]="unresolved"})(y||(y={}));class n{_resource;_activeSpanProcessor;_forceFlushTimeoutMillis;_tracerOptions;_tracers=new Map;constructor(J={}){this._forceFlushTimeoutMillis=J.forceFlushTimeoutMillis??30000,this._resource=J.resource??JJ();let $=J.spanProcessors??[];this._activeSpanProcessor=new qJ($),this._tracerOptions={resource:this._resource,sampler:J.sampler??new P({root:new j}),spanLimits:{attributeCountLimit:J.spanLimits?.attributeCountLimit??128,attributeValueLengthLimit:J.spanLimits?.attributeValueLengthLimit??1/0,eventCountLimit:J.spanLimits?.eventCountLimit??128,linkCountLimit:J.spanLimits?.linkCountLimit??128,attributePerEventCountLimit:J.spanLimits?.attributePerEventCountLimit??128,attributePerLinkCountLimit:J.spanLimits?.attributePerLinkCountLimit??128},idGenerator:J.idGenerator||new F,spanProcessor:this._activeSpanProcessor,meterProvider:J.meterProvider??{getMeter(){return RJ.createNoopMeter()}}}}getTracer(J,$,W){let Z=`${J}@${$||""}:${W?.schemaUrl||""}`;if(!this._tracers.has(Z))this._tracers.set(Z,new QJ({name:J,version:$,schemaUrl:W?.schemaUrl},this._tracerOptions));return this._tracers.get(Z)}forceFlush(){let J=this._forceFlushTimeoutMillis,$=this._activeSpanProcessor._spanProcessors.map((W)=>{return new Promise((Z)=>{let Q,q=setTimeout(()=>{Z(Error(`Span processor did not completed within timeout period of ${J} ms`)),Q=y.timeout},J);W.forceFlush().then(()=>{if(clearTimeout(q),Q!==y.timeout)Q=y.resolved,Z(Q)}).catch((X)=>{clearTimeout(q),Q=y.error,Z(X)})})});return new Promise((W,Z)=>{Promise.all($).then((Q)=>{let q=Q.filter((X)=>X!==y.resolved);if(q.length>0)Z(q);else W()}).catch((Q)=>Z([Q]))})}shutdown(){return this._activeSpanProcessor.shutdown()}[C](J,$,W){let Z=this._activeSpanProcessor._spanProcessors,Q={resource:{attributes:R(this._resource)},tracers:Array.from(this._tracers.keys()),spanProcessors:Z.map((q)=>q.constructor?.name??"SpanProcessor")};return b("TracerProvider",Q,J,$,W)}}var S=z(V(),1);class zJ{export(J,$){return this._sendSpans(J,$)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(J){return{resource:{attributes:J.resource.attributes},instrumentationScope:J.instrumentationScope,traceId:J.spanContext().traceId,parentSpanContext:J.parentSpanContext,traceState:J.spanContext().traceState?.serialize(),name:J.name,id:J.spanContext().spanId,kind:J.kind,timestamp:S.hrTimeToMicroseconds(J.startTime),duration:S.hrTimeToMicroseconds(J.duration),attributes:J.attributes,status:J.status,events:J.events,links:J.links}}_sendSpans(J,$){for(let W of J)console.dir(this._exportInfo(W),{depth:3});if($)return $({code:S.ExportResultCode.SUCCESS})}}var HJ=z(V(),1);class GJ{_finishedSpans=[];_stopped=!1;export(J,$){if(this._stopped)return $({code:HJ.ExportResultCode.FAILED,error:Error("Exporter has been stopped")});this._finishedSpans.push(...J),setTimeout(()=>$({code:HJ.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}var r=z(N(),1),L=z(V(),1);class a{_exporter;_metrics;_shutdownOnce;_pendingExports;constructor(J){this._exporter=J.exporter,this._shutdownOnce=new L.BindOnceFuture(this._shutdown,this),this._pendingExports=new Set;let $=J.selfObsMeterProvider?J.selfObsMeterProvider.getMeter("@opentelemetry/sdk-trace"):r.createNoopMeter();this._metrics=new d(_J,$)}async forceFlush(){if(await Promise.all(Array.from(this._pendingExports)),this._exporter.forceFlush)await this._exporter.forceFlush()}onStart(J,$){}onEnd(J){if(this._shutdownOnce.isCalled)return;if((J.spanContext().traceFlags&r.TraceFlags.SAMPLED)===0)return;let $=this._doExport(J).catch((W)=>L.globalErrorHandler(W));this._pendingExports.add($),$.finally(()=>this._pendingExports.delete($))}async _doExport(J){if(J.resource.asyncAttributesPending)await J.resource.waitForAsyncAttributes?.();let $=await L.internal._export(this._exporter,[J]);if(this._metrics.finishSpans(1,$.error),$.code!==L.ExportResultCode.SUCCESS)throw $.error??Error(`SimpleSpanProcessor: span export failed (status ${$})`)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._metrics.shutdown(),this._exporter.shutdown()}}class wJ{onStart(J,$){}onEnd(J){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}var bJ=z(N(),1);class T{_ratio;_upperBound;constructor(J=0){this._ratio=this._normalize(J),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(J,$){return{decision:bJ.isValidTraceId($)&&this._accumulate($)<this._upperBound?B.RECORD_AND_SAMPLED:B.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(J){if(typeof J!=="number"||isNaN(J))return 0;return J>=1?1:J<=0?0:J}_accumulate(J){let $=0;for(let W=0;W<32;W+=8){let Z=0;for(let Q=0;Q<8;Q++){let q=J.charCodeAt(W+Q),X=q<58?q-48:q<71?q-55:q-87;Z=Z<<4|X}$=($^Z)>>>0}return $}}var f;(function(J){J.AlwaysOff="always_off",J.AlwaysOn="always_on",J.ParentBasedAlwaysOff="parentbased_always_off",J.ParentBasedAlwaysOn="parentbased_always_on",J.ParentBasedTraceIdRatio="parentbased_traceidratio",J.TraceIdRatio="traceidratio"})(f||(f={}));var s=1;function vJ(){return{sampler:aJ(),forceFlushTimeoutMillis:30000,generalLimits:{attributeValueLengthLimit:D.getNumberFromEnv("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:D.getNumberFromEnv("OTEL_ATTRIBUTE_COUNT_LIMIT")??128},spanLimits:{attributeValueLengthLimit:D.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??1/0,attributeCountLimit:D.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??128,linkCountLimit:D.getNumberFromEnv("OTEL_SPAN_LINK_COUNT_LIMIT")??128,eventCountLimit:D.getNumberFromEnv("OTEL_SPAN_EVENT_COUNT_LIMIT")??128,attributePerEventCountLimit:D.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT")??128,attributePerLinkCountLimit:D.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT")??128}}}function aJ(){let J=D.getStringFromEnv("OTEL_TRACES_SAMPLER")??f.ParentBasedAlwaysOn;switch(J){case f.AlwaysOn:return new j;case f.AlwaysOff:return new k;case f.ParentBasedAlwaysOn:return new P({root:new j});case f.ParentBasedAlwaysOff:return new P({root:new k});case f.TraceIdRatio:return new T(EJ());case f.ParentBasedTraceIdRatio:return new P({root:new T(EJ())});default:return t.diag.error(`OTEL_TRACES_SAMPLER value "${J}" invalid, defaulting to "${f.ParentBasedAlwaysOn}".`),new P({root:new j})}}function EJ(){let J=D.getNumberFromEnv("OTEL_TRACES_SAMPLER_ARG");if(J==null)return t.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${s}.`),s;if(J<0||J>1)return t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${J} was given, but it is out of range ([0..1]), defaulting to ${s}.`),s;return J}var u=z(V(),1),sJ=128,tJ=1/0;function TJ(J){let $=Object.assign({},J.spanLimits);return $.attributeCountLimit=J.spanLimits?.attributeCountLimit??J.generalLimits?.attributeCountLimit??u.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT")??u.getNumberFromEnv("OTEL_ATTRIBUTE_COUNT_LIMIT")??sJ,$.attributeValueLengthLimit=J.spanLimits?.attributeValueLengthLimit??J.generalLimits?.attributeValueLengthLimit??u.getNumberFromEnv("OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT")??u.getNumberFromEnv("OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT")??tJ,Object.assign({},J,{spanLimits:$})}class dJ extends n{constructor(J={}){let $=gJ.merge({},vJ(),TJ(J));delete $.generalLimits;super($)}}var SJ=z(V(),1);class uJ extends v{constructor(J,$){if(!$)$={};let W=[["maxExportBatchSize","OTEL_BSP_MAX_EXPORT_BATCH_SIZE"],["maxQueueSize","OTEL_BSP_MAX_QUEUE_SIZE"],["scheduledDelayMillis","OTEL_BSP_SCHEDULE_DELAY"],["exportTimeoutMillis","OTEL_BSP_EXPORT_TIMEOUT"]];for(let[Z,Q]of W)if($[Z]===void 0){let q=SJ.getNumberFromEnv(Q);if(q!==void 0)$[Z]=q}super({exporter:J,...$})}}class mJ extends a{constructor(J){super({exporter:J})}}export{T as TraceIdRatioBasedSampler,mJ as SimpleSpanProcessor,B as SamplingDecision,F as RandomIdGenerator,P as ParentBasedSampler,wJ as NoopSpanProcessor,GJ as InMemorySpanExporter,zJ as ConsoleSpanExporter,uJ as BatchSpanProcessor,dJ as BasicTracerProvider,j as AlwaysOnSampler,k as AlwaysOffSampler};