@bkm016/basalt 0.1.24 → 0.1.26

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 (901) hide show
  1. package/chunk-05bkyxh9.js +3 -0
  2. package/chunk-080kr9ct.js +15 -0
  3. package/chunk-1a4rrb2v.js +10 -0
  4. package/chunk-1s560041.js +2 -0
  5. package/chunk-2expw9m3.js +3 -0
  6. package/chunk-2fm6g0ga.js +3 -0
  7. package/chunk-2scbc5yh.js +3 -0
  8. package/chunk-33jk5rw1.js +3 -0
  9. package/chunk-377w9fhp.js +3 -0
  10. package/chunk-3wqncn58.js +3 -0
  11. package/chunk-43n3k72q.js +2 -0
  12. package/chunk-44pv8c0b.js +5 -0
  13. package/chunk-5gk93yp2.js +3 -0
  14. package/chunk-5z5sbry2.js +7 -0
  15. package/chunk-6qvg49rk.js +51 -0
  16. package/chunk-7d6fdzs3.js +50 -0
  17. package/chunk-7h6k7vac.js +3 -0
  18. package/chunk-7t5yqsgn.js +5 -0
  19. package/chunk-7th9y456.js +2 -0
  20. package/chunk-7v98r8ft.js +2 -0
  21. package/chunk-82bb3whz.js +3 -0
  22. package/chunk-8e061pr3.js +2 -0
  23. package/chunk-8n83nvpa.js +7 -0
  24. package/chunk-9nng543t.js +3 -0
  25. package/chunk-a0ex6znf.js +18 -0
  26. package/chunk-a25etmgf.js +3 -0
  27. package/chunk-awzaxv88.js +2 -0
  28. package/chunk-b2s9aksm.js +2 -0
  29. package/chunk-bfrpy5jd.js +4 -0
  30. package/chunk-br64f072.js +2 -0
  31. package/chunk-btza2hna.js +5 -0
  32. package/chunk-c9bjdydc.js +3 -0
  33. package/chunk-cww7drfr.js +2 -0
  34. package/chunk-d0az9pq0.js +2 -0
  35. package/chunk-d47bpkyz.js +12 -0
  36. package/chunk-dkfpqbcr.js +3 -0
  37. package/chunk-dsk3r1s8.js +2 -0
  38. package/chunk-dw8p4zcz.js +2 -0
  39. package/chunk-edz2cxtp.js +5 -0
  40. package/chunk-epqgd8d0.js +3 -0
  41. package/chunk-f7tn67ff.js +2 -0
  42. package/chunk-fevkmd0j.js +3 -0
  43. package/chunk-fzdvrsvn.js +482 -0
  44. package/chunk-ghat319t.js +25 -0
  45. package/chunk-h19mfxzq.js +7 -0
  46. package/chunk-h6sh9pkr.js +2 -0
  47. package/chunk-jdazqwft.js +2 -0
  48. package/chunk-je52rmxs.js +9 -0
  49. package/chunk-jj5pkfgm.js +2 -0
  50. package/chunk-jp7f2kak.js +2 -0
  51. package/chunk-jqpb4q7h.js +3 -0
  52. package/chunk-jzf3qp0g.js +2 -0
  53. package/chunk-k5qg9az8.js +8 -0
  54. package/chunk-m51tryxx.js +3 -0
  55. package/chunk-mna7mgdw.js +3 -0
  56. package/chunk-nfgg1ksw.js +3 -0
  57. package/chunk-npd8k692.js +2 -0
  58. package/chunk-nqzqm9ad.js +3 -0
  59. package/chunk-nsrdzz1p.js +20 -0
  60. package/chunk-qdwzmvcq.js +3923 -0
  61. package/chunk-qgyjffh0.js +16 -0
  62. package/chunk-qnq3xa4h.js +286 -0
  63. package/chunk-r0gyd40q.js +2 -0
  64. package/chunk-ra4kx253.js +7 -0
  65. package/chunk-rq2b2a6n.js +11 -0
  66. package/chunk-s1m4dt0z.js +3 -0
  67. package/chunk-s78m24h4.js +2 -0
  68. package/chunk-sd9r82h2.js +3 -0
  69. package/chunk-smygzsyr.js +10 -0
  70. package/chunk-t0zexn7n.js +2 -0
  71. package/chunk-t2s0yyw0.js +3 -0
  72. package/chunk-v9a2y9rn.js +3 -0
  73. package/chunk-vkn4bfyp.js +2 -0
  74. package/chunk-vpzs9trn.js +3 -0
  75. package/chunk-w3tzsrkw.js +12 -0
  76. package/chunk-x0t8h6vv.js +5 -0
  77. package/chunk-x23g9em9.js +39 -0
  78. package/chunk-x316ag7c.js +25 -0
  79. package/chunk-x5zgyewh.js +2 -0
  80. package/chunk-xr35av3b.js +59 -0
  81. package/chunk-yd190t0s.js +31 -0
  82. package/chunk-zhvw8efz.js +3 -0
  83. package/chunk-zyqsqwn7.js +2 -0
  84. package/compiled.js +10 -10
  85. package/package.json +1 -1
  86. package/ui-test-worker.js +37 -37
  87. package/web/chunk-08tgd17j.js +12 -0
  88. package/web/chunk-08tgd17j.js.br +0 -0
  89. package/web/chunk-08tgd17j.js.gz +0 -0
  90. package/web/chunk-0mqyt9m7.js +1 -0
  91. package/web/chunk-0mqyt9m7.js.br +0 -0
  92. package/web/chunk-0mqyt9m7.js.gz +0 -0
  93. package/web/chunk-0n99y9n5.js +1 -0
  94. package/web/chunk-0n99y9n5.js.br +0 -0
  95. package/web/chunk-0n99y9n5.js.gz +0 -0
  96. package/web/chunk-0qjj75v7.js +1 -0
  97. package/web/chunk-0qjj75v7.js.br +0 -0
  98. package/web/chunk-0qjj75v7.js.gz +0 -0
  99. package/web/chunk-0x3wtwhf.js +291 -0
  100. package/web/chunk-0x3wtwhf.js.br +0 -0
  101. package/web/chunk-0x3wtwhf.js.gz +0 -0
  102. package/web/chunk-0zd5g2yw.js +1 -0
  103. package/web/chunk-0zd5g2yw.js.br +0 -0
  104. package/web/chunk-0zd5g2yw.js.gz +0 -0
  105. package/web/chunk-146ww24y.js +55 -0
  106. package/web/chunk-146ww24y.js.br +0 -0
  107. package/web/chunk-146ww24y.js.gz +0 -0
  108. package/web/chunk-1d8r3aeh.js +3 -0
  109. package/web/chunk-1d8r3aeh.js.br +0 -0
  110. package/web/chunk-1d8r3aeh.js.gz +0 -0
  111. package/web/chunk-1qs4nh4c.js +1 -0
  112. package/web/chunk-1qs4nh4c.js.br +0 -0
  113. package/web/chunk-1qs4nh4c.js.gz +0 -0
  114. package/web/chunk-1v13225a.js +1 -0
  115. package/web/chunk-1v13225a.js.br +2 -0
  116. package/web/chunk-1v13225a.js.gz +0 -0
  117. package/web/chunk-22caavs1.js +1 -0
  118. package/web/chunk-22caavs1.js.br +0 -0
  119. package/web/chunk-22caavs1.js.gz +0 -0
  120. package/web/chunk-28e0vn8m.js +1 -0
  121. package/web/chunk-28e0vn8m.js.br +0 -0
  122. package/web/chunk-28e0vn8m.js.gz +0 -0
  123. package/web/chunk-28sta4gj.js +142 -0
  124. package/web/chunk-28sta4gj.js.br +0 -0
  125. package/web/chunk-28sta4gj.js.gz +0 -0
  126. package/web/chunk-3781tgyt.js +21 -0
  127. package/web/chunk-3781tgyt.js.br +0 -0
  128. package/web/chunk-3781tgyt.js.gz +0 -0
  129. package/web/chunk-3gt60qmf.js +370 -0
  130. package/web/chunk-3gt60qmf.js.br +0 -0
  131. package/web/chunk-3gt60qmf.js.gz +0 -0
  132. package/web/chunk-3rg8d23d.js +2 -0
  133. package/web/chunk-3rg8d23d.js.br +0 -0
  134. package/web/chunk-3rg8d23d.js.gz +0 -0
  135. package/web/chunk-40wx2kxh.js +1 -0
  136. package/web/chunk-40wx2kxh.js.br +0 -0
  137. package/web/chunk-40wx2kxh.js.gz +0 -0
  138. package/web/chunk-44kgdrrk.js +1 -0
  139. package/web/chunk-44kgdrrk.js.br +0 -0
  140. package/web/chunk-44kgdrrk.js.gz +0 -0
  141. package/web/chunk-4vqmgjbf.js +1 -0
  142. package/web/chunk-4vqmgjbf.js.br +0 -0
  143. package/web/chunk-4vqmgjbf.js.gz +0 -0
  144. package/web/chunk-55h6ya95.js +1 -0
  145. package/web/chunk-55h6ya95.js.br +2 -0
  146. package/web/chunk-55h6ya95.js.gz +0 -0
  147. package/web/chunk-5fed8tt3.js +1 -0
  148. package/web/chunk-5fed8tt3.js.br +0 -0
  149. package/web/chunk-5fed8tt3.js.gz +0 -0
  150. package/web/chunk-5y1v9ycq.js +2 -0
  151. package/web/chunk-5y1v9ycq.js.br +0 -0
  152. package/web/chunk-5y1v9ycq.js.gz +0 -0
  153. package/web/chunk-61wasm9a.js +1 -0
  154. package/web/chunk-61wasm9a.js.br +0 -0
  155. package/web/chunk-61wasm9a.js.gz +0 -0
  156. package/web/chunk-66mcaz0p.js +7 -0
  157. package/web/chunk-66mcaz0p.js.br +0 -0
  158. package/web/chunk-66mcaz0p.js.gz +0 -0
  159. package/web/chunk-6ew2qvxb.js +1 -0
  160. package/web/chunk-6ew2qvxb.js.br +0 -0
  161. package/web/chunk-6ew2qvxb.js.gz +0 -0
  162. package/web/chunk-6hkgy8ej.js +36 -0
  163. package/web/chunk-6hkgy8ej.js.br +0 -0
  164. package/web/chunk-6hkgy8ej.js.gz +0 -0
  165. package/web/chunk-75v6mnzm.js +40 -0
  166. package/web/chunk-75v6mnzm.js.br +0 -0
  167. package/web/chunk-75v6mnzm.js.gz +0 -0
  168. package/web/chunk-7ddgm832.js +41 -0
  169. package/web/chunk-7ddgm832.js.br +0 -0
  170. package/web/chunk-7ddgm832.js.gz +0 -0
  171. package/web/chunk-80htbw45.js +1 -0
  172. package/web/chunk-80htbw45.js.br +0 -0
  173. package/web/chunk-80htbw45.js.gz +0 -0
  174. package/web/chunk-8304998z.js +1 -0
  175. package/web/chunk-8304998z.js.br +0 -0
  176. package/web/chunk-8304998z.js.gz +0 -0
  177. package/web/chunk-84wf0ej8.js +2 -0
  178. package/web/chunk-84wf0ej8.js.br +0 -0
  179. package/web/chunk-84wf0ej8.js.gz +0 -0
  180. package/web/chunk-859ry2p4.js +1 -0
  181. package/web/chunk-859ry2p4.js.br +0 -0
  182. package/web/chunk-859ry2p4.js.gz +0 -0
  183. package/web/chunk-883weqxg.js +2 -0
  184. package/web/chunk-883weqxg.js.br +0 -0
  185. package/web/chunk-883weqxg.js.gz +0 -0
  186. package/web/chunk-8a46b2ww.js +303 -0
  187. package/web/chunk-8a46b2ww.js.br +0 -0
  188. package/web/chunk-8a46b2ww.js.gz +0 -0
  189. package/web/chunk-8cajyrkw.js +1 -0
  190. package/web/chunk-8cajyrkw.js.br +0 -0
  191. package/web/chunk-8cajyrkw.js.gz +0 -0
  192. package/web/chunk-8ejwy8g3.js +30 -0
  193. package/web/chunk-8ejwy8g3.js.br +0 -0
  194. package/web/chunk-8ejwy8g3.js.gz +0 -0
  195. package/web/chunk-951dg5kq.js +8 -0
  196. package/web/chunk-951dg5kq.js.br +1 -0
  197. package/web/chunk-951dg5kq.js.gz +0 -0
  198. package/web/chunk-97ccteq4.js +106 -0
  199. package/web/chunk-97ccteq4.js.br +0 -0
  200. package/web/chunk-97ccteq4.js.gz +0 -0
  201. package/web/chunk-98kr0bw8.js +98 -0
  202. package/web/chunk-98kr0bw8.js.br +0 -0
  203. package/web/chunk-98kr0bw8.js.gz +0 -0
  204. package/web/chunk-9bq7xgjz.js +1 -0
  205. package/web/chunk-9bq7xgjz.js.br +0 -0
  206. package/web/chunk-9bq7xgjz.js.gz +0 -0
  207. package/web/chunk-9g5jgnfe.js +2 -0
  208. package/web/chunk-9g5jgnfe.js.br +0 -0
  209. package/web/chunk-9g5jgnfe.js.gz +0 -0
  210. package/web/chunk-an6adjgz.js +24 -0
  211. package/web/chunk-an6adjgz.js.br +0 -0
  212. package/web/chunk-an6adjgz.js.gz +0 -0
  213. package/web/chunk-arp4g43b.js +1 -0
  214. package/web/chunk-arp4g43b.js.br +0 -0
  215. package/web/chunk-arp4g43b.js.gz +0 -0
  216. package/web/chunk-b2ads9ra.js +1 -0
  217. package/web/chunk-b2ads9ra.js.br +0 -0
  218. package/web/chunk-b2ads9ra.js.gz +0 -0
  219. package/web/chunk-bd90pxqc.js +169 -0
  220. package/web/chunk-bd90pxqc.js.br +0 -0
  221. package/web/chunk-bd90pxqc.js.gz +0 -0
  222. package/web/chunk-bmtzds29.js +1 -0
  223. package/web/chunk-bmtzds29.js.br +0 -0
  224. package/web/chunk-bmtzds29.js.gz +0 -0
  225. package/web/chunk-brsvdef4.js +1 -0
  226. package/web/chunk-brsvdef4.js.br +0 -0
  227. package/web/chunk-brsvdef4.js.gz +0 -0
  228. package/web/chunk-bv0vs331.js +332 -0
  229. package/web/chunk-bv0vs331.js.br +0 -0
  230. package/web/chunk-bv0vs331.js.gz +0 -0
  231. package/web/chunk-bzvserky.js +89 -0
  232. package/web/chunk-bzvserky.js.br +0 -0
  233. package/web/chunk-bzvserky.js.gz +0 -0
  234. package/web/chunk-cd3hhgn9.js +2 -0
  235. package/web/chunk-cd3hhgn9.js.br +0 -0
  236. package/web/chunk-cd3hhgn9.js.gz +0 -0
  237. package/web/chunk-cdwn0hd1.js +2 -0
  238. package/web/chunk-cdwn0hd1.js.br +0 -0
  239. package/web/chunk-cdwn0hd1.js.gz +0 -0
  240. package/web/chunk-ckpx6ky8.js +2 -0
  241. package/web/chunk-ckpx6ky8.js.br +0 -0
  242. package/web/chunk-ckpx6ky8.js.gz +0 -0
  243. package/web/chunk-d11xvhrx.js +140 -0
  244. package/web/chunk-d11xvhrx.js.br +0 -0
  245. package/web/chunk-d11xvhrx.js.gz +0 -0
  246. package/web/chunk-d25jazap.js +89 -0
  247. package/web/chunk-d25jazap.js.br +0 -0
  248. package/web/chunk-d25jazap.js.gz +0 -0
  249. package/web/chunk-d5jk5ftp.js +2 -0
  250. package/web/chunk-d5jk5ftp.js.br +0 -0
  251. package/web/chunk-d5jk5ftp.js.gz +0 -0
  252. package/web/chunk-dkdedpn5.js +1 -0
  253. package/web/chunk-dkdedpn5.js.br +0 -0
  254. package/web/chunk-dkdedpn5.js.gz +0 -0
  255. package/web/chunk-dxejr2wc.js +7 -0
  256. package/web/chunk-dxejr2wc.js.br +0 -0
  257. package/web/chunk-dxejr2wc.js.gz +0 -0
  258. package/web/chunk-dym50nnh.js +292 -0
  259. package/web/chunk-dym50nnh.js.br +0 -0
  260. package/web/chunk-dym50nnh.js.gz +0 -0
  261. package/web/chunk-e1fv9zdp.js +1 -0
  262. package/web/chunk-e1fv9zdp.js.br +0 -0
  263. package/web/chunk-e1fv9zdp.js.gz +0 -0
  264. package/web/chunk-e9ycc491.js +120 -0
  265. package/web/chunk-e9ycc491.js.br +0 -0
  266. package/web/chunk-e9ycc491.js.gz +0 -0
  267. package/web/chunk-eww9ygx5.js +2 -0
  268. package/web/chunk-eww9ygx5.js.br +0 -0
  269. package/web/chunk-eww9ygx5.js.gz +0 -0
  270. package/web/chunk-ey2fy3vm.js +4 -0
  271. package/web/chunk-ey2fy3vm.js.br +0 -0
  272. package/web/chunk-ey2fy3vm.js.gz +0 -0
  273. package/web/chunk-ez498328.js +39 -0
  274. package/web/chunk-ez498328.js.br +0 -0
  275. package/web/chunk-ez498328.js.gz +0 -0
  276. package/web/chunk-f0x62xvv.js +84 -0
  277. package/web/chunk-f0x62xvv.js.br +0 -0
  278. package/web/chunk-f0x62xvv.js.gz +0 -0
  279. package/web/chunk-f1z92c2d.js +1 -0
  280. package/web/chunk-f1z92c2d.js.br +2 -0
  281. package/web/chunk-f1z92c2d.js.gz +0 -0
  282. package/web/chunk-fwvar7a7.js +1 -0
  283. package/web/chunk-fwvar7a7.js.br +0 -0
  284. package/web/chunk-fwvar7a7.js.gz +0 -0
  285. package/web/chunk-g8bw60t3.js +324 -0
  286. package/web/chunk-g8bw60t3.js.br +0 -0
  287. package/web/chunk-g8bw60t3.js.gz +0 -0
  288. package/web/chunk-g8se5rtx.js +2 -0
  289. package/web/chunk-g8se5rtx.js.br +0 -0
  290. package/web/chunk-g8se5rtx.js.gz +0 -0
  291. package/web/chunk-gkwkbkr4.js +217 -0
  292. package/web/chunk-gkwkbkr4.js.br +0 -0
  293. package/web/chunk-gkwkbkr4.js.gz +0 -0
  294. package/web/chunk-h50zbzfg.js +24 -0
  295. package/web/chunk-h50zbzfg.js.br +0 -0
  296. package/web/chunk-h50zbzfg.js.gz +0 -0
  297. package/web/chunk-j3vqhfgg.js +1 -0
  298. package/web/chunk-j3vqhfgg.js.br +0 -0
  299. package/web/chunk-j3vqhfgg.js.gz +0 -0
  300. package/web/chunk-jk6j68wv.js +1 -0
  301. package/web/chunk-jk6j68wv.js.br +0 -0
  302. package/web/chunk-jk6j68wv.js.gz +0 -0
  303. package/web/chunk-jrdx4yfq.js +2 -0
  304. package/web/chunk-jrdx4yfq.js.br +0 -0
  305. package/web/chunk-jrdx4yfq.js.gz +0 -0
  306. package/web/chunk-k2by2sj0.css +1 -0
  307. package/web/chunk-k2by2sj0.css.br +0 -0
  308. package/web/chunk-k2by2sj0.css.gz +0 -0
  309. package/web/chunk-kc4ymfvv.js +2 -0
  310. package/web/chunk-kc4ymfvv.js.br +1 -0
  311. package/web/chunk-kc4ymfvv.js.gz +0 -0
  312. package/web/chunk-kh9d9x20.js +1 -0
  313. package/web/chunk-kh9d9x20.js.br +0 -0
  314. package/web/chunk-kh9d9x20.js.gz +0 -0
  315. package/web/chunk-kkv1h28t.js +2 -0
  316. package/web/chunk-kkv1h28t.js.br +0 -0
  317. package/web/chunk-kkv1h28t.js.gz +0 -0
  318. package/web/chunk-kzkjfngw.js +7 -0
  319. package/web/chunk-kzkjfngw.js.br +0 -0
  320. package/web/chunk-kzkjfngw.js.gz +0 -0
  321. package/web/chunk-mj8xb4z9.js +2 -0
  322. package/web/chunk-mj8xb4z9.js.br +0 -0
  323. package/web/chunk-mj8xb4z9.js.gz +0 -0
  324. package/web/chunk-mv0pwdz6.js +1 -0
  325. package/web/chunk-mv0pwdz6.js.br +0 -0
  326. package/web/chunk-mv0pwdz6.js.gz +0 -0
  327. package/web/chunk-n8qc0chz.js +34 -0
  328. package/web/chunk-n8qc0chz.js.br +0 -0
  329. package/web/chunk-n8qc0chz.js.gz +0 -0
  330. package/web/chunk-nf83ezt5.js +1136 -0
  331. package/web/chunk-nf83ezt5.js.br +0 -0
  332. package/web/chunk-nf83ezt5.js.gz +0 -0
  333. package/web/chunk-nh3m09b1.js +1 -0
  334. package/web/chunk-nh3m09b1.js.br +0 -0
  335. package/web/chunk-nh3m09b1.js.gz +0 -0
  336. package/web/chunk-nqvjw71s.js +1 -0
  337. package/web/chunk-nqvjw71s.js.br +0 -0
  338. package/web/chunk-nqvjw71s.js.gz +0 -0
  339. package/web/chunk-nyydkfyf.js +1 -0
  340. package/web/chunk-nyydkfyf.js.br +0 -0
  341. package/web/chunk-nyydkfyf.js.gz +0 -0
  342. package/web/chunk-p0zneef1.js +2 -0
  343. package/web/chunk-p0zneef1.js.br +0 -0
  344. package/web/chunk-p0zneef1.js.gz +0 -0
  345. package/web/chunk-pjd16rfv.js +1 -0
  346. package/web/chunk-pjd16rfv.js.br +0 -0
  347. package/web/chunk-pjd16rfv.js.gz +0 -0
  348. package/web/chunk-praang0j.js +214 -0
  349. package/web/chunk-praang0j.js.br +0 -0
  350. package/web/chunk-praang0j.js.gz +0 -0
  351. package/web/chunk-prynwp2t.js +1 -0
  352. package/web/chunk-prynwp2t.js.br +0 -0
  353. package/web/chunk-prynwp2t.js.gz +0 -0
  354. package/web/chunk-qd3x1kbw.js +1 -0
  355. package/web/chunk-qd3x1kbw.js.br +2 -0
  356. package/web/chunk-qd3x1kbw.js.gz +0 -0
  357. package/web/chunk-qgqg2kr5.js +1 -0
  358. package/web/chunk-qgqg2kr5.js.br +0 -0
  359. package/web/chunk-qgqg2kr5.js.gz +0 -0
  360. package/web/chunk-qha5j25q.js +2 -0
  361. package/web/chunk-qha5j25q.js.br +0 -0
  362. package/web/chunk-qha5j25q.js.gz +0 -0
  363. package/web/chunk-qhf717ek.js +2 -0
  364. package/web/chunk-qhf717ek.js.br +0 -0
  365. package/web/chunk-qhf717ek.js.gz +0 -0
  366. package/web/chunk-qt2ktkps.js +1 -0
  367. package/web/chunk-qt2ktkps.js.br +0 -0
  368. package/web/chunk-qt2ktkps.js.gz +0 -0
  369. package/web/chunk-scnew5q6.js +1 -0
  370. package/web/chunk-scnew5q6.js.br +0 -0
  371. package/web/chunk-scnew5q6.js.gz +0 -0
  372. package/web/chunk-scrrgk6n.js +2 -0
  373. package/web/chunk-scrrgk6n.js.br +0 -0
  374. package/web/chunk-scrrgk6n.js.gz +0 -0
  375. package/web/chunk-sy1ta5rp.js +1 -0
  376. package/web/chunk-sy1ta5rp.js.br +0 -0
  377. package/web/chunk-sy1ta5rp.js.gz +0 -0
  378. package/web/chunk-t092etr1.js +2 -0
  379. package/web/chunk-t092etr1.js.br +0 -0
  380. package/web/chunk-t092etr1.js.gz +0 -0
  381. package/web/chunk-t34g8qj4.js +2 -0
  382. package/web/chunk-t34g8qj4.js.br +0 -0
  383. package/web/chunk-t34g8qj4.js.gz +0 -0
  384. package/web/chunk-tfdwgjr1.js +2 -0
  385. package/web/chunk-tfdwgjr1.js.br +0 -0
  386. package/web/chunk-tfdwgjr1.js.gz +0 -0
  387. package/web/chunk-ty54ph0y.js +1 -0
  388. package/web/chunk-ty54ph0y.js.br +2 -0
  389. package/web/chunk-ty54ph0y.js.gz +0 -0
  390. package/web/chunk-v7nv1ve8.js +1 -0
  391. package/web/chunk-v7nv1ve8.js.br +0 -0
  392. package/web/chunk-v7nv1ve8.js.gz +0 -0
  393. package/web/chunk-vchzf900.js +2 -0
  394. package/web/chunk-vchzf900.js.br +0 -0
  395. package/web/chunk-vchzf900.js.gz +0 -0
  396. package/web/chunk-vtn7g6n0.js +2 -0
  397. package/web/chunk-vtn7g6n0.js.br +0 -0
  398. package/web/chunk-vtn7g6n0.js.gz +0 -0
  399. package/web/chunk-w1bp9wwx.js +1 -0
  400. package/web/chunk-w1bp9wwx.js.br +0 -0
  401. package/web/chunk-w1bp9wwx.js.gz +0 -0
  402. package/web/chunk-w4h1c0eb.js +200 -0
  403. package/web/chunk-w4h1c0eb.js.br +0 -0
  404. package/web/chunk-w4h1c0eb.js.gz +0 -0
  405. package/web/chunk-wx0jmdbq.js +62 -0
  406. package/web/chunk-wx0jmdbq.js.br +0 -0
  407. package/web/chunk-wx0jmdbq.js.gz +0 -0
  408. package/web/chunk-xdns99dp.js +99 -0
  409. package/web/chunk-xdns99dp.js.br +0 -0
  410. package/web/chunk-xdns99dp.js.gz +0 -0
  411. package/web/chunk-xnhzragz.js +1 -0
  412. package/web/chunk-xnhzragz.js.br +0 -0
  413. package/web/chunk-xnhzragz.js.gz +0 -0
  414. package/web/chunk-xq241z8c.js +38 -0
  415. package/web/chunk-xq241z8c.js.br +0 -0
  416. package/web/chunk-xq241z8c.js.gz +0 -0
  417. package/web/chunk-xve7x5x1.js +2 -0
  418. package/web/chunk-xve7x5x1.js.br +0 -0
  419. package/web/chunk-xve7x5x1.js.gz +0 -0
  420. package/web/chunk-xvn1wg8g.js +2 -0
  421. package/web/chunk-xvn1wg8g.js.br +0 -0
  422. package/web/chunk-xvn1wg8g.js.gz +0 -0
  423. package/web/chunk-xwy6m9v6.js +1 -0
  424. package/web/chunk-xwy6m9v6.js.br +0 -0
  425. package/web/chunk-xwy6m9v6.js.gz +0 -0
  426. package/web/chunk-y7zvyd6m.js +1 -0
  427. package/web/chunk-y7zvyd6m.js.br +0 -0
  428. package/web/chunk-y7zvyd6m.js.gz +0 -0
  429. package/web/chunk-yh07726r.js +78 -0
  430. package/web/chunk-yh07726r.js.br +0 -0
  431. package/web/chunk-yh07726r.js.gz +0 -0
  432. package/web/chunk-yr94dbhk.js +1 -0
  433. package/web/chunk-yr94dbhk.js.br +0 -0
  434. package/web/chunk-yr94dbhk.js.gz +0 -0
  435. package/web/chunk-ysqfkg2v.js +70 -0
  436. package/web/chunk-ysqfkg2v.js.br +0 -0
  437. package/web/chunk-ysqfkg2v.js.gz +0 -0
  438. package/web/chunk-yxax25q6.js +4 -0
  439. package/web/chunk-yxax25q6.js.br +0 -0
  440. package/web/chunk-yxax25q6.js.gz +0 -0
  441. package/web/chunk-z7024nm8.js +16 -0
  442. package/web/chunk-z7024nm8.js.br +0 -0
  443. package/web/chunk-z7024nm8.js.gz +0 -0
  444. package/web/chunk-z91sdj83.js +139 -0
  445. package/web/chunk-z91sdj83.js.br +0 -0
  446. package/web/chunk-z91sdj83.js.gz +0 -0
  447. package/web/chunk-zw958xwq.js +1 -0
  448. package/web/chunk-zw958xwq.js.br +0 -0
  449. package/web/chunk-zw958xwq.js.gz +0 -0
  450. package/web/index.html +1 -1
  451. package/web/index.html.br +0 -0
  452. package/web/index.html.gz +0 -0
  453. package/worker.js +1 -1
  454. package/chunk-0ecs4nme.js +0 -18
  455. package/chunk-0mrd775t.js +0 -3
  456. package/chunk-0nxcbf6d.js +0 -472
  457. package/chunk-0p12aad6.js +0 -3
  458. package/chunk-0vdz9j55.js +0 -7
  459. package/chunk-1v0dv855.js +0 -3
  460. package/chunk-2jeg8h8d.js +0 -3
  461. package/chunk-2q3tewbg.js +0 -59
  462. package/chunk-3hqka8zs.js +0 -2
  463. package/chunk-3ktcgaec.js +0 -2
  464. package/chunk-3v0ezmaw.js +0 -39
  465. package/chunk-3zv7ryz0.js +0 -2
  466. package/chunk-4x7xnfw1.js +0 -2
  467. package/chunk-5h96jz3p.js +0 -3
  468. package/chunk-5kd940f5.js +0 -3
  469. package/chunk-628vymvd.js +0 -3
  470. package/chunk-6h9dxrr4.js +0 -2
  471. package/chunk-6ka4m0ax.js +0 -2
  472. package/chunk-6q0ak8d1.js +0 -12
  473. package/chunk-768vwfc3.js +0 -3
  474. package/chunk-7k4xghss.js +0 -5
  475. package/chunk-8jv34hrx.js +0 -7
  476. package/chunk-8np9b2y8.js +0 -3
  477. package/chunk-8yv55y6g.js +0 -3
  478. package/chunk-95rqa8r8.js +0 -2
  479. package/chunk-979mxkzt.js +0 -2
  480. package/chunk-9y8v1vrt.js +0 -15
  481. package/chunk-akf8x16s.js +0 -5
  482. package/chunk-bdr1170y.js +0 -3
  483. package/chunk-bkmd5d8p.js +0 -3
  484. package/chunk-c4nxr37s.js +0 -3566
  485. package/chunk-cte9wd9x.js +0 -4
  486. package/chunk-df7ye0xb.js +0 -9
  487. package/chunk-drbd6485.js +0 -3
  488. package/chunk-dsd6pd2m.js +0 -2
  489. package/chunk-eejgn4ye.js +0 -2
  490. package/chunk-eek8fqvj.js +0 -2
  491. package/chunk-ewjrnvjb.js +0 -10
  492. package/chunk-f4tqhvff.js +0 -3
  493. package/chunk-gha8wd63.js +0 -11
  494. package/chunk-gwrpahes.js +0 -2
  495. package/chunk-hz92pdms.js +0 -2
  496. package/chunk-jepxf22f.js +0 -7
  497. package/chunk-keq5kv9b.js +0 -3
  498. package/chunk-kh4yq4rd.js +0 -4
  499. package/chunk-khdch9sx.js +0 -25
  500. package/chunk-m1w7f6d3.js +0 -5
  501. package/chunk-ma91f4qj.js +0 -2
  502. package/chunk-mah60ek9.js +0 -3
  503. package/chunk-mmm1jh57.js +0 -20
  504. package/chunk-mmt11y21.js +0 -2
  505. package/chunk-mny4xyb0.js +0 -3
  506. package/chunk-mq0p4ssz.js +0 -3
  507. package/chunk-mzta1jts.js +0 -10
  508. package/chunk-n0qwj5gm.js +0 -12
  509. package/chunk-n19ec95n.js +0 -3
  510. package/chunk-n5b822pn.js +0 -3
  511. package/chunk-nvxx397h.js +0 -2
  512. package/chunk-nwfhbcme.js +0 -4
  513. package/chunk-pcd14q8r.js +0 -390
  514. package/chunk-pr1hfw3a.js +0 -2
  515. package/chunk-q2re8mn9.js +0 -31
  516. package/chunk-qgg3wk8h.js +0 -2
  517. package/chunk-r9gkfk6f.js +0 -16
  518. package/chunk-rjfph4m5.js +0 -3
  519. package/chunk-rmy489b1.js +0 -7
  520. package/chunk-sf2cp0m6.js +0 -8
  521. package/chunk-sfwy8rqg.js +0 -3
  522. package/chunk-sj2q2amm.js +0 -11
  523. package/chunk-sqfs6z7c.js +0 -3
  524. package/chunk-sy980cjq.js +0 -2
  525. package/chunk-t64hda7b.js +0 -2
  526. package/chunk-tbhqhejq.js +0 -2
  527. package/chunk-trxaygjr.js +0 -5
  528. package/chunk-v7ehjbxx.js +0 -2
  529. package/chunk-vjegsy9q.js +0 -2
  530. package/chunk-vt4xyc4q.js +0 -2
  531. package/chunk-w430z452.js +0 -25
  532. package/chunk-xycq2q8m.js +0 -2
  533. package/chunk-y16fqzad.js +0 -3
  534. package/chunk-y6mng74k.js +0 -2
  535. package/chunk-y8aq7mb7.js +0 -3
  536. package/chunk-ynt6najh.js +0 -3
  537. package/chunk-z1y43t2s.js +0 -3
  538. package/chunk-z6v2pcc0.js +0 -3
  539. package/web/chunk-085ttz7c.js +0 -84
  540. package/web/chunk-085ttz7c.js.br +0 -0
  541. package/web/chunk-085ttz7c.js.gz +0 -0
  542. package/web/chunk-0g9ycv0h.js +0 -2
  543. package/web/chunk-0g9ycv0h.js.br +0 -0
  544. package/web/chunk-0g9ycv0h.js.gz +0 -0
  545. package/web/chunk-13x3xyyh.js +0 -7
  546. package/web/chunk-13x3xyyh.js.br +0 -0
  547. package/web/chunk-13x3xyyh.js.gz +0 -0
  548. package/web/chunk-172gywq4.js +0 -214
  549. package/web/chunk-172gywq4.js.br +0 -0
  550. package/web/chunk-172gywq4.js.gz +0 -0
  551. package/web/chunk-176tsg6e.js +0 -2
  552. package/web/chunk-176tsg6e.js.br +0 -0
  553. package/web/chunk-176tsg6e.js.gz +0 -0
  554. package/web/chunk-17d30546.js +0 -38
  555. package/web/chunk-17d30546.js.br +0 -0
  556. package/web/chunk-17d30546.js.gz +0 -0
  557. package/web/chunk-1k6jx4hs.js +0 -1
  558. package/web/chunk-1k6jx4hs.js.br +0 -0
  559. package/web/chunk-1k6jx4hs.js.gz +0 -0
  560. package/web/chunk-1kts05s6.css +0 -1
  561. package/web/chunk-1kts05s6.css.br +0 -0
  562. package/web/chunk-1kts05s6.css.gz +0 -0
  563. package/web/chunk-1z0x1j6q.js +0 -1
  564. package/web/chunk-1z0x1j6q.js.br +0 -0
  565. package/web/chunk-1z0x1j6q.js.gz +0 -0
  566. package/web/chunk-290wy4yk.js +0 -1
  567. package/web/chunk-290wy4yk.js.br +0 -0
  568. package/web/chunk-290wy4yk.js.gz +0 -0
  569. package/web/chunk-2cdw1299.js +0 -1
  570. package/web/chunk-2cdw1299.js.br +0 -0
  571. package/web/chunk-2cdw1299.js.gz +0 -0
  572. package/web/chunk-2fms67zg.js +0 -332
  573. package/web/chunk-2fms67zg.js.br +0 -0
  574. package/web/chunk-2fms67zg.js.gz +0 -0
  575. package/web/chunk-2psxv4dk.js +0 -120
  576. package/web/chunk-2psxv4dk.js.br +0 -0
  577. package/web/chunk-2psxv4dk.js.gz +0 -0
  578. package/web/chunk-2z4zhtw4.js +0 -142
  579. package/web/chunk-2z4zhtw4.js.br +0 -0
  580. package/web/chunk-2z4zhtw4.js.gz +0 -0
  581. package/web/chunk-39rtp0f4.js +0 -1
  582. package/web/chunk-39rtp0f4.js.br +0 -0
  583. package/web/chunk-39rtp0f4.js.gz +0 -0
  584. package/web/chunk-3sszg3gr.js +0 -24
  585. package/web/chunk-3sszg3gr.js.br +0 -0
  586. package/web/chunk-3sszg3gr.js.gz +0 -0
  587. package/web/chunk-3vdw9nn7.js +0 -62
  588. package/web/chunk-3vdw9nn7.js.br +0 -0
  589. package/web/chunk-3vdw9nn7.js.gz +0 -0
  590. package/web/chunk-43shp7zx.js +0 -2
  591. package/web/chunk-43shp7zx.js.br +0 -0
  592. package/web/chunk-43shp7zx.js.gz +0 -0
  593. package/web/chunk-4cbcqcd2.js +0 -1
  594. package/web/chunk-4cbcqcd2.js.br +0 -0
  595. package/web/chunk-4cbcqcd2.js.gz +0 -0
  596. package/web/chunk-4v6n6b36.js +0 -1
  597. package/web/chunk-4v6n6b36.js.br +0 -0
  598. package/web/chunk-4v6n6b36.js.gz +0 -0
  599. package/web/chunk-54vdfmx0.js +0 -2
  600. package/web/chunk-54vdfmx0.js.br +0 -0
  601. package/web/chunk-54vdfmx0.js.gz +0 -0
  602. package/web/chunk-59ybhv47.js +0 -1
  603. package/web/chunk-59ybhv47.js.br +0 -0
  604. package/web/chunk-59ybhv47.js.gz +0 -0
  605. package/web/chunk-5zkw2kkb.js +0 -140
  606. package/web/chunk-5zkw2kkb.js.br +0 -0
  607. package/web/chunk-5zkw2kkb.js.gz +0 -0
  608. package/web/chunk-634vc92s.js +0 -70
  609. package/web/chunk-634vc92s.js.br +0 -0
  610. package/web/chunk-634vc92s.js.gz +0 -0
  611. package/web/chunk-6n3cwe1h.js +0 -169
  612. package/web/chunk-6n3cwe1h.js.br +0 -0
  613. package/web/chunk-6n3cwe1h.js.gz +0 -0
  614. package/web/chunk-6zr2j7xj.js +0 -1
  615. package/web/chunk-6zr2j7xj.js.br +0 -0
  616. package/web/chunk-6zr2j7xj.js.gz +0 -0
  617. package/web/chunk-713ygtrs.js +0 -200
  618. package/web/chunk-713ygtrs.js.br +0 -0
  619. package/web/chunk-713ygtrs.js.gz +0 -0
  620. package/web/chunk-7m4gmjvp.js +0 -1
  621. package/web/chunk-7m4gmjvp.js.br +0 -0
  622. package/web/chunk-7m4gmjvp.js.gz +0 -0
  623. package/web/chunk-7x90pq42.js +0 -1
  624. package/web/chunk-7x90pq42.js.br +0 -0
  625. package/web/chunk-7x90pq42.js.gz +0 -0
  626. package/web/chunk-7ycp549b.js +0 -2
  627. package/web/chunk-7ycp549b.js.br +0 -0
  628. package/web/chunk-7ycp549b.js.gz +0 -0
  629. package/web/chunk-811qc5bs.js +0 -1
  630. package/web/chunk-811qc5bs.js.br +0 -0
  631. package/web/chunk-811qc5bs.js.gz +0 -0
  632. package/web/chunk-82gjgy45.js +0 -1
  633. package/web/chunk-82gjgy45.js.br +0 -0
  634. package/web/chunk-82gjgy45.js.gz +0 -0
  635. package/web/chunk-8de69eyx.js +0 -2
  636. package/web/chunk-8de69eyx.js.br +0 -0
  637. package/web/chunk-8de69eyx.js.gz +0 -0
  638. package/web/chunk-91s1ns6b.js +0 -55
  639. package/web/chunk-91s1ns6b.js.br +0 -0
  640. package/web/chunk-91s1ns6b.js.gz +0 -0
  641. package/web/chunk-921qw2jf.js +0 -1
  642. package/web/chunk-921qw2jf.js.br +0 -0
  643. package/web/chunk-921qw2jf.js.gz +0 -0
  644. package/web/chunk-96n0nem7.js +0 -2
  645. package/web/chunk-96n0nem7.js.br +0 -0
  646. package/web/chunk-96n0nem7.js.gz +0 -0
  647. package/web/chunk-9k9p5dat.js +0 -1
  648. package/web/chunk-9k9p5dat.js.br +0 -0
  649. package/web/chunk-9k9p5dat.js.gz +0 -0
  650. package/web/chunk-a529550j.js +0 -1
  651. package/web/chunk-a529550j.js.br +0 -0
  652. package/web/chunk-a529550j.js.gz +0 -0
  653. package/web/chunk-abvtsz6z.js +0 -2
  654. package/web/chunk-abvtsz6z.js.br +0 -0
  655. package/web/chunk-abvtsz6z.js.gz +0 -0
  656. package/web/chunk-ac8vmj54.js +0 -1
  657. package/web/chunk-ac8vmj54.js.br +0 -0
  658. package/web/chunk-ac8vmj54.js.gz +0 -0
  659. package/web/chunk-amrt87c9.js +0 -1
  660. package/web/chunk-amrt87c9.js.br +0 -0
  661. package/web/chunk-amrt87c9.js.gz +0 -0
  662. package/web/chunk-b2t33c3t.js +0 -2
  663. package/web/chunk-b2t33c3t.js.br +0 -0
  664. package/web/chunk-b2t33c3t.js.gz +0 -0
  665. package/web/chunk-b9fqnzqd.js +0 -217
  666. package/web/chunk-b9fqnzqd.js.br +0 -0
  667. package/web/chunk-b9fqnzqd.js.gz +0 -0
  668. package/web/chunk-bbs6yq60.js +0 -99
  669. package/web/chunk-bbs6yq60.js.br +0 -0
  670. package/web/chunk-bbs6yq60.js.gz +0 -0
  671. package/web/chunk-bbyqcvdz.js +0 -2
  672. package/web/chunk-bbyqcvdz.js.br +0 -0
  673. package/web/chunk-bbyqcvdz.js.gz +0 -0
  674. package/web/chunk-bg2ps35t.js +0 -2
  675. package/web/chunk-bg2ps35t.js.br +0 -0
  676. package/web/chunk-bg2ps35t.js.gz +0 -0
  677. package/web/chunk-bh0a254y.js +0 -30
  678. package/web/chunk-bh0a254y.js.br +0 -0
  679. package/web/chunk-bh0a254y.js.gz +0 -0
  680. package/web/chunk-bvmvj35k.js +0 -1
  681. package/web/chunk-bvmvj35k.js.br +0 -0
  682. package/web/chunk-bvmvj35k.js.gz +0 -0
  683. package/web/chunk-c2eqwepm.js +0 -2
  684. package/web/chunk-c2eqwepm.js.br +0 -0
  685. package/web/chunk-c2eqwepm.js.gz +0 -0
  686. package/web/chunk-ca8hnmmv.js +0 -34
  687. package/web/chunk-ca8hnmmv.js.br +0 -0
  688. package/web/chunk-ca8hnmmv.js.gz +0 -0
  689. package/web/chunk-ced8pdbc.js +0 -1
  690. package/web/chunk-ced8pdbc.js.br +0 -0
  691. package/web/chunk-ced8pdbc.js.gz +0 -0
  692. package/web/chunk-cj0cmvbm.js +0 -89
  693. package/web/chunk-cj0cmvbm.js.br +0 -0
  694. package/web/chunk-cj0cmvbm.js.gz +0 -0
  695. package/web/chunk-cqr2kq2c.js +0 -1
  696. package/web/chunk-cqr2kq2c.js.br +0 -0
  697. package/web/chunk-cqr2kq2c.js.gz +0 -0
  698. package/web/chunk-crhbhsrh.js +0 -2
  699. package/web/chunk-crhbhsrh.js.br +0 -0
  700. package/web/chunk-crhbhsrh.js.gz +0 -0
  701. package/web/chunk-cxhcrhqc.js +0 -1
  702. package/web/chunk-cxhcrhqc.js.br +0 -0
  703. package/web/chunk-cxhcrhqc.js.gz +0 -0
  704. package/web/chunk-e3d6kvwm.js +0 -1
  705. package/web/chunk-e3d6kvwm.js.br +0 -0
  706. package/web/chunk-e3d6kvwm.js.gz +0 -0
  707. package/web/chunk-ee67ps6t.js +0 -1
  708. package/web/chunk-ee67ps6t.js.br +0 -0
  709. package/web/chunk-ee67ps6t.js.gz +0 -0
  710. package/web/chunk-ef0wf92p.js +0 -2
  711. package/web/chunk-ef0wf92p.js.br +0 -0
  712. package/web/chunk-ef0wf92p.js.gz +0 -0
  713. package/web/chunk-ekwmp0s0.js +0 -1
  714. package/web/chunk-ekwmp0s0.js.br +0 -0
  715. package/web/chunk-ekwmp0s0.js.gz +0 -0
  716. package/web/chunk-eq28qb33.js +0 -2
  717. package/web/chunk-eq28qb33.js.br +0 -3
  718. package/web/chunk-eq28qb33.js.gz +0 -0
  719. package/web/chunk-f8ac76br.js +0 -2
  720. package/web/chunk-f8ac76br.js.br +0 -3
  721. package/web/chunk-f8ac76br.js.gz +0 -0
  722. package/web/chunk-fp7q643n.js +0 -36
  723. package/web/chunk-fp7q643n.js.br +0 -0
  724. package/web/chunk-fp7q643n.js.gz +0 -0
  725. package/web/chunk-g1penf6y.js +0 -2
  726. package/web/chunk-g1penf6y.js.br +0 -0
  727. package/web/chunk-g1penf6y.js.gz +0 -0
  728. package/web/chunk-g7t1bvvx.js +0 -2
  729. package/web/chunk-g7t1bvvx.js.br +0 -0
  730. package/web/chunk-g7t1bvvx.js.gz +0 -0
  731. package/web/chunk-gf4ky7tp.js +0 -8
  732. package/web/chunk-gf4ky7tp.js.br +0 -0
  733. package/web/chunk-gf4ky7tp.js.gz +0 -0
  734. package/web/chunk-gtcjwz0j.js +0 -1
  735. package/web/chunk-gtcjwz0j.js.br +0 -2
  736. package/web/chunk-gtcjwz0j.js.gz +0 -0
  737. package/web/chunk-gy2y4zfa.js +0 -21
  738. package/web/chunk-gy2y4zfa.js.br +0 -0
  739. package/web/chunk-gy2y4zfa.js.gz +0 -0
  740. package/web/chunk-h1cv1kke.js +0 -16
  741. package/web/chunk-h1cv1kke.js.br +0 -0
  742. package/web/chunk-h1cv1kke.js.gz +0 -0
  743. package/web/chunk-h6k80vqf.js +0 -1
  744. package/web/chunk-h6k80vqf.js.br +0 -0
  745. package/web/chunk-h6k80vqf.js.gz +0 -0
  746. package/web/chunk-hqtm67yw.js +0 -24
  747. package/web/chunk-hqtm67yw.js.br +0 -0
  748. package/web/chunk-hqtm67yw.js.gz +0 -0
  749. package/web/chunk-hsgtzrkh.js +0 -1
  750. package/web/chunk-hsgtzrkh.js.br +0 -0
  751. package/web/chunk-hsgtzrkh.js.gz +0 -0
  752. package/web/chunk-htn0dt64.js +0 -2
  753. package/web/chunk-htn0dt64.js.br +0 -0
  754. package/web/chunk-htn0dt64.js.gz +0 -0
  755. package/web/chunk-j7phw79h.js +0 -1
  756. package/web/chunk-j7phw79h.js.br +0 -0
  757. package/web/chunk-j7phw79h.js.gz +0 -0
  758. package/web/chunk-k69ysa0v.js +0 -1
  759. package/web/chunk-k69ysa0v.js.br +0 -0
  760. package/web/chunk-k69ysa0v.js.gz +0 -0
  761. package/web/chunk-k7h5g8qj.js +0 -1
  762. package/web/chunk-k7h5g8qj.js.br +0 -2
  763. package/web/chunk-k7h5g8qj.js.gz +0 -0
  764. package/web/chunk-k8x1xbf6.js +0 -1
  765. package/web/chunk-k8x1xbf6.js.br +0 -0
  766. package/web/chunk-k8x1xbf6.js.gz +0 -0
  767. package/web/chunk-k8yyb4wc.js +0 -2
  768. package/web/chunk-k8yyb4wc.js.br +0 -0
  769. package/web/chunk-k8yyb4wc.js.gz +0 -0
  770. package/web/chunk-kbvzxsz7.js +0 -324
  771. package/web/chunk-kbvzxsz7.js.br +0 -0
  772. package/web/chunk-kbvzxsz7.js.gz +0 -0
  773. package/web/chunk-kn9bc5z2.js +0 -291
  774. package/web/chunk-kn9bc5z2.js.br +0 -0
  775. package/web/chunk-kn9bc5z2.js.gz +0 -0
  776. package/web/chunk-ksr360js.js +0 -4
  777. package/web/chunk-ksr360js.js.br +0 -0
  778. package/web/chunk-ksr360js.js.gz +0 -0
  779. package/web/chunk-m5nt857c.js +0 -1
  780. package/web/chunk-m5nt857c.js.br +0 -0
  781. package/web/chunk-m5nt857c.js.gz +0 -0
  782. package/web/chunk-mbaw66b5.js +0 -2
  783. package/web/chunk-mbaw66b5.js.br +0 -0
  784. package/web/chunk-mbaw66b5.js.gz +0 -0
  785. package/web/chunk-ms7cscs9.js +0 -1
  786. package/web/chunk-ms7cscs9.js.br +0 -0
  787. package/web/chunk-ms7cscs9.js.gz +0 -0
  788. package/web/chunk-n59nyqcr.js +0 -303
  789. package/web/chunk-n59nyqcr.js.br +0 -0
  790. package/web/chunk-n59nyqcr.js.gz +0 -0
  791. package/web/chunk-n9npqkxf.js +0 -1
  792. package/web/chunk-n9npqkxf.js.br +0 -0
  793. package/web/chunk-n9npqkxf.js.gz +0 -0
  794. package/web/chunk-nb3jk1wk.js +0 -1
  795. package/web/chunk-nb3jk1wk.js.br +0 -0
  796. package/web/chunk-nb3jk1wk.js.gz +0 -0
  797. package/web/chunk-ny87aq2j.js +0 -1
  798. package/web/chunk-ny87aq2j.js.br +0 -0
  799. package/web/chunk-ny87aq2j.js.gz +0 -0
  800. package/web/chunk-phr7yps3.js +0 -3
  801. package/web/chunk-phr7yps3.js.br +0 -0
  802. package/web/chunk-phr7yps3.js.gz +0 -0
  803. package/web/chunk-ppccb30x.js +0 -78
  804. package/web/chunk-ppccb30x.js.br +0 -0
  805. package/web/chunk-ppccb30x.js.gz +0 -0
  806. package/web/chunk-q17rem99.js +0 -89
  807. package/web/chunk-q17rem99.js.br +0 -0
  808. package/web/chunk-q17rem99.js.gz +0 -0
  809. package/web/chunk-qdq6wvgt.js +0 -139
  810. package/web/chunk-qdq6wvgt.js.br +0 -0
  811. package/web/chunk-qdq6wvgt.js.gz +0 -0
  812. package/web/chunk-qhr6hegh.js +0 -1
  813. package/web/chunk-qhr6hegh.js.br +0 -0
  814. package/web/chunk-qhr6hegh.js.gz +0 -0
  815. package/web/chunk-qqtj88e0.js +0 -2
  816. package/web/chunk-qqtj88e0.js.br +0 -0
  817. package/web/chunk-qqtj88e0.js.gz +0 -0
  818. package/web/chunk-r165xpp5.js +0 -1
  819. package/web/chunk-r165xpp5.js.br +0 -0
  820. package/web/chunk-r165xpp5.js.gz +0 -0
  821. package/web/chunk-r4cr8rvt.js +0 -1
  822. package/web/chunk-r4cr8rvt.js.br +0 -0
  823. package/web/chunk-r4cr8rvt.js.gz +0 -0
  824. package/web/chunk-sapy54hm.js +0 -106
  825. package/web/chunk-sapy54hm.js.br +0 -0
  826. package/web/chunk-sapy54hm.js.gz +0 -0
  827. package/web/chunk-sarkb4p9.js +0 -12
  828. package/web/chunk-sarkb4p9.js.br +0 -0
  829. package/web/chunk-sarkb4p9.js.gz +0 -0
  830. package/web/chunk-t7vwsg9r.js +0 -292
  831. package/web/chunk-t7vwsg9r.js.br +0 -0
  832. package/web/chunk-t7vwsg9r.js.gz +0 -0
  833. package/web/chunk-ta913rgd.js +0 -2
  834. package/web/chunk-ta913rgd.js.br +0 -0
  835. package/web/chunk-ta913rgd.js.gz +0 -0
  836. package/web/chunk-tt7j0m6m.js +0 -7
  837. package/web/chunk-tt7j0m6m.js.br +0 -0
  838. package/web/chunk-tt7j0m6m.js.gz +0 -0
  839. package/web/chunk-va1rkfan.js +0 -1
  840. package/web/chunk-va1rkfan.js.br +0 -0
  841. package/web/chunk-va1rkfan.js.gz +0 -0
  842. package/web/chunk-vb3sy3hv.js +0 -39
  843. package/web/chunk-vb3sy3hv.js.br +0 -0
  844. package/web/chunk-vb3sy3hv.js.gz +0 -0
  845. package/web/chunk-vgpyff03.js +0 -41
  846. package/web/chunk-vgpyff03.js.br +0 -0
  847. package/web/chunk-vgpyff03.js.gz +0 -0
  848. package/web/chunk-vrtdjg91.js +0 -1
  849. package/web/chunk-vrtdjg91.js.br +0 -0
  850. package/web/chunk-vrtdjg91.js.gz +0 -0
  851. package/web/chunk-vx6qbmd7.js +0 -2
  852. package/web/chunk-vx6qbmd7.js.br +0 -0
  853. package/web/chunk-vx6qbmd7.js.gz +0 -0
  854. package/web/chunk-w563538j.js +0 -370
  855. package/web/chunk-w563538j.js.br +0 -0
  856. package/web/chunk-w563538j.js.gz +0 -0
  857. package/web/chunk-w71t7mes.js +0 -1
  858. package/web/chunk-w71t7mes.js.br +0 -0
  859. package/web/chunk-w71t7mes.js.gz +0 -0
  860. package/web/chunk-w96etr1w.js +0 -1
  861. package/web/chunk-w96etr1w.js.br +0 -0
  862. package/web/chunk-w96etr1w.js.gz +0 -0
  863. package/web/chunk-wrqazg2v.js +0 -2
  864. package/web/chunk-wrqazg2v.js.br +0 -0
  865. package/web/chunk-wrqazg2v.js.gz +0 -0
  866. package/web/chunk-xsyrxa45.js +0 -2
  867. package/web/chunk-xsyrxa45.js.br +0 -0
  868. package/web/chunk-xsyrxa45.js.gz +0 -0
  869. package/web/chunk-xv1d350x.js +0 -1
  870. package/web/chunk-xv1d350x.js.br +0 -0
  871. package/web/chunk-xv1d350x.js.gz +0 -0
  872. package/web/chunk-xw8tzrmm.js +0 -1135
  873. package/web/chunk-xw8tzrmm.js.br +0 -0
  874. package/web/chunk-xw8tzrmm.js.gz +0 -0
  875. package/web/chunk-xwsh4jx7.js +0 -1
  876. package/web/chunk-xwsh4jx7.js.br +0 -2
  877. package/web/chunk-xwsh4jx7.js.gz +0 -0
  878. package/web/chunk-xxk7xkrs.js +0 -1
  879. package/web/chunk-xxk7xkrs.js.br +0 -0
  880. package/web/chunk-xxk7xkrs.js.gz +0 -0
  881. package/web/chunk-y5zd05mz.js +0 -40
  882. package/web/chunk-y5zd05mz.js.br +0 -0
  883. package/web/chunk-y5zd05mz.js.gz +0 -0
  884. package/web/chunk-yg9a23mv.js +0 -1
  885. package/web/chunk-yg9a23mv.js.br +0 -0
  886. package/web/chunk-yg9a23mv.js.gz +0 -0
  887. package/web/chunk-ygzgrjj7.js +0 -7
  888. package/web/chunk-ygzgrjj7.js.br +0 -0
  889. package/web/chunk-ygzgrjj7.js.gz +0 -0
  890. package/web/chunk-yp75a6yh.js +0 -4
  891. package/web/chunk-yp75a6yh.js.br +0 -0
  892. package/web/chunk-yp75a6yh.js.gz +0 -0
  893. package/web/chunk-yygayy5a.js +0 -1
  894. package/web/chunk-yygayy5a.js.br +0 -0
  895. package/web/chunk-yygayy5a.js.gz +0 -0
  896. package/web/chunk-zs7c2db4.js +0 -1
  897. package/web/chunk-zs7c2db4.js.br +0 -0
  898. package/web/chunk-zs7c2db4.js.gz +0 -0
  899. package/web/chunk-zsae1tn8.js +0 -98
  900. package/web/chunk-zsae1tn8.js.br +0 -0
  901. package/web/chunk-zsae1tn8.js.gz +0 -0
package/chunk-0p12aad6.js DELETED
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{h,f,g}from"./chunk-628vymvd.js";import{ie}from"./chunk-n0qwj5gm.js";var c=function(t,i){if(typeof t==="string"&&/^\.\.?\//.test(t))return t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,a,o,s,p){return a?i?".jsx":".js":o&&(!s||!p)?e:o+s+"."+p.toLowerCase()+"js"});return t},l=(t)=>{let i=import.meta.url.endsWith(".js")?t.replace(/\.ts$/,".js"):t;return import(c(i))},r;function Pi(t){r=t}var ki=()=>ie(async()=>r??await l("./bedrock-converse-stream.ts"));var n={"anthropic-messages":{"chat:claude-fable-5":{id:"claude-fable-5",name:"Claude Fable 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-fable-5.1":{id:"claude-fable-5.1",name:"Claude Fable 5.1",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:0.25,cacheWrite:12.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-haiku-4.5":{id:"claude-haiku-4.5",name:"Claude Haiku 4.5 (latest)",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:0.1,cacheWrite:1.25},contextWindow:200000,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsEagerToolInputStreaming:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-haiku-5.5":{id:"claude-haiku-5.5",name:"Claude Haiku 5.5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.1,output:0.5,cacheRead:0.01,cacheWrite:0.125,tiers:[{inputTokensAbove:1e5,input:0.5,output:2.5,cacheRead:0.05,cacheWrite:0.625}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-4.7":{id:"claude-opus-4.7",name:"Claude Opus 4.7",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:0.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:32000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-4.8":{id:"claude-opus-4.8",name:"Claude Opus 4.8",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:0.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-5":{id:"claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:0.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-5.5":{id:"claude-opus-5.5",name:"Claude Opus 5.5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:4,output:20,cacheRead:0.2,cacheWrite:5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-sonnet-4.6":{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:0.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:32000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-sonnet-5":{id:"claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-sonnet-5.5":{id:"claude-sonnet-5.5",name:"Claude Sonnet 5.5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.1,cacheWrite:2.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"}},"openai-completions":{"chat:gemini-3.5-flash":{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:0.15,cacheWrite:0},contextWindow:200000,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:3.75,cacheRead:0.075,cacheWrite:0},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gemini-3.7-flash":{id:"gemini-3.7-flash",name:"Gemini 3.7 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:3.75,cacheRead:0.075,cacheWrite:0},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gemini-3.8-flash":{id:"gemini-3.8-flash",name:"Gemini 3.8 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:3.75,cacheRead:0.075,cacheWrite:0},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.95,output:4,cacheRead:0.19,cacheWrite:0},contextWindow:256000,maxTokens:32000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:0.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsMidConvoSystemMessages:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"}},"openai-responses":{"chat:gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 Mini",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.25,output:2,cacheRead:0.025,cacheWrite:0},contextWindow:264000,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsOpenAIGrammarTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:0.25,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:5,output:22.5,cacheRead:0.5,cacheWrite:0}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 mini",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:4.5,cacheRead:0.075,cacheWrite:0},contextWindow:400000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.4-nano":{id:"gpt-5.4-nano",name:"GPT-5.4 nano",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.25,cacheRead:0.02,cacheWrite:0},contextWindow:400000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:10,output:45,cacheRead:1,cacheWrite:0}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.2,cacheRead:0.02,cacheWrite:0.25,tiers:[{inputTokensAbove:200000,input:0.4,output:1.8,cacheRead:0.04,cacheWrite:0.5}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:4,output:20,cacheRead:0.4,cacheWrite:5,tiers:[{inputTokensAbove:272000,input:8,output:30,cacheRead:0.8,cacheWrite:10}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:0.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272000,input:4,output:18,cacheRead:0.4,cacheWrite:5}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6-astra":{id:"gpt-6-astra",name:"GPT-6 Astra",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5,tiers:[{inputTokensAbove:272000,input:20,output:75,cacheRead:2,cacheWrite:25}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6-luna":{id:"gpt-6-luna",name:"GPT-6 Luna",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.1,output:0.5,cacheRead:0.01,cacheWrite:0.125,tiers:[{inputTokensAbove:272000,input:0.2,output:0.75,cacheRead:0.02,cacheWrite:0.25}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6-sol":{id:"gpt-6-sol",name:"GPT-6 Sol",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272000,input:4,output:15,cacheRead:0.4,cacheWrite:5}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6.1-sol":{id:"gpt-6.1-sol",name:"GPT-6.1 Sol",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.1,cacheWrite:2.5,tiers:[{inputTokensAbove:272000,input:4,output:15,cacheRead:0.2,cacheWrite:5}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:grok-4.5":{id:"grok-4.5",name:"Grok 4.5",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:200000,input:4,output:12,cacheRead:1,cacheWrite:0}]},contextWindow:500000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:grok-4.6":{id:"grok-4.6",name:"Grok 4.6",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:200000,input:4,output:12,cacheRead:1,cacheWrite:0}]},contextWindow:500000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:grok-4.7":{id:"grok-4.7",name:"Grok 4.7",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:200000,input:4,output:12,cacheRead:1,cacheWrite:0}]},contextWindow:500000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:mai-code-1-flash-picker":{id:"mai-code-1-flash-picker",name:"MAI-Code-1-Flash",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text"],cost:{input:0.75,output:4.5,cacheRead:0.075,cacheWrite:0},contextWindow:256000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},type:"chat"},"chat:mai-code-1.1-flash":{id:"mai-code-1.1-flash",name:"MAI-Code-1.1-Flash",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.2,cacheRead:0.02,cacheWrite:0},contextWindow:256000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"}}};var sn=h("github-copilot",n),T=f("github-copilot",n),w=g("github-copilot",n);var Go="https://radius.pi.dev";function m(t){if(typeof t!=="object"||t===null||Array.isArray(t))return!1;let i=t;return typeof i.id==="string"&&typeof i.name==="string"&&typeof i.reasoning==="boolean"&&Array.isArray(i.input)&&typeof i.cost==="object"&&i.cost!==null&&!Array.isArray(i.cost)&&typeof i.contextWindow==="number"&&typeof i.maxTokens==="number"}function u(t){if(typeof t!=="object"||t===null||Array.isArray(t))return;let{baseUrl:i,models:e}=t;if(typeof i!=="string"||!Array.isArray(e))return;return{baseUrl:i,models:e.filter(m).map((a)=>({...a}))}}function yr(t){return(/^https?:\/\//iu.test(t)?t:`https://${t}`).replace(/\/+$/u,"")}function x(t){return u(t?.gatewayConfig)}function zo(t,i){return i.models.map((e)=>({...e,api:"pi-messages",provider:t,baseUrl:i.baseUrl}))}function Ri(t,i){let e=x(i);return e?zo(t,e):[]}function v(t){let i=t.trim();return i.length>512?`${i.slice(0,512)}\u2026`:i}async function Ci(t,i,e){let a={accept:"application/json"};if(i)a.authorization=`Bearer ${i}`;let o=await fetch(new URL("/v1/config",t),{headers:a,signal:e});if(!o.ok)throw Error(`Could not load Radius config from ${t}: ${o.status}: ${v(await o.text())}`);let s=u(await o.json());if(!s)throw Error(`Invalid Radius config from ${t}`);return s}
3
- export{Pi,ki,sn,Go,yr,zo,Ri,Ci};
package/chunk-0vdz9j55.js DELETED
@@ -1,7 +0,0 @@
1
- // @bun
2
- import{w}from"./chunk-q2re8mn9.js";import{z}from"./chunk-m1w7f6d3.js";import{E}from"./chunk-628vymvd.js";import{rt}from"./chunk-f4tqhvff.js";import{ct}from"./chunk-drbd6485.js";import{Mt,Lt}from"./chunk-ynt6najh.js";import{se}from"./chunk-keq5kv9b.js";import{me}from"./chunk-2jeg8h8d.js";import{V,J}from"./chunk-8np9b2y8.js";import{we,an,ln,fe,br,Ie,xt,X,Vo,Ko,xe}from"./chunk-z6v2pcc0.js";import{x}from"./chunk-chfzk1fx.js";import{Y}from"./chunk-5h96jz3p.js";import{W,G,$e,le,Ae,Ee,ee,K}from"./chunk-n0qwj5gm.js";function Q(e,n){if(!e)return!1;let t=n.toLowerCase();for(let[s,u]of Object.entries(e))if(s.toLowerCase()===t&&u!==null&&u.trim().length>0)return!0;return!1}function ie(e,n,t){if(n)return n;if(Q(t,"authorization")||Q(t,"cf-aig-authorization"))return"unused";throw Error(`No API key for provider: ${e}`)}function ye(e){for(let n of e){if(n.role==="toolResult")return!0;if(n.role==="assistant"){if(n.content.some((t)=>t.type==="toolCall"))return!0}}return!1}function te(e){return e.type==="text"}function ke(e){return e.type==="thinking"}function Te(e){return e.type==="toolCall"}function Re(e){return e.type==="image"}function _e(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function ve(e){return(e.id===void 0||e.id===null||typeof e.id==="string")&&(e.format===void 0||typeof e.format==="string")&&(e.index===void 0||typeof e.index==="number")}function j(e){if(!_e(e)||!ve(e))return!1;switch(e.type){case"reasoning.summary":return typeof e.summary==="string";case"reasoning.encrypted":return typeof e.data==="string";case"reasoning.text":return typeof e.text==="string"&&(e.signature===void 0||e.signature===null||typeof e.signature==="string");default:return!1}}function Ce(e){if(!e)return;try{let n=JSON.parse(e);return Array.isArray(n)&&n.length>0&&n.every(j)?n:void 0}catch{return}}function Me(e){if(!e)return;try{let n=JSON.parse(e);return j(n)&&n.type==="reasoning.encrypted"&&typeof n.id==="string"&&n.id.length>0&&n.data.length>0?n:void 0}catch{return}}function ne(e,n){e.id??=n.id,e.format||=n.format,e.index??=n.index}function Se(e,n){let t=e[e.length-1];if(n.type==="reasoning.text"&&t?.type==="reasoning.text"){t.text+=n.text,t.signature||=n.signature,ne(t,n);return}if(n.type==="reasoning.summary"&&t?.type==="reasoning.summary"){t.summary+=n.summary,ne(t,n);return}e.push({...n})}var Fe=["reasoning","reasoning_content","reasoning_text"];function Oe(e){return Fe.includes(e)}function ae(e,n){if(e)return e;if(E("PI_CACHE_RETENTION",n)==="long")return"long";return"short"}var be=(e,n,t)=>{let s=new W,u=le(n,D(e).supportsMidConvoSystemMessages);return(async()=>{let r={role:"assistant",content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()},k,g=(R)=>{if(k!==void 0)R.thinkingSignature=JSON.stringify(k)};try{let R=ie(e.provider,t?.apiKey,t?.headers),a=D(e),T=Ie(Ae(u.messages),a.supportsOpenAIGrammarTools),p=ae(t?.cacheRetention,t?.env),d=p==="none"?void 0:t?.sessionId,o=Be(e,u,R,t?.headers,t?.fetch,d,a),f=Pe(e,u,t,a,p,T),h=await t?.onPayload?.(f,e);if(h!==void 0)f=h;let C={...t?.signal?{signal:t.signal}:{},...t?.timeoutMs!==void 0?{timeout:t.timeoutMs}:{},maxRetries:0},{data:M,response:P}=await me(()=>o.chat.completions.create(f,C).withResponse(),{maxRetries:t?.maxRetries,maxRetryDelayMs:t?.maxRetryDelayMs,signal:t?.signal});await t?.onResponse?.({status:P.status,headers:Y(P.headers)},e),s.push({type:"start",partial:r});let O=null,F=null,A=!1,b=new Map,L=new Map,l=r.content,I=(i)=>l.indexOf(i),H=(i)=>{let c=i.customInput?.property;if(c===void 0)return"";let _=i.arguments[c];return typeof _==="string"?_:""},U=(i,c,_)=>{let m=i.customInput;if(!m)return;let S=ln(m.jsonBuffer,m.property,c,_);return i.arguments={[m.property]:c},S},pe=(i)=>{let c=I(i);if(c===-1)return;if(i.type==="text")s.push({type:"text_end",contentIndex:c,content:i.text,partial:r});else if(i.type==="thinking")g(i),s.push({type:"thinking_end",contentIndex:c,content:i.thinking,partial:r});else if(i.type==="toolCall"){if(i.customInput){let _=U(i,H(i),!0);if(_!==void 0)s.push({type:"toolcall_delta",contentIndex:c,delta:_,partial:r})}else i.arguments=z(i.partialArgs);delete i.partialArgs,delete i.customInput,delete i.streamIndex,s.push({type:"toolcall_end",contentIndex:c,toolCall:i,partial:r})}},ge=()=>{if(!O)O={type:"text",text:""},l.push(O),s.push({type:"text_start",contentIndex:I(O),partial:r});return O},Z=(i)=>{if(!F)F={type:"thinking",thinking:"",thinkingSignature:i},l.push(F),s.push({type:"thinking_start",contentIndex:I(F),partial:r});return F},de=(i)=>{let c=typeof i.index==="number"?i.index:void 0,_=i.function?.name??i.custom?.name??"",m=c!==void 0?b.get(c):void 0;if(!m&&i.id)m=L.get(i.id);if(!m){let S=i.custom&&!i.function?T.get(_)??"input":void 0,B=S!==void 0;if(m={type:"toolCall",id:i.id||"",name:_,arguments:B?{[S]:""}:{},partialArgs:B?void 0:"",customInput:B?{property:S,jsonBuffer:{input:"",started:!1,closed:!1}}:void 0,streamIndex:c},c!==void 0)b.set(c,m);if(i.id)L.set(i.id,m);l.push(m),s.push({type:"toolcall_start",contentIndex:I(m),partial:r})}if(c!==void 0&&m.streamIndex===void 0)m.streamIndex=c,b.set(c,m);if(i.id)L.set(i.id,m);if(!m.name&&_)m.name=_;if(i.custom&&!i.function&&!m.customInput){let S=T.get(m.name)??"input";m.arguments={[S]:""},m.customInput={property:S,jsonBuffer:{input:"",started:!1,closed:!1}},delete m.partialArgs}return m};for await(let i of M){if(await t?.onProviderStreamEvent?.(i,e),!i||typeof i!=="object")continue;if(r.responseId||=i.id,typeof i.model==="string"&&i.model.length>0&&i.model!==e.id)r.responseModel||=i.model;if(i.usage)r.usage=oe(i.usage,e);let c=Array.isArray(i.choices)?i.choices[0]:void 0;if(!c)continue;if(!i.usage&&c.usage)r.usage=oe(c.usage,e);if(c.finish_reason){r.rawStopReason=c.finish_reason;let _=Je(c.finish_reason);if(r.stopReason=_.stopReason,_.errorMessage)r.errorMessage=_.errorMessage;A=!0}if(c.delta){if(c.delta.content!==null&&c.delta.content!==void 0&&c.delta.content.length>0){let y=ge();y.text+=c.delta.content,s.push({type:"text_delta",contentIndex:I(y),delta:c.delta.content,partial:r})}let _=["reasoning_content","reasoning","reasoning_text"],m=c.delta,S=null;for(let y of _){let v=m[y];if(typeof v==="string"&&v.length>0){S=y;break}}if(S){let y=m[S];if(typeof y==="string"&&y.length>0){let v=e.provider==="opencode-go"&&S==="reasoning"?"reasoning_content":S,q=Z(v);q.thinking+=y,s.push({type:"thinking_delta",contentIndex:I(q),delta:y,partial:r})}}if(c?.delta?.tool_calls)for(let y of c.delta.tool_calls){let v=de(y);if(!v.id&&y.id)v.id=y.id,L.set(y.id,v);let q=y.function?.name??y.custom?.name;if(!v.name&&q)v.name=q;let N="";if(y.function?.arguments)N=y.function.arguments,v.partialArgs=(v.partialArgs??"")+y.function.arguments,v.arguments=z(v.partialArgs);else if(y.custom?.input){let he=H(v)+y.custom.input;N=U(v,he,!1)??""}s.push({type:"toolcall_delta",contentIndex:I(v),delta:N,partial:r})}let B=c.delta.reasoning_details;if(Array.isArray(B))for(let y of B){if(!j(y))continue;Z(""),k??=[],Se(k,y)}}}for(let i of l)pe(i);if(t?.signal?.aborted)throw Error("Request was aborted");if(r.stopReason==="aborted")throw Error("Request was aborted");if(!A&&!a.supportsFinishReason)r.stopReason=r.content.some((i)=>i.type==="toolCall")?"toolUse":"stop";if(r.stopReason==="error")throw Error(r.errorMessage||"Provider returned an error stop reason");if(a.supportsFinishReason&&!A||r.stopReason==="pending")throw Error("Stream ended without finish_reason");s.push({type:"done",reason:r.stopReason,message:r}),s.end()}catch(R){for(let T of r.content){if(T.type==="thinking")g(T);delete T.index,delete T.partialArgs,delete T.customInput,delete T.streamIndex}r.stopReason=t?.signal?.aborted?"aborted":"error",r.errorMessage=J(V(R));let a=R?.error?.metadata?.raw;if(a&&!r.errorMessage.includes(String(a)))r.errorMessage+=`
3
- ${a}`;s.push({type:"error",reason:r.stopReason,error:r}),s.end()}})(),s},mt=(e,n,t)=>{ie(e.provider,t?.apiKey,t?.headers);let s={...X(e,n,t,t?.apiKey),toolChoice:t?.toolChoice},u=t?.reasoning?K(e,t.reasoning):void 0;return be(e,n,{...s,reasoningEffort:u==="off"?void 0:u,thinkingBudgets:t?.thinkingBudgets})};function Be(e,n,t,s,u,r,k=D(e)){let g={"User-Agent":se(),...e.headers};if(e.provider==="github-copilot"){let R=Mt(n.messages),a=Lt({messages:n.messages,hasImages:R});Object.assign(g,a)}if(r&&k.sendSessionAffinityHeaders)if(k.sessionAffinityFormat==="openrouter")g["x-session-id"]=r;else{if(k.sessionAffinityFormat==="openai")g.session_id=r;g["x-client-request-id"]=r,g["x-session-affinity"]=r}if(s)Object.assign(g,s);return new w({apiKey:t,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:u,defaultHeaders:g})}function Pe(e,n,t,s=D(e),u=ae(t?.cacheRetention,t?.env),r=Ie(Ae(n.messages),s.supportsOpenAIGrammarTools)){let k=Ee(n.messages,s.supportsMidConvoSystemMessages===!0&&s.supportsMidConvoToolAdditions===!0),g=We(e,n,s,{grammarToolInputProperties:r}),R=ze(s,u),a={model:e.id,messages:g,stream:!0,prompt_cache_key:e.baseUrl.includes("api.openai.com")&&u!=="none"||u==="long"&&s.supportsLongCacheRetention?rt(t?.sessionId):void 0,prompt_cache_retention:u==="long"&&s.supportsLongCacheRetention?"24h":void 0};if(s.supportsUsageInStreaming!==!1)a.stream_options={include_usage:!0};if(s.supportsStore)a.store=!1;if(t?.maxTokens)if(s.maxTokensField==="max_tokens")a.max_tokens=t.maxTokens;else a.max_completion_tokens=t.maxTokens;if(t?.temperature!==void 0)a.temperature=t.temperature;if(k.requestTools.length>0){if(a.tools=ce(k.requestTools,s),s.zaiToolStream)a.tool_stream=!0}else if(ye(n.messages))a.tools=[];if(R)Ge(g,a.tools,R);if(t?.toolChoice)a.tool_choice=t.toolChoice;if(s.vllmPriority!==void 0)a.priority=s.vllmPriority;let T=Le(s),p=qe(e,t,a);if(s.thinkingFormat==="zai"&&e.reasoning){let o=a;if(o.thinking=t?.reasoningEffort?{type:"enabled",clear_thinking:!1}:{type:"disabled"},t?.reasoningEffort&&s.supportsReasoningEffort){let f=e.thinkingLevelMap?.[t.reasoningEffort],h=f===void 0?t.reasoningEffort:f;if(typeof h==="string")o.reasoning_effort=h}}else if(s.thinkingFormat==="qwen"&&e.reasoning){if(a.enable_thinking=!!t?.reasoningEffort,t?.reasoningEffort&&s.supportsReasoningEffort){let o=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;if(typeof o==="string")a.reasoning_effort=o}}else if(s.thinkingFormat==="qwen-chat-template"&&e.reasoning)a.chat_template_kwargs={enable_thinking:!!t?.reasoningEffort,preserve_thinking:!0};else if(s.thinkingFormat==="chat-template"&&e.reasoning){let o=re(e,t,s.chatTemplateKwargs,p);if(o)a.chat_template_kwargs=o}else if(s.thinkingFormat==="baseten"&&e.reasoning){let o=a,f=re(e,t,s.chatTemplateArgs,p);if(f)o.chat_template_args=f;if(s.supportsReasoningEffort){let h=t?.reasoningEffort,C=h?e.thinkingLevelMap?.[h]:e.thinkingLevelMap?.off,M=C===void 0?h:C;if(typeof M==="string")o.reasoning_effort=M}}else if(s.thinkingFormat==="deepseek"&&e.reasoning){if(t?.reasoningEffort)a.thinking={type:"enabled"};else if(e.thinkingLevelMap?.off!==null)a.thinking={type:"disabled"};if(t?.reasoningEffort&&s.supportsReasoningEffort)a.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort}else if(s.thinkingFormat==="openrouter"&&e.reasoning){let o=a;if(t?.reasoningEffort)o.reasoning={effort:e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort};else if(e.thinkingLevelMap?.off!==null)o.reasoning={effort:e.thinkingLevelMap?.off??"none"}}else if(s.thinkingFormat==="ant-ling"&&e.reasoning&&t?.reasoningEffort){let o=e.thinkingLevelMap?.[t.reasoningEffort];if(typeof o==="string")a.reasoning={effort:o}}else if(s.thinkingFormat==="together"&&e.reasoning){let o=a;if(o.reasoning={enabled:!!t?.reasoningEffort},t?.reasoningEffort&&s.supportsReasoningEffort)o.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort}else if(s.thinkingFormat==="string-thinking"&&e.reasoning){let o=a;if(t?.reasoningEffort)o.thinking=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;else if(e.thinkingLevelMap?.off!==null)o.thinking=e.thinkingLevelMap?.off??"none"}else if(t?.reasoningEffort&&e.reasoning&&s.supportsReasoningEffort)a.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;else if(!t?.reasoningEffort&&e.reasoning&&s.supportsReasoningEffort){let o=e.thinkingLevelMap?.off;if(typeof o==="string")a.reasoning_effort=o}if(T&&p!==void 0)Object.assign(a,{[T]:p});if(e.compat?.openRouterRouting)a.provider=e.compat.openRouterRouting;if(e.compat?.vercelGatewayRouting){let o=e.compat.vercelGatewayRouting;if(o.only||o.order){let f={};if(o.only)f.only=o.only;if(o.order)f.order=o.order;a.providerOptions={gateway:f}}}let d=xt(e,t?.reasoningEffort??"off",t?.samplingParams);if(d)Object.assign(a,d);return a}function Le(e){if(e.thinkingTokenBudgetField)return e.thinkingTokenBudgetField;if(e.supportsThinkingTokenBudget)return"thinking_token_budget";return}function qe(e,n,t){if(!n?.reasoningEffort||!e.reasoning)return;let s=t.max_tokens??t.max_completion_tokens??e.maxTokens,u=Ko(Vo(n.reasoningEffort,n.thinkingBudgets),s);return u>0?u:void 0}function re(e,n,t,s){let u={};for(let[r,k]of Object.entries(t)){let g=De(e,n,k,s);if(g!==void 0)u[r]=g}return Object.keys(u).length>0?u:void 0}function De(e,n,t,s){if(typeof t!=="object"||t===null)return t;let u=n?.reasoningEffort;if(!u&&t.omitWhenOff)return;if(t.$var==="thinking.enabled")return!!u;if(t.$var==="thinking.budget")return s;let r=u?e.thinkingLevelMap?.[u]:e.thinkingLevelMap?.off;return r===void 0?u:typeof r==="string"?r:void 0}function ze(e,n){if(e.cacheControlFormat!=="anthropic"||n==="none")return;let t=n==="long"&&e.supportsLongCacheRetention?"1h":void 0;return{type:"ephemeral",...t?{ttl:t}:{}}}function Ge(e,n,t){Ne(e,t),Ke(n,t),je(e,t)}function Ne(e,n){for(let t of e)if(t.role==="system"||t.role==="developer"){He(t,n);return}}function je(e,n){for(let t=e.length-1;t>=0;t--){let s=e[t];if(s.role==="user"||s.role==="assistant"||s.role==="tool"){if(Ue(s,n))return}}}function Ke(e,n){if(!e||e.length===0)return;let t=e[e.length-1];t.cache_control=n}function He(e,n){return ue(e,n)}function Ue(e,n){if(e.role==="user"||e.role==="assistant"||e.role==="tool")return ue(e,n);return!1}function ue(e,n){let t=e.content;if(typeof t==="string"){if(t.length===0)return!1;return e.content=[{type:"text",text:t,cache_control:n}],!0}if(!Array.isArray(t))return!1;for(let s=t.length-1;s>=0;s--){let u=t[s];if(u?.type==="text"){let r=u;return r.cache_control=n,!0}}return!1}function We(e,n,t,s){let u=le(n,t.supportsMidConvoSystemMessages),r=[],k=(p)=>{if(p.includes("|")){let d=p.indexOf("|"),o=p.slice(0,d).replace(/[^a-zA-Z0-9_-]/g,"_"),f=p.slice(d+1).replace(/[^a-zA-Z0-9_-]/g,"_"),h=f.length>0?`${o}_${f}`:o;if(h.length<=40)return h;let C=ct(p).slice(0,8);return`${o.slice(0,Math.max(1,40-C.length-1))}_${C}`}if(e.provider==="openai")return p.length>40?p.slice(0,40):p;return p},g=xe(u.messages,e,(p)=>k(p)),R=Ee(u.messages,t.supportsMidConvoSystemMessages===!0&&t.supportsMidConvoToolAdditions===!0),a=e.reasoning&&t.supportsDeveloperRole?"developer":"system",T=null;for(let p=0;p<g.length;p++){let d=g[p];if(t.requiresAssistantAfterToolResult&&T==="toolResult"&&d.role==="user")r.push({role:"assistant",content:"I have processed the tool results."});if(d.role==="system"){let o=p>0&&R.anchorsAdditions?d.toolsAdded??[]:[];if(o.length>0){let h={role:"system",tools:ce(o,t)};r.push(h)}let f=p===0?G(d):$e(d);if(f.length>0)r.push({role:a,content:x(f)})}else if(d.role==="user")if(typeof d.content==="string")r.push({role:"user",content:x(d.content)});else{let o=d.content.filter((f)=>f.type!=="text"||f.text.length>0).map((f)=>{if(f.type==="text")return{type:"text",text:x(f.text)};else return{type:"image_url",image_url:{url:`data:${f.mimeType};base64,${f.data}`}}});if(o.length===0)continue;r.push({role:"user",content:o})}else if(d.role==="assistant"){let o={role:"assistant",content:t.requiresAssistantAfterToolResult?"":null},f=d.content.filter(te).filter((l)=>l.text.trim().length>0).map((l)=>({type:"text",text:x(l.text)})),h=f.map((l)=>l.text).join(""),C=d.content.filter(ke),M=d.content.filter(Te),P=C.map((l)=>Ce(l.thinkingSignature)).find((l)=>l!==void 0),O=M.map((l)=>Me(l.thoughtSignature)).filter((l)=>l!==void 0),F=P??(O.length>0?O:void 0),A=C.filter((l)=>l.thinking.trim().length>0);if(A.length>0)if(t.requiresThinkingAsText){let l=A.map((I)=>x(I.thinking)).join(`
4
-
5
- `);o.content=[{type:"text",text:l},...f]}else{if(h.length>0)o.content=h;if(!F){let l=A[0].thinkingSignature;if(e.provider==="opencode-go"&&l==="reasoning")l="reasoning_content";if(l&&Oe(l))o[l]=A.map((I)=>I.thinking).join(`
6
- `)}}else if(h.length>0)o.content=h;if(M.length>0)o.tool_calls=M.map((l)=>{let I=s?.grammarToolInputProperties?.get(l.name);if(I!==void 0)return{id:l.id,type:"custom",custom:{name:l.name,input:x(an(l.name,l.arguments,I))}};return{id:l.id,type:"function",function:{name:l.name,arguments:JSON.stringify(l.arguments)}}});if(F)o.reasoning_details=F;if(t.requiresReasoningContentOnAssistantMessages&&e.reasoning&&o.reasoning_content===void 0)o.reasoning_content="";let b=o.content;if(!(b!==null&&b!==void 0&&(typeof b==="string"?b.length>0:b.length>0))&&!o.tool_calls)continue;r.push(o)}else if(d.role==="toolResult"){let o=[],f=p;for(;f<g.length&&g[f].role==="toolResult";f++){let h=g[f],C=h.content.filter(te).map((A)=>A.text).join(`
7
- `),M=h.content.some((A)=>A.type==="image"),O=C.length>0?C:M?"(see attached image)":"(no tool output)",F={role:"tool",content:x(O),tool_call_id:h.toolCallId};if(t.requiresToolResultName&&h.toolName)F.name=h.toolName;if(r.push(F),M&&e.input.includes("image")){for(let A of h.content)if(Re(A))o.push({type:"image_url",image_url:{url:`data:${A.mimeType};base64,${A.data}`}})}}if(p=f-1,o.length>0){if(t.requiresAssistantAfterToolResult)r.push({role:"assistant",content:"I have processed the tool results."});r.push({role:"user",content:[{type:"text",text:"Attached image(s) from tool result:"},...o]}),T="user"}else T="toolResult";continue}T=d.role}return r}function ce(e,n){return e.map((t)=>{let s=br(t,n.supportsOpenAIGrammarTools);if(s)return{type:"custom",custom:{name:t.name,description:t.description,format:{type:"grammar",grammar:{syntax:s.format,definition:s.definition}}}};let u=fe(t,n.supportsStrictMode!==!1);return{type:"function",function:{name:t.name,description:t.description,parameters:we(t,u),...n.supportsStrictMode!==!1&&{strict:u??!1}}}})}function oe(e,n){let t=e.prompt_tokens||0,s=e.prompt_tokens_details?.cached_tokens??e.prompt_cache_hit_tokens??e.cached_tokens??0,u=e.prompt_tokens_details?.cache_write_tokens||0,r=Math.max(0,t-s-u),k=e.completion_tokens||0,g={input:r,output:k,cacheRead:s,cacheWrite:u,reasoning:e.completion_tokens_details?.reasoning_tokens||0,totalTokens:r+k+s+u,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}};return ee(n,g),g}function Je(e){if(e===null)return{stopReason:"stop"};switch(e){case"stop":case"end":return{stopReason:"stop"};case"length":return{stopReason:"length"};case"function_call":case"tool_calls":return{stopReason:"toolUse"};case"content_filter":return{stopReason:"error",errorMessage:"Provider finish_reason: content_filter"};case"network_error":return{stopReason:"error",errorMessage:"Provider finish_reason: network_error"};default:return{stopReason:"error",errorMessage:`Provider finish_reason: ${e}`}}}function Ve(e){let{provider:n,baseUrl:t}=e,s=n==="zai"||n==="zai-coding-cn"||t.includes("api.z.ai")||t.includes("open.bigmodel.cn"),u=n==="together"||t.includes("api.together.ai")||t.includes("api.together.xyz"),r=n==="moonshotai"||n==="moonshotai-cn"||t.includes("api.moonshot."),k=n==="openrouter"||t.includes("openrouter.ai"),g=n==="cloudflare-workers-ai"||t.includes("api.cloudflare.com"),R=n==="cloudflare-ai-gateway"||t.includes("gateway.ai.cloudflare.com"),a=n==="nvidia"||t.includes("integrate.api.nvidia.com"),T=n==="ant-ling"||t.includes("api.ant-ling.com"),p=n==="cerebras"||t.includes("cerebras.ai"),d=n==="deepseek"||t.toLowerCase().includes("deepseek.com"),o=a||p||n==="xai"||t.includes("api.x.ai")||u||t.includes("chutes.ai")||d||s||r||n==="opencode"||t.includes("opencode.ai")||g||R||T,f=t.includes("chutes.ai")||d||r||R||u||a||T||s,h=n==="xai"||t.includes("api.x.ai"),C=k&&(e.id.startsWith("anthropic/")||e.id.startsWith("openai/")),M=n==="openrouter"&&e.id.startsWith("anthropic/")?"anthropic":void 0;return{supportsStore:!o,supportsDeveloperRole:C||!o&&!k,supportsReasoningEffort:!h&&!s&&!r&&!u&&!R&&!a&&!T,supportsUsageInStreaming:!0,supportsFinishReason:!0,maxTokensField:f?"max_tokens":"max_completion_tokens",requiresToolResultName:!1,requiresAssistantAfterToolResult:!1,requiresThinkingAsText:!1,requiresReasoningContentOnAssistantMessages:d,thinkingFormat:d?"deepseek":s?"zai":u?"together":T?"ant-ling":k?"openrouter":"openai",openRouterRouting:{},vercelGatewayRouting:{},chatTemplateKwargs:{},chatTemplateArgs:{},zaiToolStream:!1,supportsThinkingTokenBudget:!1,thinkingTokenBudgetField:void 0,supportsStrictMode:!1,supportsOpenAIGrammarTools:!1,supportsMidConvoSystemMessages:!1,supportsMidConvoToolAdditions:!1,cacheControlFormat:M,sendSessionAffinityHeaders:k,sessionAffinityFormat:k?"openrouter":"openai",supportsLongCacheRetention:!(u||g||R||a||T)}}function D(e){let n=Ve(e);if(!e.compat)return n;return{supportsStore:e.compat.supportsStore??n.supportsStore,supportsDeveloperRole:e.compat.supportsDeveloperRole??n.supportsDeveloperRole,supportsReasoningEffort:e.compat.supportsReasoningEffort??n.supportsReasoningEffort,supportsUsageInStreaming:e.compat.supportsUsageInStreaming??n.supportsUsageInStreaming,supportsFinishReason:e.compat.supportsFinishReason??n.supportsFinishReason,maxTokensField:e.compat.maxTokensField??n.maxTokensField,requiresToolResultName:e.compat.requiresToolResultName??n.requiresToolResultName,requiresAssistantAfterToolResult:e.compat.requiresAssistantAfterToolResult??n.requiresAssistantAfterToolResult,requiresThinkingAsText:e.compat.requiresThinkingAsText??n.requiresThinkingAsText,requiresReasoningContentOnAssistantMessages:e.compat.requiresReasoningContentOnAssistantMessages??n.requiresReasoningContentOnAssistantMessages,thinkingFormat:e.compat.thinkingFormat??n.thinkingFormat,openRouterRouting:e.compat.openRouterRouting??{},vercelGatewayRouting:e.compat.vercelGatewayRouting??n.vercelGatewayRouting,chatTemplateKwargs:e.compat.chatTemplateKwargs??n.chatTemplateKwargs,chatTemplateArgs:e.compat.chatTemplateArgs??n.chatTemplateArgs,zaiToolStream:e.compat.zaiToolStream??n.zaiToolStream,supportsThinkingTokenBudget:e.compat.supportsThinkingTokenBudget??n.supportsThinkingTokenBudget,thinkingTokenBudgetField:e.compat.thinkingTokenBudgetField??n.thinkingTokenBudgetField,supportsStrictMode:e.compat.supportsStrictMode??n.supportsStrictMode,supportsOpenAIGrammarTools:e.compat.supportsOpenAIGrammarTools??n.supportsOpenAIGrammarTools,supportsMidConvoSystemMessages:e.compat.supportsMidConvoSystemMessages??n.supportsMidConvoSystemMessages,supportsMidConvoToolAdditions:e.compat.supportsMidConvoToolAdditions??n.supportsMidConvoToolAdditions,cacheControlFormat:e.compat.cacheControlFormat??n.cacheControlFormat,sendSessionAffinityHeaders:e.compat.sendSessionAffinityHeaders??n.sendSessionAffinityHeaders,sessionAffinityFormat:e.compat.sessionAffinityFormat??n.sessionAffinityFormat,supportsLongCacheRetention:e.compat.supportsLongCacheRetention??n.supportsLongCacheRetention,vllmPriority:e.compat.vllmPriority}}export{We as convertMessages,be as stream,mt as streamSimple};
package/chunk-1v0dv855.js DELETED
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{w}from"./chunk-q2re8mn9.js";import{E}from"./chunk-628vymvd.js";import"./chunk-m1w7f6d3.js";import{St,lt,wt}from"./chunk-6q0ak8d1.js";import{rt}from"./chunk-f4tqhvff.js";import{Mt,Lt}from"./chunk-ynt6najh.js";import{se}from"./chunk-keq5kv9b.js";import{me}from"./chunk-2jeg8h8d.js";import{V,J}from"./chunk-8np9b2y8.js";import{Ie,xt,X}from"./chunk-z6v2pcc0.js";import{Y}from"./chunk-5h96jz3p.js";import{W,le,Ae,Ee,K}from"./chunk-n0qwj5gm.js";var C=new Set(["openai","openai-codex","opencode","chatgpt:subscription"]),A=16,P="https://chatgpt.com/settings/usage";function O(e,s){return(e.provider==="openai"||e.provider==="chatgpt:subscription")&&e.baseUrl==="https://api.openai.com/v1"&&s!==void 0&&!s.startsWith("sk-")}function h(e,s){if(!e)return!1;let r=s.toLowerCase();for(let[t,i]of Object.entries(e))if(t.toLowerCase()===r&&i!==null&&i.trim().length>0)return!0;return!1}function T(e,s,r){if(s)return s;if(h(r,"authorization")||h(r,"cf-aig-authorization"))return"unused";throw Error(`No API key for provider: ${e}`)}function _(e){return e.provider==="openrouter"||e.baseUrl.includes("openrouter.ai")?"openrouter":"openai"}function v(e,s){if(e)return e;if(E("PI_CACHE_RETENTION",s)==="long")return"long";return"short"}function d(e){return{supportsDeveloperRole:e.compat?.supportsDeveloperRole??!0,supportsMidConvoSystemMessages:e.compat?.supportsMidConvoSystemMessages??!1,sessionAffinityFormat:e.compat?.sessionAffinityFormat??_(e),supportsLongCacheRetention:e.compat?.supportsLongCacheRetention??!0,supportsStrictMode:e.compat?.supportsStrictMode??!1,supportsOpenAIGrammarTools:e.compat?.supportsOpenAIGrammarTools??!1,supportsAdditionalTools:e.compat?.supportsAdditionalTools??!1,supportsToolSearch:e.compat?.supportsToolSearch??!1,supportsExplicitPromptCacheMode:e.compat?.supportsExplicitPromptCacheMode??!1,supportsMaxOutputTokens:e.compat?.supportsMaxOutputTokens??!0}}function I(e,s){return s==="long"&&e.supportsLongCacheRetention&&!e.supportsExplicitPromptCacheMode?"24h":void 0}function x(e,s){if(!e.supportsExplicitPromptCacheMode)return;if(s==="none")return{mode:"explicit"};if(s==="long"&&e.supportsLongCacheRetention)return{ttl:"30m"};return}var b=(e,s,r)=>{let t=new W,i=le(s,d(e).supportsMidConvoSystemMessages);return(async()=>{let o={role:"assistant",content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{let c=T(e.provider,r?.apiKey,r?.headers),p=v(r?.cacheRetention,r?.env)==="none"?void 0:r?.sessionId,n=d(e),u=Ie(Ae(i.messages),n.supportsOpenAIGrammarTools),l=k(e,i,c,r?.headers,r?.fetch,p),f=L(e,i,r,n,u),m=await r?.onPayload?.(f,e);if(m!==void 0)f=m;let R={...r?.signal?{signal:r.signal}:{},...r?.timeoutMs!==void 0?{timeout:r.timeoutMs}:{},maxRetries:0},{data:y,response:g}=await me(()=>l.responses.create(f,R).withResponse(),{maxRetries:r?.maxRetries,maxRetryDelayMs:r?.maxRetryDelayMs,signal:r?.signal});if(await r?.onResponse?.({status:g.status,headers:Y(g.headers)},e),t.push({type:"start",partial:o}),await wt(y,o,t,e,{onProviderStreamEvent:r?.onProviderStreamEvent,serviceTier:r?.serviceTier,grammarToolInputProperties:u,applyServiceTierPricing:(M,S)=>U(M,S,e)}),r?.signal?.aborted)throw Error("Request was aborted");if(o.stopReason==="pending")throw Error("OpenAI Responses stream ended without a stop reason");if(o.stopReason==="aborted"||o.stopReason==="error")throw Error(o.errorMessage||"An unknown error occurred");t.push({type:"done",reason:o.stopReason,message:o}),t.end()}catch(c){for(let p of o.content)delete p.index,delete p.partialJson,delete p.customInput;o.stopReason=r?.signal?.aborted?"aborted":"error";let a=J(V(c),`${e.provider==="openai"?"OpenAI":e.provider} API error`);o.errorMessage=a.includes("subscription_sharing_usage_limit_exceeded")?`${a}
3
- Check your ChatGPT usage: ${P}`:a,t.push({type:"error",reason:o.stopReason,error:o}),t.end()}})(),t},ne=(e,s,r)=>{T(e.provider,r?.apiKey,r?.headers);let t={...X(e,s,r,r?.apiKey),toolChoice:r?.toolChoice},i=r?.reasoning?K(e,r.reasoning):void 0;return b(e,s,{...t,reasoningEffort:i==="off"?void 0:i})};function k(e,s,r,t,i,o){let c=d(e),a={"User-Agent":se(),...e.headers};if(e.provider==="github-copilot"){let p=Mt(s.messages),n=Lt({messages:s.messages,hasImages:p});Object.assign(a,n)}if(o)if(c.sessionAffinityFormat==="openrouter")a["x-session-id"]=o;else{if(c.sessionAffinityFormat==="openai")a.session_id=o;a["x-client-request-id"]=o}if(t)Object.assign(a,t);return new w({apiKey:r,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:i,defaultHeaders:a})}function L(e,s,r,t=d(e),i=Ie(Ae(s.messages),t.supportsOpenAIGrammarTools)){let o=Ee(s.messages,t.supportsAdditionalTools||t.supportsToolSearch),c=St(e,s,C,{grammarToolInputProperties:i,supportsMidConvoSystemMessages:t.supportsMidConvoSystemMessages,supportsAdditionalTools:t.supportsAdditionalTools,supportsToolSearch:t.supportsToolSearch,toolOptions:{supportsStrictMode:t.supportsStrictMode,supportsOpenAIGrammarTools:t.supportsOpenAIGrammarTools}}),a=v(r?.cacheRetention,r?.env),p=O(e,r?.apiKey),n={model:e.id,input:c,stream:!0,prompt_cache_key:a==="none"?void 0:rt(r?.sessionId),prompt_cache_retention:p?void 0:I(t,a),prompt_cache_options:p?void 0:x(t,a),store:!1};if(r?.maxTokens&&t.supportsMaxOutputTokens&&!p)n.max_output_tokens=Math.max(r.maxTokens,A);if(r?.temperature!==void 0&&!p)n.temperature=r?.temperature;if(r?.serviceTier!==void 0)n.service_tier=r.serviceTier;if(o.requestTools.length>0)n.tools=lt(o.requestTools,{supportsStrictMode:t.supportsStrictMode,supportsOpenAIGrammarTools:t.supportsOpenAIGrammarTools});if(r?.toolChoice!==void 0)n.tool_choice=r.toolChoice;let u=r?.reasoningEffort??(r?.reasoningSummary?"medium":void 0);if(e.reasoning){if(u){let f=r?.reasoningEffort?e.thinkingLevelMap?.[r.reasoningEffort]??r.reasoningEffort:u;n.reasoning={effort:f,summary:r?.reasoningSummary||"auto"},n.include=["reasoning.encrypted_content"]}else if(e.provider!=="github-copilot"&&e.thinkingLevelMap?.off!==null)n.reasoning={effort:e.thinkingLevelMap?.off??"none"};if(e.provider==="xai")n.include=["reasoning.encrypted_content"]}let l=xt(e,u??"off",r?.samplingParams);if(l)Object.assign(n,l);return n}function G(e,s){switch(s){case"flex":return 0.5;case"priority":case"fast":return e.id==="gpt-5.5"?2.5:2;default:return 1}}function U(e,s,r){let t=G(r,s);if(t===1)return;e.cost.input*=t,e.cost.output*=t,e.cost.cacheRead*=t,e.cost.cacheWrite*=t,e.cost.total=e.cost.input+e.cost.output+e.cost.cacheRead+e.cost.cacheWrite}export{b as stream,ne as streamSimple};
package/chunk-2jeg8h8d.js DELETED
@@ -1,3 +0,0 @@
1
- // @bun
2
- function c(e){if(!(e instanceof Error)||!("status"in e)||!("headers"in e))return!1;return(e.status===void 0||typeof e.status==="number")&&(e.headers===void 0||e.headers instanceof Headers)}function d(e){let t=e.headers?.get("x-should-retry");if(t==="true")return!0;if(t==="false")return!1;if(e.status===void 0)return!0;return e.status===408||e.status===409||e.status===429||typeof e.status==="number"&&e.status>=500}function f(e,t,s){let n=t??60000;if(n>0&&e>n)throw Error(`Server requested ${Math.ceil(e/1000)}s retry delay (max: ${Math.ceil(n/1000)}s). ${s}`);return e}function l(e,t,s){let n=e.headers?.get("retry-after-ms");if(n){let a=Number.parseFloat(n);if(Number.isFinite(a))return f(a,s,e.message)}let r=e.headers?.get("retry-after");if(r){let a=Number.parseFloat(r),o=Number.isNaN(a)?Date.parse(r)-Date.now():a*1000;if(Number.isFinite(o))return f(o,s,e.message)}return Math.min(0.5*2**t,8)*1000*(1-Math.random()*0.25)}function i(){let e=Error("Request aborted");return e.name="AbortError",e}function m(e,t){return new Promise((s,n)=>{if(t?.aborted){n(i());return}let r=()=>{clearTimeout(u),n(i())},u=setTimeout(()=>{t?.removeEventListener("abort",r),s()},Math.max(0,e));t?.addEventListener("abort",r,{once:!0})})}async function me(e,t={}){let s=t.maxRetries??0,n=s;for(;;)try{return await e()}catch(r){if(t.signal?.aborted)throw i();if(n<=0||!c(r)||!d(r))throw r;if(r.status!==void 0&&t.noRetryStatuses?.includes(r.status))throw r;let u=s-n;n--,await m(l(r,u,t.maxRetryDelayMs),t.signal)}}
3
- export{me};
package/chunk-2q3tewbg.js DELETED
@@ -1,59 +0,0 @@
1
- // @bun
2
- function Ue(e){let t=Object.values(e).filter((o)=>typeof o==="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function pr(e,t="|"){return e.map((r)=>hr(r)).join(t)}function Me(e,t){if(typeof t==="bigint")return t.toString();return t}class on{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;if(e!==void 0)this._value=e(),this._getter=void 0;return this._value}}function Fe(e){return new on(e)}function nn(e){return e===null||e===void 0}function ct(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function sn(e,t){let r=e/t,o=Math.round(r),n=4*Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-o)<n)return 0;return r-o}function oe(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Be(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function me(e){return Be(e._zod.def)??e._zod.def.shape}function cn(e,t,r){Object.defineProperty(e,t,{get(){let o=r();return oe(this,t,o),o},enumerable:!0,configurable:!0})}function an(e,t,r){if(t in e)oe(e,t,r);else e[t]=r}function $e(e,t,r,o){let n=me(t);for(let i of r){let s=Object.getOwnPropertyDescriptor(n,i);if(!s.enumerable)continue;if(s.get)cn(e,i,()=>{let c=t._zod.def.shape[i];return o?o(c,i):c});else an(e,i,o?o(s.value,i):s.value)}}function Nu(e,t){for(let r of Reflect.ownKeys(t)){let o=Object.getOwnPropertyDescriptor(t,r);if(!o.enumerable)continue;if(o.get)cn(e,r,()=>t[r]);else an(e,r,o.value)}}function ee(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function un(e){return JSON.stringify(e)}function ln(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var fr="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Pe(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var pn=Fe(()=>{if(X.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function Se(e){if(Pe(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let r=t.prototype;if(Pe(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)return!1;return!0}function mr(e){if(Se(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}var fn=new Set(["string","number","symbol"]);function ze(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ue(e,t,r){let o=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)o._zod.parent=e;return o}function x(e){let t=e;if(!t)return{};if(typeof t==="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function hr(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function dn(e){return Object.keys(e).filter((t)=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var at=(()=>({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]}))(),gr={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function ju(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i={};return $e(i,e,ut(e,t)),ue(e,ee(r,{shape:i,checks:[]}))}function ut(e,t){let r=me(e),o=[];for(let n of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,n)?.enumerable)throw Error(`Unrecognized key: "${String(n)}"`);if(t[n])o.push(n)}return o}function Lu(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(ut(e,t)),s={};return $e(s,e,Reflect.ownKeys(me(e)).filter((c)=>!i.has(c))),ue(e,ee(r,{shape:s,checks:[]}))}function Du(e,t){if(!Se(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let n=me(e);for(let i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,i)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ue(e,ee(e._zod.def,{shape:mn(e,t)}))}function mn(e,t){let r={};return $e(r,e,Reflect.ownKeys(me(e))),Nu(r,t),r}function Uu(e,t){if(!Se(t))throw Error("Invalid input to safeExtend: expected a plain object");return ue(e,ee(e._zod.def,{shape:mn(e,t)}))}function Mu(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};$e(r,e,Reflect.ownKeys(me(e))),$e(r,t,Reflect.ownKeys(me(t)));let o=ee(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ue(e,o)}function hn(e,t,r,o="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${o}() cannot be used on object schemas containing refinements`);let c=r?new Set(ut(t,r)):void 0,a={};return $e(a,t,Reflect.ownKeys(me(t)),e&&((l,p)=>c&&!c.has(p)?l:new e({type:"optional",innerType:l}))),ue(t,ee(t._zod.def,{shape:a,checks:[]}))}function Fu(e,t,r){let o=r?new Set(ut(t,r)):void 0,n={};return $e(n,t,Reflect.ownKeys(me(t)),(i,s)=>o&&!o.has(s)?i:new e({type:"nonoptional",innerType:i})),ue(t,ee(t._zod.def,{shape:n}))}function pe(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function gn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function xe(e,t){return t.map((r)=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function De(e){return typeof e==="string"?e:e?.message}function _r(e){let t=[];for(let r of e??[]){let o=r._zod.def;if(!/_(length|size)$|_equals$/.test(o.check))break;let n=o.maximum??o.length??o.size;if(n>=0)t.push([n,r])}return t}function lt(e,t,r){var o;for(let n=t;n<e.length;n++)(o=e[n]).schema??(o.schema=r)}function fe(e,t,r){var o;let n=e.inst?._zod?.traits;if(n?.has("$ZodType"))if(n.has("$ZodCheck"))(o=e).schema??(o.schema=e.inst);else e.schema=e.inst;let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:De(e.inst?._zod.def?.error?.(e))??De(i?.(e))??De(t?.error?.(e))??De(r.customError?.(e))??De(r.localeError?.(e))??"Invalid input",c={};for(let a of Object.keys(e)){if(a==="inst"||a==="schema"||a==="continue"||a==="input"||a==="__proto__")continue;c[a]=e[a]}if(c.path??(c.path=[]),c.message=s,t?.reportInput)c.input=e.input;return c}var Bu=/[\uD800-\uDBFF]/;function pt(e){let t=e.length;if(!Bu.test(e))return t;let r=t;for(let o=0;o<t-1;o++)if((e.charCodeAt(o)&64512)===55296&&(e.charCodeAt(o+1)&64512)===56320)r--,o++;return r}function ft(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function _n(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function ke(...e){let[t,r,o]=e;if(typeof t==="string")return{message:t,code:"custom",input:r,inst:o};return{...t}}function zn(e,t){for(let r in t){let o=Object.getOwnPropertyDescriptor(t,r);if(o.get)Object.defineProperty(e,r,{...o,enumerable:!1});else Ju(e,r,o.value)}}function he(e,t,r,o=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:o,value:r}),r}function dt(e,t,r){return he(e,t,r,!1)}function xn(e,t){for(let r in e){let o=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return he(this,r,o(this))},set(n){he(this,r,n)}})}return t}function Ju(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:he(this,t,r.bind(this))},set(o){he(this,t,o)}})}function qu(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var lr,_e=!1,Vu={configurable:!0,get(){_e=!0;return}};function S(e,t,r){let o=Object.getPrototypeOf(e._zod);if(t in o&&lr!==e._zod){lr=void 0;return}lr=e._zod,Object.defineProperty(o,t,{configurable:!0,get(){Object.defineProperty(this,t,Vu);let n=_e;_e=!1;try{let i=r(this);if(_e)delete this[t];else Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i});return _e=_e||n,i}catch(i){throw delete this[t],_e=_e||n,i}},set(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})}function Ku(e,t,r,o){let n=qu(e,t);if(!n)return;Object.defineProperty(n,t,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:o,value:void 0};return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:o,value:i})}})}var Wu="~constantCatch";function yn(e){let t=()=>e;return t[Wu]=!0,t}var bn,yr=Object.freeze({status:"aborted"}),xr={value:void 0,enumerable:!1},vn="captureStackTrace"in Error?Error:null;function Gu(e){let t=vn;if(t){let r=t.stackTraceLimit;if(typeof r==="number"){try{t.stackTraceLimit=0}catch{return vn=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function f(e,t,r,o){let n={};function i(h){this.def=h,this.constr=d,this.traits=new Set}i.prototype=n;let s=r,c=s&&new WeakSet;function a(h,m){if(!h._zod){xr.value=new i(m);try{Object.defineProperty(h,"_zod",xr)}finally{xr.value=void 0}}else if(h._zod.traits.has(e))return;if(h._zod.traits.add(e),t(h,m),c){let b=Object.getPrototypeOf(h),v=h._zod.constr.prototype,k=b;while(k&&k!==v)k=Object.getPrototypeOf(k);let H=k??b;if(!c.has(H))c.add(H),zn(H,s)}let g=d.prototype;for(let b in g){if(!Object.prototype.hasOwnProperty.call(g,b))continue;if(!(b in h))h[b]=g[b].bind(h)}}let l=o?.Parent??Object;class p extends l{}Object.defineProperty(p,"name",{value:e});function d(h){let m=o?.Parent?Gu(p):this;a(m,h);let g=m._zod.deferred;if(g){for(let v of g)v();m._zod.deferred=void 0}let b=globalThis.__zod_globalConfig?.postProcessor;if(b)b(m);return m}return Object.defineProperty(d,"init",{value:a}),Object.defineProperty(d,Symbol.hasInstance,{value:(h)=>{if(o?.Parent&&h instanceof o.Parent)return!0;return h?._zod?.traits?.has(e)}}),Object.defineProperty(d,"name",{value:e}),d}class de extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Je extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}}(bn=globalThis).__zod_globalConfig??(bn.__zod_globalConfig={});var X=globalThis.__zod_globalConfig;function Y(e){if(e)Object.assign(X,e);return X}function Hu(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Me,2)),e.message}function Xu(e){this._zod.message=e}var Yu={get:Hu,set:Xu,enumerable:!0,configurable:!0},vr={value:void 0,enumerable:!1},wn=new WeakSet([Object.prototype,Error.prototype]),$n=(e,t)=>{e.name="$ZodError",vr.value=t,Object.defineProperty(e,"issues",vr),vr.value=void 0,Object.defineProperty(e,"message",Yu);let r=Object.getPrototypeOf(e);if(!wn.has(r))wn.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let o=()=>this.message;return Object.defineProperty(this,"toString",{value:o,configurable:!0,writable:!0}),o},set(o){Object.defineProperty(this,"toString",{value:o,configurable:!0,writable:!0})}})},Sn=f("$ZodError",$n),kn=f("$ZodError",$n,void 0,{Parent:Error});function Qu(e,t,r){if(!Object.prototype.hasOwnProperty.call(e,t))if(t==="__proto__")Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0});else e[t]=r();return e[t]}function wr(e,t=(r)=>r.message){let r={},o=[];for(let n of e.issues)if(n.path.length>0)Qu(r,n.path[0],()=>[]).push(t(n));else o.push(t(n));return{formErrors:o,fieldErrors:r}}function $r(e,t=(r)=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map((c)=>o({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")o({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")o({issues:s.issues},[...i,...s.path]);else{let c=[...i,...s.path];if(c.length===0)r._errors.push(t(s));else{let a=r,l=0;while(l<c.length){let p=c[l],d=l===c.length-1;if(p==="_errors"){if(d)a._errors.push(t(s));l++;continue}if(!Object.prototype.hasOwnProperty.call(a,p))Object.defineProperty(a,p,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let h=a[p];if(d)h._errors.push(t(s));a=h,l++}}}};return o(e),r}function mt(e,t){return{callee:t?.callee??e,Err:t?.Err}}var ht=(e)=>{let t=(r,o,n,i)=>{let s=n?{...n,async:!1}:{async:!1},c=r._zod.run({value:o,issues:[]},s);if(c instanceof Promise)throw new de;if(c.issues.length){let a=new(i?.Err??e)(c.issues.map((l)=>fe(l,s,Y())));throw fr(a,i?.callee??t),a}return c.value};return t};var gt=(e)=>{let t=async(r,o,n,i)=>{let s=n?{...n,async:!0}:{async:!0},c=r._zod.run({value:o,issues:[]},s);if(c instanceof Promise)c=await c;if(c.issues.length){let a=new(i?.Err??e)(c.issues.map((l)=>fe(l,s,Y())));throw fr(a,i?.callee??t),a}return c.value};return t};var qe=(e)=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new de;return i.issues.length?Pn(e,i.issues,n):{success:!0,data:i.value}},vo=qe(kn);function Pn(e,t,r){let o;return{success:!1,get error(){if(!o)o=new e(t.map((n)=>fe(n,r,Y()))),t=void 0,r=void 0;return o},set error(n){o=n,t=void 0,r=void 0}}}var _t=(e)=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)i=await i;return i.issues.length?Pn(e,i.issues,n):{success:!0,data:i.value}};var tl=Symbol.for("zod.compile.invalid"),rl=Symbol.for("zod.compile.fallback"),Sr=(e,t,r)=>{let o=e._zod.bag.validator;if(o!==void 0){if(o(t)!==tl)return!0;if(o.definite===!0&&r===void 0)return!1}return ol(e,t,r)};function ol(e,t,r){let o=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},n=e._zod.bag.fallbackRun,i;if(n)o[rl]=!0,i=n({value:t,issues:[]},o);else i=e._zod.run({value:t,issues:[]},o);if(i instanceof Promise)throw new de;return i.issues.length===0}var kr=async(e,t,r)=>{let o=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},n=e._zod.run({value:t,issues:[]},o);if(n instanceof Promise)n=await n;return n.issues.length===0},Zn=(e)=>{let t=ht(e),r=(o,n,i,s)=>{let c=i?{...i,direction:"backward"}:{direction:"backward"};return t(o,n,c,mt(r,s))};return r};var Tn=(e)=>{let t=ht(e),r=(o,n,i,s)=>t(o,n,i,mt(r,s));return r};var An=(e)=>{let t=gt(e),r=async(o,n,i,s)=>{let c=i?{...i,direction:"backward"}:{direction:"backward"};return await t(o,n,c,mt(r,s))};return r};var En=(e)=>{let t=gt(e),r=async(o,n,i,s)=>await t(o,n,i,mt(r,s));return r};var jn=(e)=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return qe(e)(t,r,n)};var Fn=(e)=>(t,r,o)=>qe(e)(t,r,o);var Bn=(e)=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return _t(e)(t,r,n)};var Jn=(e)=>async(t,r,o)=>_t(e)(t,r,o);var qn=/^[cC][0-9a-z]{6,}$/,Vn=/^[0-9a-z]+$/,Kn=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Wn=/^[0-9a-vA-V]{20}$/,Gn=/^[A-Za-z0-9]{27}$/,Hn=/^[a-zA-Z0-9_-]{21}$/;function Xn(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Yn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Qn=/^([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})$/,Zr=(e)=>{if(!e)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}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var ei=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var nl="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function ti(){return new RegExp(nl,"u")}var ri=/^(?:(?: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])$/,oi=/^(([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}|:))$/;var ni=/^((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])$/,ii=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,si=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ci=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;var ai=/^https?$/,ui=/^\+[1-9]\d{6,14}$/;var li="(?:(?:\\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])))";function il(e){return new RegExp(`^${e}$`)}var pi=il(li);function Pr(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.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{${e.precision}}`:e.seconds?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?":"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function di(e){return new RegExp(`^${Pr(e)}$`)}function mi(e){let t=["Z"];if(e.offset)t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${Pr({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,o=e.local?`${r}|${Pr({precision:e.precision})}`:r;return new RegExp(`^${li}T(?:${o})$`)}var _i=/^[\s\S]{0,}$/;var Or=/^-?\d+$/,Ve=/^-?\d+(?:\.\d+)?$/,zi=/^(?:true|false)$/i,xi=/^null$/i;var vi=/^[^A-Z]*$/,$i=/^[^a-z]*$/;var q=f("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var Rr=(e)=>{let t=e.value;return!nn(t)&&t.length!==void 0},zt={number:"number",bigint:"bigint",object:"date"},Cr=f("$ZodCheckLessThan",(e,t)=>{q.init(e,t);let r=zt[typeof t.value];e._zod.check=(o)=>{if(t.inclusive?o.value<=t.value:o.value<t.value)return;o.issues.push({origin:zt[typeof o.value]??r,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ir=f("$ZodCheckGreaterThan",(e,t)=>{q.init(e,t);let r=zt[typeof t.value];e._zod.check=(o)=>{if(t.inclusive?o.value>=t.value:o.value>t.value)return;o.issues.push({origin:zt[typeof o.value]??r,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ki=f("$ZodCheckMultipleOf",(e,t)=>{q.init(e,t),e._zod.check=(r)=>{if(typeof r.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof r.value==="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):sn(r.value,t.value)===0)return;r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Pi=f("$ZodCheckNumberFormat",(e,t)=>{q.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=at[t.format];e._zod.check=(s)=>{let c=s.value;if(r){if(!Number.isInteger(c)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){if(c>0)s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});else s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}if(c<n)s.issues.push({origin:"number",input:c,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort});if(c>i)s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});var Zi=f("$ZodCheckMaxLength",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=Rr),e._zod.check=(o)=>{let n=o.value,i=n.length;if((typeof n==="string"&&i>t.maximum?pt(n):i)<=t.maximum)return;let c=ft(n);o.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Oi=f("$ZodCheckMinLength",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=Rr),e._zod.check=(o)=>{let n=o.value,i=n.length;if((typeof n==="string"&&i>=t.minimum&&i<t.minimum*2?pt(n):i)>=t.minimum)return;let c=ft(n);o.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Ri=f("$ZodCheckLengthEquals",(e,t)=>{var r;q.init(e,t),(r=e._zod.def).when??(r.when=Rr),e._zod.check=(o)=>{let n=o.value,i=n.length,s=typeof n==="string"&&i>=t.length&&i<=t.length*2?pt(n):i;if(s===t.length)return;let c=ft(n),a=s>t.length;o.issues.push({origin:c,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Ke=f("$ZodCheckStringFormat",(e,t)=>{var r,o;if(q.init(e,t),t.pattern)(r=e._zod).check??(r.check=(n)=>{if(t.pattern.lastIndex=0,t.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(o=e._zod).check??(o.check=()=>{})}),Ci=f("$ZodCheckRegex",(e,t)=>{Ke.init(e,t),e._zod.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ii=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=vi),Ke.init(e,t)}),Ti=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=$i),Ke.init(e,t)}),Ai=f("$ZodCheckIncludes",(e,t)=>{q.init(e,t);let r=ze(t.includes),o=new RegExp(typeof t.position==="number"?`^.{${t.position},}${r}`:r);t.pattern=o,e._zod.check=(n)=>{if(n.value.includes(t.includes,t.position))return;n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ei=f("$ZodCheckStartsWith",(e,t)=>{q.init(e,t);let r=new RegExp(`^${ze(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=(o)=>{if(o.value.startsWith(t.prefix))return;o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Ni=f("$ZodCheckEndsWith",(e,t)=>{q.init(e,t);let r=new RegExp(`.*${ze(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=(o)=>{if(o.value.endsWith(t.suffix))return;o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});var ji=f("$ZodCheckOverwrite",(e,t)=>{q.init(e,t),e._zod.check=(r)=>{r.value=t.tx(r.value)}});class Tr{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
3
- `).filter((i)=>i),o=Math.min(...r.map((i)=>i.length-i.trimStart().length)),n=r.map((i)=>i.slice(o)).map((i)=>" ".repeat(this.indent*2)+i);for(let i of n)this.content.push(i)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
4
- ${t.join(`
5
- `)}
6
- };`)(...Object.values(this.closed))}}var Di={major:4,minor:6,patch:7};var R=f("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Di;let o=e._zod.def.checks,n=e._zod.traits.has("$ZodCheck")?[e,...o??[]]:o?.length?[...o]:[];for(let i of n)for(let s of i._zod.onattach)s(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(c,a,l)=>{if(c.memo)return c;let p=pe(c),d;for(let h of a){if(h._zod.def.when){if(gn(c))continue;if(!h._zod.def.when(c))continue}else if(p)continue;let m=c.issues.length,g=h._zod.check(c);if(g instanceof Promise&&l?.async===!1)throw new de;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{if(await g,c.issues.length===m)return;if(lt(c.issues,m,e),!p)p=pe(c,m)});else{if(c.issues.length===m)continue;if(lt(c.issues,m,e),!p)p=pe(c,m)}}if(d)return d.then(()=>c);return c},s=(c,a,l)=>{if(pe(c))return c.aborted=!0,c;let p=i(a,n,l);if(p instanceof Promise){if(l.async===!1)throw new de;return p.then((d)=>e._zod.parse(d,l))}return e._zod.parse(p,l)};e._zod.run=(c,a)=>{if(a.skipChecks)return e._zod.parse(c,a);if(a.direction==="backward"){let p=e._zod.parse({value:c.value,issues:[]},{...a,skipChecks:!0});if(p instanceof Promise)return p.then((d)=>s(d,c,a));return s(p,c,a)}let l=e._zod.parse(c,a);if(l instanceof Promise){if(a.async===!1)throw new de;return l.then((p)=>i(p,n,a))}return i(l,n,a)}}},{get "~standard"(){return dt(this,"~standard",Er(this))},set "~standard"(e){he(this,"~standard",e)}}),Hi=(e,t)=>e.issues.length?{issues:e.issues.map((r)=>fe(r,t,Y()))}:{value:e.value};async function sl(e,t){let r={async:!0};return Hi(await e._zod.run({value:t,issues:[]},r),r)}function Er(e){return{validate:(t)=>{let r={async:!1};try{let o=e._zod.run({value:t,issues:[]},r);if(!(o instanceof Promise))return Hi(o,r)}catch(o){}return sl(e,t)},vendor:"zod",version:1}}var wt=f("$ZodString",(e,t)=>{R.init(e,t),e._zod.pattern=t.pattern??_i,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch(n){}if(typeof r.value==="string")return r;return r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),T=f("$ZodStringFormat",(e,t)=>{Ke.init(e,t),wt.init(e,t)}),Xi=f("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Qn),T.init(e,t)}),Yi=f("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Zr(o))}else t.pattern??(t.pattern=Zr());T.init(e,t)}),Qi=f("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ei),T.init(e,t)}),es=1,bt=2;function ts(e){try{if(typeof URL<"u"&&typeof URL.canParse==="function")return URL.canParse(e);return new URL(e),!0}catch{return!1}}function cl(e,t){if(!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t))return ts(e)||bt;return al(e,t)}function al(e,t){if(!t.normalize&&t.protocol?.source===ai.source&&!/^https?:\/\//i.test(e))return es;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse==="function")return r.parse(e)??bt}return new URL(e)}catch{return bt}}var ul=/[\t\n\r]/g;function Ui(e){return e.replace(ul,"")}function ll(e,t){return t.lastIndex=0,t.test(e.hostname)}function pl(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var rs=f("$ZodURL",(e,t)=>{T.init(e,t),e._zod.check=(r)=>{try{let o=r.value.trim(),n=cl(o,t);if(n===es){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(n===bt){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(n===!0){r.value=Ui(o);return}if(t.hostname&&!ll(n,t.hostname))r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort});if(t.protocol&&!pl(n,t.protocol))r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort});r.value=t.normalize?n.href:Ui(o);return}catch(o){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),os=f("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ti()),T.init(e,t)}),ns=f("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?Hn:Xn(t.length)),T.init(e,t)}),is=f("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=qn),T.init(e,t)}),ss=f("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Vn),T.init(e,t)}),cs=f("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Kn),T.init(e,t)}),as=f("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Wn),T.init(e,t)}),us=f("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Gn),T.init(e,t)}),ls=f("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=mi(t)),T.init(e,t)}),ps=f("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=pi),T.init(e,t)}),fs=f("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=di(t)),T.init(e,t)}),ds=f("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Yn),T.init(e,t)}),ms=f("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ri),T.init(e,t)}),fl=/^[0-9a-fA-F:.]+$/;function hs(e){if(!fl.test(e))return!1;return ts(`http://[${e}]`)}var gs=f("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=oi),T.init(e,t),e._zod.check=(r)=>{if(!hs(r.value))r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}});var _s=f("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ni),T.init(e,t)});function dl(e){let t=e.split("/");if(t.length!==2)return!1;let[r,o]=t;if(!o)return!1;let n=Number(o);if(`${n}`!==o)return!1;if(n<0||n>128)return!1;return hs(r)}var zs=f("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ii),T.init(e,t),e._zod.check=(r)=>{if(!dl(r.value))r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function xs(e){if(e==="")return!0;if(/\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Nr=/^[0-9a-zA-Z+/]*={0,2}$/,ys=f("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Nr),T.init(e,t),e._zod.check=(r)=>{if(xs(r.value))return;r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),$t=/^[A-Za-z0-9_-]*$/;function ml(e){if(!$t.test(e))return!1;let t=e.replace(/[-_]/g,(o)=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return xs(r)}var bs=f("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=$t),T.init(e,t),e._zod.check=(r)=>{if(ml(r.value))return;r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),vs=f("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ui),T.init(e,t)});function hl(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));if("typ"in n&&n?.typ!=="JWT")return!1;if(!n.alg)return!1;if(t&&(!("alg"in n)||n.alg!==t))return!1;return!0}catch{return!1}}var ws=f("$ZodJWT",(e,t)=>{T.init(e,t),e._zod.check=(r)=>{if(hl(r.value,t.alg))return;r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}});var Lr=f("$ZodNumber",(e,t)=>{R.init(e,t),e._zod.pattern=Ve,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch(s){}let n=r.value;if(typeof n==="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n==="number"?Number.isNaN(n)?"NaN":!Number.isFinite(n)?String(n):void 0:void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),$s=f("$ZodNumberFormat",(e,t)=>{Pi.init(e,t),Lr.init(e,t)}),Ss=f("$ZodBoolean",(e,t)=>{R.init(e,t),e._zod.pattern=zi,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Boolean(r.value)}catch(i){}let n=r.value;if(typeof n==="boolean")return r;return r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}});var ks=f("$ZodNull",(e,t)=>{R.init(e,t),e._zod.pattern=xi,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;if(n===null)return r;return r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Ps=f("$ZodAny",(e,t)=>{R.init(e,t),e._zod.parse=(r)=>r}),Zs=f("$ZodUnknown",(e,t)=>{R.init(e,t),e._zod.parse=(r)=>r}),Os=f("$ZodNever",(e,t)=>{R.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function gl(e,t){let r=_r(e._zod.def.checks);if(!r.length)return;let o=Math.min(...r.map((i)=>i[0])),n=e._zod.parse;e._zod.parse=(i,s)=>{let c=t(i.value);if(c>o&&!s?.skipChecks&&s?.direction!=="backward"){for(let[a,l]of _r(e._zod.def.checks))if(c>a&&l._zod.def.when(i)){let p=i.issues.length;return l._zod.check(i),i.issues[p].continue=!1,lt(i.issues,p,e),i}}return n(i,s)}}var _l=(e)=>Array.isArray(e)?e.length:-1;function Mi(e,t,r){if(e.issues.length)t.issues.push(...xe(r,e.issues));t.value[r]=e.value}var Rs=f("$ZodArray",(e,t)=>{R.init(e,t);let r=X.memoizer;r?.attach(e),e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),o;o.value=r?r.alloc(e,o,Array(i.length),n):Array(i.length);let s=[],c=n?.abortEarly;for(let a=0;a<i.length;a++){let l=i[a],p=t.element._zod.run({value:l,issues:[]},n);if(p instanceof Promise)s.push(p.then((d)=>Mi(d,o,a)));else if(Mi(p,o,a),c&&p.issues.length!==0&&pe(p))break}if(s.length)return Promise.all(s).then(()=>o);return o},gl(e,_l)});function vt(e,t,r,o,n,i){let s=r in o,c=i==="optional";if(!s&&c&&n==="optional")return;if(e.issues.length){if(n!==void 0&&c&&!s)return;t.issues.push(...xe(r,e.issues))}if(!s&&n===void 0){if(!e.issues.length)t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}if(e.value===void 0){if(s||n==="defaulted"&&!c)t.value[r]=void 0}else t.value[r]=e.value}var zl=[];function Cs(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),o=r.length?r:zl,n=o.length?[...t,...o]:t;for(let s of n)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(s)}": expected a Zod schema`);let i=dn(e.shape);return{...e,allKeys:n,symbolKeys:o,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function Is(e,t,r,o,n,i,s){let c=[],a=n.keySet,l=n.catchall._zod,p=l.def.type,{optin:d,optout:h}=l,m=0;for(let g in t){if(s&&r.issues.length!==m){if(pe(r,m))break;m=r.issues.length}if(a.has(g))continue;if(g==="__proto__"){if(p==="never")c.push(g);continue}if(p==="never"){c.push(g);continue}let b=l.run({value:t[g],issues:[]},o);if(b instanceof Promise)e.push(b.then((v)=>vt(v,r,g,t,d,h)));else vt(b,r,g,t,d,h)}if(c.length)r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:i,continue:!0});if(!e.length)return r;return Promise.all(e).then(()=>r)}var xl=f("$ZodObject",(e,t)=>{R.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),o=r?.get?r.get.raw:t.shape??{};if(o){let l=()=>{let p={...o};return Object.defineProperty(t,"shape",{value:p}),l.raw=p,p};l.raw=o,Object.defineProperty(t,"shape",{get:l})}let n=Fe(()=>Cs(t));S(e,"propValues",(l)=>{let p=l.def.shape,d={};for(let h in p){let m=p[h]._zod;if(m.values){if(!Object.prototype.hasOwnProperty.call(d,h))oe(d,h,new Set);for(let g of m.values)d[h].add(g);if(m.optin!==void 0)d[h].add(void 0)}}return d});let i=Pe,s=t.catchall,c,a=X.memoizer;a?.attach(e),e._zod.parse=(l,p)=>{c??(c=n.value);let d=l.value;if(!i(d))return l.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),l;l.value=a?a.alloc(e,l,{},p):{};let h=[],m=c.shape,g=p?.abortEarly,b=l.issues.length;for(let v of c.allKeys){if(g&&l.issues.length!==b){if(pe(l,b))break;b=l.issues.length}if(v==="__proto__")continue;let k=m[v],H=k._zod.optin,F=k._zod.optout,ae=k._zod.run({value:d[v],issues:[]},p);if(ae instanceof Promise)h.push(ae.then((U)=>vt(U,l,v,d,H,F)));else vt(ae,l,v,d,H,F)}if(!s)return h.length?Promise.all(h).then(()=>l):l;return Is(h,d,l,p,n.value,e,g===!0)}}),Ts=f("$ZodObjectJIT",(e,t)=>{xl.init(e,t);let r=e._zod.parse,o=Fe(()=>Cs(t)),n=X.memoizer,i=(m)=>{let g=o.value,b=g.symbolKeys,v=new Tr(["payload","ctx"],{shape:m,inst:e,memo:n,syms:b}),k=(U)=>`shape[${U}]._zod.run({ value: input[${U}], issues: [] }, ctx)`,H=(U,Z)=>`
7
- let ${U}_ab = false;
8
- for (let i = 0; i < ${U}.issues.length; i++) {
9
- const iss = ${U}.issues[i];
10
- iss.path = iss.path ? [${Z}, ...iss.path] : [${Z}];
11
- payload.issues.push(iss);
12
- if (iss.continue !== true) ${U}_ab = true;
13
- }
14
- if (${U}_ab && ctx && ctx.abortEarly) {
15
- payload.value = newResult;
16
- return payload;
17
- }`;v.write("const input = payload.value;");let F=Object.create(null),ae=0;for(let U of g.allKeys)F[U]=`key_${ae++}`;v.write(n?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let U of g.allKeys){if(U==="__proto__")continue;let Z=F[U],le=typeof U==="symbol"?`syms[${b.indexOf(U)}]`:un(U),ar=`${le} in input`,tn=m[U],ur=tn?._zod?.optin,rn=ur!==void 0,Au=tn?._zod?.optout==="optional";if(v.write(`const ${Z} = ${k(le)};`),rn&&Au){let Eu=ur==="optional"?`${Z}_present`:`${Z}.value !== undefined || ${Z}_present`;v.write(`
18
- const ${Z}_present = ${ar};
19
- if (!${Z}.issues.length || ${Z}_present) {
20
- if (${Z}.issues.length) {${H(Z,le)}
21
- }
22
-
23
- if (${Eu}) {
24
- newResult[${le}] = ${Z}.value;
25
- }
26
- }
27
-
28
- `)}else if(!rn)v.write(`
29
- const ${Z}_present = ${ar};
30
- if (${Z}.issues.length) {${H(Z,le)}
31
- }
32
- if (!${Z}_present && !${Z}.issues.length) {
33
- payload.issues.push({
34
- code: "invalid_type",
35
- expected: "nonoptional",
36
- input: undefined,
37
- path: [${le}]
38
- });
39
- if (ctx && ctx.abortEarly) {
40
- payload.value = newResult;
41
- return payload;
42
- }
43
- }
44
-
45
- if (${Z}_present) {
46
- newResult[${le}] = ${Z}.value;
47
- }
48
-
49
- `);else if(v.write(`
50
- if (${Z}.issues.length) {${H(Z,le)}
51
- }
52
- `),ur==="defaulted")v.write(`newResult[${le}] = ${Z}.value;`);else v.write(`
53
- if (${Z}.value !== undefined || ${ar}) {
54
- newResult[${le}] = ${Z}.value;
55
- }
56
- `)}return v.write("payload.value = newResult;"),v.write("return payload;"),v.compile()},s,c=Pe,a=!X.jitless,p=a&&pn.value,d=t.catchall,h;e._zod.parse=(m,g)=>{h??(h=o.value);let b=m.value;if(!c(b))return m.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),m;if(a&&p&&g?.async===!1&&g.jitless!==!0){if(!s)s=i(t.shape);if(m=s(m,g),!d)return m;return Is([],b,m,g,h,e,g?.abortEarly===!0)}return r(m,g)}});function Fi(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter((i)=>!pe(i));if(n.length===1)return t.value=n[0].value,n[0];return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map((i)=>i.issues.map((s)=>fe(s,o,Y())))}),t}var Dr=f("$ZodUnion",(e,t)=>{R.init(e,t),S(e,"optin",(o)=>o.def.options.some((n)=>n._zod.optin==="defaulted")?"defaulted":o.def.options.some((n)=>n._zod.optin!==void 0)?"optional":void 0),S(e,"optout",(o)=>o.def.options.some((n)=>n._zod.optout==="optional")?"optional":void 0),S(e,"values",(o)=>{if(o.def.options.every((n)=>n._zod.values))return new Set(o.def.options.flatMap((n)=>Array.from(n._zod.values)));return}),S(e,"pattern",(o)=>{if(o.def.options.every((n)=>n._zod.pattern)){let n=o.def.options.map((i)=>i._zod.pattern);return new RegExp(`^(${n.map((i)=>ct(i.source)).join("|")})$`)}return});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of t.options){let a=c._zod.run({value:o.value,issues:[]},n);if(a instanceof Promise)s.push(a),i=!0;else{if(a.issues.length===0)return a;s.push(a)}}if(!i)return Fi(s,o,e,n);return Promise.all(s).then((c)=>Fi(c,o,e,n))}});function yl(e){let t=new Map;for(let r of e.options){let o=r._zod.propValues?.[e.discriminator];if(!o||o.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let n of o)if(t.has(n)){if(n!==void 0)throw Error(`Duplicate discriminator value "${String(n)}"`);t.set(n,null)}else t.set(n,r)}return t}var As=f("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Dr.init(e,t);let r=e._zod.parse;S(e,"propValues",(n)=>{let i={},s=0;for(let c of n.def.options){let a=c._zod.propValues;if(!a||Object.keys(a).length===0)throw Error(`Invalid discriminated union option at index "${n.def.options.indexOf(c)}"`);if(a[n.def.discriminator]?.has(void 0))s++;for(let[l,p]of Object.entries(a)){if(!Object.prototype.hasOwnProperty.call(i,l))oe(i,l,new Set);for(let d of p)i[l].add(d)}}if(!n.def.unionFallback&&s>1)i[n.def.discriminator]?.delete(void 0);return i}),t.options.forEach((n,i)=>{let s=Be(n._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,t.discriminator))throw Error(`Invalid discriminated union option at index "${i}"`)});let o=Fe(()=>yl(t));e._zod.parse=(n,i)=>{let s=n.value;if(!Pe(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let c=s?.[t.discriminator],a=o.value.get(c);if(a&&(c!==void 0||i.direction!=="backward"))return a._zod.run(n,i);if(t.unionFallback||i.direction==="backward")return r(n,i);return n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()).filter((l)=>o.value.get(l)!==null),input:s,path:[t.discriminator],inst:e}),n}}),Es=f("$ZodIntersection",(e,t)=>{R.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);if(i instanceof Promise||s instanceof Promise)return Promise.all([i,s]).then(([a,l])=>Bi(r,a,l));return Bi(r,i,s)}});function Ar(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(Se(e)&&Se(t)){let r=Object.keys(t),o=Object.keys(e).filter((i)=>r.indexOf(i)!==-1),n={...e,...t};if(Object.prototype.hasOwnProperty.call(n,"__proto__"))delete n.__proto__;for(let i of o){if(i==="__proto__")continue;let s=Ar(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=Ar(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Bi(e,t,r){let o=new Map,n,i=new Map,s=(l,p)=>{let d;if(l.code==="unrecognized_keys"&&!l.path?.length)n??(n=l),d=l.keys;else if(l.code==="invalid_key"&&l.origin==="record"&&l.path?.length===1){let h=String(l.path[0]);if(!i.has(h))i.set(h,l);d=[h]}else return!1;for(let h of d){if(!o.has(h))o.set(h,{});o.get(h)[p]=!0}return!0};for(let l of t.issues)if(!s(l,"l"))e.issues.push(l);for(let l of r.issues)if(!s(l,"r"))e.issues.push(l);let c=[...o].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(c.length){let l=n?c.filter((p)=>n.keys.includes(p)):[];if(l.length)e.issues.push({...n,keys:l});for(let p of c)if(!l.includes(p)&&i.has(p))e.issues.push(i.get(p))}let a=Ar(t.value,r.value);if(!a.valid){if(pe(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`)}return e.value=a.data,e}var Ns=f("$ZodRecord",(e,t)=>{R.init(e,t);let r=X.memoizer;r?.attach(e),e._zod.parse=(o,n)=>{let i=o.value;if(!Se(i))return o.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),o;let s=[],c=t.keyType._zod.values;if(c&&!t.partial){o.value=r?r.alloc(e,o,{},n):{};let a=new Set;for(let p of c)if(typeof p==="string"||typeof p==="number"||typeof p==="symbol"){if(a.add(typeof p==="number"?p.toString():p),p==="__proto__")continue;let d=t.keyType._zod.run({value:p,issues:[]},n);if(d instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(d.issues.length){o.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map((g)=>fe(g,n,Y())),input:p,path:[p],inst:e});continue}let h=d.value;if(h==="__proto__")continue;let m=t.valueType._zod.run({value:i[p],issues:[]},n);if(m instanceof Promise)s.push(m.then((g)=>{if(g.issues.length)o.issues.push(...xe(p,g.issues));o.value[h]=g.value}));else{if(m.issues.length)o.issues.push(...xe(p,m.issues));o.value[h]=m.value}}let l;for(let p in i)if(!a.has(p))if(t.mode==="loose"){if(p==="__proto__")continue;o.value[p]=i[p]}else l=l??[],l.push(p);if(l&&l.length>0)o.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:l,continue:!0})}else{o.value=r?r.alloc(e,o,{},n):{};let a;for(let l of Reflect.ownKeys(i)){if(l==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(i,l))continue;let p=t.keyType._zod.run({value:l,issues:[]},n);if(p instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof l==="string"&&Ve.test(l)&&p.issues.length){let g=t.keyType._zod.run({value:Number(l),issues:[]},n);if(g instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(g.issues.length===0)p=g}if(p.issues.length){if(t.mode==="loose")o.value[l]=i[l];else if(c)a=a??[],a.push(l);else o.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map((g)=>fe(g,n,Y())),input:l,path:[l],inst:e});continue}let h=p.value;if(h==="__proto__")continue;let m=t.valueType._zod.run({value:i[l],issues:[]},n);if(m instanceof Promise)s.push(m.then((g)=>{if(g.issues.length)o.issues.push(...xe(l,g.issues));o.value[h]=g.value}));else{if(m.issues.length)o.issues.push(...xe(l,m.issues));o.value[h]=m.value}}if(a&&a.length>0)o.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:a,continue:!0})}if(s.length)return Promise.all(s).then(()=>o);return o}});var js=f("$ZodEnum",(e,t)=>{R.init(e,t);let r=Ue(t.entries),o=new Set(r);e._zod.values=o,S(e,"pattern",(n)=>{let i=Ue(n.def.entries).filter((s)=>fn.has(typeof s));return new RegExp(i.length?`^(${i.map((s)=>ze(s.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,i)=>{let s=n.value;if(o.has(s))return n;return n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),Ls=f("$ZodLiteral",(e,t)=>{R.init(e,t);let r=new Set(t.values);e._zod.values=r,S(e,"pattern",(o)=>{let n=o.def.values;return new RegExp(n.length?`^(${n.map((i)=>typeof i==="string"?ze(i):i?ze(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,n)=>{let i=o.value;if(r.has(i))return o;return o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}});var Ds=f("$ZodTransform",(e,t)=>{R.init(e,t),e._zod.optin="optional",X.memoizer?.guard(e),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Je(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then((s)=>(r.value=s,r));if(n instanceof Promise)throw new de;return r.value=n,r}});function Ji(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ur=f("$ZodOptional",(e,t)=>{R.init(e,t),S(e,"optin",(r)=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",S(e,"values",(r)=>{let o=r.def.innerType._zod.values;return o?new Set([...o,void 0]):void 0}),S(e,"pattern",(r)=>{let o=r.def.innerType._zod.pattern;return o?new RegExp(`^(${ct(o.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let n=t.innerType._zod.run({value:r.value,issues:[]},o);if(n instanceof Promise)return n.then((i)=>Ji(r,i));return Ji(r,n)}return t.innerType._zod.run(r,o)}}),Us=f("$ZodExactOptional",(e,t)=>{Ur.init(e,t),S(e,"values",(r)=>r.def.innerType._zod.values),S(e,"pattern",(r)=>r.def.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Ms=f("$ZodNullable",(e,t)=>{R.init(e,t),S(e,"optin",(r)=>r.def.innerType._zod.optin),S(e,"optout",(r)=>r.def.innerType._zod.optout),S(e,"pattern",(r)=>{let o=r.def.innerType._zod.pattern;return o?new RegExp(`^(${ct(o.source)}|null)$`):void 0}),S(e,"values",(r)=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>{if(r.value===null)return r;return t.innerType._zod.run(r,o)}}),Fs=f("$ZodDefault",(e,t)=>{R.init(e,t),e._zod.optin="defaulted",S(e,"values",(r)=>r.def.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>qi(i,t));return qi(n,t)}});function qi(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var Bs=f("$ZodPrefault",(e,t)=>{R.init(e,t),e._zod.optin="defaulted",S(e,"values",(r)=>r.def.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)r.value=t.defaultValue;return t.innerType._zod.run(r,o)}}),Js=f("$ZodNonOptional",(e,t)=>{R.init(e,t),S(e,"values",(r)=>{let o=r.def.innerType._zod.values;return o?new Set([...o].filter((n)=>n!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>Vi(i,e));return Vi(n,e)}});function Vi(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t});return e}function Ki(e,t,r,o){if(!t.issues.length){if(e.value=t.value,t.memo)e.memo=!0;return e}return e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map((n)=>fe(n,o,Y()))},input:e.value}),e}var qs=f("$ZodCatch",(e,t)=>{R.init(e,t),S(e,"optin",(r)=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),S(e,"optout",(r)=>r.def.innerType._zod.optout),S(e,"values",(r)=>r.def.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run({value:r.value,issues:[]},o);if(n instanceof Promise)return n.then((i)=>Ki(r,i,t,o));return Ki(r,n,t,o)}});var Mr=f("$ZodPipe",(e,t)=>{R.init(e,t),S(e,"values",(r)=>r.def.in._zod.values),S(e,"optin",(r)=>r.def.in._zod.optin),S(e,"optout",(r)=>r.def.out._zod.optout),S(e,"propValues",(r)=>r.def.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);if(i instanceof Promise)return i.then((s)=>xt(s,t.in,o));return xt(i,t.in,o)}let n=t.in._zod.run(r,o);if(n instanceof Promise)return n.then((i)=>xt(i,t.out,o));return xt(n,t.out,o)}});function xt(e,t,r){if(e.issues.some((o)=>o.code!=="unrecognized_keys"))return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues},r)}var Vs=f("$ZodPreprocess",(e,t)=>{Mr.init(e,t)}),Ks=f("$ZodReadonly",(e,t)=>{R.init(e,t),S(e,"propValues",(r)=>r.def.innerType._zod.propValues),S(e,"values",(r)=>r.def.innerType._zod.values),S(e,"optin",(r)=>r.def.innerType?._zod?.optin),S(e,"optout",(r)=>r.def.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);if(n instanceof Promise)return n.then(Wi);return Wi(n)}});function Wi(e){if(!e.memo)e.value=Object.freeze(e.value);return e}var Ws=f("$ZodCustom",(e,t)=>{q.init(e,t),R.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=(r)=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then((i)=>Gi(i,r,o,e));Gi(n,r,o,e);return}});function Gi(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)n.params=o._zod.def.params;t.issues.push(ke(n))}}class Hs extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform");this.name="ZodCyclicError"}}var Br="~memo",Gs=[];function Xs(e){return e!==null&&typeof e==="object"}function Fr(e){return e.map((t)=>t.path?{...t,path:t.path.slice()}:{...t})}var Ys=new WeakMap,We=0,Pt=1,Ge=2;function Zt(e,t,r){let o=Ys.get(e);if(o!==void 0)return o?Ge:We;if(t.has(e))return Ge;t.add(e);let n=We,i=(p)=>{if(n!==Ge&&p?._zod){let d=Zt(p,t,r);if(d>n)n=d}},s=(p,d)=>{let h=We;for(let m of Reflect.ownKeys(p)){let g=Object.getOwnPropertyDescriptor(p,m);if(d&&!g.enumerable)continue;let b=g.get?Pt:g.value?._zod?Zt(g.value,t,r):We;if(b>h)h=b}return h},c=(p)=>{if(p>n)n=p},a=e._zod.def,l=a.type;switch(l){case"object":{let p=Be(a);c(p?s(p,!0):Pt),i(a.catchall);break}case"array":i(a.element);break;case"tuple":for(let p of a.items)i(p);i(a.rest);break;case"record":case"map":i(a.keyType),i(a.valueType);break;case"set":i(a.valueType);break;case"union":for(let p of a.options)i(p);break;case"intersection":i(a.left),i(a.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":i(a.innerType);break;case"pipe":i(a.in),i(a.out);break;case"function":i(a.input),i(a.output);break;case"lazy":{let p=a._cachedInner??(r?e._zod.innerType:void 0);c(p?Zt(p,t,!1):Pt);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let p in a){let d=Object.getOwnPropertyDescriptor(a,p);if(!d||d.get)continue;let h=d.value;if(!h||typeof h!=="object")continue;if(h._zod)i(h);else if(Array.isArray(h))for(let m of h)i(m)}}return t.delete(e),bl(e,n)}function bl(e,t){if(t!==Pt)Ys.set(e,t===Ge);return t}function vl(e,t){let r=e.buckets.get(t);if(!r)r=new WeakMap,e.buckets.set(t,r);return r}var St,kt=[],wl={alloc(e,t,r){let o=St;if(!o)return r;St=void 0;let n={value:r,issues:null};return o.set(t.value,n),kt.push(n),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,o=(n,i)=>{if(i.direction!=="backward"&&$l(i,n.value))throw new Hs;return r(n,i)};if(e._zod.parse=o,e._zod.run===r)e._zod.run=o})},attach(e){var t;let r,o=!1,n,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let s=e._zod.parse,c=(a,l)=>{if(r===void 0){let k=Zt(e,new Set,!1);if(k===We){if(e._zod.parse=s,e._zod.run===c)e._zod.run=s;return s(a,l)}if(k===Ge||o)r=!0;else o=!0}let p=a.value;if(!Xs(p))return s(a,l);let d=l[Br];if(!d)d={buckets:new WeakMap,backEdges:void 0},l[Br]=d;let h;if(n===l)h=i;else h=vl(d,e),n=l,i=h;let m=h.get(p);if(m){if(a.value=m.value,m.issues){if(m.issues.length)a.issues.push(...Fr(m.issues))}else a.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(m.value);return a}St=h;let g=kt.length,b=s(a,l);St=void 0;let v=kt.length>g?kt.pop():void 0;if(b instanceof Promise)return b.then((k)=>{if(v)v.issues=k.issues.length?Fr(k.issues):Gs;return k});if(v)v.issues=b.issues.length?Fr(b.issues):Gs;return b};if(e._zod.parse=c,e._zod.run===s)e._zod.run=c})}};function Jr(){return wl}function $l(e,t){let r=e[Br]?.backEdges;return r!==void 0&&Xs(t)&&r.has(t)}var Sl=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};function n(i,s){if(i==="number"&&typeof s==="number"&&!Number.isFinite(s))return String(s);return o[i]??i}return(i)=>{switch(i.code){case"invalid_type":{let s=n(i.expected),c=_n(i.input),a=n(c,i.input);return`Invalid input: expected ${s}, received ${a}`}case"invalid_value":if(i.values.length===1)return`Invalid input: expected ${hr(i.values[0])}`;return`Invalid option: expected one of ${pr(i.values,"|")}`;case"too_big":{let s=i.exact?"exactly ":i.inclusive?"<=":"<",c=t(i.origin);if(c)return`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${c.unit??"elements"}`;return`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case"too_small":{let s=i.exact?"exactly ":i.inclusive?">=":">",c=t(i.origin);if(c)return`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${c.unit}`;return`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;if(s.format==="starts_with")return`Invalid string: must start with "${s.prefix}"`;if(s.format==="ends_with")return`Invalid string: must end with "${s.suffix}"`;if(s.format==="includes")return`Invalid string: must include "${s.includes}"`;if(s.format==="regex")return`Invalid string: must match pattern ${s.pattern}`;return`Invalid ${r[s.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${pr(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":if(i.options&&Array.isArray(i.options)&&i.options.length>0)return`Invalid discriminator value. Expected ${i.options.map((c)=>`'${c}'`).join(" | ")}`;if(i.inclusive===!1)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function qr(){return{localeError:Sl()}}var Qs;class ec{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&typeof r==="object"&&"id"in r)this._idmap.set(r.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t==="object"&&"id"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let o={...r,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function tc(){return new ec}(Qs=globalThis).__zod_globalRegistry??(Qs.__zod_globalRegistry=tc());var be=globalThis.__zod_globalRegistry;function Vr(e){if(e.checks)e.checks=[...e.checks];return e}function rc(e,t){return new e(Vr({type:"string",...x(t)}))}function oc(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...x(t)})}function nc(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...x(t)})}function ic(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...x(t)})}function sc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...x(t)})}function cc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...x(t)})}function ac(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...x(t)})}function Kr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...x(t)})}function uc(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...x(t)})}function lc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...x(t)})}function pc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...x(t)})}function fc(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...x(t)})}function dc(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...x(t)})}function mc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...x(t)})}function hc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...x(t)})}function gc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...x(t)})}function _c(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...x(t)})}function zc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...x(t)})}function xc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...x(t)})}function yc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...x(t)})}function bc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...x(t)})}function vc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...x(t)})}function wc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...x(t)})}function Ot(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...x(t)})}function Wr(e,t){return new e({type:"string",format:"date",check:"string_format",...x(t)})}function Hr(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...x(t)})}function Xr(e,t){return new e({type:"string",format:"duration",check:"string_format",...x(t)})}function $c(e,t){return new e(Vr({type:"number",checks:[],...x(t)}))}function Sc(e,t){return new e(Vr({type:"number",coerce:!0,checks:[],...x(t)}))}function kc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...x(t)})}function Pc(e,t){return new e({type:"boolean",...x(t)})}function Zc(e,t){return new e({type:"null",...x(t)})}function Oc(e){return new e({type:"any"})}function Rc(e){return new e({type:"unknown"})}function Cc(e,t){return new e({type:"never",...x(t)})}function It(e,t){return new Cr({check:"less_than",...x(t),value:e,inclusive:!1})}function He(e,t){return new Cr({check:"less_than",...x(t),value:e,inclusive:!0})}function Tt(e,t){return new Ir({check:"greater_than",...x(t),value:e,inclusive:!1})}function Xe(e,t){return new Ir({check:"greater_than",...x(t),value:e,inclusive:!0})}function At(e,t){return new ki({check:"multiple_of",...x(t),value:e})}function Et(e,t){return new Zi({check:"max_length",...x(t),maximum:e})}function Oe(e,t){return new Oi({check:"min_length",...x(t),minimum:e})}function Nt(e,t){return new Ri({check:"length_equals",...x(t),length:e})}function Yr(e,t){return new Ci({check:"string_format",format:"regex",...x(t),pattern:e})}function Qr(e){return new Ii({check:"string_format",format:"lowercase",...x(e)})}function eo(e){return new Ti({check:"string_format",format:"uppercase",...x(e)})}function to(e,t){return new Ai({check:"string_format",format:"includes",...x(t),includes:e})}function ro(e,t){return new Ei({check:"string_format",format:"starts_with",...x(t),prefix:e})}function oo(e,t){return new Ni({check:"string_format",format:"ends_with",...x(t),suffix:e})}function ve(e){return new ji({check:"overwrite",tx:e})}function no(e){return ve((t)=>t.normalize(e))}function io(){return ve((e)=>e.trim())}function so(){return ve((e)=>e.toLowerCase())}function co(){return ve((e)=>e.toUpperCase())}function ao(){return ve((e)=>ln(e))}function Ic(e,t,r){return new e({type:"array",element:t,...x(r)})}function Tc(e,t,r){let o=x(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function Ac(e,t,r){return new e({type:"custom",check:"custom",fn:t,...x(r)})}function Ec(e,t){let r=kl((o)=>(o.addIssue=(n)=>{if(typeof n==="string")o.issues.push(ke(n,o.value,r._zod.def));else{let i=n;if(i.fatal)i.continue=!1;if(i.code??(i.code="custom"),!("input"in i))i.input=o.value;i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(ke(i))}},e(o.value,o)),t);return r}function kl(e,t){let r=new q({check:"custom",...x(t)});return r._zod.check=e,r}function Ye(e,...t){for(let r of t)for(let o of Reflect.ownKeys(r))if(Object.prototype.propertyIsEnumerable.call(r,o))oe(e,o,r[o]);return e}function lo(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";return{processors:e.processors??{},metadataRegistry:e?.metadata??be,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function ge(e,t,r,o,n){let i=typeof t.unrepresentable==="function"?t.unrepresentable({zodSchema:e,path:o.path,message:n}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw Error(n);return Object.assign(r,i),!0}function D(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i){if(i.count++,r.schemaPath.includes(e))i.cycle=r.path;return i.schema}let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let p={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,p);else{let h=s.schema,m=t.processors[n.type];if(!m)throw Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);m(e,t,h,p)}let d=e._zod.parent;if(d){if(!s.ref)s.ref=d;D(d,t,p),t.seen.get(d).isParent=!0}}let a=t.metadataRegistry.get(e);if(a)Ye(s.schema,a);if(t.io==="input"&&G(e))delete s.schema.examples,delete s.schema.default;if(t.io==="input"&&"_prefault"in s.schema)(o=s.schema).default??(o.default=s.schema._prefault);return delete s.schema._prefault,t.seen.get(e).schema}function Nc(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function po(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let o=new Map;for(let s of e.seen.entries()){let c=e.metadataRegistry.get(s[0])?.id;if(c){let a=o.get(c);if(a&&a!==s[0])throw Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(c,s[0])}}let n=(s)=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(s[0])?.id,h=e.external.uri??((g)=>g);if(d)return{ref:h(d)};let m=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=m,{defId:m,ref:`${h("__shared")}#/${c}/${Nc(m)}`}}let a="#",l=`${a}/${c}/`;if(s[1]===r&&!s[1].schema.id)return{ref:a};let p=s[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:l+Nc(p)}},i=(s)=>{if(s[1].schema.$ref)return;let c=s[1],{ref:a,defId:l}=n(s);if(c.def={...c.schema},l)c.defId=l;let p=c.schema;for(let d in p)delete p[d];p.$ref=a};if(e.cycles==="throw")for(let s of e.seen.entries()){let c=s[1];if(c.cycle)throw Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
57
-
58
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){i(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1){if(e.reused==="ref")i(s)}}if(e.external)e.sharedDefsExtractedFor=e.external}function Dc(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let o of t){if(!o||typeof o!=="object")return;Dc(o);let n=Object.keys(o);if(n.length!==1||n[0]!=="type")return;let i=o.type;for(let s of Array.isArray(i)?i:[i]){if(typeof s!=="string")return;if(!r.includes(s))r.push(s)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var Uc=new Set(["type","properties","required","additionalProperties"]),jc=["oneOf","anyOf"];function Lc(e){let t=e.additionalProperties;if(t===void 0||t===!1||typeof t!=="object"||t===null)return null;return Object.keys(t).length?t:null}function uo(e){let t=[];for(let i of e){if(typeof i!=="object"||i.type!=="object")return null;for(let s in i)if(!Uc.has(s))return null;t.push(i)}let r={},o=new Set;for(let i of t){for(let s in i.properties){if(Object.prototype.hasOwnProperty.call(r,s))continue;let c=[];for(let l of t){let p=l.properties?.[s]??Lc(l);if(p===null||p===void 0)continue;if(!c.some((d)=>JSON.stringify(d)===JSON.stringify(p)))c.push(p)}let a=c.length===1?c[0]:uo(c)??{allOf:c};oe(r,s,a)}for(let s of i.required??[])o.add(s)}let n={type:"object",properties:r};if(o.size)n.required=[...o];if(t.every((i)=>i.additionalProperties===!1))n.additionalProperties=!1;else{let i=[];for(let s of t){let c=Lc(s);if(c&&!i.some((a)=>JSON.stringify(a)===JSON.stringify(c)))i.push(c)}if(i.length===1)n.additionalProperties=i[0];else if(i.length>1)n.additionalProperties={allOf:i}}return n}function Pl(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let n of Uc)if(n in e)return;let r=t.filter((n)=>jc.some((i)=>Array.isArray(n[i]))),o=null;if(!r.length)o=uo(t);else{let n=r[0],i=jc.find((a)=>Array.isArray(n[a]));if(Object.keys(n).length!==1)return;let s=t.filter((a)=>a!==n),c=n[i].map((a)=>uo([...s,a]));if(c.some((a)=>!a))return;o={[i]:c}}if(!o)return;delete e.allOf,Ye(e,o)}function fo(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let o=(c)=>{let a=e.seen.get(c);if(a.ref===null)return;let l=a.def??a.schema,p={...l},d=a.ref;if(a.ref=null,d){o(d);let m=e.seen.get(d),g=m.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))l.allOf=l.allOf??[],l.allOf.push(g);else Ye(l,g);if(Ye(l,p),c._zod.parent===d)for(let v in l){if(v==="$ref"||v==="allOf")continue;if(!(v in p))delete l[v]}if(g.$ref&&m.def)for(let v in l){if(v==="$ref"||v==="allOf")continue;if(v in m.def&&JSON.stringify(l[v])===JSON.stringify(m.def[v]))delete l[v]}}let h=c._zod.parent;if(h&&h!==d){o(h);let m=e.seen.get(h);if(m?.schema.$ref){if(l.$ref=m.schema.$ref,m.def)for(let g in l){if(g==="$ref"||g==="allOf")continue;if(g in m.def&&JSON.stringify(l[g])===JSON.stringify(m.def[g]))delete l[g]}}}e.override({zodSchema:c,jsonSchema:l,path:a.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let c of[...e.seen.entries()].reverse())o(c[0]);if(e.target!=="openapi-3.0")for(let c of e.seen.entries())Dc(c[1].def??c[1].schema);for(let c of e.deferred)c();if(e.intersections.length){let c=new Map;for(let a of e.seen.values())for(let l of[a.schema,a.def]){let p=l?.allOf;if(!Array.isArray(p))continue;let d=c.get(p);if(d)d.push(l);else c.set(p,[l])}for(let a of e.intersections)for(let l of c.get(a)??[])Pl(l)}}let n={};if(e.target==="draft-2020-12")n.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")n.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")n.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw Error("Schema is missing an `id` property");n.$id=e.external.uri(c)}Ye(n,r.defId?r.schema:r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;if(i!==void 0&&n.id===i)delete n.id;let s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let c of e.seen.entries()){let a=c[1];if(a.def&&a.defId){if(a.def.id===a.defId)delete a.def.id;oe(s,a.defId,a.def)}}if(e.external)e.sharedEmitDoneFor=e.external;if(e.external);else if(Object.keys(s).length>0)if(e.target==="draft-2020-12")n.$defs=s;else n.definitions=s;try{let c=JSON.parse(JSON.stringify(n));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:et(t,"input",e.processors),output:et(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch(c){throw Error("Error converting schema to JSON.")}}function G(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return G(o.element,r);if(o.type==="set")return G(o.valueType,r);if(o.type==="lazy")return G(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault"||o.type==="catch")return G(o.innerType,r);if(o.type==="intersection")return G(o.left,r)||G(o.right,r);if(o.type==="record"||o.type==="map")return G(o.keyType,r)||G(o.valueType,r);if(o.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return G(o.in,r)||G(o.out,r)}if(o.type==="object"){for(let n in o.shape)if(G(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(G(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(G(n,r))return!0;if(o.rest&&G(o.rest,r))return!0;return!1}return!1}var Mc=(e,t={})=>(r)=>{let o=lo({...r,processors:t});return D(e,o),po(o,e),fo(o,e)},et=(e,t,r={})=>(o)=>{let{libraryOptions:n,target:i}=o??{},s=lo({...n??{},target:i,io:t,processors:r});return D(e,s),po(s,e),fo(s,e)};var Re=(e,t,r)=>{if(e[t]===void 0||r>e[t])e[t]=r},Ce=(e,t,r)=>{if(e[t]===void 0||r<e[t])e[t]=r},Fc=(e,t)=>{Re(e,"minimum",t),Ce(e,"maximum",t)},Vc=(e,t)=>{if(e.multipleOf??(e.multipleOf=[]),!e.multipleOf.includes(t))e.multipleOf.push(t)},Kc=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},Wc=(e,t)=>{e.mime=e.mime?e.mime.filter((r)=>t.includes(r)):[...t]},Gc=(e,t)=>{if(e.format=t,t.includes("int"))e.isInt=!0},Bc=(e,t)=>Re(e,"minimum",t.minimum),Jc=(e,t)=>Ce(e,"maximum",t.maximum),qc=(e)=>(t,r)=>{Gc(t,r.format);let[o,n]=e[r.format];Re(t,"minimum",o),Ce(t,"maximum",n)},Zl={greater_than:(e,t)=>Re(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Ce(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>Vc(e,t.value),number_format:qc(at),bigint_format:qc(gr),min_length:Bc,max_length:Jc,length_equals:(e,t)=>Fc(e,t.length),min_size:Bc,max_size:Jc,size_equals:(e,t)=>Fc(e,t.size),string_format:(e,t)=>{if(Gc(e,t.format),t.pattern)Kc(e,t.pattern);if(t.format==="base64"||t.format==="base64url")e.contentEncoding=t.format;if(t.local||t.precision===-1)e.laxFormat=!0},mime_type:(e,t)=>Wc(e,t.mime)};function ie(e){let t={},r=e._zod.def,o=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let i of o)Zl[i._zod.def.check]?.(t,i._zod.def);let n=e._zod.bag;if(n.minimum!==void 0)Re(t,"minimum",n.minimum);if(n.exclusiveMinimum!==void 0)Re(t,"exclusiveMinimum",n.exclusiveMinimum);if(n.maximum!==void 0)Ce(t,"maximum",n.maximum);if(n.exclusiveMaximum!==void 0)Ce(t,"exclusiveMaximum",n.exclusiveMaximum);if(n.multipleOf!==void 0)Vc(t,n.multipleOf);if(n.format!==void 0){if(t.format??(t.format=n.format),n.format.includes("int"))t.isInt=!0}if(n.mime)Wc(t,n.mime);for(let i of n.patterns??[])Kc(t,i);return t}var Ol={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Rl=new Map([[Nr,si],[$t,ci]]),Hc=(e)=>Rl.get(e)??e,Xc=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:s,format:c,patterns:a,contentEncoding:l,laxFormat:p}=ie(e);if(typeof i==="number")n.minLength=i;if(typeof s==="number")n.maxLength=s;if(c){if(n.format=Ol[c]??c,n.format==="")delete n.format;if(c==="time"||p)delete n.format}if(l)n.contentEncoding=l;if(a&&a.size>0){let d=[...a].map(Hc);if(d.length===1)n.pattern=d[0].source;else if(d.length>1)n.allOf=[...d.map((h)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))]}},Yc=(e,t,r,o)=>{let n=r,{minimum:i,maximum:s,multipleOf:c,exclusiveMaximum:a,exclusiveMinimum:l,isInt:p}=ie(e);n.type=p?"integer":"number";let d=typeof l==="number"&&l>=(i??Number.NEGATIVE_INFINITY),h=typeof a==="number"&&a<=(s??Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";if(d)if(m)n.minimum=l,n.exclusiveMinimum=!0;else n.exclusiveMinimum=l;else if(typeof i==="number")n.minimum=i;if(h)if(m)n.maximum=a,n.exclusiveMaximum=!0;else n.exclusiveMaximum=a;else if(typeof s==="number")n.maximum=s;if(c){let g=new Set;for(let k of c)if(Number.isFinite(k)&&k!==0)g.add(Math.abs(k));else ge(e,t,n,o,`A multipleOf divisor of ${k} cannot be represented in JSON Schema`);let[b,...v]=g;if(b!==void 0)n.multipleOf=b;if(v.length)n.allOf=[...n.allOf??[],...v.map((k)=>({multipleOf:k}))]}},Qc=(e,t,r,o)=>{r.type="boolean"};var ea=(e,t,r,o)=>{if(t.target==="openapi-3.0")r.type="string",r.nullable=!0,r.enum=[null];else r.type="null"};var ta=(e,t,r,o)=>{r.not={}},ra=(e,t,r,o)=>{},oa=(e,t,r,o)=>{};var na=(e,t,r,o)=>{let n=e._zod.def,i=Ue(n.entries);if(i.length===0){r.not={};return}if(i.every((s)=>typeof s==="number"))r.type="number";if(i.every((s)=>typeof s==="string"))r.type="string";r.enum=i},ia=(e,t,r,o)=>{let n=e._zod.def;if(n.values.length===0){r.not={};return}let i=[];for(let s of n.values)if(s===void 0){if(ge(e,t,r,o,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof s==="bigint"){if(ge(e,t,r,o,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(s))}else i.push(s);if(i.length===0);else if(i.length===1){let s=i[0];if(r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0")r.enum=[s];else r.const=s}else{if(i.every((s)=>typeof s==="number"))r.type="number";if(i.every((s)=>typeof s==="string"))r.type="string";if(i.every((s)=>typeof s==="boolean"))r.type="boolean";if(i.every((s)=>s===null))r.type="null";r.enum=i}};var sa=(e,t,r,o)=>{ge(e,t,r,o,"Custom types cannot be represented in JSON Schema")};var ca=(e,t,r,o)=>{ge(e,t,r,o,"Transforms cannot be represented in JSON Schema")};var aa=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:s,maximum:c}=ie(e);if(typeof s==="number")n.minItems=s;if(typeof c==="number")n.maxItems=c;n.type="array",n.items=D(i.element,t,{...o,path:[...o.path,"items"]})};function jt(e){let t=e._zod.def;if(t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform"))return jt(t.out);if(t.type==="catch")return jt(t.innerType);return e._zod.optin}var ua=(e,t,r,o)=>{let n=r,i=e._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&ge(e,t,n,o,"Symbol keys cannot be represented in JSON Schema"))return;n.type="object",n.properties={};for(let l in s)oe(n.properties,l,D(s[l],t,{...o,path:[...o.path,"properties",l]}));let a=[];for(let l of Object.keys(s)){let p=i.shape[l];if(t.io==="input"?jt(p)===void 0:p._zod.optout===void 0)a.push(l)}if(a.length>0)n.required=a;if(i.catchall?._zod.def.type==="never")n.additionalProperties=!1;else if(!i.catchall){if(t.io==="output")n.additionalProperties=!1}else if(i.catchall)n.additionalProperties=D(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})},la=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,s=n.options.map((c,a)=>D(c,t,{...o,path:[...o.path,i?"oneOf":"anyOf",a]}));if(i)r.oneOf=s;else r.anyOf=s},pa=(e,t,r,o)=>{let n=e._zod.def,i=D(n.left,t,{...o,path:[...o.path,"allOf",0]}),s=D(n.right,t,{...o,path:[...o.path,"allOf",1]}),c=(l)=>("allOf"in l)&&Object.keys(l).length===1,a=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];r.allOf=a,t.intersections.push(a)};function mo(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let g=e.get(t)?.def;if(!g)return t;let b=mo(e,g,r);return b===g?t:b}for(let g of["anyOf","oneOf"]){let b=t[g];if(!Array.isArray(b))continue;let v=b.map((k)=>mo(e,k,r));if(v.some((k,H)=>k!==b[H]))t={...t,[g]:v}}let o=Array.isArray(t.type)?t.type:[t.type],n=!o.includes("string")&&o.some((g)=>g==="number"||g==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!n&&!i?.some((g)=>typeof g==="number"))return t;let{minimum:s,maximum:c,exclusiveMinimum:a,exclusiveMaximum:l,multipleOf:p,format:d,id:h,...m}=t;if(m.enum)m.enum=m.enum.map((g)=>typeof g==="number"?String(g):g);else if(typeof m.const==="number")m.const=String(m.const);if(!n)return m;if(m.type="string",!i)m.pattern=(o.includes("number")?Ve:Or).source;return m}var ho=new WeakMap;function Cl(e){let t=new Map;for(let o of e.seen.values())if(o.def&&!t.has(o.schema))t.set(o.schema,o);let r=new Map;for(let o of ho.get(e)??[]){let n=e.seen.get(o),i=(n?.def??n?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;let s=mo(t,i,new Set);if(s!==i)r.set(i,s)}if(!r.size)return;for(let o of e.seen.values())for(let n of[o.schema,o.def]){let i=n&&r.get(n.propertyNames);if(i)n.propertyNames=i}}var fa=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let s=i.keyType,c=ie(s).patterns;if(i.mode==="loose"&&c&&c.size>0){let p=D(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let d of c)oe(n.patternProperties,Hc(d).source,p)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){n.propertyNames=D(i.keyType,t,{...o,path:[...o.path,"propertyNames"]});let p=ho.get(t);if(!p)p=[],ho.set(t,p),t.deferred.push(()=>Cl(t));p.push(e)}n.additionalProperties=D(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]})}let a=s._zod.values,l=t.io==="input"&&jt(i.valueType)!==void 0;if(a&&!i.partial&&!l){let p=[...a].filter((d)=>typeof d==="string"||typeof d==="number");if(p.length>0)n.required=p.map(String)}},da=(e,t,r,o)=>{let n=e._zod.def,i=D(n.innerType,t,o),s=t.seen.get(e);if(t.target==="openapi-3.0")s.ref=n.innerType,r.nullable=!0;else r.anyOf=[i,{type:"null"}]},ma=(e,t,r,o)=>{let n=e._zod.def;D(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},go=Symbol();function ha(e,t,r,o,n){let i=!1,s=JSON.stringify(e,(c,a)=>{if(typeof a!=="bigint")return a;return i=!0,null});if(!i)return JSON.parse(s);return ge(t,r,o,n,"BigInt defaults cannot be represented in JSON Schema"),go}var ga=(e,t,r,o)=>{let n=e._zod.def;D(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let s=ha(n.defaultValue,e,t,r,o);if(s!==go)r.default=s},_a=(e,t,r,o)=>{let n=e._zod.def;D(n.innerType,t,o);let i=t.seen.get(e);if(i.ref=n.innerType,t.io!=="input")return;let s=ha(n.defaultValue,e,t,r,o);if(s!==go)r._prefault=s},za=(e,t,r,o)=>{let n=e._zod.def;D(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{ge(e,t,r,o,"Dynamic catch values are not supported in JSON Schema");return}r.default=s},xa=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?n.out:n.in:n.out;D(s,t,o);let c=t.seen.get(e);c.ref=s},ya=(e,t,r,o)=>{let n=e._zod.def;D(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0};var zo=(e,t,r,o)=>{let n=e._zod.def;D(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType};var ba=new WeakSet([Object.prototype,Error.prototype]);function Lt(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let o=r(this);return Object.defineProperty(this,t,{value:o,configurable:!0,writable:!0}),o},set(o){Object.defineProperty(this,t,{value:o,configurable:!0,writable:!0})}})}var Ul=(e,t)=>{Sn.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);if(ba.has(r))return;ba.add(r),Lt(r,"format",(o)=>(n)=>$r(o,n)),Lt(r,"flatten",(o)=>(n)=>wr(o,n)),Lt(r,"addIssue",(o)=>(n)=>{o.issues.push(n),o.message=JSON.stringify(o.issues,Me,2)}),Lt(r,"addIssues",(o)=>(n)=>{o.issues.push(...n),o.message=JSON.stringify(o.issues,Me,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})};var te=f("ZodError",Ul,void 0,{Parent:Error});var va=ht(te),wa=gt(te),$a=qe(te),Sa=_t(te),ka=Zn(te),Pa=Tn(te),Za=An(te),Oa=En(te),Ra=jn(te),Ca=Fn(te),Ia=Bn(te),Ta=Jn(te);function Fl(){if(!X.localeError)Y(qr())}function Ut(){if(!X.memoizer)Y({memoizer:Jr()})}var A=f("ZodType",(e,t)=>(Fl(),R.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(ee(t,{checks:[...t.checks??[],...e.map((r)=>typeof r==="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return ue(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Op(e,t))},superRefine(e,t){return this.check(Rp(e,t))},overwrite(e){return this.check(ve(e))},optional(){return j(this)},exactOptional(){return _p(this)},nullable(){return Na(this)},nullish(){return j(Na(this))},nonoptional(e){return wp(this,e)},array(){return _(this)},or(e){return E([this,e])},and(e){return Ft(this,e)},transform(e){return ja(this,Ha(e))},default(e){return yp(this,e)},prefault(e){return vp(this,e)},catch(e){return Sp(this,e)},pipe(e){return ja(this,e)},readonly(){return Zp(this)},describe(e){let t=this.clone();return be.add(t,{description:e}),t},meta(...e){if(e.length===0)return be.get(this);let t=this.clone();return be.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get "~standard"(){return dt(this,"~standard",{...Er(this),jsonSchema:{input:et(this,"input"),output:et(this,"output")}})},set "~standard"(e){he(this,"~standard",e)},parse:function e(t,r){return va(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await wa(this,t,r,{callee:e})},safeParse(e,t){return $a(this,e,t)},async safeParseAsync(e,t){return Sa(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){he(this,"spa",e)},validate(e,t){return Sr(this,e,t)},validateAsync(e,t){return kr(this,e,t)},encode:function e(t,r){return ka(this,t,r,{callee:e})},decode:function e(t,r){return Pa(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await Za(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await Oa(this,t,r,{callee:e})},safeEncode(e,t){return Ra(this,e,t)},safeDecode(e,t){return Ca(this,e,t)},async safeEncodeAsync(e,t){return Ia(this,e,t)},async safeDecodeAsync(e,t){return Ta(this,e,t)},toJSONSchema(e){return Mc(this,{})(e)},get description(){return be.get(this)?.description},get _def(){return this._zod.def}}),La=f("_ZodString",(e,t)=>{wt.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xc(e,r,o,n)},xn({format:(e)=>ie(e).format??null,minLength:(e)=>ie(e).minimum??null,maxLength:(e)=>ie(e).maximum??null},{regex(...e){return this.check(Yr(...e))},includes(...e){return this.check(to(...e))},startsWith(...e){return this.check(ro(...e))},endsWith(...e){return this.check(oo(...e))},min(...e){return this.check(Oe(...e))},max(...e){return this.check(Et(...e))},length(...e){return this.check(Nt(...e))},nonempty(...e){return this.check(Oe(1,...e))},lowercase(e){return this.check(Qr(e))},uppercase(e){return this.check(eo(e))},trim(){return this.check(io())},normalize(...e){return this.check(no(...e))},toLowerCase(){return this.check(so())},toUpperCase(){return this.check(co())},slugify(){return this.check(ao())}})),Da=f("ZodString",(e,t)=>{wt.init(e,t),La.init(e,t)},{email(e){return this.check(oc(Bl,e))},url(e){return this.check(Kr(Ba,e))},jwt(e){return this.check(wc(ip,e))},emoji(e){return this.check(uc(ql,e))},guid(e){return this.check(nc(Jl,e))},uuid(e){return this.check(ic(Dt,e))},uuidv4(e){return this.check(sc(Dt,e))},uuidv6(e){return this.check(cc(Dt,e))},uuidv7(e){return this.check(ac(Dt,e))},nanoid(e){return this.check(lc(Vl,e))},cuid(e){return this.check(pc(Kl,e))},cuid2(e){return this.check(fc(Wl,e))},ulid(e){return this.check(dc(Gl,e))},base64(e){return this.check(yc(rp,e))},base64url(e){return this.check(bc(op,e))},xid(e){return this.check(mc(Hl,e))},ksuid(e){return this.check(hc(Xl,e))},ipv4(e){return this.check(gc(Yl,e))},ipv6(e){return this.check(_c(Ql,e))},cidrv4(e){return this.check(zc(ep,e))},cidrv6(e){return this.check(xc(tp,e))},e164(e){return this.check(vc(np,e))},datetime(e){return this.check(Ot(yo,e))},date(e){return this.check(Wr(Ua,e))},time(e){return this.check(Hr(Ma,e))},duration(e){return this.check(Xr(Fa,e))}});function u(e){return rc(Da,e)}var L=f("ZodStringFormat",(e,t)=>{T.init(e,t),La.init(e,t)}),yo=f("ZodISODateTime",(e,t)=>{ls.init(e,t),L.init(e,t)}),Ua=f("ZodISODate",(e,t)=>{ps.init(e,t),L.init(e,t)}),Ma=f("ZodISOTime",(e,t)=>{fs.init(e,t),L.init(e,t)}),Fa=f("ZodISODuration",(e,t)=>{ds.init(e,t),L.init(e,t)}),Bl=f("ZodEmail",(e,t)=>{Qi.init(e,t),L.init(e,t)});var Jl=f("ZodGUID",(e,t)=>{Xi.init(e,t),L.init(e,t)});var Dt=f("ZodUUID",(e,t)=>{Yi.init(e,t),L.init(e,t)});var Ba=f("ZodURL",(e,t)=>{rs.init(e,t),L.init(e,t)});function Ja(e){return Kr(Ba,e)}var ql=f("ZodEmoji",(e,t)=>{os.init(e,t),L.init(e,t)});var Vl=f("ZodNanoID",(e,t)=>{ns.init(e,t),L.init(e,t)});var Kl=f("ZodCUID",(e,t)=>{is.init(e,t),L.init(e,t)});var Wl=f("ZodCUID2",(e,t)=>{ss.init(e,t),L.init(e,t)});var Gl=f("ZodULID",(e,t)=>{cs.init(e,t),L.init(e,t)});var Hl=f("ZodXID",(e,t)=>{as.init(e,t),L.init(e,t)});var Xl=f("ZodKSUID",(e,t)=>{us.init(e,t),L.init(e,t)});var Yl=f("ZodIPv4",(e,t)=>{ms.init(e,t),L.init(e,t)});var Ql=f("ZodIPv6",(e,t)=>{gs.init(e,t),L.init(e,t)});var ep=f("ZodCIDRv4",(e,t)=>{_s.init(e,t),L.init(e,t)});var tp=f("ZodCIDRv6",(e,t)=>{zs.init(e,t),L.init(e,t)});var rp=f("ZodBase64",(e,t)=>{ys.init(e,t),L.init(e,t)});var op=f("ZodBase64URL",(e,t)=>{bs.init(e,t),L.init(e,t)});var np=f("ZodE164",(e,t)=>{vs.init(e,t),L.init(e,t)});var ip=f("ZodJWT",(e,t)=>{ws.init(e,t),L.init(e,t)});var Mt=f("ZodNumber",(e,t)=>{Lr.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yc(e,r,o,n),e.isFinite=!0},xn({minValue:(e)=>{let{minimum:t,exclusiveMinimum:r}=ie(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:(e)=>{let{maximum:t,exclusiveMaximum:r}=ie(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:(e)=>{let{isInt:t,multipleOf:r}=ie(e);return!!t||!!r?.some(Number.isSafeInteger)},format:(e)=>ie(e).format??null},{gt(e,t){return this.check(Tt(e,t))},gte(e,t){return this.check(Xe(e,t))},min(e,t){return this.check(Xe(e,t))},lt(e,t){return this.check(It(e,t))},lte(e,t){return this.check(He(e,t))},max(e,t){return this.check(He(e,t))},int(e){return this.check(Aa(e))},safe(e){return this.check(Aa(e))},positive(e){return this.check(Tt(0,e))},nonnegative(e){return this.check(Xe(0,e))},negative(e){return this.check(It(0,e))},nonpositive(e){return this.check(He(0,e))},multipleOf(e,t){return this.check(At(e,t))},step(e,t){return this.check(At(e,t))},finite(){return this}}));function w(e){return $c(Mt,e)}var sp=f("ZodNumberFormat",(e,t)=>{$s.init(e,t),Mt.init(e,t)});function Aa(e){return kc(sp,e)}var qa=f("ZodBoolean",(e,t)=>{Ss.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qc(e,r,o,n)});function O(e){return Pc(qa,e)}var cp=f("ZodNull",(e,t)=>{ks.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ea(e,r,o,n)});function Va(e){return Zc(cp,e)}var ap=f("ZodAny",(e,t)=>{Ps.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ra(e,r,o,n)});function Ka(){return Oc(ap)}var up=f("ZodUnknown",(e,t)=>{Zs.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>oa(e,r,o,n)});function N(){return Rc(up)}var lp=f("ZodNever",(e,t)=>{Os.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ta(e,r,o,n)});function pp(e){return Cc(lp,e)}var fp=f("ZodArray",(e,t)=>{Ut(),Rs.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>aa(e,r,o,n),e.element=t.element},{min(e,t){return this.check(Oe(e,t))},nonempty(e){return this.check(Oe(1,e))},max(e,t){return this.check(Et(e,t))},length(e,t){return this.check(Nt(e,t))},unwrap(){return this.element}});function _(e,t){return Ic(fp,e,t)}var Wa=f("ZodObject",(e,t)=>{Ut(),Ts.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ua(e,r,o,n),Ku(e,"shape",(r)=>r._zod.def.shape,!1)},{keyof(){return Q(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(ee(this._zod.def,{catchall:e}))},passthrough(){return this.clone(ee(this._zod.def,{catchall:N()}))},loose(){return this.clone(ee(this._zod.def,{catchall:N()}))},strict(){return this.clone(ee(this._zod.def,{catchall:pp()}))},strip(){return this.clone(ee(this._zod.def,{catchall:void 0}))},extend(e){return Du(this,e)},safeExtend(e){return Uu(this,e)},merge(e){return Mu(this,e)},pick(e){return ju(this,e)},omit(e){return Lu(this,e)},partial(...e){return hn(Xa,this,e[0])},exactPartial(...e){return hn(Ya,this,e[0],"exactPartial")},required(...e){return Fu(Qa,this,e[0])}});function z(e,t){let r={type:"object",shape:e??{},...x(t)};return new Wa(r)}function B(e,t){return new Wa({type:"object",shape:e,catchall:N(),...x(t)})}var Ga=f("ZodUnion",(e,t)=>{Dr.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>la(e,r,o,n),e.options=t.options});function E(e,t){return new Ga({type:"union",options:e,...x(t)})}var dp=f("ZodDiscriminatedUnion",(e,t)=>{Ga.init(e,t),As.init(e,t)});function bo(e,t,r){return new dp({type:"union",options:t,discriminator:e,...x(r)})}var mp=f("ZodIntersection",(e,t)=>{Es.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>pa(e,r,o,n)});function Ft(e,t){return new mp({type:"intersection",left:e,right:t})}var Ea=f("ZodRecord",(e,t)=>{Ut(),Ns.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>fa(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function I(e,t,r){if(!t||!t._zod)return new Ea({type:"record",keyType:u(),valueType:e,...x(t)});return new Ea({type:"record",keyType:e,valueType:t,...x(r)})}var xo=f("ZodEnum",(e,t)=>{js.init(e,t),A.init(e,t),e._zod.processJSONSchema=(o,n,i)=>na(e,o,n,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new xo({...t,checks:[],...x(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw Error(`Key ${s} not found in enum`);return new xo({...t,checks:[],...x(n),entries:i})}});function Q(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new xo({type:"enum",entries:r,...x(t)})}var hp=f("ZodLiteral",(e,t)=>{Ls.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ia(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function y(e,t){return new hp({type:"literal",values:Array.isArray(e)?e:[e],...x(t)})}var gp=f("ZodTransform",(e,t)=>{Ut(),Ds.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ca(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Je(e.constructor.name);r.addIssue=(i)=>{if(typeof i==="string")r.issues.push(ke(i,r.value,t));else{let s=i;if(s.fatal)s.continue=!1;if(s.code??(s.code="custom"),!("input"in s))s.input=r.value;s.inst??(s.inst=e),r.issues.push(ke(s))}};let n=t.transform(r.value,r);if(n instanceof Promise)return n.then((i)=>(r.value=i,r));return r.value=n,r}});function Ha(e){return new gp({type:"transform",transform:e})}var Xa=f("ZodOptional",(e,t)=>{Ur.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zo(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function j(e){return new Xa({type:"optional",innerType:e})}var Ya=f("ZodExactOptional",(e,t)=>{Us.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zo(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function _p(e){return new Ya({type:"optional",innerType:e})}var zp=f("ZodNullable",(e,t)=>{Ms.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>da(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Na(e){return new zp({type:"nullable",innerType:e})}var xp=f("ZodDefault",(e,t)=>{Fs.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ga(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function yp(e,t){return new xp({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():mr(t)}})}var bp=f("ZodPrefault",(e,t)=>{Bs.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>_a(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function vp(e,t){return new bp({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():mr(t)}})}var Qa=f("ZodNonOptional",(e,t)=>{Js.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ma(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function wp(e,t){return new Qa({type:"nonoptional",innerType:e,...x(t)})}var $p=f("ZodCatch",(e,t)=>{qs.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>za(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Sp(e,t){return new $p({type:"catch",innerType:e,catchValue:typeof t==="function"?t:yn(t)})}var eu=f("ZodPipe",(e,t)=>{Mr.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>xa(e,r,o,n),e.in=t.in,e.out=t.out});function ja(e,t){return new eu({type:"pipe",in:e,out:t})}var kp=f("ZodPreprocess",(e,t)=>{eu.init(e,t),Vs.init(e,t)}),Pp=f("ZodReadonly",(e,t)=>{Ks.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ya(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Zp(e){return new Pp({type:"readonly",innerType:e})}var tu=f("ZodCustom",(e,t)=>{Ws.init(e,t),A.init(e,t),e._zod.processJSONSchema=(r,o,n)=>sa(e,r,o,n)});function ru(e,t){return Tc(tu,e??(()=>!0),t)}function Op(e,t={}){return Ac(tu,e,t)}function Rp(e,t){return Ec(e,t)}function wo(e,t){return new kp({type:"pipe",in:Ha(e),out:t})}var nu={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};var ou;(function(e){})(ou||(ou={}));function Ip(e){return Ot(yo,e)}function Tp(e){return Sc(Mt,e)}var dr="2025-11-25";var hi=[dr,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Rt="io.modelcontextprotocol/related-task",Jt="2.0",J=ru((e)=>e!==null&&(typeof e==="object"||typeof e==="function")),cu=E([u(),w().int()]),au=u(),gg=B({ttl:w().optional(),pollInterval:w().optional()}),Ep=z({ttl:w().optional()}),Np=z({taskId:u()}),$o=B({progressToken:cu.optional(),[Rt]:Np.optional()}),re=z({_meta:$o.optional()}),tt=re.extend({task:Ep.optional()}),fi=(e)=>tt.safeParse(e).success,V=z({method:u(),params:re.loose().optional()}),se=z({_meta:$o.optional()}),ce=z({method:u(),params:se.loose().optional()}),K=B({_meta:$o.optional()}),Vt=E([u(),w().int()]),uu=z({jsonrpc:y(Jt),id:Vt,...V.shape}).strict(),Gr=(e)=>uu.safeParse(e).success,lu=z({jsonrpc:y(Jt),...ce.shape}).strict(),gi=(e)=>lu.safeParse(e).success,So=z({jsonrpc:y(Jt),id:Vt,result:K}).strict(),Wt=(e)=>So.safeParse(e).success;var C;(function(e){e[e.ConnectionClosed=-32000]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(C||(C={}));var Zo=z({jsonrpc:y(Jt),id:Vt.optional(),error:z({code:w().int(),message:u(),data:N().optional()})}).strict();var yi=(e)=>Zo.safeParse(e).success;var Ct=E([uu,lu,So,Zo]),_g=E([So,Zo]),Ht=K.strict(),jp=se.extend({requestId:Vt.optional(),reason:u().optional()}),Rn=ce.extend({method:y("notifications/cancelled"),params:jp}),Lp=z({src:u(),mimeType:u().optional(),sizes:_(u()).optional(),theme:Q(["light","dark"]).optional()}),rt=z({icons:_(Lp).optional()}),Te=z({name:u(),title:u().optional()}),pu=Te.extend({...Te.shape,...rt.shape,version:u(),websiteUrl:u().optional(),description:u().optional()}),Dp=Ft(z({applyDefaults:O().optional()}),I(u(),N())),Up=wo((e)=>{if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.keys(e).length===0)return{form:{}}}return e},Ft(z({form:Dp.optional(),url:J.optional()}),I(u(),N()).optional())),Mp=B({list:J.optional(),cancel:J.optional(),requests:B({sampling:B({createMessage:J.optional()}).optional(),elicitation:B({create:J.optional()}).optional()}).optional()}),Fp=B({list:J.optional(),cancel:J.optional(),requests:B({tools:B({call:J.optional()}).optional()}).optional()}),Bp=z({experimental:I(u(),J).optional(),sampling:z({context:J.optional(),tools:J.optional()}).optional(),elicitation:Up.optional(),roots:z({listChanged:O().optional()}).optional(),tasks:Mp.optional(),extensions:I(u(),J).optional()}),Jp=re.extend({protocolVersion:u(),capabilities:Bp,clientInfo:pu}),qp=V.extend({method:y("initialize"),params:Jp});var Vp=z({experimental:I(u(),J).optional(),logging:J.optional(),completions:J.optional(),prompts:z({listChanged:O().optional()}).optional(),resources:z({subscribe:O().optional(),listChanged:O().optional()}).optional(),tools:z({listChanged:O().optional()}).optional(),tasks:Fp.optional(),extensions:I(u(),J).optional()}),_o=K.extend({protocolVersion:u(),capabilities:Vp,serverInfo:pu,instructions:u().optional()}),fu=ce.extend({method:y("notifications/initialized"),params:se.optional()}),bi=(e)=>fu.safeParse(e).success,Cn=V.extend({method:y("ping"),params:re.optional()}),Kp=z({progress:w(),total:j(w()),message:j(u())}),Wp=z({...se.shape,...Kp.shape,progressToken:cu}),In=ce.extend({method:y("notifications/progress"),params:Wp}),Gp=re.extend({cursor:au.optional()}),ot=V.extend({params:Gp.optional()}),nt=K.extend({nextCursor:au.optional()}),Hp=Q(["working","input_required","completed","failed","cancelled"]),it=z({taskId:u(),status:Hp,ttl:E([w(),Va()]),createdAt:u(),lastUpdatedAt:u(),pollInterval:j(w()),statusMessage:j(u())}),qt=K.extend({task:it}),Xp=se.merge(it),zr=ce.extend({method:y("notifications/tasks/status"),params:Xp}),Mn=V.extend({method:y("tasks/get"),params:re.extend({taskId:u()})}),Ln=K.merge(it),On=V.extend({method:y("tasks/result"),params:re.extend({taskId:u()})}),zg=K.loose(),Nn=ot.extend({method:y("tasks/list")}),Dn=nt.extend({tasks:_(it)}),Un=V.extend({method:y("tasks/cancel"),params:re.extend({taskId:u()})}),Si=K.merge(it),du=z({uri:u(),mimeType:j(u()),_meta:I(u(),N()).optional()}),mu=du.extend({text:u()}),jo=u().refine((e)=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),hu=du.extend({blob:jo}),st=Q(["user","assistant"]),Ae=z({audience:_(st).optional(),priority:w().min(0).max(1).optional(),lastModified:Ip({offset:!0}).optional()}),gu=z({...Te.shape,...rt.shape,uri:u(),description:j(u()),mimeType:j(u()),size:j(w()),annotations:Ae.optional(),_meta:j(B({}))}),Yp=z({...Te.shape,...rt.shape,uriTemplate:u(),description:j(u()),mimeType:j(u()),annotations:Ae.optional(),_meta:j(B({}))}),Qp=ot.extend({method:y("resources/list")}),Ao=nt.extend({resources:_(gu)}),ef=ot.extend({method:y("resources/templates/list")}),Eo=nt.extend({resourceTemplates:_(Yp)}),Fo=re.extend({uri:u()}),tf=Fo,rf=V.extend({method:y("resources/read"),params:tf}),To=K.extend({contents:_(E([mu,hu]))}),Po=ce.extend({method:y("notifications/resources/list_changed"),params:se.optional()}),of=Fo,nf=V.extend({method:y("resources/subscribe"),params:of}),sf=Fo,cf=V.extend({method:y("resources/unsubscribe"),params:sf}),af=se.extend({uri:u()}),uf=ce.extend({method:y("notifications/resources/updated"),params:af}),lf=z({name:u(),description:j(u()),required:j(O())}),pf=z({...Te.shape,...rt.shape,description:j(u()),arguments:j(_(lf)),_meta:j(B({}))}),ff=ot.extend({method:y("prompts/list")}),ko=nt.extend({prompts:_(pf)}),df=re.extend({name:u(),arguments:I(u(),u()).optional()}),mf=V.extend({method:y("prompts/get"),params:df}),Bo=z({type:y("text"),text:u(),annotations:Ae.optional(),_meta:I(u(),N()).optional()}),Jo=z({type:y("image"),data:jo,mimeType:u(),annotations:Ae.optional(),_meta:I(u(),N()).optional()}),qo=z({type:y("audio"),data:jo,mimeType:u(),annotations:Ae.optional(),_meta:I(u(),N()).optional()}),hf=z({type:y("tool_use"),name:u(),id:u(),input:I(u(),N()),_meta:I(u(),N()).optional()}),gf=z({type:y("resource"),resource:E([mu,hu]),annotations:Ae.optional(),_meta:I(u(),N()).optional()}),_f=gu.extend({type:y("resource_link")}),Vo=E([Bo,Jo,qo,_f,gf]),zf=z({role:st,content:Vo}),Ro=K.extend({description:u().optional(),messages:_(zf)}),Co=ce.extend({method:y("notifications/prompts/list_changed"),params:se.optional()}),xf=z({title:u().optional(),readOnlyHint:O().optional(),destructiveHint:O().optional(),idempotentHint:O().optional(),openWorldHint:O().optional()}),yf=z({taskSupport:Q(["required","optional","forbidden"]).optional()}),_u=z({...Te.shape,...rt.shape,description:u().optional(),inputSchema:z({type:y("object"),properties:I(u(),J).optional(),required:_(u()).optional()}).catchall(N()),outputSchema:z({type:y("object"),properties:I(u(),J).optional(),required:_(u()).optional()}).catchall(N()).optional(),annotations:xf.optional(),execution:yf.optional(),_meta:I(u(),N()).optional()}),bf=ot.extend({method:y("tools/list")}),Io=nt.extend({tools:_(_u)}),yt=K.extend({content:_(Vo).default([]),structuredContent:I(u(),N()).optional(),isError:O().optional()}),xg=yt.or(K.extend({toolResult:N()})),vf=tt.extend({name:u(),arguments:I(u(),N()).optional()}),wf=V.extend({method:y("tools/call"),params:vf}),jr=ce.extend({method:y("notifications/tools/list_changed"),params:se.optional()}),wi=z({autoRefresh:O().default(!0),debounceMs:w().int().nonnegative().default(300)}),zu=Q(["debug","info","notice","warning","error","critical","alert","emergency"]),$f=re.extend({level:zu}),Sf=V.extend({method:y("logging/setLevel"),params:$f}),kf=se.extend({level:zu,logger:u().optional(),data:N()}),Pf=ce.extend({method:y("notifications/message"),params:kf}),Zf=z({name:u().optional()}),Of=z({hints:_(Zf).optional(),costPriority:w().min(0).max(1).optional(),speedPriority:w().min(0).max(1).optional(),intelligencePriority:w().min(0).max(1).optional()}),Rf=z({mode:Q(["auto","required","none"]).optional()}),Cf=z({type:y("tool_result"),toolUseId:u().describe("The unique identifier for the corresponding tool call."),content:_(Vo).default([]),structuredContent:z({}).loose().optional(),isError:O().optional(),_meta:I(u(),N()).optional()}),If=bo("type",[Bo,Jo,qo]),Bt=bo("type",[Bo,Jo,qo,hf,Cf]),Tf=z({role:st,content:E([Bt,_(Bt)]),_meta:I(u(),N()).optional()}),Af=tt.extend({messages:_(Tf),modelPreferences:Of.optional(),systemPrompt:u().optional(),includeContext:Q(["none","thisServer","allServers"]).optional(),temperature:w().optional(),maxTokens:w().int(),stopSequences:_(u()).optional(),metadata:J.optional(),tools:_(_u).optional(),toolChoice:Rf.optional()}),Mo=V.extend({method:y("sampling/createMessage"),params:Af}),Lo=K.extend({model:u(),stopReason:j(Q(["endTurn","stopSequence","maxTokens"]).or(u())),role:st,content:If}),Oo=K.extend({model:u(),stopReason:j(Q(["endTurn","stopSequence","maxTokens","toolUse"]).or(u())),role:st,content:E([Bt,_(Bt)])}),Ef=z({type:y("boolean"),title:u().optional(),description:u().optional(),default:O().optional()}),Nf=z({type:y("string"),title:u().optional(),description:u().optional(),minLength:w().optional(),maxLength:w().optional(),format:Q(["email","uri","date","date-time"]).optional(),default:u().optional()}),jf=z({type:Q(["number","integer"]),title:u().optional(),description:u().optional(),minimum:w().optional(),maximum:w().optional(),default:w().optional()}),Lf=z({type:y("string"),title:u().optional(),description:u().optional(),enum:_(u()),default:u().optional()}),Df=z({type:y("string"),title:u().optional(),description:u().optional(),oneOf:_(z({const:u(),title:u()})),default:u().optional()}),Uf=z({type:y("string"),title:u().optional(),description:u().optional(),enum:_(u()),enumNames:_(u()).optional(),default:u().optional()}),Mf=E([Lf,Df]),Ff=z({type:y("array"),title:u().optional(),description:u().optional(),minItems:w().optional(),maxItems:w().optional(),items:z({type:y("string"),enum:_(u())}),default:_(u()).optional()}),Bf=z({type:y("array"),title:u().optional(),description:u().optional(),minItems:w().optional(),maxItems:w().optional(),items:z({anyOf:_(z({const:u(),title:u()}))}),default:_(u()).optional()}),Jf=E([Ff,Bf]),qf=E([Uf,Mf,Jf]),Vf=E([qf,Ef,Nf,jf]),Kf=tt.extend({mode:y("form").optional(),message:u(),requestedSchema:z({type:y("object"),properties:I(u(),Vf),required:_(u()).optional()})}),Wf=tt.extend({mode:y("url"),message:u(),elicitationId:u(),url:u().url()}),Gf=E([Kf,Wf]),No=V.extend({method:y("elicitation/create"),params:Gf}),Hf=se.extend({elicitationId:u()}),Xf=ce.extend({method:y("notifications/elicitation/complete"),params:Hf}),Do=K.extend({action:Q(["accept","decline","cancel"]),content:wo((e)=>e===null?void 0:e,I(u(),E([u(),w(),O(),_(u())])).optional())}),Yf=z({type:y("ref/resource"),uri:u()});var Qf=z({type:y("ref/prompt"),name:u()}),ed=re.extend({ref:E([Qf,Yf]),argument:z({name:u(),value:u()}),context:z({arguments:I(u(),u()).optional()}).optional()}),td=V.extend({method:y("completion/complete"),params:ed});var Uo=K.extend({completion:B({values:_(u()).max(100),total:j(w().int()),hasMore:j(O())})}),rd=z({uri:u().startsWith("file://"),name:u().optional(),_meta:I(u(),N()).optional()}),od=V.extend({method:y("roots/list"),params:re.optional()}),nd=K.extend({roots:_(rd)}),id=ce.extend({method:y("notifications/roots/list_changed"),params:se.optional()}),yg=E([Cn,qp,td,Sf,mf,ff,Qp,ef,rf,nf,cf,wf,bf,Mn,On,Nn,Un]),bg=E([Rn,In,fu,id,zr]),vg=E([Ht,Lo,Oo,Do,nd,Ln,Dn,qt]),wg=E([Cn,Mo,No,od,Mn,On,Nn,Un]),$g=E([Rn,In,Pf,uf,Po,jr,Co,zr,Xf]),Sg=E([Ht,_o,Uo,Ro,ko,Ao,Eo,To,yt,Io,Ln,Dn,qt]);class P extends Error{constructor(e,t,r){super(`MCP error ${e}: ${t}`);this.code=e,this.data=r,this.name="McpError"}static fromError(e,t,r){if(e===C.UrlElicitationRequired&&r){let o=r;if(o.elicitations)return new xu(o.elicitations,t)}return new P(e,t,r)}}class xu extends P{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(C.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}var Ko;Ko=globalThis.crypto?.webcrypto??globalThis.crypto??import("crypto").then((e)=>e.webcrypto);async function sd(e){return(await Ko).getRandomValues(new Uint8Array(e))}async function cd(e){let r=Math.pow(2,8)-Math.pow(2,8)%66,o="";while(o.length<e){let n=await sd(e-o.length);for(let i of n)if(i<r)o+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~"[i%66]}return o}async function ad(e){return await cd(e)}async function ud(e){let t=await(await Ko).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Wo(e){if(!e)e=43;if(e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await ad(e),r=await ud(t);return{code_verifier:t,code_challenge:r}}var W=Ja().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:nu.custom,message:"URL must be parseable",fatal:!0}),yr}).refine((e)=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),bu=B({resource:u().url(),authorization_servers:_(W).optional(),jwks_uri:u().url().optional(),scopes_supported:_(u()).optional(),bearer_methods_supported:_(u()).optional(),resource_signing_alg_values_supported:_(u()).optional(),resource_name:u().optional(),resource_documentation:u().optional(),resource_policy_uri:u().url().optional(),resource_tos_uri:u().url().optional(),tls_client_certificate_bound_access_tokens:O().optional(),authorization_details_types_supported:_(u()).optional(),dpop_signing_alg_values_supported:_(u()).optional(),dpop_bound_access_tokens_required:O().optional()}),Go=B({issuer:u(),authorization_endpoint:W,token_endpoint:W,registration_endpoint:W.optional(),scopes_supported:_(u()).optional(),response_types_supported:_(u()),response_modes_supported:_(u()).optional(),grant_types_supported:_(u()).optional(),token_endpoint_auth_methods_supported:_(u()).optional(),token_endpoint_auth_signing_alg_values_supported:_(u()).optional(),service_documentation:W.optional(),revocation_endpoint:W.optional(),revocation_endpoint_auth_methods_supported:_(u()).optional(),revocation_endpoint_auth_signing_alg_values_supported:_(u()).optional(),introspection_endpoint:u().optional(),introspection_endpoint_auth_methods_supported:_(u()).optional(),introspection_endpoint_auth_signing_alg_values_supported:_(u()).optional(),code_challenge_methods_supported:_(u()).optional(),client_id_metadata_document_supported:O().optional()}),ld=B({issuer:u(),authorization_endpoint:W,token_endpoint:W,userinfo_endpoint:W.optional(),jwks_uri:W,registration_endpoint:W.optional(),scopes_supported:_(u()).optional(),response_types_supported:_(u()),response_modes_supported:_(u()).optional(),grant_types_supported:_(u()).optional(),acr_values_supported:_(u()).optional(),subject_types_supported:_(u()),id_token_signing_alg_values_supported:_(u()),id_token_encryption_alg_values_supported:_(u()).optional(),id_token_encryption_enc_values_supported:_(u()).optional(),userinfo_signing_alg_values_supported:_(u()).optional(),userinfo_encryption_alg_values_supported:_(u()).optional(),userinfo_encryption_enc_values_supported:_(u()).optional(),request_object_signing_alg_values_supported:_(u()).optional(),request_object_encryption_alg_values_supported:_(u()).optional(),request_object_encryption_enc_values_supported:_(u()).optional(),token_endpoint_auth_methods_supported:_(u()).optional(),token_endpoint_auth_signing_alg_values_supported:_(u()).optional(),display_values_supported:_(u()).optional(),claim_types_supported:_(u()).optional(),claims_supported:_(u()).optional(),service_documentation:u().optional(),claims_locales_supported:_(u()).optional(),ui_locales_supported:_(u()).optional(),claims_parameter_supported:O().optional(),request_parameter_supported:O().optional(),request_uri_parameter_supported:O().optional(),require_request_uri_registration:O().optional(),op_policy_uri:W.optional(),op_tos_uri:W.optional(),client_id_metadata_document_supported:O().optional()}),vu=z({...ld.shape,...Go.pick({code_challenge_methods_supported:!0}).shape}),wu=z({access_token:u(),id_token:u().optional(),token_type:u(),expires_in:Tp().optional(),scope:u().optional(),refresh_token:u().optional()}).strip(),$u=z({error:u(),error_description:u().optional(),error_uri:u().optional()}),yu=W.optional().or(y("").transform(()=>{return})),pd=z({redirect_uris:_(W),token_endpoint_auth_method:u().optional(),grant_types:_(u()).optional(),response_types:_(u()).optional(),client_name:u().optional(),client_uri:W.optional(),logo_uri:yu,scope:u().optional(),contacts:_(u()).optional(),tos_uri:yu,policy_uri:u().optional(),jwks_uri:W.optional(),jwks:Ka().optional(),software_id:u().optional(),software_version:u().optional(),software_statement:u().optional()}).strip(),fd=z({client_id:u(),client_secret:u().optional(),client_id_issued_at:w().optional(),client_secret_expires_at:w().optional()}).strip(),Su=pd.merge(fd),Zg=z({error:u(),error_description:u().optional()}).strip(),Og=z({token:u(),token_type_hint:u().optional()}).strip();function ku(e){let t=typeof e==="string"?new URL(e):new URL(e.href);return t.hash="",t}function Pu({requestedResource:e,configuredResource:t}){let r=typeof e==="string"?new URL(e):new URL(e.href),o=typeof t==="string"?new URL(t):new URL(t.href);if(r.origin!==o.origin)return!1;if(r.pathname.length<o.pathname.length)return!1;let n=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",i=o.pathname.endsWith("/")?o.pathname:o.pathname+"/";return n.startsWith(i)}class M extends Error{constructor(e,t){super(e);this.errorUri=t,this.name=this.constructor.name}toResponseObject(){let e={error:this.errorCode,error_description:this.message};if(this.errorUri)e.error_uri=this.errorUri;return e}get errorCode(){return this.constructor.errorCode}}class Kt extends M{}Kt.errorCode="invalid_request";class Ee extends M{}Ee.errorCode="invalid_client";class Ne extends M{}Ne.errorCode="invalid_grant";class je extends M{}je.errorCode="unauthorized_client";class Xt extends M{}Xt.errorCode="unsupported_grant_type";class Yt extends M{}Yt.errorCode="invalid_scope";class Qt extends M{}Qt.errorCode="access_denied";class we extends M{}we.errorCode="server_error";class er extends M{}er.errorCode="temporarily_unavailable";class tr extends M{}tr.errorCode="unsupported_response_type";class rr extends M{}rr.errorCode="unsupported_token_type";class or extends M{}or.errorCode="invalid_token";class nr extends M{}nr.errorCode="method_not_allowed";class ir extends M{}ir.errorCode="too_many_requests";class Le extends M{}Le.errorCode="invalid_client_metadata";class sr extends M{}sr.errorCode="insufficient_scope";class cr extends M{}cr.errorCode="invalid_target";var Zu={[Kt.errorCode]:Kt,[Ee.errorCode]:Ee,[Ne.errorCode]:Ne,[je.errorCode]:je,[Xt.errorCode]:Xt,[Yt.errorCode]:Yt,[Qt.errorCode]:Qt,[we.errorCode]:we,[er.errorCode]:er,[tr.errorCode]:tr,[rr.errorCode]:rr,[or.errorCode]:or,[nr.errorCode]:nr,[ir.errorCode]:ir,[Le.errorCode]:Le,[sr.errorCode]:sr,[cr.errorCode]:cr};class ye extends Error{constructor(e){super(e??"Unauthorized")}}function dd(e){return["client_secret_basic","client_secret_post","none"].includes(e)}var Ho="code",Xo="S256";function md(e,t){let r=e.client_secret!==void 0;if("token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&dd(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method)))return e.token_endpoint_auth_method;if(t.length===0)return r?"client_secret_basic":"none";if(r&&t.includes("client_secret_basic"))return"client_secret_basic";if(r&&t.includes("client_secret_post"))return"client_secret_post";if(t.includes("none"))return"none";return r?"client_secret_post":"none"}function hd(e,t,r,o){let{client_id:n,client_secret:i}=t;switch(e){case"client_secret_basic":gd(n,i,r);return;case"client_secret_post":_d(n,i,o);return;case"none":zd(n,o);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function gd(e,t,r){if(!t)throw Error("client_secret_basic authentication requires a client_secret");let o=btoa(`${e}:${t}`);r.set("Authorization",`Basic ${o}`)}function _d(e,t,r){if(r.set("client_id",e),t)r.set("client_secret",t)}function zd(e,t){t.set("client_id",e)}async function Ru(e){let t=e instanceof Response?e.status:void 0,r=e instanceof Response?await e.text():e;try{let o=$u.parse(JSON.parse(r)),{error:n,error_description:i,error_uri:s}=o;return new(Zu[n]||we)(i||"",s)}catch(o){let n=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${o}. Raw body: ${r}`;return new we(n)}}async function Qe(e,t){try{return await Yo(e,t)}catch(r){if(r instanceof Ee||r instanceof je)return await e.invalidateCredentials?.("all"),await Yo(e,t);else if(r instanceof Ne)return await e.invalidateCredentials?.("tokens"),await Yo(e,t);throw r}}async function Yo(e,{serverUrl:t,authorizationCode:r,scope:o,resourceMetadataUrl:n,fetchFn:i}){let s=await e.discoveryState?.(),c,a,l,p=n;if(!p&&s?.resourceMetadataUrl)p=new URL(s.resourceMetadataUrl);if(s?.authorizationServerUrl){if(a=s.authorizationServerUrl,c=s.resourceMetadata,l=s.authorizationServerMetadata??await Iu(a,{fetchFn:i}),!c)try{c=await Cu(t,{resourceMetadataUrl:p},i)}catch{}if(l!==s.authorizationServerMetadata||c!==s.resourceMetadata)await e.saveDiscoveryState?.({authorizationServerUrl:String(a),resourceMetadataUrl:p?.toString(),resourceMetadata:c,authorizationServerMetadata:l})}else{let F=await Sd(t,{resourceMetadataUrl:p,fetchFn:i});a=F.authorizationServerUrl,l=F.authorizationServerMetadata,c=F.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(a),resourceMetadataUrl:p?.toString(),resourceMetadata:c,authorizationServerMetadata:l})}let d=await yd(t,e,c),h=o||c?.scopes_supported?.join(" ")||e.clientMetadata.scope,m=await Promise.resolve(e.clientInformation());if(!m){if(r!==void 0)throw Error("Existing OAuth client information is required when exchanging an authorization code");let F=l?.client_id_metadata_document_supported===!0,ae=e.clientMetadataUrl;if(ae&&!xd(ae))throw new Le(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${ae}`);if(F&&ae)m={client_id:ae},await e.saveClientInformation?.(m);else{if(!e.saveClientInformation)throw Error("OAuth client information must be saveable for dynamic registration");let Z=await Rd(a,{metadata:l,clientMetadata:e.clientMetadata,scope:h,fetchFn:i});await e.saveClientInformation(Z),m=Z}}let g=!e.redirectUrl;if(r!==void 0||g){let F=await Od(e,a,{metadata:l,resource:d,authorizationCode:r,fetchFn:i});return await e.saveTokens(F),"AUTHORIZED"}let b=await e.tokens();if(b?.refresh_token)try{let F=await Zd(a,{metadata:l,clientInformation:m,refreshToken:b.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(F),"AUTHORIZED"}catch(F){if(!(F instanceof M)||F instanceof we);else throw F}let v=e.state?await e.state():void 0,{authorizationUrl:k,codeVerifier:H}=await kd(a,{metadata:l,clientInformation:m,state:v,redirectUrl:e.redirectUrl,scope:h,resource:d});return await e.saveCodeVerifier(H),await e.redirectToAuthorization(k),"REDIRECT"}function xd(e){if(!e)return!1;try{let t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function yd(e,t,r){let o=ku(e);if(t.validateResourceURL)return await t.validateResourceURL(o,r?.resource);if(!r)return;if(!Pu({requestedResource:o,configuredResource:r.resource}))throw Error(`Protected resource ${r.resource} does not match expected ${o} (or origin)`);return new URL(r.resource)}function Gt(e){let t=e.headers.get("WWW-Authenticate");if(!t)return{};let[r,o]=t.split(" ");if(r.toLowerCase()!=="bearer"||!o)return{};let n=Qo(e,"resource_metadata")||void 0,i;if(n)try{i=new URL(n)}catch{}let s=Qo(e,"scope")||void 0,c=Qo(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:c}}function Qo(e,t){let r=e.headers.get("WWW-Authenticate");if(!r)return null;let o=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),n=r.match(o);if(n)return n[1]||n[2];return null}async function Cu(e,t,r=fetch){let o=await wd(e,"oauth-protected-resource",r,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!o||o.status===404)throw await o?.body?.cancel(),Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!o.ok)throw await o.body?.cancel(),Error(`HTTP ${o.status} trying to load well-known OAuth protected resource metadata.`);return bu.parse(await o.json())}async function en(e,t,r=fetch){try{return await r(e,{headers:t})}catch(o){if(o instanceof TypeError)if(t)return en(e,void 0,r);else return;throw o}}function bd(e,t="",r={}){if(t.endsWith("/"))t=t.slice(0,-1);return r.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function Ou(e,t,r=fetch){return await en(e,{"MCP-Protocol-Version":t},r)}function vd(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function wd(e,t,r,o){let n=new URL(e),i=o?.protocolVersion??dr,s;if(o?.metadataUrl)s=new URL(o.metadataUrl);else{let a=bd(t,n.pathname);s=new URL(a,o?.metadataServerUrl??n),s.search=n.search}let c=await Ou(s,i,r);if(!o?.metadataUrl&&vd(c,n.pathname)){let a=new URL(`/.well-known/${t}`,n);c=await Ou(a,i,r)}return c}function $d(e){let t=typeof e==="string"?new URL(e):e,r=t.pathname!=="/",o=[];if(!r)return o.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),o.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),o;let n=t.pathname;if(n.endsWith("/"))n=n.slice(0,-1);return o.push({url:new URL(`/.well-known/oauth-authorization-server${n}`,t.origin),type:"oauth"}),o.push({url:new URL(`/.well-known/openid-configuration${n}`,t.origin),type:"oidc"}),o.push({url:new URL(`${n}/.well-known/openid-configuration`,t.origin),type:"oidc"}),o}async function Iu(e,{fetchFn:t=fetch,protocolVersion:r=dr}={}){let o={"MCP-Protocol-Version":r,Accept:"application/json"},n=$d(e);for(let{url:i,type:s}of n){let c=await en(i,o,t);if(!c)continue;if(!c.ok){if(await c.body?.cancel(),c.status>=400&&c.status<500)continue;throw Error(`HTTP ${c.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}if(s==="oauth")return Go.parse(await c.json());else return vu.parse(await c.json())}return}async function Sd(e,t){let r,o;try{if(r=await Cu(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),r.authorization_servers&&r.authorization_servers.length>0)o=r.authorization_servers[0]}catch{}if(!o)o=String(new URL("/",e));let n=await Iu(o,{fetchFn:t?.fetchFn});return{authorizationServerUrl:o,authorizationServerMetadata:n,resourceMetadata:r}}async function kd(e,{metadata:t,clientInformation:r,redirectUrl:o,scope:n,state:i,resource:s}){let c;if(t){if(c=new URL(t.authorization_endpoint),!t.response_types_supported.includes(Ho))throw Error(`Incompatible auth server: does not support response type ${Ho}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(Xo))throw Error(`Incompatible auth server: does not support code challenge method ${Xo}`)}else c=new URL("/authorize",e);let a=await Wo(),{code_verifier:l,code_challenge:p}=a;if(c.searchParams.set("response_type",Ho),c.searchParams.set("client_id",r.client_id),c.searchParams.set("code_challenge",p),c.searchParams.set("code_challenge_method",Xo),c.searchParams.set("redirect_uri",String(o)),i)c.searchParams.set("state",i);if(n)c.searchParams.set("scope",n);if(n?.includes("offline_access"))c.searchParams.append("prompt","consent");if(s)c.searchParams.set("resource",s.href);return{authorizationUrl:c,codeVerifier:l}}function Pd(e,t,r){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(r)})}async function Tu(e,{metadata:t,tokenRequestParams:r,clientInformation:o,addClientAuthentication:n,resource:i,fetchFn:s}){let c=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),a=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i)r.set("resource",i.href);if(n)await n(a,r,c,t);else if(o){let p=t?.token_endpoint_auth_methods_supported??[],d=md(o,p);hd(d,o,a,r)}let l=await(s??fetch)(c,{method:"POST",headers:a,body:r});if(!l.ok)throw await Ru(l);return wu.parse(await l.json())}async function Zd(e,{metadata:t,clientInformation:r,refreshToken:o,resource:n,addClientAuthentication:i,fetchFn:s}){let c=new URLSearchParams({grant_type:"refresh_token",refresh_token:o}),a=await Tu(e,{metadata:t,tokenRequestParams:c,clientInformation:r,addClientAuthentication:i,resource:n,fetchFn:s});return{refresh_token:o,...a}}async function Od(e,t,{metadata:r,resource:o,authorizationCode:n,fetchFn:i}={}){let s=e.clientMetadata.scope,c;if(e.prepareTokenRequest)c=await e.prepareTokenRequest(s);if(!c){if(!n)throw Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw Error("redirectUrl is required for authorization_code flow");let l=await e.codeVerifier();c=Pd(n,l,e.redirectUrl)}let a=await e.clientInformation();return Tu(t,{metadata:r,tokenRequestParams:c,clientInformation:a??void 0,addClientAuthentication:e.addClientAuthentication,resource:o,fetchFn:i})}async function Rd(e,{metadata:t,clientMetadata:r,scope:o,fetchFn:n}){let i;if(t){if(!t.registration_endpoint)throw Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);let s=await(n??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...r,...o!==void 0?{scope:o}:{}})});if(!s.ok)throw await Ru(s);return Su.parse(await s.json())}
59
- export{vo,dr,hi,Rt,fi,Gr,gi,Wt,C,yi,Ct,Ht,Rn,_o,bi,Cn,In,qt,zr,Mn,Ln,On,Nn,Dn,Un,Si,Ao,Eo,To,Po,ko,Ro,Co,Io,yt,jr,wi,Mo,Lo,Oo,No,Do,Uo,P,ye,Qe,Gt};
package/chunk-3hqka8zs.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import*as Fo from"child_process";import*as It from"crypto";import*as bt from"fs";import*as k from"path";import*as Bn from"stream";import*as $o from"util";export{Fo,It,bt,k,Bn,$o};
package/chunk-3ktcgaec.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{w}from"./chunk-q2re8mn9.js";import{me}from"./chunk-2jeg8h8d.js";import{V,J}from"./chunk-8np9b2y8.js";import{x}from"./chunk-chfzk1fx.js";import{Y,ve}from"./chunk-5h96jz3p.js";var P=async(e,s,t)=>{let a={api:e.api,provider:e.provider,model:e.id,output:[],stopReason:"stop",timestamp:Date.now()};try{let r=t?.apiKey;if(!r)throw Error(`No API key for provider: ${e.provider}`);let c=y(e,r,t?.headers,t?.fetch),n=R(e,s),i=await t?.onPayload?.(n,e);if(i!==void 0)n=i;let o={...t?.signal?{signal:t.signal}:{},...t?.timeoutMs!==void 0?{timeout:t.timeoutMs}:{},maxRetries:0},{data:f,response:g}=await me(()=>c.chat.completions.create(n,o).withResponse(),{maxRetries:t?.maxRetries,maxRetryDelayMs:t?.maxRetryDelayMs,signal:t?.signal});await t?.onResponse?.({status:g.status,headers:Y(g.headers)},e);let u=f;if(a.responseId=u.id,u.usage)a.usage=_(u.usage,e);let p=u.choices[0];if(p){let m=p.message.content;if(typeof m==="string"&&m.length>0)a.output.push({type:"text",text:m});for(let d of p.message.images??[]){let l=typeof d.image_url==="string"?d.image_url:d.image_url?.url;if(!l?.startsWith("data:"))continue;let h=l.match(/^data:([^;]+);base64,(.+)$/);if(!h)continue;a.output.push({type:"image",mimeType:h[1],data:h[2]})}}return a}catch(r){return a.stopReason=t?.signal?.aborted?"aborted":"error",a.errorMessage=J(V(r)),a}};function y(e,s,t,a){return new w({apiKey:s,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:a,defaultHeaders:ve({...e.headers,...t})})}function R(e,s){let t=s.input.map((a)=>{if(a.type==="text")return{type:"text",text:x(a.text)};return{type:"image_url",image_url:{url:`data:${a.mimeType};base64,${a.data}`}}});return{model:e.id,messages:[{role:"user",content:t}],stream:!1,modalities:e.output.includes("text")?["image","text"]:["image"]}}function _(e,s){let t=e.prompt_tokens||0,a=e.prompt_tokens_details?.cached_tokens||0,r=e.prompt_tokens_details?.cache_write_tokens||0,c=r>0?Math.max(0,a-r):a,n=Math.max(0,t-c-r),i=e.completion_tokens||0,o={input:n,output:i,cacheRead:c,cacheWrite:r,totalTokens:n+i+c+r,cost:{input:s.cost.input/1e6*n,output:s.cost.output/1e6*i,cacheRead:s.cost.cacheRead/1e6*c,cacheWrite:s.cost.cacheWrite/1e6*r,total:0}};return o.cost.total=o.cost.input+o.cost.output+o.cost.cacheRead+o.cost.cacheWrite,o}export{P as generateImages};