@qitqode/qitqode-android-arm64 0.1.35 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/bundle/{chunk-7311jry1.js → chunk-00sr2gwz.js} +2 -2
  2. package/bundle/{chunk-azhw650z.js → chunk-02xcb52z.js} +2 -2
  3. package/bundle/{chunk-gws1rn1v.js → chunk-08q55ya0.js} +1 -1
  4. package/bundle/chunk-092bx2yw.js +2 -0
  5. package/bundle/{chunk-xgr6jnd6.js → chunk-0g25z230.js} +1 -1
  6. package/bundle/chunk-0jrgk6vk.js +2 -0
  7. package/bundle/chunk-0ne5m1n3.js +2 -0
  8. package/bundle/chunk-0qn52zsd.js +2 -0
  9. package/bundle/{chunk-7mxt5b0h.js → chunk-0z33en1a.js} +1 -1
  10. package/bundle/chunk-10accb7b.js +2 -0
  11. package/bundle/chunk-13kpdfr7.js +2 -0
  12. package/bundle/chunk-15s8zwgf.js +2 -0
  13. package/bundle/chunk-17pxm5d3.js +14 -0
  14. package/bundle/{chunk-nj4d554m.js → chunk-1bx2sjn6.js} +1 -1
  15. package/bundle/chunk-1kgyfja6.js +2 -0
  16. package/bundle/{chunk-bv29k2pf.js → chunk-1mcsf4yb.js} +2 -2
  17. package/bundle/{chunk-kwx9ewe0.js → chunk-1wpjmwnh.js} +1 -1
  18. package/bundle/{chunk-snr44en9.js → chunk-25bp7pcm.js} +2 -2
  19. package/bundle/{chunk-kmcsz8yv.js → chunk-2dkrfc1s.js} +1 -1
  20. package/bundle/chunk-2pzvcpv4.js +3 -0
  21. package/bundle/chunk-3bkdbqjj.js +2 -0
  22. package/bundle/{chunk-08m0hkdz.js → chunk-3dr4469n.js} +1 -1
  23. package/bundle/{chunk-n96tvjgj.js → chunk-3mepk08v.js} +2 -2
  24. package/bundle/chunk-3sz6gw10.js +3 -0
  25. package/bundle/{chunk-xqdrr7xg.js → chunk-45mjcxqk.js} +1 -1
  26. package/bundle/chunk-46ztrjw0.js +7 -0
  27. package/bundle/chunk-4dtkj9zg.js +2 -0
  28. package/bundle/chunk-4e9p3e0a.js +2 -0
  29. package/bundle/{chunk-qrtc3etn.js → chunk-4fa390yr.js} +2 -2
  30. package/bundle/chunk-4gs87ghj.js +3 -0
  31. package/bundle/{chunk-3k2b05fv.js → chunk-4sazy0nq.js} +1 -1
  32. package/bundle/chunk-4tbqsrsn.js +2 -0
  33. package/bundle/{chunk-ngccf7ga.js → chunk-52b1v7mn.js} +1 -1
  34. package/bundle/chunk-53kns5wy.js +2 -0
  35. package/bundle/{chunk-11v7vz3y.js → chunk-549ptbaj.js} +1 -1
  36. package/bundle/chunk-559ek1ym.js +2 -0
  37. package/bundle/chunk-55wxgsga.js +2 -0
  38. package/bundle/{chunk-34p46th6.js → chunk-5bate758.js} +1 -1
  39. package/bundle/chunk-5ke0yqqz.js +8 -0
  40. package/bundle/{chunk-kdcnder5.js → chunk-5kmfnkzv.js} +1 -1
  41. package/bundle/chunk-5myxjxae.js +3 -0
  42. package/bundle/chunk-5q1fz2az.js +2 -0
  43. package/bundle/{chunk-txbwmwxj.js → chunk-5sgpjgss.js} +1 -1
  44. package/bundle/{chunk-rsszcqxd.js → chunk-60qyqqxx.js} +1 -1
  45. package/bundle/{chunk-94pcpztx.js → chunk-64s7vfj7.js} +2 -2
  46. package/bundle/{chunk-6ged58yw.js → chunk-6r8pg6ma.js} +2 -2
  47. package/bundle/{chunk-8762ty72.js → chunk-70pb4kcm.js} +2 -2
  48. package/bundle/{chunk-04hvaaje.js → chunk-72zxassf.js} +1 -1
  49. package/bundle/{chunk-yz6898wy.js → chunk-73ckx171.js} +1 -1
  50. package/bundle/{chunk-gj0wt0cy.js → chunk-7fawtcnn.js} +1 -1
  51. package/bundle/{chunk-zfn0z4sh.js → chunk-7gbytqkn.js} +2 -2
  52. package/bundle/{chunk-x66ycpfs.js → chunk-7jhrxzjx.js} +2 -2
  53. package/bundle/{chunk-09pkckr1.js → chunk-7vftsy04.js} +1 -1
  54. package/bundle/chunk-871f8x99.js +4 -0
  55. package/bundle/chunk-88emsbaz.js +2 -0
  56. package/bundle/{chunk-zfd70p01.js → chunk-8dxdeksr.js} +1 -1
  57. package/bundle/{chunk-6styp5dn.js → chunk-8fgamz4y.js} +1 -1
  58. package/bundle/{chunk-9qdr9t8c.js → chunk-8q6z6emx.js} +1 -1
  59. package/bundle/{chunk-4ttf9rjd.js → chunk-8r3410c2.js} +1 -1
  60. package/bundle/{chunk-3mzcr3fw.js → chunk-8tp4whyw.js} +1 -1
  61. package/bundle/chunk-8yn64y27.js +2 -0
  62. package/bundle/{chunk-41v0x1jk.js → chunk-8yr682pv.js} +2 -2
  63. package/bundle/chunk-8ywa7az5.js +2 -0
  64. package/bundle/chunk-8ywdddts.js +2 -0
  65. package/bundle/{chunk-exmw8jfa.js → chunk-909fp6pm.js} +2 -2
  66. package/bundle/chunk-92zjark4.js +2 -0
  67. package/bundle/chunk-98effz12.js +2 -0
  68. package/bundle/{chunk-kjyw00jp.js → chunk-9cw4cnz0.js} +1 -1
  69. package/bundle/{chunk-2swch6mx.js → chunk-9dh9bc9d.js} +1 -1
  70. package/bundle/{chunk-y437vyza.js → chunk-9fkmhmh6.js} +1 -1
  71. package/bundle/{chunk-7vd91wsd.js → chunk-9nk0ts0s.js} +1 -1
  72. package/bundle/{chunk-p9cnzxb8.js → chunk-9s4whpg1.js} +2 -2
  73. package/bundle/{chunk-yajd975f.js → chunk-9xvctnjr.js} +1 -1
  74. package/bundle/{chunk-4wxxyrxn.js → chunk-9zre5e54.js} +1 -1
  75. package/bundle/chunk-a6z0fhta.js +2 -0
  76. package/bundle/{chunk-yt3f3j35.js → chunk-a9y27zd2.js} +1 -1
  77. package/bundle/{chunk-mex0fe9s.js → chunk-acyj91wq.js} +1 -1
  78. package/bundle/chunk-aj3y2e86.js +3 -0
  79. package/bundle/chunk-akpssv2d.js +2 -0
  80. package/bundle/chunk-aq28ejhv.js +2 -0
  81. package/bundle/{chunk-pkc4ddw1.js → chunk-atpzz901.js} +1 -1
  82. package/bundle/chunk-aw8af3ky.js +2 -0
  83. package/bundle/chunk-ax1y4699.js +2 -0
  84. package/bundle/{chunk-dctj3c22.js → chunk-b0jh0rby.js} +2 -2
  85. package/bundle/chunk-b10px5g4.js +2 -0
  86. package/bundle/chunk-bha3sbsj.js +2 -0
  87. package/bundle/{chunk-67d5d8mr.js → chunk-bnz0mxak.js} +1 -1
  88. package/bundle/chunk-bs020a3x.js +2 -0
  89. package/bundle/chunk-bs61sezq.js +2 -0
  90. package/bundle/{chunk-7eexey82.js → chunk-c72jajx9.js} +1 -1
  91. package/bundle/{chunk-81trveht.js → chunk-cagk1sjd.js} +1 -1
  92. package/bundle/{chunk-1byd3wma.js → chunk-cdh26622.js} +2 -2
  93. package/bundle/{chunk-t2vm08v6.js → chunk-ceefd2nj.js} +1 -1
  94. package/bundle/chunk-cmdjkx32.js +2 -0
  95. package/bundle/{chunk-zh3fny3z.js → chunk-cx7p4ezk.js} +2 -2
  96. package/bundle/chunk-cxtxvt43.js +2 -0
  97. package/bundle/{chunk-pxmhe36r.js → chunk-d1rn44wz.js} +1 -1
  98. package/bundle/{chunk-0c6ep9mc.js → chunk-d93z6hrn.js} +1 -1
  99. package/bundle/{chunk-zddknkw7.js → chunk-d9x9kqvy.js} +1 -1
  100. package/bundle/chunk-de2rfsaf.js +2 -0
  101. package/bundle/{chunk-seghf5fc.js → chunk-dgx4rq86.js} +1 -1
  102. package/bundle/{chunk-qzj6027k.js → chunk-dh1h513y.js} +1 -1
  103. package/bundle/chunk-dncnyzaa.js +2 -0
  104. package/bundle/chunk-dp6zktka.js +2 -0
  105. package/bundle/{chunk-ba3h1pzs.js → chunk-dshnn54c.js} +1 -1
  106. package/bundle/{chunk-73myw3bj.js → chunk-dt899wbf.js} +2 -2
  107. package/bundle/chunk-dvqdtdza.js +2 -0
  108. package/bundle/{chunk-6ynxf3q7.js → chunk-dvxk6mr6.js} +2 -2
  109. package/bundle/{chunk-bnss5dkk.js → chunk-dykqn0nj.js} +2 -2
  110. package/bundle/{chunk-hv6eccx1.js → chunk-dz3s882k.js} +220 -220
  111. package/bundle/{chunk-y9zstzed.js → chunk-eaqfnwdj.js} +1 -1
  112. package/bundle/{chunk-54wh8b12.js → chunk-eb8nsk7e.js} +2 -2
  113. package/bundle/chunk-ebabnv33.js +3 -0
  114. package/bundle/chunk-ebdpg3cn.js +2 -0
  115. package/bundle/{chunk-kfmz2p27.js → chunk-ev3a2sxv.js} +2 -2
  116. package/bundle/{chunk-d00c1k9w.js → chunk-ewpzqnj4.js} +1 -1
  117. package/bundle/chunk-eyc6tb5h.js +2 -0
  118. package/bundle/chunk-eze57bty.js +2 -0
  119. package/bundle/{chunk-qddt2gcs.js → chunk-ezrskm25.js} +1 -1
  120. package/bundle/chunk-fa47vzfc.js +2 -0
  121. package/bundle/chunk-fe397ph0.js +2 -0
  122. package/bundle/{chunk-bzgj60w4.js → chunk-fn8191ps.js} +2 -2
  123. package/bundle/chunk-fr75ytdr.js +2 -0
  124. package/bundle/chunk-fw2tnbt6.js +2 -0
  125. package/bundle/chunk-fwr2qgqb.js +2 -0
  126. package/bundle/chunk-fyz7fngd.js +2 -0
  127. package/bundle/chunk-g204pt98.js +2 -0
  128. package/bundle/{chunk-ggydr1ze.js → chunk-g794ey6w.js} +1 -1
  129. package/bundle/chunk-g8cfzzrs.js +2 -0
  130. package/bundle/chunk-gcgmwqhh.js +2 -0
  131. package/bundle/{chunk-rmve21dh.js → chunk-gg7bg3ek.js} +1 -1
  132. package/bundle/{chunk-9x25d115.js → chunk-gkj4a27z.js} +1 -1
  133. package/bundle/{chunk-sjw56r2n.js → chunk-gnt982jr.js} +3 -3
  134. package/bundle/chunk-grdfpd57.js +2 -0
  135. package/bundle/chunk-gt6tgm42.js +5 -0
  136. package/bundle/chunk-gw36mrg4.js +2 -0
  137. package/bundle/{chunk-z8gdmvgg.js → chunk-gwfx7tx7.js} +2 -2
  138. package/bundle/{chunk-q8hd01j7.js → chunk-gxmxx8jb.js} +1 -1
  139. package/bundle/{chunk-tge53d52.js → chunk-h1kg35mn.js} +1 -1
  140. package/bundle/chunk-h36qec67.js +2 -0
  141. package/bundle/{chunk-0msqaywp.js → chunk-h7w35n7w.js} +1 -1
  142. package/bundle/chunk-h9gtymfm.js +2 -0
  143. package/bundle/chunk-h9qn35pn.js +2 -0
  144. package/bundle/{chunk-mr8j7rc6.js → chunk-hb9mc5f9.js} +1 -1
  145. package/bundle/{chunk-df2aswz3.js → chunk-hcy77w6t.js} +1 -1
  146. package/bundle/chunk-hd8q4msp.js +2 -0
  147. package/bundle/{chunk-6a7c7wnf.js → chunk-hgsykghj.js} +2 -2
  148. package/bundle/chunk-hhjkezfz.js +2 -0
  149. package/bundle/chunk-hnz570f9.js +3 -0
  150. package/bundle/chunk-j5kyf7vt.js +5 -0
  151. package/bundle/{chunk-1yt5rsew.js → chunk-j63fkt6n.js} +1 -1
  152. package/bundle/{chunk-03xppy47.js → chunk-jcjaw7tk.js} +2 -2
  153. package/bundle/{chunk-jkh6eg7d.js → chunk-jf6ry79j.js} +4 -4
  154. package/bundle/chunk-jfz8wwk9.js +2 -0
  155. package/bundle/{chunk-ke7n9t5p.js → chunk-jgz1a29w.js} +3 -3
  156. package/bundle/{chunk-ebcdxmdd.js → chunk-jngchw38.js} +1 -1
  157. package/bundle/{chunk-j5ymkhry.js → chunk-jqn27885.js} +1 -1
  158. package/bundle/chunk-js6hqmq7.js +2 -0
  159. package/bundle/{chunk-hj3ddt53.js → chunk-jts0dma5.js} +2 -2
  160. package/bundle/chunk-k70x182t.js +2 -0
  161. package/bundle/chunk-k7n1csxv.js +3 -0
  162. package/bundle/{chunk-er38zew1.js → chunk-kb6v5hhm.js} +2 -2
  163. package/bundle/chunk-kmtfdky8.js +4 -0
  164. package/bundle/chunk-kp8nkm3m.js +2 -0
  165. package/bundle/{chunk-7hm0c2yg.js → chunk-kqhh2pm9.js} +1 -1
  166. package/bundle/{chunk-0h8wdch6.js → chunk-kt0ej3nq.js} +1 -1
  167. package/bundle/chunk-kwzawx7r.js +2 -0
  168. package/bundle/{chunk-n6msxne8.js → chunk-kx2dp8ch.js} +1 -1
  169. package/bundle/chunk-m0mek3es.js +2 -0
  170. package/bundle/{chunk-tbgczapt.js → chunk-m0xsvzyd.js} +2 -2
  171. package/bundle/chunk-m31d2n6h.js +2 -0
  172. package/bundle/{chunk-9ayxg9mq.js → chunk-m6zxr0j8.js} +2 -2
  173. package/bundle/{chunk-egn55fa2.js → chunk-mcc5ynma.js} +3 -3
  174. package/bundle/{chunk-md8161zd.js → chunk-mdzzcrf9.js} +2 -2
  175. package/bundle/{chunk-ynwkr3yh.js → chunk-mvnxwwe7.js} +2 -2
  176. package/bundle/{chunk-b4knxpqh.js → chunk-mw2hr4pd.js} +1 -1
  177. package/bundle/{chunk-vszbqv24.js → chunk-mzbr0m2v.js} +1 -1
  178. package/bundle/{chunk-bj00xk8k.js → chunk-n0trgp1c.js} +2 -2
  179. package/bundle/chunk-n14qktbg.js +2 -0
  180. package/bundle/{chunk-yjk6zv2z.js → chunk-n2ygpy76.js} +1 -1
  181. package/bundle/{chunk-yprmd5b7.js → chunk-n38h109k.js} +2 -2
  182. package/bundle/{chunk-8vg4fmg2.js → chunk-n7d9eemn.js} +180 -178
  183. package/bundle/{chunk-06k6egt2.js → chunk-neqy8j4n.js} +1 -1
  184. package/bundle/chunk-nhwhkx62.js +4 -0
  185. package/bundle/{chunk-nj61v4n7.js → chunk-njkserae.js} +1 -1
  186. package/bundle/{chunk-n6gtdx5h.js → chunk-nq495be3.js} +1 -1
  187. package/bundle/{chunk-p3qkexpk.js → chunk-nsjp44fp.js} +1 -1
  188. package/bundle/chunk-nzzsj54n.js +2 -0
  189. package/bundle/chunk-p19qfw59.js +2 -0
  190. package/bundle/chunk-p2yxj9s4.js +2 -0
  191. package/bundle/{chunk-1dtzxt2w.js → chunk-p3rp99na.js} +1 -1
  192. package/bundle/{chunk-79agp7v3.js → chunk-p8kpqyxb.js} +2 -2
  193. package/bundle/{chunk-9fxkh84w.js → chunk-p9zrk16q.js} +1 -1
  194. package/bundle/chunk-pnpre7ys.js +3 -0
  195. package/bundle/{chunk-ee23d2nz.js → chunk-pnq1h5az.js} +2 -2
  196. package/bundle/{chunk-wfd5h6ax.js → chunk-pqnbdygz.js} +2 -2
  197. package/bundle/chunk-pr1ysgr3.js +2 -0
  198. package/bundle/chunk-ps9p14y6.js +2 -0
  199. package/bundle/chunk-px8vtbmr.js +3 -0
  200. package/bundle/{chunk-zfcp509b.js → chunk-pxx2hz0g.js} +2 -2
  201. package/bundle/{chunk-rq4w0by4.js → chunk-q81m4m9z.js} +1 -1
  202. package/bundle/chunk-qagc6v17.js +2 -0
  203. package/bundle/{chunk-mq6jn47r.js → chunk-qb35hqm4.js} +1 -1
  204. package/bundle/chunk-qc0zhbhm.js +2 -0
  205. package/bundle/{chunk-keveg5gx.js → chunk-qdcf1ay5.js} +2 -2
  206. package/bundle/{chunk-t3eymzg1.js → chunk-qpzspr9z.js} +2 -2
  207. package/bundle/chunk-qq2rcxv2.js +9 -0
  208. package/bundle/{chunk-axdzm75h.js → chunk-qqne79vp.js} +2 -2
  209. package/bundle/{chunk-g4gjz7sq.js → chunk-qs4wef8c.js} +1 -1
  210. package/bundle/{chunk-nmehsm3w.js → chunk-qy1a2tpc.js} +1 -1
  211. package/bundle/chunk-qyjt0qnq.js +3 -0
  212. package/bundle/{chunk-6a77w77q.js → chunk-r0g5yyhf.js} +4 -4
  213. package/bundle/{chunk-by855es0.js → chunk-r58gzg6m.js} +1 -1
  214. package/bundle/{chunk-fmq0m4k5.js → chunk-r6ndvzd0.js} +1 -1
  215. package/bundle/chunk-r78kfhvz.js +2 -0
  216. package/bundle/{chunk-dyv2hqvc.js → chunk-rcyhqkv5.js} +1 -1
  217. package/bundle/{chunk-yp5bypsp.js → chunk-rexdr63q.js} +2 -2
  218. package/bundle/{chunk-1me21qdc.js → chunk-rgxy4ngt.js} +1 -1
  219. package/bundle/chunk-rnd5mnsm.js +2 -0
  220. package/bundle/{chunk-dcndy4sr.js → chunk-rph9zj24.js} +1 -1
  221. package/bundle/{chunk-ryfqwsft.js → chunk-rrd0jf5m.js} +1 -1
  222. package/bundle/{chunk-e74efvj2.js → chunk-rtdym35y.js} +172 -172
  223. package/bundle/chunk-s2xdf6qh.js +14 -0
  224. package/bundle/{chunk-mpygdb5a.js → chunk-s8mghr5a.js} +2 -2
  225. package/bundle/chunk-schtpyjs.js +2 -0
  226. package/bundle/{chunk-08f4khsw.js → chunk-snt1kefv.js} +3 -3
  227. package/bundle/{chunk-a1hzeejj.js → chunk-sp8ek94w.js} +2 -2
  228. package/bundle/{chunk-s8hq6trz.js → chunk-srxx88nb.js} +1 -1
  229. package/bundle/{chunk-gy0wm7e1.js → chunk-std2bgv7.js} +2 -2
  230. package/bundle/chunk-sv1s1qxd.js +619 -0
  231. package/bundle/{chunk-dffhkd30.js → chunk-swcgsrbj.js} +1 -1
  232. package/bundle/chunk-sxwqrvmy.js +28 -0
  233. package/bundle/chunk-sxy4hyyy.js +2 -0
  234. package/bundle/chunk-syc4b8rt.js +2 -0
  235. package/bundle/{chunk-wgk7ynt3.js → chunk-t01bhw5h.js} +3 -3
  236. package/bundle/chunk-tcs6wgna.js +3 -0
  237. package/bundle/{chunk-gmzrvxnv.js → chunk-tdmn21z0.js} +2 -2
  238. package/bundle/{chunk-71zw0qhf.js → chunk-tdxbm1nd.js} +1 -1
  239. package/bundle/{chunk-p825vsjy.js → chunk-te5tfq79.js} +1 -1
  240. package/bundle/chunk-tf4xwqz7.js +2 -0
  241. package/bundle/{chunk-fg35hwa0.js → chunk-tgd5ctnt.js} +2 -2
  242. package/bundle/chunk-twhavv1m.js +2 -0
  243. package/bundle/{chunk-qa2j0qmy.js → chunk-txqc7543.js} +2 -2
  244. package/bundle/chunk-tzg4z74d.js +2 -0
  245. package/bundle/chunk-tzrbb0e8.js +3 -0
  246. package/bundle/chunk-v0yxkq99.js +3 -0
  247. package/bundle/{chunk-a3a1trap.js → chunk-v3x5nrc4.js} +2 -2
  248. package/bundle/chunk-v7q3d3n6.js +3 -0
  249. package/bundle/chunk-v8vcwx23.js +2 -0
  250. package/bundle/chunk-vc4e6xc4.js +10 -0
  251. package/bundle/{chunk-6p7yg5sr.js → chunk-vftqwdpg.js} +1 -1
  252. package/bundle/{chunk-r0k21apr.js → chunk-vgaxv70x.js} +2 -2
  253. package/bundle/{chunk-nkk4fyqf.js → chunk-vgnddhdj.js} +1 -1
  254. package/bundle/{chunk-xd3xc1vv.js → chunk-vm58fkrv.js} +1 -1
  255. package/bundle/{chunk-qg2vk5fw.js → chunk-vsys768k.js} +1 -1
  256. package/bundle/{chunk-5a7fs1hg.js → chunk-vvzbfv2f.js} +1 -1
  257. package/bundle/{chunk-s4qtphwx.js → chunk-w03fdrxe.js} +1 -1
  258. package/bundle/{chunk-z1ay3qd0.js → chunk-w3bmf3zz.js} +1 -1
  259. package/bundle/{chunk-vsr8mnj6.js → chunk-w5940jxm.js} +1 -1
  260. package/bundle/chunk-w6rf2knb.js +2 -0
  261. package/bundle/{chunk-aa8hymcv.js → chunk-w8d9srv7.js} +2 -2
  262. package/bundle/chunk-w9pdvcf9.js +3 -0
  263. package/bundle/{chunk-yk97q51d.js → chunk-wev34grp.js} +2 -2
  264. package/bundle/chunk-wh7r96t3.js +2 -0
  265. package/bundle/{chunk-1pg6pv0m.js → chunk-wm77svwm.js} +1 -1
  266. package/bundle/chunk-wnjqaxze.js +2 -0
  267. package/bundle/{chunk-gckgaqqr.js → chunk-ws3p9cya.js} +2 -2
  268. package/bundle/chunk-x42w8ewc.js +2 -0
  269. package/bundle/{chunk-qkjdr337.js → chunk-x6rr6ss1.js} +1 -1
  270. package/bundle/chunk-xc9se3c8.js +2 -0
  271. package/bundle/{chunk-bbzztav6.js → chunk-xdacgfba.js} +1 -1
  272. package/bundle/{chunk-6p94fpbn.js → chunk-xdjwapwy.js} +2 -2
  273. package/bundle/chunk-xfz698bh.js +2 -0
  274. package/bundle/{chunk-zwnhf4z1.js → chunk-xhbb8b5g.js} +1 -1
  275. package/bundle/chunk-xjhezxft.js +8 -0
  276. package/bundle/chunk-xxj3sgd5.js +2 -0
  277. package/bundle/chunk-xxvqq7kc.js +2 -0
  278. package/bundle/{chunk-cs38g1bx.js → chunk-y0ydzdfc.js} +1 -1
  279. package/bundle/{chunk-wvf5q2hz.js → chunk-y1b2h15z.js} +1 -1
  280. package/bundle/{chunk-1gf116rg.js → chunk-yacccwf6.js} +1 -1
  281. package/bundle/chunk-ydc6ypjt.js +77 -0
  282. package/bundle/chunk-ye0mkqb4.js +2 -0
  283. package/bundle/{chunk-dhqaqeq6.js → chunk-yeq7b87a.js} +1 -1
  284. package/bundle/chunk-yfp9y71y.js +2 -0
  285. package/bundle/{chunk-e6xnynaz.js → chunk-yha554nm.js} +2 -2
  286. package/bundle/{chunk-rv1stdvb.js → chunk-yj6rbe9p.js} +2 -2
  287. package/bundle/chunk-yjjh339w.js +2 -0
  288. package/bundle/{chunk-c5pb87yf.js → chunk-ymtcm4xd.js} +1 -1
  289. package/bundle/chunk-ypk3t1eh.js +3 -0
  290. package/bundle/chunk-yt6vd7a5.js +2 -0
  291. package/bundle/{chunk-ssk8tkwd.js → chunk-yw9pfqxt.js} +1 -1
  292. package/bundle/{chunk-g6cyhxwg.js → chunk-yykjvt7f.js} +2 -2
  293. package/bundle/{chunk-sfes6pp1.js → chunk-yzh4rmrt.js} +1 -1
  294. package/bundle/chunk-yzn08nx1.js +2 -0
  295. package/bundle/chunk-yzq3c3dq.js +2 -0
  296. package/bundle/{chunk-prh3c44x.js → chunk-yzwgvjzd.js} +1 -1
  297. package/bundle/chunk-z0tfsdb9.js +3 -0
  298. package/bundle/chunk-z1j25911.js +2 -0
  299. package/bundle/{chunk-rkwrjphh.js → chunk-z1rshv6g.js} +1 -1
  300. package/bundle/chunk-z210dtw1.js +3 -0
  301. package/bundle/chunk-z29ahthm.js +2 -0
  302. package/bundle/{chunk-w1n4rf6n.js → chunk-z7vv0ngm.js} +2 -2
  303. package/bundle/{chunk-jgjnz82k.js → chunk-zaan8jk6.js} +1 -1
  304. package/bundle/{chunk-6gb65bv1.js → chunk-zbqzm65q.js} +1 -1
  305. package/bundle/{chunk-bk4phk66.js → chunk-zesbm9k1.js} +1 -1
  306. package/bundle/{chunk-c6vfwjg4.js → chunk-zfcfyagt.js} +1 -1
  307. package/bundle/{chunk-ywkvq7zb.js → chunk-zfnbk5gy.js} +1 -1
  308. package/bundle/chunk-zgre4gc2.js +2 -0
  309. package/bundle/{chunk-z7430qxg.js → chunk-zrmx397j.js} +1 -1
  310. package/bundle/chunk-zthkjx33.js +2 -0
  311. package/bundle/chunk-ztnepaqc.js +3 -0
  312. package/bundle/chunk-zwvwbrsc.js +2 -0
  313. package/bundle/chunk-zxddasg8.js +2 -0
  314. package/bundle/index.js +3 -3
  315. package/bundle/parser.worker.js +2 -2
  316. package/bundle/worker.js +1 -1
  317. package/package.json +1 -1
  318. package/bundle/chunk-0442cmw2.js +0 -2
  319. package/bundle/chunk-085pvqr4.js +0 -2
  320. package/bundle/chunk-0x5jn813.js +0 -2
  321. package/bundle/chunk-11g2rpv8.js +0 -3
  322. package/bundle/chunk-28t9akfn.js +0 -2
  323. package/bundle/chunk-2h1fcqvf.js +0 -2
  324. package/bundle/chunk-2kens6wh.js +0 -2
  325. package/bundle/chunk-2scyp9ns.js +0 -2
  326. package/bundle/chunk-2tw58kwb.js +0 -2
  327. package/bundle/chunk-2vxx0tax.js +0 -2
  328. package/bundle/chunk-2ybt3p5z.js +0 -2
  329. package/bundle/chunk-2zpkw3ge.js +0 -2
  330. package/bundle/chunk-31g86yn6.js +0 -2
  331. package/bundle/chunk-397be2x0.js +0 -2
  332. package/bundle/chunk-3c78nkgn.js +0 -2
  333. package/bundle/chunk-3d91q2qd.js +0 -2
  334. package/bundle/chunk-43yv7tz1.js +0 -2
  335. package/bundle/chunk-496ajawz.js +0 -2
  336. package/bundle/chunk-499gp5g5.js +0 -2
  337. package/bundle/chunk-4hzm14xt.js +0 -3
  338. package/bundle/chunk-4xw14sed.js +0 -2
  339. package/bundle/chunk-536naqqv.js +0 -2
  340. package/bundle/chunk-57nvmhjq.js +0 -2
  341. package/bundle/chunk-5e4fxy99.js +0 -616
  342. package/bundle/chunk-5he3d7cy.js +0 -2
  343. package/bundle/chunk-5qr286w8.js +0 -2
  344. package/bundle/chunk-606vpgc4.js +0 -4
  345. package/bundle/chunk-6a1skxcj.js +0 -3
  346. package/bundle/chunk-6cj7cn5x.js +0 -2
  347. package/bundle/chunk-6hybp2mt.js +0 -2
  348. package/bundle/chunk-6y423jax.js +0 -3
  349. package/bundle/chunk-72ghkgcn.js +0 -2
  350. package/bundle/chunk-741teh8k.js +0 -2
  351. package/bundle/chunk-7b3wx6kn.js +0 -2
  352. package/bundle/chunk-891yevv2.js +0 -2
  353. package/bundle/chunk-8c1ypgw5.js +0 -3
  354. package/bundle/chunk-8ktgy41r.js +0 -2
  355. package/bundle/chunk-8q73cjyj.js +0 -2
  356. package/bundle/chunk-8rt63jbm.js +0 -2
  357. package/bundle/chunk-8y623qdx.js +0 -2
  358. package/bundle/chunk-921vn745.js +0 -2
  359. package/bundle/chunk-945ebhte.js +0 -2
  360. package/bundle/chunk-9548cc0c.js +0 -2
  361. package/bundle/chunk-9yrypq1r.js +0 -14
  362. package/bundle/chunk-a0rp7gh4.js +0 -77
  363. package/bundle/chunk-a48t0g95.js +0 -3
  364. package/bundle/chunk-a949at1c.js +0 -3
  365. package/bundle/chunk-akk84fnc.js +0 -2
  366. package/bundle/chunk-aw7j7brm.js +0 -2
  367. package/bundle/chunk-b6cybdj3.js +0 -2
  368. package/bundle/chunk-c5fa8cb1.js +0 -2
  369. package/bundle/chunk-ca4r31we.js +0 -2
  370. package/bundle/chunk-ckbwdrm3.js +0 -2
  371. package/bundle/chunk-cqj21rfj.js +0 -3
  372. package/bundle/chunk-cz3h5n1v.js +0 -3
  373. package/bundle/chunk-dhc6e1t7.js +0 -2
  374. package/bundle/chunk-dk6rbqvp.js +0 -2
  375. package/bundle/chunk-dk975etf.js +0 -3
  376. package/bundle/chunk-dwajajaq.js +0 -2
  377. package/bundle/chunk-dxcrggvq.js +0 -2
  378. package/bundle/chunk-dyt3n3fe.js +0 -2
  379. package/bundle/chunk-e7ah0e61.js +0 -2
  380. package/bundle/chunk-e7v9trve.js +0 -11
  381. package/bundle/chunk-e8ws454m.js +0 -2
  382. package/bundle/chunk-efndtzby.js +0 -2
  383. package/bundle/chunk-eq2pepce.js +0 -2
  384. package/bundle/chunk-eva3nqqb.js +0 -14
  385. package/bundle/chunk-f3bnn9rf.js +0 -8
  386. package/bundle/chunk-f693s9vn.js +0 -2
  387. package/bundle/chunk-ftepqwyq.js +0 -2
  388. package/bundle/chunk-g18ax6yp.js +0 -2
  389. package/bundle/chunk-gadyp6mb.js +0 -2
  390. package/bundle/chunk-ge8315te.js +0 -5
  391. package/bundle/chunk-gk28ffhg.js +0 -2
  392. package/bundle/chunk-gpfc4z4v.js +0 -2
  393. package/bundle/chunk-gqvg02zp.js +0 -2
  394. package/bundle/chunk-gsyt2sv7.js +0 -2
  395. package/bundle/chunk-h3k1dk9m.js +0 -2
  396. package/bundle/chunk-h8c3dcqt.js +0 -2
  397. package/bundle/chunk-hfq11w4h.js +0 -2
  398. package/bundle/chunk-hw5qyht3.js +0 -3
  399. package/bundle/chunk-hwf58w1k.js +0 -2
  400. package/bundle/chunk-jyczz3yh.js +0 -8
  401. package/bundle/chunk-k8k8z6b7.js +0 -3
  402. package/bundle/chunk-kk3ve911.js +0 -2
  403. package/bundle/chunk-kv72hxkp.js +0 -3
  404. package/bundle/chunk-m4j7jyrd.js +0 -3
  405. package/bundle/chunk-mf3sm0pk.js +0 -2
  406. package/bundle/chunk-mkng9ykt.js +0 -2
  407. package/bundle/chunk-mxvypy3s.js +0 -2
  408. package/bundle/chunk-n5ypgxrn.js +0 -28
  409. package/bundle/chunk-n9xw9kqc.js +0 -2
  410. package/bundle/chunk-nc4wbc89.js +0 -2
  411. package/bundle/chunk-ngk67rt3.js +0 -3
  412. package/bundle/chunk-nj2bbtmx.js +0 -2
  413. package/bundle/chunk-nr1g57b2.js +0 -2
  414. package/bundle/chunk-p0ahbpxv.js +0 -2
  415. package/bundle/chunk-p7y8z5rd.js +0 -2
  416. package/bundle/chunk-pt26gerr.js +0 -2
  417. package/bundle/chunk-qkk1as5n.js +0 -2
  418. package/bundle/chunk-qsm9xw87.js +0 -2
  419. package/bundle/chunk-qw980y8h.js +0 -2
  420. package/bundle/chunk-r2w3gr8d.js +0 -2
  421. package/bundle/chunk-r5bqcpkz.js +0 -2
  422. package/bundle/chunk-r67c858b.js +0 -2
  423. package/bundle/chunk-r9fvfkee.js +0 -2
  424. package/bundle/chunk-rcn0dhbj.js +0 -2
  425. package/bundle/chunk-rq47pn3r.js +0 -2
  426. package/bundle/chunk-rvt1tdy8.js +0 -2
  427. package/bundle/chunk-ry7q8xn6.js +0 -2
  428. package/bundle/chunk-s27xvrft.js +0 -2
  429. package/bundle/chunk-s5nde2kd.js +0 -5
  430. package/bundle/chunk-scy39p6q.js +0 -2
  431. package/bundle/chunk-srpe3v8e.js +0 -9
  432. package/bundle/chunk-st5jaszz.js +0 -3
  433. package/bundle/chunk-t5qamf96.js +0 -2
  434. package/bundle/chunk-t9mz17gb.js +0 -3
  435. package/bundle/chunk-tns5x4w0.js +0 -3
  436. package/bundle/chunk-ttevj0pj.js +0 -2
  437. package/bundle/chunk-v7c54cyj.js +0 -2
  438. package/bundle/chunk-vgefaens.js +0 -2
  439. package/bundle/chunk-vv59b4re.js +0 -2
  440. package/bundle/chunk-vwqy7n3g.js +0 -2
  441. package/bundle/chunk-vysa9hp4.js +0 -7
  442. package/bundle/chunk-wn076jwj.js +0 -2
  443. package/bundle/chunk-x0m1qye9.js +0 -2
  444. package/bundle/chunk-xvntsbb1.js +0 -3
  445. package/bundle/chunk-y70aachh.js +0 -2
  446. package/bundle/chunk-yqk58hf6.js +0 -3
  447. package/bundle/chunk-ysgxt83y.js +0 -2
  448. package/bundle/chunk-ze9e6nt3.js +0 -3
  449. package/bundle/chunk-znzan00b.js +0 -3
  450. package/bundle/chunk-zrp55k47.js +0 -2
  451. package/bundle/chunk-zwdnh860.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{N as R9}from"./chunk-6ged58yw.js";import{Ed as E9}from"./chunk-aa8hymcv.js";import{Fd as P6,Id as p$,Jd as S9,Kd as U9,Nd as H9,Od as q6}from"./chunk-x66ycpfs.js";import"./chunk-03xppy47.js";import{Rd as T0}from"./chunk-yajd975f.js";import{Vf as O}from"./chunk-p9cnzxb8.js";import{Vg as j9,ch as I9,gh as E$}from"./chunk-5e4fxy99.js";import"./chunk-8vg4fmg2.js";import"./chunk-zfcp509b.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-md8161zd.js";import"./chunk-yk97q51d.js";import{Cl as b9,Wj as T9,lk as O6,mk as M0,rl as w9,tl as D9}from"./chunk-e74efvj2.js";import{Pl as N9}from"./chunk-st5jaszz.js";import{cm as A0,lm as T$}from"./chunk-a1hzeejj.js";import"./chunk-sjw56r2n.js";import"./chunk-nj4d554m.js";import"./chunk-eva3nqqb.js";import"./chunk-yprmd5b7.js";import"./chunk-snr44en9.js";import"./chunk-keveg5gx.js";import"./chunk-f3bnn9rf.js";import"./chunk-xqdrr7xg.js";import"./chunk-axdzm75h.js";import"./chunk-94pcpztx.js";import"./chunk-hw5qyht3.js";import"./chunk-z8gdmvgg.js";import"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import"./chunk-g6cyhxwg.js";import"./chunk-n96tvjgj.js";import"./chunk-pkc4ddw1.js";import"./chunk-xgr6jnd6.js";import"./chunk-a48t0g95.js";import"./chunk-yqk58hf6.js";import"./chunk-er38zew1.js";import"./chunk-dk975etf.js";import"./chunk-6p94fpbn.js";import"./chunk-fg35hwa0.js";import"./chunk-79agp7v3.js";import"./chunk-kv72hxkp.js";import"./chunk-nj2bbtmx.js";import{At as L9,Ft as F9,wt as V9,zt as R6}from"./chunk-tns5x4w0.js";import{Gu as C6,Ru as A9}from"./chunk-e7v9trve.js";import"./chunk-zh3fny3z.js";import"./chunk-m4j7jyrd.js";import"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-wfd5h6ax.js";import{OI as M9}from"./chunk-a0rp7gh4.js";import"./chunk-kfmz2p27.js";import"./chunk-ee23d2nz.js";import{$P as D,_P as q0,cQ as E}from"./chunk-3k2b05fv.js";var JZ=D((zZ)=>{/*!
2
+ import{L as R9}from"./chunk-6r8pg6ma.js";import{Cd as E9}from"./chunk-w8d9srv7.js";import{Dd as P6,Gd as p$,Hd as S9,Id as U9,Ld as H9,Md as q6}from"./chunk-7jhrxzjx.js";import"./chunk-jcjaw7tk.js";import{Pd as T0}from"./chunk-9xvctnjr.js";import{Sf as O}from"./chunk-9s4whpg1.js";import{Kg as j9,Tg as I9,Xg as E$}from"./chunk-sv1s1qxd.js";import"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{Lj as T9,ak as O6,bk as M0,gl as w9,il as D9,rl as b9}from"./chunk-rtdym35y.js";import{El as N9}from"./chunk-5myxjxae.js";import{Tl as A0,am as T$}from"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import{zt as C6}from"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import{Vt as F9,Yt as R6,Zt as M9,cu as A9}from"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import{Vu as L9}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import{UI as V9}from"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import{gQ as q0,hQ as D,kQ as E}from"./chunk-4sazy0nq.js";var JZ=D((zZ)=>{/*!
3
3
  * content-type
4
4
  * Copyright(c) 2015 Douglas Christopher Wilson
5
5
  * MIT Licensed
@@ -23,9 +23,9 @@ Files in prompt:
23
23
  ${$.map((Y)=>` - ${Y.filename} (${(Y.content.length*0.75/1024).toFixed(0)} KB)`).join(`
24
24
  `)}`:""}`}var jX=T0({command:"github",describe:"manage GitHub agent",builder:($)=>$.command(sK).command(oK).demandCommand(),async handler(){}}),sK=T0({command:"install",describe:"install the GitHub agent",async handler(){await T$.provide({directory:process.cwd(),async fn(){{let K=function(){let W;if(Y==="amazon-bedrock")W="Configure OIDC in AWS - https://docs.github.com/en/actions/how-tos/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services";else W=[` 2. Add the following secrets in org or repo (${$.owner}/${$.repo}) settings`,"",...Z[Y].env.map((V)=>` - ${V}`)].join(`
25
25
  `);U9(["Next steps:","",` 1. Commit the \`${H6}\` file and push`,W,""," 3. Go to a GitHub issue and comment `/oc summarize` to see the agent in action",""," Learn more about the GitHub agent - https://opencode.ai/docs/github/#usage-examples"].join(`
26
- `))};O.empty(),S9("Install GitHub agent");let $=await z();await G();let Z=await N9.get().then((W)=>{return delete W["github-copilot"],W}),Y=await J(),Q=await X();await L(),K();async function z(){if(T$.project.vcs!=="git")throw p$.error("Could not find git repository. Please run this command from a git repository."),new O.CancelledError;let V=await E$.runPromise(A0.Service.use((P)=>P.run(["remote","get-url","origin"],{cwd:T$.worktree}))).then((P)=>P.text().trim()),A=rK(V);if(!A)throw p$.error("Could not find git repository. Please run this command from a git repository."),new O.CancelledError;return{owner:A.owner,repo:A.repo,root:T$.worktree}}async function J(){let W={opencode:0,anthropic:1,openai:2,google:3},V=await q6({message:"Select provider",maxItems:8,options:R9(R6(Z),W,(A)=>W[A.id]===0?"recommended":void 0)});if(P6(V))throw new O.CancelledError;return V}async function X(){let W=Z[Y],V=await q6({message:"Select model",maxItems:8,options:V9(W.models,R6(),L9((A)=>A.name??A.id),F9((A)=>({label:A.name??A.id,value:A.id})))});if(P6(V))throw new O.CancelledError;return V}async function G(){let W=H9();if(W.start("Installing GitHub app"),await y())return W.stop("GitHub app already installed");let A="https://github.com/apps/opencode-agent",P=process.platform==="darwin"?`open "${A}"`:process.platform==="win32"?`start "" "${A}"`:`xdg-open "${A}"`;nK(P,(m)=>{if(m)p$.warn(`Could not open browser. Please visit: ${A}`)}),W.message("Waiting for GitHub app to be installed");let r=120,U=0;do{if(await y())break;if(U>r)throw W.stop(`Failed to detect GitHub app installation. Make sure to install the app for the \`${$.owner}/${$.repo}\` repository.`),new O.CancelledError;U++,await P9(1000)}while(!0);W.stop("Installed GitHub app");async function y(){return await fetch(`https://api.opencode.ai/get_github_app_installation?owner=${$.owner}&repo=${$.repo}`).then((m)=>m.json()).then((m)=>m.installation)}}async function L(){let W=Y==="amazon-bedrock"?"":`
26
+ `))};O.empty(),S9("Install GitHub agent");let $=await z();await G();let Z=await N9.get().then((W)=>{return delete W["github-copilot"],W}),Y=await J(),Q=await X();await L(),K();async function z(){if(T$.project.vcs!=="git")throw p$.error("Could not find git repository. Please run this command from a git repository."),new O.CancelledError;let V=await E$.runPromise(A0.Service.use((P)=>P.run(["remote","get-url","origin"],{cwd:T$.worktree}))).then((P)=>P.text().trim()),A=rK(V);if(!A)throw p$.error("Could not find git repository. Please run this command from a git repository."),new O.CancelledError;return{owner:A.owner,repo:A.repo,root:T$.worktree}}async function J(){let W={opencode:0,anthropic:1,openai:2,google:3},V=await q6({message:"Select provider",maxItems:8,options:R9(R6(Z),W,(A)=>W[A.id]===0?"recommended":void 0)});if(P6(V))throw new O.CancelledError;return V}async function X(){let W=Z[Y],V=await q6({message:"Select model",maxItems:8,options:F9(W.models,R6(),M9((A)=>A.name??A.id),A9((A)=>({label:A.name??A.id,value:A.id})))});if(P6(V))throw new O.CancelledError;return V}async function G(){let W=H9();if(W.start("Installing GitHub app"),await y())return W.stop("GitHub app already installed");let A="https://github.com/apps/opencode-agent",P=process.platform==="darwin"?`open "${A}"`:process.platform==="win32"?`start "" "${A}"`:`xdg-open "${A}"`;nK(P,(m)=>{if(m)p$.warn(`Could not open browser. Please visit: ${A}`)}),W.message("Waiting for GitHub app to be installed");let r=120,U=0;do{if(await y())break;if(U>r)throw W.stop(`Failed to detect GitHub app installation. Make sure to install the app for the \`${$.owner}/${$.repo}\` repository.`),new O.CancelledError;U++,await P9(1000)}while(!0);W.stop("Installed GitHub app");async function y(){return await fetch(`https://api.opencode.ai/get_github_app_installation?owner=${$.owner}&repo=${$.repo}`).then((m)=>m.json()).then((m)=>m.installation)}}async function L(){let W=Y==="amazon-bedrock"?"":`
27
27
  env:${Z[Y].env.map((V)=>`
28
- ${V}: \${{ secrets.${V} }}`).join("")}`;await A9.write(C9.join($.root,H6),`name: opencode
28
+ ${V}: \${{ secrets.${V} }}`).join("")}`;await L9.write(C9.join($.root,H6),`name: opencode
29
29
 
30
30
  on:
31
31
  issue_comment:
@@ -77,7 +77,7 @@ Context: You are reviewing a comment on file "${F.file}" at line ${F.line}.
77
77
  Diff context:
78
78
  ${F.diffHunk}`;return f}throw Error(`Comments must mention ${j.map((v)=>"`"+v+"`").join(" or ")}`)})(),I=[],H=M.matchAll(/!?\[.*?\]\((https:\/\/github\.com\/user-attachments\/[^)]+)\)/gi),C=M.matchAll(/<img .*?src="(https:\/\/github\.com\/user-attachments\/[^"]+)" \/>/gi),w=[...H,...C].sort((f,g)=>f.index-g.index);console.log("Images",JSON.stringify(w,null,2));let Z$=0;for(let f of w){let g=f[0],v=f[1],l=f.index,g6=C9.basename(v),b0=await fetch(v,{headers:{Authorization:`Bearer ${L$}`,Accept:"application/vnd.github.v3+json"}});if(!b0.ok){console.error(`Failed to download image: ${v}`);continue}let t$=`@${g6}`;M=M.slice(0,l+Z$)+t$+M.slice(l+Z$+g.length),Z$+=t$.length-g.length;let k6=b0.headers.get("content-type");I.push({filename:g6,mime:k6?.startsWith("image/")?k6:"text/plain",content:Buffer.from(await b0.arrayBuffer()).toString("base64"),start:l,end:l+t$.length,replacement:t$})}return{userPrompt:M,promptFiles:I}}function u9(){let B={task:["Task",O.Style.TEXT_WARNING_BOLD],bash:["Bash",O.Style.TEXT_DANGER_BOLD],edit:["Edit",O.Style.TEXT_SUCCESS_BOLD],glob:["Glob",O.Style.TEXT_INFO_BOLD],grep:["Grep",O.Style.TEXT_INFO_BOLD],list:["List",O.Style.TEXT_INFO_BOLD],read:["Read",O.Style.TEXT_HIGHLIGHT_BOLD],write:["Write",O.Style.TEXT_SUCCESS_BOLD],websearch:["Search",O.Style.TEXT_DIM_BOLD]};function F(M,I,H){O.println(M+"|",O.Style.TEXT_NORMAL+O.Style.TEXT_DIM+` ${I.padEnd(7," ")}`,"",O.Style.TEXT_NORMAL+H)}let j="";T9.subscribe(D9.Event.PartUpdated,(M)=>{if(M.properties.part.sessionID!==Q$.id)return;let I=M.properties.part;if(I.type==="tool"&&I.state.status==="completed"){let[H,C]=B[I.tool]??[I.tool,O.Style.TEXT_INFO_BOLD],w=I.state.title||Object.keys(I.state.input).length>0?JSON.stringify(I.state.input):"Unknown";console.log(),F(C,H,w)}if(I.type==="text"){if(j=I.text,I.time?.end){O.empty(),O.println(O.markdown(j)),O.empty(),j="";return}}})}async function s$(B){try{return await g$(`Summarize the following in less than 40 characters:
79
79
 
80
- ${B}`)}catch{return`Fix issue: ${j0?j0.issue.title:m.pull_request.title}`}}async function g$(B,F=[]){return console.log("Sending message to qitqode..."),E$.runPromise(M9.gen(function*(){let j=yield*I9.Service,M=yield*j.prompt({sessionID:Q$.id,messageID:O6.ascending(),variant:V,model:{providerID:L,modelID:W},parts:[{id:M0.ascending(),type:"text",text:B},...F.flatMap((w)=>[{id:M0.ascending(),type:"file",mime:w.mime,url:`data:${w.mime};base64,${w.content}`,filename:w.filename,source:{type:"file",text:{value:w.replacement,start:w.start,end:w.end},path:w.filename}}])]});if(M.info.role==="assistant"&&M.info.error){let w=M.info.error;if(console.error("Agent error:",w),w.name==="ContextOverflowError")throw Error(B9(F));throw Error(`${w.name}: ${w.data?.message||""}`)}let I=G9(M.parts);if(I)return I;console.log("Requesting summary from agent...");let H=yield*j.prompt({sessionID:Q$.id,messageID:O6.ascending(),variant:V,model:{providerID:L,modelID:W},tools:{"*":!1},parts:[{id:M0.ascending(),type:"text",text:"Summarize the actions (tool calls & reasoning) you did for the user in 1-2 sentences."}]});if(H.info.role==="assistant"&&H.info.error){let w=H.info.error;if(console.error("Summary agent error:",w),w.name==="ContextOverflowError")throw Error(B9(F));throw Error(`${w.name}: ${w.data?.message||""}`)}let C=G9(H.parts);if(!C)throw Error("Failed to get summary from agent");return C}))}async function l9(){try{return await n$.getIDToken("opencode-github-action")}catch(B){throw console.error("Failed to get OIDC token:",B instanceof Error?B.message:B),Error("Could not fetch an OIDC token. Make sure to add `id-token: write` to your workflow permissions.",{cause:B})}}async function d9(B){let F=B.startsWith("github_pat_")?await fetch(`${r}/exchange_github_app_token_with_pat`,{method:"POST",headers:{Authorization:`Bearer ${B}`},body:JSON.stringify({owner:U,repo:y})}):await fetch(`${r}/exchange_github_app_token`,{method:"POST",headers:{Authorization:`Bearer ${B}`}});if(!F.ok){let M=await F.json();throw Error(`App token exchange failed: ${F.status} ${F.statusText} - ${M.error}`)}return(await F.json()).token}async function i9(B){if(Z)return;console.log("Configuring git...");let F="http.https://github.com/.extraheader",j=await h$(["config","--local","--get",F]);if(j.exitCode===0)N0=j.stdout.toString().trim(),await h(["config","--local","--unset-all",F]);let M=Buffer.from(`x-access-token:${B}`,"utf8").toString("base64");await h(["config","--local",F,`AUTHORIZATION: basic ${M}`]),await h(["config","--global","user.name",i$]),await h(["config","--global","user.email",`${i$}@users.noreply.github.com`])}async function p9(){if(N0===void 0)return;await h(["config","--local","http.https://github.com/.extraheader",N0])}async function f6(B){console.log("Checking out new branch...");let F=_6(B);return await h(["checkout","-b",F]),F}async function n9(B){console.log("Checking out local branch...");let F=B.headRefName,j=Math.max(B.commits.totalCount,20);await h(["fetch","origin",`--depth=${j}`,F]),await h(["checkout",F])}async function a9(B){console.log("Checking out fork branch...");let F=B.headRefName,j=_6("pr"),M=Math.max(B.commits.totalCount,20);return await h(["remote","add","fork",`https://github.com/${B.headRepository.nameWithOwner}.git`]),await h(["fetch","fork",`--depth=${M}`,F]),await h(["checkout","-b",j,`fork/${F}`]),j}function _6(B){let F=new Date().toISOString().replace(/[:-]/g,"").replace(/\.\d{3}Z/,"").split("T").join("");if(B==="schedule"||B==="dispatch"){let j=crypto.randomUUID().slice(0,6);return`opencode/${B}-${j}-${F}`}return`opencode/${B}${Y$}-${F}`}async function v6(B,F,j,M){if(console.log("Pushing to new branch..."),j)if(await h(["add","."]),M)await r$(B);else await r$(B,W$);await h(["push","-u","origin",F])}async function r9(B,F){if(console.log("Pushing to local branch..."),F)await h(["add","."]),await r$(B,W$);await h(["push"])}async function s9(B,F,j){console.log("Pushing to fork branch...");let M=F.headRefName;if(j)await h(["add","."]),await r$(B,W$);await h(["push","fork",`HEAD:${M}`])}async function o$(B,F){console.log("Checking if branch is dirty...");let j=await S$(["rev-parse","--abbrev-ref","HEAD"]);if(j!==F)return console.log(`Branch changed during chat: expected ${F}, now on ${j}`),{dirty:!0,uncommittedChanges:!1,switched:!0};if((await h$(["status","--porcelain"])).stdout.toString().trim().length>0)return{dirty:!0,uncommittedChanges:!0,switched:!1};return{dirty:await S$(["rev-parse","HEAD"])!==B,uncommittedChanges:!1,switched:!1}}async function o9(B,F){let j=await h$(["rev-list","--count",`${B}..${F}`]);if(j.exitCode!==0){console.log(`rev-list failed, fetching origin/${B}...`),await h$(["fetch","origin",B,"--depth=1"]);let M=await h$(["rev-list","--count",`origin/${B}..${F}`]);if(M.exitCode!==0)return!0;return parseInt(M.stdout.toString().trim())>0}return parseInt(j.stdout.toString().trim())>0}async function t9(){console.log(`Asserting permissions for user ${W$}...`);let B;try{B=(await u.repos.getCollaboratorPermissionLevel({owner:U,repo:y,username:W$})).data.permission,console.log(` permission: ${B}`)}catch(F){throw console.error(`Failed to check permissions: ${F}`),Error(`Failed to check permissions for user ${W$}: ${F}`,{cause:F})}if(!["admin","write"].includes(B))throw Error(`User ${W$} does not have write permissions`)}async function e9(B){if(console.log("Adding reaction..."),K$){if(B==="pr_review")return await u.rest.reactions.createForPullRequestReviewComment({owner:U,repo:y,comment_id:K$,content:x$});return await u.rest.reactions.createForIssueComment({owner:U,repo:y,comment_id:K$,content:x$})}return await u.rest.reactions.createForIssue({owner:U,repo:y,issue_number:Y$,content:x$})}async function U$(B){if(console.log("Removing reaction..."),K$){if(B==="pr_review"){let C=(await u.rest.reactions.listForPullRequestReviewComment({owner:U,repo:y,comment_id:K$,content:x$})).data.find((w)=>w.user?.login===i$);if(!C)return;return await u.rest.reactions.deleteForPullRequestComment({owner:U,repo:y,comment_id:K$,reaction_id:C.id})}let I=(await u.rest.reactions.listForIssueComment({owner:U,repo:y,comment_id:K$,content:x$})).data.find((H)=>H.user?.login===i$);if(!I)return;return await u.rest.reactions.deleteForIssueComment({owner:U,repo:y,comment_id:K$,reaction_id:I.id})}let j=(await u.rest.reactions.listForIssue({owner:U,repo:y,issue_number:Y$,content:x$})).data.find((M)=>M.user?.login===i$);if(!j)return;await u.rest.reactions.deleteForIssue({owner:U,repo:y,issue_number:Y$,reaction_id:j.id})}async function I$(B){return console.log("Creating comment..."),await u.rest.issues.createComment({owner:U,repo:y,issue_number:Y$,body:B})}async function x6(B,F,j,M){console.log("Creating pull request...");try{let I=await D0(()=>u.rest.pulls.list({owner:U,repo:y,head:`${U}:${F}`,base:B,state:"open"}));if(I.data.length>0)return console.log(`PR #${I.data[0].number} already exists for branch ${F}`),I.data[0].number}catch(I){console.log(`Failed to check for existing PR: ${I}`)}if(!await o9(B,F))return console.log(`No commits between ${B} and ${F}, skipping PR creation`),null;try{return(await D0(()=>u.rest.pulls.create({owner:U,repo:y,head:F,base:B,title:j,body:M}))).data.number}catch(I){if(I instanceof Error&&I.message.includes("No commits between"))return console.log(`GitHub rejected PR: ${I.message}`),null;throw I}}async function D0(B,F=1,j=5000){try{return await B()}catch(M){if(F>0)return console.log(`Retrying after ${j}ms...`),await P9(j),D0(B,F-1,j);throw M}}function G$(B){let F=(()=>{if(!F$)return"";if(!B?.image)return"";let M=encodeURIComponent(Q$.title.substring(0,50)),I=Buffer.from(Q$.title.substring(0,700),"utf8").toString("base64");return`<a href="${a$}/s/${F$}"><img width="200" alt="${M}" src="https://social-cards.sst.dev/opencode-share/${I}.png?model=${L}/${W}&version=${Q$.version}&id=${F$}" /></a>
80
+ ${B}`)}catch{return`Fix issue: ${j0?j0.issue.title:m.pull_request.title}`}}async function g$(B,F=[]){return console.log("Sending message to qitqode..."),E$.runPromise(V9.gen(function*(){let j=yield*I9.Service,M=yield*j.prompt({sessionID:Q$.id,messageID:O6.ascending(),variant:V,model:{providerID:L,modelID:W},parts:[{id:M0.ascending(),type:"text",text:B},...F.flatMap((w)=>[{id:M0.ascending(),type:"file",mime:w.mime,url:`data:${w.mime};base64,${w.content}`,filename:w.filename,source:{type:"file",text:{value:w.replacement,start:w.start,end:w.end},path:w.filename}}])]});if(M.info.role==="assistant"&&M.info.error){let w=M.info.error;if(console.error("Agent error:",w),w.name==="ContextOverflowError")throw Error(B9(F));throw Error(`${w.name}: ${w.data?.message||""}`)}let I=G9(M.parts);if(I)return I;console.log("Requesting summary from agent...");let H=yield*j.prompt({sessionID:Q$.id,messageID:O6.ascending(),variant:V,model:{providerID:L,modelID:W},tools:{"*":!1},parts:[{id:M0.ascending(),type:"text",text:"Summarize the actions (tool calls & reasoning) you did for the user in 1-2 sentences."}]});if(H.info.role==="assistant"&&H.info.error){let w=H.info.error;if(console.error("Summary agent error:",w),w.name==="ContextOverflowError")throw Error(B9(F));throw Error(`${w.name}: ${w.data?.message||""}`)}let C=G9(H.parts);if(!C)throw Error("Failed to get summary from agent");return C}))}async function l9(){try{return await n$.getIDToken("opencode-github-action")}catch(B){throw console.error("Failed to get OIDC token:",B instanceof Error?B.message:B),Error("Could not fetch an OIDC token. Make sure to add `id-token: write` to your workflow permissions.",{cause:B})}}async function d9(B){let F=B.startsWith("github_pat_")?await fetch(`${r}/exchange_github_app_token_with_pat`,{method:"POST",headers:{Authorization:`Bearer ${B}`},body:JSON.stringify({owner:U,repo:y})}):await fetch(`${r}/exchange_github_app_token`,{method:"POST",headers:{Authorization:`Bearer ${B}`}});if(!F.ok){let M=await F.json();throw Error(`App token exchange failed: ${F.status} ${F.statusText} - ${M.error}`)}return(await F.json()).token}async function i9(B){if(Z)return;console.log("Configuring git...");let F="http.https://github.com/.extraheader",j=await h$(["config","--local","--get",F]);if(j.exitCode===0)N0=j.stdout.toString().trim(),await h(["config","--local","--unset-all",F]);let M=Buffer.from(`x-access-token:${B}`,"utf8").toString("base64");await h(["config","--local",F,`AUTHORIZATION: basic ${M}`]),await h(["config","--global","user.name",i$]),await h(["config","--global","user.email",`${i$}@users.noreply.github.com`])}async function p9(){if(N0===void 0)return;await h(["config","--local","http.https://github.com/.extraheader",N0])}async function f6(B){console.log("Checking out new branch...");let F=_6(B);return await h(["checkout","-b",F]),F}async function n9(B){console.log("Checking out local branch...");let F=B.headRefName,j=Math.max(B.commits.totalCount,20);await h(["fetch","origin",`--depth=${j}`,F]),await h(["checkout",F])}async function a9(B){console.log("Checking out fork branch...");let F=B.headRefName,j=_6("pr"),M=Math.max(B.commits.totalCount,20);return await h(["remote","add","fork",`https://github.com/${B.headRepository.nameWithOwner}.git`]),await h(["fetch","fork",`--depth=${M}`,F]),await h(["checkout","-b",j,`fork/${F}`]),j}function _6(B){let F=new Date().toISOString().replace(/[:-]/g,"").replace(/\.\d{3}Z/,"").split("T").join("");if(B==="schedule"||B==="dispatch"){let j=crypto.randomUUID().slice(0,6);return`opencode/${B}-${j}-${F}`}return`opencode/${B}${Y$}-${F}`}async function v6(B,F,j,M){if(console.log("Pushing to new branch..."),j)if(await h(["add","."]),M)await r$(B);else await r$(B,W$);await h(["push","-u","origin",F])}async function r9(B,F){if(console.log("Pushing to local branch..."),F)await h(["add","."]),await r$(B,W$);await h(["push"])}async function s9(B,F,j){console.log("Pushing to fork branch...");let M=F.headRefName;if(j)await h(["add","."]),await r$(B,W$);await h(["push","fork",`HEAD:${M}`])}async function o$(B,F){console.log("Checking if branch is dirty...");let j=await S$(["rev-parse","--abbrev-ref","HEAD"]);if(j!==F)return console.log(`Branch changed during chat: expected ${F}, now on ${j}`),{dirty:!0,uncommittedChanges:!1,switched:!0};if((await h$(["status","--porcelain"])).stdout.toString().trim().length>0)return{dirty:!0,uncommittedChanges:!0,switched:!1};return{dirty:await S$(["rev-parse","HEAD"])!==B,uncommittedChanges:!1,switched:!1}}async function o9(B,F){let j=await h$(["rev-list","--count",`${B}..${F}`]);if(j.exitCode!==0){console.log(`rev-list failed, fetching origin/${B}...`),await h$(["fetch","origin",B,"--depth=1"]);let M=await h$(["rev-list","--count",`origin/${B}..${F}`]);if(M.exitCode!==0)return!0;return parseInt(M.stdout.toString().trim())>0}return parseInt(j.stdout.toString().trim())>0}async function t9(){console.log(`Asserting permissions for user ${W$}...`);let B;try{B=(await u.repos.getCollaboratorPermissionLevel({owner:U,repo:y,username:W$})).data.permission,console.log(` permission: ${B}`)}catch(F){throw console.error(`Failed to check permissions: ${F}`),Error(`Failed to check permissions for user ${W$}: ${F}`,{cause:F})}if(!["admin","write"].includes(B))throw Error(`User ${W$} does not have write permissions`)}async function e9(B){if(console.log("Adding reaction..."),K$){if(B==="pr_review")return await u.rest.reactions.createForPullRequestReviewComment({owner:U,repo:y,comment_id:K$,content:x$});return await u.rest.reactions.createForIssueComment({owner:U,repo:y,comment_id:K$,content:x$})}return await u.rest.reactions.createForIssue({owner:U,repo:y,issue_number:Y$,content:x$})}async function U$(B){if(console.log("Removing reaction..."),K$){if(B==="pr_review"){let C=(await u.rest.reactions.listForPullRequestReviewComment({owner:U,repo:y,comment_id:K$,content:x$})).data.find((w)=>w.user?.login===i$);if(!C)return;return await u.rest.reactions.deleteForPullRequestComment({owner:U,repo:y,comment_id:K$,reaction_id:C.id})}let I=(await u.rest.reactions.listForIssueComment({owner:U,repo:y,comment_id:K$,content:x$})).data.find((H)=>H.user?.login===i$);if(!I)return;return await u.rest.reactions.deleteForIssueComment({owner:U,repo:y,comment_id:K$,reaction_id:I.id})}let j=(await u.rest.reactions.listForIssue({owner:U,repo:y,issue_number:Y$,content:x$})).data.find((M)=>M.user?.login===i$);if(!j)return;await u.rest.reactions.deleteForIssue({owner:U,repo:y,issue_number:Y$,reaction_id:j.id})}async function I$(B){return console.log("Creating comment..."),await u.rest.issues.createComment({owner:U,repo:y,issue_number:Y$,body:B})}async function x6(B,F,j,M){console.log("Creating pull request...");try{let I=await D0(()=>u.rest.pulls.list({owner:U,repo:y,head:`${U}:${F}`,base:B,state:"open"}));if(I.data.length>0)return console.log(`PR #${I.data[0].number} already exists for branch ${F}`),I.data[0].number}catch(I){console.log(`Failed to check for existing PR: ${I}`)}if(!await o9(B,F))return console.log(`No commits between ${B} and ${F}, skipping PR creation`),null;try{return(await D0(()=>u.rest.pulls.create({owner:U,repo:y,head:F,base:B,title:j,body:M}))).data.number}catch(I){if(I instanceof Error&&I.message.includes("No commits between"))return console.log(`GitHub rejected PR: ${I.message}`),null;throw I}}async function D0(B,F=1,j=5000){try{return await B()}catch(M){if(F>0)return console.log(`Retrying after ${j}ms...`),await P9(j),D0(B,F-1,j);throw M}}function G$(B){let F=(()=>{if(!F$)return"";if(!B?.image)return"";let M=encodeURIComponent(Q$.title.substring(0,50)),I=Buffer.from(Q$.title.substring(0,700),"utf8").toString("base64");return`<a href="${a$}/s/${F$}"><img width="200" alt="${M}" src="https://social-cards.sst.dev/opencode-share/${I}.png?model=${L}/${W}&version=${Q$.version}&id=${F$}" /></a>
81
81
  `})(),j=F$?`[opencode session](${a$}/s/${F$})&nbsp;&nbsp;|&nbsp;&nbsp;`:"";return`
82
82
 
83
83
  ${F}${j}[github run](${f9})`}async function $8(){return await u.rest.repos.get({owner:U,repo:y})}async function Z8(){console.log("Fetching prompt data for issue...");let F=(await I0(`
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{id as a,jd as b,kd as c,ld as d,md as e,nd as f,od as g,pd as h,qd as i,rd as j,sd as k,td as l}from"./chunk-jkh6eg7d.js";import"./chunk-3k2b05fv.js";export{i as setRendererCapabilities,a as pasteBytes,f as createTestRenderer,h as createTerminalCapabilities,j as createSpy,e as createMockMouse,c as createMockKeys,l as TestRecorder,d as MouseButtons,g as MockTreeSitterClient,k as ManualClock,b as KeyCodes};
2
+ import{gd as a,hd as b,id as c,jd as d,kd as e,ld as f,md as g,nd as h,od as i,pd as j,qd as k,rd as l}from"./chunk-jf6ry79j.js";import"./chunk-4sazy0nq.js";export{i as setRendererCapabilities,a as pasteBytes,f as createTestRenderer,h as createTerminalCapabilities,j as createSpy,e as createMockMouse,c as createMockKeys,l as TestRecorder,d as MouseButtons,g as MockTreeSitterClient,k as ManualClock,b as KeyCodes};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-3k2b05fv.js";var e={"ui.sessionReview.title":"Sessions\xE6ndringer","ui.sessionReview.title.lastTurn":"\xC6ndringer fra sidste tur","ui.sessionReview.diffStyle.unified":"Samlet","ui.sessionReview.diffStyle.split":"Opdelt","ui.sessionReview.openFile":"\xC5bn fil","ui.sessionReview.selection.line":"linje {{line}}","ui.sessionReview.selection.lines":"linjer {{start}}-{{end}}","ui.sessionReview.expandAll":"Udvid alle","ui.sessionReview.collapseAll":"Skjul alle","ui.sessionReview.change.added":"Tilf\xF8jet","ui.sessionReview.change.removed":"Fjernet","ui.sessionReview.change.modified":"\xC6ndret","ui.sessionReview.image.loading":"Indl\xE6ser...","ui.sessionReview.image.placeholder":"Billede","ui.sessionReview.largeDiff.title":"Diff er for stor til at blive vist","ui.sessionReview.largeDiff.meta":"Gr\xE6nse: {{limit}} \xE6ndrede linjer. Nuv\xE6rende: {{current}} \xE6ndrede linjer.","ui.sessionReview.largeDiff.renderAnyway":"Vis alligevel","ui.fileMedia.kind.image":"billede","ui.fileMedia.kind.audio":"lyd","ui.fileMedia.state.removed":"Fjernet: {{kind}}","ui.fileMedia.state.loading":"Indl\xE6ser {{kind}}...","ui.fileMedia.state.error":"Fejl ved indl\xE6sning: {{kind}}","ui.fileMedia.state.unavailable":"Utilg\xE6ngelig: {{kind}}","ui.fileMedia.binary.title":"Bin\xE6r fil","ui.fileMedia.binary.description.path":"{{path}} kan ikke vises, fordi det er en bin\xE6r fil.","ui.fileMedia.binary.description.default":"Denne fil kan ikke vises, fordi det er en bin\xE6r fil.","ui.lineComment.label.prefix":"Kommenter p\xE5 ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Kommenterer p\xE5 ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Tilf\xF8j kommentar","ui.lineComment.submit":"Kommenter","ui.sessionTurn.steps.show":"Vis trin","ui.sessionTurn.steps.hide":"Skjul trin","ui.sessionTurn.summary.response":"Svar","ui.sessionTurn.diff.showMore":"Vis flere \xE6ndringer ({{count}})","ui.sessionTurn.retry.retrying":"pr\xF8ver igen","ui.sessionTurn.retry.inSeconds":"om {{seconds}}s","ui.sessionTurn.retry.attempt":"fors\xF8g #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - fors\xF8g #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini er meget overbelastet lige nu","ui.sessionTurn.error.freeUsageExceeded":"Gratis forbrug overskredet","ui.sessionTurn.error.addQredits":"Tilf\xF8j kreditter","ui.sessionTurn.status.delegating":"Delegerer arbejde","ui.sessionTurn.status.planning":"Planl\xE6gger n\xE6ste trin","ui.sessionTurn.status.gatheringContext":"Udforsker","ui.sessionTurn.status.gatheredContext":"Udforsket","ui.sessionTurn.status.searchingCodebase":"S\xF8ger i koden","ui.sessionTurn.status.searchingWeb":"S\xF8ger p\xE5 nettet","ui.sessionTurn.status.makingEdits":"Laver \xE6ndringer","ui.sessionTurn.status.runningCommands":"K\xF8rer kommandoer","ui.sessionTurn.status.thinking":"T\xE6nker","ui.sessionTurn.status.thinkingWithTopic":"T\xE6nker - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Samler tanker","ui.sessionTurn.status.consideringNextSteps":"Overvejer n\xE6ste skridt","ui.messagePart.questions.dismissed":"Sp\xF8rgsm\xE5l afvist","ui.messagePart.compaction":"Session komprimeret","ui.messagePart.context.read.one":"{{count}} l\xE6sning","ui.messagePart.context.read.other":"{{count}} l\xE6sninger","ui.messagePart.context.search.one":"{{count}} s\xF8gning","ui.messagePart.context.search.other":"{{count}} s\xF8gninger","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} lister","ui.messagePart.diagnostic.error":"Fejl","ui.messagePart.title.edit":"Rediger","ui.messagePart.title.write":"Skriv","ui.messagePart.option.typeOwnAnswer":"Skriv dit eget svar","ui.messagePart.review.title":"Gennemg\xE5 dine svar","ui.list.loading":"Indl\xE6ser","ui.list.empty":"Ingen resultater","ui.list.clearFilter":"Ryd filter","ui.list.emptyWithFilter.prefix":"Ingen resultater for","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Ny besked","ui.textField.copyToClipboard":"Kopier til udklipsholder","ui.textField.copyLink":"Kopier link","ui.textField.copied":"Kopieret","ui.imagePreview.alt":"Billedforh\xE5ndsvisning","ui.scrollView.ariaLabel":"rulbart indhold","ui.tool.read":"L\xE6s","ui.tool.loaded":"Indl\xE6st","ui.tool.list":"Liste","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webhentning","ui.tool.websearch":"Webs\xF8gning","ui.tool.codesearch":"Kodes\xF8gning","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Opgaver","ui.tool.todos.read":"L\xE6s opgaver","ui.tool.questions":"Sp\xF8rgsm\xE5l","ui.tool.agent":"{{type}} Agent","ui.tool.agent.default":"Agent","ui.common.file.one":"fil","ui.common.file.other":"filer","ui.common.question.one":"sp\xF8rgsm\xE5l","ui.common.question.other":"sp\xF8rgsm\xE5l","ui.common.add":"Tilf\xF8j","ui.common.back":"Tilbage","ui.common.cancel":"Annuller","ui.common.confirm":"Bekr\xE6ft","ui.common.dismiss":"Afvis","ui.common.close":"Luk","ui.common.next":"N\xE6ste","ui.common.submit":"Indsend","ui.permission.deny":"Afvis","ui.permission.allowAlways":"Tillad altid","ui.permission.allowOnce":"Tillad \xE9n gang","ui.message.expand":"Udvid besked","ui.message.collapse":"Skjul besked","ui.message.copy":"Kopier","ui.message.copyMessage":"Kopier besked","ui.message.forkMessage":"Forgren til ny session","ui.message.revertMessage":"Nulstil til dette punkt","ui.message.copyResponse":"Kopier svar","ui.message.copied":"Kopieret!","ui.message.interrupted":"Afbrudt","ui.message.queued":"I k\xF8","ui.message.attachment.alt":"vedh\xE6ftning","ui.patch.action.deleted":"Slettet","ui.patch.action.created":"Oprettet","ui.patch.action.moved":"Flyttet","ui.patch.action.patched":"Patchet","ui.question.subtitle.answered":"{{count}} besvaret","ui.question.answer.none":"(intet svar)","ui.question.review.notAnswered":"(ikke besvaret)","ui.question.multiHint":"V\xE6lg alle der g\xE6lder","ui.question.singleHint":"V\xE6lg \xE9t svar","ui.question.custom.placeholder":"Skriv dit svar...","ui.fileSearch.placeholder":"Find","ui.fileSearch.previousMatch":"Forrige match","ui.fileSearch.nextMatch":"N\xE6ste match","ui.fileSearch.close":"Luk s\xF8gning","ui.tool.task":"Opgave","ui.tool.skill":"F\xE6rdighed","ui.basicTool.called":"Kaldte `{{tool}}`","ui.toolErrorCard.failed":"Fejlede","ui.toolErrorCard.copyError":"Kopier fejl","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
2
+ import"./chunk-4sazy0nq.js";var e={"ui.sessionReview.title":"Sessions\xE6ndringer","ui.sessionReview.title.lastTurn":"\xC6ndringer fra sidste tur","ui.sessionReview.diffStyle.unified":"Samlet","ui.sessionReview.diffStyle.split":"Opdelt","ui.sessionReview.openFile":"\xC5bn fil","ui.sessionReview.selection.line":"linje {{line}}","ui.sessionReview.selection.lines":"linjer {{start}}-{{end}}","ui.sessionReview.expandAll":"Udvid alle","ui.sessionReview.collapseAll":"Skjul alle","ui.sessionReview.change.added":"Tilf\xF8jet","ui.sessionReview.change.removed":"Fjernet","ui.sessionReview.change.modified":"\xC6ndret","ui.sessionReview.image.loading":"Indl\xE6ser...","ui.sessionReview.image.placeholder":"Billede","ui.sessionReview.largeDiff.title":"Diff er for stor til at blive vist","ui.sessionReview.largeDiff.meta":"Gr\xE6nse: {{limit}} \xE6ndrede linjer. Nuv\xE6rende: {{current}} \xE6ndrede linjer.","ui.sessionReview.largeDiff.renderAnyway":"Vis alligevel","ui.fileMedia.kind.image":"billede","ui.fileMedia.kind.audio":"lyd","ui.fileMedia.state.removed":"Fjernet: {{kind}}","ui.fileMedia.state.loading":"Indl\xE6ser {{kind}}...","ui.fileMedia.state.error":"Fejl ved indl\xE6sning: {{kind}}","ui.fileMedia.state.unavailable":"Utilg\xE6ngelig: {{kind}}","ui.fileMedia.binary.title":"Bin\xE6r fil","ui.fileMedia.binary.description.path":"{{path}} kan ikke vises, fordi det er en bin\xE6r fil.","ui.fileMedia.binary.description.default":"Denne fil kan ikke vises, fordi det er en bin\xE6r fil.","ui.lineComment.label.prefix":"Kommenter p\xE5 ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Kommenterer p\xE5 ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Tilf\xF8j kommentar","ui.lineComment.submit":"Kommenter","ui.sessionTurn.steps.show":"Vis trin","ui.sessionTurn.steps.hide":"Skjul trin","ui.sessionTurn.summary.response":"Svar","ui.sessionTurn.diff.showMore":"Vis flere \xE6ndringer ({{count}})","ui.sessionTurn.retry.retrying":"pr\xF8ver igen","ui.sessionTurn.retry.inSeconds":"om {{seconds}}s","ui.sessionTurn.retry.attempt":"fors\xF8g #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - fors\xF8g #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini er meget overbelastet lige nu","ui.sessionTurn.error.freeUsageExceeded":"Gratis forbrug overskredet","ui.sessionTurn.error.addQredits":"Tilf\xF8j kreditter","ui.sessionTurn.status.delegating":"Delegerer arbejde","ui.sessionTurn.status.planning":"Planl\xE6gger n\xE6ste trin","ui.sessionTurn.status.gatheringContext":"Udforsker","ui.sessionTurn.status.gatheredContext":"Udforsket","ui.sessionTurn.status.searchingCodebase":"S\xF8ger i koden","ui.sessionTurn.status.searchingWeb":"S\xF8ger p\xE5 nettet","ui.sessionTurn.status.makingEdits":"Laver \xE6ndringer","ui.sessionTurn.status.runningCommands":"K\xF8rer kommandoer","ui.sessionTurn.status.thinking":"T\xE6nker","ui.sessionTurn.status.thinkingWithTopic":"T\xE6nker - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Samler tanker","ui.sessionTurn.status.consideringNextSteps":"Overvejer n\xE6ste skridt","ui.messagePart.questions.dismissed":"Sp\xF8rgsm\xE5l afvist","ui.messagePart.compaction":"Session komprimeret","ui.messagePart.context.read.one":"{{count}} l\xE6sning","ui.messagePart.context.read.other":"{{count}} l\xE6sninger","ui.messagePart.context.search.one":"{{count}} s\xF8gning","ui.messagePart.context.search.other":"{{count}} s\xF8gninger","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} lister","ui.messagePart.diagnostic.error":"Fejl","ui.messagePart.title.edit":"Rediger","ui.messagePart.title.write":"Skriv","ui.messagePart.option.typeOwnAnswer":"Skriv dit eget svar","ui.messagePart.review.title":"Gennemg\xE5 dine svar","ui.list.loading":"Indl\xE6ser","ui.list.empty":"Ingen resultater","ui.list.clearFilter":"Ryd filter","ui.list.emptyWithFilter.prefix":"Ingen resultater for","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Ny besked","ui.textField.copyToClipboard":"Kopier til udklipsholder","ui.textField.copyLink":"Kopier link","ui.textField.copied":"Kopieret","ui.imagePreview.alt":"Billedforh\xE5ndsvisning","ui.scrollView.ariaLabel":"rulbart indhold","ui.tool.read":"L\xE6s","ui.tool.loaded":"Indl\xE6st","ui.tool.list":"Liste","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webhentning","ui.tool.websearch":"Webs\xF8gning","ui.tool.codesearch":"Kodes\xF8gning","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Opgaver","ui.tool.todos.read":"L\xE6s opgaver","ui.tool.questions":"Sp\xF8rgsm\xE5l","ui.tool.agent":"{{type}} Agent","ui.tool.agent.default":"Agent","ui.common.file.one":"fil","ui.common.file.other":"filer","ui.common.question.one":"sp\xF8rgsm\xE5l","ui.common.question.other":"sp\xF8rgsm\xE5l","ui.common.add":"Tilf\xF8j","ui.common.back":"Tilbage","ui.common.cancel":"Annuller","ui.common.confirm":"Bekr\xE6ft","ui.common.dismiss":"Afvis","ui.common.close":"Luk","ui.common.next":"N\xE6ste","ui.common.submit":"Indsend","ui.permission.deny":"Afvis","ui.permission.allowAlways":"Tillad altid","ui.permission.allowOnce":"Tillad \xE9n gang","ui.message.expand":"Udvid besked","ui.message.collapse":"Skjul besked","ui.message.copy":"Kopier","ui.message.copyMessage":"Kopier besked","ui.message.forkMessage":"Forgren til ny session","ui.message.revertMessage":"Nulstil til dette punkt","ui.message.copyResponse":"Kopier svar","ui.message.copied":"Kopieret!","ui.message.interrupted":"Afbrudt","ui.message.queued":"I k\xF8","ui.message.attachment.alt":"vedh\xE6ftning","ui.patch.action.deleted":"Slettet","ui.patch.action.created":"Oprettet","ui.patch.action.moved":"Flyttet","ui.patch.action.patched":"Patchet","ui.question.subtitle.answered":"{{count}} besvaret","ui.question.answer.none":"(intet svar)","ui.question.review.notAnswered":"(ikke besvaret)","ui.question.multiHint":"V\xE6lg alle der g\xE6lder","ui.question.singleHint":"V\xE6lg \xE9t svar","ui.question.custom.placeholder":"Skriv dit svar...","ui.fileSearch.placeholder":"Find","ui.fileSearch.previousMatch":"Forrige match","ui.fileSearch.nextMatch":"N\xE6ste match","ui.fileSearch.close":"Luk s\xF8gning","ui.tool.task":"Opgave","ui.tool.skill":"F\xE6rdighed","ui.basicTool.called":"Kaldte `{{tool}}`","ui.toolErrorCard.failed":"Fejlede","ui.toolErrorCard.copyError":"Kopier fejl","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-4sazy0nq.js";var G="./tree-sitter-bash-hq5s6fxb.wasm";export{G as default};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$q as l,Eq as o,Jq as xQ,Kq as NQ,Nq as bQ,Rq as f,Uq as C,ar as p,er as h,fr as yQ,gr as c,hr as PQ,ir as MQ,jr as i,nr as kQ,oq as g,qq as jQ,uq as RQ,vq as ZQ}from"./chunk-z8gdmvgg.js";import{Ar as wQ,Cr as YQ,pr as e}from"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import{pv as Q}from"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-3k2b05fv.js";var _Q="3.0.63",vQ=f(()=>C(Q.object({error:Q.object({code:Q.number().nullable(),message:Q.string(),status:Q.string()})}))),QQ=PQ({errorSchema:vQ,errorToMessage:(X)=>X.error.message}),hQ=Q.union([Q.object({text:Q.string()}),Q.object({inlineData:Q.object({mimeType:Q.string(),data:Q.string()})})]),mQ=f(()=>C(Q.object({outputDimensionality:Q.number().optional(),taskType:Q.enum(["SEMANTIC_SIMILARITY","CLASSIFICATION","CLUSTERING","RETRIEVAL_DOCUMENT","RETRIEVAL_QUERY","QUESTION_ANSWERING","FACT_VERIFICATION","CODE_RETRIEVAL_QUERY"]).optional(),content:Q.array(Q.array(hQ).min(1).nullable()).optional()}))),uQ=class{constructor(X,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=X,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:X,headers:Y,abortSignal:Z,providerOptions:$}){let J=await l({provider:"google",providerOptions:$,schema:mQ});if(X.length>this.maxEmbeddingsPerCall)throw new wQ({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:X});let L=g(await c(this.config.headers),Y),H=J==null?void 0:J.content;if(H!=null&&H.length!==X.length)throw Error(`The number of multimodal content entries (${H.length}) must match the number of values (${X.length}).`);if(X.length===1){let U=H==null?void 0:H[0],G=X[0]?[{text:X[0]}]:[],D=U!=null?[...G,...U]:[{text:X[0]}],{responseHeaders:N,value:E,rawValue:q}=await p({url:`${this.config.baseURL}/models/${this.modelId}:embedContent`,headers:L,body:{model:`models/${this.modelId}`,content:{parts:D},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType},failedResponseHandler:QQ,successfulResponseHandler:i(dQ),abortSignal:Z,fetch:this.config.fetch});return{warnings:[],embeddings:[E.embedding.values],usage:void 0,response:{headers:N,body:q}}}let{responseHeaders:w,value:V,rawValue:x}=await p({url:`${this.config.baseURL}/models/${this.modelId}:batchEmbedContents`,headers:L,body:{requests:X.map((U,G)=>{let D=H==null?void 0:H[G],N=U?[{text:U}]:[];return{model:`models/${this.modelId}`,content:{role:"user",parts:D!=null?[...N,...D]:[{text:U}]},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType}})},failedResponseHandler:QQ,successfulResponseHandler:i(cQ),abortSignal:Z,fetch:this.config.fetch});return{warnings:[],embeddings:V.embeddings.map((U)=>U.values),usage:void 0,response:{headers:w,body:x}}}},cQ=f(()=>C(Q.object({embeddings:Q.array(Q.object({values:Q.array(Q.number())}))}))),dQ=f(()=>C(Q.object({embedding:Q.object({values:Q.array(Q.number())})})));function AQ(X){var Y,Z,$,J;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let L=(Y=X.promptTokenCount)!=null?Y:0,H=(Z=X.candidatesTokenCount)!=null?Z:0,w=($=X.cachedContentTokenCount)!=null?$:0,V=(J=X.thoughtsTokenCount)!=null?J:0;return{inputTokens:{total:L,noCache:L-w,cacheRead:w,cacheWrite:void 0},outputTokens:{total:H+V,text:H,reasoning:V},raw:X}}function u(X,Y=!0){if(X==null)return;if(gQ(X)){if(Y)return;if(typeof X==="object"&&X.description)return{type:"object",description:X.description};return{type:"object"}}if(typeof X==="boolean")return{type:"boolean",properties:{}};let{type:Z,description:$,required:J,properties:L,items:H,allOf:w,anyOf:V,oneOf:x,format:U,const:G,minLength:D,enum:N}=X,E={};if($)E.description=$;if(J)E.required=J;if(U)E.format=U;if(G!==void 0)E.enum=[G];if(Z)if(Array.isArray(Z)){let q=Z.includes("null"),j=Z.filter((B)=>B!=="null");if(j.length===0)E.type="null";else if(E.anyOf=j.map((B)=>({type:B})),q)E.nullable=!0}else E.type=Z;if(N!==void 0)E.enum=N;if(L!=null)E.properties=Object.entries(L).reduce((q,[j,B])=>{return q[j]=u(B,!1),q},{});if(H)E.items=Array.isArray(H)?H.map((q)=>u(q,!1)):u(H,!1);if(w)E.allOf=w.map((q)=>u(q,!1));if(V)if(V.some((q)=>typeof q==="object"&&(q==null?void 0:q.type)==="null")){let q=V.filter((j)=>!(typeof j==="object"&&(j==null?void 0:j.type)==="null"));if(q.length===1){let j=u(q[0],!1);if(typeof j==="object")E.nullable=!0,Object.assign(E,j)}else E.anyOf=q.map((j)=>u(j,!1)),E.nullable=!0}else E.anyOf=V.map((q)=>u(q,!1));if(x)E.oneOf=x.map((q)=>u(q,!1));if(D!==void 0)E.minLength=D;return E}function gQ(X){return X!=null&&typeof X==="object"&&X.type==="object"&&(X.properties==null||Object.keys(X.properties).length===0)&&!X.additionalProperties}var pQ=/^data:([^;,]+);base64,(.+)$/s;function iQ(X){let Y=pQ.exec(X);if(Y==null)return;return{mediaType:Y[1],data:Y[2]}}function lQ(X){let Y=iQ(X);if(Y==null)return;return{inlineData:{mimeType:Y.mediaType,data:Y.data}}}function sQ(X,Y,Z){let $=[],J=[];for(let L of Z)switch(L.type){case"text":{J.push(L.text);break}case"image-data":case"file-data":{$.push({inlineData:{mimeType:L.mediaType,data:L.data}});break}case"image-url":case"file-url":{let H=lQ(L.url);if(H!=null)$.push(H);else J.push(JSON.stringify(L));break}default:{J.push(JSON.stringify(L));break}}X.push({functionResponse:{name:Y,response:{name:Y,content:J.length>0?J.join(`
2
+ import{Aq as ZQ,Jq as o,Oq as xQ,Pq as NQ,Sq as bQ,Wq as f,Zq as C,er as l,fr as p,jr as h,kr as yQ,lr as c,mr as PQ,nr as MQ,or as i,sr as kQ,tq as g,vq as jQ,zq as RQ}from"./chunk-gwfx7tx7.js";import{Fr as wQ,Hr as YQ,ur as e}from"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import{xv as Q}from"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-4sazy0nq.js";var _Q="3.0.63",vQ=f(()=>C(Q.object({error:Q.object({code:Q.number().nullable(),message:Q.string(),status:Q.string()})}))),QQ=PQ({errorSchema:vQ,errorToMessage:(X)=>X.error.message}),hQ=Q.union([Q.object({text:Q.string()}),Q.object({inlineData:Q.object({mimeType:Q.string(),data:Q.string()})})]),mQ=f(()=>C(Q.object({outputDimensionality:Q.number().optional(),taskType:Q.enum(["SEMANTIC_SIMILARITY","CLASSIFICATION","CLUSTERING","RETRIEVAL_DOCUMENT","RETRIEVAL_QUERY","QUESTION_ANSWERING","FACT_VERIFICATION","CODE_RETRIEVAL_QUERY"]).optional(),content:Q.array(Q.array(hQ).min(1).nullable()).optional()}))),uQ=class{constructor(X,Y){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=X,this.config=Y}get provider(){return this.config.provider}async doEmbed({values:X,headers:Y,abortSignal:Z,providerOptions:$}){let J=await l({provider:"google",providerOptions:$,schema:mQ});if(X.length>this.maxEmbeddingsPerCall)throw new wQ({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:X});let L=g(await c(this.config.headers),Y),H=J==null?void 0:J.content;if(H!=null&&H.length!==X.length)throw Error(`The number of multimodal content entries (${H.length}) must match the number of values (${X.length}).`);if(X.length===1){let U=H==null?void 0:H[0],G=X[0]?[{text:X[0]}]:[],D=U!=null?[...G,...U]:[{text:X[0]}],{responseHeaders:N,value:E,rawValue:q}=await p({url:`${this.config.baseURL}/models/${this.modelId}:embedContent`,headers:L,body:{model:`models/${this.modelId}`,content:{parts:D},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType},failedResponseHandler:QQ,successfulResponseHandler:i(dQ),abortSignal:Z,fetch:this.config.fetch});return{warnings:[],embeddings:[E.embedding.values],usage:void 0,response:{headers:N,body:q}}}let{responseHeaders:w,value:V,rawValue:x}=await p({url:`${this.config.baseURL}/models/${this.modelId}:batchEmbedContents`,headers:L,body:{requests:X.map((U,G)=>{let D=H==null?void 0:H[G],N=U?[{text:U}]:[];return{model:`models/${this.modelId}`,content:{role:"user",parts:D!=null?[...N,...D]:[{text:U}]},outputDimensionality:J==null?void 0:J.outputDimensionality,taskType:J==null?void 0:J.taskType}})},failedResponseHandler:QQ,successfulResponseHandler:i(cQ),abortSignal:Z,fetch:this.config.fetch});return{warnings:[],embeddings:V.embeddings.map((U)=>U.values),usage:void 0,response:{headers:w,body:x}}}},cQ=f(()=>C(Q.object({embeddings:Q.array(Q.object({values:Q.array(Q.number())}))}))),dQ=f(()=>C(Q.object({embedding:Q.object({values:Q.array(Q.number())})})));function AQ(X){var Y,Z,$,J;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let L=(Y=X.promptTokenCount)!=null?Y:0,H=(Z=X.candidatesTokenCount)!=null?Z:0,w=($=X.cachedContentTokenCount)!=null?$:0,V=(J=X.thoughtsTokenCount)!=null?J:0;return{inputTokens:{total:L,noCache:L-w,cacheRead:w,cacheWrite:void 0},outputTokens:{total:H+V,text:H,reasoning:V},raw:X}}function u(X,Y=!0){if(X==null)return;if(gQ(X)){if(Y)return;if(typeof X==="object"&&X.description)return{type:"object",description:X.description};return{type:"object"}}if(typeof X==="boolean")return{type:"boolean",properties:{}};let{type:Z,description:$,required:J,properties:L,items:H,allOf:w,anyOf:V,oneOf:x,format:U,const:G,minLength:D,enum:N}=X,E={};if($)E.description=$;if(J)E.required=J;if(U)E.format=U;if(G!==void 0)E.enum=[G];if(Z)if(Array.isArray(Z)){let q=Z.includes("null"),j=Z.filter((B)=>B!=="null");if(j.length===0)E.type="null";else if(E.anyOf=j.map((B)=>({type:B})),q)E.nullable=!0}else E.type=Z;if(N!==void 0)E.enum=N;if(L!=null)E.properties=Object.entries(L).reduce((q,[j,B])=>{return q[j]=u(B,!1),q},{});if(H)E.items=Array.isArray(H)?H.map((q)=>u(q,!1)):u(H,!1);if(w)E.allOf=w.map((q)=>u(q,!1));if(V)if(V.some((q)=>typeof q==="object"&&(q==null?void 0:q.type)==="null")){let q=V.filter((j)=>!(typeof j==="object"&&(j==null?void 0:j.type)==="null"));if(q.length===1){let j=u(q[0],!1);if(typeof j==="object")E.nullable=!0,Object.assign(E,j)}else E.anyOf=q.map((j)=>u(j,!1)),E.nullable=!0}else E.anyOf=V.map((q)=>u(q,!1));if(x)E.oneOf=x.map((q)=>u(q,!1));if(D!==void 0)E.minLength=D;return E}function gQ(X){return X!=null&&typeof X==="object"&&X.type==="object"&&(X.properties==null||Object.keys(X.properties).length===0)&&!X.additionalProperties}var pQ=/^data:([^;,]+);base64,(.+)$/s;function iQ(X){let Y=pQ.exec(X);if(Y==null)return;return{mediaType:Y[1],data:Y[2]}}function lQ(X){let Y=iQ(X);if(Y==null)return;return{inlineData:{mimeType:Y.mediaType,data:Y.data}}}function sQ(X,Y,Z){let $=[],J=[];for(let L of Z)switch(L.type){case"text":{J.push(L.text);break}case"image-data":case"file-data":{$.push({inlineData:{mimeType:L.mediaType,data:L.data}});break}case"image-url":case"file-url":{let H=lQ(L.url);if(H!=null)$.push(H);else J.push(JSON.stringify(L));break}default:{J.push(JSON.stringify(L));break}}X.push({functionResponse:{name:Y,response:{name:Y,content:J.length>0?J.join(`
3
3
  `):"Tool executed successfully."},...$.length>0?{parts:$}:{}}})}function nQ(X,Y,Z){for(let $ of Z)switch($.type){case"text":X.push({functionResponse:{name:Y,response:{name:Y,content:$.text}}});break;case"image-data":X.push({inlineData:{mimeType:String($.mediaType),data:String($.data)}},{text:"Tool executed successfully and returned this image as a response"});break;default:X.push({text:JSON.stringify($)});break}}function aQ(X,Y){var Z,$,J,L,H,w,V,x;let U=[],G=[],D=!0,N=(Z=Y==null?void 0:Y.isGemmaModel)!=null?Z:!1,E=($=Y==null?void 0:Y.providerOptionsName)!=null?$:"google",q=(J=Y==null?void 0:Y.supportsFunctionResponseParts)!=null?J:!0;for(let{role:j,content:B}of X)switch(j){case"system":{if(!D)throw new YQ({functionality:"system messages are only supported at the beginning of the conversation"});U.push({text:B});break}case"user":{D=!1;let K=[];for(let F of B)switch(F.type){case"text":{K.push({text:F.text});break}case"file":{let b=F.mediaType==="image/*"?"image/jpeg":F.mediaType;K.push(F.data instanceof URL?{fileData:{mimeType:b,fileUri:F.data.toString()}}:{inlineData:{mimeType:b,data:ZQ(F.data)}});break}}G.push({role:"user",parts:K});break}case"assistant":{D=!1,G.push({role:"model",parts:B.map((K)=>{var F,b,S,k;let z=(k=(F=K.providerOptions)==null?void 0:F[E])!=null?k:E!=="google"?(b=K.providerOptions)==null?void 0:b.google:(S=K.providerOptions)==null?void 0:S.vertex,y=(z==null?void 0:z.thoughtSignature)!=null?String(z.thoughtSignature):void 0;switch(K.type){case"text":return K.text.length===0?void 0:{text:K.text,thoughtSignature:y};case"reasoning":return K.text.length===0?void 0:{text:K.text,thought:!0,thoughtSignature:y};case"file":{if(K.data instanceof URL)throw new YQ({functionality:"File data URLs in assistant messages are not supported"});return{inlineData:{mimeType:K.mediaType,data:ZQ(K.data)},...(z==null?void 0:z.thought)===!0?{thought:!0}:{},thoughtSignature:y}}case"tool-call":{let P=(z==null?void 0:z.serverToolCallId)!=null?String(z.serverToolCallId):void 0,O=(z==null?void 0:z.serverToolType)!=null?String(z.serverToolType):void 0;if(P&&O)return{toolCall:{toolType:O,args:typeof K.input==="string"?JSON.parse(K.input):K.input,id:P},thoughtSignature:y};return{functionCall:{name:K.toolName,args:K.input},thoughtSignature:y}}case"tool-result":{let P=(z==null?void 0:z.serverToolCallId)!=null?String(z.serverToolCallId):void 0,O=(z==null?void 0:z.serverToolType)!=null?String(z.serverToolType):void 0;if(P&&O)return{toolResponse:{toolType:O,response:K.output.type==="json"?K.output.value:{},id:P},thoughtSignature:y};return}}}).filter((K)=>K!==void 0)});break}case"tool":{D=!1;let K=[];for(let F of B){if(F.type==="tool-approval-response")continue;let b=(V=(L=F.providerOptions)==null?void 0:L[E])!=null?V:E!=="google"?(H=F.providerOptions)==null?void 0:H.google:(w=F.providerOptions)==null?void 0:w.vertex,S=(b==null?void 0:b.serverToolCallId)!=null?String(b.serverToolCallId):void 0,k=(b==null?void 0:b.serverToolType)!=null?String(b.serverToolType):void 0;if(S&&k){let y=(b==null?void 0:b.thoughtSignature)!=null?String(b.thoughtSignature):void 0;if(G.length>0){let P=G[G.length-1];if(P.role==="model"){P.parts.push({toolResponse:{toolType:k,response:F.output.type==="json"?F.output.value:{},id:S},thoughtSignature:y});continue}}}let z=F.output;if(z.type==="content")if(q)sQ(K,F.toolName,z.value);else nQ(K,F.toolName,z.value);else K.push({functionResponse:{name:F.toolName,response:{name:F.toolName,content:z.type==="execution-denied"?(x=z.reason)!=null?x:"Tool execution denied.":z.value}}})}G.push({role:"user",parts:K});break}}if(N&&U.length>0&&G.length>0&&G[0].role==="user"){let j=U.map((B)=>B.text).join(`
4
4
 
5
5
  `);G[0].parts.unshift({text:j+`
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{ci as I,di as B,ei as Y,fi as Z,gi as j,hi as F,ii as K,ki as U,li as V,mi as W}from"./chunk-7hm0c2yg.js";var N=class extends F{async evalCodeAsync(b,q="eval.js",D){let w=D===void 0?1:0,G=j(D),$=0;try{$=await this.memory.newHeapCharPointer(b).consume((X)=>this.ffi.QTS_Eval_MaybeAsync(this.ctx.value,X.value.ptr,X.value.strlen,q,w,G))}catch(X){throw this.runtime.debugLog("QTS_Eval_MaybeAsync threw",X),X}let E=this.ffi.QTS_ResolveException(this.ctx.value,$);return E?(this.ffi.QTS_FreeValuePointer(this.ctx.value,$),this.fail(this.memory.heapValueHandle(E))):this.success(this.memory.heapValueHandle($))}newAsyncifiedFunction(b,q){return this.newFunction(b,q)}},O=class extends K{constructor(b){super(b)}newContext(b={}){let q=Z(b.intrinsics),D=new B(this.ffi.QTS_NewContext(this.rt.value,q),void 0,(G)=>{this.contextMap.delete(G),this.callbacks.deleteContext(G),this.ffi.QTS_FreeContext(G)}),w=new N({module:this.module,ctx:D,ffi:this.ffi,rt:this.rt,ownedLifetimes:[],runtime:this,callbacks:this.callbacks});return this.contextMap.set(D.value,w),w}setModuleLoader(b,q){super.setModuleLoader(b,q)}setMaxStackSize(b){return super.setMaxStackSize(b)}},z=class extends W{constructor(b,q){super(b,q);this.ffi=q,this.module=b}newRuntime(b={}){let q=new B(this.ffi.QTS_NewRuntime(),void 0,(w)=>{this.callbacks.deleteRuntime(w),this.ffi.QTS_FreeRuntime(w)}),D=new O({module:this.module,ffi:this.ffi,rt:q,callbacks:this.callbacks});return U(D,b),b.moduleLoader&&D.setModuleLoader(b.moduleLoader),D}newContext(b={}){let q=this.newRuntime(),D=b.ownedLifetimes?b.ownedLifetimes.concat([q]):[q],w=q.newContext({...b,ownedLifetimes:D});return q.context=w,w}evalCode(){throw new I("QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead")}evalCodeAsync(b,q){return Y.withScopeAsync(async(D)=>{let w=D.manage(this.newContext());V(w.runtime,q);let G=await w.evalCodeAsync(b,"eval.js");if(q.memoryLimitBytes!==void 0&&w.runtime.setMemoryLimit(-1),G.error)throw w.dump(D.manage(G.error));return w.dump(D.manage(G.value))})}};
3
- export{z as bi};
2
+ import{$h as U,Th as I,Uh as B,Vh as Y,Wh as Z,Xh as j,Yh as F,Zh as K,ai as V,bi as W}from"./chunk-kqhh2pm9.js";var N=class extends F{async evalCodeAsync(b,q="eval.js",D){let w=D===void 0?1:0,G=j(D),$=0;try{$=await this.memory.newHeapCharPointer(b).consume((X)=>this.ffi.QTS_Eval_MaybeAsync(this.ctx.value,X.value.ptr,X.value.strlen,q,w,G))}catch(X){throw this.runtime.debugLog("QTS_Eval_MaybeAsync threw",X),X}let E=this.ffi.QTS_ResolveException(this.ctx.value,$);return E?(this.ffi.QTS_FreeValuePointer(this.ctx.value,$),this.fail(this.memory.heapValueHandle(E))):this.success(this.memory.heapValueHandle($))}newAsyncifiedFunction(b,q){return this.newFunction(b,q)}},O=class extends K{constructor(b){super(b)}newContext(b={}){let q=Z(b.intrinsics),D=new B(this.ffi.QTS_NewContext(this.rt.value,q),void 0,(G)=>{this.contextMap.delete(G),this.callbacks.deleteContext(G),this.ffi.QTS_FreeContext(G)}),w=new N({module:this.module,ctx:D,ffi:this.ffi,rt:this.rt,ownedLifetimes:[],runtime:this,callbacks:this.callbacks});return this.contextMap.set(D.value,w),w}setModuleLoader(b,q){super.setModuleLoader(b,q)}setMaxStackSize(b){return super.setMaxStackSize(b)}},z=class extends W{constructor(b,q){super(b,q);this.ffi=q,this.module=b}newRuntime(b={}){let q=new B(this.ffi.QTS_NewRuntime(),void 0,(w)=>{this.callbacks.deleteRuntime(w),this.ffi.QTS_FreeRuntime(w)}),D=new O({module:this.module,ffi:this.ffi,rt:q,callbacks:this.callbacks});return U(D,b),b.moduleLoader&&D.setModuleLoader(b.moduleLoader),D}newContext(b={}){let q=this.newRuntime(),D=b.ownedLifetimes?b.ownedLifetimes.concat([q]):[q],w=q.newContext({...b,ownedLifetimes:D});return q.context=w,w}evalCode(){throw new I("QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead")}evalCodeAsync(b,q){return Y.withScopeAsync(async(D)=>{let w=D.manage(this.newContext());V(w.runtime,q);let G=await w.evalCodeAsync(b,"eval.js");if(q.memoryLimitBytes!==void 0&&w.runtime.setMemoryLimit(-1),G.error)throw w.dump(D.manage(G.error));return w.dump(D.manage(G.value))})}};
3
+ export{z as Sh};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{qf as P}from"./chunk-7311jry1.js";import"./chunk-e6xnynaz.js";import{yf as Q}from"./chunk-a3a1trap.js";import{bQ as W,cQ as J}from"./chunk-3k2b05fv.js";class M{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776000||e<-9223372036854776000)throw Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);let t=new Uint8Array(8);for(let r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;if(e<0)A(t);return new M(t)}valueOf(){let e=this.bytes.slice(0),t=e[0]&128;if(t)A(e);return parseInt(b.toHex(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function A(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1;t--)if(e[t]++,e[t]!==0)break}class I{toUtf8;fromUtf8;constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){let t=[];for(let s of Object.keys(e)){let a=this.fromUtf8(s);t.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(e[s]))}let r=new Uint8Array(t.reduce((s,a)=>s+a.byteLength,0)),n=0;for(let s of t)r.set(s,n),n+=s.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":let t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":let r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":let n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":let s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);let a=new Uint8Array(s.buffer);return a.set(e.value,3),a;case"string":let l=this.fromUtf8(e.value),i=new DataView(new ArrayBuffer(3+l.byteLength));i.setUint8(0,7),i.setUint16(1,l.byteLength,!1);let f=new Uint8Array(i.buffer);return f.set(l,3),f;case"timestamp":let h=new Uint8Array(9);return h[0]=8,h.set(M.fromNumber(e.value.valueOf()).bytes,1),h;case"uuid":if(!te.test(e.value))throw Error(`Invalid UUID received: ${e.value}`);let u=new Uint8Array(17);return u[0]=9,u.set(b.fromHex(e.value.replace(/\-/g,"")),1),u}}parse(e){let t={},r=0;while(r<e.byteLength){let n=e.getUint8(r++),s=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,n));switch(r+=n,e.getUint8(r++)){case 0:t[s]={type:F,value:!0};break;case 1:t[s]={type:F,value:!1};break;case 2:t[s]={type:X,value:e.getInt8(r++)};break;case 3:t[s]={type:Z,value:e.getInt16(r,!1)},r+=2;break;case 4:t[s]={type:V,value:e.getInt32(r,!1)},r+=4;break;case 5:t[s]={type:D,value:new M(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:let a=e.getUint16(r,!1);r+=2,t[s]={type:E,value:new Uint8Array(e.buffer,e.byteOffset+r,a)},r+=a;break;case 7:let l=e.getUint16(r,!1);r+=2,t[s]={type:_,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,l))},r+=l;break;case 8:t[s]={type:Y,value:new Date(new M(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:let i=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[s]={type:ee,value:`${b.toHex(i.subarray(0,4))}-${b.toHex(i.subarray(4,6))}-${b.toHex(i.subarray(6,8))}-${b.toHex(i.subarray(8,10))}-${b.toHex(i.subarray(10))}`};break;default:throw Error("Unrecognized header type tag")}}return t}}function se({byteLength:e,byteOffset:t,buffer:r}){if(e<re)throw Error("Provided message too short to accommodate event stream message overhead");let n=new DataView(r,t,e),s=n.getUint32(0,!1);if(e!==s)throw Error("Reported message length does not match received message length");let a=n.getUint32(q,!1),l=n.getUint32(p,!1),i=n.getUint32(e-S,!1),f=new j.Crc32().update(new Uint8Array(r,t,p));if(l!==f.digest())throw Error(`The prelude checksum specified in the message (${l}) does not match the calculated CRC32 checksum (${f.digest()})`);if(f.update(new Uint8Array(r,t+p,e-(p+S))),i!==f.digest())throw Error(`The message checksum (${f.digest()}) did not match the expected value of ${i}`);return{headers:new DataView(r,t+p+S,a),body:new Uint8Array(r,t+p+S+a,s-a-(p+S+S))}}class x{headerMarshaller;messageBuffer;isEndOfStream;constructor(e,t){this.headerMarshaller=new I(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){let e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage(){return e},isEndOfStream(){return t}}}getAvailableMessages(){let e=this.messageBuffer;this.messageBuffer=[];let t=this.isEndOfStream;return{getMessages(){return e},isEndOfStream(){return t}}}encode({headers:e,body:t}){let r=this.headerMarshaller.format(e),n=r.byteLength+t.byteLength+16,s=new Uint8Array(n),a=new DataView(s.buffer,s.byteOffset,s.byteLength),l=new j.Crc32;return a.setUint32(0,n,!1),a.setUint32(4,r.byteLength,!1),a.setUint32(8,l.update(s.subarray(0,8)).digest(),!1),s.set(r,12),s.set(t,r.byteLength+12),a.setUint32(n-4,l.update(s.subarray(8,n-4)).digest(),!1),s}decode(e){let{headers:t,body:r}=se(e);return{headers:this.headerMarshaller.parse(t),body:r}}formatHeaders(e){return this.headerMarshaller.format(e)}}function H(e){let t=0,r=0,n=null,s=null,a=(i)=>{if(typeof i!=="number")throw Error("Attempted to allocate an event message where size was not a number: "+i);t=i,r=4,n=new Uint8Array(i),new DataView(n.buffer).setUint32(0,i,!1)},l=async function*(){let i=e[Symbol.asyncIterator]();while(!0){let{value:f,done:h}=await i.next();if(h){if(!t)return;else if(t===r)yield n;else throw Error("Truncated event message received.");return}let u=f.length,o=0;while(o<u){if(!n){let m=u-o;if(!s)s=new Uint8Array(4);let y=Math.min(4-r,m);if(s.set(f.slice(o,o+y),r),r+=y,o+=y,r<4)break;a(new DataView(s.buffer).getUint32(0,!1)),s=null}let c=Math.min(t-r,u-o);if(n.set(f.slice(o,o+c),r),r+=c,o+=c,t&&t===r)yield n,n=null,t=0,r=0}}};return{[Symbol.asyncIterator]:l}}function ne(e,t){let r=C(t.deserializer,t.toUtf8);return{[Symbol.asyncIterator]:async function*(){for await(let n of e){let s=t.eventStreamCodec.decode(n),a=await r(s);if(a===void 0)continue;yield a}}}}function C(e,t){return async function(r){let{value:n}=r.headers[":message-type"];if(n==="error"){let s=Error(r.headers[":error-message"].value||"UnknownError");throw s.name=r.headers[":error-code"].value,s}else if(n==="exception"){let s=r.headers[":exception-type"].value,a={[s]:r},l=await e(a);if(l.$unknown){let i=Error(t(r.body));throw i.name=s,i}throw l[s]}else if(n==="event"){let s={[r.headers[":event-type"].value]:r},a=await e(s);if(a.$unknown)return;return a}else throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}class N{universalMarshaller;constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new O({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){let r=typeof e[Symbol.asyncIterator]==="function"?e:ie(e);return this.universalMarshaller.deserialize(r,t)}serialize(e,t){return R.Readable.from(this.universalMarshaller.serialize(e,t))}}async function*ie(e){let t=!1,r=!1,n=[];e.on("error",(s)=>{if(!t)t=!0;if(s)throw s}),e.on("data",(s)=>{n.push(s)}),e.on("end",()=>{t=!0});while(!r){let s=await new Promise((a)=>setTimeout(()=>a(n.shift()),0));if(s)yield s;r=t&&n.length===0}}class K{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:r,serdeContext:n,defaultContentType:s}){this.marshaller=e,this.serializer=t,this.deserializer=r,this.serdeContext=n,this.defaultContentType=s}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r}){let n=this.marshaller,s=t.getEventStreamMember(),a=t.getMemberSchema(s),l=this.serializer,i=this.defaultContentType,f=Symbol("initialRequestMarker"),h={async*[Symbol.asyncIterator](){if(r){let u={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:i}};l.write(t,r);let o=l.flush();yield{[f]:!0,headers:u,body:o}}for await(let u of e)yield u}};return n.serialize(h,(u)=>{if(u[f])return{headers:u.headers,body:u.body};let o="";for(let d in u)if(d!=="__type"){o=d;break}let{additionalHeaders:c,body:m,eventType:y,explicitPayloadContentType:g}=this.writeEventBody(o,a,u);return{headers:{":event-type":{type:"string",value:y},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:g??i},...c},body:m}})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r}){let n=this.marshaller,s=t.getEventStreamMember(),l=t.getMemberSchema(s).getMemberSchemas(),i=Symbol("initialResponseMarker"),f=n.deserialize(e.body,async(o)=>{let c="";for(let y in o)if(y!=="__type"){c=y;break}let m=o[c].body;if(c==="initial-response"){let y=await this.deserializer.read(t,m);return delete y[s],{[i]:!0,...y}}else if(c in l){let y=l[c];if(y.isStructSchema()){let g={},w=!1;for(let[d,U]of y.structIterator()){let{eventHeader:$,eventPayload:G}=U.getMergedTraits();if(w=w||Boolean($||G),G){if(U.isBlobSchema())g[d]=m;else if(U.isStringSchema())g[d]=(this.serdeContext?.utf8Encoder??b.toUtf8)(m);else if(U.isStructSchema())g[d]=await this.deserializer.read(U,m)}else if($){let v=o[c].headers[d]?.value;if(v!=null)if(U.isNumericSchema())if(v&&typeof v==="object"&&"bytes"in v)g[d]=BigInt(v.toString());else g[d]=Number(v);else g[d]=v}}if(w)return{[c]:g};if(m.byteLength===0)return{[c]:{}}}return{[c]:await this.deserializer.read(y,m)}}else return{$unknown:o}}),h=f[Symbol.asyncIterator](),u=await h.next();if(u.done)return f;if(u.value?.[i]){if(!t)throw Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(let o in u.value)r[o]=u.value[o]}return{async*[Symbol.asyncIterator](){if(!u?.value?.[i])yield u.value;while(!0){let{done:o,value:c}=await h.next();if(o)break;yield c}}}}writeEventBody(e,t,r){let n=this.serializer,s=e,a=null,l,i=(()=>{return t.getSchema()[4].includes(e)})(),f={};if(!i){let[o,c]=r[e];s=o,n.write(15,c)}else{let o=t.getMemberSchema(e);if(o.isStructSchema()){for(let[c,m]of o.structIterator()){let{eventHeader:y,eventPayload:g}=m.getMergedTraits();if(g)a=c;else if(y){let w=r[e][c],d="binary";if(m.isNumericSchema())if(-2147483648<=w&&w<=2147483647)d="integer";else d="long";else if(m.isTimestampSchema())d="timestamp";else if(m.isStringSchema())d="string";else if(m.isBooleanSchema())d="boolean";if(w!=null)f[c]={type:d,value:w},delete r[e][c]}}if(a!==null){let c=o.getMemberSchema(a);if(c.isBlobSchema())l="application/octet-stream";else if(c.isStringSchema())l="text/plain";n.write(c,r[e][a])}else n.write(o,r[e])}else if(o.isUnitSchema())n.write(o,{});else throw Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}let h=n.flush()??new Uint8Array;return{body:typeof h==="string"?(this.serdeContext?.utf8Decoder??b.fromUtf8)(h):h,eventType:s,explicitPayloadContentType:l,additionalHeaders:f}}}var j,b,R,L,F="boolean",X="byte",Z="short",V="integer",D="long",E="binary",_="string",Y="timestamp",ee="uuid",te,q=4,p,S=4,re,k,B,T,z,O=class{eventStreamCodec;utfEncoder;constructor({utf8Encoder:t,utf8Decoder:r}){this.eventStreamCodec=new x(t,r),this.utfEncoder=t}deserialize(t,r){let n=H(t);return new T({messageStream:new k({inputStream:n,decoder:this.eventStreamCodec}),deserializer:C(r,this.utfEncoder)})}serialize(t,r){return new B({messageStream:new z({inputStream:t,serializer:r}),encoder:this.eventStreamCodec,includeEndFrame:!0})}},ae=(e)=>new O(e),oe=(e)=>new N(e),ce=(e)=>({[Symbol.asyncIterator]:async function*(){let t=e.getReader();try{while(!0){let{done:r,value:n}=await t.read();if(r)return;yield n}}finally{t.releaseLock()}}}),le=(e)=>{let t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(r){let{done:n,value:s}=await t.next();if(n)return r.close();r.enqueue(s)}})},ue=(e)=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),fe,ye,de,me,he,ge,we,be,pe,ve,Se,Ue,Me,Ie,xe,ke,Be,Te;var ze=W(()=>{j=P(),b=Q(),R=J("stream");(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(L||(L={}));te=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,p=q*2,re=p+S*2;k=class k{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.decoder.decode(e)}};B=class B{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream)yield this.options.encoder.encode(e);if(this.options.includeEndFrame)yield new Uint8Array(0)}};T=class T{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream){let t=await this.options.deserializer(e);if(t===void 0)continue;yield t}}};z=class z{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.serializer(e)}};fe=x,ye=N,de=K,me=I,he=M,ge=k,we=B,be=T,pe=z,ve=O,Se=oe,Ue=H,Me=C,Ie=ne,xe=le,ke=ce,Be=ue,Te=ae});ze();export{Te as universalEventStreamSerdeProvider,Be as resolveEventStreamSerdeConfig,ke as readableStreamToIterable,xe as iterableToReadableStream,Ie as getUnmarshalledStream,Me as getMessageUnmarshaller,Ue as getChunkedStream,Se as eventStreamSerdeProvider,ve as UniversalEventStreamMarshaller,pe as SmithyMessageEncoderStream,be as SmithyMessageDecoderStream,we as MessageEncoderStream,ge as MessageDecoderStream,he as Int64,me as HeaderMarshaller,de as EventStreamSerde,ye as EventStreamMarshaller,fe as EventStreamCodec};export default {get universalEventStreamSerdeProvider(){return Te},get resolveEventStreamSerdeConfig(){return Be},get readableStreamToIterable(){return ke},get iterableToReadableStream(){return xe},get getUnmarshalledStream(){return Ie},get getMessageUnmarshaller(){return Me},get getChunkedStream(){return Ue},get eventStreamSerdeProvider(){return Se},get UniversalEventStreamMarshaller(){return ve},get SmithyMessageEncoderStream(){return pe},get SmithyMessageDecoderStream(){return be},get MessageEncoderStream(){return we},get MessageDecoderStream(){return ge},get Int64(){return he},get HeaderMarshaller(){return me},get EventStreamSerde(){return de},get EventStreamMarshaller(){return ye},get EventStreamCodec(){return fe}};
2
+ import{of as P}from"./chunk-00sr2gwz.js";import"./chunk-yha554nm.js";import{wf as Q}from"./chunk-v3x5nrc4.js";import{jQ as W,kQ as J}from"./chunk-4sazy0nq.js";class M{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776000||e<-9223372036854776000)throw Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);let t=new Uint8Array(8);for(let r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;if(e<0)A(t);return new M(t)}valueOf(){let e=this.bytes.slice(0),t=e[0]&128;if(t)A(e);return parseInt(b.toHex(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function A(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1;t--)if(e[t]++,e[t]!==0)break}class I{toUtf8;fromUtf8;constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){let t=[];for(let s of Object.keys(e)){let a=this.fromUtf8(s);t.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(e[s]))}let r=new Uint8Array(t.reduce((s,a)=>s+a.byteLength,0)),n=0;for(let s of t)r.set(s,n),n+=s.byteLength;return r}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":let t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":let r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":let n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":let s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);let a=new Uint8Array(s.buffer);return a.set(e.value,3),a;case"string":let l=this.fromUtf8(e.value),i=new DataView(new ArrayBuffer(3+l.byteLength));i.setUint8(0,7),i.setUint16(1,l.byteLength,!1);let f=new Uint8Array(i.buffer);return f.set(l,3),f;case"timestamp":let h=new Uint8Array(9);return h[0]=8,h.set(M.fromNumber(e.value.valueOf()).bytes,1),h;case"uuid":if(!te.test(e.value))throw Error(`Invalid UUID received: ${e.value}`);let u=new Uint8Array(17);return u[0]=9,u.set(b.fromHex(e.value.replace(/\-/g,"")),1),u}}parse(e){let t={},r=0;while(r<e.byteLength){let n=e.getUint8(r++),s=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,n));switch(r+=n,e.getUint8(r++)){case 0:t[s]={type:F,value:!0};break;case 1:t[s]={type:F,value:!1};break;case 2:t[s]={type:X,value:e.getInt8(r++)};break;case 3:t[s]={type:Z,value:e.getInt16(r,!1)},r+=2;break;case 4:t[s]={type:V,value:e.getInt32(r,!1)},r+=4;break;case 5:t[s]={type:D,value:new M(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:let a=e.getUint16(r,!1);r+=2,t[s]={type:E,value:new Uint8Array(e.buffer,e.byteOffset+r,a)},r+=a;break;case 7:let l=e.getUint16(r,!1);r+=2,t[s]={type:_,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,l))},r+=l;break;case 8:t[s]={type:Y,value:new Date(new M(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:let i=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[s]={type:ee,value:`${b.toHex(i.subarray(0,4))}-${b.toHex(i.subarray(4,6))}-${b.toHex(i.subarray(6,8))}-${b.toHex(i.subarray(8,10))}-${b.toHex(i.subarray(10))}`};break;default:throw Error("Unrecognized header type tag")}}return t}}function se({byteLength:e,byteOffset:t,buffer:r}){if(e<re)throw Error("Provided message too short to accommodate event stream message overhead");let n=new DataView(r,t,e),s=n.getUint32(0,!1);if(e!==s)throw Error("Reported message length does not match received message length");let a=n.getUint32(q,!1),l=n.getUint32(p,!1),i=n.getUint32(e-S,!1),f=new j.Crc32().update(new Uint8Array(r,t,p));if(l!==f.digest())throw Error(`The prelude checksum specified in the message (${l}) does not match the calculated CRC32 checksum (${f.digest()})`);if(f.update(new Uint8Array(r,t+p,e-(p+S))),i!==f.digest())throw Error(`The message checksum (${f.digest()}) did not match the expected value of ${i}`);return{headers:new DataView(r,t+p+S,a),body:new Uint8Array(r,t+p+S+a,s-a-(p+S+S))}}class x{headerMarshaller;messageBuffer;isEndOfStream;constructor(e,t){this.headerMarshaller=new I(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){let e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage(){return e},isEndOfStream(){return t}}}getAvailableMessages(){let e=this.messageBuffer;this.messageBuffer=[];let t=this.isEndOfStream;return{getMessages(){return e},isEndOfStream(){return t}}}encode({headers:e,body:t}){let r=this.headerMarshaller.format(e),n=r.byteLength+t.byteLength+16,s=new Uint8Array(n),a=new DataView(s.buffer,s.byteOffset,s.byteLength),l=new j.Crc32;return a.setUint32(0,n,!1),a.setUint32(4,r.byteLength,!1),a.setUint32(8,l.update(s.subarray(0,8)).digest(),!1),s.set(r,12),s.set(t,r.byteLength+12),a.setUint32(n-4,l.update(s.subarray(8,n-4)).digest(),!1),s}decode(e){let{headers:t,body:r}=se(e);return{headers:this.headerMarshaller.parse(t),body:r}}formatHeaders(e){return this.headerMarshaller.format(e)}}function H(e){let t=0,r=0,n=null,s=null,a=(i)=>{if(typeof i!=="number")throw Error("Attempted to allocate an event message where size was not a number: "+i);t=i,r=4,n=new Uint8Array(i),new DataView(n.buffer).setUint32(0,i,!1)},l=async function*(){let i=e[Symbol.asyncIterator]();while(!0){let{value:f,done:h}=await i.next();if(h){if(!t)return;else if(t===r)yield n;else throw Error("Truncated event message received.");return}let u=f.length,o=0;while(o<u){if(!n){let m=u-o;if(!s)s=new Uint8Array(4);let y=Math.min(4-r,m);if(s.set(f.slice(o,o+y),r),r+=y,o+=y,r<4)break;a(new DataView(s.buffer).getUint32(0,!1)),s=null}let c=Math.min(t-r,u-o);if(n.set(f.slice(o,o+c),r),r+=c,o+=c,t&&t===r)yield n,n=null,t=0,r=0}}};return{[Symbol.asyncIterator]:l}}function ne(e,t){let r=C(t.deserializer,t.toUtf8);return{[Symbol.asyncIterator]:async function*(){for await(let n of e){let s=t.eventStreamCodec.decode(n),a=await r(s);if(a===void 0)continue;yield a}}}}function C(e,t){return async function(r){let{value:n}=r.headers[":message-type"];if(n==="error"){let s=Error(r.headers[":error-message"].value||"UnknownError");throw s.name=r.headers[":error-code"].value,s}else if(n==="exception"){let s=r.headers[":exception-type"].value,a={[s]:r},l=await e(a);if(l.$unknown){let i=Error(t(r.body));throw i.name=s,i}throw l[s]}else if(n==="event"){let s={[r.headers[":event-type"].value]:r},a=await e(s);if(a.$unknown)return;return a}else throw Error(`Unrecognizable event type: ${r.headers[":event-type"].value}`)}}class N{universalMarshaller;constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new O({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){let r=typeof e[Symbol.asyncIterator]==="function"?e:ie(e);return this.universalMarshaller.deserialize(r,t)}serialize(e,t){return R.Readable.from(this.universalMarshaller.serialize(e,t))}}async function*ie(e){let t=!1,r=!1,n=[];e.on("error",(s)=>{if(!t)t=!0;if(s)throw s}),e.on("data",(s)=>{n.push(s)}),e.on("end",()=>{t=!0});while(!r){let s=await new Promise((a)=>setTimeout(()=>a(n.shift()),0));if(s)yield s;r=t&&n.length===0}}class K{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:r,serdeContext:n,defaultContentType:s}){this.marshaller=e,this.serializer=t,this.deserializer=r,this.serdeContext=n,this.defaultContentType=s}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:r}){let n=this.marshaller,s=t.getEventStreamMember(),a=t.getMemberSchema(s),l=this.serializer,i=this.defaultContentType,f=Symbol("initialRequestMarker"),h={async*[Symbol.asyncIterator](){if(r){let u={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:i}};l.write(t,r);let o=l.flush();yield{[f]:!0,headers:u,body:o}}for await(let u of e)yield u}};return n.serialize(h,(u)=>{if(u[f])return{headers:u.headers,body:u.body};let o="";for(let d in u)if(d!=="__type"){o=d;break}let{additionalHeaders:c,body:m,eventType:y,explicitPayloadContentType:g}=this.writeEventBody(o,a,u);return{headers:{":event-type":{type:"string",value:y},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:g??i},...c},body:m}})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:r}){let n=this.marshaller,s=t.getEventStreamMember(),l=t.getMemberSchema(s).getMemberSchemas(),i=Symbol("initialResponseMarker"),f=n.deserialize(e.body,async(o)=>{let c="";for(let y in o)if(y!=="__type"){c=y;break}let m=o[c].body;if(c==="initial-response"){let y=await this.deserializer.read(t,m);return delete y[s],{[i]:!0,...y}}else if(c in l){let y=l[c];if(y.isStructSchema()){let g={},w=!1;for(let[d,U]of y.structIterator()){let{eventHeader:$,eventPayload:G}=U.getMergedTraits();if(w=w||Boolean($||G),G){if(U.isBlobSchema())g[d]=m;else if(U.isStringSchema())g[d]=(this.serdeContext?.utf8Encoder??b.toUtf8)(m);else if(U.isStructSchema())g[d]=await this.deserializer.read(U,m)}else if($){let v=o[c].headers[d]?.value;if(v!=null)if(U.isNumericSchema())if(v&&typeof v==="object"&&"bytes"in v)g[d]=BigInt(v.toString());else g[d]=Number(v);else g[d]=v}}if(w)return{[c]:g};if(m.byteLength===0)return{[c]:{}}}return{[c]:await this.deserializer.read(y,m)}}else return{$unknown:o}}),h=f[Symbol.asyncIterator](),u=await h.next();if(u.done)return f;if(u.value?.[i]){if(!t)throw Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(let o in u.value)r[o]=u.value[o]}return{async*[Symbol.asyncIterator](){if(!u?.value?.[i])yield u.value;while(!0){let{done:o,value:c}=await h.next();if(o)break;yield c}}}}writeEventBody(e,t,r){let n=this.serializer,s=e,a=null,l,i=(()=>{return t.getSchema()[4].includes(e)})(),f={};if(!i){let[o,c]=r[e];s=o,n.write(15,c)}else{let o=t.getMemberSchema(e);if(o.isStructSchema()){for(let[c,m]of o.structIterator()){let{eventHeader:y,eventPayload:g}=m.getMergedTraits();if(g)a=c;else if(y){let w=r[e][c],d="binary";if(m.isNumericSchema())if(-2147483648<=w&&w<=2147483647)d="integer";else d="long";else if(m.isTimestampSchema())d="timestamp";else if(m.isStringSchema())d="string";else if(m.isBooleanSchema())d="boolean";if(w!=null)f[c]={type:d,value:w},delete r[e][c]}}if(a!==null){let c=o.getMemberSchema(a);if(c.isBlobSchema())l="application/octet-stream";else if(c.isStringSchema())l="text/plain";n.write(c,r[e][a])}else n.write(o,r[e])}else if(o.isUnitSchema())n.write(o,{});else throw Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}let h=n.flush()??new Uint8Array;return{body:typeof h==="string"?(this.serdeContext?.utf8Decoder??b.fromUtf8)(h):h,eventType:s,explicitPayloadContentType:l,additionalHeaders:f}}}var j,b,R,L,F="boolean",X="byte",Z="short",V="integer",D="long",E="binary",_="string",Y="timestamp",ee="uuid",te,q=4,p,S=4,re,k,B,T,z,O=class{eventStreamCodec;utfEncoder;constructor({utf8Encoder:t,utf8Decoder:r}){this.eventStreamCodec=new x(t,r),this.utfEncoder=t}deserialize(t,r){let n=H(t);return new T({messageStream:new k({inputStream:n,decoder:this.eventStreamCodec}),deserializer:C(r,this.utfEncoder)})}serialize(t,r){return new B({messageStream:new z({inputStream:t,serializer:r}),encoder:this.eventStreamCodec,includeEndFrame:!0})}},ae=(e)=>new O(e),oe=(e)=>new N(e),ce=(e)=>({[Symbol.asyncIterator]:async function*(){let t=e.getReader();try{while(!0){let{done:r,value:n}=await t.read();if(r)return;yield n}}finally{t.releaseLock()}}}),le=(e)=>{let t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(r){let{done:n,value:s}=await t.next();if(n)return r.close();r.enqueue(s)}})},ue=(e)=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),fe,ye,de,me,he,ge,we,be,pe,ve,Se,Ue,Me,Ie,xe,ke,Be,Te;var ze=W(()=>{j=P(),b=Q(),R=J("stream");(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(L||(L={}));te=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,p=q*2,re=p+S*2;k=class k{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.decoder.decode(e)}};B=class B{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream)yield this.options.encoder.encode(e);if(this.options.includeEndFrame)yield new Uint8Array(0)}};T=class T{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream){let t=await this.options.deserializer(e);if(t===void 0)continue;yield t}}};z=class z{options;constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.serializer(e)}};fe=x,ye=N,de=K,me=I,he=M,ge=k,we=B,be=T,pe=z,ve=O,Se=oe,Ue=H,Me=C,Ie=ne,xe=le,ke=ce,Be=ue,Te=ae});ze();export{Te as universalEventStreamSerdeProvider,Be as resolveEventStreamSerdeConfig,ke as readableStreamToIterable,xe as iterableToReadableStream,Ie as getUnmarshalledStream,Me as getMessageUnmarshaller,Ue as getChunkedStream,Se as eventStreamSerdeProvider,ve as UniversalEventStreamMarshaller,pe as SmithyMessageEncoderStream,be as SmithyMessageDecoderStream,we as MessageEncoderStream,ge as MessageDecoderStream,he as Int64,me as HeaderMarshaller,de as EventStreamSerde,ye as EventStreamMarshaller,fe as EventStreamCodec};export default {get universalEventStreamSerdeProvider(){return Te},get resolveEventStreamSerdeConfig(){return Be},get readableStreamToIterable(){return ke},get iterableToReadableStream(){return xe},get getUnmarshalledStream(){return Ie},get getMessageUnmarshaller(){return Me},get getChunkedStream(){return Ue},get eventStreamSerdeProvider(){return Se},get UniversalEventStreamMarshaller(){return ve},get SmithyMessageEncoderStream(){return pe},get SmithyMessageDecoderStream(){return be},get MessageEncoderStream(){return we},get MessageDecoderStream(){return ge},get Int64(){return he},get HeaderMarshaller(){return me},get EventStreamSerde(){return de},get EventStreamMarshaller(){return ye},get EventStreamCodec(){return fe}};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{p as w,q as h,r as I,s as C,t as D}from"./chunk-nhwhkx62.js";import{Gd as c,Hd as k,Id as $,Ld as x}from"./chunk-7jhrxzjx.js";import"./chunk-jcjaw7tk.js";import{Pd as P}from"./chunk-9xvctnjr.js";import{Sf as d}from"./chunk-9s4whpg1.js";import{am as l}from"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import{jp as v}from"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-v0yxkq99.js";import{tu as m}from"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import{_u as b}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-4sazy0nq.js";var j={spinner:()=>x(),log:{error:(o)=>c.error(o),info:(o)=>c.info(o),success:(o)=>c.success(o)},resolve:(o)=>v(o),...h,global:b.Path.config};function S(o){if(!o||typeof o!=="object")return;if(!("cause"in o))return;return o.cause}function _(o,e=j){let n=o.mod,a=Boolean(o.force),y=Boolean(o.global);return async(f)=>{let u=e.spinner();u.start("Installing plugin package...");let p=await I(n,e);if(!p.ok){u.stop("Install failed",1),e.log.error(`Could not install "${n}"`);let t=w(p.error);if(t.detail)e.log.error(t.detail);if(t.missing)e.log.info("This package depends on a version that is not available in your npm registry."),e.log.info("Check npm registry/auth settings and try again.");return!1}u.stop("Plugin package ready");let s=e.spinner();s.start("Reading plugin manifest...");let i=await C(p.target);if(!i.ok){if(i.code==="manifest_read_failed")return s.stop("Manifest read failed",1),e.log.error(`Installed "${n}" but failed to read ${i.file}`),e.log.error(m(S(i.error)??i.error)),!1;if(i.code==="manifest_no_targets")return s.stop("No plugin targets found",1),e.log.error(`"${n}" does not expose plugin entrypoints in package.json`),e.log.info('Expected one of: exports["./tui"], exports["./server"], package.json main for server, or package.json["oc-themes"] for tui themes.'),!1;return s.stop("Manifest read failed",1),!1}s.stop(`Detected ${i.targets.map((t)=>t.kind).join(" + ")} target${i.targets.length===1?"":"s"}`);let g=e.spinner();g.start("Updating plugin config...");let r=await D({spec:n,targets:i.targets,force:a,global:y,vcs:f.vcs,worktree:f.worktree,directory:f.directory,config:e.global},e);if(!r.ok){if(r.code==="invalid_json")return g.stop(`Failed updating ${r.kind} config`,1),e.log.error(`Invalid JSON in ${r.file} (${r.parse} at line ${r.line}, column ${r.col})`),e.log.info("Fix the config file and run the command again."),!1;return g.stop("Failed updating plugin config",1),e.log.error(m(r.error)),!1}g.stop("Plugin config updated");for(let t of r.items){if(t.mode==="noop"){e.log.info(`Already configured in ${t.file}`);continue}if(t.mode==="replace"){e.log.info(`Replaced in ${t.file}`);continue}e.log.info(`Added to ${t.file}`)}return e.log.success(`Installed ${n}`),e.log.info(y?`Scope: global (${r.dir})`:`Scope: local (${r.dir})`),!0}}var R=P({command:"plugin <module>",aliases:["plug"],describe:"install plugin and update config",builder:(o)=>{return o.positional("module",{type:"string",describe:"npm module name"}).option("global",{alias:["g"],type:"boolean",default:!1,describe:"install in global config"}).option("force",{alias:["f"],type:"boolean",default:!1,describe:"replace existing plugin version"})},handler:async(o)=>{let e=String(o.module??"").trim();if(!e){d.error("module is required"),process.exitCode=1;return}d.empty(),k(`Install plugin ${e}`);let n=_({mod:e,global:Boolean(o.global),force:Boolean(o.force)}),a=!0;if(await l.provide({directory:process.cwd(),fn:async()=>{a=await n({vcs:l.project.vcs,worktree:l.worktree,directory:l.directory})}}),$("Done"),!a)process.exitCode=1}});export{_ as createPlugTask,R as PluginCommand};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Be as C}from"./chunk-wgk7ynt3.js";import{wf as A}from"./chunk-a3a1trap.js";import{_P as _}from"./chunk-3k2b05fv.js";var S=_(C(),1),p=_(A(),1),N="AWS_ACCESS_KEY_ID",a="AWS_SECRET_ACCESS_KEY",i="AWS_SESSION_TOKEN",I="AWS_CREDENTIAL_EXPIRATION",d="AWS_CREDENTIAL_SCOPE",v="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[N],r=process.env[a],n=process.env[i],s=process.env[I],t=process.env[d],E=process.env[v];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new p.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{N as le,a as me,i as ne,I as oe,d as pe,v as qe,T as re};
2
+ import{ze as C}from"./chunk-t01bhw5h.js";import{uf as A}from"./chunk-v3x5nrc4.js";import{gQ as _}from"./chunk-4sazy0nq.js";var S=_(C(),1),p=_(A(),1),N="AWS_ACCESS_KEY_ID",a="AWS_SECRET_ACCESS_KEY",i="AWS_SESSION_TOKEN",I="AWS_CREDENTIAL_EXPIRATION",d="AWS_CREDENTIAL_SCOPE",v="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[N],r=process.env[a],n=process.env[i],s=process.env[I],t=process.env[d],E=process.env[v];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new p.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{N as je,a as ke,i as le,I as me,d as ne,v as oe,T as pe};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{te as Qb}from"./chunk-6a7c7wnf.js";import{xe as Xb}from"./chunk-hj3ddt53.js";import{ye as Wb}from"./chunk-r0k21apr.js";import{Ae as Kb,Be as Lb,ze as Jb}from"./chunk-wgk7ynt3.js";import{Ce as Db}from"./chunk-41v0x1jk.js";import{uf as bb,vf as jb,wf as kb,xf as wb,yf as Bb}from"./chunk-a3a1trap.js";import"./chunk-3k2b05fv.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{re as Qb}from"./chunk-hgsykghj.js";import{ve as Xb}from"./chunk-jts0dma5.js";import{we as Wb}from"./chunk-vgaxv70x.js";import{xe as Jb,ye as Kb,ze as Lb}from"./chunk-t01bhw5h.js";import{Ae as Db}from"./chunk-8yr682pv.js";import{sf as bb,tf as jb,uf as kb,vf as wb,wf as Bb}from"./chunk-v3x5nrc4.js";import"./chunk-4sazy0nq.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};