@qitqode/qitqode-android-arm64 0.1.27 → 0.1.29

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 (399) hide show
  1. package/bundle/{chunk-1rp1cvmc.js → chunk-0626rvy2.js} +1 -1
  2. package/bundle/chunk-07c1mvy1.js +2 -0
  3. package/bundle/{chunk-h7yya9pv.js → chunk-09j71kp6.js} +3 -3
  4. package/bundle/chunk-0p7qcm51.js +2 -0
  5. package/bundle/chunk-0pmb7zzh.js +2 -0
  6. package/bundle/{chunk-wz0zcddf.js → chunk-0wdtbn59.js} +2 -2
  7. package/bundle/{chunk-nt4e3em9.js → chunk-0xm85ayc.js} +1 -1
  8. package/bundle/{chunk-0eqwm9a8.js → chunk-0yqbyres.js} +1 -1
  9. package/bundle/{chunk-r08957sm.js → chunk-11d987sj.js} +1 -1
  10. package/bundle/{chunk-dhjp0zx2.js → chunk-18vygvnc.js} +1 -1
  11. package/bundle/{chunk-v965rsr8.js → chunk-19sa03c1.js} +2 -2
  12. package/bundle/{chunk-zyhdxggp.js → chunk-1d9f53sk.js} +2 -2
  13. package/bundle/{chunk-k7gq9bra.js → chunk-1fz0383p.js} +1 -1
  14. package/bundle/{chunk-j6emx6jn.js → chunk-1rn0vmvv.js} +2 -2
  15. package/bundle/chunk-1s9ctg0d.js +2 -0
  16. package/bundle/{chunk-g7rjtehn.js → chunk-1xw68zak.js} +1 -1
  17. package/bundle/{chunk-whxjkz9a.js → chunk-20d0cd1j.js} +2 -2
  18. package/bundle/chunk-2f9fn9xr.js +2 -0
  19. package/bundle/chunk-2fhcvfyg.js +2 -0
  20. package/bundle/{chunk-2ahqhh4z.js → chunk-2hw0jzv4.js} +1 -1
  21. package/bundle/{chunk-2jmxt3fb.js → chunk-2mjc44ev.js} +1 -1
  22. package/bundle/{chunk-yhk7d1j0.js → chunk-2p2ch1k2.js} +1 -1
  23. package/bundle/{chunk-jje0srjq.js → chunk-2p9py4rw.js} +1 -1
  24. package/bundle/{chunk-j94bdaav.js → chunk-2w20mhch.js} +1 -1
  25. package/bundle/{chunk-cdhmc0t0.js → chunk-2xxefrps.js} +1 -1
  26. package/bundle/{chunk-vsjyr170.js → chunk-2ztdqtnk.js} +1 -1
  27. package/bundle/{chunk-zb0me4kk.js → chunk-31wxbws4.js} +1 -1
  28. package/bundle/{chunk-ppfjf7qx.js → chunk-3h4y7n1a.js} +1 -1
  29. package/bundle/chunk-3mfj0x4p.js +2 -0
  30. package/bundle/{chunk-2tnarng3.js → chunk-3n49y4kh.js} +1 -1
  31. package/bundle/{chunk-g1dwbvkg.js → chunk-3q6650we.js} +1 -1
  32. package/bundle/{chunk-1dwcga8g.js → chunk-3rt2k5sc.js} +1 -1
  33. package/bundle/chunk-3shnje9k.js +2 -0
  34. package/bundle/chunk-3tz1qhpt.js +2 -0
  35. package/bundle/{chunk-vfdhqf4h.js → chunk-3vmh2ge6.js} +1 -1
  36. package/bundle/{chunk-9t84mh6t.js → chunk-43ae3chd.js} +2 -2
  37. package/bundle/chunk-44jpsp97.js +2 -0
  38. package/bundle/{chunk-j5y10dn6.js → chunk-45jqjyk9.js} +1 -1
  39. package/bundle/chunk-4dtbdycg.js +2 -0
  40. package/bundle/{chunk-kfsb2stm.js → chunk-4fk4se02.js} +1 -1
  41. package/bundle/{chunk-yp0a8q29.js → chunk-4fspp5fg.js} +3 -3
  42. package/bundle/{chunk-k9b1jcqw.js → chunk-4kpvceap.js} +1 -1
  43. package/bundle/{chunk-qjjch1zt.js → chunk-4mrz9b6d.js} +2 -2
  44. package/bundle/chunk-4pz8av2y.js +2 -0
  45. package/bundle/chunk-4r4xh8a6.js +2 -0
  46. package/bundle/{chunk-t12xrrfr.js → chunk-4vemws1t.js} +2 -2
  47. package/bundle/{chunk-m612agnk.js → chunk-4vze3djr.js} +1 -1
  48. package/bundle/{chunk-w87a3mzm.js → chunk-50w28xj1.js} +1 -1
  49. package/bundle/chunk-5hpq59t1.js +2 -0
  50. package/bundle/{chunk-d6r4xwtg.js → chunk-5n4hpc4f.js} +3 -3
  51. package/bundle/chunk-5s90ehww.js +2 -0
  52. package/bundle/{chunk-nxbkh4k9.js → chunk-5z7mjwwa.js} +1 -1
  53. package/bundle/{chunk-ydp0q1hk.js → chunk-61yatzp8.js} +1 -1
  54. package/bundle/chunk-63kcg127.js +2 -0
  55. package/bundle/{chunk-b9za12y1.js → chunk-6528bthc.js} +1 -1
  56. package/bundle/{chunk-mgk9sh16.js → chunk-6bsgrr5h.js} +1 -1
  57. package/bundle/chunk-6fejrpht.js +2 -0
  58. package/bundle/{chunk-4qqkqrn9.js → chunk-6hdjkvr1.js} +2 -2
  59. package/bundle/{chunk-1t9jne14.js → chunk-6hmj972a.js} +1 -1
  60. package/bundle/{chunk-njnwdgvd.js → chunk-6jewfaqa.js} +2 -2
  61. package/bundle/{chunk-y062spw2.js → chunk-6saj1dhz.js} +1 -1
  62. package/bundle/{chunk-n8h6x2en.js → chunk-6scqd8fh.js} +1 -1
  63. package/bundle/chunk-6zzdw7q1.js +2 -0
  64. package/bundle/{chunk-dqed63ek.js → chunk-71pmrpkc.js} +1 -1
  65. package/bundle/{chunk-26nfphsg.js → chunk-74zgcxeg.js} +1 -1
  66. package/bundle/chunk-78m8rayq.js +2 -0
  67. package/bundle/{chunk-2km50rd3.js → chunk-7926bzm7.js} +1 -1
  68. package/bundle/chunk-7j6p5j2g.js +2 -0
  69. package/bundle/{chunk-apbgb4h0.js → chunk-7m8fdp5p.js} +1 -1
  70. package/bundle/{chunk-b7mg883n.js → chunk-7mc8nxve.js} +1 -1
  71. package/bundle/chunk-7tjd6ba1.js +2 -0
  72. package/bundle/{chunk-2wcv3sq5.js → chunk-7wthn44y.js} +2 -2
  73. package/bundle/{chunk-kqn9h2gk.js → chunk-81h5f8ev.js} +1 -1
  74. package/bundle/{chunk-drs1gv2b.js → chunk-88dhcv37.js} +1 -1
  75. package/bundle/{chunk-h0rpmne5.js → chunk-89f8v2y8.js} +1 -1
  76. package/bundle/{chunk-fnbpap62.js → chunk-8d2ddmf0.js} +1 -1
  77. package/bundle/chunk-8d8efdry.js +2 -0
  78. package/bundle/{chunk-a1pw9r6f.js → chunk-8f0g7d7k.js} +1 -1
  79. package/bundle/{chunk-deae0y1j.js → chunk-8jzjvmaz.js} +1 -1
  80. package/bundle/{chunk-qhc90p4a.js → chunk-8k55xz7z.js} +1 -1
  81. package/bundle/{chunk-f45tp3e3.js → chunk-8kz3n8ye.js} +1 -1
  82. package/bundle/chunk-93jxndr8.js +2 -0
  83. package/bundle/{chunk-zxaaxb99.js → chunk-94qmhz2p.js} +2 -2
  84. package/bundle/{chunk-a2qz9m10.js → chunk-95qs7wnz.js} +1 -1
  85. package/bundle/{chunk-b75gpv0q.js → chunk-97h0jx8y.js} +1 -1
  86. package/bundle/{chunk-vj62pc0h.js → chunk-98vfbn0h.js} +1 -1
  87. package/bundle/chunk-99ve54r6.js +2 -0
  88. package/bundle/{chunk-3bmzjznz.js → chunk-9atkgkaq.js} +1 -1
  89. package/bundle/{chunk-qrey2gwb.js → chunk-9epjgend.js} +2 -2
  90. package/bundle/{chunk-2dzk5txw.js → chunk-9kjj44cr.js} +1 -1
  91. package/bundle/chunk-9ksaqyb2.js +2 -0
  92. package/bundle/chunk-9p7t748e.js +2 -0
  93. package/bundle/{chunk-zrc54vc4.js → chunk-a2g69pv6.js} +1 -1
  94. package/bundle/{chunk-1bhvt33f.js → chunk-a2qerqgd.js} +1 -1
  95. package/bundle/chunk-a69jgepp.js +2 -0
  96. package/bundle/{chunk-a1p2f16h.js → chunk-a8p9aggx.js} +2 -2
  97. package/bundle/{chunk-4ypcf4tg.js → chunk-a94s0jks.js} +1 -1
  98. package/bundle/{chunk-d5bxan80.js → chunk-abtn6nec.js} +1 -1
  99. package/bundle/chunk-ar310tc3.js +2 -0
  100. package/bundle/{chunk-zcm2jdr5.js → chunk-asmfntjm.js} +1 -1
  101. package/bundle/chunk-at03h9eq.js +2 -0
  102. package/bundle/{chunk-b8tw709r.js → chunk-awav98j0.js} +1 -1
  103. package/bundle/chunk-ay9p70xx.js +2 -0
  104. package/bundle/{chunk-ab6cabxh.js → chunk-az9hsk6z.js} +1 -1
  105. package/bundle/{chunk-9j1qqdr2.js → chunk-azx0zxnx.js} +1 -1
  106. package/bundle/{chunk-ct48575c.js → chunk-b1ntb3dh.js} +1 -1
  107. package/bundle/{chunk-qjn86fc0.js → chunk-b20xjnpw.js} +1 -1
  108. package/bundle/{chunk-b0syck9r.js → chunk-b4qd109w.js} +1 -1
  109. package/bundle/chunk-b6dsv601.js +3 -0
  110. package/bundle/{chunk-knpt9n8f.js → chunk-b73s2h43.js} +1 -1
  111. package/bundle/{chunk-exh6cg1r.js → chunk-b9hstp7h.js} +1 -1
  112. package/bundle/{chunk-vg2fmyje.js → chunk-b9nwaaqs.js} +2 -2
  113. package/bundle/chunk-bajtytm5.js +2 -0
  114. package/bundle/chunk-bh8v3mfg.js +2 -0
  115. package/bundle/chunk-bn0h9dny.js +10 -0
  116. package/bundle/chunk-bp8sxnrm.js +2 -0
  117. package/bundle/{chunk-4tbwha3m.js → chunk-bsf6n350.js} +2 -2
  118. package/bundle/{chunk-xpc2zgj7.js → chunk-bv8pf0m1.js} +2 -2
  119. package/bundle/chunk-bw5e8thn.js +2 -0
  120. package/bundle/{chunk-c01z3cvg.js → chunk-bx6kyvg7.js} +1 -1
  121. package/bundle/{chunk-wsy0m70r.js → chunk-byc7ev8p.js} +1 -1
  122. package/bundle/{chunk-xrxyrr00.js → chunk-bzgj60w4.js} +1 -1
  123. package/bundle/{chunk-yq3m8190.js → chunk-bzrsnv2k.js} +2 -2
  124. package/bundle/{chunk-ecn8gbtz.js → chunk-c19t7e8s.js} +1 -1
  125. package/bundle/chunk-c8ajbhv3.js +2 -0
  126. package/bundle/{chunk-ad46r434.js → chunk-c8n72r2k.js} +3 -3
  127. package/bundle/chunk-ccddzk10.js +2 -0
  128. package/bundle/{chunk-j5kb0y1m.js → chunk-cd867geb.js} +1 -1
  129. package/bundle/chunk-ce5t444d.js +2 -0
  130. package/bundle/{chunk-3nyqh1d6.js → chunk-cev2qj7w.js} +1 -1
  131. package/bundle/{chunk-7jbz3dgt.js → chunk-cfxjwfn4.js} +1 -1
  132. package/bundle/chunk-ch8cx9jn.js +2 -0
  133. package/bundle/{chunk-7ppd2phw.js → chunk-cjfgs1x8.js} +1 -1
  134. package/bundle/chunk-cm4jtnkg.js +2 -0
  135. package/bundle/chunk-cq7j5tv5.js +2 -0
  136. package/bundle/{chunk-1sgby720.js → chunk-csdm3n24.js} +1 -1
  137. package/bundle/{chunk-wy46mbwt.js → chunk-csyw14fj.js} +1 -1
  138. package/bundle/chunk-cttqh20d.js +2 -0
  139. package/bundle/chunk-cvvfa1jf.js +2 -0
  140. package/bundle/{chunk-btz9jvec.js → chunk-d0qqgxs4.js} +1 -1
  141. package/bundle/{chunk-gsvdt4kq.js → chunk-d7t0bcvk.js} +6 -6
  142. package/bundle/{chunk-tj78jsp9.js → chunk-d86ma6zk.js} +1 -1
  143. package/bundle/{chunk-4z4p492c.js → chunk-dd3m74rc.js} +1 -1
  144. package/bundle/chunk-dfja6dj6.js +5 -0
  145. package/bundle/chunk-e3qtndrt.js +2 -0
  146. package/bundle/chunk-e8cac405.js +2 -0
  147. package/bundle/{chunk-371r2111.js → chunk-ed723mw1.js} +1 -1
  148. package/bundle/{chunk-3nwve06r.js → chunk-ef2b07fm.js} +1 -1
  149. package/bundle/{chunk-j9pcnkkq.js → chunk-ekndhwnn.js} +2 -2
  150. package/bundle/{chunk-47b084yv.js → chunk-eqcd9k9p.js} +122 -122
  151. package/bundle/chunk-ez92ah9y.js +2 -0
  152. package/bundle/{chunk-brpx707p.js → chunk-f29n7826.js} +1 -1
  153. package/bundle/chunk-fazvedgy.js +2 -0
  154. package/bundle/{chunk-eb9mytjq.js → chunk-fhdpp77n.js} +1 -1
  155. package/bundle/{chunk-04tw0r4s.js → chunk-fj7kd4gc.js} +1 -1
  156. package/bundle/{chunk-be216spx.js → chunk-fsy279s5.js} +2 -2
  157. package/bundle/{chunk-37n34pzd.js → chunk-g06rv5fq.js} +1 -1
  158. package/bundle/{chunk-pekm54ce.js → chunk-g0mbbysk.js} +1 -1
  159. package/bundle/{chunk-vn7nkrqb.js → chunk-g3ch14a1.js} +1 -1
  160. package/bundle/{chunk-ggqst87g.js → chunk-gd45tjbd.js} +1 -1
  161. package/bundle/chunk-gd5stg49.js +2 -0
  162. package/bundle/{chunk-ds69qc8b.js → chunk-geccvf9d.js} +1 -1
  163. package/bundle/{chunk-stezw26z.js → chunk-gf5pwww1.js} +1 -1
  164. package/bundle/{chunk-x067eetw.js → chunk-gjvymdhp.js} +1 -1
  165. package/bundle/chunk-gtzcm5sb.js +2 -0
  166. package/bundle/{chunk-ngchsw2g.js → chunk-h8chkene.js} +1 -1
  167. package/bundle/{chunk-m67tcnk4.js → chunk-hbtd620x.js} +1 -1
  168. package/bundle/{chunk-qt2c4bty.js → chunk-hd2kb05a.js} +1 -1
  169. package/bundle/{chunk-b3dqcbsc.js → chunk-hevb7k95.js} +1 -1
  170. package/bundle/{chunk-v2zp22r3.js → chunk-hgbkg85g.js} +1 -1
  171. package/bundle/{chunk-5fgx6fa4.js → chunk-hhgjbag9.js} +1 -1
  172. package/bundle/{chunk-12bssxd4.js → chunk-hn1f6rne.js} +2 -2
  173. package/bundle/{chunk-hj5y7fvk.js → chunk-hpfqnjfz.js} +1 -1
  174. package/bundle/chunk-j0znryc6.js +9 -0
  175. package/bundle/{chunk-09kba1hg.js → chunk-j2zay4da.js} +2 -2
  176. package/bundle/{chunk-48fvrggx.js → chunk-j5ymkhry.js} +1 -1
  177. package/bundle/{chunk-tr8sf0dk.js → chunk-jkm54mha.js} +1 -1
  178. package/bundle/{chunk-v4xcysh0.js → chunk-jntqzhxr.js} +1 -1
  179. package/bundle/{chunk-p68rwmhc.js → chunk-js9wdh67.js} +1 -1
  180. package/bundle/{chunk-m02zt1a3.js → chunk-jwtev7b7.js} +2 -2
  181. package/bundle/chunk-k095hd3c.js +2 -0
  182. package/bundle/{chunk-q1v2pytx.js → chunk-k16s2dnx.js} +1 -1
  183. package/bundle/{chunk-sermjas1.js → chunk-k20nrwbg.js} +1 -1
  184. package/bundle/{chunk-6qy1ghrx.js → chunk-k7dcfqjs.js} +1 -1
  185. package/bundle/chunk-kfgn4apg.js +2 -0
  186. package/bundle/{chunk-jm1ptn8n.js → chunk-kkae8ead.js} +1 -1
  187. package/bundle/{chunk-m1h5a4vg.js → chunk-ktqrbbkh.js} +1 -1
  188. package/bundle/{chunk-0x3sbyny.js → chunk-kw09hbrb.js} +1 -1
  189. package/bundle/chunk-kzrw6h8t.js +2 -0
  190. package/bundle/{chunk-wrw22v0a.js → chunk-m2ny1en7.js} +4 -4
  191. package/bundle/{chunk-wnqwb6fd.js → chunk-m6wceqay.js} +1 -1
  192. package/bundle/{chunk-jh6yvzee.js → chunk-ma0m6kpj.js} +1 -1
  193. package/bundle/{chunk-g3dhsmbt.js → chunk-mb4wvwfw.js} +3 -3
  194. package/bundle/chunk-mjrvj2cg.js +2 -0
  195. package/bundle/chunk-mpebdv59.js +2 -0
  196. package/bundle/chunk-n20v44zr.js +2 -0
  197. package/bundle/{chunk-17psxhve.js → chunk-n34y5gp6.js} +2 -2
  198. package/bundle/{chunk-27yxgy03.js → chunk-n3t52cz2.js} +1 -1
  199. package/bundle/{chunk-szr0f7k2.js → chunk-n4gjpgnk.js} +1 -1
  200. package/bundle/{chunk-5qam3c8r.js → chunk-n5sh2790.js} +1 -1
  201. package/bundle/{chunk-5fz8tph5.js → chunk-n86s4fw4.js} +1 -1
  202. package/bundle/{chunk-6hv59ere.js → chunk-ndmrg80b.js} +1 -1
  203. package/bundle/{chunk-cpmmvwgw.js → chunk-nfzmvy30.js} +1 -1
  204. package/bundle/chunk-nksathh4.js +2 -0
  205. package/bundle/{chunk-yjtdgcq5.js → chunk-nv2r4cns.js} +1 -1
  206. package/bundle/{chunk-xs3xtz6x.js → chunk-nxn4arcf.js} +1 -1
  207. package/bundle/{chunk-m2ekhbdp.js → chunk-p5360c2q.js} +1 -1
  208. package/bundle/{chunk-1qshjfzm.js → chunk-p7h2qd7z.js} +1 -1
  209. package/bundle/{chunk-2rs39vj2.js → chunk-pg8dz1rq.js} +1 -1
  210. package/bundle/{chunk-vkskqhag.js → chunk-pq2prhb2.js} +1 -1
  211. package/bundle/{chunk-scnz207s.js → chunk-ps6jk326.js} +1 -1
  212. package/bundle/{chunk-gm85xefs.js → chunk-pycjksh4.js} +1 -1
  213. package/bundle/{chunk-gf0pdgjs.js → chunk-q0xzbad1.js} +1 -1
  214. package/bundle/chunk-q14890p6.js +2 -0
  215. package/bundle/chunk-q4n02cwv.js +2 -0
  216. package/bundle/{chunk-m2x9xhha.js → chunk-q5363rr9.js} +2 -2
  217. package/bundle/chunk-q7s17j1b.js +2 -0
  218. package/bundle/{chunk-msegx0t7.js → chunk-qje3683x.js} +1 -1
  219. package/bundle/{chunk-y2v09y71.js → chunk-qk9vccja.js} +1 -1
  220. package/bundle/chunk-qm07wesh.js +2 -0
  221. package/bundle/{chunk-chmrvbbj.js → chunk-qredfmch.js} +1 -1
  222. package/bundle/chunk-qrrg9v3d.js +2 -0
  223. package/bundle/{chunk-c0796v8j.js → chunk-qsszerj7.js} +2 -2
  224. package/bundle/chunk-qtsmgjk7.js +2 -0
  225. package/bundle/{chunk-dfnv7vkn.js → chunk-qzcfjz9g.js} +1 -1
  226. package/bundle/{chunk-bss414qz.js → chunk-qzjpea91.js} +1 -1
  227. package/bundle/{chunk-ksyh6h3a.js → chunk-r4mnbhe1.js} +1 -1
  228. package/bundle/chunk-rdqgss38.js +2 -0
  229. package/bundle/{chunk-mdck9s88.js → chunk-rf524gez.js} +1 -1
  230. package/bundle/{chunk-2q96x1t5.js → chunk-rptvpa1v.js} +1 -1
  231. package/bundle/{chunk-z8g819cz.js → chunk-rqgcz2zr.js} +1 -1
  232. package/bundle/{chunk-dzxzcb2e.js → chunk-rs1698xs.js} +1 -1
  233. package/bundle/chunk-rzc528ym.js +2 -0
  234. package/bundle/{chunk-xc5044tm.js → chunk-s1sepxdp.js} +1 -1
  235. package/bundle/{chunk-ak5ngp50.js → chunk-s2za1n7h.js} +2 -2
  236. package/bundle/{chunk-c5e6sk9c.js → chunk-s6me101a.js} +1 -1
  237. package/bundle/chunk-sbv96mj0.js +3 -0
  238. package/bundle/{chunk-qt1wffbh.js → chunk-sbx9z70j.js} +1 -1
  239. package/bundle/{chunk-crx18k6g.js → chunk-scqxmv8k.js} +1 -1
  240. package/bundle/{chunk-dq9kpj4a.js → chunk-sv48x9h8.js} +1 -1
  241. package/bundle/{chunk-q6ztpfcs.js → chunk-svrxk3vf.js} +2 -2
  242. package/bundle/{chunk-snm5q21k.js → chunk-t299e2aw.js} +2 -2
  243. package/bundle/{chunk-nzehfpxp.js → chunk-t35n89t9.js} +1 -1
  244. package/bundle/{chunk-fddsgvjy.js → chunk-t3q7qakr.js} +1 -1
  245. package/bundle/{chunk-mk6cddvd.js → chunk-t3tkp1em.js} +1 -1
  246. package/bundle/chunk-tge53d52.js +3 -0
  247. package/bundle/chunk-th78zcds.js +2 -0
  248. package/bundle/{chunk-5a5t01ka.js → chunk-thk93j3e.js} +1 -1
  249. package/bundle/{chunk-xck0sq3k.js → chunk-tj00kzk4.js} +1 -1
  250. package/bundle/chunk-tqsx2m1j.js +2 -0
  251. package/bundle/{chunk-b2z0kjss.js → chunk-tsb9g1nz.js} +1 -1
  252. package/bundle/chunk-tv26mwx5.js +2 -0
  253. package/bundle/{chunk-fkgv2hqd.js → chunk-v00cptj6.js} +1 -1
  254. package/bundle/chunk-v69n6mef.js +2 -0
  255. package/bundle/{chunk-7yrhe3xq.js → chunk-v7deh7aj.js} +1 -1
  256. package/bundle/{chunk-cvwa142e.js → chunk-v9bmpndq.js} +1 -1
  257. package/bundle/{chunk-xn2ds2s4.js → chunk-v9xnk9pz.js} +1 -1
  258. package/bundle/chunk-vegwb3t0.js +2 -0
  259. package/bundle/chunk-w9seyn69.js +2 -0
  260. package/bundle/chunk-wanf4se3.js +2 -0
  261. package/bundle/chunk-wdhzmk1b.js +2 -0
  262. package/bundle/{chunk-14n6rvh2.js → chunk-wnwesaap.js} +1 -1
  263. package/bundle/chunk-wxqtda70.js +2 -0
  264. package/bundle/chunk-wzb6s9rk.js +2 -0
  265. package/bundle/chunk-x0dg9rg6.js +2 -0
  266. package/bundle/{chunk-mskwkcgj.js → chunk-x6nbck7p.js} +1 -1
  267. package/bundle/chunk-xd3xc1vv.js +3 -0
  268. package/bundle/{chunk-89q1y7tc.js → chunk-xhncwg5v.js} +1 -1
  269. package/bundle/{chunk-jg7s9rqz.js → chunk-xk1nh1ay.js} +2 -2
  270. package/bundle/{chunk-qv2s39dv.js → chunk-xk7je9y8.js} +1 -1
  271. package/bundle/chunk-xmnzrzbs.js +2 -0
  272. package/bundle/{chunk-1fbeendk.js → chunk-xn5v8wgh.js} +1 -1
  273. package/bundle/{chunk-s07j8hfy.js → chunk-xn61fgrh.js} +1 -1
  274. package/bundle/chunk-xzf62kc6.js +2 -0
  275. package/bundle/{chunk-s3yna2wm.js → chunk-y212x7ws.js} +1 -1
  276. package/bundle/{chunk-6nbzdb0r.js → chunk-yaj9ywvz.js} +1 -1
  277. package/bundle/{chunk-463f9wre.js → chunk-yj73ehjd.js} +1 -1
  278. package/bundle/{chunk-aztre27e.js → chunk-yjj4cvqg.js} +1 -1
  279. package/bundle/{chunk-kavhpdvb.js → chunk-yk8kk25c.js} +1 -1
  280. package/bundle/{chunk-cafzcmrg.js → chunk-yn05n0az.js} +2 -2
  281. package/bundle/{chunk-89v6dgpp.js → chunk-yn576pje.js} +2 -2
  282. package/bundle/chunk-yned6vmd.js +3 -0
  283. package/bundle/{chunk-cvdxgsq1.js → chunk-yp3dj4wh.js} +1 -1
  284. package/bundle/{chunk-bvkq0a5q.js → chunk-ypthfv6d.js} +1 -1
  285. package/bundle/chunk-yra49yga.js +2 -0
  286. package/bundle/{chunk-srh4xvsj.js → chunk-yt2k9ga8.js} +1 -1
  287. package/bundle/chunk-ytye0p7f.js +2 -0
  288. package/bundle/chunk-yv2mxxbq.js +2 -0
  289. package/bundle/{chunk-phxrg7aw.js → chunk-yvqbewmc.js} +2 -2
  290. package/bundle/{chunk-h9pvnp5c.js → chunk-yyqrbv2f.js} +1 -1
  291. package/bundle/{chunk-2vepzgek.js → chunk-z160s5p5.js} +1 -1
  292. package/bundle/{chunk-baet4zev.js → chunk-z29fwg61.js} +1 -1
  293. package/bundle/chunk-z2fqqer0.js +2 -0
  294. package/bundle/chunk-z3qanc8m.js +2 -0
  295. package/bundle/{chunk-jnabd9gn.js → chunk-z44m19vm.js} +1 -1
  296. package/bundle/{chunk-yfkvjphe.js → chunk-z4nay2ef.js} +1 -1
  297. package/bundle/{chunk-2bn4b42t.js → chunk-z5yrvg40.js} +1 -1
  298. package/bundle/{chunk-61c62e5s.js → chunk-zasd8cz8.js} +1 -1
  299. package/bundle/{chunk-ztc3gm8y.js → chunk-zbq60sw6.js} +1 -1
  300. package/bundle/chunk-zcagdtab.js +2 -0
  301. package/bundle/chunk-zervk6c5.js +2 -0
  302. package/bundle/{chunk-va316nee.js → chunk-zfd70p01.js} +1 -1
  303. package/bundle/{chunk-pget15wc.js → chunk-zqjp7jdd.js} +1 -1
  304. package/bundle/{chunk-6fp8a9ek.js → chunk-zqxmr01r.js} +1 -1
  305. package/bundle/index.js +3 -3
  306. package/bundle/parser.worker.js +2 -2
  307. package/bundle/worker.js +1 -1
  308. package/package.json +1 -1
  309. package/bundle/chunk-02y04bsz.js +0 -2
  310. package/bundle/chunk-07ws99b1.js +0 -2
  311. package/bundle/chunk-09c4ngag.js +0 -2
  312. package/bundle/chunk-0jgst767.js +0 -2
  313. package/bundle/chunk-0psrr9vp.js +0 -2
  314. package/bundle/chunk-0srrmwqs.js +0 -2
  315. package/bundle/chunk-0zkejr6k.js +0 -2
  316. package/bundle/chunk-1fja3j80.js +0 -2
  317. package/bundle/chunk-1j73cnvz.js +0 -2
  318. package/bundle/chunk-1yddn03z.js +0 -2
  319. package/bundle/chunk-38g8yzw0.js +0 -2
  320. package/bundle/chunk-3bkd0ar3.js +0 -2
  321. package/bundle/chunk-3c7d3dqt.js +0 -3
  322. package/bundle/chunk-4amgp4yd.js +0 -3
  323. package/bundle/chunk-4k7kbhps.js +0 -2
  324. package/bundle/chunk-4sz3jbc5.js +0 -2
  325. package/bundle/chunk-55b9699f.js +0 -2
  326. package/bundle/chunk-6d9wsjxm.js +0 -2
  327. package/bundle/chunk-6gz9cthq.js +0 -2
  328. package/bundle/chunk-6q87abbr.js +0 -2
  329. package/bundle/chunk-730a2d1k.js +0 -2
  330. package/bundle/chunk-7bd0x9vf.js +0 -2
  331. package/bundle/chunk-7czkntef.js +0 -2
  332. package/bundle/chunk-7ex57nyh.js +0 -2
  333. package/bundle/chunk-7gpczxbh.js +0 -2
  334. package/bundle/chunk-7j0bgeh2.js +0 -2
  335. package/bundle/chunk-7py443fe.js +0 -2
  336. package/bundle/chunk-8cdm8gh2.js +0 -2
  337. package/bundle/chunk-90q5sae0.js +0 -2
  338. package/bundle/chunk-90zd5rss.js +0 -5
  339. package/bundle/chunk-9grvepmd.js +0 -2
  340. package/bundle/chunk-9hrh15p2.js +0 -2
  341. package/bundle/chunk-av6ezvxm.js +0 -2
  342. package/bundle/chunk-beksar7w.js +0 -2
  343. package/bundle/chunk-bg66rqrx.js +0 -2
  344. package/bundle/chunk-btneef3z.js +0 -2
  345. package/bundle/chunk-c7yy1km8.js +0 -2
  346. package/bundle/chunk-ct6dv8st.js +0 -2
  347. package/bundle/chunk-cy9s1ma5.js +0 -2
  348. package/bundle/chunk-dtv1vp0d.js +0 -2
  349. package/bundle/chunk-dvk2wwjj.js +0 -2
  350. package/bundle/chunk-e0jy9qxd.js +0 -2
  351. package/bundle/chunk-erg0ske8.js +0 -2
  352. package/bundle/chunk-ew51rwdp.js +0 -9
  353. package/bundle/chunk-f72pppr7.js +0 -2
  354. package/bundle/chunk-fff3151r.js +0 -2
  355. package/bundle/chunk-gbyy8sh5.js +0 -2
  356. package/bundle/chunk-gk34kh8p.js +0 -2
  357. package/bundle/chunk-gn50xqbd.js +0 -2
  358. package/bundle/chunk-h7s2w1e2.js +0 -2
  359. package/bundle/chunk-hgxdg1y5.js +0 -2
  360. package/bundle/chunk-hmv2cdnz.js +0 -2
  361. package/bundle/chunk-ht81ensf.js +0 -2
  362. package/bundle/chunk-j59ktwny.js +0 -2
  363. package/bundle/chunk-jh3nw7fd.js +0 -2
  364. package/bundle/chunk-jmz2mq3t.js +0 -2
  365. package/bundle/chunk-k309zez0.js +0 -3
  366. package/bundle/chunk-k3fn3yed.js +0 -2
  367. package/bundle/chunk-kpw6nghv.js +0 -2
  368. package/bundle/chunk-m5ghbt5y.js +0 -2
  369. package/bundle/chunk-m8yv4sd2.js +0 -3
  370. package/bundle/chunk-mn41f9qv.js +0 -2
  371. package/bundle/chunk-mqjf9sbm.js +0 -2
  372. package/bundle/chunk-n5gwrrbb.js +0 -2
  373. package/bundle/chunk-nfjhem1c.js +0 -2
  374. package/bundle/chunk-nj4d554m.js +0 -11
  375. package/bundle/chunk-nx90tvwg.js +0 -2
  376. package/bundle/chunk-nxyyn2ra.js +0 -2
  377. package/bundle/chunk-p5tceb4k.js +0 -2
  378. package/bundle/chunk-qjgm3e2p.js +0 -2
  379. package/bundle/chunk-r1616dce.js +0 -2
  380. package/bundle/chunk-sbyey0qb.js +0 -2
  381. package/bundle/chunk-sj5v361q.js +0 -2
  382. package/bundle/chunk-smtvgr3w.js +0 -2
  383. package/bundle/chunk-tpndnprb.js +0 -2
  384. package/bundle/chunk-vwxfgea7.js +0 -2
  385. package/bundle/chunk-w0kgcz1t.js +0 -2
  386. package/bundle/chunk-wajmd3r7.js +0 -2
  387. package/bundle/chunk-wksczmes.js +0 -2
  388. package/bundle/chunk-wsxta33r.js +0 -2
  389. package/bundle/chunk-xjyhtm8r.js +0 -2
  390. package/bundle/chunk-xxbqhg9n.js +0 -3
  391. package/bundle/chunk-y9p87bfd.js +0 -2
  392. package/bundle/chunk-ygc5qegv.js +0 -2
  393. package/bundle/chunk-yhwx62yf.js +0 -2
  394. package/bundle/chunk-yjqmzm51.js +0 -2
  395. package/bundle/chunk-z4z8hk7e.js +0 -2
  396. package/bundle/chunk-z7y9pdj7.js +0 -2
  397. package/bundle/chunk-zqv7fx25.js +0 -2
  398. package/bundle/chunk-zs2a1f20.js +0 -2
  399. package/bundle/chunk-zt1nbwmm.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Fq as A,Kq as O3,_q as l,ar as k,br as O,fr as s,gr as S,ir as c,jr as u,kr as i,or as I3,pq as T,wq as m}from"./chunk-yq3m8190.js";import{Dr as y,rr as q3,wr as v}from"./chunk-btz9jvec.js";import"./chunk-cqtkxwd8.js";import"./chunk-fkgv2hqd.js";import{qv as j}from"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-aztre27e.js";function h(Q){switch(Q.type){case"text":case"error-text":return Q.value;case"execution-denied":return Q.reason??"Tool execution denied.";case"content":case"json":case"error-json":return JSON.stringify(Q.value)}}function C(Q){return Q?.providerOptions?.copilot??{}}function Z3(Q){let G=[];for(let{role:W,content:N,...q}of Q){let L=C({...q});switch(W){case"system":{G.push({role:"system",content:N,...L});break}case"user":{if(N.length===1&&N[0].type==="text"){G.push({role:"user",content:N[0].text,...C(N[0])});break}G.push({role:"user",content:N.map((Z)=>{let Y=C(Z);switch(Z.type){case"text":return{type:"text",text:Z.text,...Y};case"file":if(Z.mediaType.startsWith("image/")){let $=Z.mediaType==="image/*"?"image/jpeg":Z.mediaType;return{type:"image_url",image_url:{url:Z.data instanceof URL?Z.data.toString():`data:${$};base64,${m(Z.data)}`},...Y}}else throw new y({functionality:`file part media type ${Z.mediaType}`})}}),...L});break}case"assistant":{let Z="",Y,$,J=[];for(let E of N){let _=C(E),X=E.providerOptions?.copilot?.reasoningOpaque;if(X&&!$)$=X;switch(E.type){case"text":{Z+=E.text;break}case"reasoning":{if(E.text)Y=E.text;break}case"tool-call":{J.push({id:E.toolCallId,type:"function",function:{name:E.toolName,arguments:JSON.stringify(E.input)},..._});break}}}G.push({role:"assistant",content:Z||null,tool_calls:J.length>0?J:void 0,reasoning_text:$?Y:void 0,reasoning_opaque:$,...L});break}case"tool":{for(let Z of N){if(Z.type==="tool-approval-response")continue;let Y=Z.output,$=C(Z);G.push({role:"tool",tool_call_id:Z.toolCallId,content:h(Y),...$})}break}default:throw Error(`Unsupported role: ${W}`)}}return G}function n({id:Q,model:G,created:W}){return{id:Q??void 0,modelId:G??void 0,timestamp:W!=null?new Date(W*1000):void 0}}function r(Q){switch(Q){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var g=j.object({user:j.string().optional(),reasoningEffort:j.string().optional(),textVerbosity:j.string().optional(),thinking_budget:j.number().optional()});var t=j.object({error:j.object({message:j.string(),type:j.string().nullish(),param:j.any().nullish(),code:j.union([j.string(),j.number()]).nullish()})}),$3={errorSchema:t,errorToMessage:(Q)=>Q.error.message};function d(Q){return new TransformStream({start(G){G.enqueue({type:"stream-start",warnings:Q.warnings})},transform(G,W){if(Q.includeRawChunks)W.enqueue({type:"raw",rawValue:G.rawValue});if(!G.success){Q.onParseError(),W.enqueue({type:"error",error:G.error});return}Q.transformValue(G.value,W,G.rawValue)},flush:Q.flush})}function E3({tools:Q,toolChoice:G}){Q=Q?.length?Q:void 0;let W=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:W};let N=[];for(let L of Q)if(L.type==="provider")W.push({type:"unsupported",feature:`tool type: ${L.type}`});else N.push({type:"function",function:{name:L.name,description:L.description,parameters:L.inputSchema}});if(G==null)return{tools:N,toolChoice:void 0,toolWarnings:W};let q=G.type;switch(q){case"auto":case"none":case"required":return{tools:N,toolChoice:q,toolWarnings:W};case"tool":return{tools:N,toolChoice:{type:"function",function:{name:G.toolName}},toolWarnings:W};default:throw new y({functionality:`tool choice type: ${q}`})}}class a{specificationVersion="v3";supportsStructuredOutputs;modelId;config;failedResponseHandler;chunkSchema;constructor(Q,G){this.modelId=Q,this.config=G;let W=G.errorStructure??$3;this.chunkSchema=h3(W.errorSchema),this.failedResponseHandler=c(W),this.supportsStructuredOutputs=G.supportsStructuredOutputs??!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){return this.config.supportedUrls?.()??{}}async getArgs({prompt:Q,maxOutputTokens:G,temperature:W,topP:N,topK:q,frequencyPenalty:L,presencePenalty:Z,providerOptions:Y,stopSequences:$,responseFormat:J,seed:E,toolChoice:_,tools:X}){let K=[],B=Object.assign(await k({provider:"copilot",providerOptions:Y,schema:g})??{},await k({provider:this.providerOptionsName,providerOptions:Y,schema:g})??{});if(q!=null)K.push({type:"unsupported",feature:"topK"});if(J?.type==="json"&&J.schema!=null&&!this.supportsStructuredOutputs)K.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:U,toolChoice:M,toolWarnings:V}=E3({tools:X,toolChoice:_});return{args:{model:this.modelId,user:B.user,max_tokens:G,temperature:W,top_p:N,frequency_penalty:L,presence_penalty:Z,response_format:J?.type==="json"?this.supportsStructuredOutputs===!0&&J.schema!=null?{type:"json_schema",json_schema:{schema:J.schema,name:J.name??"response",description:J.description}}:{type:"json_object"}:void 0,stop:$,seed:E,...Object.fromEntries(Object.entries(Y?.[this.providerOptionsName]??{}).filter(([H])=>!Object.keys(g.shape).includes(H))),reasoning_effort:B.reasoningEffort,verbosity:B.textVerbosity,messages:Z3(Q),tools:U,tool_choice:M,thinking_budget:B.thinking_budget},warnings:[...K,...V]}}async doGenerate(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N=JSON.stringify(G),{responseHeaders:q,value:L,rawValue:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:i(m3),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=L.choices[0],$=[],J=Y.message.content;if(J!=null&&J.length>0)$.push({type:"text",text:J,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let E=Y.message.reasoning_text;if(E!=null&&E.length>0)$.push({type:"reasoning",text:E,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});if(Y.message.tool_calls!=null)for(let K of Y.message.tool_calls)$.push({type:"tool-call",toolCallId:K.id??A(),toolName:K.function.name,input:K.function.arguments,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let _={[this.providerOptionsName]:{},...await this.config.metadataExtractor?.extractMetadata?.({parsedBody:Z})},X=L.usage?.completion_tokens_details;if(X?.accepted_prediction_tokens!=null)_[this.providerOptionsName].acceptedPredictionTokens=X?.accepted_prediction_tokens;if(X?.rejected_prediction_tokens!=null)_[this.providerOptionsName].rejectedPredictionTokens=X?.rejected_prediction_tokens;return{content:$,finishReason:{unified:r(Y.finish_reason),raw:Y.finish_reason??void 0},usage:{inputTokens:{total:L.usage?.prompt_tokens??void 0,noCache:void 0,cacheRead:L.usage?.prompt_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:L.usage?.completion_tokens??void 0,text:void 0,reasoning:L.usage?.completion_tokens_details?.reasoning_tokens??void 0},raw:L.usage??void 0},providerMetadata:_,request:{body:N},response:{...n(L),headers:q,body:Z},warnings:W}}async doStream(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N={...G,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},q=this.config.metadataExtractor?.createStreamExtractor(),{responseHeaders:L,value:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:N,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:u(this.chunkSchema),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=[],$={unified:"other",raw:void 0},J={completionTokens:void 0,completionTokensDetails:{reasoningTokens:void 0,acceptedPredictionTokens:void 0,rejectedPredictionTokens:void 0},promptTokens:void 0,promptTokensDetails:{cachedTokens:void 0},totalTokens:void 0},E=!0,_=this.providerOptionsName,X=!1,K=!1,B,U=(M,V)=>{V.enqueue({type:"tool-input-end",id:M.id}),V.enqueue({type:"tool-call",toolCallId:M.id??A(),toolName:M.function.name,input:M.function.arguments,providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),M.hasFinished=!0};return{stream:Z.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{$={unified:"error",raw:void 0}},transformValue:(M,V,H)=>{if(q?.processChunk(H),"error"in M){$={unified:"error",raw:void 0},V.enqueue({type:"error",error:M.error.message});return}if(E)E=!1,V.enqueue({type:"response-metadata",...n(M)});if(M.usage!=null){let{prompt_tokens:P,completion_tokens:b,total_tokens:f,prompt_tokens_details:R,completion_tokens_details:w}=M.usage;if(J.promptTokens=P??void 0,J.completionTokens=b??void 0,J.totalTokens=f??void 0,w?.reasoning_tokens!=null)J.completionTokensDetails.reasoningTokens=w?.reasoning_tokens;if(w?.accepted_prediction_tokens!=null)J.completionTokensDetails.acceptedPredictionTokens=w?.accepted_prediction_tokens;if(w?.rejected_prediction_tokens!=null)J.completionTokensDetails.rejectedPredictionTokens=w?.rejected_prediction_tokens;if(R?.cached_tokens!=null)J.promptTokensDetails.cachedTokens=R?.cached_tokens}let D=M.choices[0];if(D?.finish_reason!=null)$={unified:r(D.finish_reason),raw:D.finish_reason??void 0};if(D?.delta==null)return;let x=D.delta;if(x.reasoning_opaque){if(B!=null)throw new v({data:x,message:"Multiple reasoning_opaque values received in a single response. Only one thinking part per response is supported."});B=x.reasoning_opaque}let z=x.reasoning_text;if(z){if(!X)V.enqueue({type:"reasoning-start",id:"reasoning-0"}),X=!0;V.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:z})}if(x.content){if(X&&!K)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;if(!K)V.enqueue({type:"text-start",id:"txt-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),K=!0;V.enqueue({type:"text-delta",id:"txt-0",delta:x.content})}if(x.tool_calls!=null){if(X)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;for(let P of x.tool_calls){let b=P.index;if(Y[b]==null){if(P.id==null)throw new v({data:P,message:"Expected 'id' to be a string."});if(P.function?.name==null)throw new v({data:P,message:"Expected 'function.name' to be a string."});V.enqueue({type:"tool-input-start",id:P.id,toolName:P.function.name}),Y[b]={id:P.id,type:"function",function:{name:P.function.name,arguments:P.function.arguments??""},hasFinished:!1};let R=Y[b];if(R.function?.name!=null&&R.function?.arguments!=null){if(R.function.arguments.length>0)V.enqueue({type:"tool-input-delta",id:R.id,delta:R.function.arguments});if(l(R.function.arguments))U(R,V)}continue}let f=Y[b];if(f.hasFinished)continue;if(P.function?.arguments!=null)f.function.arguments+=P.function?.arguments??"";if(V.enqueue({type:"tool-input-delta",id:f.id,delta:P.function.arguments??""}),f.function?.name!=null&&f.function?.arguments!=null&&l(f.function.arguments))U(f,V)}}},flush:(M)=>{if(X)M.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0});if(K)M.enqueue({type:"text-end",id:"txt-0"});for(let H of Y.filter((D)=>!D.hasFinished))M.enqueue({type:"tool-input-end",id:H.id}),M.enqueue({type:"tool-call",toolCallId:H.id??A(),toolName:H.function.name,input:H.function.arguments});let V={[_]:{},...B?{copilot:{reasoningOpaque:B}}:{},...q?.buildMetadata()};if(J.completionTokensDetails.acceptedPredictionTokens!=null)V[_].acceptedPredictionTokens=J.completionTokensDetails.acceptedPredictionTokens;if(J.completionTokensDetails.rejectedPredictionTokens!=null)V[_].rejectedPredictionTokens=J.completionTokensDetails.rejectedPredictionTokens;M.enqueue({type:"finish",finishReason:$,usage:{inputTokens:{total:J.promptTokens,noCache:J.promptTokens!=null&&J.promptTokensDetails.cachedTokens!=null?J.promptTokens-J.promptTokensDetails.cachedTokens:void 0,cacheRead:J.promptTokensDetails.cachedTokens,cacheWrite:void 0},outputTokens:{total:J.completionTokens,text:void 0,reasoning:J.completionTokensDetails.reasoningTokens},raw:{prompt_tokens:J.promptTokens??null,completion_tokens:J.completionTokens??null,total_tokens:J.totalTokens??null}},providerMetadata:V})}})),request:{body:N},response:{headers:L}}}}var G3=j.object({prompt_tokens:j.number().nullish(),completion_tokens:j.number().nullish(),total_tokens:j.number().nullish(),prompt_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),completion_tokens_details:j.object({reasoning_tokens:j.number().nullish(),accepted_prediction_tokens:j.number().nullish(),rejected_prediction_tokens:j.number().nullish()}).nullish()}).nullish(),m3=j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({message:j.object({role:j.literal("assistant").nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({id:j.string().nullish(),function:j.object({name:j.string(),arguments:j.string()})})).nullish()}),finish_reason:j.string().nullish()})),usage:G3}),h3=(Q)=>j.union([j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({delta:j.object({role:j.enum(["assistant"]).nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({index:j.number(),id:j.string().nullish(),function:j.object({name:j.string().nullish(),arguments:j.string().nullish()})})).nullish()}).nullish(),finish_reason:j.string().nullish()})),usage:G3}),Q]);var g3=t,e=c({errorSchema:g3,errorToMessage:(Q)=>Q.error.message});var o=j.object({action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeoutMs:j.number().optional(),user:j.string().optional(),workingDirectory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),j3=j.object({output:j.string()}),o0=S({id:"openai.local_shell",inputSchema:o,outputSchema:j3});function J3(Q,G){if(!G)return!1;return G.some((W)=>Q.startsWith(W))}async function K3({prompt:Q,systemMessageMode:G,fileIdPrefixes:W,store:N,hasLocalShellTool:q=!1}){let L=[],Z=[],Y=new Set;for(let{role:$,content:J}of Q)switch($){case"system":{switch(G){case"system":{L.push({role:"system",content:J});break}case"developer":{L.push({role:"developer",content:J});break}case"remove":{Z.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${G}`)}break}case"user":{L.push({role:"user",content:J.map((E,_)=>{switch(E.type){case"text":return{type:"input_text",text:E.text};case"file":if(E.mediaType.startsWith("image/")){let X=E.mediaType==="image/*"?"image/jpeg":E.mediaType;return{type:"input_image",...E.data instanceof URL?{image_url:E.data.toString()}:typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{image_url:`data:${X};base64,${m(E.data)}`},detail:E.providerOptions?.openai?.imageDetail}}else if(E.mediaType==="application/pdf"){if(E.data instanceof URL)return{type:"input_file",file_url:E.data.toString()};return{type:"input_file",...typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{filename:E.filename??`part-${_}.pdf`,file_data:`data:application/pdf;base64,${m(E.data)}`}}}else throw new y({functionality:`file part media type ${E.mediaType}`})}})});break}case"assistant":{let E={},_={};for(let X of J)switch(X.type){case"text":{L.push({role:"assistant",content:[{type:"output_text",text:X.text}],id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-call":{if(_[X.toolCallId]=X,X.providerExecuted)break;if(q&&X.toolName==="local_shell"){let K=o.parse(X.input);L.push({type:"local_shell_call",call_id:X.toolCallId,id:X.providerOptions?.openai?.itemId??void 0,action:{type:"exec",command:K.action.command,timeout_ms:K.action.timeoutMs,user:K.action.user,working_directory:K.action.workingDirectory,env:K.action.env}});break}L.push({type:"function_call",call_id:X.toolCallId,name:X.toolName,arguments:JSON.stringify(X.input),id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-result":{if(N)L.push({type:"item_reference",id:X.toolCallId});else Z.push({type:"other",message:`Results for OpenAI tool ${X.toolName} are not sent to the API when store is false`});break}case"reasoning":{let K=await k({provider:"copilot",providerOptions:X.providerOptions,schema:d3}),B=K?.itemId;if(B!=null){let U=E[B];if(N){if(U===void 0)L.push({type:"item_reference",id:B}),E[B]={type:"reasoning",id:B,summary:[]}}else{let M=[];if(X.text.length>0)M.push({type:"summary_text",text:X.text});else if(U!==void 0)Z.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(X)}.`});if(U===void 0)E[B]={type:"reasoning",id:B,encrypted_content:K?.reasoningEncryptedContent,summary:M},L.push(E[B]);else U.summary.push(...M)}}else Z.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(X)}.`});break}}break}case"tool":{for(let E of J){if(E.type==="tool-approval-response"){if(Y.has(E.approvalId))continue;if(Y.add(E.approvalId),N)L.push({type:"item_reference",id:E.approvalId});L.push({type:"mcp_approval_response",approval_request_id:E.approvalId,approve:E.approved});continue}let _=E.output;if(_.type==="execution-denied"){if(_.providerOptions?.openai?.approvalId)continue}if(q&&E.toolName==="local_shell"&&_.type==="json"){L.push({type:"local_shell_call_output",call_id:E.toolCallId,output:j3.parse(_.value).output});break}L.push({type:"function_call_output",call_id:E.toolCallId,output:h(_)})}break}default:throw Error(`Unsupported role: ${$}`)}return{input:L,warnings:Z}}var d3=j.object({itemId:j.string().nullish(),reasoningEncryptedContent:j.string().nullish()});function V3({finishReason:Q,hasFunctionCall:G}){switch(Q){case void 0:case null:return G?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return G?"tool-calls":"other"}}var v3=j.object({code:j.string().nullish(),containerId:j.string()}),c3=j.object({outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullish()}),H3=j.object({container:j.union([j.string(),j.object({fileIds:j.array(j.string()).optional()})]).optional()}),Kj=S({id:"openai.code_interpreter",inputSchema:v3,outputSchema:c3});var B3=j.object({key:j.string(),type:j.enum(["eq","ne","gt","gte","lt","lte"]),value:j.union([j.string(),j.number(),j.boolean()])}),L3=j.object({type:j.enum(["and","or"]),filters:j.array(j.union([B3,j.lazy(()=>L3)]))}),U3=j.object({vectorStoreIds:j.array(j.string()),maxNumResults:j.number().optional(),ranking:j.object({ranker:j.string().optional(),scoreThreshold:j.number().optional()}).optional(),filters:j.union([B3,L3]).optional()}),u3=j.object({queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),fileId:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullable()}),Uj=S({id:"openai.file_search",inputSchema:j.object({}),outputSchema:u3});var I=j.discriminatedUnion("type",[j.object({type:j.literal("search"),query:j.string().nullish()}),j.object({type:j.literal("open_page"),url:j.string()}),j.object({type:j.literal("find"),url:j.string(),pattern:j.string()})]),p=j.object({type:j.literal("approximate"),country:j.string().optional(),city:j.string().optional(),region:j.string().optional(),timezone:j.string().optional()});var N3=j.object({filters:j.object({allowedDomains:j.array(j.string()).optional()}).optional(),searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Pj=s({id:"openai.web_search",inputSchema:j.object({action:I.nullish()})});var D3=j.object({searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Aj=s({id:"openai.web_search_preview",inputSchema:j.object({action:I.nullish()})});var W3=j.object({background:j.enum(["auto","opaque","transparent"]).optional(),inputFidelity:j.enum(["low","high"]).optional(),inputImageMask:j.object({fileId:j.string().optional(),imageUrl:j.string().optional()}).optional(),model:j.string().optional(),moderation:j.enum(["auto"]).optional(),outputCompression:j.number().int().min(0).max(100).optional(),outputFormat:j.enum(["png","jpeg","webp"]).optional(),partialImages:j.number().int().min(0).max(3).optional(),quality:j.enum(["auto","low","medium","high"]).optional(),size:j.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict(),i3=j.object({result:j.string()}),Sj=S({id:"openai.image_generation",inputSchema:j.object({}),outputSchema:i3});function _3({tools:Q,toolChoice:G,strictJsonSchema:W}){Q=Q?.length?Q:void 0;let N=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:N};let q=[];for(let Z of Q)switch(Z.type){case"function":q.push({type:"function",name:Z.name,description:Z.description,parameters:Z.inputSchema,strict:W});break;case"provider":{switch(Z.id){case"openai.file_search":{let Y=U3.parse(Z.args);q.push({type:"file_search",vector_store_ids:Y.vectorStoreIds,max_num_results:Y.maxNumResults,ranking_options:Y.ranking?{ranker:Y.ranking.ranker,score_threshold:Y.ranking.scoreThreshold}:void 0,filters:Y.filters});break}case"openai.local_shell":{q.push({type:"local_shell"});break}case"openai.web_search_preview":{let Y=D3.parse(Z.args);q.push({type:"web_search_preview",search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.web_search":{let Y=N3.parse(Z.args);q.push({type:"web_search",filters:Y.filters!=null?{allowed_domains:Y.filters.allowedDomains}:void 0,search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.code_interpreter":{let Y=H3.parse(Z.args);q.push({type:"code_interpreter",container:Y.container==null?{type:"auto",file_ids:void 0}:typeof Y.container==="string"?Y.container:{type:"auto",file_ids:Y.container.fileIds}});break}case"openai.image_generation":{let Y=W3.parse(Z.args);q.push({type:"image_generation",background:Y.background,input_fidelity:Y.inputFidelity,input_image_mask:Y.inputImageMask?{file_id:Y.inputImageMask.fileId,image_url:Y.inputImageMask.imageUrl}:void 0,model:Y.model,moderation:Y.moderation,partial_images:Y.partialImages,quality:Y.quality,output_compression:Y.outputCompression,output_format:Y.outputFormat,size:Y.size});break}}break}default:N.push({type:"unsupported",feature:"tool type"});break}if(G==null)return{tools:q,toolChoice:void 0,toolWarnings:N};let L=G.type;switch(L){case"auto":case"none":case"required":return{tools:q,toolChoice:L,toolWarnings:N};case"tool":return{tools:q,toolChoice:G.toolName==="code_interpreter"||G.toolName==="file_search"||G.toolName==="image_generation"||G.toolName==="web_search_preview"||G.toolName==="web_search"?{type:G.toolName}:{type:"function",name:G.toolName},toolWarnings:N};default:throw new y({functionality:`tool choice type: ${L}`})}}var M3=j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:I.nullish()}),P3=j.object({type:j.literal("file_search_call"),id:j.string(),queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),file_id:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullish()}),Q3=j.object({type:j.literal("code_interpreter_call"),id:j.string(),code:j.string().nullable(),container_id:j.string(),outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullable()}),f3=j.object({type:j.literal("local_shell_call"),id:j.string(),call_id:j.string(),action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeout_ms:j.number().optional(),user:j.string().optional(),working_directory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),x3=j.object({type:j.literal("image_generation_call"),id:j.string(),result:j.string()}),R3=j.object({type:j.literal("file_citation"),file_id:j.string(),filename:j.string().nullish(),index:j.number().nullish(),start_index:j.number().nullish(),end_index:j.number().nullish(),quote:j.string().nullish()}),b3=j.object({type:j.literal("message"),id:j.string()}),A3=j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish()}),w3=j.object({type:j.literal("function_call"),id:j.string(),call_id:j.string(),name:j.string(),arguments:j.string()}),F3=20,y3=j.array(j.object({token:j.string(),logprob:j.number(),top_logprobs:j.array(j.object({token:j.string(),logprob:j.number()}))}));class X3{specificationVersion="v3";modelId;config;constructor(Q,G){this.modelId=Q,this.config=G}supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]};get provider(){return this.config.provider}async getArgs({maxOutputTokens:Q,temperature:G,stopSequences:W,topP:N,topK:q,presencePenalty:L,frequencyPenalty:Z,seed:Y,prompt:$,providerOptions:J,tools:E,toolChoice:_,responseFormat:X}){let K=[],B=_0(this.modelId);if(q!=null)K.push({type:"unsupported",feature:"topK"});if(Y!=null)K.push({type:"unsupported",feature:"seed"});if(L!=null)K.push({type:"unsupported",feature:"presencePenalty"});if(Z!=null)K.push({type:"unsupported",feature:"frequencyPenalty"});if(W!=null)K.push({type:"unsupported",feature:"stopSequences"});let U=await k({provider:"copilot",providerOptions:J,schema:q0}),{input:M,warnings:V}=await K3({prompt:$,systemMessageMode:B.systemMessageMode,fileIdPrefixes:this.config.fileIdPrefixes,store:U?.store??!0,hasLocalShellTool:z("openai.local_shell")});K.push(...V);let H=U?.strictJsonSchema??!1,D=U?.include;function x(F){D=D!=null?[...D,F]:[F]}function z(F){return E?.find((Y3)=>Y3.type==="provider"&&Y3.id===F)!=null}let P=typeof U?.logprobs==="number"?U?.logprobs:U?.logprobs===!0?F3:void 0;if(P)x("message.output_text.logprobs");let b=E?.find((F)=>F.type==="provider"&&(F.id==="openai.web_search"||F.id==="openai.web_search_preview"))?.name;if(b)x("web_search_call.action.sources");if(z("openai.code_interpreter"))x("code_interpreter_call.outputs");let f={model:this.modelId,input:M,temperature:G,top_p:N,max_output_tokens:Q,...(X?.type==="json"||U?.textVerbosity)&&{text:{...X?.type==="json"&&{format:X.schema!=null?{type:"json_schema",strict:H,name:X.name??"response",description:X.description,schema:X.schema}:{type:"json_object"}},...U?.textVerbosity&&{verbosity:U.textVerbosity}}},max_tool_calls:U?.maxToolCalls,metadata:U?.metadata,parallel_tool_calls:U?.parallelToolCalls,previous_response_id:U?.previousResponseId,store:U?.store,user:U?.user,instructions:U?.instructions,service_tier:U?.serviceTier,include:D,prompt_cache_key:U?.promptCacheKey,safety_identifier:U?.safetyIdentifier,top_logprobs:P,...B.isReasoningModel&&(U?.reasoningEffort!=null||U?.reasoningSummary!=null)&&{reasoning:{...U?.reasoningEffort!=null&&{effort:U.reasoningEffort},...U?.reasoningSummary!=null&&{summary:U.reasoningSummary}}},...B.requiredAutoTruncation&&{truncation:"auto"}};if(B.isReasoningModel){if(f.temperature!=null)f.temperature=void 0,K.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(f.top_p!=null)f.top_p=void 0,K.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})}else{if(U?.reasoningEffort!=null)K.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if(U?.reasoningSummary!=null)K.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if(U?.serviceTier==="flex"&&!B.supportsFlexProcessing)K.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),f.service_tier=void 0;if(U?.serviceTier==="priority"&&!B.supportsPriorityProcessing)K.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),f.service_tier=void 0;let{tools:R,toolChoice:w,toolWarnings:C3}=_3({tools:E,toolChoice:_,strictJsonSchema:H});return{webSearchToolName:b,args:{...f,tools:R,tool_choice:w},warnings:[...K,...C3]}}async doGenerate(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),q=this.config.url({path:"/responses",modelId:this.modelId}),{responseHeaders:L,value:Z,rawValue:Y}=await O({url:q,headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:e,successfulResponseHandler:i(j.object({id:j.string(),created_at:j.number(),error:j.object({code:j.string(),message:j.string()}).nullish(),model:j.string(),output:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("message"),role:j.literal("assistant"),id:j.string(),content:j.array(j.object({type:j.literal("output_text"),text:j.string(),logprobs:y3.nullish(),annotations:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),start_index:j.number(),end_index:j.number(),url:j.string(),title:j.string()}),R3,j.object({type:j.literal("container_file_citation")})]))}))}),M3,P3,Q3,x3,f3,j.object({type:j.literal("function_call"),call_id:j.string(),name:j.string(),arguments:j.string(),id:j.string()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string().optional()}),j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish(),summary:j.array(j.object({type:j.literal("summary_text"),text:j.string()}))})])),service_tier:j.string().nullish(),incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3})),abortSignal:Q.abortSignal,fetch:this.config.fetch});if(Z.error)throw new q3({message:Z.error.message,url:q,requestBodyValues:G,statusCode:400,responseHeaders:L,responseBody:Y,isRetryable:!1});let $=[],J=[],E=!1;for(let X of Z.output)switch(X.type){case"reasoning":{if(X.summary.length===0)X.summary.push({type:"summary_text",text:""});for(let K of X.summary)$.push({type:"reasoning",text:K.text,providerMetadata:{openai:{itemId:X.id,reasoningEncryptedContent:X.encrypted_content??null}}});break}case"image_generation_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"image_generation",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"image_generation",result:{result:X.result}});break}case"local_shell_call":{$.push({type:"tool-call",toolCallId:X.call_id,toolName:"local_shell",input:JSON.stringify({action:X.action}),providerMetadata:{openai:{itemId:X.id}}});break}case"message":{for(let K of X.content){if(Q.providerOptions?.openai?.logprobs&&K.logprobs)J.push(K.logprobs);$.push({type:"text",text:K.text,providerMetadata:{openai:{itemId:X.id}}});for(let B of K.annotations)if(B.type==="url_citation")$.push({type:"source",sourceType:"url",id:this.config.generateId?.()??A(),url:B.url,title:B.title});else if(B.type==="file_citation")$.push({type:"source",sourceType:"document",id:this.config.generateId?.()??A(),mediaType:"text/plain",title:B.quote??B.filename??"Document",filename:B.filename??B.file_id})}break}case"function_call":{E=!0,$.push({type:"tool-call",toolCallId:X.call_id,toolName:X.name,input:X.arguments,providerMetadata:{openai:{itemId:X.id}}});break}case"web_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:N??"web_search",input:JSON.stringify({action:X.action}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:N??"web_search",result:{status:X.status}});break}case"computer_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"computer_use",input:"",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:X.status||"completed"}});break}case"file_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"file_search",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"file_search",result:{queries:X.queries,results:X.results?.map((K)=>({attributes:K.attributes,fileId:K.file_id,filename:K.filename,score:K.score,text:K.text}))??null}});break}case"code_interpreter_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"code_interpreter",input:JSON.stringify({code:X.code,containerId:X.container_id}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"code_interpreter",result:{outputs:X.outputs}});break}}let _={openai:{responseId:Z.id}};if(J.length>0)_.openai.logprobs=J;if(typeof Z.service_tier==="string")_.openai.serviceTier=Z.service_tier;return{content:$,finishReason:{unified:V3({finishReason:Z.incomplete_details?.reason,hasFunctionCall:E}),raw:Z.incomplete_details?.reason},usage:{inputTokens:{total:Z.usage.input_tokens,noCache:Z.usage.input_tokens_details?.cached_tokens!=null?Z.usage.input_tokens-Z.usage.input_tokens_details.cached_tokens:void 0,cacheRead:Z.usage.input_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:Z.usage.output_tokens,text:void 0,reasoning:Z.usage.output_tokens_details?.reasoning_tokens??void 0},raw:Z.usage},request:{body:G},response:{id:Z.id,timestamp:new Date(Z.created_at*1000),modelId:Z.model,headers:L,body:Y},providerMetadata:_,warnings:W}}async doStream(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),{responseHeaders:q,value:L}=await O({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:{...G,stream:!0},failedResponseHandler:e,successfulResponseHandler:u(Y0),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Z=this,Y={unified:"other",raw:void 0},$={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0},J=[],E=null,_={},X=!1,K={},B=null,U=null,M;return{stream:L.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{Y={unified:"error",raw:void 0}},transformValue:(V,H)=>{if(T3(V)){if(V.item.type==="function_call")_[V.output_index]={toolName:V.item.name,toolCallId:V.item.call_id},H.enqueue({type:"tool-input-start",id:V.item.call_id,toolName:V.item.name});else if(V.item.type==="web_search_call")_[V.output_index]={toolName:N??"web_search",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:N??"web_search"});else if(V.item.type==="computer_call")_[V.output_index]={toolName:"computer_use",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"computer_use"});else if(V.item.type==="code_interpreter_call")_[V.output_index]={toolName:"code_interpreter",toolCallId:V.item.id,codeInterpreter:{containerId:V.item.container_id}},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"code_interpreter"}),H.enqueue({type:"tool-input-delta",id:V.item.id,delta:`{"containerId":"${V.item.container_id}","code":"`});else if(V.item.type==="file_search_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"file_search",input:"{}",providerExecuted:!0});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"image_generation",input:"{}",providerExecuted:!0});else if(V.item.type==="message")U=V.item.id,H.enqueue({type:"text-start",id:V.item.id,providerMetadata:{openai:{itemId:V.item.id}}});else if(L0(V))K[V.output_index]={canonicalId:V.item.id,encryptedContent:V.item.encrypted_content,summaryParts:[0]},B=V.output_index,H.enqueue({type:"reasoning-start",id:`${V.item.id}:0`,providerMetadata:{openai:{itemId:V.item.id,reasoningEncryptedContent:V.item.encrypted_content??null}}})}else if(k3(V)){if(V.item.type==="function_call")_[V.output_index]=void 0,X=!0,H.enqueue({type:"tool-input-end",id:V.item.call_id}),H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:V.item.name,input:V.item.arguments,providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="web_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"web_search",input:JSON.stringify({action:V.item.action}),providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"web_search",result:{status:V.item.status}});else if(V.item.type==="computer_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"computer_use",input:"",providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:V.item.status||"completed"}});else if(V.item.type==="file_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"file_search",result:{queries:V.item.queries,results:V.item.results?.map((D)=>({attributes:D.attributes,fileId:D.file_id,filename:D.filename,score:D.score,text:D.text}))??null}});else if(V.item.type==="code_interpreter_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"code_interpreter",result:{outputs:V.item.outputs}});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"image_generation",result:{result:V.item.result}});else if(V.item.type==="local_shell_call")_[V.output_index]=void 0,H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:"local_shell",input:JSON.stringify({action:{type:"exec",command:V.item.action.command,timeoutMs:V.item.action.timeout_ms,user:V.item.action.user,workingDirectory:V.item.action.working_directory,env:V.item.action.env}}),providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="message"){if(U)H.enqueue({type:"text-end",id:U}),U=null}else if($0(V)){let D=K[V.output_index];if(D){for(let x of D.summaryParts)H.enqueue({type:"reasoning-end",id:`${D.canonicalId}:${x}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:V.item.encrypted_content??null}}});if(delete K[V.output_index],B===V.output_index)B=null}}}else if(J0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:V.delta})}else if(K0(V))H.enqueue({type:"tool-result",toolCallId:V.item_id,toolName:"image_generation",result:{result:V.partial_image_b64}});else if(H0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:JSON.stringify(V.delta).slice(1,-1)})}else if(B0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:'"}'}),H.enqueue({type:"tool-input-end",id:D.toolCallId}),H.enqueue({type:"tool-call",toolCallId:D.toolCallId,toolName:"code_interpreter",input:JSON.stringify({code:V.code,containerId:D.codeInterpreter.containerId}),providerExecuted:!0})}else if(G0(V))E=V.response.id,H.enqueue({type:"response-metadata",id:V.response.id,timestamp:new Date(V.response.created_at*1000),modelId:V.response.model});else if(Z0(V)){if(!U)U=V.item_id,H.enqueue({type:"text-start",id:U,providerMetadata:{openai:{itemId:V.item_id}}});if(H.enqueue({type:"text-delta",id:U,delta:V.delta}),Q.providerOptions?.openai?.logprobs&&V.logprobs)J.push(V.logprobs)}else if(N0(V)){let D=B!==null?K[B]:null;if(D&&V.summary_index>0)D.summaryParts.push(V.summary_index),H.enqueue({type:"reasoning-start",id:`${D.canonicalId}:${V.summary_index}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:D.encryptedContent??null}}})}else if(D0(V)){let D=B!==null?K[B]:null;if(D)H.enqueue({type:"reasoning-delta",id:`${D.canonicalId}:${V.summary_index}`,delta:V.delta,providerMetadata:{openai:{itemId:D.canonicalId}}})}else if(E0(V)){if(Y={unified:V3({finishReason:V.response.incomplete_details?.reason,hasFunctionCall:X}),raw:V.response.incomplete_details?.reason??void 0},$.inputTokens=V.response.usage.input_tokens,$.outputTokens=V.response.usage.output_tokens,$.totalTokens=V.response.usage.input_tokens+V.response.usage.output_tokens,$.reasoningTokens=V.response.usage.output_tokens_details?.reasoning_tokens??void 0,$.cachedInputTokens=V.response.usage.input_tokens_details?.cached_tokens??void 0,typeof V.response.service_tier==="string")M=V.response.service_tier}else if(U0(V)){if(V.annotation.type==="url_citation")H.enqueue({type:"source",sourceType:"url",id:Z.config.generateId?.()??A(),url:V.annotation.url,title:V.annotation.title});else if(V.annotation.type==="file_citation")H.enqueue({type:"source",sourceType:"document",id:Z.config.generateId?.()??A(),mediaType:"text/plain",title:V.annotation.quote??V.annotation.filename??"Document",filename:V.annotation.filename??V.annotation.file_id})}else if(W0(V))H.enqueue({type:"error",error:V})},flush:(V)=>{if(U)V.enqueue({type:"text-end",id:U}),U=null;let H={openai:{responseId:E}};if(J.length>0)H.openai.logprobs=J;if(M!==void 0)H.openai.serviceTier=M;V.enqueue({type:"finish",finishReason:Y,usage:{inputTokens:{total:$.inputTokens,noCache:$.inputTokens!=null&&$.cachedInputTokens!=null?$.inputTokens-$.cachedInputTokens:void 0,cacheRead:$.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:$.outputTokens,text:void 0,reasoning:$.reasoningTokens},raw:{input_tokens:$.inputTokens,output_tokens:$.outputTokens,total_tokens:$.totalTokens}},providerMetadata:H})}})),request:{body:G},response:{headers:q}}}}var S3=j.object({input_tokens:j.number(),input_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),output_tokens:j.number(),output_tokens_details:j.object({reasoning_tokens:j.number().nullish()}).nullish()}),p3=j.object({type:j.literal("response.output_text.delta"),item_id:j.string(),delta:j.string(),logprobs:y3.nullish()}),s3=j.object({type:j.literal("error"),code:j.string(),message:j.string(),param:j.string().nullish(),sequence_number:j.number()}),n3=j.object({type:j.enum(["response.completed","response.incomplete"]),response:j.object({incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3,service_tier:j.string().nullish()})}),r3=j.object({type:j.literal("response.created"),response:j.object({id:j.string(),created_at:j.number(),model:j.string(),service_tier:j.string().nullish()})}),t3=j.object({type:j.literal("response.output_item.added"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3,j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:j.object({type:j.literal("search"),query:j.string().optional()}).nullish()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string()}),j.object({type:j.literal("file_search_call"),id:j.string()}),j.object({type:j.literal("image_generation_call"),id:j.string()}),Q3.extend({status:j.string()})])}),l3=j.object({type:j.literal("response.output_item.done"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3.extend({status:j.literal("completed")}),Q3,x3,M3,P3,f3,j.object({type:j.literal("computer_call"),id:j.string(),status:j.literal("completed")})])}),a3=j.object({type:j.literal("response.function_call_arguments.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),e3=j.object({type:j.literal("response.image_generation_call.partial_image"),item_id:j.string(),output_index:j.number(),partial_image_b64:j.string()}),o3=j.object({type:j.literal("response.code_interpreter_call_code.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),j0=j.object({type:j.literal("response.code_interpreter_call_code.done"),item_id:j.string(),output_index:j.number(),code:j.string()}),V0=j.object({type:j.literal("response.output_text.annotation.added"),annotation:j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),url:j.string(),title:j.string()}),R3])}),Q0=j.object({type:j.literal("response.reasoning_summary_part.added"),item_id:j.string(),summary_index:j.number()}),X0=j.object({type:j.literal("response.reasoning_summary_text.delta"),item_id:j.string(),summary_index:j.number(),delta:j.string()}),Y0=j.union([p3,n3,r3,t3,l3,a3,e3,o3,j0,V0,Q0,X0,s3,j.object({type:j.string()}).loose()]);function Z0(Q){return Q.type==="response.output_text.delta"}function k3(Q){return Q.type==="response.output_item.done"}function $0(Q){return k3(Q)&&Q.item.type==="reasoning"}function E0(Q){return Q.type==="response.completed"||Q.type==="response.incomplete"}function G0(Q){return Q.type==="response.created"}function J0(Q){return Q.type==="response.function_call_arguments.delta"}function K0(Q){return Q.type==="response.image_generation_call.partial_image"}function H0(Q){return Q.type==="response.code_interpreter_call_code.delta"}function B0(Q){return Q.type==="response.code_interpreter_call_code.done"}function T3(Q){return Q.type==="response.output_item.added"}function L0(Q){return T3(Q)&&Q.item.type==="reasoning"}function U0(Q){return Q.type==="response.output_text.annotation.added"}function N0(Q){return Q.type==="response.reasoning_summary_part.added"}function D0(Q){return Q.type==="response.reasoning_summary_text.delta"}function W0(Q){return Q.type==="error"}function _0(Q){let G=Q.startsWith("o3")||Q.startsWith("o4-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-chat"),W=Q.startsWith("gpt-4")||Q.startsWith("gpt-5-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-nano")&&!Q.startsWith("gpt-5-chat")||Q.startsWith("o3")||Q.startsWith("o4-mini"),N={requiredAutoTruncation:!1,systemMessageMode:"system",supportsFlexProcessing:G,supportsPriorityProcessing:W};if(Q.startsWith("gpt-5-chat"))return{...N,isReasoningModel:!1};if(Q.startsWith("o")||Q.startsWith("gpt-5")||Q.startsWith("codex-")||Q.startsWith("computer-use")){if(Q.startsWith("o1-mini")||Q.startsWith("o1-preview"))return{...N,isReasoningModel:!0,systemMessageMode:"remove"};return{...N,isReasoningModel:!0,systemMessageMode:"developer"}}return{...N,isReasoningModel:!1}}var q0=j.object({include:j.array(j.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:j.string().nullish(),logprobs:j.union([j.boolean(),j.number().min(1).max(F3)]).optional(),maxToolCalls:j.number().nullish(),metadata:j.any().nullish(),parallelToolCalls:j.boolean().nullish(),previousResponseId:j.string().nullish(),promptCacheKey:j.string().nullish(),reasoningEffort:j.string().nullish(),reasoningSummary:j.string().nullish(),safetyIdentifier:j.string().nullish(),serviceTier:j.enum(["auto","flex","priority"]).nullish(),store:j.boolean().nullish(),strictJsonSchema:j.boolean().nullish(),textVerbosity:j.enum(["low","medium","high"]).nullish(),user:j.string().nullish()});var M0="0.1.0";function z3(Q={}){let G=I3(Q.baseURL??"https://api.openai.com/v1");if(!G)throw Error("baseURL is required");let W={...Q.apiKey&&{Authorization:`Bearer ${Q.apiKey}`},...Q.headers},N=()=>O3(W,`ai-sdk/openai-compatible/${M0}`),q=($)=>{return new a($,{provider:`${Q.name??"openai-compatible"}.chat`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},L=($)=>{return new X3($,{provider:`${Q.name??"openai-compatible"}.responses`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},Z=($)=>q($),Y=function($){return q($)};return Y.languageModel=Z,Y.chat=q,Y.responses=L,Y}var P0=z3();export{P0 as openaiCompatible,z3 as createOpenaiCompatible};
2
+ import{Bp as l,Dp as k,Ep as O,Ip as s,Jp as S,Lp as c,Mp as u,Np as i,Rp as I3,So as T,Zo as m,gp as A,lp as O3}from"./chunk-bzrsnv2k.js";import{Up as q3,Zp as v,eq as y}from"./chunk-d0qqgxs4.js";import"./chunk-cqtkxwd8.js";import"./chunk-v00cptj6.js";import{Tt as j}from"./chunk-j2zay4da.js";import"./chunk-4vemws1t.js";import"./chunk-yjj4cvqg.js";function h(Q){switch(Q.type){case"text":case"error-text":return Q.value;case"execution-denied":return Q.reason??"Tool execution denied.";case"content":case"json":case"error-json":return JSON.stringify(Q.value)}}function C(Q){return Q?.providerOptions?.copilot??{}}function Z3(Q){let G=[];for(let{role:W,content:N,...q}of Q){let L=C({...q});switch(W){case"system":{G.push({role:"system",content:N,...L});break}case"user":{if(N.length===1&&N[0].type==="text"){G.push({role:"user",content:N[0].text,...C(N[0])});break}G.push({role:"user",content:N.map((Z)=>{let Y=C(Z);switch(Z.type){case"text":return{type:"text",text:Z.text,...Y};case"file":if(Z.mediaType.startsWith("image/")){let $=Z.mediaType==="image/*"?"image/jpeg":Z.mediaType;return{type:"image_url",image_url:{url:Z.data instanceof URL?Z.data.toString():`data:${$};base64,${m(Z.data)}`},...Y}}else throw new y({functionality:`file part media type ${Z.mediaType}`})}}),...L});break}case"assistant":{let Z="",Y,$,J=[];for(let E of N){let _=C(E),X=E.providerOptions?.copilot?.reasoningOpaque;if(X&&!$)$=X;switch(E.type){case"text":{Z+=E.text;break}case"reasoning":{if(E.text)Y=E.text;break}case"tool-call":{J.push({id:E.toolCallId,type:"function",function:{name:E.toolName,arguments:JSON.stringify(E.input)},..._});break}}}G.push({role:"assistant",content:Z||null,tool_calls:J.length>0?J:void 0,reasoning_text:$?Y:void 0,reasoning_opaque:$,...L});break}case"tool":{for(let Z of N){if(Z.type==="tool-approval-response")continue;let Y=Z.output,$=C(Z);G.push({role:"tool",tool_call_id:Z.toolCallId,content:h(Y),...$})}break}default:throw Error(`Unsupported role: ${W}`)}}return G}function n({id:Q,model:G,created:W}){return{id:Q??void 0,modelId:G??void 0,timestamp:W!=null?new Date(W*1000):void 0}}function r(Q){switch(Q){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var g=j.object({user:j.string().optional(),reasoningEffort:j.string().optional(),textVerbosity:j.string().optional(),thinking_budget:j.number().optional()});var t=j.object({error:j.object({message:j.string(),type:j.string().nullish(),param:j.any().nullish(),code:j.union([j.string(),j.number()]).nullish()})}),$3={errorSchema:t,errorToMessage:(Q)=>Q.error.message};function d(Q){return new TransformStream({start(G){G.enqueue({type:"stream-start",warnings:Q.warnings})},transform(G,W){if(Q.includeRawChunks)W.enqueue({type:"raw",rawValue:G.rawValue});if(!G.success){Q.onParseError(),W.enqueue({type:"error",error:G.error});return}Q.transformValue(G.value,W,G.rawValue)},flush:Q.flush})}function E3({tools:Q,toolChoice:G}){Q=Q?.length?Q:void 0;let W=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:W};let N=[];for(let L of Q)if(L.type==="provider")W.push({type:"unsupported",feature:`tool type: ${L.type}`});else N.push({type:"function",function:{name:L.name,description:L.description,parameters:L.inputSchema}});if(G==null)return{tools:N,toolChoice:void 0,toolWarnings:W};let q=G.type;switch(q){case"auto":case"none":case"required":return{tools:N,toolChoice:q,toolWarnings:W};case"tool":return{tools:N,toolChoice:{type:"function",function:{name:G.toolName}},toolWarnings:W};default:throw new y({functionality:`tool choice type: ${q}`})}}class a{specificationVersion="v3";supportsStructuredOutputs;modelId;config;failedResponseHandler;chunkSchema;constructor(Q,G){this.modelId=Q,this.config=G;let W=G.errorStructure??$3;this.chunkSchema=h3(W.errorSchema),this.failedResponseHandler=c(W),this.supportsStructuredOutputs=G.supportsStructuredOutputs??!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){return this.config.supportedUrls?.()??{}}async getArgs({prompt:Q,maxOutputTokens:G,temperature:W,topP:N,topK:q,frequencyPenalty:L,presencePenalty:Z,providerOptions:Y,stopSequences:$,responseFormat:J,seed:E,toolChoice:_,tools:X}){let K=[],B=Object.assign(await k({provider:"copilot",providerOptions:Y,schema:g})??{},await k({provider:this.providerOptionsName,providerOptions:Y,schema:g})??{});if(q!=null)K.push({type:"unsupported",feature:"topK"});if(J?.type==="json"&&J.schema!=null&&!this.supportsStructuredOutputs)K.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:U,toolChoice:M,toolWarnings:V}=E3({tools:X,toolChoice:_});return{args:{model:this.modelId,user:B.user,max_tokens:G,temperature:W,top_p:N,frequency_penalty:L,presence_penalty:Z,response_format:J?.type==="json"?this.supportsStructuredOutputs===!0&&J.schema!=null?{type:"json_schema",json_schema:{schema:J.schema,name:J.name??"response",description:J.description}}:{type:"json_object"}:void 0,stop:$,seed:E,...Object.fromEntries(Object.entries(Y?.[this.providerOptionsName]??{}).filter(([H])=>!Object.keys(g.shape).includes(H))),reasoning_effort:B.reasoningEffort,verbosity:B.textVerbosity,messages:Z3(Q),tools:U,tool_choice:M,thinking_budget:B.thinking_budget},warnings:[...K,...V]}}async doGenerate(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N=JSON.stringify(G),{responseHeaders:q,value:L,rawValue:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:i(m3),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=L.choices[0],$=[],J=Y.message.content;if(J!=null&&J.length>0)$.push({type:"text",text:J,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let E=Y.message.reasoning_text;if(E!=null&&E.length>0)$.push({type:"reasoning",text:E,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});if(Y.message.tool_calls!=null)for(let K of Y.message.tool_calls)$.push({type:"tool-call",toolCallId:K.id??A(),toolName:K.function.name,input:K.function.arguments,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let _={[this.providerOptionsName]:{},...await this.config.metadataExtractor?.extractMetadata?.({parsedBody:Z})},X=L.usage?.completion_tokens_details;if(X?.accepted_prediction_tokens!=null)_[this.providerOptionsName].acceptedPredictionTokens=X?.accepted_prediction_tokens;if(X?.rejected_prediction_tokens!=null)_[this.providerOptionsName].rejectedPredictionTokens=X?.rejected_prediction_tokens;return{content:$,finishReason:{unified:r(Y.finish_reason),raw:Y.finish_reason??void 0},usage:{inputTokens:{total:L.usage?.prompt_tokens??void 0,noCache:void 0,cacheRead:L.usage?.prompt_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:L.usage?.completion_tokens??void 0,text:void 0,reasoning:L.usage?.completion_tokens_details?.reasoning_tokens??void 0},raw:L.usage??void 0},providerMetadata:_,request:{body:N},response:{...n(L),headers:q,body:Z},warnings:W}}async doStream(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N={...G,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},q=this.config.metadataExtractor?.createStreamExtractor(),{responseHeaders:L,value:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:N,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:u(this.chunkSchema),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=[],$={unified:"other",raw:void 0},J={completionTokens:void 0,completionTokensDetails:{reasoningTokens:void 0,acceptedPredictionTokens:void 0,rejectedPredictionTokens:void 0},promptTokens:void 0,promptTokensDetails:{cachedTokens:void 0},totalTokens:void 0},E=!0,_=this.providerOptionsName,X=!1,K=!1,B,U=(M,V)=>{V.enqueue({type:"tool-input-end",id:M.id}),V.enqueue({type:"tool-call",toolCallId:M.id??A(),toolName:M.function.name,input:M.function.arguments,providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),M.hasFinished=!0};return{stream:Z.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{$={unified:"error",raw:void 0}},transformValue:(M,V,H)=>{if(q?.processChunk(H),"error"in M){$={unified:"error",raw:void 0},V.enqueue({type:"error",error:M.error.message});return}if(E)E=!1,V.enqueue({type:"response-metadata",...n(M)});if(M.usage!=null){let{prompt_tokens:P,completion_tokens:b,total_tokens:f,prompt_tokens_details:R,completion_tokens_details:w}=M.usage;if(J.promptTokens=P??void 0,J.completionTokens=b??void 0,J.totalTokens=f??void 0,w?.reasoning_tokens!=null)J.completionTokensDetails.reasoningTokens=w?.reasoning_tokens;if(w?.accepted_prediction_tokens!=null)J.completionTokensDetails.acceptedPredictionTokens=w?.accepted_prediction_tokens;if(w?.rejected_prediction_tokens!=null)J.completionTokensDetails.rejectedPredictionTokens=w?.rejected_prediction_tokens;if(R?.cached_tokens!=null)J.promptTokensDetails.cachedTokens=R?.cached_tokens}let D=M.choices[0];if(D?.finish_reason!=null)$={unified:r(D.finish_reason),raw:D.finish_reason??void 0};if(D?.delta==null)return;let x=D.delta;if(x.reasoning_opaque){if(B!=null)throw new v({data:x,message:"Multiple reasoning_opaque values received in a single response. Only one thinking part per response is supported."});B=x.reasoning_opaque}let z=x.reasoning_text;if(z){if(!X)V.enqueue({type:"reasoning-start",id:"reasoning-0"}),X=!0;V.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:z})}if(x.content){if(X&&!K)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;if(!K)V.enqueue({type:"text-start",id:"txt-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),K=!0;V.enqueue({type:"text-delta",id:"txt-0",delta:x.content})}if(x.tool_calls!=null){if(X)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;for(let P of x.tool_calls){let b=P.index;if(Y[b]==null){if(P.id==null)throw new v({data:P,message:"Expected 'id' to be a string."});if(P.function?.name==null)throw new v({data:P,message:"Expected 'function.name' to be a string."});V.enqueue({type:"tool-input-start",id:P.id,toolName:P.function.name}),Y[b]={id:P.id,type:"function",function:{name:P.function.name,arguments:P.function.arguments??""},hasFinished:!1};let R=Y[b];if(R.function?.name!=null&&R.function?.arguments!=null){if(R.function.arguments.length>0)V.enqueue({type:"tool-input-delta",id:R.id,delta:R.function.arguments});if(l(R.function.arguments))U(R,V)}continue}let f=Y[b];if(f.hasFinished)continue;if(P.function?.arguments!=null)f.function.arguments+=P.function?.arguments??"";if(V.enqueue({type:"tool-input-delta",id:f.id,delta:P.function.arguments??""}),f.function?.name!=null&&f.function?.arguments!=null&&l(f.function.arguments))U(f,V)}}},flush:(M)=>{if(X)M.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0});if(K)M.enqueue({type:"text-end",id:"txt-0"});for(let H of Y.filter((D)=>!D.hasFinished))M.enqueue({type:"tool-input-end",id:H.id}),M.enqueue({type:"tool-call",toolCallId:H.id??A(),toolName:H.function.name,input:H.function.arguments});let V={[_]:{},...B?{copilot:{reasoningOpaque:B}}:{},...q?.buildMetadata()};if(J.completionTokensDetails.acceptedPredictionTokens!=null)V[_].acceptedPredictionTokens=J.completionTokensDetails.acceptedPredictionTokens;if(J.completionTokensDetails.rejectedPredictionTokens!=null)V[_].rejectedPredictionTokens=J.completionTokensDetails.rejectedPredictionTokens;M.enqueue({type:"finish",finishReason:$,usage:{inputTokens:{total:J.promptTokens,noCache:J.promptTokens!=null&&J.promptTokensDetails.cachedTokens!=null?J.promptTokens-J.promptTokensDetails.cachedTokens:void 0,cacheRead:J.promptTokensDetails.cachedTokens,cacheWrite:void 0},outputTokens:{total:J.completionTokens,text:void 0,reasoning:J.completionTokensDetails.reasoningTokens},raw:{prompt_tokens:J.promptTokens??null,completion_tokens:J.completionTokens??null,total_tokens:J.totalTokens??null}},providerMetadata:V})}})),request:{body:N},response:{headers:L}}}}var G3=j.object({prompt_tokens:j.number().nullish(),completion_tokens:j.number().nullish(),total_tokens:j.number().nullish(),prompt_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),completion_tokens_details:j.object({reasoning_tokens:j.number().nullish(),accepted_prediction_tokens:j.number().nullish(),rejected_prediction_tokens:j.number().nullish()}).nullish()}).nullish(),m3=j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({message:j.object({role:j.literal("assistant").nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({id:j.string().nullish(),function:j.object({name:j.string(),arguments:j.string()})})).nullish()}),finish_reason:j.string().nullish()})),usage:G3}),h3=(Q)=>j.union([j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({delta:j.object({role:j.enum(["assistant"]).nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({index:j.number(),id:j.string().nullish(),function:j.object({name:j.string().nullish(),arguments:j.string().nullish()})})).nullish()}).nullish(),finish_reason:j.string().nullish()})),usage:G3}),Q]);var g3=t,e=c({errorSchema:g3,errorToMessage:(Q)=>Q.error.message});var o=j.object({action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeoutMs:j.number().optional(),user:j.string().optional(),workingDirectory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),j3=j.object({output:j.string()}),o0=S({id:"openai.local_shell",inputSchema:o,outputSchema:j3});function J3(Q,G){if(!G)return!1;return G.some((W)=>Q.startsWith(W))}async function K3({prompt:Q,systemMessageMode:G,fileIdPrefixes:W,store:N,hasLocalShellTool:q=!1}){let L=[],Z=[],Y=new Set;for(let{role:$,content:J}of Q)switch($){case"system":{switch(G){case"system":{L.push({role:"system",content:J});break}case"developer":{L.push({role:"developer",content:J});break}case"remove":{Z.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${G}`)}break}case"user":{L.push({role:"user",content:J.map((E,_)=>{switch(E.type){case"text":return{type:"input_text",text:E.text};case"file":if(E.mediaType.startsWith("image/")){let X=E.mediaType==="image/*"?"image/jpeg":E.mediaType;return{type:"input_image",...E.data instanceof URL?{image_url:E.data.toString()}:typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{image_url:`data:${X};base64,${m(E.data)}`},detail:E.providerOptions?.openai?.imageDetail}}else if(E.mediaType==="application/pdf"){if(E.data instanceof URL)return{type:"input_file",file_url:E.data.toString()};return{type:"input_file",...typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{filename:E.filename??`part-${_}.pdf`,file_data:`data:application/pdf;base64,${m(E.data)}`}}}else throw new y({functionality:`file part media type ${E.mediaType}`})}})});break}case"assistant":{let E={},_={};for(let X of J)switch(X.type){case"text":{L.push({role:"assistant",content:[{type:"output_text",text:X.text}],id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-call":{if(_[X.toolCallId]=X,X.providerExecuted)break;if(q&&X.toolName==="local_shell"){let K=o.parse(X.input);L.push({type:"local_shell_call",call_id:X.toolCallId,id:X.providerOptions?.openai?.itemId??void 0,action:{type:"exec",command:K.action.command,timeout_ms:K.action.timeoutMs,user:K.action.user,working_directory:K.action.workingDirectory,env:K.action.env}});break}L.push({type:"function_call",call_id:X.toolCallId,name:X.toolName,arguments:JSON.stringify(X.input),id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-result":{if(N)L.push({type:"item_reference",id:X.toolCallId});else Z.push({type:"other",message:`Results for OpenAI tool ${X.toolName} are not sent to the API when store is false`});break}case"reasoning":{let K=await k({provider:"copilot",providerOptions:X.providerOptions,schema:d3}),B=K?.itemId;if(B!=null){let U=E[B];if(N){if(U===void 0)L.push({type:"item_reference",id:B}),E[B]={type:"reasoning",id:B,summary:[]}}else{let M=[];if(X.text.length>0)M.push({type:"summary_text",text:X.text});else if(U!==void 0)Z.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(X)}.`});if(U===void 0)E[B]={type:"reasoning",id:B,encrypted_content:K?.reasoningEncryptedContent,summary:M},L.push(E[B]);else U.summary.push(...M)}}else Z.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(X)}.`});break}}break}case"tool":{for(let E of J){if(E.type==="tool-approval-response"){if(Y.has(E.approvalId))continue;if(Y.add(E.approvalId),N)L.push({type:"item_reference",id:E.approvalId});L.push({type:"mcp_approval_response",approval_request_id:E.approvalId,approve:E.approved});continue}let _=E.output;if(_.type==="execution-denied"){if(_.providerOptions?.openai?.approvalId)continue}if(q&&E.toolName==="local_shell"&&_.type==="json"){L.push({type:"local_shell_call_output",call_id:E.toolCallId,output:j3.parse(_.value).output});break}L.push({type:"function_call_output",call_id:E.toolCallId,output:h(_)})}break}default:throw Error(`Unsupported role: ${$}`)}return{input:L,warnings:Z}}var d3=j.object({itemId:j.string().nullish(),reasoningEncryptedContent:j.string().nullish()});function V3({finishReason:Q,hasFunctionCall:G}){switch(Q){case void 0:case null:return G?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return G?"tool-calls":"other"}}var v3=j.object({code:j.string().nullish(),containerId:j.string()}),c3=j.object({outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullish()}),H3=j.object({container:j.union([j.string(),j.object({fileIds:j.array(j.string()).optional()})]).optional()}),Kj=S({id:"openai.code_interpreter",inputSchema:v3,outputSchema:c3});var B3=j.object({key:j.string(),type:j.enum(["eq","ne","gt","gte","lt","lte"]),value:j.union([j.string(),j.number(),j.boolean()])}),L3=j.object({type:j.enum(["and","or"]),filters:j.array(j.union([B3,j.lazy(()=>L3)]))}),U3=j.object({vectorStoreIds:j.array(j.string()),maxNumResults:j.number().optional(),ranking:j.object({ranker:j.string().optional(),scoreThreshold:j.number().optional()}).optional(),filters:j.union([B3,L3]).optional()}),u3=j.object({queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),fileId:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullable()}),Uj=S({id:"openai.file_search",inputSchema:j.object({}),outputSchema:u3});var I=j.discriminatedUnion("type",[j.object({type:j.literal("search"),query:j.string().nullish()}),j.object({type:j.literal("open_page"),url:j.string()}),j.object({type:j.literal("find"),url:j.string(),pattern:j.string()})]),p=j.object({type:j.literal("approximate"),country:j.string().optional(),city:j.string().optional(),region:j.string().optional(),timezone:j.string().optional()});var N3=j.object({filters:j.object({allowedDomains:j.array(j.string()).optional()}).optional(),searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Pj=s({id:"openai.web_search",inputSchema:j.object({action:I.nullish()})});var D3=j.object({searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Aj=s({id:"openai.web_search_preview",inputSchema:j.object({action:I.nullish()})});var W3=j.object({background:j.enum(["auto","opaque","transparent"]).optional(),inputFidelity:j.enum(["low","high"]).optional(),inputImageMask:j.object({fileId:j.string().optional(),imageUrl:j.string().optional()}).optional(),model:j.string().optional(),moderation:j.enum(["auto"]).optional(),outputCompression:j.number().int().min(0).max(100).optional(),outputFormat:j.enum(["png","jpeg","webp"]).optional(),partialImages:j.number().int().min(0).max(3).optional(),quality:j.enum(["auto","low","medium","high"]).optional(),size:j.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict(),i3=j.object({result:j.string()}),Sj=S({id:"openai.image_generation",inputSchema:j.object({}),outputSchema:i3});function _3({tools:Q,toolChoice:G,strictJsonSchema:W}){Q=Q?.length?Q:void 0;let N=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:N};let q=[];for(let Z of Q)switch(Z.type){case"function":q.push({type:"function",name:Z.name,description:Z.description,parameters:Z.inputSchema,strict:W});break;case"provider":{switch(Z.id){case"openai.file_search":{let Y=U3.parse(Z.args);q.push({type:"file_search",vector_store_ids:Y.vectorStoreIds,max_num_results:Y.maxNumResults,ranking_options:Y.ranking?{ranker:Y.ranking.ranker,score_threshold:Y.ranking.scoreThreshold}:void 0,filters:Y.filters});break}case"openai.local_shell":{q.push({type:"local_shell"});break}case"openai.web_search_preview":{let Y=D3.parse(Z.args);q.push({type:"web_search_preview",search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.web_search":{let Y=N3.parse(Z.args);q.push({type:"web_search",filters:Y.filters!=null?{allowed_domains:Y.filters.allowedDomains}:void 0,search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.code_interpreter":{let Y=H3.parse(Z.args);q.push({type:"code_interpreter",container:Y.container==null?{type:"auto",file_ids:void 0}:typeof Y.container==="string"?Y.container:{type:"auto",file_ids:Y.container.fileIds}});break}case"openai.image_generation":{let Y=W3.parse(Z.args);q.push({type:"image_generation",background:Y.background,input_fidelity:Y.inputFidelity,input_image_mask:Y.inputImageMask?{file_id:Y.inputImageMask.fileId,image_url:Y.inputImageMask.imageUrl}:void 0,model:Y.model,moderation:Y.moderation,partial_images:Y.partialImages,quality:Y.quality,output_compression:Y.outputCompression,output_format:Y.outputFormat,size:Y.size});break}}break}default:N.push({type:"unsupported",feature:"tool type"});break}if(G==null)return{tools:q,toolChoice:void 0,toolWarnings:N};let L=G.type;switch(L){case"auto":case"none":case"required":return{tools:q,toolChoice:L,toolWarnings:N};case"tool":return{tools:q,toolChoice:G.toolName==="code_interpreter"||G.toolName==="file_search"||G.toolName==="image_generation"||G.toolName==="web_search_preview"||G.toolName==="web_search"?{type:G.toolName}:{type:"function",name:G.toolName},toolWarnings:N};default:throw new y({functionality:`tool choice type: ${L}`})}}var M3=j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:I.nullish()}),P3=j.object({type:j.literal("file_search_call"),id:j.string(),queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),file_id:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullish()}),Q3=j.object({type:j.literal("code_interpreter_call"),id:j.string(),code:j.string().nullable(),container_id:j.string(),outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullable()}),f3=j.object({type:j.literal("local_shell_call"),id:j.string(),call_id:j.string(),action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeout_ms:j.number().optional(),user:j.string().optional(),working_directory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),x3=j.object({type:j.literal("image_generation_call"),id:j.string(),result:j.string()}),R3=j.object({type:j.literal("file_citation"),file_id:j.string(),filename:j.string().nullish(),index:j.number().nullish(),start_index:j.number().nullish(),end_index:j.number().nullish(),quote:j.string().nullish()}),b3=j.object({type:j.literal("message"),id:j.string()}),A3=j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish()}),w3=j.object({type:j.literal("function_call"),id:j.string(),call_id:j.string(),name:j.string(),arguments:j.string()}),F3=20,y3=j.array(j.object({token:j.string(),logprob:j.number(),top_logprobs:j.array(j.object({token:j.string(),logprob:j.number()}))}));class X3{specificationVersion="v3";modelId;config;constructor(Q,G){this.modelId=Q,this.config=G}supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]};get provider(){return this.config.provider}async getArgs({maxOutputTokens:Q,temperature:G,stopSequences:W,topP:N,topK:q,presencePenalty:L,frequencyPenalty:Z,seed:Y,prompt:$,providerOptions:J,tools:E,toolChoice:_,responseFormat:X}){let K=[],B=_0(this.modelId);if(q!=null)K.push({type:"unsupported",feature:"topK"});if(Y!=null)K.push({type:"unsupported",feature:"seed"});if(L!=null)K.push({type:"unsupported",feature:"presencePenalty"});if(Z!=null)K.push({type:"unsupported",feature:"frequencyPenalty"});if(W!=null)K.push({type:"unsupported",feature:"stopSequences"});let U=await k({provider:"copilot",providerOptions:J,schema:q0}),{input:M,warnings:V}=await K3({prompt:$,systemMessageMode:B.systemMessageMode,fileIdPrefixes:this.config.fileIdPrefixes,store:U?.store??!0,hasLocalShellTool:z("openai.local_shell")});K.push(...V);let H=U?.strictJsonSchema??!1,D=U?.include;function x(F){D=D!=null?[...D,F]:[F]}function z(F){return E?.find((Y3)=>Y3.type==="provider"&&Y3.id===F)!=null}let P=typeof U?.logprobs==="number"?U?.logprobs:U?.logprobs===!0?F3:void 0;if(P)x("message.output_text.logprobs");let b=E?.find((F)=>F.type==="provider"&&(F.id==="openai.web_search"||F.id==="openai.web_search_preview"))?.name;if(b)x("web_search_call.action.sources");if(z("openai.code_interpreter"))x("code_interpreter_call.outputs");let f={model:this.modelId,input:M,temperature:G,top_p:N,max_output_tokens:Q,...(X?.type==="json"||U?.textVerbosity)&&{text:{...X?.type==="json"&&{format:X.schema!=null?{type:"json_schema",strict:H,name:X.name??"response",description:X.description,schema:X.schema}:{type:"json_object"}},...U?.textVerbosity&&{verbosity:U.textVerbosity}}},max_tool_calls:U?.maxToolCalls,metadata:U?.metadata,parallel_tool_calls:U?.parallelToolCalls,previous_response_id:U?.previousResponseId,store:U?.store,user:U?.user,instructions:U?.instructions,service_tier:U?.serviceTier,include:D,prompt_cache_key:U?.promptCacheKey,safety_identifier:U?.safetyIdentifier,top_logprobs:P,...B.isReasoningModel&&(U?.reasoningEffort!=null||U?.reasoningSummary!=null)&&{reasoning:{...U?.reasoningEffort!=null&&{effort:U.reasoningEffort},...U?.reasoningSummary!=null&&{summary:U.reasoningSummary}}},...B.requiredAutoTruncation&&{truncation:"auto"}};if(B.isReasoningModel){if(f.temperature!=null)f.temperature=void 0,K.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(f.top_p!=null)f.top_p=void 0,K.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})}else{if(U?.reasoningEffort!=null)K.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if(U?.reasoningSummary!=null)K.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if(U?.serviceTier==="flex"&&!B.supportsFlexProcessing)K.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),f.service_tier=void 0;if(U?.serviceTier==="priority"&&!B.supportsPriorityProcessing)K.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),f.service_tier=void 0;let{tools:R,toolChoice:w,toolWarnings:C3}=_3({tools:E,toolChoice:_,strictJsonSchema:H});return{webSearchToolName:b,args:{...f,tools:R,tool_choice:w},warnings:[...K,...C3]}}async doGenerate(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),q=this.config.url({path:"/responses",modelId:this.modelId}),{responseHeaders:L,value:Z,rawValue:Y}=await O({url:q,headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:e,successfulResponseHandler:i(j.object({id:j.string(),created_at:j.number(),error:j.object({code:j.string(),message:j.string()}).nullish(),model:j.string(),output:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("message"),role:j.literal("assistant"),id:j.string(),content:j.array(j.object({type:j.literal("output_text"),text:j.string(),logprobs:y3.nullish(),annotations:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),start_index:j.number(),end_index:j.number(),url:j.string(),title:j.string()}),R3,j.object({type:j.literal("container_file_citation")})]))}))}),M3,P3,Q3,x3,f3,j.object({type:j.literal("function_call"),call_id:j.string(),name:j.string(),arguments:j.string(),id:j.string()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string().optional()}),j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish(),summary:j.array(j.object({type:j.literal("summary_text"),text:j.string()}))})])),service_tier:j.string().nullish(),incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3})),abortSignal:Q.abortSignal,fetch:this.config.fetch});if(Z.error)throw new q3({message:Z.error.message,url:q,requestBodyValues:G,statusCode:400,responseHeaders:L,responseBody:Y,isRetryable:!1});let $=[],J=[],E=!1;for(let X of Z.output)switch(X.type){case"reasoning":{if(X.summary.length===0)X.summary.push({type:"summary_text",text:""});for(let K of X.summary)$.push({type:"reasoning",text:K.text,providerMetadata:{openai:{itemId:X.id,reasoningEncryptedContent:X.encrypted_content??null}}});break}case"image_generation_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"image_generation",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"image_generation",result:{result:X.result}});break}case"local_shell_call":{$.push({type:"tool-call",toolCallId:X.call_id,toolName:"local_shell",input:JSON.stringify({action:X.action}),providerMetadata:{openai:{itemId:X.id}}});break}case"message":{for(let K of X.content){if(Q.providerOptions?.openai?.logprobs&&K.logprobs)J.push(K.logprobs);$.push({type:"text",text:K.text,providerMetadata:{openai:{itemId:X.id}}});for(let B of K.annotations)if(B.type==="url_citation")$.push({type:"source",sourceType:"url",id:this.config.generateId?.()??A(),url:B.url,title:B.title});else if(B.type==="file_citation")$.push({type:"source",sourceType:"document",id:this.config.generateId?.()??A(),mediaType:"text/plain",title:B.quote??B.filename??"Document",filename:B.filename??B.file_id})}break}case"function_call":{E=!0,$.push({type:"tool-call",toolCallId:X.call_id,toolName:X.name,input:X.arguments,providerMetadata:{openai:{itemId:X.id}}});break}case"web_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:N??"web_search",input:JSON.stringify({action:X.action}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:N??"web_search",result:{status:X.status}});break}case"computer_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"computer_use",input:"",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:X.status||"completed"}});break}case"file_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"file_search",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"file_search",result:{queries:X.queries,results:X.results?.map((K)=>({attributes:K.attributes,fileId:K.file_id,filename:K.filename,score:K.score,text:K.text}))??null}});break}case"code_interpreter_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"code_interpreter",input:JSON.stringify({code:X.code,containerId:X.container_id}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"code_interpreter",result:{outputs:X.outputs}});break}}let _={openai:{responseId:Z.id}};if(J.length>0)_.openai.logprobs=J;if(typeof Z.service_tier==="string")_.openai.serviceTier=Z.service_tier;return{content:$,finishReason:{unified:V3({finishReason:Z.incomplete_details?.reason,hasFunctionCall:E}),raw:Z.incomplete_details?.reason},usage:{inputTokens:{total:Z.usage.input_tokens,noCache:Z.usage.input_tokens_details?.cached_tokens!=null?Z.usage.input_tokens-Z.usage.input_tokens_details.cached_tokens:void 0,cacheRead:Z.usage.input_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:Z.usage.output_tokens,text:void 0,reasoning:Z.usage.output_tokens_details?.reasoning_tokens??void 0},raw:Z.usage},request:{body:G},response:{id:Z.id,timestamp:new Date(Z.created_at*1000),modelId:Z.model,headers:L,body:Y},providerMetadata:_,warnings:W}}async doStream(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),{responseHeaders:q,value:L}=await O({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:{...G,stream:!0},failedResponseHandler:e,successfulResponseHandler:u(Y0),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Z=this,Y={unified:"other",raw:void 0},$={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0},J=[],E=null,_={},X=!1,K={},B=null,U=null,M;return{stream:L.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{Y={unified:"error",raw:void 0}},transformValue:(V,H)=>{if(T3(V)){if(V.item.type==="function_call")_[V.output_index]={toolName:V.item.name,toolCallId:V.item.call_id},H.enqueue({type:"tool-input-start",id:V.item.call_id,toolName:V.item.name});else if(V.item.type==="web_search_call")_[V.output_index]={toolName:N??"web_search",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:N??"web_search"});else if(V.item.type==="computer_call")_[V.output_index]={toolName:"computer_use",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"computer_use"});else if(V.item.type==="code_interpreter_call")_[V.output_index]={toolName:"code_interpreter",toolCallId:V.item.id,codeInterpreter:{containerId:V.item.container_id}},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"code_interpreter"}),H.enqueue({type:"tool-input-delta",id:V.item.id,delta:`{"containerId":"${V.item.container_id}","code":"`});else if(V.item.type==="file_search_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"file_search",input:"{}",providerExecuted:!0});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"image_generation",input:"{}",providerExecuted:!0});else if(V.item.type==="message")U=V.item.id,H.enqueue({type:"text-start",id:V.item.id,providerMetadata:{openai:{itemId:V.item.id}}});else if(L0(V))K[V.output_index]={canonicalId:V.item.id,encryptedContent:V.item.encrypted_content,summaryParts:[0]},B=V.output_index,H.enqueue({type:"reasoning-start",id:`${V.item.id}:0`,providerMetadata:{openai:{itemId:V.item.id,reasoningEncryptedContent:V.item.encrypted_content??null}}})}else if(k3(V)){if(V.item.type==="function_call")_[V.output_index]=void 0,X=!0,H.enqueue({type:"tool-input-end",id:V.item.call_id}),H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:V.item.name,input:V.item.arguments,providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="web_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"web_search",input:JSON.stringify({action:V.item.action}),providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"web_search",result:{status:V.item.status}});else if(V.item.type==="computer_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"computer_use",input:"",providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:V.item.status||"completed"}});else if(V.item.type==="file_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"file_search",result:{queries:V.item.queries,results:V.item.results?.map((D)=>({attributes:D.attributes,fileId:D.file_id,filename:D.filename,score:D.score,text:D.text}))??null}});else if(V.item.type==="code_interpreter_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"code_interpreter",result:{outputs:V.item.outputs}});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"image_generation",result:{result:V.item.result}});else if(V.item.type==="local_shell_call")_[V.output_index]=void 0,H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:"local_shell",input:JSON.stringify({action:{type:"exec",command:V.item.action.command,timeoutMs:V.item.action.timeout_ms,user:V.item.action.user,workingDirectory:V.item.action.working_directory,env:V.item.action.env}}),providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="message"){if(U)H.enqueue({type:"text-end",id:U}),U=null}else if($0(V)){let D=K[V.output_index];if(D){for(let x of D.summaryParts)H.enqueue({type:"reasoning-end",id:`${D.canonicalId}:${x}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:V.item.encrypted_content??null}}});if(delete K[V.output_index],B===V.output_index)B=null}}}else if(J0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:V.delta})}else if(K0(V))H.enqueue({type:"tool-result",toolCallId:V.item_id,toolName:"image_generation",result:{result:V.partial_image_b64}});else if(H0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:JSON.stringify(V.delta).slice(1,-1)})}else if(B0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:'"}'}),H.enqueue({type:"tool-input-end",id:D.toolCallId}),H.enqueue({type:"tool-call",toolCallId:D.toolCallId,toolName:"code_interpreter",input:JSON.stringify({code:V.code,containerId:D.codeInterpreter.containerId}),providerExecuted:!0})}else if(G0(V))E=V.response.id,H.enqueue({type:"response-metadata",id:V.response.id,timestamp:new Date(V.response.created_at*1000),modelId:V.response.model});else if(Z0(V)){if(!U)U=V.item_id,H.enqueue({type:"text-start",id:U,providerMetadata:{openai:{itemId:V.item_id}}});if(H.enqueue({type:"text-delta",id:U,delta:V.delta}),Q.providerOptions?.openai?.logprobs&&V.logprobs)J.push(V.logprobs)}else if(N0(V)){let D=B!==null?K[B]:null;if(D&&V.summary_index>0)D.summaryParts.push(V.summary_index),H.enqueue({type:"reasoning-start",id:`${D.canonicalId}:${V.summary_index}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:D.encryptedContent??null}}})}else if(D0(V)){let D=B!==null?K[B]:null;if(D)H.enqueue({type:"reasoning-delta",id:`${D.canonicalId}:${V.summary_index}`,delta:V.delta,providerMetadata:{openai:{itemId:D.canonicalId}}})}else if(E0(V)){if(Y={unified:V3({finishReason:V.response.incomplete_details?.reason,hasFunctionCall:X}),raw:V.response.incomplete_details?.reason??void 0},$.inputTokens=V.response.usage.input_tokens,$.outputTokens=V.response.usage.output_tokens,$.totalTokens=V.response.usage.input_tokens+V.response.usage.output_tokens,$.reasoningTokens=V.response.usage.output_tokens_details?.reasoning_tokens??void 0,$.cachedInputTokens=V.response.usage.input_tokens_details?.cached_tokens??void 0,typeof V.response.service_tier==="string")M=V.response.service_tier}else if(U0(V)){if(V.annotation.type==="url_citation")H.enqueue({type:"source",sourceType:"url",id:Z.config.generateId?.()??A(),url:V.annotation.url,title:V.annotation.title});else if(V.annotation.type==="file_citation")H.enqueue({type:"source",sourceType:"document",id:Z.config.generateId?.()??A(),mediaType:"text/plain",title:V.annotation.quote??V.annotation.filename??"Document",filename:V.annotation.filename??V.annotation.file_id})}else if(W0(V))H.enqueue({type:"error",error:V})},flush:(V)=>{if(U)V.enqueue({type:"text-end",id:U}),U=null;let H={openai:{responseId:E}};if(J.length>0)H.openai.logprobs=J;if(M!==void 0)H.openai.serviceTier=M;V.enqueue({type:"finish",finishReason:Y,usage:{inputTokens:{total:$.inputTokens,noCache:$.inputTokens!=null&&$.cachedInputTokens!=null?$.inputTokens-$.cachedInputTokens:void 0,cacheRead:$.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:$.outputTokens,text:void 0,reasoning:$.reasoningTokens},raw:{input_tokens:$.inputTokens,output_tokens:$.outputTokens,total_tokens:$.totalTokens}},providerMetadata:H})}})),request:{body:G},response:{headers:q}}}}var S3=j.object({input_tokens:j.number(),input_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),output_tokens:j.number(),output_tokens_details:j.object({reasoning_tokens:j.number().nullish()}).nullish()}),p3=j.object({type:j.literal("response.output_text.delta"),item_id:j.string(),delta:j.string(),logprobs:y3.nullish()}),s3=j.object({type:j.literal("error"),code:j.string(),message:j.string(),param:j.string().nullish(),sequence_number:j.number()}),n3=j.object({type:j.enum(["response.completed","response.incomplete"]),response:j.object({incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3,service_tier:j.string().nullish()})}),r3=j.object({type:j.literal("response.created"),response:j.object({id:j.string(),created_at:j.number(),model:j.string(),service_tier:j.string().nullish()})}),t3=j.object({type:j.literal("response.output_item.added"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3,j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:j.object({type:j.literal("search"),query:j.string().optional()}).nullish()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string()}),j.object({type:j.literal("file_search_call"),id:j.string()}),j.object({type:j.literal("image_generation_call"),id:j.string()}),Q3.extend({status:j.string()})])}),l3=j.object({type:j.literal("response.output_item.done"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3.extend({status:j.literal("completed")}),Q3,x3,M3,P3,f3,j.object({type:j.literal("computer_call"),id:j.string(),status:j.literal("completed")})])}),a3=j.object({type:j.literal("response.function_call_arguments.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),e3=j.object({type:j.literal("response.image_generation_call.partial_image"),item_id:j.string(),output_index:j.number(),partial_image_b64:j.string()}),o3=j.object({type:j.literal("response.code_interpreter_call_code.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),j0=j.object({type:j.literal("response.code_interpreter_call_code.done"),item_id:j.string(),output_index:j.number(),code:j.string()}),V0=j.object({type:j.literal("response.output_text.annotation.added"),annotation:j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),url:j.string(),title:j.string()}),R3])}),Q0=j.object({type:j.literal("response.reasoning_summary_part.added"),item_id:j.string(),summary_index:j.number()}),X0=j.object({type:j.literal("response.reasoning_summary_text.delta"),item_id:j.string(),summary_index:j.number(),delta:j.string()}),Y0=j.union([p3,n3,r3,t3,l3,a3,e3,o3,j0,V0,Q0,X0,s3,j.object({type:j.string()}).loose()]);function Z0(Q){return Q.type==="response.output_text.delta"}function k3(Q){return Q.type==="response.output_item.done"}function $0(Q){return k3(Q)&&Q.item.type==="reasoning"}function E0(Q){return Q.type==="response.completed"||Q.type==="response.incomplete"}function G0(Q){return Q.type==="response.created"}function J0(Q){return Q.type==="response.function_call_arguments.delta"}function K0(Q){return Q.type==="response.image_generation_call.partial_image"}function H0(Q){return Q.type==="response.code_interpreter_call_code.delta"}function B0(Q){return Q.type==="response.code_interpreter_call_code.done"}function T3(Q){return Q.type==="response.output_item.added"}function L0(Q){return T3(Q)&&Q.item.type==="reasoning"}function U0(Q){return Q.type==="response.output_text.annotation.added"}function N0(Q){return Q.type==="response.reasoning_summary_part.added"}function D0(Q){return Q.type==="response.reasoning_summary_text.delta"}function W0(Q){return Q.type==="error"}function _0(Q){let G=Q.startsWith("o3")||Q.startsWith("o4-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-chat"),W=Q.startsWith("gpt-4")||Q.startsWith("gpt-5-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-nano")&&!Q.startsWith("gpt-5-chat")||Q.startsWith("o3")||Q.startsWith("o4-mini"),N={requiredAutoTruncation:!1,systemMessageMode:"system",supportsFlexProcessing:G,supportsPriorityProcessing:W};if(Q.startsWith("gpt-5-chat"))return{...N,isReasoningModel:!1};if(Q.startsWith("o")||Q.startsWith("gpt-5")||Q.startsWith("codex-")||Q.startsWith("computer-use")){if(Q.startsWith("o1-mini")||Q.startsWith("o1-preview"))return{...N,isReasoningModel:!0,systemMessageMode:"remove"};return{...N,isReasoningModel:!0,systemMessageMode:"developer"}}return{...N,isReasoningModel:!1}}var q0=j.object({include:j.array(j.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:j.string().nullish(),logprobs:j.union([j.boolean(),j.number().min(1).max(F3)]).optional(),maxToolCalls:j.number().nullish(),metadata:j.any().nullish(),parallelToolCalls:j.boolean().nullish(),previousResponseId:j.string().nullish(),promptCacheKey:j.string().nullish(),reasoningEffort:j.string().nullish(),reasoningSummary:j.string().nullish(),safetyIdentifier:j.string().nullish(),serviceTier:j.enum(["auto","flex","priority"]).nullish(),store:j.boolean().nullish(),strictJsonSchema:j.boolean().nullish(),textVerbosity:j.enum(["low","medium","high"]).nullish(),user:j.string().nullish()});var M0="0.1.0";function z3(Q={}){let G=I3(Q.baseURL??"https://api.openai.com/v1");if(!G)throw Error("baseURL is required");let W={...Q.apiKey&&{Authorization:`Bearer ${Q.apiKey}`},...Q.headers},N=()=>O3(W,`ai-sdk/openai-compatible/${M0}`),q=($)=>{return new a($,{provider:`${Q.name??"openai-compatible"}.chat`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},L=($)=>{return new X3($,{provider:`${Q.name??"openai-compatible"}.responses`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},Z=($)=>q($),Y=function($){return q($)};return Y.languageModel=Z,Y.chat=q,Y.responses=L,Y}var P0=z3();export{P0 as openaiCompatible,z3 as createOpenaiCompatible};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{te as Sw}from"./chunk-fnbpap62.js";import{xe as $w}from"./chunk-37n34pzd.js";import{ye as dw}from"./chunk-v2zp22r3.js";import{Ae as xw,Be as Cw,ze as Aw}from"./chunk-j9pcnkkq.js";import{Ce as Ew}from"./chunk-dq9kpj4a.js";import{uf as yw,vf as Rw,wf as Pw,xf as vw,yf as Tw}from"./chunk-cvdxgsq1.js";import"./chunk-aztre27e.js";var W=Cw(),j=xw(),L=Rw(),Q=Pw(),b=vw(),N=Ew(),H=Aw(),$=yw(),l=Sw(),D=Tw(),a=dw(),lw=$w(),mw=async(w,z,F)=>{return{operation:L.getSmithyContext(z).operation,region:await L.normalizeProvider(w.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function uw(w){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:w.region},propertiesExtractor:(z,F)=>({signingProperties:{config:z,context:F}})}}function hw(w){return{schemeId:"smithy.api#noAuth"}}var _w=(w)=>{let z=[];switch(w.operation){case"CreateOAuth2Token":{z.push(hw());break}default:z.push(uw(w))}return z},pw=(w)=>{let z=l.resolveAwsSdkSigV4Config(w);return Object.assign(z,{authSchemePreference:L.normalizeProvider(w.authSchemePreference??[])})},aw=(w)=>{return Object.assign(w,{useDualstackEndpoint:w.useDualstackEndpoint??!1,useFipsEndpoint:w.useFipsEndpoint??!1,defaultSigningName:"signin"})},sw={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fw="3.997.14",rw={version:fw},M="ref",B=-1,I=!0,s="isSet",Lw="PartitionResult",O="booleanEquals",S="getAttr",x="stringEquals",f={[M]:"Endpoint"},d={[M]:Lw},C={fn:S,argv:[d,"name"]},Z={},r=[{[M]:"Region"}],g={conditions:[[s,[f]],[s,r],["aws.partition",r,Lw],[O,[{[M]:"UseFIPS"},I]],[O,[{[M]:"UseDualStack"},I]],[O,[{fn:S,argv:[d,"supportsDualStack"]},I]],[O,[{fn:S,argv:[d,"supportsFIPS"]},I]],[x,[C,"aws"]],[x,[C,"aws-cn"]],[x,[C,"aws-us-gov"]]],results:[[B],[B,"Invalid Configuration: FIPS and custom endpoint are not supported"],[B,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[f,Z],["https://{Region}.signin.aws.amazon.com",Z],["https://{Region}.signin.amazonaws.cn",Z],["https://{Region}.signin.amazonaws-us-gov.com",Z],["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"FIPS is enabled but this partition does not support FIPS"],["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"DualStack is enabled but this partition does not support DualStack"],["https://signin.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"Invalid Configuration: Missing Region"]]},gw=2,G=1e8,cw=new Int32Array([-1,1,-1,0,15,3,1,4,G+14,2,5,G+14,3,11,6,4,10,7,7,G+4,8,8,G+5,9,9,G+6,G+13,5,G+11,G+12,4,13,12,6,G+9,G+10,5,14,G+8,6,G+7,G+8,3,G+1,16,4,G+2,G+3]),tw=b.BinaryDecisionDiagram.from(cw,gw,g.conditions,g.results),ew=new b.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ow=(w,z={})=>{return ew.get(w,()=>b.decideEndpoint(tw,{endpointParams:w,logger:z.logger}))};b.customEndpointFunctions.aws=W.awsEndpointFunctions;class q extends L.ServiceException{constructor(w){super(w);Object.setPrototypeOf(this,q.prototype)}}class R extends q{name="AccessDeniedException";$fault="client";error;constructor(w){super({name:"AccessDeniedException",$fault:"client",...w});Object.setPrototypeOf(this,R.prototype),this.error=w.error}}class P extends q{name="InternalServerException";$fault="server";error;constructor(w){super({name:"InternalServerException",$fault:"server",...w});Object.setPrototypeOf(this,P.prototype),this.error=w.error}}class v extends q{name="TooManyRequestsError";$fault="client";error;constructor(w){super({name:"TooManyRequestsError",$fault:"client",...w});Object.setPrototypeOf(this,v.prototype),this.error=w.error}}class T extends q{name="ValidationException";$fault="client";error;constructor(w){super({name:"ValidationException",$fault:"client",...w});Object.setPrototypeOf(this,T.prototype),this.error=w.error}}var iw="AccessDeniedException",nw="AccessToken",wz="CreateOAuth2Token",zz="CreateOAuth2TokenRequest",Fz="CreateOAuth2TokenRequestBody",Gz="CreateOAuth2TokenResponseBody",Jz="CreateOAuth2TokenResponse",Lz="InternalServerException",Qz="RefreshToken",Uz="TooManyRequestsError",Wz="ValidationException",c="accessKeyId",t="accessToken",m="client",e="clientId",o="codeVerifier",Xz="code",K="error",i="expiresIn",n="grantType",Yz="http",u="httpError",ww="idToken",U="jsonName",E="message",y="refreshToken",zw="redirectUri",Qw="smithy.ts.sdk.synthetic.com.amazonaws.signin",Fw="secretAccessKey",Gw="sessionToken",Zz="server",Kz="tokenInput",qz="tokenOutput",Jw="tokenType",X="com.amazonaws.signin",Uw=$.TypeRegistry.for(Qw),Ww=[-3,Qw,"SigninServiceException",0,[],[]];Uw.registerError(Ww,q);var k=$.TypeRegistry.for(X),Xw=[-3,X,iw,{[K]:m},[K,E],[0,0],2];k.registerError(Xw,R);var Yw=[-3,X,Lz,{[K]:Zz,[u]:500},[K,E],[0,0],2];k.registerError(Yw,P);var Zw=[-3,X,Uz,{[K]:m,[u]:429},[K,E],[0,0],2];k.registerError(Zw,v);var Kw=[-3,X,Wz,{[K]:m,[u]:400},[K,E],[0,0],2];k.registerError(Kw,T);var qw=[Uw,k],Bw=[0,X,Qz,8,0],Dw=[3,X,nw,8,[c,Fw,Gw],[[0,{[U]:c}],[0,{[U]:Fw}],[0,{[U]:Gw}]],3],bw=[3,X,zz,0,[Kz],[[()=>Hw,16]],1],Hw=[3,X,Fz,0,[e,n,Xz,zw,o,y],[[0,{[U]:e}],[0,{[U]:n}],0,[0,{[U]:zw}],[0,{[U]:o}],[()=>Bw,{[U]:y}]],2],Mw=[3,X,Jz,0,[qz],[[()=>kw,16]],1],kw=[3,X,Gz,0,[t,Jw,i,y,ww],[[()=>Dw,{[U]:t}],[0,{[U]:Jw}],[1,{[U]:i}],[()=>Bw,{[U]:y}],[0,{[U]:ww}]],4],Vw=[9,X,wz,{[Yz]:["POST","/v1/token",200]},()=>bw,()=>Mw],Bz=(w)=>{return{apiVersion:"2023-01-01",base64Decoder:w?.base64Decoder??D.fromBase64,base64Encoder:w?.base64Encoder??D.toBase64,disableHostPrefix:w?.disableHostPrefix??!1,endpointProvider:w?.endpointProvider??ow,extensions:w?.extensions??[],httpAuthSchemeProvider:w?.httpAuthSchemeProvider??_w,httpAuthSchemes:w?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(z)=>z.getIdentityProvider("aws.auth#sigv4"),signer:new l.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(z)=>z.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new j.NoAuthSigner}],logger:w?.logger??new L.NoOpLogger,protocol:w?.protocol??lw.AwsRestJsonProtocol,protocolSettings:w?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:qw,version:"2023-01-01",serviceTarget:"Signin"},serviceId:w?.serviceId??"Signin",urlParser:w?.urlParser??N.parseUrl,utf8Decoder:w?.utf8Decoder??D.fromUtf8,utf8Encoder:w?.utf8Encoder??D.toUtf8}},Dz=(w)=>{L.emitWarningIfUnsupportedVersion(process.version);let z=Q.resolveDefaultsModeConfig(w),F=()=>z().then(L.loadConfigsForDefaultMode),Y=Bz(w);W.emitWarningIfUnsupportedVersion(process.version);let J={profile:w?.profile,logger:Y.logger};return{...Y,...w,runtime:"node",defaultsMode:z,authSchemePreference:w?.authSchemePreference??Q.loadConfig(l.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,J),bodyLengthChecker:w?.bodyLengthChecker??D.calculateBodyLength,defaultUserAgentProvider:w?.defaultUserAgentProvider??W.createDefaultUserAgentProvider({serviceId:Y.serviceId,clientVersion:rw.version}),maxAttempts:w?.maxAttempts??Q.loadConfig(H.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,w),region:w?.region??Q.loadConfig(Q.NODE_REGION_CONFIG_OPTIONS,{...Q.NODE_REGION_CONFIG_FILE_OPTIONS,...J}),requestHandler:a.NodeHttpHandler.create(w?.requestHandler??F),retryMode:w?.retryMode??Q.loadConfig({...H.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await F()).retryMode||H.DEFAULT_RETRY_MODE},w),sha256:w?.sha256??D.Hash.bind(null,"sha256"),streamCollector:w?.streamCollector??a.streamCollector,useDualstackEndpoint:w?.useDualstackEndpoint??Q.loadConfig(Q.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,J),useFipsEndpoint:w?.useFipsEndpoint??Q.loadConfig(Q.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,J),userAgentAppId:w?.userAgentAppId??Q.loadConfig(W.NODE_APP_ID_CONFIG_OPTIONS,J)}},bz=(w)=>{let{httpAuthSchemes:z,httpAuthSchemeProvider:F,credentials:Y}=w;return{setHttpAuthScheme(J){let V=z.findIndex((A)=>A.schemeId===J.schemeId);if(V===-1)z.push(J);else z.splice(V,1,J)},httpAuthSchemes(){return z},setHttpAuthSchemeProvider(J){F=J},httpAuthSchemeProvider(){return F},setCredentials(J){Y=J},credentials(){return Y}}},Hz=(w)=>{return{httpAuthSchemes:w.httpAuthSchemes(),httpAuthSchemeProvider:w.httpAuthSchemeProvider(),credentials:w.credentials()}},Mz=(w,z)=>{let F=Object.assign(W.getAwsRegionExtensionConfiguration(w),L.getDefaultExtensionConfiguration(w),N.getHttpHandlerExtensionConfiguration(w),bz(w));return z.forEach((Y)=>Y.configure(F)),Object.assign(w,W.resolveAwsRegionExtensionConfiguration(F),L.resolveDefaultRuntimeConfig(F),N.resolveHttpHandlerRuntimeConfig(F),Hz(F))};class h extends L.Client{config;constructor(...[w]){let z=Dz(w||{});super(z);this.initConfig=z;let F=aw(z),Y=W.resolveUserAgentConfig(F),J=H.resolveRetryConfig(Y),V=Q.resolveRegionConfig(J),A=W.resolveHostHeaderConfig(V),Iw=b.resolveEndpointConfig(A),Ow=pw(Iw),jw=Mz(Ow,w?.extensions||[]);this.config=jw,this.middlewareStack.use($.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(W.getUserAgentPlugin(this.config)),this.middlewareStack.use(H.getRetryPlugin(this.config)),this.middlewareStack.use(N.getContentLengthPlugin(this.config)),this.middlewareStack.use(W.getHostHeaderPlugin(this.config)),this.middlewareStack.use(W.getLoggerPlugin(this.config)),this.middlewareStack.use(W.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(j.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:mw,identityProviderConfigProvider:async(Nw)=>new j.DefaultIdentityProviderConfig({"aws.auth#sigv4":Nw.credentials})})),this.middlewareStack.use(j.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class _ extends L.Command.classBuilder().ep(sw).m(function(w,z,F,Y){return[b.getEndpointPlugin(F,w.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(Vw).build(){}var kz={CreateOAuth2TokenCommand:_};class p extends h{}L.createAggregatedClient(kz,p);var Vz={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};var{Command:Iz,Client:Oz}=L,jz=R,Nz=Xw,yz=Dw,Rz=Vw,Pz=_,vz=bw,Tz=Hw,Ez=Mw,Az=kw,xz=P,Cz=Yw,Sz=Vz,dz=p,$z=h,lz=q,mz=Ww,uz=v,hz=Zw,_z=T,pz=Kw,az=qw;export{az as errorTypeRegistries,Oz as __Client,pz as ValidationException$,_z as ValidationException,hz as TooManyRequestsError$,uz as TooManyRequestsError,mz as SigninServiceException$,lz as SigninServiceException,$z as SigninClient,dz as Signin,Sz as OAuth2ErrorCode,Cz as InternalServerException$,xz as InternalServerException,Az as CreateOAuth2TokenResponseBody$,Ez as CreateOAuth2TokenResponse$,Tz as CreateOAuth2TokenRequestBody$,vz as CreateOAuth2TokenRequest$,Pz as CreateOAuth2TokenCommand,Rz as CreateOAuth2Token$,yz as AccessToken$,Nz as AccessDeniedException$,jz as AccessDeniedException,Iz as $Command};export default {get errorTypeRegistries(){return az},get __Client(){return Oz},get ValidationException$(){return pz},get ValidationException(){return _z},get TooManyRequestsError$(){return hz},get TooManyRequestsError(){return uz},get SigninServiceException$(){return mz},get SigninServiceException(){return lz},get SigninClient(){return $z},get Signin(){return dz},get OAuth2ErrorCode(){return Sz},get InternalServerException$(){return Cz},get InternalServerException(){return xz},get CreateOAuth2TokenResponseBody$(){return Az},get CreateOAuth2TokenResponse$(){return Ez},get CreateOAuth2TokenRequestBody$(){return Tz},get CreateOAuth2TokenRequest$(){return vz},get CreateOAuth2TokenCommand(){return Pz},get CreateOAuth2Token$(){return Rz},get AccessToken$(){return yz},get AccessDeniedException$(){return Nz},get AccessDeniedException(){return jz},get $Command(){return Iz}};
2
+ import{te as Sw}from"./chunk-8d2ddmf0.js";import{xe as $w}from"./chunk-g06rv5fq.js";import{ye as dw}from"./chunk-hgbkg85g.js";import{Ae as xw,Be as Cw,ze as Aw}from"./chunk-ekndhwnn.js";import{Ce as Ew}from"./chunk-sv48x9h8.js";import{uf as yw,vf as Rw,wf as Pw,xf as vw,yf as Tw}from"./chunk-yp3dj4wh.js";import"./chunk-yjj4cvqg.js";var W=Cw(),j=xw(),L=Rw(),Q=Pw(),b=vw(),N=Ew(),H=Aw(),$=yw(),l=Sw(),D=Tw(),a=dw(),lw=$w(),mw=async(w,z,F)=>{return{operation:L.getSmithyContext(z).operation,region:await L.normalizeProvider(w.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function uw(w){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:w.region},propertiesExtractor:(z,F)=>({signingProperties:{config:z,context:F}})}}function hw(w){return{schemeId:"smithy.api#noAuth"}}var _w=(w)=>{let z=[];switch(w.operation){case"CreateOAuth2Token":{z.push(hw());break}default:z.push(uw(w))}return z},pw=(w)=>{let z=l.resolveAwsSdkSigV4Config(w);return Object.assign(z,{authSchemePreference:L.normalizeProvider(w.authSchemePreference??[])})},aw=(w)=>{return Object.assign(w,{useDualstackEndpoint:w.useDualstackEndpoint??!1,useFipsEndpoint:w.useFipsEndpoint??!1,defaultSigningName:"signin"})},sw={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},fw="3.997.14",rw={version:fw},M="ref",B=-1,I=!0,s="isSet",Lw="PartitionResult",O="booleanEquals",S="getAttr",x="stringEquals",f={[M]:"Endpoint"},d={[M]:Lw},C={fn:S,argv:[d,"name"]},Z={},r=[{[M]:"Region"}],g={conditions:[[s,[f]],[s,r],["aws.partition",r,Lw],[O,[{[M]:"UseFIPS"},I]],[O,[{[M]:"UseDualStack"},I]],[O,[{fn:S,argv:[d,"supportsDualStack"]},I]],[O,[{fn:S,argv:[d,"supportsFIPS"]},I]],[x,[C,"aws"]],[x,[C,"aws-cn"]],[x,[C,"aws-us-gov"]]],results:[[B],[B,"Invalid Configuration: FIPS and custom endpoint are not supported"],[B,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[f,Z],["https://{Region}.signin.aws.amazon.com",Z],["https://{Region}.signin.amazonaws.cn",Z],["https://{Region}.signin.amazonaws-us-gov.com",Z],["https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"FIPS is enabled but this partition does not support FIPS"],["https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",Z],[B,"DualStack is enabled but this partition does not support DualStack"],["https://signin.{Region}.{PartitionResult#dnsSuffix}",Z],[B,"Invalid Configuration: Missing Region"]]},gw=2,G=1e8,cw=new Int32Array([-1,1,-1,0,15,3,1,4,G+14,2,5,G+14,3,11,6,4,10,7,7,G+4,8,8,G+5,9,9,G+6,G+13,5,G+11,G+12,4,13,12,6,G+9,G+10,5,14,G+8,6,G+7,G+8,3,G+1,16,4,G+2,G+3]),tw=b.BinaryDecisionDiagram.from(cw,gw,g.conditions,g.results),ew=new b.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),ow=(w,z={})=>{return ew.get(w,()=>b.decideEndpoint(tw,{endpointParams:w,logger:z.logger}))};b.customEndpointFunctions.aws=W.awsEndpointFunctions;class q extends L.ServiceException{constructor(w){super(w);Object.setPrototypeOf(this,q.prototype)}}class R extends q{name="AccessDeniedException";$fault="client";error;constructor(w){super({name:"AccessDeniedException",$fault:"client",...w});Object.setPrototypeOf(this,R.prototype),this.error=w.error}}class P extends q{name="InternalServerException";$fault="server";error;constructor(w){super({name:"InternalServerException",$fault:"server",...w});Object.setPrototypeOf(this,P.prototype),this.error=w.error}}class v extends q{name="TooManyRequestsError";$fault="client";error;constructor(w){super({name:"TooManyRequestsError",$fault:"client",...w});Object.setPrototypeOf(this,v.prototype),this.error=w.error}}class T extends q{name="ValidationException";$fault="client";error;constructor(w){super({name:"ValidationException",$fault:"client",...w});Object.setPrototypeOf(this,T.prototype),this.error=w.error}}var iw="AccessDeniedException",nw="AccessToken",wz="CreateOAuth2Token",zz="CreateOAuth2TokenRequest",Fz="CreateOAuth2TokenRequestBody",Gz="CreateOAuth2TokenResponseBody",Jz="CreateOAuth2TokenResponse",Lz="InternalServerException",Qz="RefreshToken",Uz="TooManyRequestsError",Wz="ValidationException",c="accessKeyId",t="accessToken",m="client",e="clientId",o="codeVerifier",Xz="code",K="error",i="expiresIn",n="grantType",Yz="http",u="httpError",ww="idToken",U="jsonName",E="message",y="refreshToken",zw="redirectUri",Qw="smithy.ts.sdk.synthetic.com.amazonaws.signin",Fw="secretAccessKey",Gw="sessionToken",Zz="server",Kz="tokenInput",qz="tokenOutput",Jw="tokenType",X="com.amazonaws.signin",Uw=$.TypeRegistry.for(Qw),Ww=[-3,Qw,"SigninServiceException",0,[],[]];Uw.registerError(Ww,q);var k=$.TypeRegistry.for(X),Xw=[-3,X,iw,{[K]:m},[K,E],[0,0],2];k.registerError(Xw,R);var Yw=[-3,X,Lz,{[K]:Zz,[u]:500},[K,E],[0,0],2];k.registerError(Yw,P);var Zw=[-3,X,Uz,{[K]:m,[u]:429},[K,E],[0,0],2];k.registerError(Zw,v);var Kw=[-3,X,Wz,{[K]:m,[u]:400},[K,E],[0,0],2];k.registerError(Kw,T);var qw=[Uw,k],Bw=[0,X,Qz,8,0],Dw=[3,X,nw,8,[c,Fw,Gw],[[0,{[U]:c}],[0,{[U]:Fw}],[0,{[U]:Gw}]],3],bw=[3,X,zz,0,[Kz],[[()=>Hw,16]],1],Hw=[3,X,Fz,0,[e,n,Xz,zw,o,y],[[0,{[U]:e}],[0,{[U]:n}],0,[0,{[U]:zw}],[0,{[U]:o}],[()=>Bw,{[U]:y}]],2],Mw=[3,X,Jz,0,[qz],[[()=>kw,16]],1],kw=[3,X,Gz,0,[t,Jw,i,y,ww],[[()=>Dw,{[U]:t}],[0,{[U]:Jw}],[1,{[U]:i}],[()=>Bw,{[U]:y}],[0,{[U]:ww}]],4],Vw=[9,X,wz,{[Yz]:["POST","/v1/token",200]},()=>bw,()=>Mw],Bz=(w)=>{return{apiVersion:"2023-01-01",base64Decoder:w?.base64Decoder??D.fromBase64,base64Encoder:w?.base64Encoder??D.toBase64,disableHostPrefix:w?.disableHostPrefix??!1,endpointProvider:w?.endpointProvider??ow,extensions:w?.extensions??[],httpAuthSchemeProvider:w?.httpAuthSchemeProvider??_w,httpAuthSchemes:w?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(z)=>z.getIdentityProvider("aws.auth#sigv4"),signer:new l.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(z)=>z.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new j.NoAuthSigner}],logger:w?.logger??new L.NoOpLogger,protocol:w?.protocol??lw.AwsRestJsonProtocol,protocolSettings:w?.protocolSettings??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:qw,version:"2023-01-01",serviceTarget:"Signin"},serviceId:w?.serviceId??"Signin",urlParser:w?.urlParser??N.parseUrl,utf8Decoder:w?.utf8Decoder??D.fromUtf8,utf8Encoder:w?.utf8Encoder??D.toUtf8}},Dz=(w)=>{L.emitWarningIfUnsupportedVersion(process.version);let z=Q.resolveDefaultsModeConfig(w),F=()=>z().then(L.loadConfigsForDefaultMode),Y=Bz(w);W.emitWarningIfUnsupportedVersion(process.version);let J={profile:w?.profile,logger:Y.logger};return{...Y,...w,runtime:"node",defaultsMode:z,authSchemePreference:w?.authSchemePreference??Q.loadConfig(l.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,J),bodyLengthChecker:w?.bodyLengthChecker??D.calculateBodyLength,defaultUserAgentProvider:w?.defaultUserAgentProvider??W.createDefaultUserAgentProvider({serviceId:Y.serviceId,clientVersion:rw.version}),maxAttempts:w?.maxAttempts??Q.loadConfig(H.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,w),region:w?.region??Q.loadConfig(Q.NODE_REGION_CONFIG_OPTIONS,{...Q.NODE_REGION_CONFIG_FILE_OPTIONS,...J}),requestHandler:a.NodeHttpHandler.create(w?.requestHandler??F),retryMode:w?.retryMode??Q.loadConfig({...H.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await F()).retryMode||H.DEFAULT_RETRY_MODE},w),sha256:w?.sha256??D.Hash.bind(null,"sha256"),streamCollector:w?.streamCollector??a.streamCollector,useDualstackEndpoint:w?.useDualstackEndpoint??Q.loadConfig(Q.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,J),useFipsEndpoint:w?.useFipsEndpoint??Q.loadConfig(Q.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,J),userAgentAppId:w?.userAgentAppId??Q.loadConfig(W.NODE_APP_ID_CONFIG_OPTIONS,J)}},bz=(w)=>{let{httpAuthSchemes:z,httpAuthSchemeProvider:F,credentials:Y}=w;return{setHttpAuthScheme(J){let V=z.findIndex((A)=>A.schemeId===J.schemeId);if(V===-1)z.push(J);else z.splice(V,1,J)},httpAuthSchemes(){return z},setHttpAuthSchemeProvider(J){F=J},httpAuthSchemeProvider(){return F},setCredentials(J){Y=J},credentials(){return Y}}},Hz=(w)=>{return{httpAuthSchemes:w.httpAuthSchemes(),httpAuthSchemeProvider:w.httpAuthSchemeProvider(),credentials:w.credentials()}},Mz=(w,z)=>{let F=Object.assign(W.getAwsRegionExtensionConfiguration(w),L.getDefaultExtensionConfiguration(w),N.getHttpHandlerExtensionConfiguration(w),bz(w));return z.forEach((Y)=>Y.configure(F)),Object.assign(w,W.resolveAwsRegionExtensionConfiguration(F),L.resolveDefaultRuntimeConfig(F),N.resolveHttpHandlerRuntimeConfig(F),Hz(F))};class h extends L.Client{config;constructor(...[w]){let z=Dz(w||{});super(z);this.initConfig=z;let F=aw(z),Y=W.resolveUserAgentConfig(F),J=H.resolveRetryConfig(Y),V=Q.resolveRegionConfig(J),A=W.resolveHostHeaderConfig(V),Iw=b.resolveEndpointConfig(A),Ow=pw(Iw),jw=Mz(Ow,w?.extensions||[]);this.config=jw,this.middlewareStack.use($.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(W.getUserAgentPlugin(this.config)),this.middlewareStack.use(H.getRetryPlugin(this.config)),this.middlewareStack.use(N.getContentLengthPlugin(this.config)),this.middlewareStack.use(W.getHostHeaderPlugin(this.config)),this.middlewareStack.use(W.getLoggerPlugin(this.config)),this.middlewareStack.use(W.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(j.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:mw,identityProviderConfigProvider:async(Nw)=>new j.DefaultIdentityProviderConfig({"aws.auth#sigv4":Nw.credentials})})),this.middlewareStack.use(j.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class _ extends L.Command.classBuilder().ep(sw).m(function(w,z,F,Y){return[b.getEndpointPlugin(F,w.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(Vw).build(){}var kz={CreateOAuth2TokenCommand:_};class p extends h{}L.createAggregatedClient(kz,p);var Vz={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"};var{Command:Iz,Client:Oz}=L,jz=R,Nz=Xw,yz=Dw,Rz=Vw,Pz=_,vz=bw,Tz=Hw,Ez=Mw,Az=kw,xz=P,Cz=Yw,Sz=Vz,dz=p,$z=h,lz=q,mz=Ww,uz=v,hz=Zw,_z=T,pz=Kw,az=qw;export{az as errorTypeRegistries,Oz as __Client,pz as ValidationException$,_z as ValidationException,hz as TooManyRequestsError$,uz as TooManyRequestsError,mz as SigninServiceException$,lz as SigninServiceException,$z as SigninClient,dz as Signin,Sz as OAuth2ErrorCode,Cz as InternalServerException$,xz as InternalServerException,Az as CreateOAuth2TokenResponseBody$,Ez as CreateOAuth2TokenResponse$,Tz as CreateOAuth2TokenRequestBody$,vz as CreateOAuth2TokenRequest$,Pz as CreateOAuth2TokenCommand,Rz as CreateOAuth2Token$,yz as AccessToken$,Nz as AccessDeniedException$,jz as AccessDeniedException,Iz as $Command};export default {get errorTypeRegistries(){return az},get __Client(){return Oz},get ValidationException$(){return pz},get ValidationException(){return _z},get TooManyRequestsError$(){return hz},get TooManyRequestsError(){return uz},get SigninServiceException$(){return mz},get SigninServiceException(){return lz},get SigninClient(){return $z},get Signin(){return dz},get OAuth2ErrorCode(){return Sz},get InternalServerException$(){return Cz},get InternalServerException(){return xz},get CreateOAuth2TokenResponseBody$(){return Az},get CreateOAuth2TokenResponse$(){return Ez},get CreateOAuth2TokenRequestBody$(){return Tz},get CreateOAuth2TokenRequest$(){return vz},get CreateOAuth2TokenCommand(){return Pz},get CreateOAuth2Token$(){return Rz},get AccessToken$(){return yz},get AccessDeniedException$(){return Nz},get AccessDeniedException(){return jz},get $Command(){return Iz}};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-yjj4cvqg.js";var e="./libopentui-c48jzvfh.so";export{e as default};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{qt as _}from"./chunk-12bssxd4.js";import{Uu as h}from"./chunk-k309zez0.js";import{bQ as X,dQ as L}from"./chunk-aztre27e.js";var E={};X(E,{println:()=>g,print:()=>a,markdown:()=>G,logo:()=>I,input:()=>w,error:()=>A,empty:()=>D,UI:()=>E,Style:()=>m,CancelledError:()=>N});import{EOL as x}from"os";var T={left:[" "," "," \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ","\u2588\u2588\u2551\u2584\u2584 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551 "," \u255A\u2550\u2550\u2580\u2580\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D "],right:[" "," "," \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 ","\u2588\u2588\u2551\u2584\u2584 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D ","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557"," \u255A\u2550\u2550\u2580\u2580\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"]},R={left:[" "," ","\u2588\u2580\u2580\u2588 \u2588 \u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 ","\u2580\u2580\u2580\u2580 \u2580 \u2580 "],right:[" "," ","\u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584 \u2588\u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 ","\u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580"]};var O=["\u2800 ","\u2588\u2580\u2580\u2588 \u2588 \u2580\u2580\u2580 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584 \u2588\u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 ","\u2580\u2580\u2580\u2580 \u2580 \u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580"],N=_.create("UICancelledError",h.void()),m={TEXT_HIGHLIGHT:"\x1B[96m",TEXT_HIGHLIGHT_BOLD:"\x1B[96m\x1B[1m",TEXT_DIM:"\x1B[90m",TEXT_DIM_BOLD:"\x1B[90m\x1B[1m",TEXT_NORMAL:"\x1B[0m",TEXT_NORMAL_BOLD:"\x1B[1m",TEXT_WARNING:"\x1B[93m",TEXT_WARNING_BOLD:"\x1B[93m\x1B[1m",TEXT_DANGER:"\x1B[91m",TEXT_DANGER_BOLD:"\x1B[91m\x1B[1m",TEXT_SUCCESS:"\x1B[92m",TEXT_SUCCESS_BOLD:"\x1B[92m\x1B[1m",TEXT_INFO:"\x1B[94m",TEXT_INFO_BOLD:"\x1B[94m\x1B[1m"};function g(...r){a(...r),process.stderr.write(x)}function a(...r){f=!1,process.stderr.write(r.join(" "))}var f=!1;function D(){if(f)return;g(""+m.TEXT_NORMAL),f=!0}function I(r){if(!process.stdout.isTTY&&!process.stderr.isTTY){let o=[];for(let s of O){if(r)o.push(r);o.push(s),o.push(x)}return o.join("").trimEnd()}let n=[],t="\x1B[0m",i={fg:"\x1B[90m",shadow:"\x1B[38;5;235m",bg:"\x1B[48;5;235m"},c={fg:t,shadow:"\x1B[38;5;238m",bg:"\x1B[48;5;238m"},d=" ",b=(o,s,u,l)=>{let e=[];for(let p of o){if(p==="_"){e.push(l," ",t);continue}if(p==="^"){e.push(s,l,"\u2580",t);continue}if(p==="~"){e.push(u,"\u2580",t);continue}if(p===" "){e.push(" ");continue}e.push(s,p,t)}return e.join("")};return T.left.forEach((o,s)=>{if(r)n.push(r);n.push(b(o,i.fg,i.shadow,i.bg)),n.push(d);let u=T.right[s]??"";n.push(b(u,c.fg,c.shadow,c.bg)),n.push(x)}),n.join("").trimEnd()}async function w(r){let t=L("readline").createInterface({input:process.stdin,output:process.stdout});return new Promise((i)=>{t.question(r,(c)=>{t.close(),i(c.trim())})})}function A(r){if(r.startsWith("Error: "))r=r.slice(7);g(m.TEXT_DANGER_BOLD+"Error: "+m.TEXT_NORMAL+r)}function G(r){return r}
2
+ import{Tr as _}from"./chunk-hn1f6rne.js";import{vt as h}from"./chunk-b6dsv601.js";import{EO as X,GO as L}from"./chunk-yjj4cvqg.js";var E={};X(E,{println:()=>g,print:()=>a,markdown:()=>G,logo:()=>I,input:()=>w,error:()=>A,empty:()=>D,UI:()=>E,Style:()=>m,CancelledError:()=>N});import{EOL as x}from"os";var T={left:[" "," "," \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ","\u2588\u2588\u2551\u2584\u2584 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551 "," \u255A\u2550\u2550\u2580\u2580\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D "],right:[" "," "," \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 ","\u2588\u2588\u2551\u2584\u2584 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D ","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557"," \u255A\u2550\u2550\u2580\u2580\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"]},R={left:[" "," ","\u2588\u2580\u2580\u2588 \u2588 \u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 ","\u2580\u2580\u2580\u2580 \u2580 \u2580 "],right:[" "," ","\u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584 \u2588\u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 ","\u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580"]};var O=["\u2800 ","\u2588\u2580\u2580\u2588 \u2588 \u2580\u2580\u2580 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584 \u2588\u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 ","\u2580\u2580\u2580\u2580 \u2580 \u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580"],N=_.create("UICancelledError",h.void()),m={TEXT_HIGHLIGHT:"\x1B[96m",TEXT_HIGHLIGHT_BOLD:"\x1B[96m\x1B[1m",TEXT_DIM:"\x1B[90m",TEXT_DIM_BOLD:"\x1B[90m\x1B[1m",TEXT_NORMAL:"\x1B[0m",TEXT_NORMAL_BOLD:"\x1B[1m",TEXT_WARNING:"\x1B[93m",TEXT_WARNING_BOLD:"\x1B[93m\x1B[1m",TEXT_DANGER:"\x1B[91m",TEXT_DANGER_BOLD:"\x1B[91m\x1B[1m",TEXT_SUCCESS:"\x1B[92m",TEXT_SUCCESS_BOLD:"\x1B[92m\x1B[1m",TEXT_INFO:"\x1B[94m",TEXT_INFO_BOLD:"\x1B[94m\x1B[1m"};function g(...r){a(...r),process.stderr.write(x)}function a(...r){f=!1,process.stderr.write(r.join(" "))}var f=!1;function D(){if(f)return;g(""+m.TEXT_NORMAL),f=!0}function I(r){if(!process.stdout.isTTY&&!process.stderr.isTTY){let o=[];for(let s of O){if(r)o.push(r);o.push(s),o.push(x)}return o.join("").trimEnd()}let n=[],t="\x1B[0m",i={fg:"\x1B[90m",shadow:"\x1B[38;5;235m",bg:"\x1B[48;5;235m"},c={fg:t,shadow:"\x1B[38;5;238m",bg:"\x1B[48;5;238m"},d=" ",b=(o,s,u,l)=>{let e=[];for(let p of o){if(p==="_"){e.push(l," ",t);continue}if(p==="^"){e.push(s,l,"\u2580",t);continue}if(p==="~"){e.push(u,"\u2580",t);continue}if(p===" "){e.push(" ");continue}e.push(s,p,t)}return e.join("")};return T.left.forEach((o,s)=>{if(r)n.push(r);n.push(b(o,i.fg,i.shadow,i.bg)),n.push(d);let u=T.right[s]??"";n.push(b(u,c.fg,c.shadow,c.bg)),n.push(x)}),n.join("").trimEnd()}async function w(r){let t=L("readline").createInterface({input:process.stdin,output:process.stdout});return new Promise((i)=>{t.question(r,(c)=>{t.close(),i(c.trim())})})}function A(r){if(r.startsWith("Error: "))r=r.slice(7);g(m.TEXT_DANGER_BOLD+"Error: "+m.TEXT_NORMAL+r)}function G(r){return r}
3
3
  export{T as Tf,R as Uf,E as Vf};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{mg as a,ng as b,og as c}from"./chunk-z29fwg61.js";import"./chunk-d7t0bcvk.js";import"./chunk-7mc8nxve.js";import"./chunk-dfja6dj6.js";import"./chunk-n34y5gp6.js";import"./chunk-bn0h9dny.js";import"./chunk-q5363rr9.js";import"./chunk-7wthn44y.js";import"./chunk-a8p9aggx.js";import"./chunk-0xm85ayc.js";import"./chunk-s2za1n7h.js";import"./chunk-19sa03c1.js";import"./chunk-csdm3n24.js";import"./chunk-xk1nh1ay.js";import"./chunk-bsf6n350.js";import"./chunk-4vze3djr.js";import"./chunk-bzrsnv2k.js";import"./chunk-d0qqgxs4.js";import"./chunk-cqtkxwd8.js";import"./chunk-v00cptj6.js";import"./chunk-1d9f53sk.js";import"./chunk-svrxk3vf.js";import"./chunk-kkae8ead.js";import"./chunk-s6me101a.js";import"./chunk-qsszerj7.js";import"./chunk-6jewfaqa.js";import"./chunk-6hdjkvr1.js";import"./chunk-1rn0vmvv.js";import"./chunk-fsy279s5.js";import"./chunk-hn1f6rne.js";import"./chunk-4kpvceap.js";import"./chunk-94qmhz2p.js";import"./chunk-20d0cd1j.js";import"./chunk-yn576pje.js";import"./chunk-b6dsv601.js";import"./chunk-j2zay4da.js";import"./chunk-4vemws1t.js";import"./chunk-yvqbewmc.js";import"./chunk-t299e2aw.js";import"./chunk-4mrz9b6d.js";import"./chunk-yjj4cvqg.js";export{b as run,a as encodeDir,c as ClaudeImport};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{GO as t}from"./chunk-yjj4cvqg.js";var e=await import("./chunk-1s9ctg0d.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  function u(r){let e,t=!1,n=()=>{if(t)return e;return e=r(),t=!0,e};return n.reset=()=>{t=!1,e=void 0},n}
3
- export{u as aq};
3
+ export{u as Do};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{kf as n6,lf as L0,mf as t6}from"./chunk-vn7nkrqb.js";import{Fq as CQ,Kq as l6,Oq as p6,_q as A0,ar as JY,br as M0,ir as o6,jr as d6,kr as r6,or as u6,pq as F0,wq as PY}from"./chunk-yq3m8190.js";import{Dr as qQ,wr as w0}from"./chunk-btz9jvec.js";import"./chunk-cqtkxwd8.js";import"./chunk-fkgv2hqd.js";import"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-aztre27e.js";var y9=Object.defineProperty,s=(Q,q)=>{for(var G in q)y9(Q,G,{get:q[G],enumerable:!0})},f9="2.0.1";function m9({tools:Q,toolChoice:q}){Q=Q?.length?Q:void 0;let G=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:G};let H=[];for(let X of Q)if(X.type==="provider")G.push({type:"unsupported",feature:`provider-defined tool ${X.id}`});else H.push({type:"function",function:{name:X.name,description:X.description,parameters:X.inputSchema,...X.strict!=null?{strict:X.strict}:{}}});if(q==null)return{tools:H,toolChoice:void 0,toolWarnings:G};let Y=q.type;switch(Y){case"auto":case"none":case"required":return{tools:H,toolChoice:Y,toolWarnings:G};case"tool":return{tools:H,toolChoice:{type:"function",function:{name:q.toolName}},toolWarnings:G};default:throw new qQ({functionality:`tool choice type: ${Y}`})}}function $6(Q){if(Q==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};return{inputTokens:{total:Q.total_tokens??void 0,noCache:Q.prompt_tokens??void 0,cacheRead:Q.prompt_tokens_details?.cached_tokens??void 0,cacheWrite:Q.prompt_tokens_details?.cache_creation_input_tokens??void 0},outputTokens:{total:Q.completion_tokens??void 0,text:void 0,reasoning:void 0},raw:Q}}var F={};s(F,{$brand:()=>e6,$input:()=>SG,$output:()=>TG,NEVER:()=>i6,TimePrecision:()=>xG,ZodAny:()=>_1,ZodArray:()=>y1,ZodBase64:()=>tY,ZodBase64URL:()=>aY,ZodBigInt:()=>iQ,ZodBigIntFormat:()=>sY,ZodBoolean:()=>aQ,ZodCIDRv4:()=>uY,ZodCIDRv6:()=>nY,ZodCUID:()=>mY,ZodCUID2:()=>cY,ZodCatch:()=>W6,ZodCodec:()=>K0,ZodCustom:()=>qY,ZodCustomStringFormat:()=>ZQ,ZodDate:()=>Y0,ZodDefault:()=>Q6,ZodDiscriminatedUnion:()=>m1,ZodE164:()=>iY,ZodEmail:()=>gY,ZodEmoji:()=>yY,ZodEnum:()=>VQ,ZodError:()=>HK,ZodExactOptional:()=>i1,ZodFile:()=>t1,ZodFirstPartyTypeKind:()=>V0,ZodFunction:()=>M6,ZodGUID:()=>SQ,ZodIPv4:()=>dY,ZodIPv6:()=>rY,ZodISODate:()=>Z1,ZodISODateTime:()=>R1,ZodISODuration:()=>b1,ZodISOTime:()=>D1,ZodIntersection:()=>c1,ZodIssueCode:()=>WK,ZodJWT:()=>eY,ZodKSUID:()=>oY,ZodLazy:()=>w6,ZodLiteral:()=>n1,ZodMAC:()=>C1,ZodMap:()=>r1,ZodNaN:()=>K6,ZodNanoID:()=>fY,ZodNever:()=>h1,ZodNonOptional:()=>W0,ZodNull:()=>j1,ZodNullable:()=>s1,ZodNumber:()=>tQ,ZodNumberFormat:()=>AQ,ZodObject:()=>sQ,ZodOptional:()=>H0,ZodPipe:()=>J0,ZodPrefault:()=>q6,ZodPromise:()=>A6,ZodReadonly:()=>B6,ZodRealError:()=>p,ZodRecord:()=>YY,ZodSet:()=>u1,ZodString:()=>uQ,ZodStringFormat:()=>S,ZodSuccess:()=>H6,ZodSymbol:()=>S1,ZodTemplateLiteral:()=>U6,ZodTransform:()=>a1,ZodTuple:()=>p1,ZodType:()=>D,ZodULID:()=>lY,ZodURL:()=>nQ,ZodUUID:()=>i,ZodUndefined:()=>z1,ZodUnion:()=>QY,ZodUnknown:()=>x1,ZodVoid:()=>g1,ZodXID:()=>pY,ZodXor:()=>f1,_ZodString:()=>hY,_default:()=>Y6,_function:()=>LY,any:()=>H9,array:()=>eQ,base64:()=>l2,base64url:()=>p2,bigint:()=>Q9,boolean:()=>T1,catch:()=>J6,check:()=>C9,cidrv4:()=>m2,cidrv6:()=>c2,clone:()=>u,codec:()=>Z9,coerce:()=>h9,config:()=>h,core:()=>a6,cuid:()=>j2,cuid2:()=>v2,custom:()=>k9,date:()=>J9,decode:()=>M2,decodeAsync:()=>P2,describe:()=>T9,discriminatedUnion:()=>F9,e164:()=>o2,email:()=>V2,emoji:()=>S2,encode:()=>A2,encodeAsync:()=>L2,endsWith:()=>TY,enum:()=>X0,exactOptional:()=>e1,file:()=>O9,flattenError:()=>b0,float32:()=>a2,float64:()=>i2,formatError:()=>C0,fromJSONSchema:()=>wK,function:()=>LY,getErrorMap:()=>KK,globalRegistry:()=>o,gt:()=>GQ,gte:()=>m,guid:()=>R2,hash:()=>t2,hex:()=>n2,hostname:()=>u2,httpUrl:()=>T2,includes:()=>CY,instanceof:()=>z9,int:()=>MY,int32:()=>e2,int64:()=>Y9,intersection:()=>l1,ipv4:()=>g2,ipv6:()=>f2,iso:()=>V1,json:()=>v9,jwt:()=>d2,keyof:()=>K9,ksuid:()=>h2,lazy:()=>F6,length:()=>dQ,literal:()=>E9,locales:()=>u0,looseObject:()=>U9,looseRecord:()=>M9,lowercase:()=>DY,lt:()=>XQ,lte:()=>d,mac:()=>y2,map:()=>L9,maxLength:()=>oQ,maxSize:()=>RQ,meta:()=>S9,mime:()=>SY,minLength:()=>NQ,minSize:()=>HQ,multipleOf:()=>$Q,nan:()=>R9,nanoid:()=>z2,nativeEnum:()=>$9,negative:()=>L1,never:()=>Q0,nonnegative:()=>$1,nonoptional:()=>G6,nonpositive:()=>P1,normalize:()=>zY,null:()=>v1,nullable:()=>jQ,nullish:()=>I9,number:()=>k1,object:()=>B9,optional:()=>zQ,overwrite:()=>YQ,parse:()=>N2,parseAsync:()=>U2,partialRecord:()=>A9,pipe:()=>vQ,positive:()=>M1,prefault:()=>X6,preprocess:()=>_9,prettifyError:()=>wq,promise:()=>b9,property:()=>E1,readonly:()=>N6,record:()=>d1,refine:()=>L6,regex:()=>ZY,regexes:()=>FQ,registry:()=>n0,safeDecode:()=>E2,safeDecodeAsync:()=>I2,safeEncode:()=>$2,safeEncodeAsync:()=>O2,safeParse:()=>w2,safeParseAsync:()=>F2,set:()=>P9,setErrorMap:()=>JK,size:()=>pQ,slugify:()=>xY,startsWith:()=>kY,strictObject:()=>N9,string:()=>AY,stringFormat:()=>r2,stringbool:()=>j9,success:()=>V9,superRefine:()=>P6,symbol:()=>X9,templateLiteral:()=>D9,toJSONSchema:()=>q2,toLowerCase:()=>vY,toUpperCase:()=>_Y,transform:()=>G0,treeifyError:()=>Nq,trim:()=>jY,tuple:()=>o1,uint32:()=>s2,uint64:()=>q9,ulid:()=>_2,undefined:()=>G9,union:()=>q0,unknown:()=>UQ,uppercase:()=>bY,url:()=>k2,util:()=>C,uuid:()=>Z2,uuidv4:()=>D2,uuidv6:()=>b2,uuidv7:()=>C2,void:()=>W9,xid:()=>x2,xor:()=>w9});var a6={};s(a6,{$ZodAny:()=>dX,$ZodArray:()=>aX,$ZodAsyncError:()=>KQ,$ZodBase64:()=>vX,$ZodBase64URL:()=>xX,$ZodBigInt:()=>p0,$ZodBigIntFormat:()=>cX,$ZodBoolean:()=>l0,$ZodCIDRv4:()=>zX,$ZodCIDRv6:()=>jX,$ZodCUID:()=>EX,$ZodCUID2:()=>OX,$ZodCatch:()=>PG,$ZodCheck:()=>j,$ZodCheckBigIntFormat:()=>tq,$ZodCheckEndsWith:()=>JX,$ZodCheckGreaterThan:()=>f0,$ZodCheckIncludes:()=>HX,$ZodCheckLengthEquals:()=>YX,$ZodCheckLessThan:()=>y0,$ZodCheckLowerCase:()=>XX,$ZodCheckMaxLength:()=>sq,$ZodCheckMaxSize:()=>aq,$ZodCheckMimeType:()=>BX,$ZodCheckMinLength:()=>QX,$ZodCheckMinSize:()=>iq,$ZodCheckMultipleOf:()=>uq,$ZodCheckNumberFormat:()=>nq,$ZodCheckOverwrite:()=>NX,$ZodCheckProperty:()=>KX,$ZodCheckRegex:()=>qX,$ZodCheckSizeEquals:()=>eq,$ZodCheckStartsWith:()=>WX,$ZodCheckStringFormat:()=>cQ,$ZodCheckUpperCase:()=>GX,$ZodCodec:()=>r0,$ZodCustom:()=>DG,$ZodCustomStringFormat:()=>fX,$ZodDate:()=>tX,$ZodDefault:()=>FG,$ZodDiscriminatedUnion:()=>qG,$ZodE164:()=>hX,$ZodEmail:()=>MX,$ZodEmoji:()=>PX,$ZodEncodeError:()=>$Y,$ZodEnum:()=>JG,$ZodError:()=>D0,$ZodExactOptional:()=>UG,$ZodFile:()=>BG,$ZodFunction:()=>VG,$ZodGUID:()=>FX,$ZodIPv4:()=>kX,$ZodIPv6:()=>TX,$ZodISODate:()=>DX,$ZodISODateTime:()=>ZX,$ZodISODuration:()=>CX,$ZodISOTime:()=>bX,$ZodIntersection:()=>XG,$ZodJWT:()=>yX,$ZodKSUID:()=>RX,$ZodLazy:()=>ZG,$ZodLiteral:()=>KG,$ZodMAC:()=>SX,$ZodMap:()=>HG,$ZodNaN:()=>$G,$ZodNanoID:()=>$X,$ZodNever:()=>uX,$ZodNonOptional:()=>MG,$ZodNull:()=>oX,$ZodNullable:()=>wG,$ZodNumber:()=>c0,$ZodNumberFormat:()=>mX,$ZodObject:()=>sX,$ZodObjectJIT:()=>QG,$ZodOptional:()=>d0,$ZodPipe:()=>EG,$ZodPrefault:()=>AG,$ZodPromise:()=>RG,$ZodReadonly:()=>OG,$ZodRealError:()=>l,$ZodRecord:()=>GG,$ZodRegistry:()=>zG,$ZodSet:()=>WG,$ZodString:()=>lQ,$ZodStringFormat:()=>T,$ZodSuccess:()=>LG,$ZodSymbol:()=>lX,$ZodTemplateLiteral:()=>IG,$ZodTransform:()=>NG,$ZodTuple:()=>o0,$ZodType:()=>Z,$ZodULID:()=>IX,$ZodURL:()=>LX,$ZodUUID:()=>AX,$ZodUndefined:()=>pX,$ZodUnion:()=>VY,$ZodUnknown:()=>rX,$ZodVoid:()=>nX,$ZodXID:()=>VX,$ZodXor:()=>YG,$brand:()=>e6,$constructor:()=>U,$input:()=>SG,$output:()=>TG,Doc:()=>UX,JSONSchema:()=>GK,JSONSchemaGenerator:()=>XK,NEVER:()=>i6,TimePrecision:()=>xG,_any:()=>q8,_array:()=>B8,_base64:()=>U1,_base64url:()=>w1,_bigint:()=>tG,_boolean:()=>uG,_catch:()=>aJ,_check:()=>A8,_cidrv4:()=>B1,_cidrv6:()=>N1,_coercedBigint:()=>aG,_coercedBoolean:()=>nG,_coercedDate:()=>J8,_coercedNumber:()=>cG,_coercedString:()=>vG,_cuid:()=>q1,_cuid2:()=>X1,_custom:()=>U8,_date:()=>W8,_decode:()=>T0,_decodeAsync:()=>z0,_default:()=>uJ,_discriminatedUnion:()=>xJ,_e164:()=>F1,_email:()=>t0,_emoji:()=>Q1,_encode:()=>k0,_encodeAsync:()=>S0,_endsWith:()=>TY,_enum:()=>cJ,_file:()=>N8,_float32:()=>pG,_float64:()=>oG,_gt:()=>GQ,_gte:()=>m,_guid:()=>FY,_includes:()=>CY,_int:()=>lG,_int32:()=>dG,_int64:()=>iG,_intersection:()=>hJ,_ipv4:()=>J1,_ipv6:()=>K1,_isoDate:()=>gG,_isoDateTime:()=>hG,_isoDuration:()=>fG,_isoTime:()=>yG,_jwt:()=>A1,_ksuid:()=>W1,_lazy:()=>QK,_length:()=>dQ,_literal:()=>pJ,_lowercase:()=>DY,_lt:()=>XQ,_lte:()=>d,_mac:()=>_G,_map:()=>fJ,_max:()=>d,_maxLength:()=>oQ,_maxSize:()=>RQ,_mime:()=>SY,_min:()=>m,_minLength:()=>NQ,_minSize:()=>HQ,_multipleOf:()=>$Q,_nan:()=>K8,_nanoid:()=>Y1,_nativeEnum:()=>lJ,_negative:()=>L1,_never:()=>G8,_nonnegative:()=>$1,_nonoptional:()=>nJ,_nonpositive:()=>P1,_normalize:()=>zY,_null:()=>Y8,_nullable:()=>rJ,_number:()=>mG,_optional:()=>dJ,_overwrite:()=>YQ,_parse:()=>xQ,_parseAsync:()=>hQ,_pipe:()=>iJ,_positive:()=>M1,_promise:()=>YK,_property:()=>E1,_readonly:()=>eJ,_record:()=>yJ,_refine:()=>w8,_regex:()=>ZY,_safeDecode:()=>v0,_safeDecodeAsync:()=>x0,_safeEncode:()=>j0,_safeEncodeAsync:()=>_0,_safeParse:()=>gQ,_safeParseAsync:()=>yQ,_set:()=>mJ,_size:()=>pQ,_slugify:()=>xY,_startsWith:()=>kY,_string:()=>jG,_stringFormat:()=>rQ,_stringbool:()=>P8,_success:()=>tJ,_superRefine:()=>F8,_symbol:()=>sG,_templateLiteral:()=>sJ,_toLowerCase:()=>vY,_toUpperCase:()=>_Y,_transform:()=>oJ,_trim:()=>jY,_tuple:()=>gJ,_uint32:()=>rG,_uint64:()=>eG,_ulid:()=>G1,_undefined:()=>Q8,_union:()=>vJ,_unknown:()=>X8,_uppercase:()=>bY,_url:()=>RY,_uuid:()=>a0,_uuidv4:()=>i0,_uuidv6:()=>e0,_uuidv7:()=>s0,_void:()=>H8,_xid:()=>H1,_xor:()=>_J,clone:()=>u,config:()=>h,createStandardJSONSchemaMethod:()=>TQ,createToJSONSchemaMethod:()=>$8,decode:()=>AH,decodeAsync:()=>LH,describe:()=>M8,encode:()=>FH,encodeAsync:()=>MH,extractDefs:()=>OQ,finalize:()=>IQ,flattenError:()=>b0,formatError:()=>C0,globalConfig:()=>KY,globalRegistry:()=>o,initializeContext:()=>EQ,isValidBase64:()=>m0,isValidBase64URL:()=>_X,isValidJWT:()=>gX,locales:()=>u0,meta:()=>L8,parse:()=>$0,parseAsync:()=>E0,prettifyError:()=>wq,process:()=>k,regexes:()=>FQ,registry:()=>n0,safeDecode:()=>$H,safeDecodeAsync:()=>OH,safeEncode:()=>PH,safeEncodeAsync:()=>EH,safeParse:()=>Fq,safeParseAsync:()=>Aq,toDotPath:()=>Uq,toJSONSchema:()=>q2,treeifyError:()=>Nq,util:()=>C,version:()=>wX});var i6=Object.freeze({status:"aborted"});function U(Q,q,G){function H(J,K){if(!J._zod)Object.defineProperty(J,"_zod",{value:{def:K,constr:W,traits:new Set},enumerable:!1});if(J._zod.traits.has(Q))return;J._zod.traits.add(Q),q(J,K);let B=W.prototype,N=Object.keys(B);for(let w=0;w<N.length;w++){let L=N[w];if(!(L in J))J[L]=B[L].bind(J)}}let Y=G?.Parent??Object;class X extends Y{}Object.defineProperty(X,"name",{value:Q});function W(J){var K;let B=G?.Parent?new X:this;H(B,J),(K=B._zod).deferred??(K.deferred=[]);for(let N of B._zod.deferred)N();return B}return Object.defineProperty(W,"init",{value:H}),Object.defineProperty(W,Symbol.hasInstance,{value:(J)=>{if(G?.Parent&&J instanceof G.Parent)return!0;return J?._zod?.traits?.has(Q)}}),Object.defineProperty(W,"name",{value:Q}),W}var e6=Symbol("zod_brand"),KQ=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},$Y=class extends Error{constructor(Q){super(`Encountered unidirectional transform during encode: ${Q}`);this.name="ZodEncodeError"}},KY={};function h(Q){if(Q)Object.assign(KY,Q);return KY}var C={};s(C,{BIGINT_FORMAT_RANGES:()=>Wq,Class:()=>wH,NUMBER_FORMAT_RANGES:()=>Hq,aborted:()=>JQ,allowsEval:()=>Yq,assert:()=>d9,assertEqual:()=>c9,assertIs:()=>p9,assertNever:()=>o9,assertNotEqual:()=>l9,assignProp:()=>WQ,base64ToUint8Array:()=>Jq,base64urlToUint8Array:()=>KH,cached:()=>_Q,captureStackTrace:()=>Z0,cleanEnum:()=>JH,cleanRegex:()=>EY,clone:()=>u,cloneDef:()=>u9,createTransparentProxy:()=>s9,defineLazy:()=>b,esc:()=>P0,escapeRegex:()=>e,extend:()=>qH,finalizeIssue:()=>r,floatSafeRemainder:()=>s6,getElementAtPath:()=>n9,getEnumValues:()=>R0,getLengthableOrigin:()=>IY,getParsedType:()=>e9,getSizableOrigin:()=>OY,hexToUint8Array:()=>NH,isObject:()=>LQ,isPlainObject:()=>BQ,issue:()=>UY,joinValues:()=>M,jsonStringifyReplacer:()=>BY,merge:()=>GH,mergeDefs:()=>QQ,normalizeParams:()=>P,nullish:()=>wQ,numKeys:()=>i9,objectClone:()=>r9,omit:()=>YH,optionalKeys:()=>Gq,parsedType:()=>V,partial:()=>HH,pick:()=>QH,prefixIssues:()=>a,primitiveTypes:()=>Xq,promiseAllObject:()=>t9,propertyKeyTypes:()=>NY,randomString:()=>a9,required:()=>WH,safeExtend:()=>XH,shallowClone:()=>qq,slugify:()=>Qq,stringifyPrimitive:()=>I,uint8ArrayToBase64:()=>Kq,uint8ArrayToBase64url:()=>BH,uint8ArrayToHex:()=>UH,unwrapMessage:()=>kQ});function c9(Q){return Q}function l9(Q){return Q}function p9(Q){}function o9(Q){throw Error("Unexpected value in exhaustive check")}function d9(Q){}function R0(Q){let q=Object.values(Q).filter((H)=>typeof H==="number");return Object.entries(Q).filter(([H,Y])=>q.indexOf(+H)===-1).map(([H,Y])=>Y)}function M(Q,q="|"){return Q.map((G)=>I(G)).join(q)}function BY(Q,q){if(typeof q==="bigint")return q.toString();return q}function _Q(Q){return{get value(){{let G=Q();return Object.defineProperty(this,"value",{value:G}),G}throw Error("cached value already set")}}}function wQ(Q){return Q===null||Q===void 0}function EY(Q){let q=Q.startsWith("^")?1:0,G=Q.endsWith("$")?Q.length-1:Q.length;return Q.slice(q,G)}function s6(Q,q){let G=(Q.toString().split(".")[1]||"").length,H=q.toString(),Y=(H.split(".")[1]||"").length;if(Y===0&&/\d?e-\d?/.test(H)){let K=H.match(/\d?e-(\d?)/);if(K?.[1])Y=Number.parseInt(K[1])}let X=G>Y?G:Y,W=Number.parseInt(Q.toFixed(X).replace(".","")),J=Number.parseInt(q.toFixed(X).replace(".",""));return W%J/10**X}var E6=Symbol("evaluating");function b(Q,q,G){let H=void 0;Object.defineProperty(Q,q,{get(){if(H===E6)return;if(H===void 0)H=E6,H=G();return H},set(Y){Object.defineProperty(Q,q,{value:Y})},configurable:!0})}function r9(Q){return Object.create(Object.getPrototypeOf(Q),Object.getOwnPropertyDescriptors(Q))}function WQ(Q,q,G){Object.defineProperty(Q,q,{value:G,writable:!0,enumerable:!0,configurable:!0})}function QQ(...Q){let q={};for(let G of Q){let H=Object.getOwnPropertyDescriptors(G);Object.assign(q,H)}return Object.defineProperties({},q)}function u9(Q){return QQ(Q._zod.def)}function n9(Q,q){if(!q)return Q;return q.reduce((G,H)=>G?.[H],Q)}function t9(Q){let q=Object.keys(Q),G=q.map((H)=>Q[H]);return Promise.all(G).then((H)=>{let Y={};for(let X=0;X<q.length;X++)Y[q[X]]=H[X];return Y})}function a9(Q=10){let G="";for(let H=0;H<Q;H++)G+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return G}function P0(Q){return JSON.stringify(Q)}function Qq(Q){return Q.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Z0="captureStackTrace"in Error?Error.captureStackTrace:(...Q)=>{};function LQ(Q){return typeof Q==="object"&&Q!==null&&!Array.isArray(Q)}var Yq=_Q(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(Q){return!1}});function BQ(Q){if(LQ(Q)===!1)return!1;let q=Q.constructor;if(q===void 0)return!0;if(typeof q!=="function")return!0;let G=q.prototype;if(LQ(G)===!1)return!1;if(Object.prototype.hasOwnProperty.call(G,"isPrototypeOf")===!1)return!1;return!0}function qq(Q){if(BQ(Q))return{...Q};if(Array.isArray(Q))return[...Q];return Q}function i9(Q){let q=0;for(let G in Q)if(Object.prototype.hasOwnProperty.call(Q,G))q++;return q}var e9=(Q)=>{let q=typeof Q;switch(q){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(Q)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(Q))return"array";if(Q===null)return"null";if(Q.then&&typeof Q.then==="function"&&Q.catch&&typeof Q.catch==="function")return"promise";if(typeof Map<"u"&&Q instanceof Map)return"map";if(typeof Set<"u"&&Q instanceof Set)return"set";if(typeof Date<"u"&&Q instanceof Date)return"date";if(typeof File<"u"&&Q instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${q}`)}},NY=new Set(["string","number","symbol"]),Xq=new Set(["string","number","bigint","boolean","symbol","undefined"]);function e(Q){return Q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function u(Q,q,G){let H=new Q._zod.constr(q??Q._zod.def);if(!q||G?.parent)H._zod.parent=Q;return H}function P(Q){let q=Q;if(!q)return{};if(typeof q==="string")return{error:()=>q};if(q?.message!==void 0){if(q?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");q.error=q.message}if(delete q.message,typeof q.error==="string")return{...q,error:()=>q.error};return q}function s9(Q){let q;return new Proxy({},{get(G,H,Y){return q??(q=Q()),Reflect.get(q,H,Y)},set(G,H,Y,X){return q??(q=Q()),Reflect.set(q,H,Y,X)},has(G,H){return q??(q=Q()),Reflect.has(q,H)},deleteProperty(G,H){return q??(q=Q()),Reflect.deleteProperty(q,H)},ownKeys(G){return q??(q=Q()),Reflect.ownKeys(q)},getOwnPropertyDescriptor(G,H){return q??(q=Q()),Reflect.getOwnPropertyDescriptor(q,H)},defineProperty(G,H,Y){return q??(q=Q()),Reflect.defineProperty(q,H,Y)}})}function I(Q){if(typeof Q==="bigint")return Q.toString()+"n";if(typeof Q==="string")return`"${Q}"`;return`${Q}`}function Gq(Q){return Object.keys(Q).filter((q)=>{return Q[q]._zod.optin==="optional"&&Q[q]._zod.optout==="optional"})}var Hq={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Wq={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function QH(Q,q){let G=Q._zod.def,H=G.checks;if(H&&H.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let X=QQ(Q._zod.def,{get shape(){let W={};for(let J in q){if(!(J in G.shape))throw Error(`Unrecognized key: "${J}"`);if(!q[J])continue;W[J]=G.shape[J]}return WQ(this,"shape",W),W},checks:[]});return u(Q,X)}function YH(Q,q){let G=Q._zod.def,H=G.checks;if(H&&H.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let X=QQ(Q._zod.def,{get shape(){let W={...Q._zod.def.shape};for(let J in q){if(!(J in G.shape))throw Error(`Unrecognized key: "${J}"`);if(!q[J])continue;delete W[J]}return WQ(this,"shape",W),W},checks:[]});return u(Q,X)}function qH(Q,q){if(!BQ(q))throw Error("Invalid input to extend: expected a plain object");let G=Q._zod.def.checks;if(G&&G.length>0){let X=Q._zod.def.shape;for(let W in q)if(Object.getOwnPropertyDescriptor(X,W)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let Y=QQ(Q._zod.def,{get shape(){let X={...Q._zod.def.shape,...q};return WQ(this,"shape",X),X}});return u(Q,Y)}function XH(Q,q){if(!BQ(q))throw Error("Invalid input to safeExtend: expected a plain object");let G=QQ(Q._zod.def,{get shape(){let H={...Q._zod.def.shape,...q};return WQ(this,"shape",H),H}});return u(Q,G)}function GH(Q,q){let G=QQ(Q._zod.def,{get shape(){let H={...Q._zod.def.shape,...q._zod.def.shape};return WQ(this,"shape",H),H},get catchall(){return q._zod.def.catchall},checks:[]});return u(Q,G)}function HH(Q,q,G){let Y=q._zod.def.checks;if(Y&&Y.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let W=QQ(q._zod.def,{get shape(){let J=q._zod.def.shape,K={...J};if(G)for(let B in G){if(!(B in J))throw Error(`Unrecognized key: "${B}"`);if(!G[B])continue;K[B]=Q?new Q({type:"optional",innerType:J[B]}):J[B]}else for(let B in J)K[B]=Q?new Q({type:"optional",innerType:J[B]}):J[B];return WQ(this,"shape",K),K},checks:[]});return u(q,W)}function WH(Q,q,G){let H=QQ(q._zod.def,{get shape(){let Y=q._zod.def.shape,X={...Y};if(G)for(let W in G){if(!(W in X))throw Error(`Unrecognized key: "${W}"`);if(!G[W])continue;X[W]=new Q({type:"nonoptional",innerType:Y[W]})}else for(let W in Y)X[W]=new Q({type:"nonoptional",innerType:Y[W]});return WQ(this,"shape",X),X}});return u(q,H)}function JQ(Q,q=0){if(Q.aborted===!0)return!0;for(let G=q;G<Q.issues.length;G++)if(Q.issues[G]?.continue!==!0)return!0;return!1}function a(Q,q){return q.map((G)=>{var H;return(H=G).path??(H.path=[]),G.path.unshift(Q),G})}function kQ(Q){return typeof Q==="string"?Q:Q?.message}function r(Q,q,G){let H={...Q,path:Q.path??[]};if(!Q.message){let Y=kQ(Q.inst?._zod.def?.error?.(Q))??kQ(q?.error?.(Q))??kQ(G.customError?.(Q))??kQ(G.localeError?.(Q))??"Invalid input";H.message=Y}if(delete H.inst,delete H.continue,!q?.reportInput)delete H.input;return H}function OY(Q){if(Q instanceof Set)return"set";if(Q instanceof Map)return"map";if(Q instanceof File)return"file";return"unknown"}function IY(Q){if(Array.isArray(Q))return"array";if(typeof Q==="string")return"string";return"unknown"}function V(Q){let q=typeof Q;switch(q){case"number":return Number.isNaN(Q)?"nan":"number";case"object":{if(Q===null)return"null";if(Array.isArray(Q))return"array";let G=Q;if(G&&Object.getPrototypeOf(G)!==Object.prototype&&"constructor"in G&&G.constructor)return G.constructor.name}}return q}function UY(...Q){let[q,G,H]=Q;if(typeof q==="string")return{message:q,code:"custom",input:G,inst:H};return{...q}}function JH(Q){return Object.entries(Q).filter(([q,G])=>{return Number.isNaN(Number.parseInt(q,10))}).map((q)=>q[1])}function Jq(Q){let q=atob(Q),G=new Uint8Array(q.length);for(let H=0;H<q.length;H++)G[H]=q.charCodeAt(H);return G}function Kq(Q){let q="";for(let G=0;G<Q.length;G++)q+=String.fromCharCode(Q[G]);return btoa(q)}function KH(Q){let q=Q.replace(/-/g,"+").replace(/_/g,"/"),G="=".repeat((4-q.length%4)%4);return Jq(q+G)}function BH(Q){return Kq(Q).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function NH(Q){let q=Q.replace(/^0x/,"");if(q.length%2!==0)throw Error("Invalid hex string length");let G=new Uint8Array(q.length/2);for(let H=0;H<q.length;H+=2)G[H/2]=Number.parseInt(q.slice(H,H+2),16);return G}function UH(Q){return Array.from(Q).map((q)=>q.toString(16).padStart(2,"0")).join("")}var wH=class{constructor(...Q){}},Bq=(Q,q)=>{Q.name="$ZodError",Object.defineProperty(Q,"_zod",{value:Q._zod,enumerable:!1}),Object.defineProperty(Q,"issues",{value:q,enumerable:!1}),Q.message=JSON.stringify(q,BY,2),Object.defineProperty(Q,"toString",{value:()=>Q.message,enumerable:!1})},D0=U("$ZodError",Bq),l=U("$ZodError",Bq,{Parent:Error});function b0(Q,q=(G)=>G.message){let G={},H=[];for(let Y of Q.issues)if(Y.path.length>0)G[Y.path[0]]=G[Y.path[0]]||[],G[Y.path[0]].push(q(Y));else H.push(q(Y));return{formErrors:H,fieldErrors:G}}function C0(Q,q=(G)=>G.message){let G={_errors:[]},H=(Y)=>{for(let X of Y.issues)if(X.code==="invalid_union"&&X.errors.length)X.errors.map((W)=>H({issues:W}));else if(X.code==="invalid_key")H({issues:X.issues});else if(X.code==="invalid_element")H({issues:X.issues});else if(X.path.length===0)G._errors.push(q(X));else{let W=G,J=0;while(J<X.path.length){let K=X.path[J];if(J!==X.path.length-1)W[K]=W[K]||{_errors:[]};else W[K]=W[K]||{_errors:[]},W[K]._errors.push(q(X));W=W[K],J++}}};return H(Q),G}function Nq(Q,q=(G)=>G.message){let G={errors:[]},H=(Y,X=[])=>{var W,J;for(let K of Y.issues)if(K.code==="invalid_union"&&K.errors.length)K.errors.map((B)=>H({issues:B},K.path));else if(K.code==="invalid_key")H({issues:K.issues},K.path);else if(K.code==="invalid_element")H({issues:K.issues},K.path);else{let B=[...X,...K.path];if(B.length===0){G.errors.push(q(K));continue}let N=G,w=0;while(w<B.length){let L=B[w],A=w===B.length-1;if(typeof L==="string")N.properties??(N.properties={}),(W=N.properties)[L]??(W[L]={errors:[]}),N=N.properties[L];else N.items??(N.items=[]),(J=N.items)[L]??(J[L]={errors:[]}),N=N.items[L];if(A)N.errors.push(q(K));w++}}};return H(Q),G}function Uq(Q){let q=[],G=Q.map((H)=>typeof H==="object"?H.key:H);for(let H of G)if(typeof H==="number")q.push(`[${H}]`);else if(typeof H==="symbol")q.push(`[${JSON.stringify(String(H))}]`);else if(/[^\w$]/.test(H))q.push(`[${JSON.stringify(H)}]`);else{if(q.length)q.push(".");q.push(H)}return q.join("")}function wq(Q){let q=[],G=[...Q.issues].sort((H,Y)=>(H.path??[]).length-(Y.path??[]).length);for(let H of G)if(q.push(`\u2716 ${H.message}`),H.path?.length)q.push(` \u2192 at ${Uq(H.path)}`);return q.join(`
2
+ import{kf as n6,lf as L0,mf as t6}from"./chunk-g3ch14a1.js";import{Bp as A0,Dp as JY,Ep as M0,Lp as o6,Mp as d6,Np as r6,Rp as u6,So as F0,Zo as PY,gp as CQ,lp as l6,pp as p6}from"./chunk-bzrsnv2k.js";import{Zp as w0,eq as qQ}from"./chunk-d0qqgxs4.js";import"./chunk-cqtkxwd8.js";import"./chunk-v00cptj6.js";import"./chunk-j2zay4da.js";import"./chunk-4vemws1t.js";import"./chunk-yjj4cvqg.js";var y9=Object.defineProperty,s=(Q,q)=>{for(var G in q)y9(Q,G,{get:q[G],enumerable:!0})},f9="2.0.1";function m9({tools:Q,toolChoice:q}){Q=Q?.length?Q:void 0;let G=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:G};let H=[];for(let X of Q)if(X.type==="provider")G.push({type:"unsupported",feature:`provider-defined tool ${X.id}`});else H.push({type:"function",function:{name:X.name,description:X.description,parameters:X.inputSchema,...X.strict!=null?{strict:X.strict}:{}}});if(q==null)return{tools:H,toolChoice:void 0,toolWarnings:G};let Y=q.type;switch(Y){case"auto":case"none":case"required":return{tools:H,toolChoice:Y,toolWarnings:G};case"tool":return{tools:H,toolChoice:{type:"function",function:{name:q.toolName}},toolWarnings:G};default:throw new qQ({functionality:`tool choice type: ${Y}`})}}function $6(Q){if(Q==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};return{inputTokens:{total:Q.total_tokens??void 0,noCache:Q.prompt_tokens??void 0,cacheRead:Q.prompt_tokens_details?.cached_tokens??void 0,cacheWrite:Q.prompt_tokens_details?.cache_creation_input_tokens??void 0},outputTokens:{total:Q.completion_tokens??void 0,text:void 0,reasoning:void 0},raw:Q}}var F={};s(F,{$brand:()=>e6,$input:()=>SG,$output:()=>TG,NEVER:()=>i6,TimePrecision:()=>xG,ZodAny:()=>_1,ZodArray:()=>y1,ZodBase64:()=>tY,ZodBase64URL:()=>aY,ZodBigInt:()=>iQ,ZodBigIntFormat:()=>sY,ZodBoolean:()=>aQ,ZodCIDRv4:()=>uY,ZodCIDRv6:()=>nY,ZodCUID:()=>mY,ZodCUID2:()=>cY,ZodCatch:()=>W6,ZodCodec:()=>K0,ZodCustom:()=>qY,ZodCustomStringFormat:()=>ZQ,ZodDate:()=>Y0,ZodDefault:()=>Q6,ZodDiscriminatedUnion:()=>m1,ZodE164:()=>iY,ZodEmail:()=>gY,ZodEmoji:()=>yY,ZodEnum:()=>VQ,ZodError:()=>HK,ZodExactOptional:()=>i1,ZodFile:()=>t1,ZodFirstPartyTypeKind:()=>V0,ZodFunction:()=>M6,ZodGUID:()=>SQ,ZodIPv4:()=>dY,ZodIPv6:()=>rY,ZodISODate:()=>Z1,ZodISODateTime:()=>R1,ZodISODuration:()=>b1,ZodISOTime:()=>D1,ZodIntersection:()=>c1,ZodIssueCode:()=>WK,ZodJWT:()=>eY,ZodKSUID:()=>oY,ZodLazy:()=>w6,ZodLiteral:()=>n1,ZodMAC:()=>C1,ZodMap:()=>r1,ZodNaN:()=>K6,ZodNanoID:()=>fY,ZodNever:()=>h1,ZodNonOptional:()=>W0,ZodNull:()=>j1,ZodNullable:()=>s1,ZodNumber:()=>tQ,ZodNumberFormat:()=>AQ,ZodObject:()=>sQ,ZodOptional:()=>H0,ZodPipe:()=>J0,ZodPrefault:()=>q6,ZodPromise:()=>A6,ZodReadonly:()=>B6,ZodRealError:()=>p,ZodRecord:()=>YY,ZodSet:()=>u1,ZodString:()=>uQ,ZodStringFormat:()=>S,ZodSuccess:()=>H6,ZodSymbol:()=>S1,ZodTemplateLiteral:()=>U6,ZodTransform:()=>a1,ZodTuple:()=>p1,ZodType:()=>D,ZodULID:()=>lY,ZodURL:()=>nQ,ZodUUID:()=>i,ZodUndefined:()=>z1,ZodUnion:()=>QY,ZodUnknown:()=>x1,ZodVoid:()=>g1,ZodXID:()=>pY,ZodXor:()=>f1,_ZodString:()=>hY,_default:()=>Y6,_function:()=>LY,any:()=>H9,array:()=>eQ,base64:()=>l2,base64url:()=>p2,bigint:()=>Q9,boolean:()=>T1,catch:()=>J6,check:()=>C9,cidrv4:()=>m2,cidrv6:()=>c2,clone:()=>u,codec:()=>Z9,coerce:()=>h9,config:()=>h,core:()=>a6,cuid:()=>j2,cuid2:()=>v2,custom:()=>k9,date:()=>J9,decode:()=>M2,decodeAsync:()=>P2,describe:()=>T9,discriminatedUnion:()=>F9,e164:()=>o2,email:()=>V2,emoji:()=>S2,encode:()=>A2,encodeAsync:()=>L2,endsWith:()=>TY,enum:()=>X0,exactOptional:()=>e1,file:()=>O9,flattenError:()=>b0,float32:()=>a2,float64:()=>i2,formatError:()=>C0,fromJSONSchema:()=>wK,function:()=>LY,getErrorMap:()=>KK,globalRegistry:()=>o,gt:()=>GQ,gte:()=>m,guid:()=>R2,hash:()=>t2,hex:()=>n2,hostname:()=>u2,httpUrl:()=>T2,includes:()=>CY,instanceof:()=>z9,int:()=>MY,int32:()=>e2,int64:()=>Y9,intersection:()=>l1,ipv4:()=>g2,ipv6:()=>f2,iso:()=>V1,json:()=>v9,jwt:()=>d2,keyof:()=>K9,ksuid:()=>h2,lazy:()=>F6,length:()=>dQ,literal:()=>E9,locales:()=>u0,looseObject:()=>U9,looseRecord:()=>M9,lowercase:()=>DY,lt:()=>XQ,lte:()=>d,mac:()=>y2,map:()=>L9,maxLength:()=>oQ,maxSize:()=>RQ,meta:()=>S9,mime:()=>SY,minLength:()=>NQ,minSize:()=>HQ,multipleOf:()=>$Q,nan:()=>R9,nanoid:()=>z2,nativeEnum:()=>$9,negative:()=>L1,never:()=>Q0,nonnegative:()=>$1,nonoptional:()=>G6,nonpositive:()=>P1,normalize:()=>zY,null:()=>v1,nullable:()=>jQ,nullish:()=>I9,number:()=>k1,object:()=>B9,optional:()=>zQ,overwrite:()=>YQ,parse:()=>N2,parseAsync:()=>U2,partialRecord:()=>A9,pipe:()=>vQ,positive:()=>M1,prefault:()=>X6,preprocess:()=>_9,prettifyError:()=>wq,promise:()=>b9,property:()=>E1,readonly:()=>N6,record:()=>d1,refine:()=>L6,regex:()=>ZY,regexes:()=>FQ,registry:()=>n0,safeDecode:()=>E2,safeDecodeAsync:()=>I2,safeEncode:()=>$2,safeEncodeAsync:()=>O2,safeParse:()=>w2,safeParseAsync:()=>F2,set:()=>P9,setErrorMap:()=>JK,size:()=>pQ,slugify:()=>xY,startsWith:()=>kY,strictObject:()=>N9,string:()=>AY,stringFormat:()=>r2,stringbool:()=>j9,success:()=>V9,superRefine:()=>P6,symbol:()=>X9,templateLiteral:()=>D9,toJSONSchema:()=>q2,toLowerCase:()=>vY,toUpperCase:()=>_Y,transform:()=>G0,treeifyError:()=>Nq,trim:()=>jY,tuple:()=>o1,uint32:()=>s2,uint64:()=>q9,ulid:()=>_2,undefined:()=>G9,union:()=>q0,unknown:()=>UQ,uppercase:()=>bY,url:()=>k2,util:()=>C,uuid:()=>Z2,uuidv4:()=>D2,uuidv6:()=>b2,uuidv7:()=>C2,void:()=>W9,xid:()=>x2,xor:()=>w9});var a6={};s(a6,{$ZodAny:()=>dX,$ZodArray:()=>aX,$ZodAsyncError:()=>KQ,$ZodBase64:()=>vX,$ZodBase64URL:()=>xX,$ZodBigInt:()=>p0,$ZodBigIntFormat:()=>cX,$ZodBoolean:()=>l0,$ZodCIDRv4:()=>zX,$ZodCIDRv6:()=>jX,$ZodCUID:()=>EX,$ZodCUID2:()=>OX,$ZodCatch:()=>PG,$ZodCheck:()=>j,$ZodCheckBigIntFormat:()=>tq,$ZodCheckEndsWith:()=>JX,$ZodCheckGreaterThan:()=>f0,$ZodCheckIncludes:()=>HX,$ZodCheckLengthEquals:()=>YX,$ZodCheckLessThan:()=>y0,$ZodCheckLowerCase:()=>XX,$ZodCheckMaxLength:()=>sq,$ZodCheckMaxSize:()=>aq,$ZodCheckMimeType:()=>BX,$ZodCheckMinLength:()=>QX,$ZodCheckMinSize:()=>iq,$ZodCheckMultipleOf:()=>uq,$ZodCheckNumberFormat:()=>nq,$ZodCheckOverwrite:()=>NX,$ZodCheckProperty:()=>KX,$ZodCheckRegex:()=>qX,$ZodCheckSizeEquals:()=>eq,$ZodCheckStartsWith:()=>WX,$ZodCheckStringFormat:()=>cQ,$ZodCheckUpperCase:()=>GX,$ZodCodec:()=>r0,$ZodCustom:()=>DG,$ZodCustomStringFormat:()=>fX,$ZodDate:()=>tX,$ZodDefault:()=>FG,$ZodDiscriminatedUnion:()=>qG,$ZodE164:()=>hX,$ZodEmail:()=>MX,$ZodEmoji:()=>PX,$ZodEncodeError:()=>$Y,$ZodEnum:()=>JG,$ZodError:()=>D0,$ZodExactOptional:()=>UG,$ZodFile:()=>BG,$ZodFunction:()=>VG,$ZodGUID:()=>FX,$ZodIPv4:()=>kX,$ZodIPv6:()=>TX,$ZodISODate:()=>DX,$ZodISODateTime:()=>ZX,$ZodISODuration:()=>CX,$ZodISOTime:()=>bX,$ZodIntersection:()=>XG,$ZodJWT:()=>yX,$ZodKSUID:()=>RX,$ZodLazy:()=>ZG,$ZodLiteral:()=>KG,$ZodMAC:()=>SX,$ZodMap:()=>HG,$ZodNaN:()=>$G,$ZodNanoID:()=>$X,$ZodNever:()=>uX,$ZodNonOptional:()=>MG,$ZodNull:()=>oX,$ZodNullable:()=>wG,$ZodNumber:()=>c0,$ZodNumberFormat:()=>mX,$ZodObject:()=>sX,$ZodObjectJIT:()=>QG,$ZodOptional:()=>d0,$ZodPipe:()=>EG,$ZodPrefault:()=>AG,$ZodPromise:()=>RG,$ZodReadonly:()=>OG,$ZodRealError:()=>l,$ZodRecord:()=>GG,$ZodRegistry:()=>zG,$ZodSet:()=>WG,$ZodString:()=>lQ,$ZodStringFormat:()=>T,$ZodSuccess:()=>LG,$ZodSymbol:()=>lX,$ZodTemplateLiteral:()=>IG,$ZodTransform:()=>NG,$ZodTuple:()=>o0,$ZodType:()=>Z,$ZodULID:()=>IX,$ZodURL:()=>LX,$ZodUUID:()=>AX,$ZodUndefined:()=>pX,$ZodUnion:()=>VY,$ZodUnknown:()=>rX,$ZodVoid:()=>nX,$ZodXID:()=>VX,$ZodXor:()=>YG,$brand:()=>e6,$constructor:()=>U,$input:()=>SG,$output:()=>TG,Doc:()=>UX,JSONSchema:()=>GK,JSONSchemaGenerator:()=>XK,NEVER:()=>i6,TimePrecision:()=>xG,_any:()=>q8,_array:()=>B8,_base64:()=>U1,_base64url:()=>w1,_bigint:()=>tG,_boolean:()=>uG,_catch:()=>aJ,_check:()=>A8,_cidrv4:()=>B1,_cidrv6:()=>N1,_coercedBigint:()=>aG,_coercedBoolean:()=>nG,_coercedDate:()=>J8,_coercedNumber:()=>cG,_coercedString:()=>vG,_cuid:()=>q1,_cuid2:()=>X1,_custom:()=>U8,_date:()=>W8,_decode:()=>T0,_decodeAsync:()=>z0,_default:()=>uJ,_discriminatedUnion:()=>xJ,_e164:()=>F1,_email:()=>t0,_emoji:()=>Q1,_encode:()=>k0,_encodeAsync:()=>S0,_endsWith:()=>TY,_enum:()=>cJ,_file:()=>N8,_float32:()=>pG,_float64:()=>oG,_gt:()=>GQ,_gte:()=>m,_guid:()=>FY,_includes:()=>CY,_int:()=>lG,_int32:()=>dG,_int64:()=>iG,_intersection:()=>hJ,_ipv4:()=>J1,_ipv6:()=>K1,_isoDate:()=>gG,_isoDateTime:()=>hG,_isoDuration:()=>fG,_isoTime:()=>yG,_jwt:()=>A1,_ksuid:()=>W1,_lazy:()=>QK,_length:()=>dQ,_literal:()=>pJ,_lowercase:()=>DY,_lt:()=>XQ,_lte:()=>d,_mac:()=>_G,_map:()=>fJ,_max:()=>d,_maxLength:()=>oQ,_maxSize:()=>RQ,_mime:()=>SY,_min:()=>m,_minLength:()=>NQ,_minSize:()=>HQ,_multipleOf:()=>$Q,_nan:()=>K8,_nanoid:()=>Y1,_nativeEnum:()=>lJ,_negative:()=>L1,_never:()=>G8,_nonnegative:()=>$1,_nonoptional:()=>nJ,_nonpositive:()=>P1,_normalize:()=>zY,_null:()=>Y8,_nullable:()=>rJ,_number:()=>mG,_optional:()=>dJ,_overwrite:()=>YQ,_parse:()=>xQ,_parseAsync:()=>hQ,_pipe:()=>iJ,_positive:()=>M1,_promise:()=>YK,_property:()=>E1,_readonly:()=>eJ,_record:()=>yJ,_refine:()=>w8,_regex:()=>ZY,_safeDecode:()=>v0,_safeDecodeAsync:()=>x0,_safeEncode:()=>j0,_safeEncodeAsync:()=>_0,_safeParse:()=>gQ,_safeParseAsync:()=>yQ,_set:()=>mJ,_size:()=>pQ,_slugify:()=>xY,_startsWith:()=>kY,_string:()=>jG,_stringFormat:()=>rQ,_stringbool:()=>P8,_success:()=>tJ,_superRefine:()=>F8,_symbol:()=>sG,_templateLiteral:()=>sJ,_toLowerCase:()=>vY,_toUpperCase:()=>_Y,_transform:()=>oJ,_trim:()=>jY,_tuple:()=>gJ,_uint32:()=>rG,_uint64:()=>eG,_ulid:()=>G1,_undefined:()=>Q8,_union:()=>vJ,_unknown:()=>X8,_uppercase:()=>bY,_url:()=>RY,_uuid:()=>a0,_uuidv4:()=>i0,_uuidv6:()=>e0,_uuidv7:()=>s0,_void:()=>H8,_xid:()=>H1,_xor:()=>_J,clone:()=>u,config:()=>h,createStandardJSONSchemaMethod:()=>TQ,createToJSONSchemaMethod:()=>$8,decode:()=>AH,decodeAsync:()=>LH,describe:()=>M8,encode:()=>FH,encodeAsync:()=>MH,extractDefs:()=>OQ,finalize:()=>IQ,flattenError:()=>b0,formatError:()=>C0,globalConfig:()=>KY,globalRegistry:()=>o,initializeContext:()=>EQ,isValidBase64:()=>m0,isValidBase64URL:()=>_X,isValidJWT:()=>gX,locales:()=>u0,meta:()=>L8,parse:()=>$0,parseAsync:()=>E0,prettifyError:()=>wq,process:()=>k,regexes:()=>FQ,registry:()=>n0,safeDecode:()=>$H,safeDecodeAsync:()=>OH,safeEncode:()=>PH,safeEncodeAsync:()=>EH,safeParse:()=>Fq,safeParseAsync:()=>Aq,toDotPath:()=>Uq,toJSONSchema:()=>q2,treeifyError:()=>Nq,util:()=>C,version:()=>wX});var i6=Object.freeze({status:"aborted"});function U(Q,q,G){function H(J,K){if(!J._zod)Object.defineProperty(J,"_zod",{value:{def:K,constr:W,traits:new Set},enumerable:!1});if(J._zod.traits.has(Q))return;J._zod.traits.add(Q),q(J,K);let B=W.prototype,N=Object.keys(B);for(let w=0;w<N.length;w++){let L=N[w];if(!(L in J))J[L]=B[L].bind(J)}}let Y=G?.Parent??Object;class X extends Y{}Object.defineProperty(X,"name",{value:Q});function W(J){var K;let B=G?.Parent?new X:this;H(B,J),(K=B._zod).deferred??(K.deferred=[]);for(let N of B._zod.deferred)N();return B}return Object.defineProperty(W,"init",{value:H}),Object.defineProperty(W,Symbol.hasInstance,{value:(J)=>{if(G?.Parent&&J instanceof G.Parent)return!0;return J?._zod?.traits?.has(Q)}}),Object.defineProperty(W,"name",{value:Q}),W}var e6=Symbol("zod_brand"),KQ=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},$Y=class extends Error{constructor(Q){super(`Encountered unidirectional transform during encode: ${Q}`);this.name="ZodEncodeError"}},KY={};function h(Q){if(Q)Object.assign(KY,Q);return KY}var C={};s(C,{BIGINT_FORMAT_RANGES:()=>Wq,Class:()=>wH,NUMBER_FORMAT_RANGES:()=>Hq,aborted:()=>JQ,allowsEval:()=>Yq,assert:()=>d9,assertEqual:()=>c9,assertIs:()=>p9,assertNever:()=>o9,assertNotEqual:()=>l9,assignProp:()=>WQ,base64ToUint8Array:()=>Jq,base64urlToUint8Array:()=>KH,cached:()=>_Q,captureStackTrace:()=>Z0,cleanEnum:()=>JH,cleanRegex:()=>EY,clone:()=>u,cloneDef:()=>u9,createTransparentProxy:()=>s9,defineLazy:()=>b,esc:()=>P0,escapeRegex:()=>e,extend:()=>qH,finalizeIssue:()=>r,floatSafeRemainder:()=>s6,getElementAtPath:()=>n9,getEnumValues:()=>R0,getLengthableOrigin:()=>IY,getParsedType:()=>e9,getSizableOrigin:()=>OY,hexToUint8Array:()=>NH,isObject:()=>LQ,isPlainObject:()=>BQ,issue:()=>UY,joinValues:()=>M,jsonStringifyReplacer:()=>BY,merge:()=>GH,mergeDefs:()=>QQ,normalizeParams:()=>P,nullish:()=>wQ,numKeys:()=>i9,objectClone:()=>r9,omit:()=>YH,optionalKeys:()=>Gq,parsedType:()=>V,partial:()=>HH,pick:()=>QH,prefixIssues:()=>a,primitiveTypes:()=>Xq,promiseAllObject:()=>t9,propertyKeyTypes:()=>NY,randomString:()=>a9,required:()=>WH,safeExtend:()=>XH,shallowClone:()=>qq,slugify:()=>Qq,stringifyPrimitive:()=>I,uint8ArrayToBase64:()=>Kq,uint8ArrayToBase64url:()=>BH,uint8ArrayToHex:()=>UH,unwrapMessage:()=>kQ});function c9(Q){return Q}function l9(Q){return Q}function p9(Q){}function o9(Q){throw Error("Unexpected value in exhaustive check")}function d9(Q){}function R0(Q){let q=Object.values(Q).filter((H)=>typeof H==="number");return Object.entries(Q).filter(([H,Y])=>q.indexOf(+H)===-1).map(([H,Y])=>Y)}function M(Q,q="|"){return Q.map((G)=>I(G)).join(q)}function BY(Q,q){if(typeof q==="bigint")return q.toString();return q}function _Q(Q){return{get value(){{let G=Q();return Object.defineProperty(this,"value",{value:G}),G}throw Error("cached value already set")}}}function wQ(Q){return Q===null||Q===void 0}function EY(Q){let q=Q.startsWith("^")?1:0,G=Q.endsWith("$")?Q.length-1:Q.length;return Q.slice(q,G)}function s6(Q,q){let G=(Q.toString().split(".")[1]||"").length,H=q.toString(),Y=(H.split(".")[1]||"").length;if(Y===0&&/\d?e-\d?/.test(H)){let K=H.match(/\d?e-(\d?)/);if(K?.[1])Y=Number.parseInt(K[1])}let X=G>Y?G:Y,W=Number.parseInt(Q.toFixed(X).replace(".","")),J=Number.parseInt(q.toFixed(X).replace(".",""));return W%J/10**X}var E6=Symbol("evaluating");function b(Q,q,G){let H=void 0;Object.defineProperty(Q,q,{get(){if(H===E6)return;if(H===void 0)H=E6,H=G();return H},set(Y){Object.defineProperty(Q,q,{value:Y})},configurable:!0})}function r9(Q){return Object.create(Object.getPrototypeOf(Q),Object.getOwnPropertyDescriptors(Q))}function WQ(Q,q,G){Object.defineProperty(Q,q,{value:G,writable:!0,enumerable:!0,configurable:!0})}function QQ(...Q){let q={};for(let G of Q){let H=Object.getOwnPropertyDescriptors(G);Object.assign(q,H)}return Object.defineProperties({},q)}function u9(Q){return QQ(Q._zod.def)}function n9(Q,q){if(!q)return Q;return q.reduce((G,H)=>G?.[H],Q)}function t9(Q){let q=Object.keys(Q),G=q.map((H)=>Q[H]);return Promise.all(G).then((H)=>{let Y={};for(let X=0;X<q.length;X++)Y[q[X]]=H[X];return Y})}function a9(Q=10){let G="";for(let H=0;H<Q;H++)G+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return G}function P0(Q){return JSON.stringify(Q)}function Qq(Q){return Q.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Z0="captureStackTrace"in Error?Error.captureStackTrace:(...Q)=>{};function LQ(Q){return typeof Q==="object"&&Q!==null&&!Array.isArray(Q)}var Yq=_Q(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(Q){return!1}});function BQ(Q){if(LQ(Q)===!1)return!1;let q=Q.constructor;if(q===void 0)return!0;if(typeof q!=="function")return!0;let G=q.prototype;if(LQ(G)===!1)return!1;if(Object.prototype.hasOwnProperty.call(G,"isPrototypeOf")===!1)return!1;return!0}function qq(Q){if(BQ(Q))return{...Q};if(Array.isArray(Q))return[...Q];return Q}function i9(Q){let q=0;for(let G in Q)if(Object.prototype.hasOwnProperty.call(Q,G))q++;return q}var e9=(Q)=>{let q=typeof Q;switch(q){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(Q)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(Q))return"array";if(Q===null)return"null";if(Q.then&&typeof Q.then==="function"&&Q.catch&&typeof Q.catch==="function")return"promise";if(typeof Map<"u"&&Q instanceof Map)return"map";if(typeof Set<"u"&&Q instanceof Set)return"set";if(typeof Date<"u"&&Q instanceof Date)return"date";if(typeof File<"u"&&Q instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${q}`)}},NY=new Set(["string","number","symbol"]),Xq=new Set(["string","number","bigint","boolean","symbol","undefined"]);function e(Q){return Q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function u(Q,q,G){let H=new Q._zod.constr(q??Q._zod.def);if(!q||G?.parent)H._zod.parent=Q;return H}function P(Q){let q=Q;if(!q)return{};if(typeof q==="string")return{error:()=>q};if(q?.message!==void 0){if(q?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");q.error=q.message}if(delete q.message,typeof q.error==="string")return{...q,error:()=>q.error};return q}function s9(Q){let q;return new Proxy({},{get(G,H,Y){return q??(q=Q()),Reflect.get(q,H,Y)},set(G,H,Y,X){return q??(q=Q()),Reflect.set(q,H,Y,X)},has(G,H){return q??(q=Q()),Reflect.has(q,H)},deleteProperty(G,H){return q??(q=Q()),Reflect.deleteProperty(q,H)},ownKeys(G){return q??(q=Q()),Reflect.ownKeys(q)},getOwnPropertyDescriptor(G,H){return q??(q=Q()),Reflect.getOwnPropertyDescriptor(q,H)},defineProperty(G,H,Y){return q??(q=Q()),Reflect.defineProperty(q,H,Y)}})}function I(Q){if(typeof Q==="bigint")return Q.toString()+"n";if(typeof Q==="string")return`"${Q}"`;return`${Q}`}function Gq(Q){return Object.keys(Q).filter((q)=>{return Q[q]._zod.optin==="optional"&&Q[q]._zod.optout==="optional"})}var Hq={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Wq={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function QH(Q,q){let G=Q._zod.def,H=G.checks;if(H&&H.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let X=QQ(Q._zod.def,{get shape(){let W={};for(let J in q){if(!(J in G.shape))throw Error(`Unrecognized key: "${J}"`);if(!q[J])continue;W[J]=G.shape[J]}return WQ(this,"shape",W),W},checks:[]});return u(Q,X)}function YH(Q,q){let G=Q._zod.def,H=G.checks;if(H&&H.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let X=QQ(Q._zod.def,{get shape(){let W={...Q._zod.def.shape};for(let J in q){if(!(J in G.shape))throw Error(`Unrecognized key: "${J}"`);if(!q[J])continue;delete W[J]}return WQ(this,"shape",W),W},checks:[]});return u(Q,X)}function qH(Q,q){if(!BQ(q))throw Error("Invalid input to extend: expected a plain object");let G=Q._zod.def.checks;if(G&&G.length>0){let X=Q._zod.def.shape;for(let W in q)if(Object.getOwnPropertyDescriptor(X,W)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let Y=QQ(Q._zod.def,{get shape(){let X={...Q._zod.def.shape,...q};return WQ(this,"shape",X),X}});return u(Q,Y)}function XH(Q,q){if(!BQ(q))throw Error("Invalid input to safeExtend: expected a plain object");let G=QQ(Q._zod.def,{get shape(){let H={...Q._zod.def.shape,...q};return WQ(this,"shape",H),H}});return u(Q,G)}function GH(Q,q){let G=QQ(Q._zod.def,{get shape(){let H={...Q._zod.def.shape,...q._zod.def.shape};return WQ(this,"shape",H),H},get catchall(){return q._zod.def.catchall},checks:[]});return u(Q,G)}function HH(Q,q,G){let Y=q._zod.def.checks;if(Y&&Y.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let W=QQ(q._zod.def,{get shape(){let J=q._zod.def.shape,K={...J};if(G)for(let B in G){if(!(B in J))throw Error(`Unrecognized key: "${B}"`);if(!G[B])continue;K[B]=Q?new Q({type:"optional",innerType:J[B]}):J[B]}else for(let B in J)K[B]=Q?new Q({type:"optional",innerType:J[B]}):J[B];return WQ(this,"shape",K),K},checks:[]});return u(q,W)}function WH(Q,q,G){let H=QQ(q._zod.def,{get shape(){let Y=q._zod.def.shape,X={...Y};if(G)for(let W in G){if(!(W in X))throw Error(`Unrecognized key: "${W}"`);if(!G[W])continue;X[W]=new Q({type:"nonoptional",innerType:Y[W]})}else for(let W in Y)X[W]=new Q({type:"nonoptional",innerType:Y[W]});return WQ(this,"shape",X),X}});return u(q,H)}function JQ(Q,q=0){if(Q.aborted===!0)return!0;for(let G=q;G<Q.issues.length;G++)if(Q.issues[G]?.continue!==!0)return!0;return!1}function a(Q,q){return q.map((G)=>{var H;return(H=G).path??(H.path=[]),G.path.unshift(Q),G})}function kQ(Q){return typeof Q==="string"?Q:Q?.message}function r(Q,q,G){let H={...Q,path:Q.path??[]};if(!Q.message){let Y=kQ(Q.inst?._zod.def?.error?.(Q))??kQ(q?.error?.(Q))??kQ(G.customError?.(Q))??kQ(G.localeError?.(Q))??"Invalid input";H.message=Y}if(delete H.inst,delete H.continue,!q?.reportInput)delete H.input;return H}function OY(Q){if(Q instanceof Set)return"set";if(Q instanceof Map)return"map";if(Q instanceof File)return"file";return"unknown"}function IY(Q){if(Array.isArray(Q))return"array";if(typeof Q==="string")return"string";return"unknown"}function V(Q){let q=typeof Q;switch(q){case"number":return Number.isNaN(Q)?"nan":"number";case"object":{if(Q===null)return"null";if(Array.isArray(Q))return"array";let G=Q;if(G&&Object.getPrototypeOf(G)!==Object.prototype&&"constructor"in G&&G.constructor)return G.constructor.name}}return q}function UY(...Q){let[q,G,H]=Q;if(typeof q==="string")return{message:q,code:"custom",input:G,inst:H};return{...q}}function JH(Q){return Object.entries(Q).filter(([q,G])=>{return Number.isNaN(Number.parseInt(q,10))}).map((q)=>q[1])}function Jq(Q){let q=atob(Q),G=new Uint8Array(q.length);for(let H=0;H<q.length;H++)G[H]=q.charCodeAt(H);return G}function Kq(Q){let q="";for(let G=0;G<Q.length;G++)q+=String.fromCharCode(Q[G]);return btoa(q)}function KH(Q){let q=Q.replace(/-/g,"+").replace(/_/g,"/"),G="=".repeat((4-q.length%4)%4);return Jq(q+G)}function BH(Q){return Kq(Q).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function NH(Q){let q=Q.replace(/^0x/,"");if(q.length%2!==0)throw Error("Invalid hex string length");let G=new Uint8Array(q.length/2);for(let H=0;H<q.length;H+=2)G[H/2]=Number.parseInt(q.slice(H,H+2),16);return G}function UH(Q){return Array.from(Q).map((q)=>q.toString(16).padStart(2,"0")).join("")}var wH=class{constructor(...Q){}},Bq=(Q,q)=>{Q.name="$ZodError",Object.defineProperty(Q,"_zod",{value:Q._zod,enumerable:!1}),Object.defineProperty(Q,"issues",{value:q,enumerable:!1}),Q.message=JSON.stringify(q,BY,2),Object.defineProperty(Q,"toString",{value:()=>Q.message,enumerable:!1})},D0=U("$ZodError",Bq),l=U("$ZodError",Bq,{Parent:Error});function b0(Q,q=(G)=>G.message){let G={},H=[];for(let Y of Q.issues)if(Y.path.length>0)G[Y.path[0]]=G[Y.path[0]]||[],G[Y.path[0]].push(q(Y));else H.push(q(Y));return{formErrors:H,fieldErrors:G}}function C0(Q,q=(G)=>G.message){let G={_errors:[]},H=(Y)=>{for(let X of Y.issues)if(X.code==="invalid_union"&&X.errors.length)X.errors.map((W)=>H({issues:W}));else if(X.code==="invalid_key")H({issues:X.issues});else if(X.code==="invalid_element")H({issues:X.issues});else if(X.path.length===0)G._errors.push(q(X));else{let W=G,J=0;while(J<X.path.length){let K=X.path[J];if(J!==X.path.length-1)W[K]=W[K]||{_errors:[]};else W[K]=W[K]||{_errors:[]},W[K]._errors.push(q(X));W=W[K],J++}}};return H(Q),G}function Nq(Q,q=(G)=>G.message){let G={errors:[]},H=(Y,X=[])=>{var W,J;for(let K of Y.issues)if(K.code==="invalid_union"&&K.errors.length)K.errors.map((B)=>H({issues:B},K.path));else if(K.code==="invalid_key")H({issues:K.issues},K.path);else if(K.code==="invalid_element")H({issues:K.issues},K.path);else{let B=[...X,...K.path];if(B.length===0){G.errors.push(q(K));continue}let N=G,w=0;while(w<B.length){let L=B[w],A=w===B.length-1;if(typeof L==="string")N.properties??(N.properties={}),(W=N.properties)[L]??(W[L]={errors:[]}),N=N.properties[L];else N.items??(N.items=[]),(J=N.items)[L]??(J[L]={errors:[]}),N=N.items[L];if(A)N.errors.push(q(K));w++}}};return H(Q),G}function Uq(Q){let q=[],G=Q.map((H)=>typeof H==="object"?H.key:H);for(let H of G)if(typeof H==="number")q.push(`[${H}]`);else if(typeof H==="symbol")q.push(`[${JSON.stringify(String(H))}]`);else if(/[^\w$]/.test(H))q.push(`[${JSON.stringify(H)}]`);else{if(q.length)q.push(".");q.push(H)}return q.join("")}function wq(Q){let q=[],G=[...Q.issues].sort((H,Y)=>(H.path??[]).length-(Y.path??[]).length);for(let H of G)if(q.push(`\u2716 ${H.message}`),H.path?.length)q.push(` \u2192 at ${Uq(H.path)}`);return q.join(`
3
3
  `)}var xQ=(Q)=>(q,G,H,Y)=>{let X=H?Object.assign(H,{async:!1}):{async:!1},W=q._zod.run({value:G,issues:[]},X);if(W instanceof Promise)throw new KQ;if(W.issues.length){let J=new(Y?.Err??Q)(W.issues.map((K)=>r(K,X,h())));throw Z0(J,Y?.callee),J}return W.value},$0=xQ(l),hQ=(Q)=>async(q,G,H,Y)=>{let X=H?Object.assign(H,{async:!0}):{async:!0},W=q._zod.run({value:G,issues:[]},X);if(W instanceof Promise)W=await W;if(W.issues.length){let J=new(Y?.Err??Q)(W.issues.map((K)=>r(K,X,h())));throw Z0(J,Y?.callee),J}return W.value},E0=hQ(l),gQ=(Q)=>(q,G,H)=>{let Y=H?{...H,async:!1}:{async:!1},X=q._zod.run({value:G,issues:[]},Y);if(X instanceof Promise)throw new KQ;return X.issues.length?{success:!1,error:new(Q??D0)(X.issues.map((W)=>r(W,Y,h())))}:{success:!0,data:X.value}},Fq=gQ(l),yQ=(Q)=>async(q,G,H)=>{let Y=H?Object.assign(H,{async:!0}):{async:!0},X=q._zod.run({value:G,issues:[]},Y);if(X instanceof Promise)X=await X;return X.issues.length?{success:!1,error:new Q(X.issues.map((W)=>r(W,Y,h())))}:{success:!0,data:X.value}},Aq=yQ(l),k0=(Q)=>(q,G,H)=>{let Y=H?Object.assign(H,{direction:"backward"}):{direction:"backward"};return xQ(Q)(q,G,Y)},FH=k0(l),T0=(Q)=>(q,G,H)=>{return xQ(Q)(q,G,H)},AH=T0(l),S0=(Q)=>async(q,G,H)=>{let Y=H?Object.assign(H,{direction:"backward"}):{direction:"backward"};return hQ(Q)(q,G,Y)},MH=S0(l),z0=(Q)=>async(q,G,H)=>{return hQ(Q)(q,G,H)},LH=z0(l),j0=(Q)=>(q,G,H)=>{let Y=H?Object.assign(H,{direction:"backward"}):{direction:"backward"};return gQ(Q)(q,G,Y)},PH=j0(l),v0=(Q)=>(q,G,H)=>{return gQ(Q)(q,G,H)},$H=v0(l),_0=(Q)=>async(q,G,H)=>{let Y=H?Object.assign(H,{direction:"backward"}):{direction:"backward"};return yQ(Q)(q,G,Y)},EH=_0(l),x0=(Q)=>async(q,G,H)=>{return yQ(Q)(q,G,H)},OH=x0(l),FQ={};s(FQ,{base64:()=>zq,base64url:()=>h0,bigint:()=>fq,boolean:()=>cq,browserEmail:()=>kH,cidrv4:()=>Tq,cidrv6:()=>Sq,cuid:()=>Mq,cuid2:()=>Lq,date:()=>_q,datetime:()=>gq,domain:()=>zH,duration:()=>Iq,e164:()=>jq,email:()=>Rq,emoji:()=>Dq,extendedDuration:()=>IH,guid:()=>Vq,hex:()=>jH,hostname:()=>SH,html5Email:()=>DH,idnEmail:()=>CH,integer:()=>mq,ipv4:()=>bq,ipv6:()=>Cq,ksuid:()=>Eq,lowercase:()=>oq,mac:()=>kq,md5_base64:()=>_H,md5_base64url:()=>xH,md5_hex:()=>vH,nanoid:()=>Oq,null:()=>lq,number:()=>g0,rfc5322Email:()=>bH,sha1_base64:()=>gH,sha1_base64url:()=>yH,sha1_hex:()=>hH,sha256_base64:()=>mH,sha256_base64url:()=>cH,sha256_hex:()=>fH,sha384_base64:()=>pH,sha384_base64url:()=>oH,sha384_hex:()=>lH,sha512_base64:()=>rH,sha512_base64url:()=>uH,sha512_hex:()=>dH,string:()=>yq,time:()=>hq,ulid:()=>Pq,undefined:()=>pq,unicodeEmail:()=>Zq,uppercase:()=>dq,uuid:()=>PQ,uuid4:()=>VH,uuid6:()=>RH,uuid7:()=>ZH,xid:()=>$q});var Mq=/^[cC][^\s-]{8,}$/,Lq=/^[0-9a-z]+$/,Pq=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,$q=/^[0-9a-vA-V]{20}$/,Eq=/^[A-Za-z0-9]{27}$/,Oq=/^[a-zA-Z0-9_-]{21}$/,Iq=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,IH=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Vq=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,PQ=(Q)=>{if(!Q)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${Q}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},VH=PQ(4),RH=PQ(6),ZH=PQ(7),Rq=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,DH=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,bH=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Zq=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,CH=Zq,kH=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,TH="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Dq(){return new RegExp(TH,"u")}var bq=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Cq=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,kq=(Q)=>{let q=e(Q??":");return new RegExp(`^(?:[0-9A-F]{2}${q}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${q}){5}[0-9a-f]{2}$`)},Tq=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Sq=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zq=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,h0=/^[A-Za-z0-9_-]*$/,SH=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,zH=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,jq=/^\+[1-9]\d{6,14}$/,vq="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",_q=new RegExp(`^${vq}$`);function xq(Q){return typeof Q.precision==="number"?Q.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":Q.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${Q.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function hq(Q){return new RegExp(`^${xq(Q)}$`)}function gq(Q){let q=xq({precision:Q.precision}),G=["Z"];if(Q.local)G.push("");if(Q.offset)G.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let H=`${q}(?:${G.join("|")})`;return new RegExp(`^${vq}T(?:${H})$`)}var yq=(Q)=>{let q=Q?`[\\s\\S]{${Q?.minimum??0},${Q?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${q}$`)},fq=/^-?\d+n?$/,mq=/^-?\d+$/,g0=/^-?\d+(?:\.\d+)?$/,cq=/^(?:true|false)$/i,lq=/^null$/i,pq=/^undefined$/i,oq=/^[^A-Z]*$/,dq=/^[^a-z]*$/,jH=/^[0-9a-fA-F]*$/;function fQ(Q,q){return new RegExp(`^[A-Za-z0-9+/]{${Q}}${q}$`)}function mQ(Q){return new RegExp(`^[A-Za-z0-9_-]{${Q}}$`)}var vH=/^[0-9a-fA-F]{32}$/,_H=fQ(22,"=="),xH=mQ(22),hH=/^[0-9a-fA-F]{40}$/,gH=fQ(27,"="),yH=mQ(27),fH=/^[0-9a-fA-F]{64}$/,mH=fQ(43,"="),cH=mQ(43),lH=/^[0-9a-fA-F]{96}$/,pH=fQ(64,""),oH=mQ(64),dH=/^[0-9a-fA-F]{128}$/,rH=fQ(86,"=="),uH=mQ(86),j=U("$ZodCheck",(Q,q)=>{var G;Q._zod??(Q._zod={}),Q._zod.def=q,(G=Q._zod).onattach??(G.onattach=[])}),rq={number:"number",bigint:"bigint",object:"date"},y0=U("$ZodCheckLessThan",(Q,q)=>{j.init(Q,q);let G=rq[typeof q.value];Q._zod.onattach.push((H)=>{let Y=H._zod.bag,X=(q.inclusive?Y.maximum:Y.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(q.value<X)if(q.inclusive)Y.maximum=q.value;else Y.exclusiveMaximum=q.value}),Q._zod.check=(H)=>{if(q.inclusive?H.value<=q.value:H.value<q.value)return;H.issues.push({origin:G,code:"too_big",maximum:typeof q.value==="object"?q.value.getTime():q.value,input:H.value,inclusive:q.inclusive,inst:Q,continue:!q.abort})}}),f0=U("$ZodCheckGreaterThan",(Q,q)=>{j.init(Q,q);let G=rq[typeof q.value];Q._zod.onattach.push((H)=>{let Y=H._zod.bag,X=(q.inclusive?Y.minimum:Y.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(q.value>X)if(q.inclusive)Y.minimum=q.value;else Y.exclusiveMinimum=q.value}),Q._zod.check=(H)=>{if(q.inclusive?H.value>=q.value:H.value>q.value)return;H.issues.push({origin:G,code:"too_small",minimum:typeof q.value==="object"?q.value.getTime():q.value,input:H.value,inclusive:q.inclusive,inst:Q,continue:!q.abort})}}),uq=U("$ZodCheckMultipleOf",(Q,q)=>{j.init(Q,q),Q._zod.onattach.push((G)=>{var H;(H=G._zod.bag).multipleOf??(H.multipleOf=q.value)}),Q._zod.check=(G)=>{if(typeof G.value!==typeof q.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof G.value==="bigint"?G.value%q.value===BigInt(0):s6(G.value,q.value)===0)return;G.issues.push({origin:typeof G.value,code:"not_multiple_of",divisor:q.value,input:G.value,inst:Q,continue:!q.abort})}}),nq=U("$ZodCheckNumberFormat",(Q,q)=>{j.init(Q,q),q.format=q.format||"float64";let G=q.format?.includes("int"),H=G?"int":"number",[Y,X]=Hq[q.format];Q._zod.onattach.push((W)=>{let J=W._zod.bag;if(J.format=q.format,J.minimum=Y,J.maximum=X,G)J.pattern=mq}),Q._zod.check=(W)=>{let J=W.value;if(G){if(!Number.isInteger(J)){W.issues.push({expected:H,format:q.format,code:"invalid_type",continue:!1,input:J,inst:Q});return}if(!Number.isSafeInteger(J)){if(J>0)W.issues.push({input:J,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:Q,origin:H,inclusive:!0,continue:!q.abort});else W.issues.push({input:J,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:Q,origin:H,inclusive:!0,continue:!q.abort});return}}if(J<Y)W.issues.push({origin:"number",input:J,code:"too_small",minimum:Y,inclusive:!0,inst:Q,continue:!q.abort});if(J>X)W.issues.push({origin:"number",input:J,code:"too_big",maximum:X,inclusive:!0,inst:Q,continue:!q.abort})}}),tq=U("$ZodCheckBigIntFormat",(Q,q)=>{j.init(Q,q);let[G,H]=Wq[q.format];Q._zod.onattach.push((Y)=>{let X=Y._zod.bag;X.format=q.format,X.minimum=G,X.maximum=H}),Q._zod.check=(Y)=>{let X=Y.value;if(X<G)Y.issues.push({origin:"bigint",input:X,code:"too_small",minimum:G,inclusive:!0,inst:Q,continue:!q.abort});if(X>H)Y.issues.push({origin:"bigint",input:X,code:"too_big",maximum:H,inclusive:!0,inst:Q,continue:!q.abort})}}),aq=U("$ZodCheckMaxSize",(Q,q)=>{var G;j.init(Q,q),(G=Q._zod.def).when??(G.when=(H)=>{let Y=H.value;return!wQ(Y)&&Y.size!==void 0}),Q._zod.onattach.push((H)=>{let Y=H._zod.bag.maximum??Number.POSITIVE_INFINITY;if(q.maximum<Y)H._zod.bag.maximum=q.maximum}),Q._zod.check=(H)=>{let Y=H.value;if(Y.size<=q.maximum)return;H.issues.push({origin:OY(Y),code:"too_big",maximum:q.maximum,inclusive:!0,input:Y,inst:Q,continue:!q.abort})}}),iq=U("$ZodCheckMinSize",(Q,q)=>{var G;j.init(Q,q),(G=Q._zod.def).when??(G.when=(H)=>{let Y=H.value;return!wQ(Y)&&Y.size!==void 0}),Q._zod.onattach.push((H)=>{let Y=H._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(q.minimum>Y)H._zod.bag.minimum=q.minimum}),Q._zod.check=(H)=>{let Y=H.value;if(Y.size>=q.minimum)return;H.issues.push({origin:OY(Y),code:"too_small",minimum:q.minimum,inclusive:!0,input:Y,inst:Q,continue:!q.abort})}}),eq=U("$ZodCheckSizeEquals",(Q,q)=>{var G;j.init(Q,q),(G=Q._zod.def).when??(G.when=(H)=>{let Y=H.value;return!wQ(Y)&&Y.size!==void 0}),Q._zod.onattach.push((H)=>{let Y=H._zod.bag;Y.minimum=q.size,Y.maximum=q.size,Y.size=q.size}),Q._zod.check=(H)=>{let Y=H.value,X=Y.size;if(X===q.size)return;let W=X>q.size;H.issues.push({origin:OY(Y),...W?{code:"too_big",maximum:q.size}:{code:"too_small",minimum:q.size},inclusive:!0,exact:!0,input:H.value,inst:Q,continue:!q.abort})}}),sq=U("$ZodCheckMaxLength",(Q,q)=>{var G;j.init(Q,q),(G=Q._zod.def).when??(G.when=(H)=>{let Y=H.value;return!wQ(Y)&&Y.length!==void 0}),Q._zod.onattach.push((H)=>{let Y=H._zod.bag.maximum??Number.POSITIVE_INFINITY;if(q.maximum<Y)H._zod.bag.maximum=q.maximum}),Q._zod.check=(H)=>{let Y=H.value;if(Y.length<=q.maximum)return;let W=IY(Y);H.issues.push({origin:W,code:"too_big",maximum:q.maximum,inclusive:!0,input:Y,inst:Q,continue:!q.abort})}}),QX=U("$ZodCheckMinLength",(Q,q)=>{var G;j.init(Q,q),(G=Q._zod.def).when??(G.when=(H)=>{let Y=H.value;return!wQ(Y)&&Y.length!==void 0}),Q._zod.onattach.push((H)=>{let Y=H._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(q.minimum>Y)H._zod.bag.minimum=q.minimum}),Q._zod.check=(H)=>{let Y=H.value;if(Y.length>=q.minimum)return;let W=IY(Y);H.issues.push({origin:W,code:"too_small",minimum:q.minimum,inclusive:!0,input:Y,inst:Q,continue:!q.abort})}}),YX=U("$ZodCheckLengthEquals",(Q,q)=>{var G;j.init(Q,q),(G=Q._zod.def).when??(G.when=(H)=>{let Y=H.value;return!wQ(Y)&&Y.length!==void 0}),Q._zod.onattach.push((H)=>{let Y=H._zod.bag;Y.minimum=q.length,Y.maximum=q.length,Y.length=q.length}),Q._zod.check=(H)=>{let Y=H.value,X=Y.length;if(X===q.length)return;let W=IY(Y),J=X>q.length;H.issues.push({origin:W,...J?{code:"too_big",maximum:q.length}:{code:"too_small",minimum:q.length},inclusive:!0,exact:!0,input:H.value,inst:Q,continue:!q.abort})}}),cQ=U("$ZodCheckStringFormat",(Q,q)=>{var G,H;if(j.init(Q,q),Q._zod.onattach.push((Y)=>{let X=Y._zod.bag;if(X.format=q.format,q.pattern)X.patterns??(X.patterns=new Set),X.patterns.add(q.pattern)}),q.pattern)(G=Q._zod).check??(G.check=(Y)=>{if(q.pattern.lastIndex=0,q.pattern.test(Y.value))return;Y.issues.push({origin:"string",code:"invalid_format",format:q.format,input:Y.value,...q.pattern?{pattern:q.pattern.toString()}:{},inst:Q,continue:!q.abort})});else(H=Q._zod).check??(H.check=()=>{})}),qX=U("$ZodCheckRegex",(Q,q)=>{cQ.init(Q,q),Q._zod.check=(G)=>{if(q.pattern.lastIndex=0,q.pattern.test(G.value))return;G.issues.push({origin:"string",code:"invalid_format",format:"regex",input:G.value,pattern:q.pattern.toString(),inst:Q,continue:!q.abort})}}),XX=U("$ZodCheckLowerCase",(Q,q)=>{q.pattern??(q.pattern=oq),cQ.init(Q,q)}),GX=U("$ZodCheckUpperCase",(Q,q)=>{q.pattern??(q.pattern=dq),cQ.init(Q,q)}),HX=U("$ZodCheckIncludes",(Q,q)=>{j.init(Q,q);let G=e(q.includes),H=new RegExp(typeof q.position==="number"?`^.{${q.position}}${G}`:G);q.pattern=H,Q._zod.onattach.push((Y)=>{let X=Y._zod.bag;X.patterns??(X.patterns=new Set),X.patterns.add(H)}),Q._zod.check=(Y)=>{if(Y.value.includes(q.includes,q.position))return;Y.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:q.includes,input:Y.value,inst:Q,continue:!q.abort})}}),WX=U("$ZodCheckStartsWith",(Q,q)=>{j.init(Q,q);let G=new RegExp(`^${e(q.prefix)}.*`);q.pattern??(q.pattern=G),Q._zod.onattach.push((H)=>{let Y=H._zod.bag;Y.patterns??(Y.patterns=new Set),Y.patterns.add(G)}),Q._zod.check=(H)=>{if(H.value.startsWith(q.prefix))return;H.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:q.prefix,input:H.value,inst:Q,continue:!q.abort})}}),JX=U("$ZodCheckEndsWith",(Q,q)=>{j.init(Q,q);let G=new RegExp(`.*${e(q.suffix)}$`);q.pattern??(q.pattern=G),Q._zod.onattach.push((H)=>{let Y=H._zod.bag;Y.patterns??(Y.patterns=new Set),Y.patterns.add(G)}),Q._zod.check=(H)=>{if(H.value.endsWith(q.suffix))return;H.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:q.suffix,input:H.value,inst:Q,continue:!q.abort})}});function O6(Q,q,G){if(Q.issues.length)q.issues.push(...a(G,Q.issues))}var KX=U("$ZodCheckProperty",(Q,q)=>{j.init(Q,q),Q._zod.check=(G)=>{let H=q.schema._zod.run({value:G.value[q.property],issues:[]},{});if(H instanceof Promise)return H.then((Y)=>O6(Y,G,q.property));O6(H,G,q.property);return}}),BX=U("$ZodCheckMimeType",(Q,q)=>{j.init(Q,q);let G=new Set(q.mime);Q._zod.onattach.push((H)=>{H._zod.bag.mime=q.mime}),Q._zod.check=(H)=>{if(G.has(H.value.type))return;H.issues.push({code:"invalid_value",values:q.mime,input:H.value.type,inst:Q,continue:!q.abort})}}),NX=U("$ZodCheckOverwrite",(Q,q)=>{j.init(Q,q),Q._zod.check=(G)=>{G.value=q.tx(G.value)}}),UX=class{constructor(Q=[]){if(this.content=[],this.indent=0,this)this.args=Q}indented(Q){this.indent+=1,Q(this),this.indent-=1}write(Q){if(typeof Q==="function"){Q(this,{execution:"sync"}),Q(this,{execution:"async"});return}let G=Q.split(`
4
4
  `).filter((X)=>X),H=Math.min(...G.map((X)=>X.length-X.trimStart().length)),Y=G.map((X)=>X.slice(H)).map((X)=>" ".repeat(this.indent*2)+X);for(let X of Y)this.content.push(X)}compile(){let Q=Function,q=this?.args,H=[...(this?.content??[""]).map((Y)=>` ${Y}`)];return new Q(...q,H.join(`
5
5
  `))}},wX={major:4,minor:3,patch:6},Z=U("$ZodType",(Q,q)=>{var G;Q??(Q={}),Q._zod.def=q,Q._zod.bag=Q._zod.bag||{},Q._zod.version=wX;let H=[...Q._zod.def.checks??[]];if(Q._zod.traits.has("$ZodCheck"))H.unshift(Q);for(let Y of H)for(let X of Y._zod.onattach)X(Q);if(H.length===0)(G=Q._zod).deferred??(G.deferred=[]),Q._zod.deferred?.push(()=>{Q._zod.run=Q._zod.parse});else{let Y=(W,J,K)=>{let B=JQ(W),N;for(let w of J){if(w._zod.def.when){if(!w._zod.def.when(W))continue}else if(B)continue;let L=W.issues.length,A=w._zod.check(W);if(A instanceof Promise&&K?.async===!1)throw new KQ;if(N||A instanceof Promise)N=(N??Promise.resolve()).then(async()=>{if(await A,W.issues.length===L)return;if(!B)B=JQ(W,L)});else{if(W.issues.length===L)continue;if(!B)B=JQ(W,L)}}if(N)return N.then(()=>{return W});return W},X=(W,J,K)=>{if(JQ(W))return W.aborted=!0,W;let B=Y(J,H,K);if(B instanceof Promise){if(K.async===!1)throw new KQ;return B.then((N)=>Q._zod.parse(N,K))}return Q._zod.parse(B,K)};Q._zod.run=(W,J)=>{if(J.skipChecks)return Q._zod.parse(W,J);if(J.direction==="backward"){let B=Q._zod.parse({value:W.value,issues:[]},{...J,skipChecks:!0});if(B instanceof Promise)return B.then((N)=>{return X(N,W,J)});return X(B,W,J)}let K=Q._zod.parse(W,J);if(K instanceof Promise){if(J.async===!1)throw new KQ;return K.then((B)=>Y(B,H,J))}return Y(K,H,J)}}b(Q,"~standard",()=>({validate:(Y)=>{try{let X=Fq(Q,Y);return X.success?{value:X.data}:{issues:X.error?.issues}}catch(X){return Aq(Q,Y).then((W)=>W.success?{value:W.data}:{issues:W.error?.issues})}},vendor:"zod",version:1}))}),lQ=U("$ZodString",(Q,q)=>{Z.init(Q,q),Q._zod.pattern=[...Q?._zod.bag?.patterns??[]].pop()??yq(Q._zod.bag),Q._zod.parse=(G,H)=>{if(q.coerce)try{G.value=String(G.value)}catch(Y){}if(typeof G.value==="string")return G;return G.issues.push({expected:"string",code:"invalid_type",input:G.value,inst:Q}),G}}),T=U("$ZodStringFormat",(Q,q)=>{cQ.init(Q,q),lQ.init(Q,q)}),FX=U("$ZodGUID",(Q,q)=>{q.pattern??(q.pattern=Vq),T.init(Q,q)}),AX=U("$ZodUUID",(Q,q)=>{if(q.version){let H={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[q.version];if(H===void 0)throw Error(`Invalid UUID version: "${q.version}"`);q.pattern??(q.pattern=PQ(H))}else q.pattern??(q.pattern=PQ());T.init(Q,q)}),MX=U("$ZodEmail",(Q,q)=>{q.pattern??(q.pattern=Rq),T.init(Q,q)}),LX=U("$ZodURL",(Q,q)=>{T.init(Q,q),Q._zod.check=(G)=>{try{let H=G.value.trim(),Y=new URL(H);if(q.hostname){if(q.hostname.lastIndex=0,!q.hostname.test(Y.hostname))G.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:q.hostname.source,input:G.value,inst:Q,continue:!q.abort})}if(q.protocol){if(q.protocol.lastIndex=0,!q.protocol.test(Y.protocol.endsWith(":")?Y.protocol.slice(0,-1):Y.protocol))G.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:q.protocol.source,input:G.value,inst:Q,continue:!q.abort})}if(q.normalize)G.value=Y.href;else G.value=H;return}catch(H){G.issues.push({code:"invalid_format",format:"url",input:G.value,inst:Q,continue:!q.abort})}}}),PX=U("$ZodEmoji",(Q,q)=>{q.pattern??(q.pattern=Dq()),T.init(Q,q)}),$X=U("$ZodNanoID",(Q,q)=>{q.pattern??(q.pattern=Oq),T.init(Q,q)}),EX=U("$ZodCUID",(Q,q)=>{q.pattern??(q.pattern=Mq),T.init(Q,q)}),OX=U("$ZodCUID2",(Q,q)=>{q.pattern??(q.pattern=Lq),T.init(Q,q)}),IX=U("$ZodULID",(Q,q)=>{q.pattern??(q.pattern=Pq),T.init(Q,q)}),VX=U("$ZodXID",(Q,q)=>{q.pattern??(q.pattern=$q),T.init(Q,q)}),RX=U("$ZodKSUID",(Q,q)=>{q.pattern??(q.pattern=Eq),T.init(Q,q)}),ZX=U("$ZodISODateTime",(Q,q)=>{q.pattern??(q.pattern=gq(q)),T.init(Q,q)}),DX=U("$ZodISODate",(Q,q)=>{q.pattern??(q.pattern=_q),T.init(Q,q)}),bX=U("$ZodISOTime",(Q,q)=>{q.pattern??(q.pattern=hq(q)),T.init(Q,q)}),CX=U("$ZodISODuration",(Q,q)=>{q.pattern??(q.pattern=Iq),T.init(Q,q)}),kX=U("$ZodIPv4",(Q,q)=>{q.pattern??(q.pattern=bq),T.init(Q,q),Q._zod.bag.format="ipv4"}),TX=U("$ZodIPv6",(Q,q)=>{q.pattern??(q.pattern=Cq),T.init(Q,q),Q._zod.bag.format="ipv6",Q._zod.check=(G)=>{try{new URL(`http://[${G.value}]`)}catch{G.issues.push({code:"invalid_format",format:"ipv6",input:G.value,inst:Q,continue:!q.abort})}}}),SX=U("$ZodMAC",(Q,q)=>{q.pattern??(q.pattern=kq(q.delimiter)),T.init(Q,q),Q._zod.bag.format="mac"}),zX=U("$ZodCIDRv4",(Q,q)=>{q.pattern??(q.pattern=Tq),T.init(Q,q)}),jX=U("$ZodCIDRv6",(Q,q)=>{q.pattern??(q.pattern=Sq),T.init(Q,q),Q._zod.check=(G)=>{let H=G.value.split("/");try{if(H.length!==2)throw Error();let[Y,X]=H;if(!X)throw Error();let W=Number(X);if(`${W}`!==X)throw Error();if(W<0||W>128)throw Error();new URL(`http://[${Y}]`)}catch{G.issues.push({code:"invalid_format",format:"cidrv6",input:G.value,inst:Q,continue:!q.abort})}}});function m0(Q){if(Q==="")return!0;if(Q.length%4!==0)return!1;try{return atob(Q),!0}catch{return!1}}var vX=U("$ZodBase64",(Q,q)=>{q.pattern??(q.pattern=zq),T.init(Q,q),Q._zod.bag.contentEncoding="base64",Q._zod.check=(G)=>{if(m0(G.value))return;G.issues.push({code:"invalid_format",format:"base64",input:G.value,inst:Q,continue:!q.abort})}});function _X(Q){if(!h0.test(Q))return!1;let q=Q.replace(/[-_]/g,(H)=>H==="-"?"+":"/"),G=q.padEnd(Math.ceil(q.length/4)*4,"=");return m0(G)}var xX=U("$ZodBase64URL",(Q,q)=>{q.pattern??(q.pattern=h0),T.init(Q,q),Q._zod.bag.contentEncoding="base64url",Q._zod.check=(G)=>{if(_X(G.value))return;G.issues.push({code:"invalid_format",format:"base64url",input:G.value,inst:Q,continue:!q.abort})}}),hX=U("$ZodE164",(Q,q)=>{q.pattern??(q.pattern=jq),T.init(Q,q)});function gX(Q,q=null){try{let G=Q.split(".");if(G.length!==3)return!1;let[H]=G;if(!H)return!1;let Y=JSON.parse(atob(H));if("typ"in Y&&Y?.typ!=="JWT")return!1;if(!Y.alg)return!1;if(q&&(!("alg"in Y)||Y.alg!==q))return!1;return!0}catch{return!1}}var yX=U("$ZodJWT",(Q,q)=>{T.init(Q,q),Q._zod.check=(G)=>{if(gX(G.value,q.alg))return;G.issues.push({code:"invalid_format",format:"jwt",input:G.value,inst:Q,continue:!q.abort})}}),fX=U("$ZodCustomStringFormat",(Q,q)=>{T.init(Q,q),Q._zod.check=(G)=>{if(q.fn(G.value))return;G.issues.push({code:"invalid_format",format:q.format,input:G.value,inst:Q,continue:!q.abort})}}),c0=U("$ZodNumber",(Q,q)=>{Z.init(Q,q),Q._zod.pattern=Q._zod.bag.pattern??g0,Q._zod.parse=(G,H)=>{if(q.coerce)try{G.value=Number(G.value)}catch(W){}let Y=G.value;if(typeof Y==="number"&&!Number.isNaN(Y)&&Number.isFinite(Y))return G;let X=typeof Y==="number"?Number.isNaN(Y)?"NaN":!Number.isFinite(Y)?"Infinity":void 0:void 0;return G.issues.push({expected:"number",code:"invalid_type",input:Y,inst:Q,...X?{received:X}:{}}),G}}),mX=U("$ZodNumberFormat",(Q,q)=>{nq.init(Q,q),c0.init(Q,q)}),l0=U("$ZodBoolean",(Q,q)=>{Z.init(Q,q),Q._zod.pattern=cq,Q._zod.parse=(G,H)=>{if(q.coerce)try{G.value=Boolean(G.value)}catch(X){}let Y=G.value;if(typeof Y==="boolean")return G;return G.issues.push({expected:"boolean",code:"invalid_type",input:Y,inst:Q}),G}}),p0=U("$ZodBigInt",(Q,q)=>{Z.init(Q,q),Q._zod.pattern=fq,Q._zod.parse=(G,H)=>{if(q.coerce)try{G.value=BigInt(G.value)}catch(Y){}if(typeof G.value==="bigint")return G;return G.issues.push({expected:"bigint",code:"invalid_type",input:G.value,inst:Q}),G}}),cX=U("$ZodBigIntFormat",(Q,q)=>{tq.init(Q,q),p0.init(Q,q)}),lX=U("$ZodSymbol",(Q,q)=>{Z.init(Q,q),Q._zod.parse=(G,H)=>{let Y=G.value;if(typeof Y==="symbol")return G;return G.issues.push({expected:"symbol",code:"invalid_type",input:Y,inst:Q}),G}}),pX=U("$ZodUndefined",(Q,q)=>{Z.init(Q,q),Q._zod.pattern=pq,Q._zod.values=new Set([void 0]),Q._zod.optin="optional",Q._zod.optout="optional",Q._zod.parse=(G,H)=>{let Y=G.value;if(typeof Y>"u")return G;return G.issues.push({expected:"undefined",code:"invalid_type",input:Y,inst:Q}),G}}),oX=U("$ZodNull",(Q,q)=>{Z.init(Q,q),Q._zod.pattern=lq,Q._zod.values=new Set([null]),Q._zod.parse=(G,H)=>{let Y=G.value;if(Y===null)return G;return G.issues.push({expected:"null",code:"invalid_type",input:Y,inst:Q}),G}}),dX=U("$ZodAny",(Q,q)=>{Z.init(Q,q),Q._zod.parse=(G)=>G}),rX=U("$ZodUnknown",(Q,q)=>{Z.init(Q,q),Q._zod.parse=(G)=>G}),uX=U("$ZodNever",(Q,q)=>{Z.init(Q,q),Q._zod.parse=(G,H)=>{return G.issues.push({expected:"never",code:"invalid_type",input:G.value,inst:Q}),G}}),nX=U("$ZodVoid",(Q,q)=>{Z.init(Q,q),Q._zod.parse=(G,H)=>{let Y=G.value;if(typeof Y>"u")return G;return G.issues.push({expected:"void",code:"invalid_type",input:Y,inst:Q}),G}}),tX=U("$ZodDate",(Q,q)=>{Z.init(Q,q),Q._zod.parse=(G,H)=>{if(q.coerce)try{G.value=new Date(G.value)}catch(J){}let Y=G.value,X=Y instanceof Date;if(X&&!Number.isNaN(Y.getTime()))return G;return G.issues.push({expected:"date",code:"invalid_type",input:Y,...X?{received:"Invalid Date"}:{},inst:Q}),G}});function I6(Q,q,G){if(Q.issues.length)q.issues.push(...a(G,Q.issues));q.value[G]=Q.value}var aX=U("$ZodArray",(Q,q)=>{Z.init(Q,q),Q._zod.parse=(G,H)=>{let Y=G.value;if(!Array.isArray(Y))return G.issues.push({expected:"array",code:"invalid_type",input:Y,inst:Q}),G;G.value=Array(Y.length);let X=[];for(let W=0;W<Y.length;W++){let J=Y[W],K=q.element._zod.run({value:J,issues:[]},H);if(K instanceof Promise)X.push(K.then((B)=>I6(B,G,W)));else I6(K,G,W)}if(X.length)return Promise.all(X).then(()=>G);return G}});function wY(Q,q,G,H,Y){if(Q.issues.length){if(Y&&!(G in H))return;q.issues.push(...a(G,Q.issues))}if(Q.value===void 0){if(G in H)q.value[G]=void 0}else q.value[G]=Q.value}function iX(Q){let q=Object.keys(Q.shape);for(let H of q)if(!Q.shape?.[H]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${H}": expected a Zod schema`);let G=Gq(Q.shape);return{...Q,keys:q,keySet:new Set(q),numKeys:q.length,optionalKeys:new Set(G)}}function eX(Q,q,G,H,Y,X){let W=[],J=Y.keySet,K=Y.catchall._zod,B=K.def.type,N=K.optout==="optional";for(let w in q){if(J.has(w))continue;if(B==="never"){W.push(w);continue}let L=K.run({value:q[w],issues:[]},H);if(L instanceof Promise)Q.push(L.then((A)=>wY(A,G,w,q,N)));else wY(L,G,w,q,N)}if(W.length)G.issues.push({code:"unrecognized_keys",keys:W,input:q,inst:X});if(!Q.length)return G;return Promise.all(Q).then(()=>{return G})}var sX=U("$ZodObject",(Q,q)=>{if(Z.init(Q,q),!Object.getOwnPropertyDescriptor(q,"shape")?.get){let J=q.shape;Object.defineProperty(q,"shape",{get:()=>{let K={...J};return Object.defineProperty(q,"shape",{value:K}),K}})}let H=_Q(()=>iX(q));b(Q._zod,"propValues",()=>{let J=q.shape,K={};for(let B in J){let N=J[B]._zod;if(N.values){K[B]??(K[B]=new Set);for(let w of N.values)K[B].add(w)}}return K});let Y=LQ,X=q.catchall,W;Q._zod.parse=(J,K)=>{W??(W=H.value);let B=J.value;if(!Y(B))return J.issues.push({expected:"object",code:"invalid_type",input:B,inst:Q}),J;J.value={};let N=[],w=W.shape;for(let L of W.keys){let A=w[L],R=A._zod.optout==="optional",E=A._zod.run({value:B[L],issues:[]},K);if(E instanceof Promise)N.push(E.then((O)=>wY(O,J,L,B,R)));else wY(E,J,L,B,R)}if(!X)return N.length?Promise.all(N).then(()=>J):J;return eX(N,B,J,K,H.value,Q)}}),QG=U("$ZodObjectJIT",(Q,q)=>{sX.init(Q,q);let G=Q._zod.parse,H=_Q(()=>iX(q)),Y=(L)=>{let A=new UX(["shape","payload","ctx"]),R=H.value,E=(v)=>{let _=P0(v);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};A.write("const input = payload.value;");let O=Object.create(null),n=0;for(let v of R.keys)O[v]=`key_${n++}`;A.write("const newResult = {};");for(let v of R.keys){let _=O[v],z=P0(v),g=L[v]?._zod?.optout==="optional";if(A.write(`const ${_} = ${E(v)};`),g)A.write(`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-yjj4cvqg.js";function o(){return(e,n)=>e.toJsonSchema(n)}export{o as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-yjj4cvqg.js";var _="./libopentui-0r5w9btr.so";export{_ as default};